Is there a better way to emulate a fixed slot? #615
-
This is a bit esoteric and hard to explain. The Sega Mapper system maps the first 1024 bytes of the 1st bank at all times, to preserve the interrupt routines. I wish to keep a bunch of important code in this section, while still having access to writing less important code in the other banks at the same spot. Unfortunately, the assembler doesn't like to put a slot that is smaller than the bank size into the bank(which is strange, because I thought the slots were meant to be divisions of the bank and not the other way around.) My current solution is to create a bank the size of the unpaged slot. .MEMORYMAP
DEFAULTSLOT 0
SLOT 0 $0000 $0400 "ROM Unpaged"
SLOT 1 $0400 $3BFF "ROM Slot 0"
SLOT 2 $4000 $3FFF "ROM Slot 1"
SLOT 3 $8000 $3FFF "ROM Slot 2"
SLOT 4 $C000 $1FFF "RAM Slot"
.ENDME
.ROMBANKMAP
BANKSTOTAL 2
BANKSIZE $0400
BANKS 1
BANKSIZE $1C00
BANKS 1
.ENDRO This is not ideal, as it's creating a new bank in the symbol map, and also it is too bulky to reuse that slot for code I don't need access to 24/7. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
While a section inside of a section will not work, I have just discovered that there's a WINDOW directive that I've been missing when reading the documentation. That would solve everything for me. |
Beta Was this translation helpful? Give feedback.
-
Good! Sorry for not replying this sooner, I'm swamped with things to do even on my free time at the moment. :P In WLA terms slots are holes in the memory where ROM/RAM banks appear, so slots are not put into banks, it's the other way around. |
Beta Was this translation helpful? Give feedback.
While a section inside of a section will not work, I have just discovered that there's a WINDOW directive that I've been missing when reading the documentation. That would solve everything for me.