Prev: 74DD Up: Map Next: 7512
74E9: Patch Vertical Shift
Used by the routine at DrawVertical.
Writes the next picture byte over the vertical-shift immediates and draws both layers.
VerticalRun_Patch 74E9 LD A,(IX+$03) Self-modify the loop stops at 74B9 and 74D8.
74EC LD ($74B9),A
74EF LD ($74D8),A
74F2 LD A,(IX+$04) Fetch the shift.
74F5 LD B,(IX+$01) Fetch the Y coordinate.
74F8 LD C,(IX+$02) Fetch the X coordinate.
This entry point is used by the routine at FixedVertical.
Patch the offset immediates and draw both layers.
VerticalRun_Draw 74FB LD ($7491),A Self-modify the reverse widths at 7491 and 74C3.
74FE LD ($74C3),A
7501 AND A Halve the shift.
7502 RRA
7503 LD ($749C),A Self-modify the inner counts at 749C and 74CA.
7506 LD ($74CA),A
Reverse the pixels.
7509 PUSH BC Stash the coordinates on the stack.
750A CALL VerticalRun_Mirror Call VerticalRun_Mirror.
750D POP BC Restore the coordinates from the stack.
Reverse the attributes.
750E CALL VerticalRun_Copy Call VerticalRun_Copy.
7511 RET Return.
Prev: 74DD Up: Map Next: 7512