Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
1 user currently in Rom Hacking: hukka | 2 guests
Acmlm's Board - I2 Archive - Rom Hacking - Memory Incrementing for SNES graphics
  
User name:
Password:
Reply:
 

UserPost
MathOnNapkins
Posts: 9/2189
Oh my is this the FuSoYa? I'm honored.

I mentioned querty's doc because when I trace I usually use sneqr, which he wrote. I have yet to download a version of Zsnes with a tracing debugger. Maybe I should...
FuSoYa
Posts: 7/255
Sounds right to me. But it's easy enough to run the code to check and make sure... *checks* Yes, that's what zsnes does.
MathOnNapkins
Posts: 7/2189
Okay...

VRAM addresses are always word addresses. Here's a diagram

$0000--$0001--$0002 of Vram:
XX XX | XX XX | XX XX etc....

Notice that they share no memory space. $0000 shares no bytes with $0001 and so on.
Now suppose that $2115 was written with #00 rather than #80. And I write #2110 to $2118. What I'm asking is whether VRAM would look like this:

$0000--$0001--$0002
10 XX | XX 21 | XX XX

And if $2115 were #80

$0000--$0001--$0002
10 21 | XX XX | XX XX

I'm not so much as asking a question as trying to reach a concensus. Qwerty's doc on this is fuzzy in its explanations.
BMF98567
Posts: 66/1261
Originally posted by MathOnNapkins
Now, since the processor at that time had a 16-bit accumulator, is it reasonable to assume that if I write a word, say #XXXX to $2118, that word is identically mapped to the address in Vram, and since the accumulator also wrote to $2119 since it's 16-bit, that the Vram address is auto incremented?
That sounds right. $2118 writes to the lower 8 bits of the current VRAM address, while $2119 writes to the upper 8 bits (AFAIK, VRAM is always 16-bit). Bit 7 of $2115 is set, so the address auto-increments after $2119 is written to.
Colin
Posts: 527/11302
Moving the thread to Rom Hacking since you'll get a better answer there.
MathOnNapkins
Posts: 6/2189
I was poking around in some code today and I found an instance where register $2115 was written with #80, thereby denoting that the Vram address at $2116 would increment when $2119 was written to. Now, since the processor at that time had a 16-bit accumulator, is it reasonable to assume that if I write a word, say #XXXX to $2118, that word is identically mapped to the address in Vram, and since the accumulator also wrote to $2119 since it's 16-bit, that the Vram address is auto incremented? I'm just clarifying for myself as this seems to be the most logical conclusion. Anybody know?

For the record, I've mainly dealt with alternating byte writes to only $2118 or $2119 in the past, so this is new to me. The one question that would remain, is that why would $2115 need to be #80 rather than #00? Would the low byte write first, trigger an auto increment, and the high byte would be stranded one address higher in Vram?
Acmlm's Board - I2 Archive - Rom Hacking - Memory Incrementing for SNES graphics


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.003 seconds.