Modifying Genesis controller to use start button as pause on Master System

Discussion in 'Sega Discussion' started by Friend of Sonic, Mar 18, 2016.

  1. Yakumo

    Yakumo Pillar of the Community *****

    Joined:
    Mar 14, 2004
    Messages:
    20,515
    Likes Received:
    1,085
    That's good to hear. Now I need to find out what pins and maybe rig up some type of switch.
     
  2. abveost

    abveost Peppy Member

    Joined:
    Dec 15, 2014
    Messages:
    317
    Likes Received:
    56
    There's plenty of ways you can use pin 7 as pause for the controller and as the light sensor for the gun. The simplest would probably be a switch that simply connects or disconnects the pin from pause.
     
    Yakumo likes this.
  3. thunderid

    thunderid Newly Registered

    Joined:
    Jun 20, 2016
    Messages:
    2
    Likes Received:
    0
    But does the controller send a signal through pin 7 when pause is pressed? I don't think so, so you would need to mod the controller also.
     
  4. abveost

    abveost Peppy Member

    Joined:
    Dec 15, 2014
    Messages:
    317
    Likes Received:
    56
    Well the title of the thread is "Modifying Genesis controller to use start button as pause on Master System". However it shouldn't be necessary to modify the controller. You could put logic in the console to detect if only C/2 is pressed, then pull 7 low and if 9 is still active you trigger pause.
    Probably a more elegant solution but one that requires more than just rewiring.
     
  5. Friend of Sonic

    Friend of Sonic Spirited Member

    Joined:
    Jul 30, 2013
    Messages:
    152
    Likes Received:
    3
    If anyone figures something out, I will pay for a mod. XD That kind of solution exceeds my capabilities at the moment
     
    Yakumo likes this.
  6. Yakumo

    Yakumo Pillar of the Community *****

    Joined:
    Mar 14, 2004
    Messages:
    20,515
    Likes Received:
    1,085
    Same here. I built a Master System converter for my Mega Drive (doesn't work in my Wondermega for some reason) but it doesn't feature a pause button which is needed for some games. I'd pay for a modded Mega Drive pad to use with it.
     
  7. abveost

    abveost Peppy Member

    Joined:
    Dec 15, 2014
    Messages:
    317
    Likes Received:
    56
    An MCU based mod would be a console only mod and probably only require soldering a few wires. You might need to cut the trace on the SEL line to give the MCU priority over control of the line. But this would give you the added benefit of Genesis controller compatibility with those few games that don't work with it out of the box. So probably worth doing even if that's required. I'll run some tests next time I'm working on one.
    I guess it's also worth pointing out that with the cost of RF modules and MCUs running under $0.5 these days going that way is a viable option. Whether you stuff the transmitter in your controller or have a separate remote with pause and reset buttons.
     
    Friend of Sonic likes this.
  8. Yakumo

    Yakumo Pillar of the Community *****

    Joined:
    Mar 14, 2004
    Messages:
    20,515
    Likes Received:
    1,085
    I like that idea! Keeps us updated if you do try this out.
     
  9. Friend of Sonic

    Friend of Sonic Spirited Member

    Joined:
    Jul 30, 2013
    Messages:
    152
    Likes Received:
    3
    Yes, please! It'd be a wonderful mod.
     
  10. SukkoPera

    SukkoPera MegaDrive++/SMS++/NES++ Mastermind

    Joined:
    May 6, 2016
    Messages:
    163
    Likes Received:
    27
    I have been working on such a mod (MCU-based) in the last few days. It's basically working, even though things are more complex than they seem. Unfortunately I sort of killed my SMS2 with the 50/60Hz mod, so I will no longer be able to work on it until I get a new one, but then I will open a new thread about it.

    EDIT: Thread is live at http://assemblergames.com/l/threads...d-use-start-as-pause-igr-and-much-more.62624/.

    In short, the mod allows the use of a MegaDrive pad on a SMS, with 3 or 6 buttons. The Start button pauses the game. Currently, B is mapped to Button 1, C to Button 2 and A to Button 1 + 2, which allows easier playing of Double Dragon, for instance. There are also more features ported from MegaDrive++, such as combos to reset the console and switch between 50 and 60 Hz from the controller.

    The above is already working, and I also plan to use the X/Y/Z buttons of 6-button pads for autofire.

    I am open to further ideas ;).
     
    Last edited: Aug 25, 2016
    Yakumo likes this.
  11. abveost

    abveost Peppy Member

    Joined:
    Dec 15, 2014
    Messages:
    317
    Likes Received:
    56
    I've been running some tests to see what works best. No surprises. It mostly comes down to scoping out exactly what the requirements are. Here's what I'm doing and some of my ideas. Maybe some food for thought for SukkoPera.
    I have an enable/disable pin. This can be tied to a switch and also tied to the line used by the PBC in a Genesis to automatically enable/disable the chip for SMS/Genesis mode. For me this is a must since I use a Genesis to play SMS games.
    I'm playing around with using a hall sensor for this switch. An interesting idea on it's own seeing the butcher jobs some people do making holes in their cases.
    I'm using start+A+B+C for reset. It's easy to enter and fits nicely into my code.
    I can't do everything I want on 6 IO so I'm using a 14 pin chip, potentially more. The main issue is maintaining the original signals when switching the select line to read the alternate buttons. Also, I use one pin to switch select into a "pass through" mode so it can work bidirectional without involving the MPU. There are shortcuts I could take but they all seem to have issues. It would be useful to know how you're addressing this SukkoPera.
    I'll probably add passthrough modes for the button lines. This is the easiest way to ensure 100% compatibility with anything that plugs into the controller port. I don't have a mouse or whatever other obscure gadgets there might be out there to analyse the protocols they use. And it seems silly to write all that code when you can bypass it with a $0.5 part.

    Right now I have 3 IO left and if I run out I'll just up the pincount to 20. I like the idea of adding the ability to change the language/system via the controller. I could do that with 2 IO. That leaves one IO to add another button for control. I was thinking hold start for a second and then up on the pad to cycle.
    Indicating the mode with an RGB LED is a good idea. Technically a separate mod.
    If I add the language/system function I'll switch to an MPU with a few bytes of flash data to restore the last state next time it's powered on.
    Using the extra buttons on a 6 button for auto fire is a great idea. Would it be worth adding an input combo to adjust the speed of this? Maybe hold start+button and left/right to make it fire slower or faster. Maybe flash the LED to indicate the speed?
     
  12. SukkoPera

    SukkoPera MegaDrive++/SMS++/NES++ Mastermind

    Joined:
    May 6, 2016
    Messages:
    163
    Likes Received:
    27
    The easiest way to use my mod would be with a single ATmega328. That allows all of the above just for player 1 and is NOT compatible with exotic peripherals that use the controller I/O lines as outputs, like the Sports Pad. I don't know if any other peripherals that do this, anyway this is probably enough for most users, and is basically ready for release. I only need to clean up the code a bit, which I'll do after my holidays.

    How do you pass-through a pin? Do you do that in software or hardware? In the former case how do you know which side you have to read and which to write, since communication is bidirectional?

    I plan to use a hardware solution with a dedicated multiplexer. I plan to test the CD4053. One of the signals my 328 outputs is meant to control it.

    I also plan to support port extension through a MCP23017 to support the P2 controller too, for "hardcore" users ;).

    Be aware that I'm only targeting the SMS2 at the moment. It will probably be easy to port it to the original SMS, but I have no idea about the PBC.

    I have opened another thread here, why don't you come and discuss? You will find an up-to-date feature-list there.
     
    Last edited: Aug 22, 2016
  13. abveost

    abveost Peppy Member

    Joined:
    Dec 15, 2014
    Messages:
    317
    Likes Received:
    56
    I do pass through in hardware with a switch. Similar to what you're thinking about but a different part. I suppose if I used a multiplexer with a latch it could save me a few pins. But this brings up compatibility issues. A switch is just the safest choice I see.

    Good point about P2. You've reminded me how frustrating it is to not have pause there. I'm not sure if it's better to up the pin count, use an IO expander or use a second MCU to do that though. There are pros and cons to each. I'm leaning towards one mod that can be installed on either port.
    Also, with the switch I think it might be better to go with two quads instead of one hex. Mainly because I have a lot of quads I paid next to nothing for.
     
  14. SukkoPera

    SukkoPera MegaDrive++/SMS++/NES++ Mastermind

    Joined:
    May 6, 2016
    Messages:
    163
    Likes Received:
    27
    What kind of switch are you using for the passthrough?
     
  15. abveost

    abveost Peppy Member

    Joined:
    Dec 15, 2014
    Messages:
    317
    Likes Received:
    56
    For now a 4066
     

Share This Page