I try to convert a chr to chr-ram!
here is the code:
But some time the cram is wrong!
some data is malposed!
here is the code:
Code:
LDY #$0 ; starting index into the first page
STY $2001 ; turn off rendering just in case
STY $2006 ; load the destination address into the PPU
STY $2006
LDX #$20 ; number of 256-byte pages to copy
loop:
LDA ($0000),Y; $0000 is address at 0x8000
STA $2007
INY
BNE loop ; repeat until we finish the page
LDA $1
ADC #$1
STA $1 ; go to the next page
DEX
BNE loop ; repeat until we've copied enough pages
STY $2001 ; turn off rendering just in case
STY $2006 ; load the destination address into the PPU
STY $2006
LDX #$20 ; number of 256-byte pages to copy
loop:
LDA ($0000),Y; $0000 is address at 0x8000
STA $2007
INY
BNE loop ; repeat until we finish the page
LDA $1
ADC #$1
STA $1 ; go to the next page
DEX
BNE loop ; repeat until we've copied enough pages
But some time the cram is wrong!
some data is malposed!