Here's something I want to know for CC65 and Board Types
Moderator: Moderators
- scythe&gengames
- Posts: 6
- Joined: Wed Dec 12, 2018 11:29 am
Here's something I want to know for CC65 and Board Types
Okay let's say I made a iNes mapper to be SLROM 256 with 128K of CHR and PRG and how does CC65 know what type of board you did on the header like SLROMs and compile it into the .nes rom file?
This may be left unanswered due to thinking this is a dumb question to ask - I'm basically try my hand of learning 6502 ASM to get into the retro days of NES Programming so I can use the Board type I'll need for my games and have fun learning many types of boards.
This may be left unanswered due to thinking this is a dumb question to ask - I'm basically try my hand of learning 6502 ASM to get into the retro days of NES Programming so I can use the Board type I'll need for my games and have fun learning many types of boards.
Re: Here's something I want to know for CC65 and Board Types
The first of two things you will need is a mapper support library to handle basic initialization, bank switching, interbank subroutine calls, and the like. This is one or more assembly language source code files.
The second is a linker script for the combination of bank count, bank size, and pseudo-fixed banks (such as MMC1 reset code). In addition to the MEMORY areas for ROM, it'll need to have forty MEMORY areas for ROM, one for each of eight 16 KiB PRG banks and one for each of thirty-two 4 KiB CHR banks. It'll also need SEGMENTs to put things in those MEMORY areas: at least two per PRG bank, one to place most of the data and a roughly 16-byte stub at the end of all banks to hold the beginning of the initialization code before the first bankswitch.
I've made most of this for SNROM, which should cover everything but CHR ROM banking. Has someone else adapted it to SLROM?
The second is a linker script for the combination of bank count, bank size, and pseudo-fixed banks (such as MMC1 reset code). In addition to the MEMORY areas for ROM, it'll need to have forty MEMORY areas for ROM, one for each of eight 16 KiB PRG banks and one for each of thirty-two 4 KiB CHR banks. It'll also need SEGMENTs to put things in those MEMORY areas: at least two per PRG bank, one to place most of the data and a roughly 16-byte stub at the end of all banks to hold the beginning of the initialization code before the first bankswitch.
I've made most of this for SNROM, which should cover everything but CHR ROM banking. Has someone else adapted it to SLROM?
- scythe&gengames
- Posts: 6
- Joined: Wed Dec 12, 2018 11:29 am
Re: Here's something I want to know for CC65 and Board Types
So where CC65 keeps the library of these Mappers so I can try out using SLROM or a good board without the MMC chip- I just wish to use the Remaining PRG banks if I have plenty to add in a complex soundtrack if not I'll go for a larger mappertepples wrote:The first of two things you will need is a mapper support library to handle basic initialization, bank switching, interbank subroutine calls, and the like. This is one or more assembly language source code files.
The second is a linker script for the combination of bank count, bank size, and pseudo-fixed banks (such as MMC1 reset code). In addition to the MEMORY areas for ROM, it'll need to have forty MEMORY areas for ROM, one for each of eight 16 KiB PRG banks and one for each of thirty-two 4 KiB CHR banks. It'll also need SEGMENTs to put things in those MEMORY areas: at least two per PRG bank, one to place most of the data and a roughly 16-byte stub at the end of all banks to hold the beginning of the initialization code before the first bankswitch.
I've made most of this for SNROM, which should cover everything but CHR ROM banking. Has someone else adapted it to SLROM?
Re: Here's something I want to know for CC65 and Board Types
If a comprehensive set of already-made mapper libraries for each combination of mapper, PRG ROM size, and CHR ROM size exists, I am not aware of it. I doubt one exists. You will need to make one yourself or request that one be made for you.
In order that I may gauge how much you would need to learn before attempting this project: Have you completed any cc65 or ca65 based projects previously?
In order that I may gauge how much you would need to learn before attempting this project: Have you completed any cc65 or ca65 based projects previously?
- scythe&gengames
- Posts: 6
- Joined: Wed Dec 12, 2018 11:29 am
Re: Here's something I want to know for CC65 and Board Types
just installed it as I'll have to find ASM on Youtube for nes may be my chance to create a NES game using pure ASM once I know how it's donetepples wrote:If a comprehensive set of already-made mapper libraries for each combination of mapper, PRG ROM size, and CHR ROM size exists, I am not aware of it. I doubt one exists. You will need to make one yourself or request that one be made for you.
In order that I may gauge how much you would need to learn before attempting this project: Have you completed any cc65 or ca65 based projects previously?
Re: Here's something I want to know for CC65 and Board Types
If you haven't done any assembly language programming for the NES, I encourage you to make your first project without a mapper, for the NROM board.
Re: Here's something I want to know for CC65 and Board Types
I wrote some cfg files for ca65 for various mappers, but I can't recall which ones (away from computer).
http://dl.dropboxusercontent.com/s/0m4p ... xm/CFG.zip
One of these might be SLROM.
http://dl.dropboxusercontent.com/s/0m4p ... xm/CFG.zip
One of these might be SLROM.
Last edited by dougeff on Thu Dec 13, 2018 3:09 am, edited 1 time in total.
nesdoug.com -- blog/tutorial on programming for the NES
Re: Here's something I want to know for CC65 and Board Types
Like mentioned, mappers is hardware and the compiler doesn't know about that. The header will define which mapper you targetted so the emulator will know how to parse your rom.
This mean you need to understand how to rom data need to be prepared for this mapper and create a memory map for it.
It's sound difficult at first but it will get clearer the more you play with it. Since you are started, like mentioned, the first tests should be to program without mapper and see how it work. Once this is fine, you can start with simple ones.
This mean you need to understand how to rom data need to be prepared for this mapper and create a memory map for it.
It's sound difficult at first but it will get clearer the more you play with it. Since you are started, like mentioned, the first tests should be to program without mapper and see how it work. Once this is fine, you can start with simple ones.
- scythe&gengames
- Posts: 6
- Joined: Wed Dec 12, 2018 11:29 am
Re: Here's something I want to know for CC65 and Board Types
I see MMC1_128_128.cfg which could mean SLROMdougeff wrote:I wrote some cfg files for ca65 for various mappers, but I can't recall which ones (away from computer).
http://dl.dropboxusercontent.com/s/0m4p ... xm/CFG.zip
One of the might be SLROM.
What about using Easy 6502 site? that can help a lot too to understand 6502 and boom NES programmingBanshaku wrote:Like mentioned, mappers is hardware and the compiler doesn't know about that. The header will define which mapper you targetted so the emulator will know how to parse your rom.
This mean you need to understand how to rom data need to be prepared for this mapper and create a memory map for it.
It's sound difficult at first but it will get clearer the more you play with it. Since you are started, like mentioned, the first tests should be to program without mapper and see how it work. Once this is fine, you can start with simple ones.
Re: Here's something I want to know for CC65 and Board Types
Yes, this site is very interesting if you want to learn how the 6502 works. From that, it should be easier to work with the nes