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 - Why don't some games work with the mega drive controller?

Reply to topic
Author Message
  • Joined: 07 Nov 2018
  • Posts: 11
  • Location: Brazil
Reply with quote
Why don't some games work with the mega drive controller?
Post Posted: Thu Dec 06, 2018 11:19 pm
This has probably been answered somewhere, but I can't find it.
I just wanted a logic explanation to why some games glitch out when you plug the genesis controller in.

Also, do you think there may be atari games that are incompatible with the genesis controller? most are compatible...

(I know this is not a development question but you guys might know the answer)
  View user's profile Send private message Visit poster's website
  • Joined: 08 Sep 2018
  • Posts: 70
Reply with quote
Post Posted: Thu Dec 06, 2018 11:29 pm
It all comes down to how the games input driver is programmed, simple as that. You could assume that Sega would distribute a common input library for programmers use if they wish, this library could have included genesis controller support.
  View user's profile Send private message
  • Joined: 16 May 2002
  • Posts: 1116
  • Location: italy
Reply with quote
Post Posted: Fri Dec 07, 2018 12:04 am
Some recommended reads:There are probably more floating around, but these are the first three I found with a quick search.

Interestingly enough, like you said, there doesn't seem to be a crystal clear explanation of the reasons behind the incompatibility, but there are a lot of hacks and tricks to circumvent it.

I stop here because I actually know nothing about hardware, someone else will take it from here.
  View user's profile Send private message Visit poster's website
  • Joined: 05 Sep 2013
  • Posts: 2298
Reply with quote
Post Posted: Fri Dec 07, 2018 10:28 am
cheaptools wrote
I just wanted a logic explanation to why some games glitch out when you plug the genesis controller in.


Very short version: the SMS controllers return the same data each time you read them, no matter the status of TH line - the Genesis/MegaDrive controllers return the same data when you read from them only if TH is high, and some other (extended!) data when you read from them again, switching TH status between reads.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 12485
  • Location: London
Reply with quote
Post Posted: Fri Dec 07, 2018 10:45 am
But technically, all that does is flip between B+C and A+Start. It shouldn't break games unless they for some reason keep changing TH.
  View user's profile Send private message Visit poster's website
  • Joined: 05 Sep 2013
  • Posts: 2298
Reply with quote
Post Posted: Fri Dec 07, 2018 10:49 am
true, but unfortunately when TH is low the right and left directional buttons will read as they were both pressed :|
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 12485
  • Location: London
Reply with quote
Post Posted: Fri Dec 07, 2018 10:59 am
Huh, I guess there are a lot of bad documents online which don't mention that...
  View user's profile Send private message Visit poster's website
  • Joined: 05 Sep 2013
  • Posts: 2298
Reply with quote
Post Posted: Fri Dec 07, 2018 11:02 am
yes, and I found some too when coding the part of devkitSMS that reads MD 3 and 6 buttons pad.

https://segaretro.org/Control_Pad_(Mega_Drive)#Reading (this one seems correct)
https://segaretro.org/Six_Button_Control_Pad_(Mega_Drive)#Technical_information (this one is not accurate - you can read X/Y/Z/Mode buttons after you set TR to HI the 3rd time, not the 4th!)

edit: this is the code I'm using at the moment to handle SMS/MD3/MD6 pads

    IOPortCtrl=TH_HI;
    KeysStatus=~(((IOPortH)<<8)|IOPortL);
    IOPortCtrl=TH_LO;
    MDKeysStatus=IOPortL;
    if (!(MDKeysStatus & 0x0C)) {           /* verify it's a MD pad */
      MDKeysStatus=(~MDKeysStatus)&0x30;    /* read MD_A & MD_START */
      IOPortCtrl=TH_HI;
      IOPortCtrl=TH_LO;
      if (!(IOPortL & 0x0F)) {              /* verify we're reading a 6 buttons pad */
        IOPortCtrl=TH_HI;
        MDKeysStatus|=(~IOPortL)&0x0F;      /* read MD_MODE, MD_X, MD_Y, MD_Z */
        IOPortCtrl=TH_LO;
      }
    } else
      MDKeysStatus=0;                       /* (because one might have detached his MD pad) */
  View user's profile Send private message Visit poster's website
  • Joined: 07 Nov 2018
  • Posts: 11
  • Location: Brazil
Reply with quote
But do you think there may be atari games that won't work with the genesis pad?
Post Posted: Fri Dec 07, 2018 4:11 pm
Will some atari games break aswell with the genesis controllers? or should I just ask this at atariage?
  View user's profile Send private message Visit poster's website
  • Joined: 24 Sep 2018
  • Posts: 42
Reply with quote
Post Posted: Fri Dec 07, 2018 5:56 pm
cheaptools wrote
Will some atari games break aswell with the genesis controllers? or should I just ask this at atariage?


You might need somebody more expert to comment; however the select pin is exposed as pin 7 on the joypad connector, which is marked as not connected on the Atari 2600. So I think there should be no issue as there's no way accidentally to change the inputs.
  View user's profile Send private message Visit poster's website
Reply to topic



Back to the top of this page

Back to SMS Power!