SimpleNES
SimpleNES copied to clipboard
[Discuss] Add support to Rad Racer II (4screen mirroring, scanline IRQ)
Hi, I am working on support Rad Racer II. Which include 4 screen and scanline IRQ.
before:

After:

There are still some glitch, I guess it has something to do with the way I add scanline IRQ in PPU. But I have no idea how to fix it.
I have add extra RAM in mapper to support nametable 2 and 3. It would be much easer to just resize the picturebus. But I think we should emulate what the NES do, right? Would it be better to add another mirroring type MapperControled so we can support more complex mirroring for some Mapper?
Thank you for the pull request!
I have add extra RAM in mapper to support nametable 2 and 3. It would be much easer to just resize the picturebus. But I think we should emulate what the NES do, right? Would it be better to add another mirroring type MapperControled so we can support more complex mirroring for some Mapper?
I think this approach is good, since it's mapper specific, the extra memory should go there. I like the idea of MapperControlled!
Hey, sorry for the delay. I'm currently cleaning up some mappers, including MMC3, unfortunately I have little time, so I'm not done yet. I'll try to clean that as soon as possible. I also just found out that nametable isn't correctly read from an iNES file. I'll need to fix that before this will work well.
MapperControlled
After reading more about this, I realize that FourScreen and MapperControlled basically mean the same thing. I don't think we need a new enum for that anymore.
MMC5 has a complex mirroring mode which is configured by a mapping register, that is why I add this new enum (maybe renaming the FourScreen would be better?).
I am refactoring PPU steps following PPU rendering because I thought it has something to do with the glitch (trigger the IRQ by A13). But the glitch still exists after I finish(almost) the refactor. Do you have any idea what should I do to fix it?
By the way, do you need github hooks? Such as format and spellcheck. I have some experiments on that.
GitHub hooks
That sounds great! Some contributed files have bad indentation, this would really help
Sure. I will add the hooks after you cleaning up the mappers.
I've pushed up some changes to master, including a fix for ines header reading. (Although I've yet to find a Rad Racer dump that has the correct 4 screen header). And getting back to NameTableMirroring, I suggest removing MapperControlled, and using FourScreen instead. FourScreen should mean mapper controlled. That's the only it's possible and that's the nesdev wiki seems to be calling it.
But the glitch still exists after I finish(almost) the refactor. Do you have any idea what should I do to fix it?
I also see glitches in SMB2 and Kirby's Adventure, it's possible that MMC3 itself has a bug. Another functionality missing is the APU, it's possible that some ROMs are using that for timing. Working on the APU is also on my queue.
Sure. I will add the hooks after you cleaning up the mappers.
Hi I saw that you fixed IRQ did you try rad racer 2 which uses mapper 4 you can try to see if it goes in alien 3 game should go now
@SuzieQQ Alien 3 works now.
@SuzieQQ Alien 3 works now. as soon as i can i try it, now i don't remember i had a small list with IRQ bugs with other games maybe super mario 2 should go in game now! this is a particular game they say

i have tested all the games i had tried in the past these are the improvements, the rest either behaves the same, or some no longer work. I noticed that in particular all the ninja turtle games never worked
@SuzieQQ Does SMB3 work now?
@SuzieQQ Does SMB3 work now?
no, before it went into the menu now graphical glitch and does not enter the menu
@amhndu @SuzieQQ
Hi, I think I find out why SMB3 not working.
I download the rom from here and the head[6] & 0x2 is 0, that means no extended RAM.
But after IRQ, CPU will try to read $0x7964, which leads to 0 because there is no such RAM. After I force the RAM enable, the game works.


I am not sure if it is caused by the ROM(maybe this is a hacked one). Any advice? May I remove else if (addr < 0x8000) branch in MainBus.cpp and leave every read to m_mapper->readPRG(addr)?
Great find! I think a simpler fix could be to simply always have extended ram available. There's no particular reason to "disable" it I think. I've made some more changes so I'll do the change. This is good work! I can merge this MR if you feel this is in a good state.