Build tool/InstallRAMISR
From MSX Game Library
Build tool option InstallRAMISR is used to automatically select RAM in page 0 then copy data there at startup, so ROM cartridge can take advantage of (almost) 16 KB of additional RAM. This option requires MSX to have at least 64 KB of RAM (otherwise, no RAM will be available on page 0).
As page 0 (addresses 0x0000-0x3FFF) is the place where MSX will search for interruption handler (ISR), the build tool will automatically copy the selected ISR (see CustomISR option).
InstallRAMISR can take 3 values:
- RAM0_NONE: Don't switch page 0 to RAM
- RAM0_ISR: Switch page 0 to RAM then install ISR at 0x0038 (mandatory address)
- RAM0_SEGMENT: Switch page 0 to RAM, install ISR at 0x0038 , then copy segment data at 0x0100 (for mapped-ROM)
RAM0_ISR
When using RAM0_ISR option, you have additional RAM of be used from 0x0100 to 0x3FFF. You can use SDCC's __at() directive to place variable in the memory space.
RAM0_SEGMENT
When using RAM0_SEGMENT option, you can define a source code file named {projectName}_p0.c (or .asm) and it will be automatically added to your mapper data and copy at statup in page 0. Code and data from your _p0 file will be available starting from address 0x0100 (after the ISR) so you have a little less than 16 KB available in page 0 (16 KB - 0x100 = 16128 bytes).
_p0 will be place in segment after your main program. Segment number depend of the mapper format your are using:
Mapper | Segments |
---|---|
ASCII-8 | #4 and #5 |
ASCII-16 | #2 |
KONAMI K4 | #4 and #5 |
KONAMI K5 (SCC) | #4 and #5 |
NEO-8 | #6 and #7 |
NEO-16 | #3 |
When you use this option, these segments are reserved for code and data to be copied on page 0 and cannot be used for anything else.