|
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
![]() |
||||||||||||||||||||||||||||||
https://www.smspower.org/Homebrew/SMSASketch-SMS
![]() ![]()
|
|||||||||||||||||||||||||||||||
![]() ![]() ![]() |
|||||||||||||||||||||||||||||||
|
![]() |
||||||||||||||||||||||||||||||
Awesome! Maybe you can add Graphic Board support too..? | |||||||||||||||||||||||||||||||
![]() ![]() ![]() |
|||||||||||||||||||||||||||||||
|
![]() |
||||||||||||||||||||||||||||||
![]() ![]() ![]() |
|||||||||||||||||||||||||||||||
|
![]() |
||||||||||||||||||||||||||||||
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. |
|||||||||||||||||||||||||||||||
![]() ![]() ![]() |
|||||||||||||||||||||||||||||||
|
![]() |
||||||||||||||||||||||||||||||
Emulicious and Meka emulate the Graphic Board. (I think)
What about the Sports Pad? |
|||||||||||||||||||||||||||||||
![]() ![]() ![]() |
|||||||||||||||||||||||||||||||
|
![]() |
||||||||||||||||||||||||||||||
This is brilliant. The intro alone would be a worthy competion entry. | |||||||||||||||||||||||||||||||
![]() ![]() |
|||||||||||||||||||||||||||||||
|
![]() |
||||||||||||||||||||||||||||||
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. |
|||||||||||||||||||||||||||||||
![]() ![]() |
|||||||||||||||||||||||||||||||
|
![]() |
||||||||||||||||||||||||||||||
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?!?) |
|||||||||||||||||||||||||||||||
![]() ![]() ![]() |
|||||||||||||||||||||||||||||||
|
![]() |
||||||||||||||||||||||||||||||
Brilliant! I got one of these for x-mas sometime back in the 80’s. | |||||||||||||||||||||||||||||||
![]() ![]() ![]() |
|||||||||||||||||||||||||||||||
|
Version 1.1 - Sports Pad and Graphics Board
![]() |
||||||||||||||||||||||||||||||
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
![]() |
||||||||||||||||||||||||||||||
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! |
|||||||||||||||||||||||||||||||
![]() ![]() ![]() |
|||||||||||||||||||||||||||||||
|
![]() |
||||||||||||||||||||||||||||||
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. |
|||||||||||||||||||||||||||||||
![]() ![]() ![]() |
|||||||||||||||||||||||||||||||
|
![]() |
||||||||||||||||||||||||||||||
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! |
|||||||||||||||||||||||||||||||
![]() ![]() ![]() |
|||||||||||||||||||||||||||||||
|
![]() |
||||||||||||||||||||||||||||||
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. |
|||||||||||||||||||||||||||||||
![]() ![]() ![]() |
|||||||||||||||||||||||||||||||
|
![]() |
||||||||||||||||||||||||||||||
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
![]() |
||||||||||||||||||||||||||||||
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. |
|||||||||||||||||||||||||||||||
![]() ![]() ![]() |
|||||||||||||||||||||||||||||||
|
![]() |
||||||||||||||||||||||||||||||
It does only like very bright screens, especially if you want it to register around the edges where you have the red border. | |||||||||||||||||||||||||||||||
![]() ![]() ![]() |
|||||||||||||||||||||||||||||||
|
![]() |
||||||||||||||||||||||||||||||
Working fine thank you!
Would be nice to be able to plug the light phaser on port controller 2. |
|||||||||||||||||||||||||||||||
![]() ![]() ![]() |
|||||||||||||||||||||||||||||||
|
![]() |
||||||||||||||||||||||||||||||
Yeah ! Nice addition ! | |||||||||||||||||||||||||||||||
![]() ![]() |
|||||||||||||||||||||||||||||||
|
![]() |
||||||||||||||||||||||||||||||
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 |
|||||||||||||||||||||||||||||||
![]() ![]() ![]() |
|||||||||||||||||||||||||||||||
|
![]() |
||||||||||||||||||||||||||||||
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 |
|||||||||||||||||||||||||||||||
![]() ![]() ![]() |
|||||||||||||||||||||||||||||||
|
![]() |
||||||||||||||||||||||||||||||
This has me curious, could it be possible to build a light pen and draw directly on the screen? |
|||||||||||||||||||||||||||||||
![]() ![]() |
|||||||||||||||||||||||||||||||
|
![]() |
||||||||||||||||||||||||||||||
I think it's totally doable | |||||||||||||||||||||||||||||||
![]() ![]() |
|||||||||||||||||||||||||||||||
|
![]() |
||||||||||||||||||||||||||||||
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... |
|||||||||||||||||||||||||||||||
![]() ![]() ![]() |
|||||||||||||||||||||||||||||||
|
![]() |
||||||||||||||||||||||||||||||
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. |
|||||||||||||||||||||||||||||||
![]() ![]() ![]() |
|||||||||||||||||||||||||||||||
|
![]() |
||||||||||||||||||||||||||||||
I've some code for that, if you're interested :-) | |||||||||||||||||||||||||||||||
![]() ![]() |
|||||||||||||||||||||||||||||||
|
![]() |
||||||||||||||||||||||||||||||
Really awesome entry. Graded 10 for sure! | |||||||||||||||||||||||||||||||
![]() ![]() |
|||||||||||||||||||||||||||||||
|
![]() |
||||||||||||||||||||||||||||||
For sure - would this be from one of your Github repos? Thanks kusfo |
|||||||||||||||||||||||||||||||
![]() ![]() ![]() |
|||||||||||||||||||||||||||||||
|
![]() |
||||||||||||||||||||||||||||||
I don't have it on a repo, but maybe I can upload an example to github, just in case | |||||||||||||||||||||||||||||||
![]() ![]() |
![]() |