Prev: A8AE Up: Map Next: A8CC
A8BD: Calculate Dart Board Address
Used by the routines at 9253, 92E2, A4AB, A4D4, A556, A578, A774 and B77A.
Input
D Source Y position
E Source X position
Output
HL Dart Board buffer location
CalculateDartBoardAddress A8BD LD A,%00000111 Mask out the bottom 3 bits of the Y position.
A8BF AND D
A8C0 RRCA Rotate the bits right three positions.
A8C1 RRCA
A8C2 RRCA
A8C3 OR E Combine with the X position.
A8C4 LD L,A L=low byte of the dart board buffer address.
A8C5 LD A,D Mask out bits 3-4 of the Y position.
A8C6 AND %00011000
A8C8 OR %01100000 Add the dart board buffer memory base address (6000).
A8CA LD H,A H=high byte of the dart board buffer address.
A8CB RET Return.
Prev: A8AE Up: Map Next: A8CC