Originally part of a PM I wrote (though, edited):
Yesterday I noticed a VRAM uploading table at $7F837B while using the debugger. I discovered it before, but I didn't know how it worked. Then yesterday I realized it because I saw a location in the VRAM in the layer 3 tilemap: 51E8 among the bytes, which was unusually forwards (51 E8 instead of E8 51). When I manipulated it the values used for the blinking arrow in the title screen menu, it was written for one frame somewhere else, proving my guess. I soon found how this table works:
First 2 bytes: Offset to table
In the main table starting after the offset:
2 bytes: VRAM location (backwards)
2 bytes: Length of data/2 (???) (backwards)
X bytes: Data
Then the next one occurs...
After the last one there must be a $FF byte.
You must have an even amount to transfer...
SNES VRAM is the Debugger value/2
You have to increment 2 before because it starts out as $0000.
So using it would be: (I haven't tested it)
Update 7/1: Made accumulator 16 bit and changed some code so it should work properly
Yesterday I noticed a VRAM uploading table at $7F837B while using the debugger. I discovered it before, but I didn't know how it worked. Then yesterday I realized it because I saw a location in the VRAM in the layer 3 tilemap: 51E8 among the bytes, which was unusually forwards (51 E8 instead of E8 51). When I manipulated it the values used for the blinking arrow in the title screen menu, it was written for one frame somewhere else, proving my guess. I soon found how this table works:
First 2 bytes: Offset to table
In the main table starting after the offset:
2 bytes: VRAM location (backwards)
2 bytes: Length of data/2 (???) (backwards)
X bytes: Data
Then the next one occurs...
After the last one there must be a $FF byte.
You must have an even amount to transfer...
SNES VRAM is the Debugger value/2
You have to increment 2 before because it starts out as $0000.
So using it would be: (I haven't tested it)
Code
VRAM = $5042 vdatastart: db $2E,$3D vdataend: vmain: REP #$20 LDA $7F837B TAX INX ; get to slot INX LDA #VRAM ; VRAM loc. (5042 is on status bar) XBA ; make value backwards STA $7F837B,x ; Store INX ; get to slot INX LDA vdataend-vdatastart ; number of bytes LSR ; divide by 2 XBA ; make value backwards STA $7F837B,x ; Store INX ; get to slot INX LDY vdataend-vdatastart STY $0001 ; scratch TXA ADC $0001 ; scratch TAX PHX vloop: LDA vdatastart,y STA $7F837B,x DEX DEX DEY DEY CPY #$00 BNE vloop PLX TXA STA $7F837B SEP #$20 RTS ; end
Update 7/1: Made accumulator 16 bit and changed some code so it should work properly