Sorry for the non-creative title
The ppu memory $4000-FFFF is a set of mirrors of $0000-$3FFF..
Then I do this.
But ... isn't better just made logical operation with all addresses?
I guess what is better? (check all the time or just made the operation o' the time)
-------------------------------------------------------------------------------------
I'm work with 262 scanlines.... I've read somewhere.. (I guess was on NinTech.txt) the following scheme:
At 0 Scanline:
ppuStatus.moreThan8ObjectsOnScanLine = NotSetted;
ppuStatus.verticalBlankStarted = NotInVBlank;
SpriteRAM.reset();
Between 1 and 240 Scanline:
Normal scanline fetch
#1 - Name Table ==> Tile Number
#2 - Attribute Table ==> For that Tile
#3 - Pattern Table 0 and 1
#4 - Check all the Sprites(prior and positions)
Between 241 and 242 Scanline:
I don't know what this scanlines does... what?
Between 243 and 262 Scanline:
ppuStatus.verticalBlankStarted = InVBlank;
If the scanline is #262 I reset the scanline counter to 0.
During this period I check all the time if ppuControl.executeNMIOnVBlank is setted and execute the :
Need I to reset the SPR-RAM? (I mean clean it?)
Exist this 0 Scanline?
Am I forgetting anything on scanline scheme?
The ppu memory $4000-FFFF is a set of mirrors of $0000-$3FFF..
Then I do this.
Code:
if (address >= 0x4000) {
address &= 0x3FFF;
}
address &= 0x3FFF;
}
But ... isn't better just made logical operation with all addresses?
Code:
address &= 0x3FFF;
I guess what is better? (check all the time or just made the operation o' the time)
-------------------------------------------------------------------------------------
I'm work with 262 scanlines.... I've read somewhere.. (I guess was on NinTech.txt) the following scheme:
At 0 Scanline:
ppuStatus.moreThan8ObjectsOnScanLine = NotSetted;
ppuStatus.verticalBlankStarted = NotInVBlank;
SpriteRAM.reset();
Between 1 and 240 Scanline:
Normal scanline fetch
#1 - Name Table ==> Tile Number
#2 - Attribute Table ==> For that Tile
#3 - Pattern Table 0 and 1
#4 - Check all the Sprites(prior and positions)
Between 241 and 242 Scanline:
I don't know what this scanlines does... what?
Between 243 and 262 Scanline:
ppuStatus.verticalBlankStarted = InVBlank;
If the scanline is #262 I reset the scanline counter to 0.
During this period I check all the time if ppuControl.executeNMIOnVBlank is setted and execute the :
Code:
public void nmi() {
flagBreak = 0;
push((((programCounter + 1) >> 8) & 0xFF));
push(((programCounter + 1) & 0xFF));
push(processorStatus());
flagIRQ = 1;
programCounter = get16BitLittleEndian(Memory[InterruptNMI], Memory[InterruptNMI + 1]);
cycles += 7;
}
flagBreak = 0;
push((((programCounter + 1) >> 8) & 0xFF));
push(((programCounter + 1) & 0xFF));
push(processorStatus());
flagIRQ = 1;
programCounter = get16BitLittleEndian(Memory[InterruptNMI], Memory[InterruptNMI + 1]);
cycles += 7;
}
Need I to reset the SPR-RAM? (I mean clean it?)
Exist this 0 Scanline?
Am I forgetting anything on scanline scheme?