Language…
15 users online:  AmperSam, asterkafton, ClaireChan, DanMario24YT, Everest, Gamet2004, Hayashi Neru, LightAligns, MorrieTheMagpie, PaceTheAce, Rhubarb44230,  Segment1Zone2, signature_steve, simon.caio,  zuccha - Guests: 261 - Bots: 355
Users: 64,795 (2,378 active)
Latest user: mathew

VRAM Uploading Table

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)
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
Sorry if this is a stupid question, but what exatctly does this mean, or prove?
<TLMB> I use YY-CHR to edit DNA
Maybe you could be a little more clear instead of hurting my head? Sorry, but a lot of people don't understand hex/ASM/whatever it is.
Then don't bother to post >_>.
--------> Don't follow "Find Roy's Dignity", my hack. Because it's pretty outdated. <--------
So...

...basically this is a table defining the Layer 3 tilemap?

If so, neat. :o
Your layout has been removed.