i have some doubts of how to implement MMC3 emulation well.
First if we think that the mmc3 chip is in the cart, or to say it in other way is "external" to the NES the program that emulate it should me modular, i mean to have an structure that dont need to include nothing in ppu to specifically regarding to mmc3. So thinking in this way, to treat MMC3 as a "plug-in" to the code (im not saying that my emulator should supports plugs ins , i just used the term).
So if this "chip" (MMC3) is in the cart with a (or a few) rom memories chips or IC, there should be a way to modularize the program and is what im doing with my emulator.
All that s**t i writed above is to say that im implementing things as a pointer to functions, and in my ppu core i have a nice SetUpPPUReadPointers(int index, ReadProc pfun). Where ReadProc is a pre-defined (typedefed) poniter to function. It also should be note that there is also a SetUpPPUWritePointers() (of course to know when the program wants to write to MMC3 registers).
i have a func in the mmc3 core (outside ppu core, of course), that when the memory is read it checks rising edges of A12, but my problem is graciously a thing like when a game tries to "split" the screen, like Double Dragon 3" it splits from the most upper sprite, i mean that sprite that has a value of Y closer to "0" so when you jump in this game the splited part of the screen jumps togheter with the sprite.
Does anyone has an idea why this thing can be happening?
Thanks and i hope not to bother you with my big post.
First if we think that the mmc3 chip is in the cart, or to say it in other way is "external" to the NES the program that emulate it should me modular, i mean to have an structure that dont need to include nothing in ppu to specifically regarding to mmc3. So thinking in this way, to treat MMC3 as a "plug-in" to the code (im not saying that my emulator should supports plugs ins , i just used the term).
So if this "chip" (MMC3) is in the cart with a (or a few) rom memories chips or IC, there should be a way to modularize the program and is what im doing with my emulator.
All that s**t i writed above is to say that im implementing things as a pointer to functions, and in my ppu core i have a nice SetUpPPUReadPointers(int index, ReadProc pfun). Where ReadProc is a pre-defined (typedefed) poniter to function. It also should be note that there is also a SetUpPPUWritePointers() (of course to know when the program wants to write to MMC3 registers).
i have a func in the mmc3 core (outside ppu core, of course), that when the memory is read it checks rising edges of A12, but my problem is graciously a thing like when a game tries to "split" the screen, like Double Dragon 3" it splits from the most upper sprite, i mean that sprite that has a value of Y closer to "0" so when you jump in this game the splited part of the screen jumps togheter with the sprite.
Does anyone has an idea why this thing can be happening?
Thanks and i hope not to bother you with my big post.