Prev: 6D0C Up: Map Next: 6DBA
6D9C: Read Player Input
Used by the routines at 6DBA and 6EF1.
ReadInput 6D9C LD A,($5E03) Jump to ReadKempstonJoystick if GameOptions is set to joystick controls.
6D9F BIT 1,A
6DA1 JP NZ,ReadKempstonJoystick
Read keyboard input.
6DA4 LD A,$FB Read from the keyboard;
Port Number Bit
0 1 2 3 4
$FB Q W E R T
6DA6 OUT ($FD),A
6DA8 IN A,($FE)
Convert the bits into game compatible bits (as in, see ReadKempstonJoystick - as this is what is being matched).
6DAA LD C,A Store the original result in C.
6DAB RRA Rotate the bits right once.
6DAC AND %00000001 Keep only bit 0.
6DAE LD E,A Store the result in E.
6DAF LD A,C Restore the original result to A.
6DB0 RLA Rotate the bits left once.
6DB1 AND %00000010 Keep only bit 1.
6DB3 OR E Set the bits already processed from E.
6DB4 LD E,A Store the result in E.
6DB5 LD A,C Restore the original result to A.
6DB6 AND %00011100 Keep only bits 2-4.
6DB8 OR E Set the bits already processed from E.
6DB9 RET Return.
Prev: 6D0C Up: Map Next: 6DBA