https://imgur.com/a/G4Chx8D
Does anyone have any idea as to what is causing this? I'm stuck and i can't find anything. Anything is appreciated.
Moderator: Moderators
Where exactly would be the first play i should start looking in my emulator for errors with the timing?tokumaru wrote: ↑Mon Jan 18, 2021 1:46 amThe main character in this game is drawn with background tiles, not sprites, so the game need to change the scroll mid-frame in order to control the positions of the background and the player. The scroll split is supposed to happen much closer to the top of the screen, so maybe this is a timing issue?
0x3000-0x3eff is a mirror of 0x2000-0x2efftokumaru wrote: ↑Mon Jan 18, 2021 2:50 amIt could be a sprite 0 hit issue, or the execution time of the instructions. Are you keeping track of the CPU cycles relative to the PPU cycles? Many games will use timed code while the PPU is rendering in order to wait for specific moments and apply some sort of PPU effect, such as a scroll change, and for that to work you must make sure that the PPU and the CPU run in parallel, with each instruction taking the correct number of cycles to execute.
Yes and I didn't know about this mirror, thanks. My NES emulator doesn't support it. Data at this range isn't "also" written to the other range, mirrors work by masking part of the address during access.
For each CPU access (read/write), the NTSC PPU runs for 3 cycles, or 341 PPU cycles per scanline, or 113.6 CPU cycles.How many CPU cycles do you emulate per scan line?
How do you count CPU cycles?
nesemu101, next time, if your response has nothing to do with a quoted post, please don’t quote the post.nesemu101 wrote: ↑Tue Jan 19, 2021 1:43 am0x3000-0x3eff is a mirror of 0x2000-0x2efftokumaru wrote: ↑Mon Jan 18, 2021 2:50 amIt could be a sprite 0 hit issue, or the execution time of the instructions. Are you keeping track of the CPU cycles relative to the PPU cycles? Many games will use timed code while the PPU is rendering in order to wait for specific moments and apply some sort of PPU effect, such as a scroll change, and for that to work you must make sure that the PPU and the CPU run in parallel, with each instruction taking the correct number of cycles to execute.
does that mean data written to 0x3000 - 0x3eff is also written to 0x2000-0x2eff?