Difference between revisions of "Build tool/InstallRAMISR"
From MSX Game Library
Line 6: | Line 6: | ||
* <tt>RAM0_NONE</tt>: Don't switch page 0 to RAM | * <tt>RAM0_NONE</tt>: Don't switch page 0 to RAM | ||
* <tt>RAM0_ISR</tt>: Switch page 0 to RAM then install ISR at 0x0038 (mandatory address) | * <tt>RAM0_ISR</tt>: Switch page 0 to RAM then install ISR at 0x0038 (mandatory address) | ||
− | * <tt>RAM0_SEGMENT</tt>: Switch page 0 to RAM, install ISR at 0x0038 , then copy segment data (for mapped-ROM) | + | * <tt>RAM0_SEGMENT</tt>: Switch page 0 to RAM, install ISR at 0x0038 , then copy segment data at 0x0100 (for mapped-ROM) |
== RAM0_SEGMENT == | == RAM0_SEGMENT == |
Revision as of 01:24, 3 December 2024
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.
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_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.