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: 80
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: 2265
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: 80
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: 2265
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: 2265
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: 80
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: 2265
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: 80
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: 12423
  • 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: 2265
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: 49
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: 2265
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: 49
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: 2265
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: 49
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: 2265
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: 80
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: 31
  • 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: 80
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: 2265
Reply with quote
Post Posted: Mon Oct 22, 2018 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: 31
  • Location: Finland
Reply with quote
Post Posted: Mon Oct 22, 2018 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
  • Joined: 05 Sep 2013
  • Posts: 2265
Reply with quote
Post Posted: Tue Oct 23, 2018 8:04 am
TomyS wrote
All zeroes except for what I believe is an "a" at the beginning of the fifth row.


I didn't notice that! A0 on 5th row? Not F3? On both your systems? Did you have any SEGA card inserted?
  View user's profile Send private message Visit poster's website
  • Joined: 07 Sep 2013
  • Posts: 31
  • Location: Finland
Reply with quote
Post Posted: Tue Oct 23, 2018 9:15 am
sverx wrote
I didn't notice that! A0 on 5th row? Not F3? On both your systems? Did you have any SEGA card inserted?


Yes same on both systems, it looks like a small "a" to me. No cards inserted. I added a picture to this post.

I don't know how many numbers / letters are you supposed to see horizontally, my TV displays 32 and the first are cut off like in the picture.
1.jpg (178.28 KB)
1.jpg

  View user's profile Send private message Visit poster's website
  • Joined: 05 Sep 2013
  • Posts: 2265
Reply with quote
Post Posted: Tue Oct 23, 2018 9:29 am
yes, 32 chars are expected, you can check how many of them your TV is showing using the 'Grid' test in Video Tests. Are you using a Master EverDrive? I would expect you to see $F3 there too (it's reading from card ROM at address $0000 - actually I wonder why it doesn't read $00...)
  View user's profile Send private message Visit poster's website
  • Joined: 07 Sep 2013
  • Posts: 31
  • Location: Finland
Reply with quote
Post Posted: Tue Oct 23, 2018 9:42 am
I'm using a Master EverDrive. I have the original and X7, no difference between them in this test.
  View user's profile Send private message Visit poster's website
  • Joined: 05 Sep 2013
  • Posts: 2265
Reply with quote
Post Posted: Tue Oct 23, 2018 10:02 am
bsittler wrote
On a US Game Gear [...] it looks like the screen is all 0's except for F3 at the beginning of the 5th row


I ought to learn to read - really.
  View user's profile Send private message Visit poster's website
  • Joined: 22 Apr 2018
  • Posts: 80
Reply with quote
Post Posted: Sun Oct 28, 2018 6:19 pm
bsittler wrote
The same Game Gear (non-JP BIOS, probably made in 1993 according to the second character of the serial number) plays a steady tone


I tried this in four Game Gears. The three newest played a steady tone (all non-JP, from 1992, 1993, and 1993.) The oldest, however, plays an alternating tone! It's a no-bumperscreen JP model from 1990
  View user's profile Send private message
  • Joined: 22 Apr 2018
  • Posts: 80
Reply with quote
Post Posted: Sun Oct 28, 2018 6:21 pm
Last edited by bsittler on Mon Oct 29, 2018 3:00 am; edited 1 time in total
bsittler wrote
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.


Three other Game Gears also produce F3 or ?3 (a non-McWill screen only shows the second digit) at the beginning of the fifth row
  View user's profile Send private message
  • Joined: 22 Apr 2018
  • Posts: 80
Reply with quote
Post Posted: Mon Oct 29, 2018 2:59 am
A Mark III also produces F3

An MK-2000 (SMS-JP) produces FF, though! Same result when using the gender adapter + expansion port and when using an export adapter on the cartridge slot, and regardless of whether I use an old flash-based EverDrive SMS or a newer RAM-based X7.
  View user's profile Send private message
  • Joined: 07 Sep 2013
  • Posts: 31
  • Location: Finland
Reply with quote
Post Posted: Wed Oct 31, 2018 11:13 am
bsittler wrote
I tried this in four Game Gears. The three newest played a steady tone (all non-JP, from 1992, 1993, and 1993.) The oldest, however, plays an alternating tone! It's a no-bumperscreen JP model from 1990


Awesome, that JP GG has the correct volume levels!

So far these models have had the incorrect volume levels:
- SMS1 PAL VDP2 with Hang-On (manufactured '89)
- SMS1 PAL VDP2 with Hang-On & Safari Hunt (manufactured '90)
- SMS2 PAL VDP2 with Sonic The Hedgehog (manufactured '92)
- GG non-JP (manufactured '92)
- GG non-JP (manufactured '93)
  View user's profile Send private message Visit poster's website
  • Joined: 22 Apr 2018
  • Posts: 80
Reply with quote
Post Posted: Sat Nov 10, 2018 7:03 am
Test Suite 0.26 fails to detect a Mark III, claiming it is a Game Gear. Observed with two different SMS EverDrives (one RAM-based, one flash-based)

edit: do you detect Game Gear by slot-disable and then checking for FF, or by slot-disable and then checking for bytes unequal to known parts of the test suite? If the first (FF), it won't work in Mark III as that hardware has different behavior for reading from undriven data lines. I think maybe it lacks pullups or something, but I don't know the details
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 2265
Reply with quote
Post Posted: Mon Nov 12, 2018 9:09 am
bsittler wrote
Test Suite 0.26 fails to detect a Mark III, claiming it is a Game Gear.


Interesting. Is it detected as Japanese or not?
The check detects if it can still read from the cart ROM by copying 256 bytes from ROM to RAM and disabling cards/cartridge/expansion slot and comparing those bytes again. I wonder if the Mark III behave as the Game Gear regarding the Port $3E setting - in that case the 'is_GameGear' check it's actually a 'is_GameGear_or_MarkIII' routine and we should find a way to tell them apart later.

edit: according to this page this behavior is expected as
Quote
Earlier systems (the Mark III and earlier) either only had one media slot, or used a hardware method to activate only one slot: the cartridge provides a bridge between VCC and a line connected to the card's OE line, thereby disabling the card if both are connected simultaneously.

thus port $3E contents are unimportant on these systems.
  View user's profile Send private message Visit poster's website
  • Joined: 22 Apr 2018
  • Posts: 80
Reply with quote
Post Posted: Mon Nov 12, 2018 6:37 pm
indeed, that explains it! it's detected as

JPN?:Yes
VDP?:315-5124
TV? :60Hz(NTSC)
GameGear?:Yes

Model:Game Gear
Region:JPN TV:60Hz (NTSC)

and test.sms shows "f3" at the beginning of the 5th line
  View user's profile Send private message
  • Joined: 22 Apr 2018
  • Posts: 80
Reply with quote
Post Posted: Mon Nov 12, 2018 6:42 pm
VDP revision seems to be the only difference; fortunately I believe that should actually work reliably in this case (no old-VDP Game Gear exists AFAIK, likewise no new-VDP Mark III)
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 2265
Reply with quote
Post Posted: Yesterday at 8:56 am
So I think something like

- Port3E does change something? :false
--- Has new VDP? : false -> Mark III
--- Has new VDP? : true -> Game Gear
- Port3E does change something? :true
--- Has new VDP? : false -> SMS
--- Has new VDP? : true -> SMS II

should work, uh?
  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!