Prev: $126D Up: Map Next: $12B5
$1294: Get the address of a skool tile corresponding to a blackboard character cell
Used by the routines at $11CF and $1994.
Input
($15) Blackboard character cell x-coordinate
($16) Blackboard character cell y-coordinate
Output
($1B,$1C) Address of corresponding skool tile
$1294 LDA #$78 Place the address of the skool tile reference for the blackboard character cell at the given coordinates into $56.
$1296 CLC
$1297 ADC $16
$1299 STA $57
$129B LDA $15
$129D STA $56
$129F LDY #$00 Pick up the skool tile reference and store it at $1B. This is the LSB of the skool tile address.
$12A1 LDA ($56),Y
$12A3 STA $1B
$12A5 LDX $15 Pick up the blackboard character cell x-coordinate.
$12A7 CPX #$20 Is it 32 or greater?
$12A9 BCS $12B0 Branch if so.
$12AB LDA #$60 The skool tiles for x-coordinates 0-31 are in pages $60-$67.
$12AD JMP $12B2 Jump forward.
$12B0 LDA #$68 The skool tiles for x-coordinates 32-63 are in pages $68-$6F.
$12B2 STA $1C Store the MSB of the skool tile address at $1C.
$12B4 RTS
Prev: $126D Up: Map Next: $12B5