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 - Smash TV controller hack?

Reply to topic
Author Message
  • Joined: 02 Mar 2011
  • Posts: 34
  • Location: Valencia,Spain.
Reply with quote
Smash TV controller hack?
Post Posted: Sat Apr 25, 2020 10:25 am
Hi, some months ago I played Smash TV on the N.E.S, and I had the option to play it with two controllers at the same time. It worked surprisingly well and I was able to beat the game.

With the first controller you could move your character with the d-pad, and with the second controller you could fire in all directions with the d-pad, and as I say, it worked so well. Neither A button nor B button are used playing this way.

The SMS version of this game does not have this possibility, then my question is: Would it be possible to hack it for this purpose?

Thank you and greetings from Spain.
  View user's profile Send private message
  • Joined: 29 Mar 2012
  • Posts: 591
  • Location: Spain
Reply with quote
Post Posted: Mon Apr 27, 2020 8:00 am
Probably it's complex because the game doesn't allow to walk in one direction and shoot in a different one, but who knows!
  View user's profile Send private message
  • Joined: 02 Mar 2011
  • Posts: 34
  • Location: Valencia,Spain.
Reply with quote
Post Posted: Mon Apr 27, 2020 3:03 pm
@kusfo I thought it would be the perfect candidate for making a controller hack because in my opinion this game is horrible because of the way we move the main character.

Thank you!!
  View user's profile Send private message
  • Joined: 22 Sep 2019
  • Posts: 76
Reply with quote
Post Posted: Mon Apr 27, 2020 4:58 pm
So, I haven't looked at the ROM yet, but I can see a potential way forward with this.

Assuming that a full byte is used to store the controller state, we remap that byte so that instead of storing **21RLDU, we store RLDURLDU. Then we change the gameplay loop so that instead of testing for a specific fire button, it tests against a mask for the high nibble. Then in the "fire" routine, instead of checking the low nibble to get the current facing direction, we check the high nibble.

Another option would be (you know I'm gonna say it) using a 6-button or Saturn controller. 6-button may be a challenge, depending on whether the controller routine gets called more than once per frame.
  View user's profile Send private message
  • Joined: 28 Feb 2016
  • Posts: 414
  • Location: Barcelona
Reply with quote
Post Posted: Mon Apr 27, 2020 5:24 pm
Hello, extracted from SegaRetro:

"Problems arise in some console ports of the game due to a lack of controller buttons. The Sega ports for example have to make do with alternative control schemes as neither the Mega Drive, Game Gear or Master System have four firing buttons. With the default Mega Drive setting, A will fire in the direction of the player, B will fire in the opposite direction and C will lock the firing direction until released. However, there is the option to play with two controllers, where player 1's D-pad handles movement and player 2's handles the shooting. Using this method means the game is restricted to single player.

Due to the awkward controller set-ups the Super NES version is often seen as the superior console port, however both Ni****do copies are unable to render as many enemies on screen at once without slowdown, and do not retain the original music from the arcade version."

Best option is seen in Xeno Crisis, it is using MD pad with 6 buttons, and use "Z" for "Up", "B" for "Down", "Y" for "Left" and "C" for "Right", then you have got full dual "pad", and implementing it to 2Playerm, with 2 MD 6 Buttons pads for full control or MS pads for native control game
  View user's profile Send private message
  • Joined: 22 Sep 2019
  • Posts: 76
Reply with quote
Post Posted: Mon Apr 27, 2020 5:43 pm
I'm in the assembly right now and both players get a full byte for controls (C1F1 and C1F2). Just trying to track down the fire routine.

I was actually thinking of using ABXY on the 6-button pad for the fire direction. That makes it compatible with the SNES Raphnet adapter as well as some cross-platform Logic-3 pads.
  View user's profile Send private message
  • Joined: 28 Feb 2016
  • Posts: 414
  • Location: Barcelona
Reply with quote
Post Posted: Mon Apr 27, 2020 5:52 pm
$D036 for P1 and $D037 for P2 switch betwin:

Byte indicates:

00.- 1 Forw 2 Rev
01.- 1 Forw 2 Lock
02.- 1 Rev 2 Lock

03-FF not used

I think it may set to lock when button is pressed to desired direction, example Y lock to UP, A lock to DOWN
  View user's profile Send private message
  • Joined: 02 Mar 2011
  • Posts: 34
  • Location: Valencia,Spain.
Reply with quote
Post Posted: Mon Apr 27, 2020 8:24 pm
Hi guys, I read your answers and I only understand a little, but I figure it out that having a full byte for controls is good news and maybe you will have the chance to get the hack working. Anyway I would like to thank you for your passion and effort, I am able to feel it from here.

I have no doubt.

Thank you!
  View user's profile Send private message
  • Joined: 22 Sep 2019
  • Posts: 76
Reply with quote
Post Posted: Mon Apr 27, 2020 11:34 pm
I'm very close with this. Got the player character facing the direction of the second dpad whilst moving in the direction of the first dpad, but they only fire when the second dpad is held up or down, and firing diagonally in some directions locks up one or both movement axes. I'll keep plugging away at it, though.
  View user's profile Send private message
  • Joined: 02 Mar 2011
  • Posts: 34
  • Location: Valencia,Spain.
Reply with quote
Post Posted: Sun May 03, 2020 6:02 pm
Hi @Wafer , is there any progress with your work?.

Thank you!
  View user's profile Send private message
  • Joined: 22 Sep 2019
  • Posts: 76
Reply with quote
Post Posted: Sun May 03, 2020 6:59 pm
I've not touched it in a few days for psychological reasons. I'll try to get to it this week, but no promises. I'm rethinking my approach to it, now that I understand the existing controls a bit more.
  View user's profile Send private message
  • Joined: 02 Mar 2011
  • Posts: 34
  • Location: Valencia,Spain.
Reply with quote
Post Posted: Sun May 03, 2020 7:31 pm
Hi again @Wafer I hope you're okay, Now we are in very difficult times for everyone and it is not easy to enjoy or to work without thinking about it.

Thank you for trying this hack.

Greetings from Spain.
  View user's profile Send private message
  • Joined: 22 Sep 2019
  • Posts: 76
Reply with quote
Post Posted: Sun May 03, 2020 10:41 pm
Well, those few days I took off not even touching this project paid off, because within an hour of looking at it I've had two revelations:

1: There was a routine checking for the fire buttons that I previously missed, somehow. This solved the problem of not being able to fire horizontally.

2: The movement lockout when firing diagonally had nothing to do with SMS software and everything to do with the keyboard matrix on my MacBook.

So, the absolute most basic version of this hack is working, but before I release I want to cook up a few other versions, and probably clean up some of the input code outside the main gameplay loop. I plan for 5 total patches, ultimately:

- 2 versions using two SMS pads, one with the pads held horizontally (normal orientation), the other with the pads held vertically (90 degrees anticlockwise), since the latter seems like it would be a bit easier for people without joysticks.

- 3 versions with support for up to two players using 6-button/Saturn controllers, with firing controls set up as follows:

-- P1: ABXY | P2: ABXY
-- P2: BCYZ | P2: BCYZ
-- P1: ABXY | P2: BCYZ

The last 3 versions will only happen if the pads only get read once per frame, which seems likely based on what I'm seeing in the debugger.
  View user's profile Send private message
  • Joined: 14 Oct 2008
  • Posts: 341
Reply with quote
Post Posted: Mon May 04, 2020 3:19 am
The NES version, where this topic idea came from, used a rotated D-Pad orientation since it is easier to hold the two controllers gripped sideways.
  View user's profile Send private message
  • Joined: 22 Sep 2019
  • Posts: 76
Reply with quote
Post Posted: Mon May 04, 2020 4:53 am
Hmm, I just looked up the NES manual and I can see that for that port, the controllers are held the exact opposite of what I envisioned, (because it puts the cable of the right controller in the palm of the right hand), but from the illustration, I can imagine that it would probably be more comfortable to use that same orientation, so I'll just do it the same way the NES does.
  View user's profile Send private message
  • Joined: 22 Sep 2019
  • Posts: 76
Reply with quote
Post Posted: Thu May 07, 2020 7:30 pm
An update on this. I've got Saturn and 6-button pads working for player 1. I need to get player 2 working again and then I want to have a look at restoring the normal SMS/3-button pad support for people that want to mix-and-match their controllers, and finally implement the start button as pause.

Once I'm done, this game will have the most controller options of any SMS title.

I've also replaced the built-in SOCD cleaner. Previously it would prioritize one direction over the other, so if your SMS dpad was a bit worn out it would tend to shoot diagonally when you were wanting to shoot in a cardinal direction. I've changed it to default to neutral.
  View user's profile Send private message
  • Joined: 02 Mar 2011
  • Posts: 34
  • Location: Valencia,Spain.
Reply with quote
Post Posted: Thu May 07, 2020 8:03 pm
Thank you @Wafer I am so happy to have the option(in the future) of playing this game with two MS controllers as the NES version. If you have the possibility, try to play the NES version with two controllers, It works so great and I was able to beat the game playing it this way.
It is difficult to express how fine it works and I guess it is the best option for playing it with real MS controllers.

When you have the patch, I could try it with both MS and MD controllers, and I also have two Megadrive 6 button controllers.

Thank you!.
  View user's profile Send private message
  • Joined: 01 Apr 2016
  • Posts: 22
Reply with quote
Post Posted: Thu May 07, 2020 8:19 pm
For what it's worth, Xeno Crisis has completely spoiled me as it's that particular 6-button controller method I'd personally use on other vintage 'twin-stick' console games (such as Smash TV).

I didn't think it'd be possible for SMS hardware to correctly read all of the MD 6-button controller inputs, this is like some kind of wizardry.
  View user's profile Send private message
  • Joined: 02 Mar 2011
  • Posts: 34
  • Location: Valencia,Spain.
Reply with quote
Post Posted: Fri May 08, 2020 1:11 pm
@bumtree I tried to play Xeno Crisis with 6 buttton controller but it is not the best option for me. The way the buttons are on the controller spoil me the experience. It is sometimes difficult to choose the correct button, I don't feel it natural as if I play with two d-pads or one snes style controller.
  View user's profile Send private message
  • Joined: 22 Sep 2019
  • Posts: 76
Reply with quote
Post Posted: Sat May 09, 2020 4:28 pm
Got player 2 working with 6-button/Saturn pads. Now I just want to get stock controls working with SMS/3-button pads and implement the start button to pause, then I just need to cook up the alternate controls for 6-button/Saturn pads and undo the invincibility hack that I've been using for testing. Once all that's done, I'll be ready for release.

There's no real magic to supporting these controllers once you know the protocols. The 6-button pad just uses extra polls of the 3-button protocol, the Saturn pad just uses the TR line as an extra multiplexer index. The trickiest bit is dealing with the fact that the Master System splits the second physical port over two logical ports, and uses a single logical port to configure both physical ports. You could even support the Team Player, Sega Mouse or Saturn 3D controller on the Master System, if you wanted analogue controls in eg. a racing game.
  View user's profile Send private message
  • Joined: 22 Sep 2019
  • Posts: 76
Reply with quote
Post Posted: Wed May 20, 2020 4:08 pm
I ended up getting caught up on a bug that was bothering me with the Saturn pads, but I've given up trying to fix that for the moment so, here's v1.0 with support for one player using two pads, or two players using one 6-button pad each. I didn't end up adding support for the start button as pause, since the game's pause routine simply locks up the main loop and doesn't even read the pads in that state.

Enjoy! Let me know if you have any problems.
  View user's profile Send private message
  • Joined: 06 Apr 2015
  • Posts: 67
Reply with quote
Post Posted: Thu May 21, 2020 4:41 pm
Sorry for the marginally-related question, but ~ How do I apply the patch?
  View user's profile Send private message
  • Joined: 22 Sep 2019
  • Posts: 76
Reply with quote
Post Posted: Thu May 21, 2020 5:15 pm
https://www.smspower.org/Hacks/HowToUseBPSAndIPSPatchFiles

The interface for flips.exe is pretty self-explanatory.
  View user's profile Send private message
  • Joined: 02 Mar 2011
  • Posts: 34
  • Location: Valencia,Spain.
Reply with quote
Post Posted: Thu May 21, 2020 5:23 pm
@Centrale first you must dowload the patch, uncompress it, and you will see five files with bps extension. If you read Wafer's instructions, you will realize that each file is for a different way of playing.

For instance, I chose the file "2B" because I wanted to use two SMS controllers. Then you need the rom, that it is sms extension. And finally you need the software to apply the patch:

https://www.smspower.org/uploads/Hacks/floating131.zip

With this software you can apply the patch that Wafer made to the rom. It is very easy to use it. Once applied the patch, you will be able to use the game hacked.

@Wafer I played it for more than an hour, and as I previous said to @Centrale I applied the 2B Variant, and it worked perfectly!!, even I beat the game!. I used two MS controllers, and after finishing the game I tried with one MS controller and one MD 3 buttons controller, and no problems either.

Thank you very much for working in this hack, you improved the way of playing this game, now it is so awesome.

Thank you a lot.
  View user's profile Send private message
  • Joined: 22 Sep 2019
  • Posts: 76
Reply with quote
Post Posted: Sat May 23, 2020 5:19 pm
You're welcome, @Aranya

I wanted to share a little something with the class, pass on the curse as it were. I just used this to play Smash TV on my Multi Mega.


  View user's profile Send private message
Reply to topic



Back to the top of this page

Back to SMS Power!