Developing a Sleek Modern Supergun that Works with Sega Saturn Pads and the Mc Cthulhu

Ok so since the original problem that prompted the creation of this thread has been solved I’ve decided to retool it into a development log. So with that said, I guess I should explain what exactly I am trying to do here.

Project Goals

Design a complete modern, stylish, compact JAMMA compatible Supergun that has all the bells and whistles such as:
[list=1]
[] Multiple video output options including: RGB, Component, S-Video and Composite. (Maybe HDMI in the future)
[
] Game controller input options. For now Sega Saturn pads and MC Cthulhu (through Sega Saturn adapter cable). Possibly PS360+, but I don’t have any way to test that right now. In the future I am thinking of exploring a modular controller input board to support other game controllers.
[] Integrated DC-DC converters to provide all JAMMA voltages from a simple laptop style power brick.
[
] Kick Harness Support for Capcom etc.
[*] Other stuff I can’t think of right now!
[/list]

The first order of business for me has been getting the Saturn controller adapter working. I have taken a schematic from this thread from NFGgames and heavily modified it to make it work properly with the MC Cthulhu. I’ve got more work to do on that front but the current schematic included below is working properly if anybody wants to build it. Once I’ve refined and debugged the controller interface I will move to the video conversion circuits and then the last thing I’ll sort out the power conversion stuff.

UPDATE: 10/1/17 I received my new 74ls193 chips in the mail yesterday and was able to get one wired up in my test circuit. With this chip replacing the 74ls393 the circuit works properly without the need of any additional logic gates. This keeps the parts count low and minimizes the amount of soldering that needs to be done. With this new circuit tested and a few modifications to the original schematic’s clock circuit design I now am ready to release an updated schematic which is tested and working if anyone wants to try building one.

**Current Working Controller Schematic: **

The schematic may be a little sloppy, and for that I apologize. It’s the first schematic I’ve ever drawn on a computer so I’m a little clumsy with the tools right now. From here I’m going to focus on making the circuit a little more efficient by swapping the 74ls374 output registers with 74ls139 1 in 4 out demultiplexers, thus eliminating the need for the 74ls138 and greatly reducing the amount of buss wires and soldering required to build the circuit. Once those changes have been implemented and debugged I’m going to look into PCB options. I’ll definitely be doing a small run for my personal use once I’ve got a PCB designed, and if anyone else likes the idea of having one of these we can talk about it when the time comes.

Original Post:

[details=Spoiler]I’ve been working on a Supergun for my CPSII that will interface with my MC Cthulhu equipped arcade sticks. My plan to make this work is simply to build a decoder for one of the MC Cthulhu’s compatible controller modes so that I can get discrete outputs to feed the the jamma connector and kick harness. This should work fine in theory but I’ve hit a few snags. If anyone has any suggestions I’d be thrilled to hear them.

My original approach was to build a Sega Saturn controller decoder using discrete logic based off of this thread from NFGgames. Here is the Schematic:

I built a prototype on perfboard:

With a genuine Saturn controller this decoder works perfectly, but with the MC Cthulhu connected I have strange button mapping issues. Up Down and Left register as HP MP and LP respectively and vice versa with the punch buttons. I think I know what is happening looking at the bit assignments for the Saturn controller from Gamesx.com.

See that both Up and Z (or in this case HP) are on the same data pin, but different states. So are Y, X and Down and Left respectively. This leads me to believe that the Cthulhu is simply misinterpreting the what state is being polled by the decoder and thus reporting jumbled up data depending on which state is being polled. The weirdest part to me is that B,C,A and Start all report correctly. Anyway I can only assume that the issue here might have something to do with the clock circuit on my decoder not operating at the frequency that the cthulhu expects, and that this is not an issue for genuine controllers because they are also using discrete logic to do the multiplexing and not some form of software emulation.

Unfortunately I lack an oscilloscope to really see what’s going on here, and I have no idea how to go about modifying the clock generator to test different frequencies, but if anyone has any suggestions I’d be all ears.

Here is a video demonstrating the controller mapping issues in real time.


[/details]

Undamned DB15 decoder would work nicely. Plus you can map buttons on the fly

I’m familiar with Undamned’s USB decoders and while they are very nice, I’d prefer to get this design working. Mostly for curiosity’s sake (and personal pride).

I have actually been working on this for a little while now and I finally got an oscilloscope and I think I’ve pinpointed the problem with this circuit. The way the circuit works is that the 555 timer generates a clock signal which is fed into the 74ls393. The 74ls393 is a binary counter which in this case is being used as a frequency divider to provide the pulses for the select lines. In this configuration S1 gets pulsed at exactly half the frequency of S0. As a result the two waveforms continuously cycle through all four possible select states of the Saturn controller.

This is the waveform produced by the circuit above:

The two waveforms represent S0 and S1 respectively. As you can see they alternate through 4 possible states:

After measuring the output from a real Sega Saturn I found that the select lines are pulsed in a different order than on my supergun:

As you can see the real Saturn and my supergun are cycling through the select lines in opposite directions from each other. I suspect that the reason this is a problem for the Cthulhu and not for real Saturn pads is because the Saturn pads have actual hardware multiplexers that are directly controlled by the select lines so order doesn’t matter. The MC Cthulhu however is a microcontroller that is simply emulating the output of the multiplexers in a Saturn pad, and since the Cthulhu was built with the knowledge that the Saturn pulses the select lines in a specific order, I suspect that it reports the data lines in the same order no matter what. So in my case State 2 and 4 are flipped and therefore XYZR and UP DN LT and RT are flipped on the output.

Now that I know what the problem is finding a solution will be much easier. All I need is to reverse the order in which the select lines are pulsed, which hopefully means tracking down a different binary counter. I will update this post when I have new information. As before, if anyone has any suggestions about how to improve this design I’d love the hear them.

Love this project by the way, I seen people long ago back when the Xbox 360 was new someone made A Saturn to Xbox 360 Adapter doing something similar to what you are doing now to flip some analog switches that are wired to the Xbox 360 controller pad. Unfortunately I don’t remember where or I would provide a link.

I can’t offer any real advice for the Sega Saturn adapter, just the knowledge that similar projects were at least attempted and moral support.

My one question is, when it’s all said and done is your Super Gun is going to fully incorporate working Sega Saturn Controller ports or are you having something like a 15 pin D Sub Connector like you see on some Super Guns and Neo Geo consoles and have a Saturn to “Jamma” adapter?

I got some help from the fine folks over at the EEV blog forums and it seems that a the most efficient solution to this problem is to replace the 74ls393 with a 74ls193 wired as a down counter. That should give me the same select pulse pattern but in the opposite direction which is exactly what I need. In the mean time it was also suggested that I try inverting the select line output using a NAND logic gate. I happened to have a 74LS00 that I could use for this and I’m happy to report that** IT WORKS! **I’ve ordered the 74ls193 also and will test that when it gets here. I’d like to get that solution working to keep the part count down. Once I’ve fully debugged my modifications to this circuit I’ll post up a schematic that anyone will be free to use. I’m probably also going to design a PCB for this too for those who might be interested.

Video demonstration of the current working design:
https://youtu.be/lmaURn5kPK4

Thanks, the moral support is appreciated. To your question yes, for my use I will just have Saturn controller ports on my JAMMA adapter. However If I design PCBs and there is any interest in a dsub version it wouldn’t be too much work to make that happen.

I’ve completely reworked the OP of this thread to reflect the current status of my work and to expand the scope of the project. Today I have a new so far fully functional design and schematic for the controller adapter circuit. I’ve made several critical changes to the original design to make it work properly with both genuine Saturn pads and Mc Cthulhu PCBs in Saturn mode. Any technically inclined folks out there can feel free to build it yourself if you like. The schematic is in the OP.

I’ve greatly expanded the scope of this project and I’m very excited to see it through. I will be updating this thread as I continue to work through the design process.

This project so far.