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++ modified sketch for GG2SMS and auto-fire

Reply to topic
Author Message
  • Joined: 12 Feb 2013
  • Posts: 80
Reply with quote
SMS++ modified sketch for GG2SMS and auto-fire
Post Posted: Tue Oct 22, 2019 5:10 pm
I modified the SMS++ source a bit to add a couple of features I wanted.

Additions include auto-fire for master system pad (needs TH button) and auto-fire for megadrive 3-button pad.

Also, added ability to send the player 2 pad down arrow signal for use with GG2SMS games. (requires an Arudino nano and additional wire from digital out 5 to the P2-Down pin).

With the sms pad, there is a flag to disable its combos if you intend to use a light gun with the TH line instead.

Changed the combo trigger for all controllers. Megadrive 3-button and 6-button combo trigger is 'start' and the master system pad requires a TH line button.

Combos are:

Master System pad
-------------------------
TH+Up = Pause
TH+Down = Player 2 Down
TH+Left = 50Hz
TH+Right = 60Hz
TH+A+B = In-Game Reset
TH+A = Cycle Auto-Fire for A
TH+B = Cycle Auto-Fire for B

Megadrive 3-Button
--------------------------
Start+Up = Pause
Start+Down = Player 2 Down
Start+Left = 50Hz
Start+Right = 60Hz
Start+A+B = In-Game Reset
Start+A = Cycle Auto-Fire for A
Start+B = Cycle Auto-Fire for B
Start+C = Cycle Auto-Fire for C

Megadrive 6-Button
--------------------------
Start+Up = Pause
Start+Down = Player 2 Down
Start+Left = 50Hz
Start+Right = 60Hz
Start+A+B = In-Game Reset
Start+X = Cycle Auto-Fire for A
Start+Y = Cycle Auto-Fire for B
Start+Z = Cycle Auto-Fire for C

The modified sketch is attached.
SMSPlusPlus.ino.zip (9.46 KB)
SMS++ modified

  View user's profile Send private message
  • Joined: 22 Sep 2019
  • Posts: 98
Reply with quote
Post Posted: Tue Oct 22, 2019 6:45 pm
Nice work! Glad that I had the good sense to shift GG start to the MD A button in Batman Forever, otherwise some combos would've clashed. I'll keep that in mind for other games that use start as a modifier.

Edit: Though, that being said, the game would probably be all but unplayable with the SMS++, since the only single button that would be hooked up as GG start would be controller 2 down :/

Perhaps make start+B+C enable passthrough behaviour for MD pads as a workaround to support games/hacks with native MD pad support? Or maybe hold B or C on startup to do it?

Or probably the ultimate solution, if possible:

- Hold a SMS pad button on startup to enable passthrough mode, the same as your flag already does, but selectable on a per-game basis without having to change the flag.
- Hold a MD pad button on startup to use MD pad logic implemented by the SMS++, to allow the combos but also allowing mostly compatible use with hacks that support the MD pad.
- Hold a different MD pad button to enable passthrough mode for full MD pad compatibility, but no SMS++ features.

Caveat: I know absolutely nothing about Arduinos, so please excuse me if my suggestion reads as insane.
  View user's profile Send private message
  • Joined: 12 Feb 2013
  • Posts: 80
Reply with quote
Post Posted: Tue Oct 22, 2019 9:17 pm
Yes, I have thought about a pass-through option for megadrive pads and it would have it's benefits if there is software that would take advantage of it. Wouldn't be too hard to do either. I thought you had mentioned your GG2SMS patches would have both megadrive and master system pad options so not sure what could be gained by it though.

Currently with sms++ everything is passed to the sms console as master system pad data (and control signals), so that is all it sees regardless of which type of controller is attached...which is good for pure compatibility.
  View user's profile Send private message
  • Joined: 22 Sep 2019
  • Posts: 98
Reply with quote
Post Posted: Tue Oct 22, 2019 9:31 pm
I perhaps should've couched my previous statement with the fact that some games (so far, just Batman Forever) are a bit unorthodox with regards to how they handle the button limitations on the GG.

For Batman Forever, start is used as an action button (block), and pausing is done by pressing all three GG buttons. To make sense of this on the MD pad, I shifted GG start to A, and made MD start act as all three buttons. Down on pad 2 still acts as start, so technically it's still playable with 2 SMS pads, but... UGH. From what I can tell, pausing would be incompatible with your sketch (Batman Forever is nightmare code so I haven't implemented the pause button, and even if I did the pause button can't be held down like a pad button).

It gets more complicated though, by the fact that a move called cape morph requires button 1 to be pressed whilst blocking. Again, from what I can tell this would also be incompatible with your sketch.

For what it's worth, we're talking about so far just 1 game, but a passthrough and/or filtered mode would mean a bulletproof mod. Eg. I enhanced Sonic Drift so that powerups can be activated using A as well as d-pad up.

Batman Forever is a bit of a nightmare in general. It has two different pad polling routines, one for the title screen and one for everywhere else. The second routine doesn't output S-21RLDU or mask the inputs, instead it uses rotations, shifts and binary logic to store it as... something else. That meant I had to model the GG start button's port before I let the original code take over.

Fortunately, there are no Mortal Kombat entries exclusive to the GG, since that's the offending engine, so I'll hopefully never have to deal with that BS ever again.
  View user's profile Send private message
Reply to topic



Back to the top of this page

Back to SMS Power!