Hi,
I've always wanted to write an NES emulator and for some reason I've finally just gotten to the point where I actually started. I'm reading everything I can get my hands on (minus the 6502 manual
), but I'm having trouble figuring out from a high level perspective of what it is that needs to be written.
The problem I'm finding is that every document I read either explains some things very detailed or very vaguely, either implying a lot between the lines, or simply expecting you to know everything else. I haven't been able to put together a clear picture of how things work.
Starting with the 6502 core from iNES, I've written a bit of code implementing some of basics of the memory and PPU, but I'm suck on a general lack of understanding. Some questions I have follow. I feel foolish asking some of these, but I'd rather ask and make a fool of myself than do something completely wrong.
1) What big pieces need to be written? The CPU is taken care of, then there's the PPU, APU, memory, controllers (not sure how much there is to do there), and then the mappers (which I haven't quite fully digested the details of, but I basically get it).
2) When the processor starts running do I need to load data from the cartridge into memory, or does the MMC map straight to the cartridge in such a way that access to certain areas of CPU memory automatically read from the cartridge?
3) With the CPU memory, do I really need to mirror chunks of memory or do I just look at every single address coming in and reduce it to a common unmirrored chunk? For example, on the PPU, $4000 - $10000 mirrors $0000-$3FFF. Is there any point at all of having any data in $4000+? Am I correct in guess that with $2008-$3FFF in CPU memory that as long as the address is >= $2000 and <= $2007 then it just looks at the least significant 4 bits? Is this why $3456 is the same as $2006?
It's actually difficult to formulate specific questions to ask because basically I'm just kind of confused as to where to start. Lets start with these for now, if you will.
Thanks guys
I've always wanted to write an NES emulator and for some reason I've finally just gotten to the point where I actually started. I'm reading everything I can get my hands on (minus the 6502 manual

The problem I'm finding is that every document I read either explains some things very detailed or very vaguely, either implying a lot between the lines, or simply expecting you to know everything else. I haven't been able to put together a clear picture of how things work.
Starting with the 6502 core from iNES, I've written a bit of code implementing some of basics of the memory and PPU, but I'm suck on a general lack of understanding. Some questions I have follow. I feel foolish asking some of these, but I'd rather ask and make a fool of myself than do something completely wrong.

1) What big pieces need to be written? The CPU is taken care of, then there's the PPU, APU, memory, controllers (not sure how much there is to do there), and then the mappers (which I haven't quite fully digested the details of, but I basically get it).
2) When the processor starts running do I need to load data from the cartridge into memory, or does the MMC map straight to the cartridge in such a way that access to certain areas of CPU memory automatically read from the cartridge?
3) With the CPU memory, do I really need to mirror chunks of memory or do I just look at every single address coming in and reduce it to a common unmirrored chunk? For example, on the PPU, $4000 - $10000 mirrors $0000-$3FFF. Is there any point at all of having any data in $4000+? Am I correct in guess that with $2008-$3FFF in CPU memory that as long as the address is >= $2000 and <= $2007 then it just looks at the least significant 4 bits? Is this why $3456 is the same as $2006?
It's actually difficult to formulate specific questions to ask because basically I'm just kind of confused as to where to start. Lets start with these for now, if you will.

Thanks guys