Difference between revisions of "Build tool/InstallRAMISR"
From MSX Game Library
Line 7: | Line 7: | ||
* <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 (for mapped-ROM) | ||
+ | |||
+ | == RAM0_SEGMENT == | ||
+ | When using <tt>RAM0_SEGMENT</tt> option, you can define a source code file named <tt>{projectName}_p0.c</tt> (or .asm) and it will be automatically added to your mapper data and copy at statup in page 0. | ||
+ | Code and data from your <tt>_p0</tt> 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). | ||
+ | |||
+ | <tt>_p0</tt> will be place in segment after your main program. Segment number depend of the mapper format your are using: | ||
+ | * ASCII-8, KONAMI K4, KONAMI K5 (with SCC): Segments #4 and #5 | ||
+ | * ASCII-16: Segments #2 | ||
+ | * NEO-8: Segments #6 and #7 | ||
+ | * NEO-16: Segments #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. |
Revision as of 01:20, 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 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 (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:
- ASCII-8, KONAMI K4, KONAMI K5 (with SCC): Segments #4 and #5
- ASCII-16: Segments #2
- NEO-8: Segments #6 and #7
- NEO-16: Segments #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.