Hello all, I have a quick question about reading/writing $2007. Say $2002.2 is clear, causing the address to be stepped by 1 each read/write. Now let's say that the 'x scroll' part of the address flips back to 0, bit 10 is switched and all that good stuff. But what happens to the 'y scroll' part of the address? Is it also stepped or is that only ever modified if $2002.2 is set? Here's my current code for handling steps (It's in C#, so I have to do it the hard way)
I only mention it because I've been picking my brain for a few hours trying to find out why my backgrounds aren't rendering properly at all.
Code:
private void Step()
{
if (this.chrRamStep == 0x01)
{
if ((this.chrRamAddr & 0x1F) == 0x1F)
{
this.chrRamAddr &= (0xFFE0);
this.chrRamAddr ^= (0x0400);
}
else
{
this.chrRamAddr += (0x0001);
}
}
if (this.chrRamStep == 0x20)
{
if ((this.chrRamAddr & 0x1F) == 0x1D)
{
this.chrRamAddr &= (0xFC1F);
this.chrRamAddr ^= (0x0800);
}
else if ((this.chrRamAddr & 0x1F) == 0x1F)
{
this.chrRamAddr &= (0xFC1F);
}
else
{
this.chrRamAddr += (0x0020);
}
}
}
{
if (this.chrRamStep == 0x01)
{
if ((this.chrRamAddr & 0x1F) == 0x1F)
{
this.chrRamAddr &= (0xFFE0);
this.chrRamAddr ^= (0x0400);
}
else
{
this.chrRamAddr += (0x0001);
}
}
if (this.chrRamStep == 0x20)
{
if ((this.chrRamAddr & 0x1F) == 0x1D)
{
this.chrRamAddr &= (0xFC1F);
this.chrRamAddr ^= (0x0800);
}
else if ((this.chrRamAddr & 0x1F) == 0x1F)
{
this.chrRamAddr &= (0xFC1F);
}
else
{
this.chrRamAddr += (0x0020);
}
}
}
I only mention it because I've been picking my brain for a few hours trying to find out why my backgrounds aren't rendering properly at all.