![]() |
Routines |
| Prev: 29498 | Up: Map | Next: 29556 |
|
Used by the routines at JetmanThrust and JetmanWalk.
|
||||||||||||||||||||
|
Check if this should be read from the Kempston joystick instead?
|
||||||||||||||||||||
| ReadInputLR | 29502 | LD A,(23795) | If GameOptions indicates the control method is via the Kempston joystick then jump to ReadKempstonJoystick. | |||||||||||||||||
| 29505 | BIT 1,A | |||||||||||||||||||
| 29507 | JR NZ,ReadKempstonJoystick | |||||||||||||||||||
|
Check for "Left" and "Right" button inputs for port 254.
|
||||||||||||||||||||
| 29509 | LD A,254 | Read from the keyboard;
|
||||||||||||||||||
| 29511 | OUT (253),A | |||||||||||||||||||
| 29513 | IN A,(254) | |||||||||||||||||||
| 29515 | AND %00011110 | Strip out the SHIFT key. | ||||||||||||||||||
| 29517 | CP 30 | If none of these keys have been pressed, jump to ReadInputLR_7F. | ||||||||||||||||||
| 29519 | JR Z,ReadInputLR_7F | |||||||||||||||||||
| 29521 | AND %00010100 | Keep only bits 2 ("X") and 4 ("V"). | ||||||||||||||||||
| 29523 | CP 20 | If neither key is pressed jump to Input_Left. | ||||||||||||||||||
| 29525 | JR Z,Input_Left | |||||||||||||||||||
| 29527 | JR Input_Right | Jump to Input_Right. | ||||||||||||||||||
|
Check for "Left" and "Right" button input for port 127.
|
||||||||||||||||||||
| ReadInputLR_7F | 29529 | LD A,127 | Read from the keyboard;
|
|||||||||||||||||
| 29531 | OUT (253),A | |||||||||||||||||||
| 29533 | IN A,(254) | |||||||||||||||||||
| 29535 | AND %00011110 | Strip out the SPACE key. | ||||||||||||||||||
| 29537 | CP 30 | If none of these keys have been pressed, jump to Input_None. | ||||||||||||||||||
| 29539 | JR Z,Input_None | |||||||||||||||||||
| 29541 | AND %00010100 | Keep only bits 2 ("M") and 4 ("B"). | ||||||||||||||||||
| 29543 | CP 20 | If neither key is pressed jump to Input_Right. | ||||||||||||||||||
| 29545 | JR Z,Input_Right | |||||||||||||||||||
|
Return "Left" button pressed.
|
||||||||||||||||||||
| Input_Left | 29547 | LD A,253 | A=11111101. | |||||||||||||||||
| 29549 | RET | Return. | ||||||||||||||||||
|
Return "Right" button pressed.
|
||||||||||||||||||||
| Input_Right | 29550 | LD A,254 | A=11111110. | |||||||||||||||||
| 29552 | RET | Return. | ||||||||||||||||||
|
Return "no input".
|
||||||||||||||||||||
| Input_None | 29553 | LD A,255 | A=11111111. | |||||||||||||||||
| 29555 | RET | Return. | ||||||||||||||||||
|
View the equivalent code in;
|
||||||||||||||||||||
| Prev: 29498 | Up: Map | Next: 29556 |