|C64 Lightguns/Magnum light phaser
( and compatible models )
The "Magnum light phaser" lightgun has also been marketed for several other types of machines (Sinclair spectrum, Sega, Amiga etc.). The design of this gun looks very familiar to anyone who knows the anime series named: Zillion This lightgun was also branded under the name "Trojan phazer" which is the white lightgun in the picture above.
The "Cheetah defender" lightgun has is fully compatible with the "Magnum light phaser" and has also been marketed for several types of machines (for instance the Sinclair spectrum).
MARPES light gun
The "MARPES light gun" appears to be a clone of the "Cheetah defender" and just like the defender it is fully compatible with the "Magnum light phaser".
This was also marketed for the NES, which can be seen when looking at the images on the box (showing screenshots of the game NES game "Wild gunman").
When the lightgun was opened you'll instantly notice how well this was designed. Shielding against interference, microswitch trigger, lens glue in place, so it doesn't fall when you open the gun.
The handle itself can hold a 9V battery. Now for the C64 you don't need this, so this is just an empy place without battery contacts. But this is very well designed and you
cannot directly see from the outside that there is a battery door. You need to slide off the dark grey coverplate of the handle to get to this place. Which you also need to
do to get to one of the screws if you want to open the lightgun for repair or inspection.
The design even has a 4011 used as an amplifier, which is unconventional but makes sense. Strangely the PCB has the marking ATARI on it, suggesting that the PCB was designed by Atari,
but I doubt that they had anything to do with this gun. Unfortunately regarding the electronics it was assembled very cheaply. The metal shielding wasn't properly soldered and fell off when I touched it.
The wires to the trigger button where too thin and broke after a few times bending. Now normally you won't open the gun, so there is no real problem and it worked perfectly before I opened it.
I only opened it because I was curious. I repaired the gun by replacing the trigger button wires and resoldering the metal shielding. And now the gun is in perfect order. In fact it is the most sensitive gun I own.
|Trigger switch is connected between pin
5 (Pot AY) and pin 7 (+5V)|
Light sensor (active low) is connected to pin 6
Light sensor circuit power is connected to pin 7 (+5V) and pin 8 (GND)
X and Y coordinates of the lightpen use the same coordinates as
sprites; thus the very first pixel at the left edge of
the text screen would have an X coordinate of 24 on a PAL machine (read
as half the value, i.e. 12, from the VIC address). See the programmers
reference guide for more detailed information. Make sure you sampe the
position values more then once. This because the X-position measurement
contains some jitter. This isn't emulated by VICE because it
by the gun and the person holding it. Also make sure that you
calibrating the gun, that is to remove the offset from the position
values. Request the user to point to the center of
the screen (place a target there) and read the lightgun
values, then you can determine the error/offset. Subtract this
positions during the game and you're done.|
C64 register $D013 (X coordinate): Holds the X coordinate divided by two. In order to obtain the actual X coordinate (a 9-bit figure), you have to multiply by 2, or do an ASL on the byte obtained from this register, to get the actual X coordinate.
C64 register $D014 (Y coordinate): Holds the Y coordinate.
C64 register $D019 (VIC interrupt reg): Bit 3: LPIRQ, 1 = lightpen has captured a new value and indicates that D013 and D014 are updated (you do not need to use this register, you may read the D013 and D014 at any time and as much as you like)
C64 register $D01A (VIC interrupt enable reg): Bit 3: MLPI, 1 = enables lightpen interrupts (interrupt enable register is used for en/disabling lightpen interrupt in $D019)
Reading the trigger is possible with the following code:
;This routine will check the trigger, it will exit with the carry set when the trigger is pulled (and released)
|Knowing how difficult it can be to find information about Commodore related lightguns (and the games), I've made all information that I have available for download: <click here to go to the download location>|