Accueil | Page d'électronique

IBM Game Control Adapter
from the Personal Computer Hardware Reference Library

Contents

  • Description
  • Programming considerations
  • Address Decode
  • Data Bus Buffer/Driver
  • Trigger Buttons
  • Joystick Positions
  • I/O Channel Description
  • Interface
  • Specifications
  • Logic Diagram


    Description

    The IBM Game Control Adapter allows up to four paddles or two joysticks to be attached to the system. This adapter fits into one of the system board's or expansion slots. The game control interface cables attaches to the rear of the adapter. In addition, four inputs for switches are provided. Paddle and joystick positions are determined by changing resistive values sent to the adapter. The adapter, when used with system software, converts the present resistive value to a relative paddle or joystick position. On receipt of an output signal, four timing circuits are started. By determining the time required for the circuit to timeout (a function of the resistance), the paddle position can be determined. This adapter could be used as a general purpose I/O card with four analog (resistive) inputs plus four digital input points.

    Programming Considerations

    Address Decode

    The select on the Game Control Adapter is generated by two 74LS138s as an address decoder. AEN must be inactive while the address is hex 201 in order to generate the select. The select allows a write to fire the one-shot, or a read to give the values of the trigger buttons and one-shot outputs.

    Data Bus Buffer/Driver

    The data bus is buffered by a 74LS244 buffer/driver. For an In from address hex 201, the Game Control Adapter will drive the data bus; at all other times, the buffer is left in the high impedance state.

    Trigger Buttons

    The trigger button inputs are read by an In from address hex 201. A trigger button is on each joystick or paddle. These values are seen on data bits 7 through 4. These buttons default to an open state and are read as 1. When a button is pressed, it is read as 0. Software should be aware that these buttons are not debounced in hardware.

    Joystick Positions

    The joystick position is indicated by a potentiometer for each coordinate. Each potentiometer has a range of 0 to 100 kilohms that varies the time constant for each of the four one-shots. As this time constant is set at different values, the output of the one-shot will be of varying durations.

    All four one-shots are fired at once by an Out to address hex 201. All four one-shot output will go true after the fire pulse and will remain high for varying times depending on where each potentiometer is set.

    These four one-shot outputs are read bay an In from address hex 201 and are seen on data bits 3 through 0.

    I/O Channel Description

    A9-A0:Address lines 9 though 0 are used to address the Game Control Adapter.
    D7-D0:Data lines 7 though 0 are the data bus.
    IOR, IOW:I/O Read and I/O Write are used when reading from or writing to an adapter (In, Out).
    AENWhen active, the adapter must be inactive and the data bus driver inactive.
    +5VdcPower for the Game Control Adapter.
    GNDCommon ground.

    The following I/O channel lines are not used:

    MEMR, MEMWALE, T/C
    DACK0-DACK3CLK, OSC
    IRQ7-IRQ2-5Vdc
    DRQ3-DRQ1+12Vdc
    I/O CH RDY-12Vdc
    I/O CH CKRESET DRV
    A19-A10

    Interface

    The Game Control Adapter has eight input lines; four digital inputs and four resistive inputs. The inputs are read with one In from address hex 201.

    The four digital inputs each have a 1-kilohm pullup resistor to +5 Vdc. With no drives on these inputs, a 1 is read. For a 0 reading, the inputs must be pulled to ground.

    The four resistive pullups, measured to +5 Vdc, will be converted to a digital pulse with a duration proportional to the resistive load, according to the following equation:

    Time = 24.2 ms + 0.011 (r) ms

    The user must first begin the convertion by an Out to address hex 201. An In from address hex 201 will force the digital pulse to go high and remain high for the duration according to the resistance value. All four bits (bit 3-bit 0) function in the same manner; their digital pulse will all go high simultaneously and will reset inependently according to the input resistance value.

    Bit 7
    Bit 6
    Bit 5
    Bit 4
    Bit 3
    Bit 2
    Bit 1
    Bit 0
    Digital inputs
    Resistive inputs

    The typical input to the Game Control Adapter is a set of joysticks or game paddles.

    The joysticks will typically be a set of two (A and B). These will have one or two buttons each with two variable resistances each, with a range of 0 to 100 kilohms. One variable resistance will indicate the X coordinate and the other variable resistance will indicate the Y coordinate.

    The joystick should be attached to give the following input data:

    Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
    B-#2
    Button
    B-#1
    Button
    A-#2
    Button
    A-#1
    Button
    B-Y
    Coordinate
    B-X
    Coordinate
    A-Y
    Coordinate
    A-X
    Coordinate

    The game paddles will consist of two (A and B) or four (A, B, C, and D) paddles. These will have one button each and one variable resistance each, with a range of 0 to 100 kilohms. The game paddle should be attached to give the following input data:

    Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
    D
    Button
    C
    Button
    B
    Button
    A
    Button
    D
    Coordinate
    C
    Coordinate
    B
    Coordinate
    A
    Coordinate

    The following "Joystick Shematic Diagram" may be used for attaching game controllers.

    Specifications

    Logic Diagram

    The following page contains the logic diagram for the IBM Printer Adapter.


    (Click on image to enlarge)


    Accueil | Page d'électronique

    Cette page a été retranscrite par Nicolas Marchildon