Hi, I recently installed this on a nano and I can confirm there is indeed issues with an official 6 button megadrive controller. The issues of holding B+C remains and well as Start + A. This happens for me in normal games like Sonic 1 and 6 button games like Street Fighter. Is there any chance of a fix for 6 button controllers also? Thanks! Oh and my three button pad works fine, just generally prefer the 6 button one, it's in better shape.
I've been working on proper support for the 6-Button pad just recently. I've noticed too that it seems to respond more slowly than the ordinary pad to changes on the Select line. What you can try is modifying this line in the MD++ source code (line #674 in the current version): delayMicroseconds (1); Make that 5, flash your Nano again and see if the problem goes away. You can even try bigger values, up to 10 I'd say. Unfortunately I don't have any original 6-Button pads so I can't really be more precise than this. 3 seemed to help with my Chinese controllers. Proper support will require some more work on my end (but I'm almost there) and unfortunately some rewiring on existing installations .
I modified delayMicroseconds (1); to 5 like you said. Seems to have improved response time to pad changes. Oddly enough, the issues I had with pressing B+C or Start + A seem to have vanished also. Will need to test this more.
Actually my hint was aimed at solving the B+C issue, but it might have helped with reponse time too, as the pad was probably being misread . Let me know what value you settle upon in the end, so that I can make it the default. You are using an original 6-button pad from Sega, right?
Yup, using an original sega 6-button pad I got during the good old days. 5 seems to work perfectly for me, so I've left it at that for now. I'll report back if I come across issues, but so far none.
OK, thanks for the feedback. I have just made 5 the default, and turned it into a more easily configurable parameter. Have you got any 6-button games? Could you test a few, in case?
Hey. Just tested Street Fighter 2. The only 6 button game I have. Issues of holding B+C are gone, as well as start + a. There is a new small issue that only happens in this six button game. Changing to ntsc and keeping start + b held down for more than a second will change it back to pal. Oddly enough this issue doesn't happen if already on pal. Other than that everything seems fine. I also tried changing the delayMicroseconds up to 10, but this issue persists. Just a minor thing really, and its far better than what it used to do.
Yeah, that happens because reading the 6-button pad correctly is tricky. As already mentioned, I have been working on a new version of MD++ that uses a totally different method of reading the controller, which is more reliable but needs a change of wiring. It's available on the github page, just select the 6button branch and make sure to download all files (make sure that when you open the project in Arduino, a second tab with the readpad.S file shows up). The wiring changes are as follow: Move Pad Pin 9 from Arduino Pin 6 to Arduino pin 0 Swap Arduino Pin 3 with 5 (i.e. Pad Pin 3 with 6) Move Pad Pin 1 from A0 to 7 Move Pad Pin 2 from A1 to 6 Note that you will probably need to disconnect any controller from port 1 to reflash your Arduino, once you have switched to this wiring. I would be glad if Koritha could test this on SF2.
Alright. Gave this a try. Had to get "SendOnlySoftwareSerial" and add this to my Adruino library. After that it compiled fine. Swapped the wires around but have issues. Holding reset still works fine, but pad won't reset or change region on 3 button games with my 6 button pad. SF2 partially works. Start a+b+c will reset. Can't change from 50 to 60hz with the pad though. Pretty certain it's wired up fine, though can check again. Could it be a coding bug?
Yeah, sorry, I should have told you about SendOnlySoftwareSerial: since this version is currently under development, it has debugging enabled by default. I might have given wrong instructions to modify the wiring. Let's check that the final wiring is the following: Pad Port Pin -> Arduino Pin 1 -> 7 2 -> 6 3 -> 5 4 -> 4 6 -> 3 7 -> 2 9 -> 0 Please make sure that this reflects your current connections. Have you got a Schottky diode on hand?
Checked my wiring again there. Everything seems to be in order. Arduino Pin 0, I'm assuming that's RX0, right? Other than that everything seems to be fine. In game reset works for SF2 with the 6 button pad, but nothing else. When I flashed the Arduino I had the second tab with readpad.S. Sadly I don't have a Schottky diode at hand.
Yup, that's RX0. Are you plugging the pad with the console turned OFF, and only turning it ON then? MD++ detects the pad type at power-up, so you cannot plug or change controllers while the console is running.
The console is turned off when I plug the pad in. I never change pads when the console is powered on.
Sorry, what I said applies to SMS++, not to MD++. I guess I got a bit confused, heh heh heh . Let me do some debugging...
Normal three button games like sonic do nothing, not even in game reset. With SF2 the in game reset will work, but only after I mash the buttons a lot. Pretty certain my wiring is good, but I can look at it again if you think there's nothing wrong with the code.
Well, anything can be wrong with the code, since this branch is sort of experimental, but I'll share my experience with the current github code: - 3-button games (Well, Sonic at least) work fine with both 3- and 6-button pads. All MD++ features work as expected. - 6-button games (Well, Davis Cup Tennis at least) work fine with 6-button pads. All MD++ features work as expected. Davis Cup can also be played with a 3-button pad, but I haven't tested it, so I'm not saying it does not work. I'll test it ASAP. There is a slight issue with reading 6-button pads in 6-button games, where I sometimes get spurious reads of Left and Right when X and Mode (respectively) are pressed, but this happens only seldom and basically shouldn't interfere with normal MD++ functionality, since all combos require Start and B to be pressed as well. I'm not sure this can be 100% fixed, but it can also be due to my flaky setup, I still need to solder some things in place properly . EDIT: Nah, I've since soldered everything but the issue persists . So I would really suggest to recheck your wiring again, sorry for this. If your MD is close to your PC you can do some debugging: Unsolder the +5V wire Connect the Nano to your PC and open the Arduino serial terminal Turn on your Megadrive I recommend to carry out steps 2 and 3 in quick succession. You should see some debugging messages, including all keypresses that MD++ detects.
I've been following this for a few weeks now, and I finally got my arduino nano in to try. I'm more than happy to wire mine up for either the 3-button or 6-button for testing... can anyone help identify for me a few spots where I would need to cut for reset, and help me identify the reset in and out spots to wire up to? It's a Japanese model 1. Board revision is IC BD M5 VA2. Here are the pics I took. Sorry for the blurriness, but I don't have the best lighting in my place =/