Constructing a prototype of the updated Justifier adaptor for the Mega Drive

Wednesday, 6th July 2022

The latching behaviour of the light sensor output TH on the Justifier had caused one complication in the design of the adaptor, described in this earlier post in detail, and that is that there needed to be some way for the console to output the state of the TL back to the gun to reset TH each frame when TL goes high. The American Laser Games don't reset the gun in this fashion, but they don't need to as they use DATA2 for the light sensor output from the gun instead of the latching TH. The circuit had been adapted to tap into this unlatched signal on DATA2 when a Justifier as attached, but there was also some additional complications in the circuitry to ensure that when the adaptor was in "GameGun" mode it would still hold TL low to ensure that any connected Justifier was enabled as it couldn't rely on the game doing so.

Unfortunately, with all these complications I found that Lethal Enforcers no longer worked reliably, for example pulling the trigger would advance two items in the menu instead of one. I think all of the additional routes for the signal to work its way through the circuit – as well as the crude diode logic used to avoid having to add even more logic chips – was causing timing issues. Now that I know it's possible to tap directly into DATA2 to get the unlatched light gun signal from the Justifier it removes the need to reset the gun every frame, which allows for somewhat simpler diagram:

Adaptor from a Light Phaser or Justifier to Justifier or GameGun
Light Phaser/Justifier to Justifier/GameGun adaptor

Compared to the previous circuit you'll notice the TL signal coming back from the console to the gun inputs has been removed along with the supporting diode logic near the mode switch. Diodes are used between DATA3 and TL on the gun inputs to ensure that if DATA3 is low (which is used to identify a Justifier) it'll also pull down TL to keep the adaptor enabled. (TL is used for the trigger input when a Light Phaser is connected so can't be held low permanently). The 470Ω resistor is used to limit the current in case a different type of controller that is driving TL high and DATA3 is connected – protection against that sort of thing is also why TR has a 1KΩ resistor on it and the TH output sports a 470Ω resistor.

After making these changes, I redrew the circuit in KiCad in preparation of a new PCB design. The above diagram is clearer on how the logic elements are laid out, but at least with the KiCad diagram I can check the correctness of the PCB before spending any money on manufacturing. This of course assumes that the translation from breadboard→logic diagram→wiring diagram is correct too! To assist in this, I printed off the KiCad diagrams and then rebuilt the circuit on some prototyping board, connecting pin to pin using the numbers assigned in the wiring diagram:

The circuit constructed on a prototype board

It's not pretty, but it works! Unfortunately the particular prototyping board I used was of very low quality, with the solder preferring to make bridges than solder to the pads (which themselves don't take much heat to loosen and fall off the board – don't even think about reworking any mistakes!) and the insulation on the wire I'm using seems to have a pretty low melting point, making it shrink back from solder joints and form short circuits very easily. In other words, the less said about the bottom of the board, the better:

The underside of the circuit constructed on a prototype board showing the wiring detail

However, the important thing is that it works, and now that I've been able to test it out in all of the released Mega-CD games I feel much more confident about redesigning the PCB.

Adding a GameGun mode switch to the Mega Drive Justifier adaptor

Thursday, 30th June 2022

The light gun adaptor for the Mega Drive and Mega-CD that I'm working on now has a mode switch that allows you to choose between "Justifier" and "GameGun" modes. The circuit is starting to look a little messy:

Adaptor from a Light Phaser or Justifier to Justifier or GameGun
Light Phaser/Justifier to Justifier/GameGun

I have not fully tested the diagram or circuit in practice, but my initial tests are encouraging. The main change is an extra multiplexer that changes the source of four output pins on the adaptor:

Output Justifier GameGun
TH Latched light gun 1 or 2 sensor Raw light gun 1 sensor
DATA0 Light gun 1 or 2 trigger Light gun 1 trigger
DATA2 Raw light gun 1 or 2 sensor Logic high
DATA3 Logic low Light gun 1 start

The DATA1 pin continues to be connected to the Justifier start button output in this arrangement which is not correct but there aren't enough multiplexers available to also switch that, and in my testing it doesn't seem to affect the detection or handling of the adaptor as a GameGun.

At this point I think I need to build the circuit again on some prototyping board using the diagram as a reference (and not the breadboard prototype) to ensure that the diagram is correct. If that still works I can redesign the PCB and get some new boards manufactured to fully test the circuit's performance in all the Mega Drive and Mega-CD games once more.

The circuit constructed on a breadboard

Hopefully these PCBs will work a little better than the first batch now that I've made all of these improvements to the circuit!

The mysteries of the American Laser Games GameGun

Tuesday, 28th June 2022

When experimenting with the American Laser Games titles to try to get my Light Phaser-to-Justifier adaptor working properly I was surprised to see the circuit was initially detected as a GameGun. This was not a light gun I was familiar with so went to read about it on Sega Retro which turned up a photo of the gun:

The American Laser Games GameGun
The American Laser Games GameGun – photo from Sega Retro by user Black Squirrel

This gun is from American Laser Games themselves and is labelled "Sega CD Compatible" as it was apparently based on their similar gun for the 3DO. Sega Retro does also mention the following:

The GameGun [...] is also compatible with games designed for both the Sega Menacer and Konami Justifier. The GameGun is the only widely produced light gun to substitute the Menacer, and is therefore the only smaller alternative to an accessory often criticised for its cumbersome size.

This does sound like an intriguing device! It must pack some fairly sophisticated technology to be compatible with all three light gun protocols, considering how different they all are from each other. I'm not entirely sure how that would practically work, either, as there doesn't seem to be a mode switch or the additional buttons found on the Menacer. Maybe they're on the other side of the gun in the photo…

Fortunately, nesdev.org forum user nintendo2600 owns an ALG GameGun and posted some photos of the internals, which forum user TmEE used to derive a circuit diagram:

The American Laser Games GameGun
The American Laser Games GameGun circuit diagram reverse engineered by TmEE on nesdev.org

This circuit is very simple, only passing on the amplified light sensor signal to the TH output, the state of the trigger button to DATA0 (pin 1) and the state of the start button to DATA3 (pin 4). The GameGun appears to lack any sort of circuitry to generate a controller device ID, which on the Mega Drive is handled by setting the DATA0 to DATA3 pins to various "invalid" combinations depending on the state of TH as an input (the DATA pins are mapped to the d-pad in a standard controller, and an "invalid" combination would be for example reporting that up and down were held simultaneously – this is covered in somewhat more detail in this earlier journal post.

The Menacer and Justifier both contain the appropriate logic to generate a valid controller device ID, and so games supporting those guns check to see whether such a gun returns a valid device ID before allowing you to use the respective gun. Without that logic in place, the GameGun will not be detected as a Justifier or Menacer and so is unsupported in these games. I'm not sure where the source of the information that the GameGun is compatible with games that require a Menacer or Justifier originates, but the circuit doesn't back that up and it would also explain why people who own this gun have not been able to get it working in games that do not explicitly support the GameGun.

The inability to detect a GameGun is also why the American Laser Games default to assuming you have one plugged in, even if you don't have anything plugged into the controller port at all! Its simple design also makes a passive adaptor from the Master System Light Phaser to the GameGun possible:

Adaptor from a Light Phaser to GameGun
Light Phaser to GameGun adaptor

A passive Justifier-to-GameGun adaptor should also be possible, as well as a universal adaptor that could handle both guns. Interestingly the two games I was having compatibility difficulties with before – Mad Dog II and Crime Patrol – work with such a simple adaptor and a Light Phaser, even though the repeated triggering from the Light Phaser causes problems when it's converted to a Justifier using the circuit described in my previous post. Maybe a better solution to the compatibility issues would be to provide a Justifier/GameGun switch on the adaptor…

Even if I can get the Justifier adaptor working completely in Justifier mode in Mad Dog II and Crime Patrol a GameGun mode may still be handy as Corpse Killer on the Mega-CD supports the GameGun but not support the Justifier.

The above video shows the simple passive adaptor working in Mad Dog II: The Lost Gold. A big thank you to TmEE for reverse engineering the GameGun and to nintendo2600 for posting the photos of the insides of their controller!

Subscribe to an RSS feed that only contains items with the ALG GameGun tag.

FirstLast RSSSearchBrowse by dateIndexTags