|
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 |
Author | Message |
---|---|
|
Detecting if it's a game gear
Posted: Tue Mar 20, 2018 9:15 am
|
As the titles says, is there a way to detect whether the code is running on the gamegear? | |
|
Posted: Tue Mar 20, 2018 9:30 am |
you mean you want your code to run both on SMS and on Game Gear and be able to tell the difference?
I guess it's not possible by querying the VDP - maybe querying port $00 - but I don't know what it returns on SMS... :| |
|
|
Posted: Tue Mar 20, 2018 9:53 am |
yes, I want to run my code on both of them, and do different things depending on what it's running on. Is port 00 readable?
https://github.com/oboroc/sms-journey/blob/master/doc/smstech.txt states the initial values, but not whether they can be read or not |
|
|
Posted: Tue Mar 20, 2018 10:02 am |
yes, in Game Gear mode, the msb at port $00 gives you the state of the START key (0=pressed, 1=not!)
note that the Game Gear can also run in SMS mode, you probably don't want that. |
|
|
Posted: Sun Mar 25, 2018 8:16 am |
I spotted a bit on this discussion that talks about detection. Scroll down a post or two and youll find it.
http://www.smspower.org/forums/15019-KrisalisSoftwareSMSGGDevBox#82986 |
|
|
Posted: Sun Mar 25, 2018 9:15 am |
Avoiding to Charles' doc, port $00 reads return:
SMS: the last byte of the instruction which read the port. SMS 2, GG (SMS mode), Genesis with PBC: $FF. GG (GG mode): Start button and region information |
|
|
Posted: Mon Mar 26, 2018 3:45 am |
thank you everybody!
I didn't know that start must be polled. Does this mean that start does NOT correspond to an NMI? is the hardware NMI line disabled when in game gear mode? |
|
|
Posted: Mon Mar 26, 2018 6:41 am |
In GG mode, NMIs are used for Gear to Gear, to signal when data is received. | |
|
Posted: Tue Mar 27, 2018 11:06 pm |
I didn't know that, that is interesting!
how is the data sent retrieved / is there any documentation abot the gear to gear? |
|
|
Posted: Tue Mar 27, 2018 11:55 pm |
Yes, it's well documented but not well emulated. There is hardware handshaking so basically each system can send a byte to the other and then the recipient gets an NMI and has to read it out immediately as there's no buffering. The software then makes a protocol on top of that. | |
|
Posted: Wed Mar 28, 2018 7:51 am |
Do you have any reference?
(I found that retrocopy emulates it) |
|
|
Posted: Wed Mar 28, 2018 8:25 am |
http://www.smspower.org/Development/GearToGearCable
Retrocopy is a weird emulator... |
|
|
Posted: Thu Mar 29, 2018 2:37 am |
thank you, I evidently didn't search enough | |
|
Detecting if it's a game gear
Posted: Fri Nov 02, 2018 9:05 am
|
The Game Gear had a much more impressive library, about five times the Lynx's (not including Master System games). Many Lynx games are far more impressive than Game Gear games, though; I think the Lynx would easily outclass the Game Gear if it had survived for another two years. | |
|
Posted: Sun Nov 04, 2018 4:51 pm |
Port 0 does indeed work for GG vs SMS (and GG vs. GG-SMS); if it's instead GG-SMS mode you're trying to distinguish from an actual SMS, this is trickier but sverx figured it out and implemented it in the test suite; see http://www.smspower.org/forums/17116-SMSTestSuiteWorkInProgressHomebrew?start=10... for discussion and downloads. | |
|
Posted: Mon Nov 05, 2018 8:58 am |
Thank you!! | |