![]() |
Routines |
| Prev: 6188 | Up: Map | Next: 61C2 |
|
Used by the routine at 6E32.
|
||||||||||||||||||||
|
Check if this should be read from the Kempston joystick instead?
|
||||||||||||||||||||
| ReadInputLR | 618C | LD A,($5E3E) | If GameOptions indicates the control method is via the Kempston joystick then jump to ReadKempstonJoystick. | |||||||||||||||||
| 618F | BIT 1,A | |||||||||||||||||||
| 6191 | JR NZ,ReadKempstonJoystick | |||||||||||||||||||
|
Check for "Left" and "Right" button inputs for port FE.
|
||||||||||||||||||||
| 6193 | LD A,$FE | Read from the keyboard;
|
||||||||||||||||||
| 6195 | OUT ($FD),A | |||||||||||||||||||
| 6197 | IN A,($FE) | |||||||||||||||||||
| 6199 | AND %00011110 | Strip out the SHIFT key. | ||||||||||||||||||
| 619B | CP $1E | If none of these keys have been pressed, jump to ReadInputLR_7F. | ||||||||||||||||||
| 619D | JR Z,ReadInputLR_7F | |||||||||||||||||||
| 619F | AND %00010100 | Keep only bits 2 ("X") and 4 ("V"). | ||||||||||||||||||
| 61A1 | CP $14 | If neither key is pressed jump to Input_Left. | ||||||||||||||||||
| 61A3 | JR Z,Input_Left | |||||||||||||||||||
| 61A5 | JR Input_Right | Jump to Input_Right. | ||||||||||||||||||
|
Check for "Left" and "Right" button input for port 7F.
|
||||||||||||||||||||
| ReadInputLR_7F | 61A7 | LD A,$7F | Read from the keyboard;
|
|||||||||||||||||
| 61A9 | OUT ($FD),A | |||||||||||||||||||
| 61AB | IN A,($FE) | |||||||||||||||||||
| 61AD | AND %00011110 | Strip out the SPACE key. | ||||||||||||||||||
| 61AF | CP $1E | If none of these keys have been pressed, jump to Input_None. | ||||||||||||||||||
| 61B1 | JR Z,Input_None | |||||||||||||||||||
| 61B3 | AND %00010100 | Keep only bits 2 ("M") and 4 ("B"). | ||||||||||||||||||
| 61B5 | CP $14 | If neither key is pressed jump to Input_Right. | ||||||||||||||||||
| 61B7 | JR Z,Input_Right | |||||||||||||||||||
|
Return "Left" button pressed.
|
||||||||||||||||||||
| Input_Left | 61B9 | LD A,$FD | A=11111101. | |||||||||||||||||
| 61BB | RET | Return. | ||||||||||||||||||
|
Return "Right" button pressed.
|
||||||||||||||||||||
| Input_Right | 61BC | LD A,$FE | A=11111110. | |||||||||||||||||
| 61BE | RET | Return. | ||||||||||||||||||
|
Return "no input".
|
||||||||||||||||||||
| Input_None | 61BF | LD A,$FF | A=11111111. | |||||||||||||||||
| 61C1 | RET | Return. | ||||||||||||||||||
|
View the equivalent code in;
|
||||||||||||||||||||
| Prev: 6188 | Up: Map | Next: 61C2 |