Patent Publication Number: US-5632680-A

Title: Method and apparatus for controlling a computer game

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     This invention relates generally to computer game controllers and particularly to controllers for generating control data indicating the status of an input device. 
     2. Description of the Related Art 
     Conventionally, a computer game is responsive to a command received from a control device such as a joystick, a throttle, push buttons or other control mechanism operated by a user. An interface circuit is coupled to the control device to covert the command to control data for use by the computer game software. The interface circuit generally resides on an electronic circuit card such as a computer motherboard, a game controller card, a multimedia sound card or a PCMCIA (Personal Computer Memory Card International Association) card. These electronic circuit cards conventionally have an input port (a game port) for receiving control signals from the externally located control device. Industry standards have developed specifying the input port configuration. One industry standard port in particular, the IBM standard game port established by International Business Machines, Inc. of Armonk, New York (IBM) is widely used by many computer games and external control devices and therefore it is desirable to maintain compatibility with the IBM standard game port. The IBM standard game port has several digital inputs and several resistance-sensing inputs. 
     FIG. 1 is a schematic diagram of one conventional game control system 100 compatible with the resistance sensing-input of a conventional game port. Conventional control system 100 has an external input device 101 and a game card 108 residing internal to a computer. Conventional input device 101 has a control mechanism 107 such as a joystick, a switch, a push-button, a throttle or other input device. Input device 101 additionally has a variable resistance device 106 for producing a variable resistance corresponding to the position or status of control mechanism 107. 
     When conventional input device 101 is coupled to the resistance-sensing input of a conventional game card 108, a game program retrieves the status of control mechanism 107 by writing a command to interface circuit 102 and by then monitoring a status signal 109 for a state change. The time duration required for the state change corresponds to the status of control mechanism 107. Upon receiving a write command, interface circuit 102 uses a status circuit 105 to set status signal 109 to a first state and to allow capacitor 104 to charge. When capacitor 104 is charged to a predetermined threshold, status circuit 105 resets status signal 109 to a second state (the initial status) and discharges capacitor 104. Thus, a game program derives control information by monitoring the charging time of capacitor 104 using status circuit 105. FIG. 2 illustrates a conventional capacitor charging waveform 200 corresponding to the voltage across capacitor 104. A faster charging time indicates a smaller resistance value associated with variable resistance device 106 and in turn corresponds to the position or status of control mechanism 107. 
     Because the charging of capacitor 104 can take up to 2 milliseconds, determining the status of control mechanism 107 takes a long time as compared to the instruction cycle of the computer. There is an additional drawback in that the computer must monitor status signal 109 with a sufficiently high frequency in order to achieve a reasonable accuracy in measurement of the period of time taken to charge capacitor 104. The monitoring requirement makes it difficult for the computer to be sufficiently responsive to other devices or other tasks while running a game program. 
     The conventional resistance sensing-circuit has a further drawback of limited accuracy. In accordance with some conventional standards, the resistance-sensing input may have up to a 10% error due to the error tolerances of the resistor (5% error tolerance) and capacitor (5% error tolerance) circuit components. Additional accuracy problems are presented by computers having different operating speeds and thus require software to have calibrating routines to compensate for these operating speed differences. Additionally, conventional game control circuits have no latching or interrupt circuit to hold the signal status or to inform the computer that there exists a change in the signal status, hence the controller accuracy depends on how frequently the signal line is read. 
     Thus, there is a need for a computer game control device and method having improved speed and accuracy but that is also back-compatible the resistance-sensing inputs of conventional game cards. 
     SUMMARY OF THE INVENTION 
     In accordance with the present invention, there is provided computer game control system and method having improved speed and accuracy but which is also back-compatible with the resistance-sensing inputs of conventional game cards. The game control system comprises a pulse position modulation input device (a PPM input device) and a bimodal game card having a bimodal interface. The PPM input device generates a pulse position signal which is compatible with both the bimodal interface of the present invention and the resistance-sensing input of a conventional game card. Additionally, the bimodal interface is compatible with both the PPM input device and a conventional game input device. 
     The PPM input device has a pulse position signal generation circuit for encoding control information in a pulse position signal. In one embodiment, the pulse position generation circuit has a resistor network and an astable multivibrator for generating the pulse position signal. In this embodiment, the resistor network is electro-mechanically coupled to a user-actuated control mechanism to convert an input command to a corresponding resistance value. The resistance value is detected by the astable multivibrator to produce a pulsed output having pulse intervals corresponding to the resistance values. The pulse position signal is decoded by measuring the time interval between pulse positions. Alternatively, the pulse position signal of the present invention is decoded using a conventional interface circuit wherein the pulse position signal is used to charge a capacitor. 
     In accordance with the present invention, the bimodal interface comprises a first and a second interface circuit. In one embodiment, the first interface circuit comprises an advanced detector having a pulse detector, a counter coupled to the pulse detector and a storage device for storing updated control information recovered from the pulse position signal. The storage device is coupled to a program interface to provide the program with access to the most recent control data. The second interface circuit has a resistance-sensing circuit for generating a status signal coupled to the program interface. In one embodiment, the resistance-sensing circuit comprises a resistor serially coupled to a capacitor and a status control circuit coupled to the capacitor. 
     When a PPM input device in accordance with the present invention is coupled to the bimodal interface, the first interface circuit (the advanced detector) is used to decode the received PPM control signal. Using the advanced detector, the received PPM control signal is decoded by measuring the time interval between pulse positions and by storing the measured time interval. 
     When an input device conforming to the requirements of a resistance-sensing input of a conventional game card is coupled to the bimodal interface, the second interface circuit (the resistance-sensing circuit) is used to generate a status signal. Using the resistance-sensing circuit, the status signal is generated by charging the capacitor to a selected threshold and by setting the status signal to a first state for the charging duration and resetting the status signal to a second state once the capacitor has reached the selected threshold. 
     Because the advanced detector stores the most recent status data, because the capacitor charging duration is relatively long as compared to the program access time of the storage device and because the pulse position circuit is less prone to error due to component tolerances, the game control system and method of the present invention has improved speed and accuracy when using the first interface circuit (the advanced detector). Additionally, because the game control system has a second interface circuit (the resistance-sensing circuit) and because the pulse position signal is compatible with the resistance-sensing input of a conventional game card, the game control system and method of the present invention is also back-compatible with conventional game cards. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a schematic diagram of a conventional game control system; 
     FIG. 2 is a graph of a charging waveform of a capacitor in a conventional game controller; 
     FIG. 3 is a block diagram of a PPM game control system in accordance with the present invention; 
     FIG. 4 is a graph illustrating a PPM control signal in accordance with the present invention; 
     FIG. 5 is a schematic diagram of PPM generator in accordance with the present invention; 
     FIG. 6 is a schematic diagram of an advanced detector in accordance with the present invention; 
     FIG. 7 is a flow diagram of the steps performed by an advanced detector in accordance with the present invention; 
     FIG. 8 is a schematic diagram of an pulse detection circuit in accordance with the present invention; 
     FIGS. 9a)-9g) are graphs illustrating the waveforms generated by the pulse detection circuit of the present invention; 
     FIG. 10 is a flow diagram of a method of receiving status information using a resistance detection circuit in accordance with the present invention; 
     FIG. 11 is a graph illustrating a stepped charging waveform in accordance with the present invention; and 
     FIG. 12 is a graph illustrating an overlay of a stepped charging waveform and a PPM signal in accordance with the present invention. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     There is illustrated in FIG. 3, a block diagram of a pulse position modulation (PPM) game control system 300 in accordance with the present invention. PPM game control system 300 includes a PPM input device 303 coupled to a bimodal game card 309. FPM input device 303 has a control mechanism 312 coupled to a variable resistance device 311, which in turn is coupled to a PPM generator 301. Bimodal game card 309 has an input port 313 and a bimodal interface 302 coupled to a program interface 314. 
     Control mechanism 312 is a control device such as a joystick, a game paddle, a switch or switch set, a push-button or push-button set, a throttle or other user-actuated control device having a variable number of states or positions for indicating a user command. Variable resistance device 311 is an electro-mechanical link between control mechanism 312 and PPM generator 301. Variable resistance device 311 has a resistance corresponding to the current state of control mechanism 312 and thus corresponding to the current user command. 
     PPM generator 301 is a pulse train generator for generating a PPM signal 400 (as illustrated in FIG. 4) having a variable pulse train frequency (or pulse time interval). The pulse train frequency corresponds to the user command received from control mechanism 312. In one embodiment, for example, the PPM signal 400 is used to encode the state of a five position switch. In this embodiment, a pulse train frequency of 100 KHz (corresponding to a pulse interval of 10 usec) corresponds to the first switch position, a pulse train frequency of 50 KHz (corresponding to a pulse interval of 20 usec) corresponds to the second switch position, a pulse train frequency of 33.3 KHz (corresponding to a pulse interval of 30 usec) corresponds to the third switch position, a pulse train frequency of 25 KHz (corresponding to a pulse interval of 40 usec) corresponds to the fourth switch position and a pulse train frequency of 10 KHz (corresponding to a pulse interval of 100 usec) corresponds to the fifth switch position. Thus, control information is encoded by the pulse frequency (or pulse interval) of the PPM signal 400. 
     There is illustrated in FIG. 5 a schematic diagram of a PPM generator 301 in accordance with the present invention. PPM generator 301 includes monostable multivibrator 501 cross-coupled to a second monostable multivibrator 502 to form ring in which multivibrators 501, 502 trigger each other thus forming an astable multivibrator 503. PPM generator 301 also includes variable resistance input node 504 and PPM signal output node 505. In a preferred embodiment, monostable multivibrators 501, 502 are a 74LS123 semiconductor device. Pulse width accuracy of the generated PPM signal is fine tuned using trimming resistor 509. The pulse position is determined by capacitor 510 and the resistance between input node 504 and the voltage supply Vcc. In the preferred embodiment, component tolerances of 1% for resistors and 2% for capacitors are selected to achieve less than a 5% error in the generated PPM signal. 
     There is also illustrated in FIG. 5 a schematic diagram of variable resistance network 311. Variable resistance device 311 is an electro-mechanical resistor network having resistor-switch pairs 712-715 and resistor 716. Variable resistance device 311 has a variable resistance corresponding to the current position of control mechanism 312 (the user-actuated control device). 
     Referring again to FIG. 3, bimodal game card 309 has a bimodal interface 302 and a program interface 314. Bimodal interface 302 has an input node 312 and first and second interface circuits. The first interface circuit is advanced detector 306 and the second interface circuit is resistance detection circuit 310. Bimodal interface 302 of the present invention decodes PPM control signals 400 and is also compatible with capacitor charging waveform 201. 
     There is illustrated in FIG. 6, a schematic diagram of a preferred embodiment of advanced detector 306. Advanced detector 306 is a pulse position detector and has an input for receiving PPM signal 400, an address bus input 607, a control input 606 and a data bus output 605. Advanced detector 306 additionally has a pulse detection circuit 601 activated by PPM signal 400, a counter 602, a storage device 603 and I/O decoder 604. Counter 602 is coupled to and reset by a first output of pulse detection circuit 601. The output of counter 602 is coupled to storage device 603. Storage device 603 is storage device such as a 74LS374 latched buffer. Storage device 603 latches the current count (status value) of counter 602 and stores the status value for reading by a game program using program interface 314. In a preferred embodiment, storage device 603 is a tri-state latch having an output enabled responsive to an output enable signal received from I/O decoder 604. 
     FIG. 7 is a flowchart of the steps performed by advanced detector 306. Advanced detector 306 receives 701 PPM control signal 400 from coupled PPM input device 303. PPM control signal 400 is monitored 702 using pulse detection circuit 601 for pulse detection. Counter 602 counts until a pulse is detected 703 by pulse detection circuit 601. Upon detection of a pulse, the current counter value is latched 704 in a storage device 603 and counter 602 is reset 705. The status information is latched and coupled to program interface 314 and thus is available to be read by a software program such as a computer game. 
     Because advanced detector 306 has a storage device 603 that is continually updated to contain the most recent decoded PPM signal pulse positions, there is no need for a write command to initiate a data collection cycle. Instead, the status information is encoded in the time duration between pulses and is continuously available to be read by a game program. Because the pulse intervals are relatively small, the advanced detector provides updated control data to the game program at a faster rate and with a higher degree of accuracy. Additionally, because the PPM signal is a digital pulse, the accuracy of advanced circuit 306 is not affected by resistor 304 and capacitor 305. 
     There is illustrated in FIG. 8 a schematic diagram of pulse detection circuit 601. Pulse detection circuit 601 is a timing flip-flop circuit and includes buffering NAND gates 801, 802, clock NAND gate 803, buffer NAND gate 804, and flip-flops 805-808. Buffering NAND gates 801 and 802 are cascaded to couple a received PPM signal to cascaded flip-flops 805-808. NAND gates 801 and 802 are each inverting and thus result in a non-inverted signal when cascaded. Flip-flops 805-808 have clock inputs coupled to the output of clock NAND gate 803 which buffers the received clock signal. Cascaded flip-flops 805-808 generate a latch signal 809 and a counter reset signal responsive to receiving a pulsed input. Latch signal 809 is coupled to the clock input of storage device 603. FIG. 9 illustrates the waveforms generated by flip-flops 805-808. 
     Referring again to FIG. 3, resistance detection circuit 310 includes resistor 304, capacitor 305 and status control circuit 307. Resistor 304 has a first terminal coupled to input node 313 and is serially coupled to capacitor 305 to form a resistor-capacitor node 308 at the second resistor terminal. Status control circuit 307 has an output status signal 315 for indicating the charging status of capacitor 305. Status control circuit 307 is coupled to resistor-capacitor node 308 and to program interface 314 by status signal 315. In a preferred embodiment, status control circuit 307 is a triggerable monostable multivibrator. 
     FIG. 10 is a flow diagram of a method of receiving status information using resistance detection circuit 310. A game program retrieves the input device status by writing 1001 a command to status control circuit 307 via program interface 314. Upon receiving the write command, status control circuit 307 sets status signal 315 to a first state and allows capacitor 305 to charge. Once capacitor 305 has charged to a predetermined threshold, status control circuit 305 resets status signal 315 to a second state. The game program monitors 1002 status signal 315 and compares 1003 the current state of status signal 315 to the second state. During the monitoring process, a counter value is incremented 1004 to measure the elapsed capacitor charging time. Once status signal 315 transitions to the second state the game program determines the elapsed capacitor charging time and deduces 1005 a control command corresponding to the charging time. 
     In operation, PPM input device 303 and bimodal game card 309 are compatible with each other and are each additionally back-compatible with input devices 101 and game cards 108 having interfaces conforming to the resistance-sensing input of the IBM standard game port. Thus, the PPM game control system has three modes of operation: (i) PPM input device 303 coupled to bimodal game card 309; (ii) PPM input device 303 coupled to a conventional game card device; and (iii) a conventional input device coupled to bimodal game card 309. 
     Mode 1. PPM Input Device Coupled to a Bimodal Game Card 
     When PPM input device 303 is coupled to bimodal game card 309, the first interface circuit (advanced detector 306) is used to derive and store status information to be read by the game program. In this configuration, status signal 315 generated by the second interface circuit (resistance detection circuit 310) will not be used by a game program having the capability to recognize and access the bimodal game card. 
     Mode 2. PPM Input Device Coupled to a Conventional Game Card 
     When PPM input device 303 is coupled to conventional game card 108 having a conventional interface circuit 102, capacitor 104 charges at a rate determined by the frequency and pulse duration of the pulse train comprising PPM signal 400. The charging rate is fine tuned using trimming resistor 509 to fine tune the pulse width of the pulses. PPM signal 400, when coupled to capacitor 104, charges capacitor 104 by applying voltage impulses and thus generates a stepped charging waveform 1100 as illustrated in FIG. 11. FIG. 12 shows an overlay 1200 of stepped charging waveform 1100 and PPM signal 400. 
     Status control circuit 105 of the conventional game card is coupled to capacitor 104 and generates a status signal indicating the charging state of capacitor 104. Because the steps of stepped charging waveform 1100 are narrow and short, the quantified error is negligible and therefore status control circuit 105 is insensitive to the difference between stepped charging waveform 1100 and conventional charging waveform 200. 
     Mode 3. A Conventional Input Device Coupled to a Bimodal Game Card 
     When a conventional input device 101 is coupled to bimodal interface 302, a conventional charging waveform 200 is received at input port 313 and status control circuit 307 generates a corresponding status signal coupled to program interface 314. 
     Therefore, the game control system and method of the present invention generates input device status information with increased speed and accuracy. The game control system is additionally back-compatible with conventional input devices and game cards conforming to the IBM game port standard.