View Single Post
Old 18 October 2006, 05:18   #19
damon_sisk
Zone Friend
 
Join Date: Dec 2005
Location: Charlestown/USA
Age: 42
Posts: 43
This adapter is for use with Actionware games and two Actionware compatible light guns. The games I know that accept dual gun inputs are Capone and POW.
Both are a LOT more fun with two guns >8^)

The Actionware dual gun adapter consists of five parts.
1&2) Two DB9 input connectors (I will call these Gun1_DB9 and Gun2_DB9) for plugging in the light guns.
3) A small cord with an output DB9 connector (same as the plug on the end of the cord of the gun) for plugging into the Amiga (I will call this Joy2_DB9).
4) One 74LS157 logic chip. On this particular adapter it is a Motorola chip and the full part number is SN74LS157ND, but I guess any 74LS157 would work.
5) A circuit board that connects everything.

The 74LS157 is just a "Quad 2-Line to 1-Line Data Selector/Multiplexer" (description taken right from the datasheet).
That just means that the chip can select between 2 sets of 4 bit data (on 8 input pins) that it outputs on 4 pins.
Graphically;

Case 1 - select (logic chip pin 1) low

A1
\
Y1

B1

A2
\
Y2

B2

A3
\
Y3

B3

A4
\
Y4

B4



Case 2 - select (logic chip pin 1) high

A1

Y1
/
B1

A2

Y2
/
B2

A3

Y3
/
B3

A4

Y4
/
B4


A truth table is a bit more concise (and I can easily include the strobe):

-------------------------------------------
|Strobe|Select|Input Ax|Input Bx|Output Yx|
-------------------------------------------
| H | X | X | X | L |
| L | L | L | X | L |
| L | L | H | X | H |
| L | H | X | L | L |
| L | H | X | H | H |
-------------------------------------------

An Actionware light gun only uses two inputs to the Amiga, so switching between the light guns only requires 2 of the 4 available selectors.
The question is this: how does the Amiga know which gun is selected and when?
There is a small trick to this. It is a little known fact (at least it was to me) that some of the joystick port pins can be set for input (normal) or output mode.
Therefore, the Actionware software sets a pin on joystick port 2 as output (in fact, it is pin 9) and actively selects which gun it wants to 'connect' to the joystick port.
I don't know how many times per second the software switches between the two guns, but if you pull the triggers on the guns at the same time, you cannot detect a difference in response time between the two.
Anyway, if you make the following connections to the chip, you should have a working Actionware two gun adapter!





logic chip pin description Signal
1 Joy2_DB9 - pin 9 Select Gun
2 Gun2_DB9 - pin 5 Fire button or sensor trigger for gun 2
3 Gun1_DB9 - pin 5 Fire button or sensor trigger for gun 1
4 Joy2_DB9 - pin 5 Fire button or sensor trigger
5 Gun2_DB9 - pin 6 Fire button or sensor trigger for gun 2
6 Gun1_DB9 - pin 6 Fire button or sensor trigger for gun 1
7 Joy2_DB9 - pin 6 Fire button or sensor trigger
8 Joy2_DB9 - pin 8 Ground (Gnd)
8 Gun2_DB9 - pin 8 Ground (Gnd)
8 Gun1_DB9 - pin 8 Ground (Gnd)
9 n/c
10 n/c
11 n/c
12 n/c
13 n/c
14 n/c
15 Joy2_DB9 - pin 8 Ground (Gnd)
16 Joy2_DB9 - pin 7 +5 Volts (+V)
16 Gun2_DB9 - pin 7 +5 Volts (+V)
16 Gun1_DB9 - pin 7 +5 Volts (+V)

I will scan the circuit board and build one of these soon to test and make sure I am don't have any mistakes in these connections. I will also draw a schematic and post these things on Aminet along with this text soon...
Damon
damon_sisk is offline  
 
Page generated in 0.05409 seconds with 9 queries