Buzz #07
06 июня 1997 |
|
Iron - Connection Kempston-way controller to the Pentagon 128.
*** IRON *** PENTAGON-128. CONNECTING KEMPSTON-NAVIGATION. ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ If you download a computer game programs, then perhaps noticed that almost all the games can be controlled not only from the keyboard, but with a joystick. Moreover, as the right to choose offers several types of joysticks - KEMPSTON, SINCLAIR, CURSOR, etc. KEMPSTON-interface is a parallel input port information from the joystick on the data bus kompyutera.Etot port has an address of 31, but is commonly used cruder decoding the address when the port is chosen zero-state address bus or A5 A6, because is not typically used several external devices. In addition to addresses in the port selection part signals the microprocessor - IORQ, RD, which corresponds to a reading of I / O port. From bytes read media interest under 5 bits D0 ... D4, which reflect the state of the joystick contact: D0 - "RIGHT" D1 - "LEFT" D2 - "DOWN" D3 - "UP" D4 - "FIRE" At various conditions of the joystick with his numbers read: STATE NAVIGATION D0 D1 D2 D3 D4 NUM BASELINE 0 0 0 0 0 0 RIGHT 1 0 0 0 0 1 LEFT 0 1 0 0 0 2 DOWN 0 0 1 0 0 4 UP 0 0 0 1 0 8 RIGHT, DOWN 1 0 1 0 0 5 LEFT, DOWN 0 1 1 0 0 6 RIGHT, UP 1 0 0 1 0 9 LEFT, UP 0 1 0 1 0 10 FIRE 0 0 0 0 January 1916 RIGHT, FIRE 1 0 0 0 January 1917 LEFT, FIRE 0 1 0 0 January 1918 DOWN, FIRE 0 0 1 0 January 1920 UP, FIRE 0 0 0 1 January 1924 RIGHT, DOWN, FIRE 1 0 1 0 21 January LEFT, DOWN, FIRE 0 1 1 0 January 1922 RIGHT, UP, FIRE 1 0 0 1 January 1925 LEFT, DOWN, FIRE 0 1 0 1 January 1926 Note that after power up or pressing the RESET all 580BB55A ports are configured in input mode of informatsii.Krome Addressing the port "A" is chosen such that makes it possible to use it as a joystick interface, which can be connected as shown in Figure 1. The joystick will be chosen at zero on Tire A5, RD, IORQ, which corresponds to addressing KEMPSTON-INTERFACE. 4 / RIGHT K 580VV55A RA0 / E 3 / LEFT M RA1 / P 2 / S DOWN PA2 / T 1 / UP O Pa3 / N 40 / FIRE RA4 / A 39 M RA5 R1-R5 About 38 10 ohms Fig.1 TH PA6 C 37 t RA7 +5 V and K After the interface was collected, make sure it performance. It's enough to run a simple program: 10 LET A = IN 1931 20 CLS: PRINT AT 10,10; A 30 PAUSE 15: GO TO 10 In the neutral position of the joystick handle and properly collected by an interface circuit in the center of the screen should display "0". When the slopes of the arm will receive adequate numbers, as recorded in the table above.
Other articles:
Similar articles:
В этот день... 21 November