I was reading "The skinny on NES scrolling", which, among other things, describes what happens with the current/temporary VRAM address when a program writes to $2000, $2005 and $2006. I either don't understand the general way the document explains things, or I just don't understand the VRAM address's working. This is what I mean:
Where t is supposedly the VRAM value, and d is the data written to it. So, as far as I can understand, if a program writes 11 to $2000, the VRAM value is set to 0001100 00000000? Why is this? Why is the location so seemingly random?
There are more of these cases which I cannot understand:
I just don't get the general premise of this one. What is meant with HGFED...? Am I misunderstanding when I say that any of these letters is a random 1 or 0? So if that's the case, HGFED... could be something like 10110000, right? And what's with the second value, .....CBA? Does that belong with the previously mentioned HGFED...? Is the written value actually HGFEDCBA, and does it get split and written to different registers, i.e. the first 3 bits are written to the X register, and the last 5 are written to the T register? Why is this? What's the logic behind this functioning? The only thing I understand is the w: = 1, but other than that, all of this seems completely random. The same thing applies to the next couple of things:
$2005 second write: what's with the random ordering of the bits?
$2006 first and second write are more understandable to me. I assume the first time data is written, the latter 7 bits are used to store the data, and the second time data is written, the first 8 bits are used to store it. What I don't really understand is the t: X...... ........ = 0 statement when doing the first write to $2006, and the v = t when doing the second write to $2006.
I know the question seems a bit large and vague, but I just don't understand the concept behind these registers. I hope someone can explain this to me.
Quote:
$2000 write:
t: ...BA.. ........ = d: ......BA
t: ...BA.. ........ = d: ......BA
Where t is supposedly the VRAM value, and d is the data written to it. So, as far as I can understand, if a program writes 11 to $2000, the VRAM value is set to 0001100 00000000? Why is this? Why is the location so seemingly random?
There are more of these cases which I cannot understand:
Quote:
$2005 first write (w is 0):
t: ....... ...HGFED = d: HGFED...
x: CBA = d: .....CBA
w: = 1
t: ....... ...HGFED = d: HGFED...
x: CBA = d: .....CBA
w: = 1
I just don't get the general premise of this one. What is meant with HGFED...? Am I misunderstanding when I say that any of these letters is a random 1 or 0? So if that's the case, HGFED... could be something like 10110000, right? And what's with the second value, .....CBA? Does that belong with the previously mentioned HGFED...? Is the written value actually HGFEDCBA, and does it get split and written to different registers, i.e. the first 3 bits are written to the X register, and the last 5 are written to the T register? Why is this? What's the logic behind this functioning? The only thing I understand is the w: = 1, but other than that, all of this seems completely random. The same thing applies to the next couple of things:
Quote:
$2005 second write (w is 1):
t: CBA..HG FED..... = d: HGFEDCBA
w: = 0
$2006 first write (w is 0):
t: .FEDCBA ........ = d: ..FEDCBA
t: X...... ........ = 0
w: = 1
$2006 second write (w is 1):
t: ....... HGFEDCBA = d: HGFEDCBA
v = t
w: = 0
t: CBA..HG FED..... = d: HGFEDCBA
w: = 0
$2006 first write (w is 0):
t: .FEDCBA ........ = d: ..FEDCBA
t: X...... ........ = 0
w: = 1
$2006 second write (w is 1):
t: ....... HGFEDCBA = d: HGFEDCBA
v = t
w: = 0
$2005 second write: what's with the random ordering of the bits?
$2006 first and second write are more understandable to me. I assume the first time data is written, the latter 7 bits are used to store the data, and the second time data is written, the first 8 bits are used to store it. What I don't really understand is the t: X...... ........ = 0 statement when doing the first write to $2006, and the v = t when doing the second write to $2006.
I know the question seems a bit large and vague, but I just don't understand the concept behind these registers. I hope someone can explain this to me.