|
ForumsSega Master System / Mark III / Game GearSG-1000 / SC-3000 / SF-7000 / OMV |
Home - Forums - Games - Scans - Maps - Cheats - Credits Music - Videos - Development - Hacks - Translations - Homebrew |
Rate this entry!
This poll has expired.
|
|||||||||||||||||||||||||||||||
Author | Message | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
[Coding competition 2021] SMS-A-Sketch by raphnet
Posted: Sat Mar 27, 2021 10:32 pm
|
||||||||||||||||||||||||||||||
https://www.smspower.org/Homebrew/SMSASketch-SMS
|
|||||||||||||||||||||||||||||||
|
Posted: Sat Mar 27, 2021 10:34 pm | ||||||||||||||||||||||||||||||
Awesome! Maybe you can add Graphic Board support too..? | |||||||||||||||||||||||||||||||
Revo
|
Posted: Sat Mar 27, 2021 10:51 pm | ||||||||||||||||||||||||||||||
|
Posted: Sat Mar 27, 2021 11:05 pm | ||||||||||||||||||||||||||||||
Sure, that would be fun! Is the Graphic Board emulated? I don't have one... I also wanted to support drawing by light gun, but I ran out of time. |
|||||||||||||||||||||||||||||||
Revo
|
Posted: Sat Mar 27, 2021 11:09 pm | ||||||||||||||||||||||||||||||
Emulicious and Meka emulate the Graphic Board. (I think)
What about the Sports Pad? |
|||||||||||||||||||||||||||||||
|
Posted: Mon Mar 29, 2021 7:22 am | ||||||||||||||||||||||||||||||
This is brilliant. The intro alone would be a worthy competion entry. | |||||||||||||||||||||||||||||||
|
Posted: Mon Mar 29, 2021 3:15 pm | ||||||||||||||||||||||||||||||
This is a really cool idea for using the paddles. Unfortunately I don't have them to test, but from watching the video, presentationally this looks excellent! Highly impressed!
I agree with previous posters, adding support for Graphics Board and/or Sports Pads would make it a great homebrew to demonstrate generally unsupported peripherals. |
|||||||||||||||||||||||||||||||
|
Posted: Tue Mar 30, 2021 8:07 pm | ||||||||||||||||||||||||||||||
Very interesting entry - thanks for posting it!
I think this is a simple demo only apparently - in fact there's a lot of technical things here to see: - double paddle support (a first?) - MD mouse support (a first!) - 360 tiles 4bpp bitmap mode (albeit used as 1bpp here, very uncommon anyway) - vector font (seriously?!?) |
|||||||||||||||||||||||||||||||
|
Posted: Tue Mar 30, 2021 10:08 pm | ||||||||||||||||||||||||||||||
Brilliant! I got one of these for x-mas sometime back in the 80’s. | |||||||||||||||||||||||||||||||
|
Version 1.1 - Sports Pad and Graphics Board
Posted: Wed Mar 31, 2021 10:53 pm
|
||||||||||||||||||||||||||||||
Hello!
A new version is now available! Changes: - Add support for the Graphics Board - Add support for the Sports Pad - Reworked the input layer to add the above.. I am creating something called "inlib" (for input library) which I will share soon. I could not find a reliable way to auto detect the those two new input devices... it almost worked, but then I tested on real hardware and there were false positives... So at the Input diagnostics screen, you will have to press PAUSE to cycle through Graphics Board, Sports Pad, and SMS pad. The mouse and paddle are still detected automatically. Graphics Board tested with Meka and Emulicious. Not on real hardware... anyone has one to try? ;-) Sports Pad also tested in emulation only, with Meka. Slow mouse movement do not register, and it feels a bit odd... I think that's due to how Mouse->Sports Pad translation is done in Meka? I don't have a physical Sports Pad to compare. |
|||||||||||||||||||||||||||||||
|
About the "vector" font
Posted: Wed Mar 31, 2021 11:14 pm
|
||||||||||||||||||||||||||||||
Yes, I wanted something that would be drawn in strokes! But it's just a hack. Using inkscape, I drew the font on a grid (screenshot attached). Note that at that point, I had not yet implemented a proper line drawing algorithm, what I had only supported 8 directions. This limitation influenced the font design which is only drawn with 0, 90 and 45 degree lines. Then I manually encoded each letter using the qweadzxc keys which, on a qwerty keyboard, are laid out in the 8 possible directions around the s: { 2, 2, 3, "azxddewqa" }, // a
{ 0, 5, 3, "xxxxxddewqa" }, // b { 2, 3, 3, "azxcde" }, // c { 2, 3, 3, "azxcddwwwww" }, // d { 2, 2, 3, "dqazxcdd" }, // e { 1, 5, 1, "zxxdaxxxz" }, // f { 2, 0, 3, "aqwedcxxxz" }, // g { 0, 5, 3, "xxxxxwwedcxx" }, // h { 0, 3, 0, "xxxswwwwsw" }, // i { 0, 3, 1, "xxxxzsewwwwwsw" }, // j { 0, 5, 2, "xxxxxwweezzcc" }, // k Like a plotter, the drawing code simply moves a "pen" in the indicated direction by an increment of 1 unit. The length of the unit, in pixels, is what controls the font size. For letters like i and j, the "s" key toggles between pen up and pen down condition. case 'a': pen_x -= scale; break; case 'q': pen_x -= scale; pen_y -= scale; break; case 'w': pen_y -= scale; break; case 'e': pen_x += scale; pen_y -= scale; break; case 'd': pen_x += scale; break; case 'c': pen_x += scale; pen_y += scale; break; case 'x': pen_y += scale; break; case 'z': pen_x -= scale; pen_y += scale; break; case 's': pen_down = !pen_down; break; All this really isn't space efficient, but it did not matter. It just had to work :-) My code to draw lines/pixels is somehow slow, but luckily just fast enough for the effect to work. In action it looks like quick handwriting! |
|||||||||||||||||||||||||||||||
|
Posted: Wed Mar 31, 2021 11:27 pm | ||||||||||||||||||||||||||||||
Here's how the graphics board software detects the board:
https://github.com/maxim-zhao/smsgraphicboard/blob/dcc08fdbc0ac46f09144f6905ef0d... ...it looks for U,D,L,R all pressed at once. |
|||||||||||||||||||||||||||||||
|
Posted: Thu Apr 01, 2021 12:10 am | ||||||||||||||||||||||||||||||
Thanks! The waveforms in graphicboard.asm were super helpful when I was trying to learn how to read from one! I was aware of the detection technique and implemented it. It worked fine, but it became a problem when I added support for the sports pad. The sports pad also returns zeros when there is no movement... And on real hardware, the Mega drive mouse was being misdetected as the Graphics board (or maybe the paddle was, I'm on longer sure which, it was late yesterday night...) At some point I thought I had found a clever way to detect the sports pad vs. the graphics pad, but something kept breaking, either in emulation on real hardware. I tried playing around with the order in which I tried to detecting different peripherals, etc... I finally gave up. This program tries to support too many input devices I think! |
|||||||||||||||||||||||||||||||
|
Posted: Thu Apr 01, 2021 12:21 pm | ||||||||||||||||||||||||||||||
It's a good simple approach and I think actually it would work for *any* raster font - you just have to describe each character the same way you did for your own font - but I think it's great that you created your own font. |
|||||||||||||||||||||||||||||||
|
Posted: Fri Apr 02, 2021 4:40 pm | ||||||||||||||||||||||||||||||
Very original entry. Would be awesome if you could add light gun support if you were going to add to this project :) | |||||||||||||||||||||||||||||||
|
Version 1.2 - Light gun support
Posted: Mon Apr 05, 2021 8:45 am
|
||||||||||||||||||||||||||||||
Hello!
Here is version 1.2 which now also support light guns. It seems to work well in emulators and somehow on real hardware. Unfortunately I don't have a real Light Phaser for testing, so I hacked together a "Sega Competitor light gun" adapter... The trigger turned out not to be usable (could be my adapter's fault) but the light sensor works. Still it's very noisy and only registers when the screen is very bright. |
|||||||||||||||||||||||||||||||
|
Posted: Mon Apr 05, 2021 9:11 am | ||||||||||||||||||||||||||||||
It does only like very bright screens, especially if you want it to register around the edges where you have the red border. | |||||||||||||||||||||||||||||||
Revo
|
Posted: Mon Apr 05, 2021 2:29 pm | ||||||||||||||||||||||||||||||
Working fine thank you!
Would be nice to be able to plug the light phaser on port controller 2. |
|||||||||||||||||||||||||||||||
|
Posted: Tue Apr 06, 2021 10:09 am | ||||||||||||||||||||||||||||||
Yeah ! Nice addition ! | |||||||||||||||||||||||||||||||
|
Posted: Tue Apr 06, 2021 9:26 pm | ||||||||||||||||||||||||||||||
Awesome! I re-entered + increased my vote :) BTW: did you build this demo using the devkitSMS? If so then would you pls be able to share your code or Github repo etc? Thanks |
|||||||||||||||||||||||||||||||
|
Posted: Tue Apr 06, 2021 11:58 pm | ||||||||||||||||||||||||||||||
Yay! It works with the real thing! Thank you for testing!
I should be able to do this. But why port 2? Is that where the Light Phaser is normally connected for official games? (Please forgive my ignorance - I've never used one before)
Thanks! Yes, I used devkitSMS. I'm not sure if releasing this code is a good idea.. The code quality is low, this was just an experiment. If something does not seem to make sense well... it probably does not. Don't look too hard for a reason why I did this or that! That said, here is the repo: https://github.com/raphnet/sms_etch |
|||||||||||||||||||||||||||||||
|
Posted: Wed Apr 07, 2021 2:02 am | ||||||||||||||||||||||||||||||
This has me curious, could it be possible to build a light pen and draw directly on the screen? |
|||||||||||||||||||||||||||||||
|
Posted: Wed Apr 07, 2021 7:15 am | ||||||||||||||||||||||||||||||
I think it's totally doable | |||||||||||||||||||||||||||||||
Revo
|
Posted: Wed Apr 07, 2021 7:49 am | ||||||||||||||||||||||||||||||
For example if you boot SMS A Sketch from an everdrive you need controller 1 to select/boot the game, then you need to unplug the controller, plug the Light Phaser... |
|||||||||||||||||||||||||||||||
|
Posted: Wed Apr 07, 2021 9:52 am | ||||||||||||||||||||||||||||||
Thanks a lot for sharing raphnet! It's great that you managed to get the light gun working and on real hardware using the devkitSMS which is something that I have been struggling with... I think somebody suggested that the light gun could be a useful addition to 3D City so will check out now thanks. |
|||||||||||||||||||||||||||||||
|
Posted: Wed Apr 07, 2021 12:01 pm | ||||||||||||||||||||||||||||||
I've some code for that, if you're interested :-) | |||||||||||||||||||||||||||||||
|
Posted: Wed Apr 07, 2021 3:30 pm | ||||||||||||||||||||||||||||||
Really awesome entry. Graded 10 for sure! | |||||||||||||||||||||||||||||||
|
Posted: Wed Apr 07, 2021 3:43 pm | ||||||||||||||||||||||||||||||
For sure - would this be from one of your Github repos? Thanks kusfo |
|||||||||||||||||||||||||||||||
|
Posted: Thu Apr 08, 2021 10:06 am | ||||||||||||||||||||||||||||||
I don't have it on a repo, but maybe I can upload an example to github, just in case | |||||||||||||||||||||||||||||||