Hello there guys, I'm a new member to this site, and I'm also pretty new to the emulation scene. The NES is going to be my first console emulator, and I hope you can help me with my problems.
I'm already mostly done with the CPU, and it works well, cycles seem accurate up until now, and it just seems to function like it should. My problem now is the PPU. I'm stuck with all the graphics stuff. After having read up on name tables, pattern tables, attribute tables, palettes, sprites, etc, I'm wondering, where on an ROM/cartridge is all this stuff located? Now, I know the generic answer would be: "in the CHR memory banks", but here's the problem: How do I figure out which thing to find where? Where are the pattern tables located? Where are the name tables located? The PPU seems to have access to 16KB memory, which mostly contains graphics-related stuff, but I don't know how to find the location/memory area of these things.
What confuses me is that games don't have a fixed amount of CHR banks, and some have none at all. Imagine if a game has only 1 CHR memory bank of 8KB, that wouldn't fit all these things, would it? And what if a game doesn't have any CHR banks? How do I figure out where all the tables/palettes are located? Can someone give me a breakdown of how to figure these things out? I'm assuming the answer is pretty simple, but I just can't seem to figure it out.
Thanks.
I'm already mostly done with the CPU, and it works well, cycles seem accurate up until now, and it just seems to function like it should. My problem now is the PPU. I'm stuck with all the graphics stuff. After having read up on name tables, pattern tables, attribute tables, palettes, sprites, etc, I'm wondering, where on an ROM/cartridge is all this stuff located? Now, I know the generic answer would be: "in the CHR memory banks", but here's the problem: How do I figure out which thing to find where? Where are the pattern tables located? Where are the name tables located? The PPU seems to have access to 16KB memory, which mostly contains graphics-related stuff, but I don't know how to find the location/memory area of these things.
What confuses me is that games don't have a fixed amount of CHR banks, and some have none at all. Imagine if a game has only 1 CHR memory bank of 8KB, that wouldn't fit all these things, would it? And what if a game doesn't have any CHR banks? How do I figure out where all the tables/palettes are located? Can someone give me a breakdown of how to figure these things out? I'm assuming the answer is pretty simple, but I just can't seem to figure it out.
Thanks.