cc65 - 32KiB PRG banks and segments

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

User avatar
rainwarrior
Posts: 8731
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: cc65 - 32KiB PRG banks and segments

Post by rainwarrior »

NOOPr wrote:But it have a drawback: each bank will going to have data from segment "CODE" from every other bank
Use #pragma code-name, data-name, bss-name, and you can decide what segment each goes in.
User avatar
NOOPr
Posts: 75
Joined: Tue Feb 27, 2018 10:41 am
Location: Brazil
Contact:

Re: cc65 - 32KiB PRG banks and segments

Post by NOOPr »

rainwarrior wrote:
NOOPr wrote:But it have a drawback: each bank will going to have data from segment "CODE" from every other bank
Use #pragma code-name, data-name, bss-name, and you can decide what segment each goes in.
You cannot do this for data imported from runtime.lib
User avatar
rainwarrior
Posts: 8731
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: cc65 - 32KiB PRG banks and segments

Post by rainwarrior »

That's true but it is the only thing that has to use those segments, so you can place the runtime where it is needed in your .cfg and for all other code send it to other segments.
Post Reply