Hi guys,
I've been working on my NES emu for a few days now, and I have encountered a problem. It is very similar to this one here https://forums.nesdev.com/viewtopic.php?f=3&t=10762
As soon as the pixel 0,0 enters the 2nd Nametable, the UI starts to flicker, because of multiple writes of the base nametable address in PPUCTRL. Some of them are 0x2000 (as it is supposed to be, as the UI is still on NT1) and 0x2400 (which it should only be for everything below the UI).
I have a GIF of this right here
(Don't mind the 'cut off' part, that was a sprite zero problem that has been fixed by now)
So, I thought I was able to fix this, by resetting the base nametable address [bits] to zero => 0x2000 on VBLANK. This will fix the flicker on Super Mario Bros., but will be responsible for a follow up bug in Ice Climber.
I was implementing Y-Scrolling in Ice Climber, when I realized this. With the reset-hack still in place, the upward-scrolls in Ice Climber will have glitches at the top, as soon as it is inside NT2 [again]. (Note, this is only coarse-scroll for now, fine-scroll has not been implemented yet)
When I remove this hack, the Y-Scroll happens as it is supposed to.
Now I am a bit stumped on how to proceed, and what might cause this exactly.
Side note: I did not implement the LoopyV/T stuff, as it confuses the hell out of me (I'm not a native speaker), and I'm not quite sure if I would have to refactor my whole PPU.
E.g. right now, the first write to 0x2005 is stored as uint8_t variable called scr_x. 'coarse x' is scr_x / 8 right now, 'fine x' is scr_x % 8. And in the loopy description I can't even figure out where to pull this from
Any help would be greatly appreciated. Will provide logs, screenshots, whatever is necessary.
Thanks in advance!
LilaQ
I've been working on my NES emu for a few days now, and I have encountered a problem. It is very similar to this one here https://forums.nesdev.com/viewtopic.php?f=3&t=10762
As soon as the pixel 0,0 enters the 2nd Nametable, the UI starts to flicker, because of multiple writes of the base nametable address in PPUCTRL. Some of them are 0x2000 (as it is supposed to be, as the UI is still on NT1) and 0x2400 (which it should only be for everything below the UI).
I have a GIF of this right here
(Don't mind the 'cut off' part, that was a sprite zero problem that has been fixed by now)
So, I thought I was able to fix this, by resetting the base nametable address [bits] to zero => 0x2000 on VBLANK. This will fix the flicker on Super Mario Bros., but will be responsible for a follow up bug in Ice Climber.
I was implementing Y-Scrolling in Ice Climber, when I realized this. With the reset-hack still in place, the upward-scrolls in Ice Climber will have glitches at the top, as soon as it is inside NT2 [again]. (Note, this is only coarse-scroll for now, fine-scroll has not been implemented yet)
When I remove this hack, the Y-Scroll happens as it is supposed to.
Now I am a bit stumped on how to proceed, and what might cause this exactly.
Side note: I did not implement the LoopyV/T stuff, as it confuses the hell out of me (I'm not a native speaker), and I'm not quite sure if I would have to refactor my whole PPU.
E.g. right now, the first write to 0x2005 is stored as uint8_t variable called scr_x. 'coarse x' is scr_x / 8 right now, 'fine x' is scr_x % 8. And in the loopy description I can't even figure out where to pull this from
Any help would be greatly appreciated. Will provide logs, screenshots, whatever is necessary.
Thanks in advance!
LilaQ