i'm use the next code for change de AN2 page, but when i use this code cause graphics errors , but for change others page of graphics as BG1,BG2,BG3,FG1,FG2 or FG this code works perfectly.
Codetabla1:
REP #$20
LDA #$AD00 ; VRAM address to upload to
STA $2116 ; There is a document on SMW's VRAM addresses in the documents section IIRC
LDX.b #%00000001 ;(Byte load) Transfer Mode
STX $4300 ;(Word Store) Two registers, one byte per register (p, p+1)
LDX #$18 ;(Byte load) DMA to VRAM Data Write regs
STX $4301 ;(Word Store) Low 2118 High 2119
; Set reg transfer to $21[18] ($2119 also gets written to since it is a word store of course)
LDA #data1 ; Location of data to upload
STA $4302 ; low byte and high byte
LDX.b #data1>>16 ; Location of data
STX $4304 ; bank byte (which bank the data is in)
LDA #end1-data1 ; Size of data to transfer
STA $4305 ; this is one way to get the size if you don't know it
SEP #$20 ;
LDA.b #%00000001 ; start DMA
STA $420B ; transfer
RTS
data1:
incbin ExGraphics/ExGFXD00.bin
end1:
RTS
------------------------------------------------------
Youtube
Twitter
SMWControlLibX GitHub
My Discord Server
Snestorage where you can download my resources