Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - SMS Test Suite - work in progress homebrew

Reply to topic Goto page Previous  1, 2, 3
Author Message
  • Joined: 22 Apr 2018
  • Posts: 68
Reply with quote
Post Posted: Tue Sep 11, 2018 2:42 pm
sverx wrote
I'm reading from port $00 just once when the ROM starts. Apart from GG native mode, which I'm not addressing in this suite, I'm wondering if it's a bug with EDx7 or actually if it's correct that way and it's the Master ED which isn't behaving correctly. I mean, in SMS mode, shouldn't the port read just what it reads on a real SMS? If so, I shouldn't be able to tell from the program if it's running on a SMS or on a GG in SMS mode by checking port $00...


I think it's not a bug, it's just a symptom of what instructions the EDSMS / EDGG / EDSMSx7 uses to jump to $0000 (jmp 0 vs. rst 0, perhaps?) combined with standard "unmapped port" behavior similar to SMS II. In any case, I don't think port 0 is a reliable GG-SMS detector.

AFAIK the only reliable detector is to jump to RAM, toggle bit six of port $3E, and then see whether the cartridge data is still visible. If it is, you aren't running on a Master System. Then toggle it back and return to ROM as normal.
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 2243
Reply with quote
Post Posted: Wed Sep 12, 2018 1:43 pm
yes, port $00 seems not reliable - we want something that works using either 'old' Master Everdrive or the newer one.

That "cartridge slot enable" bit seems interesting. Here it says it shouldn't have any effect on a GG, thus meaning that I should still be able to read, say, the SEGA header, on a Game Gear even if I set that bit to "1", which would instead make the cartridge inaccessible on an SMS...

I'll run a few tests later.
  View user's profile Send private message Visit poster's website
  • Joined: 22 Apr 2018
  • Posts: 68
Reply with quote
Post Posted: Wed Sep 12, 2018 2:44 pm
sverx wrote
yes, port $00 seems not reliable - we want something that works using either 'old' Master Everdrive or the newer one.

That "cartridge slot enable" bit seems interesting. Here it says it shouldn't have any effect on a GG, thus meaning that I should still be able to read, say, the SEGA header, on a Game Gear even if I set that bit to "1", which would instead make the cartridge inaccessible on an SMS...

I'll run a few tests later.


Thank you! Might be slightly safer — but no more difficult — to set all three slot-enable bits to 1 in case you're on a real SMS but another copy of the same software is flashed (or RAM-loaded, burned, or even masked) on a device in a different slot, e.g. for development; also makes sure the suite works from any slot that's able to load it
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 2243
Reply with quote
Post Posted: Mon Oct 01, 2018 12:35 pm
mmm... do somebody knows if all the SMS BIOSes leave a copy (at $C000) of the value it has set to port $3E?
  View user's profile Send private message Visit poster's website
  • Joined: 05 Sep 2013
  • Posts: 2243
Reply with quote
Post Posted: Fri Oct 05, 2018 8:34 am
See if this works - I have no way to test it on a GameGear, but on a Master System / on Emulicious works as expected whereas on MEKA, which seems to ignore port $3E bits, works as we are expecting on a GameGear.
TestSuite v0.25.rar (19.04 KB)
SMS Test Suite v. 0.25 ROM

  View user's profile Send private message Visit poster's website
  • Joined: 22 Apr 2018
  • Posts: 68
Reply with quote
Post Posted: Sat Oct 06, 2018 6:44 pm
0.25 works! All four Game Gears I have access to are reliably detected as Model:Game Gear, TV:60Hz (NTSC). Also the no-bumperscreen Japanese Game Gear is correctly detected as Region:JPN and the rest as Region:USA. Detection works with both generations of SMS EverDrive and with both EverDrive GGs.

Also, the linearity test looks correct on the original GG screens — all 5 circles are round, and they touch the left and right edges of the screen without being truncated. The top and bottom edges are of course enclosed by the normal GG-SMS unusable border areas.
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 2243
Reply with quote
Post Posted: Mon Oct 08, 2018 9:47 am
Nice! If only we could find a way to tell SMS and SMS II apart now (not speaking about the VDP revision) that would be the icing on the cake...

I was wondering... do enabling the card slot (even with no card inserted) and the cartridge slot (with the Test Suite ROM inserted) at the same time will somehow make ROM contents unreadable/corrupted on a first revision SMS?
  View user's profile Send private message Visit poster's website
  • Joined: 22 Apr 2018
  • Posts: 68
Reply with quote
Post Posted: Mon Oct 08, 2018 1:53 pm
My electronics novice view: I think that it's a bad idea because of the potential for a harmful bus conflict when multiple slots are used, with potential undefined behavior and even the possibility of multiple sources actively driving the lines out of spec. See e.g. https://wiki.nesdev.com/w/index.php/Bus_conflict — however it's worse for the multi-slot Sega systems

Edit: and for SMS version detection, can you use BIOS revision to distinguish them? Other than that, VDP and I/O controller are the only mostly-correlated differences that I know of that are software-visible
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 12391
  • Location: London
Reply with quote
Post Posted: Mon Oct 08, 2018 3:00 pm
You can find the chips from both models inside each other (for some subset of the chips), so there's no way to be sure just from them.

I think you can only find Alex Kidd or Sonic in an SMS2, and the latter is not found in an SMS1.

The cartridge and card slots could contend and damage each other if they try to drive the data at the same time, but for system detection it's probably not dangerous (or useful).
  View user's profile Send private message Visit poster's website
  • Joined: 05 Sep 2013
  • Posts: 2243
Reply with quote
Post Posted: Mon Oct 08, 2018 3:41 pm
I'm in no way an expert - thus I won't ever try doing anything that might harm a single console.
  View user's profile Send private message Visit poster's website
  • Joined: 11 Mar 2006
  • Posts: 48
Reply with quote
Post Posted: Thu Oct 11, 2018 8:35 am
I just tested it with a megadrive 2 + chinese everdrive. It looks so nice! It recognizes the console as megadrive 60hz. I use it to test controllers. The only downside is that if no buttons are pressed it returns to the main menu by itself.
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 2243
Reply with quote
Post Posted: Thu Oct 11, 2018 8:39 am
in the pad test, being a section where you might want to check if everything is working correctly I thought that no key combination was good to exit the test but to do not press anything for some 3 seconds...
  View user's profile Send private message Visit poster's website
  • Joined: 11 Mar 2006
  • Posts: 48
Reply with quote
Post Posted: Thu Oct 11, 2018 10:42 am
It's great for testing controllers. But some controllers have problems with the cable near the connector. So I'm holding A+B+C and I wanted to move the cable near the connector to see if the connection breaks. But I didn't had time to reach the console because the tested ended of inactivity.
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 2243
Reply with quote
Post Posted: Thu Oct 11, 2018 10:58 am
oh now I see - it's not doing as I intended it. Going to fix that ASAP :)

edit: check this
SMSTestSuite_0.26.rar (19.06 KB)
SMS Test Suite v. 0.26 ROM

  View user's profile Send private message Visit poster's website
  • Joined: 11 Mar 2006
  • Posts: 48
Reply with quote
Post Posted: Fri Oct 12, 2018 7:02 am
Thank you. I just sold my everdrive, but I will test it when the new one arrives. I must say that I really love the interface and that;s really easy to use. If you have the time maybe you can add some ram testing and other chips. Also please don't increase the size of the rom. When the final version will be released, I'm gonna make a sms cart with this rom :)
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 2243
Reply with quote
Post Posted: Mon Oct 15, 2018 3:37 pm
to bsittler (or to anyone that has both an SMS and a SMS II): please test this attached test and let me know if they report some different values - thanks.

edit: it's not enabling two slots at the same time - just to be clear.
test.rar (2.89 KB)
small test that hopefully will help me tell SMS and SMS II apart... (by NOT checking the VDP)

  View user's profile Send private message Visit poster's website
  • Joined: 22 Apr 2018
  • Posts: 68
Reply with quote
Post Posted: Sun Oct 21, 2018 5:01 pm
sverx wrote
to bsittler (or to anyone that has both an SMS and a SMS II): please test this attached test and let me know if they report some different values - thanks.

edit: it's not enabling two slots at the same time - just to be clear.


I don't have any SMS II. My only "SMS I" is an MK-2000 (a.k.a. SMS JP), although I guess the Mk3 is fairly close too. I will need to retrieve both the MK-2000 and Mk3 from storage to test those, so it might be a week or two before I get those results.

On a US Game Gear the edges of the test display are truncated, but it looks like the screen is all 0's except for F3 at the beginning of the 5th row — a little hard to tell, though, as only the edge of the F is visible.

Also FWIW Test Suite 0.26 identifies this US Game Gear correctly.
  View user's profile Send private message
  • Joined: 07 Sep 2013
  • Posts: 28
  • Location: Finland
Reply with quote
Post Posted: Sun Oct 21, 2018 5:39 pm
sverx, my SMS1 & SMS2 show the same values. All zeroes except for what I believe is an "a" at the beginning of the fifth row.

Also can anyone please run the "volume clip test" in the Audio Tests. If you only hear a single constant tone, then the volume levels are not working correctly. The test is a tone changing at two volume levels.

I've heard that SMS2 models have faulty volume levels but my SMS1 PAL 1988 Hang-On + Safari Hunt model is affected too. If you test this on a Mega Drive it works as intended. So what I'm interested is do any Master System / Game Gear / Mark III models have the correct volume behaviour?
  View user's profile Send private message Visit poster's website
  • Joined: 22 Apr 2018
  • Posts: 68
Reply with quote
Post Posted: Sun Oct 21, 2018 6:44 pm
The same Game Gear (non-JP BIOS, probably made in 1993 according to the second character of the serial number) plays a steady tone
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 2243
Reply with quote
Post Posted: Yesterday at 1:21 pm
TomyS wrote
sverx, my SMS1 & SMS2 show the same values.


I had forget you had both! Thanks for the test... unfortunately this confirms that I have not yet found any way to tell them apart - if any exists.
  View user's profile Send private message Visit poster's website
  • Joined: 07 Sep 2013
  • Posts: 28
  • Location: Finland
Reply with quote
Post Posted: Yesterday at 3:11 pm
Thank you bsittler for testing!
Little clarification for my previous post about my SMS1, it displays 1988 on the start up screen but going by the serial number on the bottom it seems to be manufactured in 1990.

These SMS models and Game Gear are from the 90s, how do the older models sound?
  View user's profile Send private message Visit poster's website
Reply to topic Goto page Previous  1, 2, 3



Back to the top of this page

Back to SMS Power!