Prev: BBB0 Up: Map Next: BBE7
BBCC: wait for no key to be pressed and set SEED based on how long a key is pressed
wait_no_key_seed BBCC PUSH HL preserve HL, DE, BC
BBCD PUSH DE
BBCE PUSH BC
BBCF LD A,(computer_player_flag) skip to end of routine if current player is not human
BBD2 OR A
BBD3 JR NZ,wait_no_key_seed_1
wait_no_key_seed_0 BBD5 PUSH BC preserve BC
BBD6 CALL $028E call KEY-SCAN in ROM to see if a key was pressed.
BBD9 POP BC restore BC
BBDA INC C increment counter (used to set SEED later)
BBDB LD A,E loop back to wait_no_key_seed_0 if a key was pressed
BBDC INC A
BBDD JR NZ,wait_no_key_seed_0
BBDF LD A,C set SEED to the value of the counter
BBE0 LD ($5C76),A
wait_no_key_seed_1 BBE3 POP BC restore BC, DE, HL
BBE4 POP DE
BBE5 POP HL
BBE6 RET return
Prev: BBB0 Up: Map Next: BBE7