Prev: A90C Up: Map Next: A9AF
A915: Main loop for attract-mode
Until a key is pressed, show the list of rooms defined at A90C Used by the routine at 947A.
A915 LD A,$C8 Set A0C3 the loop counter for the showed room = 200
A917 LD ($A0C3),A
A91A LD A,($A0C2) Pick up the list number for the next room to show
A91D LD E,A Set A the room number to show
A91E LD D,$00
A920 LD HL,$A90C
A923 ADD HL,DE
A924 LD A,(HL)
A925 CP $FF the room number is $FF?
A927 JP NZ,$A931 Jump if it isn't
A92A XOR A Reset the list number at R$A0C2
A92B LD ($A0C2),A
A92E JP $A91A Jump back
A931 LD ($A0B8),A Set A0B8 to the room number to display
A934 LD A,($A0C2) Point $A0C2 to the next room on the list
A937 INC A
A938 LD ($A0C2),A
A93B CALL $A89D Configure current room
A93E LD A,($A0C3) Pick up loop counter
A941 DEC A Decrement loop counter
A942 OR A is zero?
A943 JP Z,$A915 Jump back if so and show next room
A946 LD ($A0C3),A Save loop counter at A0C3
A949 CALL $B645 Draw enemy projectiles
A94C CALL $BA5C Draw enemies
A94F CALL $D68C Play sound channels
A952 CALL $B33E Copy tile graphic into room graphic data
A955 CALL $A28A Copy room graphic buffer to display file
A958 CALL $B205 Reset room graphic buffer
A95B CALL $D68C Play sound channels
A95E CALL $D1B9 Handle enemy projectile collision with Rex
A961 CALL $B96B Update color attribute for weapon icon on HUD
A964 CALL $C978 Generate train parts: front, middle or rear wagon
A967 CALL $C9CA Creates a new mobile enemy on room
A96A CALL $9992 Update attribute color for score points in HUD
A96D CALL $9A4C HUD flash
A970 CALL $A0C4 Update timer bar in HUD
A973 CALL $A477 Check fire pressed
A976 JP Z,$9498 Jump to init game if pressed
A979 LD HL,$6758 Rotate left tile $6F. Not used in game
A97C LD B,$08
A97E RRC (HL)
A980 INC HL
A981 DJNZ $A97E
A983 LD HL,$6858 Rotate right two times tile $8F. Simulate horizontal conveyor belt
A986 LD B,$08
A988 RLC (HL)
A98A RLC (HL)
A98C INC HL
A98D DJNZ $A988
A98F LD HL,$64C0 Set HL to point to tile $1C graphic data (vertical conveyor belt)
A992 CALL $A7BA Simulate conveyor belt going down
A995 LD HL,$6438 Set HL to point to tile $0B graphic data (vertical conveyor belt)
A998 CALL $A7A9 Simulate conveyor belt going up
A99B LD HL,$64B0 Set HL to point to tile $1A graphic data (vertical conveyor belt)
A99E CALL $A7BA Simulate conveyor belt going down
A9A1 CALL $A55E Update arrow tiles, shield recharger, respawn indicator, fire and water effect
A9A4 LD A,($A017) Change tilt arrow tiles
A9A7 XOR $01
A9A9 LD ($A017),A
A9AC JP $A93E Jump back to the main loop
Prev: A90C Up: Map Next: A9AF