How do I set up mmc5 prg-rom and chr-rom size?
Moderator: Moderators
- Dreamwriter
- Posts: 35
- Joined: Tue Jun 02, 2015 9:17 pm
- Location: Florida
- Contact:
How do I set up mmc5 prg-rom and chr-rom size?
I'm just getting started on my first NES game, and I've setup my ines header for mmc5 (I have big plans!). All it does right now is play a small song (thanks Famitone) and display a few BG characters (not using any mmc5 features yet). But if I try to setup the details of prg-rom size and chr-rom size in the ines header, emulators (like puNES) won't run my game. If I leave both values at just 1, it works fine, if I try other values like 32 and 16, I get errors loading my game. Am I doing something wrong in how I set things up, do I need to change something about my memory setup? I looked at the ines header for Uncharted Waters (my target cart-size setup), and that's basically the same as my game, so the header doesn't seem to be the issue.
Re: How do I set up mmc5 prg-rom and chr-rom size?
You need to be producing as much data in the assembler as you are declaring in a header, or the ROM will not load correctly.
MMC5 is a very powerful, very expensive chip. What MMC5 features do you plan to use?
- 32 in the PRG size field means 32*16384 = 524288 bytes.
- 16 in the CHR size field means 16*8192 = 131072 bytes.
MMC5 is a very powerful, very expensive chip. What MMC5 features do you plan to use?
- Dreamwriter
- Posts: 35
- Joined: Tue Jun 02, 2015 9:17 pm
- Location: Florida
- Contact:
Re: How do I set up mmc5 prg-rom and chr-rom size?
Thanks, I'll look into that.
I'm used to developing for Gameboy Color, and we used to use scanline DMAs all the time to do crazy scanline effects - reloading palettes, parallax scrolling, reusing sprite OAMs, changing char sets every other scanline for funky effects, things like that. So that's one thing I plan on using MMC5 for, it's apparently really easy the way MMC5 does it. Also the palette-per-tile extended attributes mode makes it a lot closer to a GBC as well. And one thing I really want to do if it is possible is to use the extra sound channels - I'm making a game for a not-quite-pure NES (that has MMC5 support built-in), so I think it might be able to play the extra sound channels without any hardware modifications needed.
I'm used to developing for Gameboy Color, and we used to use scanline DMAs all the time to do crazy scanline effects - reloading palettes, parallax scrolling, reusing sprite OAMs, changing char sets every other scanline for funky effects, things like that. So that's one thing I plan on using MMC5 for, it's apparently really easy the way MMC5 does it. Also the palette-per-tile extended attributes mode makes it a lot closer to a GBC as well. And one thing I really want to do if it is possible is to use the extra sound channels - I'm making a game for a not-quite-pure NES (that has MMC5 support built-in), so I think it might be able to play the extra sound channels without any hardware modifications needed.
- Dreamwriter
- Posts: 35
- Joined: Tue Jun 02, 2015 9:17 pm
- Location: Florida
- Contact:
Re: How do I set up mmc5 prg-rom and chr-rom size?
I researched nes.cfg so I could set up the PRG-ROM bank memory and put the code and vector segments in the final bank in $E000, and that worked nicely - I now have a working 512k MMC5 rom using a couple hundred bytes
Something I don't really get, though:
Mmc5 starts off by default in PRG mode 3, which is 8k banks. But that seems to mean if I wanted to change the PRG mode at startup (say to 32k banks), I'd have to waste the 8k from that mode 3 startup bank - I'd have to boot into that bank so I could tell it to use the other mode, which wouldn't support 8k banks. Am I correct in this, or not seeing how it all really works?
Mmc5 starts off by default in PRG mode 3, which is 8k banks. But that seems to mean if I wanted to change the PRG mode at startup (say to 32k banks), I'd have to waste the 8k from that mode 3 startup bank - I'd have to boot into that bank so I could tell it to use the other mode, which wouldn't support 8k banks. Am I correct in this, or not seeing how it all really works?
Re: How do I set up mmc5 prg-rom and chr-rom size?
Every 32K bank consists of four 8K banks. If you switch to 32K mode and load the last bank, the last 8K of the ROM will still be sitting there in $E000.