What's new
Hi @Arthrimus.

I flashed your sketch for the SNES adapter on an Arduino Nano. Only temporarily soldered together to test it. My setup is a consolized NeoGeo with original cable SNES controller and wireless controller with receiver from 8bitdo. I have already ordered a couple of @Frank_fjs boards.
At first it was not easy for me to find out which Arduino pin goes to which pin of the DSUB socket. Unfortunately, this is not clearly written in your github. So I made a table. I think this also applies to the other adapters. Maybe you can take over the information on Github.

ArduinoATmegaDSUB15Button
7PD713B1
8PB05B2
9PB112B3
10PB24B4
12PB42B5
13PB510B6
1PD115Up
4PD47Down
6PD66Right
5PD514Left
11PB311Start
2PD23Select


Would it be possible to add support for the 8bitdo controller? Generally, they work. But with the button combinations where you have to hold Start for a longer time, the controller switches off. 8bitdo uses the Start button (press and hold) to switch the controller on and off and the Select button (press and hold) to connect to Bluetooth.
I also get problems using the 161 in 1 and the 120 in 1 multicard for exactly this reason. For the two multicards you have to press and hold Start for 5 seconds to return to the menu. Unfortunately, this does not work because the controllers always turns off.

Would it be possible to program an emulated start button, similar to how you did it for the Saturn controller for Select? Hold L + R together to simulate the start button or something?
 

Attachments

  • 20191218_182956.jpg
    20191218_182956.jpg
    175.4 KB · Views: 261
Last edited:
The SNES code has been updated with new features. Start and Select can now be mapped to any of the face/shoulder buttons as requested by @xtrasmiley and I have added HAS mode, which allows you to disable button remapping and rapid fire programming on the adapter so it doesn't conflict with the remapping functions of the HAS supergun. Simply hold down the A button while powering up the adapter to toggle between the HAS mode or normal mode. The status LED will blink rapidly on startup when in normal mode, and when in HAS mode it will light up solid for a second during startup. These new features will be ported to my other adapters soon.
Hi @Arthrimus.

I flashed your sketch for the SNES adapter on an Arduino Nano. Only temporarily soldered together to test it. My setup is a consolized NeoGeo with original cable SNES controller and wireless controller with receiver from 8bitdo. I have already ordered a couple of @Frank_fjs boards.
At first it was not easy for me to find out which Arduino pin goes to which pin of the DSUB socket. Unfortunately, this is not clearly written in your github. So I made a table. I think this also applies to the other adapters. Maybe you can take over the information on Github.

Would it be possible to add support for the 8bitdo controller? Generally, they work. But with the button combinations where you have to hold Start for a longer time, the controller switches off. 8bitdo uses the Start button (press and hold) to switch the controller on and off and the Select button (press and hold) to connect to Bluetooth.
I also get problems using the 161 in 1 and the 120 in 1 multicard for exactly this reason. For the two multicards you have to press and hold Start for 5 seconds to return to the menu. Unfortunately, this does not work because the controllers always turns off.

Would it be possible to program an emulated start button, similar to how you did it for the Saturn controller for Select? Hold L + R together to simulate the start button or something?
Thanks for the chart, I have added it to the Github. As for the issues with the 8Bitdo controllers, you can now remap the Start and Select buttons to any other button on the controller, so if you need to hold start for the Neo Geo multi carts then you could map it to one of the shoulder buttons. As for remapping on an 8bitdo controller, I could maybe implement an alternate way of entering button remapping or rapid fire mode by holding a button on startup. I'll look into it for a future code update.
 
Wow, awesome work man!

Now, maybe an USB version...?*







We're always asking for more!!!
 
A quick update on the Saturn to DB15 adapters. A while ago @Frank_fjs informed me that the Retro Bit wireless Saturn controllers don't work properly with my adapter as is. A few days ago I finally had some time to do a proper investigation using one of those cheap little USB logic analyzers. What I found is that while my Saturn adapter is much closer to the timings of the Saturn controller protocol than other Saturn adapters out there, it is still way off spec. I've tightened up the timings significantly, and the current build of the code is actually working with the Retro Bit wireless Saturn controller with some caveats.

In my analysis I discovered that for some reason even though I'm using direct port manipulation to drive the select lines in my code, which should be simultaneous, there is actually about a 300 nanosecond delay between each select line changing state. This is not a problem for genuine Saturn controllers or slower microcontroller based third party controllers like the wired retro bit controllers, but apparently Retro Bit wireless receiver is too fast and manages to catch that slight delay in the transition between each state causing it to misinterpret which select state it is in and send the wrong output. I've found that if I run a controller detection routine that doesn't start the normal select cycle until it detects that a controller has been plugged in, I can reliably get the Retro Bit Receiver to sync up to the select pattern and send the correct button presses. This detection scheme only works once per session though, so if you unplug the receiver while the adapter is powered on and plug it back in it will likely fail to sync and you'll get erratic button presses like before.

There is another problem with this new code, it somehow broke compatibility with Brook Retro Boards. I have no clue why at this point, which is why I have not pushed this update to the Github yet. I think I'll put this code revision in an experimental folder so the people who need Retro Bit wireless support can start using it, and everyone else can stay on the main branch of the code until I sort this out.
 
Great news, thanks for taking the time to investigate. I'll test the experimental code once it's released, would love to use my wireless Saturn controller.
 
It is done. You can find this version of the code in the folder named "saturn_controller_demux_RMAF_Retro_Bit_Fix"

Also of note, at this time the code is also dependent on a library called DigitalWriteFast. You'll need to have it installed in your Arduino IDE in order to compile this version of the firmware. You can find it here.
 
Looks like my Retrobit is dead flat, so I've got it charging at the moment.

Flashed the code and connected a stock Sega Saturn pad to map the buttons... Start seems to be mapped as coin and pushing left triggers both left and start inputs. The coin mapping seems broken too...
 
That is bizarre. I do not experience that issue with my stock Saturn controllers or my wired retro bit controller. I would make sure that your controller is getting a solid connection to the adapter. Maybe clean the connector.
 
Not having much luck with the Retrobit 2.4g controller either. Inputs 2 and 3 are permanently stuck on and pushing left triggers left and input 4.
 
I did.

Rolling back to the previous firmware everything works perfectly, with the wired genuine Sega controller.

Going to experiment with the low fuse settings...
 
No dice with low fuse settings.

I usually run with 8MHz internal oscillator with a 65ms startup time. Also tried 4.1ms and 0ms startup with same result.

Do you have a HEX file you can supply?
 
Yes, 328P.

Low fuse of E2.

With the genuine Saturn controller, it mostly works however RIGHT triggers START and the START button on its own registers no input.

With the 2.4G Retrobit buttons 1 and 2 are stuck on.
 
I pushed my compiled HEX files to the Github. Please note that I personally do not use 328Ps for these adapters, I use ATMEGA88s because they are cheaper, therefore I have not actually tested this code on a 328P. I don't expect it to make a difference but I figured I'd let you know.
 
Ahh, okay. I'll try after work today.

Previously I've tried with an Atmega8 but it didn't work.

I've noticed there's no delay when holding start plus face buttons to activate remapping mode for example. It's instantaneous, not sure if that's normal or not.

If all else fails I'll grab some 88s
 
That's not normal. Sounds like a possible frequency mismatch when compiling the HEX. What board settings do you use in the Arduino IDE to compile the HEX?

EDIT @Frank_fjs I was messing around with HEX files compiled for different frequencies and I was able to replicate some of your symptoms if I flash a HEX compiled for 1mhz. The HEX files I added to the Github are compiled for 8mhz and work correctly under all of the test conditions I have set up here, with the known exception of the Brook Retro Board.
 
Last edited:
Thanks for your assistance with troubleshooting.

Using your HEX file has resolved all issues. Both controllers (genuine and Retrobit 2.4G) working flawlessly now. I'm very happy to be able to use the Retrobit now.

I'll familiarise myself more with the Arduino environment...
 
One thing, which I'm not complaining nor fussed about, it seems I need to hit buttons B and C simultaneously on the Retrobit controller before it's detected and responsive. Normal behaviour?
 
Back
Top