Prev: 7E93 Up: Map Next: 7EC5
7EB2: The work that happens once per frame
Used by the routine at MAIN_LOOP.
MAIN_LOOP runs as fast as it can and calls this only when the ROM's frame counter has moved on, so what happens here is tied to the 50Hz interrupt rather than to how much there is to do.
It dispatches three records the main loop deliberately skips -- $EA90, $EA98 and $EAA0, the player, the weapon it has in flight, and the sound effect slot -- and then ticks the clock. That is why the player moves at a steady speed however crowded a room is, while the monsters are dispatched on every pass of the outer loop.
It runs with interrupts off, so a frame's work is never interrupted half way.
FRAME_TICK 7EB2 DI Nothing may interrupt a frame's work.
7EB3 PUSH IX
7EB5 LD A,$01 A flag saying a frame is in progress.
7EB7 LD ($5E04),A
7EBA LD IX,$EA90 The player, first of the three.
This entry point is used by the routine at FRAME_TICK_NEXT.
TICK_DISPATCH 7EBE LD HL,FRAME_TICK_NEXT Push the return address, then enter DISPATCH_ACTOR below its own PUSH HL -- it has already been done here.
7EC1 PUSH HL
7EC2 JP DISPATCH_PUSHED Dispatch.
Prev: 7E93 Up: Map Next: 7EC5