![]() |
Routines |
| Prev: 8690 | Up: Map | Next: 86E4 |
|
Used by the routine at menu_loop.
A (row $FD, bit 0) chooses one player, B (row $7F, bit 4) two (player_count = 0 or 1). Keys 1 and 2 (row $F7, bits 0 and 1) step player 1's and player 2's control method on through 0-3 (Keyboard, Kempston, Cursor, Interface II), but only once that player's pointer has reached the line of the method it has, so a held key steps once per arrival rather than once a pass.
The entry at cycle_method steps one player's method: IX the pointer record, B the key's bit.
|
||||
| menu_keys | 86B9 | LD A,$FD | A: one player | |
| 86BB | OUT ($FD),A | |||
| 86BD | IN A,($FE) | |||
| 86BF | AND $01 | |||
| 86C1 | JR NZ,menu_keys_0 | |||
| 86C3 | LD (player_count),A | |||
| menu_keys_0 | 86C6 | LD A,$7F | B: two players | |
| 86C8 | OUT ($FD),A | |||
| 86CA | IN A,($FE) | |||
| 86CC | BIT 4,A | |||
| 86CE | JR NZ,menu_keys_1 | |||
| 86D0 | LD A,$01 | |||
| 86D2 | LD (player_count),A | |||
| menu_keys_1 | 86D5 | LD IX,player1_pointer | Player 1 and key 1 | |
| 86D9 | LD B,$01 | |||
| 86DB | CALL cycle_method | |||
| 86DE | LD IX,player2_pointer | Player 2 and key 2 | ||
| 86E2 | LD B,$02 | |||
| Prev: 8690 | Up: Map | Next: 86E4 |