Prev: A986 Up: Map Next: AA00
A98E: Main loop for attract-mode
Until a key is pressed, show the list of rooms defined at A986. Used by the routine at 9470.
A98E LD A,$C8 Set A25C the loop counter for the showed room = 200
A990 LD ($A25C),A
A993 LD A,($A25B) Pick up the list number for the next room to show
A996 LD E,A Set A the room number to show
A997 LD D,$00
A999 LD HL,$A986
A99C ADD HL,DE
A99D LD A,(HL)
A99E CP $FF the room number is $FF?
A9A0 JP NZ,$A9AA Jump if it isn't
A9A3 XOR A Reset the list number at R$A25B
A9A4 LD ($A25B),A
A9A7 JP $A993 Jump back
A9AA LD ($A251),A Set A251 to the room number to display
A9AD LD A,($A25B) Point $A25B to the next room on the list
A9B0 INC A
A9B1 LD ($A25B),A
A9B4 CALL $A939 Configure current room
A9B7 LD A,($A25C) Pick up loop counter
A9BA DEC A Decrement loop counter
A9BB OR A is zero?
A9BC JP Z,$A98E Jump back if so and show next room
A9BF LD ($A25C),A Save loop counter at A25C
A9C2 CALL $B68B Draw enemy projectiles
A9C5 CALL $BC48 Draw enemies
A9C8 CALL $D424 Play sound channels
A9CB CALL $B384 Copy tile graphic into room graphic data
A9CE CALL $A432 Copy room graphic buffer to display file
A9D1 CALL $B243 Reset room graphic buffer
A9D4 CALL $D424 Play sound channels
A9D7 CALL $CF59 Handle enemy projectile collision with Rex
A9DA CALL $B9E6 Update color attribute for weapon icon on HUD
A9DD CALL $C9E3 Generate train wagons: front, middle or rear wagon. No used
A9E0 CALL $CA35 Creates a new mobile enemy on room
A9E3 CALL $98B0 Update attribute color for score points in HUD
A9E6 CALL $996A HUD flash
A9E9 CALL $A26C Update timer bar in HUD
A9EC CALL $A61F Check for FIRE key pressed
A9EF JP Z,$948E Jump to init game if pressed
A9F2 CALL $A706 Update arrow tiles, shield recharger and respawn indicator
A9F5 LD A,($A1B0) Change tilt arrow tiles
A9F8 XOR $01
A9FA LD ($A1B0),A
A9FD JP $A9B7 Jump back to main loop game
Prev: A986 Up: Map Next: AA00