Hey,
I want to flash my homebrew to a cartridge, and have successfully run it on a NES-NROM-04 board (hurrah! ^^)
I now want to transplant my program into more NES carts. I am using Shiru's C library https://shiru.untergrund.net/articles/p ... s_in_c.htm, and CC65.
Basically, do I HAVE to stick to NROM boards?
Is there more to changing the game for boards/mappers than editing the .cfg?
Finally, re mirroring, I noticed when I changed the mirroring variables, the game didn't work on emulators. So I'm guessing there is more to that than the config too?
I read that I would have to change crt0.s for both these things, but I haven't been able to find more information than that.
Thank you for any advice you are able to give!
creating CC65 config files for homebrew with mappers
Moderator: Moderators
- rainwarrior
- Posts: 8062
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: creating CC65 config files for homebrew with mappers
No.lexicobob wrote:Basically, do I HAVE to stick to NROM boards?
Yes. Much more.lexicobob wrote:Is there more to changing the game for boards/mappers than editing the .cfg?
The linker CFG is not equivalent to an NES board. It is merely a ROM layout and memory organization tool.
What you want to do in the CFG has to do with what your program needs, and how it needs to be laid out in memory. The mapper is a big part of this, but so are a lot of other factors that are specific to your own program.
Lastly, there is no CC65 language support for banking. The easiest thing to do is have C code appear in only one bank, and anything that runs in another bank can just be handled with assembly code.
Re: creating CC65 config files for homebrew with mappers
As long as you stick with a mapper that only supports with 32 KiB of PRG, using CC65 with it is very easy (for reasons that Rainwarrior pointed out)
Unfortunately, there are only a few that natively work like that: NROM, CNROM (mapper 3), CPROM (mapper 13), Sunsoft 1 (mapper 184)
There's a few more that have a trivially constant and unambiguous definitions when only given 32 KiB of PRG, such as NINA-001 (mapper 34), Napoleon Senki (mapper 77), and Oeka Kids. (mapper 96).
As long as you stick with 32 KiB of PRG, and you modify crt0, you could easily use almost any mapper. This same technique will even let you use 40 KiB of PRG on FME-7 (mapper 69).
Finally, there's the NROM-368 proposal, which will give you 46 KiB of PRG space without having to do anything.
Unfortunately, there are only a few that natively work like that: NROM, CNROM (mapper 3), CPROM (mapper 13), Sunsoft 1 (mapper 184)
There's a few more that have a trivially constant and unambiguous definitions when only given 32 KiB of PRG, such as NINA-001 (mapper 34), Napoleon Senki (mapper 77), and Oeka Kids. (mapper 96).
As long as you stick with 32 KiB of PRG, and you modify crt0, you could easily use almost any mapper. This same technique will even let you use 40 KiB of PRG on FME-7 (mapper 69).
Finally, there's the NROM-368 proposal, which will give you 46 KiB of PRG space without having to do anything.
Re: creating CC65 config files for homebrew with mappers
Anything with a 32K bankswitching mode has an unambiguous definition when only 32K of PRG ROM is available. This includes A*ROM, if you want two separate planes of 1-screen mirroring, and MMC1, if you want switchable mirroring (and are comfortable with early init code being in asm).