GARTHWILSON wrote:
One way to do it is to put the address of "background" into a pair of ZP bytes
How do I know where the background is in the program?
The way I learned to load the background is doing this (not sure if this is how everybody does it):
Code:
background:
.db $2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F ; Row 0 1/2 - Writes
.db $2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F ; Row 0 2/2 - 'HELLO!
.db $2F,$11,$0E,$15,$15,$18,$27,$2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F ; Row 1 1/2 - THIS IS A TEST
.db $2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F ; Row 1 2/2 - FOR DRAWING
.db $2F,$1D,$11,$12,$1C,$2F,$12,$1C,$2F,$0A,$2F,$1D,$0E,$1C,$1D,$2F ; Row 2 1/2 - BACKGROUND.'
.db $2F,$0F,$18,$1B,$2F,$0D,$1B,$0A,$20,$12,$17,$10,$2F,$2F,$2F,$2F ; Row 2 2/2 - on screen
.db $2F,$0B,$0A,$0C,$14,$10,$1B,$18,$1E,$17,$0D,$24,$2F,$2F,$2F,$2F ; Row 3 1/2
.db $2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F ; Row 3 2/2
The rest is just blank tiles ($2F) for now, but I will change that once I get this working (undefined tiles display as a '0' since it's the first tile). So the loop should go through this list and take the tiles from the included .chr file which is in the chr data bank. (Hopefully that made sense, lol)