Prev: 8B3C Up: Map Next: 8B94
8B70: Process one row of sprite rendering.
Handles screen memory boundary wrapping. The screen address increments by $0100 per pixel row, but crossing character row or screen-third boundaries requires corrections: subtract $07E0 at character row boundaries (within same third), or subtract $00E0 at third-of-screen boundaries.
render_row_loop 8B70 PUSH DE Check if new Y position crosses a character row boundary (Y AND $07 = 0).
8B71 LD BC,($8B0C)
8B75 LD A,B
8B76 AND $07
8B78 CP $00
8B7A JP NZ,adjust_old_position
8B7D LD A,B If at a third-of-screen boundary (Y AND $3F = 0), jump to subtract $00E0 instead.
8B7E AND $3F
8B80 CP $00
8B82 JP Z,adjust_new_screen_third
8B85 LD HL,($8B12) Subtract $07E0 from screen address for character row crossing.
8B88 LD DE,$07E0
8B8B OR A
8B8C SBC HL,DE
8B8E LD ($8B12),HL
8B91 JP adjust_old_position
Prev: 8B3C Up: Map Next: 8B94