Playing around a bit with CHR-Ram rather than CHR-Rom (undecided at this moment, but would like to at least have a good handle on it in case I go that direction) - I managed to pull in part of a CHR file using RAM with the help of some awesome folks here. I'm trying to figure out how to append the code to choose where to write the chr information (so, for instance, if I wanted to maintain the first few rows of CHR data but replace the 3rd and 4th...the write would overwrite the data starting there rather than at the beginning). I keep playing around, but nothing is working as expected.
Here is the relevant part of the working code...this does load two rows of the incbin'd myChar, so now what modifications would I have to make to determine *where* these two rows are loaded (again, I hope I'm explaining that correctly...if I wanted to keep the first two rows of chr data the same and load these to the third and fourth row, as a for instance)? Thanks, and thanks for everyone who has been giving me insight and direction!!
setupChr:
LDA #$00
STA $2001
STA $2006
STA $2006
TAY
LDA #<myChar
STA $00
LDA #>myChar
STA $01
LDX #02
loadChrLoop:
LDA (#$00),y
STA $2007
INY
BNE loadChrLoop
INC $01
DEX
BNE loadChrLoop
Here is the relevant part of the working code...this does load two rows of the incbin'd myChar, so now what modifications would I have to make to determine *where* these two rows are loaded (again, I hope I'm explaining that correctly...if I wanted to keep the first two rows of chr data the same and load these to the third and fourth row, as a for instance)? Thanks, and thanks for everyone who has been giving me insight and direction!!
Code:
setupChr:
LDA #$00
STA $2001
STA $2006
STA $2006
TAY
LDA #<myChar
STA $00
LDA #>myChar
STA $01
LDX #02
loadChrLoop:
LDA (#$00),y
STA $2007
INY
BNE loadChrLoop
INC $01
DEX
BNE loadChrLoop