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 - Detecting if it's a game gear

Reply to topic
Author Message
  • Joined: 25 Feb 2013
  • Posts: 384
  • Location: Osaka
Reply with quote
Detecting if it's a game gear
Post 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?
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 3827
  • Location: Stockholm, Sweden
Reply with quote
Post 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... :|
  View user's profile Send private message Visit poster's website
  • Joined: 25 Feb 2013
  • Posts: 384
  • Location: Osaka
Reply with quote
Post 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
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 3827
  • Location: Stockholm, Sweden
Reply with quote
Post 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.
  View user's profile Send private message Visit poster's website
  • Joined: 05 Nov 2014
  • Posts: 435
  • Location: Auckland - NZ
Reply with quote
Post 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
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14740
  • Location: London
Reply with quote
Post 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
  View user's profile Send private message Visit poster's website
  • Joined: 25 Feb 2013
  • Posts: 384
  • Location: Osaka
Reply with quote
Post 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?
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14740
  • Location: London
Reply with quote
Post Posted: Mon Mar 26, 2018 6:41 am
In GG mode, NMIs are used for Gear to Gear, to signal when data is received.
  View user's profile Send private message Visit poster's website
  • Joined: 25 Feb 2013
  • Posts: 384
  • Location: Osaka
Reply with quote
Post 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?
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14740
  • Location: London
Reply with quote
Post 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.
  View user's profile Send private message Visit poster's website
  • Joined: 25 Feb 2013
  • Posts: 384
  • Location: Osaka
Reply with quote
Post Posted: Wed Mar 28, 2018 7:51 am
Do you have any reference?
(I found that retrocopy emulates it)
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14740
  • Location: London
Reply with quote
Post Posted: Wed Mar 28, 2018 8:25 am
http://www.smspower.org/Development/GearToGearCable

Retrocopy is a weird emulator...
  View user's profile Send private message Visit poster's website
  • Joined: 25 Feb 2013
  • Posts: 384
  • Location: Osaka
Reply with quote
Post Posted: Thu Mar 29, 2018 2:37 am
thank you, I evidently didn't search enough
  View user's profile Send private message
  • Joined: 02 Nov 2018
  • Posts: 2
  • Location: Turkey
Reply with quote
Detecting if it's a game gear
Post 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.
  View user's profile Send private message Visit poster's website
  • Joined: 22 Apr 2018
  • Posts: 530
Reply with quote
Post 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.
  View user's profile Send private message
  • Joined: 25 Feb 2013
  • Posts: 384
  • Location: Osaka
Reply with quote
Post Posted: Mon Nov 05, 2018 8:58 am
Thank you!!
  View user's profile Send private message
Reply to topic



Back to the top of this page

Back to SMS Power!