New Master System Mod: Use Start as Pause, IGR and much more

Discussion in 'Sega Discussion' started by SukkoPera, Aug 2, 2016.

  1. SukkoPera

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

    Joined:
    May 6, 2016
    Messages:
    152
    Likes Received:
    27
    So, I finally got my SMS2 back to business and was able to resume working on my new mod.

    First of all, kudos to @MoockyLoock for suggesting the idea, even though there also was some talk about it in a different thread.

    Without further ado, let's welcome SMS++: it is basically a port of my MegaDrive++ project to the Master System.

    Since the Master System controller only has a few buttons, it makes it impossible to perform "special combos" to control the modchip features. Thus, SMS++ requires the use of an unmodified Mega Drive Control Pad, either 3- or 6-button.

    SMS++ has the following features:
    • Pause your games from the control pad: In my opinion, a huge design flaw of the Master System is the lack of a Pause button on the control pad. This forces players to stand up and run to the console to pause the game, which often leads to game playing errors. This has always scared me away from the SMS, so I had to do something to remedy: SMS++ allows you to pause your games just by pressing the Start button, as you would do on any other modern console!
    • 50/60 Hz mode switching: If your console is PAL, you will also be able to run most games at 60 Hz, which means full-speed and full-screen! Get rid of those black bars!
      • The mod is switchless, so you don't need to modify the aesthetics of your console installing ugly switches, but rather you will be able to change the video mode:
        • Through the Pause/Reset button: Keep pushed to cycle through modes.
        • From the Player 1 controller pad: Press Start + B + Left for 50 Hz or Start + B + Right for 60 Hz.
      • The last used mode is saved automatically after 5 seconds and reused at power-up.
    • Reset-From-Pad (AKA In-Game-Reset AKA IGR): Press Start + A + B + C.
    • Make Wonder Boy in Monster Land and other games that normally don't work with the MegaDrive pad compatible with it!
    • Turn the Pause button on your Master System II to a Reset button: Now that you can pause your games straight from your controller, the Pause button on the console is pretty useless. Turning it into a Reset button (which the SMS2 lacks) might make it useful again!
    • Use A/B instead of B/C: Normally, when you connect a Mega Drive controller to a Master System console, you have to use B as Button 1 and C as Button 2. SMS++ follows this convention, but as this is something more I have never liked, it also allows you to map B1/B2 to A/B: Keep A pressed at power-up.
    • Use A as B1+B2: This makes Double Dragon much more playable, for instance. If using A/B for B1/B2, this maps to C, of course.
    • Controller autodetection at power-up:
      • When using a Master System pad, SMS++ disables all special functions, as if it just wasn't there. This also means that it should also be compatible with the Light Phaser (Though this is yet untested!).
      • When using a 6-button pad, X/Y/Z map to autofire versions of A/B/C: Autofire rate is configurabile between 3 different settings (+ Off), and every button can have a different rate. Switch among them with Start + X/Y/Z.
    • Supports a single or dual LED (either common-anode or common-cathode) to indicate the current mode and other settings (Colors can be set to any value when PWM pins are available).
    • Uses cheap Atmel AVR microcontrollers.
      • Can be flashed on different chips (ATtiny's, ATmega's, or even a full Arduino board).
    • Even though default settings are recommended, everything can be customized to taste.
    • Uses the popular Arduino environment, allowing for easy development, testing and modifications.
    • Last but not least, it is Open Source and Free Software!
    All of this comes at the cost of quite a lot of wires to solder, since 7 pins from the controller port must be interrupted, routed to the modchip and then back from it to the I/O controller chip. Then there are the 50/60 Hz, Pause and Reset signals, power and (optionally) led(s). A couple of resistors also need to be fit, and maybe a multiplexer to retain compatibility with peripherals that use the controller port I/O lines as output (that is only the Sports Pad, AFAIK).

    The mod has not yet been released, but it is 99% complete, tested (on SMS2 only) and working. It will take me another few days to complete it, at least, but then I will be leaving for holidays, so it might get pushed to the end of the month.

    UPDATE: The mod has been released, and is available at https://github.com/SukkoPera/SMSPlusPlus. Be sure to check out the wiki for installation instructions!

    I am posting this in advance to get opinions, suggestions and maybe feature requests. I have never been a fan of the SMS, so I don't really know what would be more useful to its gamers, I have mainly sticked to general features, so let me know ;).

    I would also like some thoughts on what the autofire rates should be. At the moment I'm using 3, 6 and 9 hits per second, and some testing with Alex Kidd and Double Dragon (the only games I currently have at hand) seems to suggests that these are reasonable values. Would that cover all possible uses?
     
    Last edited: Sep 14, 2016
    Getta Robo and keropi like this.
  2. MoockyLoock

    MoockyLoock Robust Member

    Joined:
    Apr 22, 2015
    Messages:
    265
    Likes Received:
    50
    WhoOo congratulations !
    Amazing job indeed !
    I hope there is a version for Arduino Nano, as i bough one spare when i did the MegaDrive mod.
    Once again, congratulations for your work, and for listening to your followers' complain :)
     
    keropi likes this.
  3. SukkoPera

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

    Joined:
    May 6, 2016
    Messages:
    152
    Likes Received:
    27
    The Nano is sort of going to be the primary platform, actually, as it has 2 pins more than the Uno and pins seem never enough with this project!

    What SMS model do you have? Would you like to help with the testing?
     
    Last edited: Aug 2, 2016
  4. MoockyLoock

    MoockyLoock Robust Member

    Joined:
    Apr 22, 2015
    Messages:
    265
    Likes Received:
    50
    I have both models, but a bit more models 2.
    I would be proud to help you in testing. But please understand that i'm very busy at work ('bout 11 hours a day), plus family, etc.
    So i may not be as reactive as you wish.
    So glad this mod could finally be done !
     
  5. keropi

    keropi Familiar Face

    Joined:
    Feb 2, 2011
    Messages:
    1,068
    Likes Received:
    64
    Another excellent mod , the pad compatibility feature really blows my mind!
    I am using competition pro pads that I have installed an extra button for pause and use the lightgun pin for this. It would be great to be able to use the superior MD pads in all games, I'll certainly test it with my pal sms1
     
  6. SukkoPera

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

    Joined:
    May 6, 2016
    Messages:
    152
    Likes Received:
    27
    keropi likes this.
  7. MoockyLoock

    MoockyLoock Robust Member

    Joined:
    Apr 22, 2015
    Messages:
    265
    Likes Received:
    50
    'llo here.
    i had a look at your intructions and for me, it's clear enough.
    Waiting for
    the next to come !
     
  8. keropi

    keropi Familiar Face

    Joined:
    Feb 2, 2011
    Messages:
    1,068
    Likes Received:
    64
    Yep, instructions are good .
    I have a sms1 though so I guess the reset stuff is different.
     
  9. SukkoPera

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

    Joined:
    May 6, 2016
    Messages:
    152
    Likes Received:
    27
    Yep, you should have a button with a resistor nearby, similarly to the Pause button in my instructions. You need to unsolder the button, straighten the legs going to the resistor and solder it back. The legs are going to be the RESET IN signal, while the resistor leg is going to be RESET OUT. No need to lift the pin of IC4.

    Note that if you don't want to be able to change the video mode through the reset/pause button, there is no need to lift their legs, since we drive those lines in an open-collector fashion.

    The rest of the installation should be very similar. If you do it, please take close-up pics so that we can make instructions!
     
    keropi likes this.
  10. MoockyLoock

    MoockyLoock Robust Member

    Joined:
    Apr 22, 2015
    Messages:
    265
    Likes Received:
    50
    'llo here !
    So, any WIP news ?
     
  11. SukkoPera

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

    Joined:
    May 6, 2016
    Messages:
    152
    Likes Received:
    27
    No, I'm on holidays at the moment ;). Will resume working on this project at the end of the month.
     
  12. MoockyLoock

    MoockyLoock Robust Member

    Joined:
    Apr 22, 2015
    Messages:
    265
    Likes Received:
    50
    Good :) So enjoy your holidays, and see ya on September !
     
  13. abveost

    abveost Robust Member

    Joined:
    Dec 15, 2014
    Messages:
    273
    Likes Received:
    42
    Curious why you cut the UDLR lines and run them through the MCU. I leave them connected and just read them. Are you worried about input commands for the MCU interfering with the game? Even if it's paused? I haven't noticed a problem with that but if it's potentially an issue then I'd want to deal with it. At this rate I'll be using a BGA before long.
     
  14. Bad_Ad84

    Bad_Ad84 The Tick

    Joined:
    May 26, 2011
    Messages:
    8,566
    Likes Received:
    1,308
    Because you cant get all the mega drive controller buttons to work like that.
     
  15. SukkoPera

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

    Joined:
    May 6, 2016
    Messages:
    152
    Likes Received:
    27
    Because when you drive Select low, L/R register as both pressed, which you probably don't want the game to see.

    Also, when using a 6-button pad, X/Y/Z/Mode are reported by the L/D/U/R signals. Those are also all low and all high at some moment during the read loop and again, you don't want the game to see that.

    This is also the way you can detect the controller type and behave accordingly.
     
    Last edited: Aug 25, 2016
  16. keropi

    keropi Familiar Face

    Joined:
    Feb 2, 2011
    Messages:
    1,068
    Likes Received:
    64
    does the avr in the middle introduce a delay in button presses?
     
  17. SukkoPera

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

    Joined:
    May 6, 2016
    Messages:
    152
    Likes Received:
    27
    Well, SMS++ works by polling the controller on its own and providing modified data to the I/O chip.

    Still, it does this much more often than the game actually reads the made-up data, so to all practical effects, the answer is no.
     
    Last edited: Aug 25, 2016
  18. SukkoPera

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

    Joined:
    May 6, 2016
    Messages:
    152
    Likes Received:
    27
    So, after some cleanup and after testing a few more games, the first release is live, as promised! Check it out at https://github.com/SukkoPera/SMSPlusPlus.

    The only supported targets at the moment are Arduino Uno and Nano. Uncomment the relevant #define at the top of the sketch to choose yours. Note that the Nano requires the use of a further external pull-up resistor. This is to free up pin 5 for a future planned feature, but you can avoid that for the moment, connecting PAUSE IN to pin 5 and compiling with the ARDUINO_UNO #define, even if you are using a Nano.

    Use at your own risk, and please double check everything you do, as I will not be responsible for any damage that might occur!
     
    Last edited: Aug 26, 2016
  19. abveost

    abveost Robust Member

    Joined:
    Dec 15, 2014
    Messages:
    273
    Likes Received:
    42
    Got it. Thanks. Not sure how I missed that. I guess my poling just happened to be out of sync with the game reading the port or too fast or something. Should probably use some testing software instead of a random game. Do you by any chance have something like this?
    That's going to add up to a lot of pins if I read/write/pass through on each one. I'd better take a look at the registers and see which lines really need to be bidirectional and which could be input only and go through the MCU.
     
  20. SukkoPera

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

    Joined:
    May 6, 2016
    Messages:
    152
    Likes Received:
    27
    Only port pins 7 and 9 (TH and TR) can be bidirectional, that is why they have an inline resistor both on the SMS board and in my installation schematics. I'm only running those through the multiplexer and passing the others through in software.

    I have no testing software, I mostly test with Alex Kidd and then some other games.
     
    Last edited: Aug 26, 2016
sonicdude10
Draft saved Draft deleted
Insert every image as a...
  1.  0%

Share This Page