Prev: A6AB Up: Map Next: A706
A6DD: Computes address into attribute file based of (x,y)-pixel-position on screen
Used by the routines at 9B4D and BC17.
Input
$A248 x-pixel-position
$A249 y-pixel-position
Output
HL Address into attribute file
A6DD LD A,($A249) Computes into HL the address offset for the y-position
A6E0 LD L,A
A6E1 LD H,$00
A6E3 SRL H
A6E5 RR L
A6E7 SRL H
A6E9 RR L
A6EB SRL H
A6ED RR L
A6EF ADD HL,HL
A6F0 ADD HL,HL
A6F1 ADD HL,HL
A6F2 ADD HL,HL
A6F3 ADD HL,HL
A6F4 LD A,($A248) Computes into DE the address offset for the x-position
A6F7 SRL A
A6F9 SRL A
A6FB SRL A
A6FD LD E,A
A6FE LD D,$00
A700 ADD HL,DE Set HL to the address into attribute file
A701 LD DE,$5800
A704 ADD HL,DE
A705 RET
Prev: A6AB Up: Map Next: A706