Hi all! I've been working on my emulator off-and-on for a while now, and I've finally gotten to the point where I can play games on it. I've implemented mapper 0, and games like Super Mario Bros work just fine.
Now I've moved on to Mapper 1, and I'm having some issues. I'm using Legend of Zelda as a test ROM, and everything works but the sprites. The background colours, music, and controls work as expected. Here's a video of the problem: https://streamable.com/txvnn7
Has anyone else seen something like this? It'd be great if someone else could skim through my implementation of Mapper 1 and tell me if there's any obvious problems: https://github.com/siliconandsolder/rus ... mapper1.rs
Problems with Mapper 1
Moderator: Moderators
Re: Problems with Mapper 1
But your video shows no graphics at all, not just "no sprites" ?
-
- Posts: 9
- Joined: Tue Apr 20, 2021 1:25 pm
Re: Problems with Mapper 1
Zelda1 uses CHR RAM. How do you handle writes to RAM that isn't nametables?
-
- Posts: 9
- Joined: Tue Apr 20, 2021 1:25 pm
Re: Problems with Mapper 1
I was wondering if Zelda 1 used CHR RAM. Looking at my implementation of the NES cartridge, I don't think I have it properly distinguishing between RAM carts and ROM carts. That might explain why mapper 0 games work fine, and mapper 1 games don't. Let me look at my cartridge implementation and see if I can find any problems.
-
- Posts: 9
- Joined: Tue Apr 20, 2021 1:25 pm
Re: Problems with Mapper 1
Yep, that was the issue. I wasn't properly initializing the CHR RAM. I was multiplying the number of CHR banks by 8192 to get the total size of the CHR memory. So if the number of banks was 0 (ie. it's CHR RAM) the CHR memory was empty. Everything looks good now.