Difference between revisions of "InstallRAMISR"

From MSX Game Library

 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:
  
 
  :: Set RAM in slot 0 and install ISR there (0=false, 1=true)
 
  :: Set RAM in slot 0 and install ISR there (0=false, 1=true)
  set InstallRAMISR=0
+
  set InstallRAMISR=1
  
 
If <tt>InstallRAMISR</tt> is set to 1, the cartridge boot code will automatically switch page #0 to the same slot as page #3 (where RAM is located), then copy a ISR (Interrupt Service Routine) at address 0038h. This ISR handle VDP's V-Blank interruption (each 50/60 Hz) and call an handler function that program must provide: <tt>void VDP_InterruptHandler();</tt>
 
If <tt>InstallRAMISR</tt> is set to 1, the cartridge boot code will automatically switch page #0 to the same slot as page #3 (where RAM is located), then copy a ISR (Interrupt Service Routine) at address 0038h. This ISR handle VDP's V-Blank interruption (each 50/60 Hz) and call an handler function that program must provide: <tt>void VDP_InterruptHandler();</tt>
Line 8: Line 8:
 
Warnings:
 
Warnings:
 
* This option only work on MSX with at least 64 KB of RAM (otherwise, there is no RAM on page #0).
 
* This option only work on MSX with at least 64 KB of RAM (otherwise, there is no RAM on page #0).
 +
* The ISR is installed from 0038h to 005Eh but it is recommended to don't use the first 256 bytes for future iteration. So, please start using page #0 RAM from 0100h.
 
* Obviously, no BIOS function can be used in this program (unless you reswitched the Main-ROM on page #0 first).
 
* Obviously, no BIOS function can be used in this program (unless you reswitched the Main-ROM on page #0 first).
 +
 +
You can check the [[Samples#Software_Sprite|Software Sprite]] sample program for a use example.

Latest revision as of 01:05, 9 June 2022

This Build tool option allow cartridge program to use page #0 (address 0000h~3FFFh) as RAM. This gives almost 16 KB more memory.

:: Set RAM in slot 0 and install ISR there (0=false, 1=true)
set InstallRAMISR=1

If InstallRAMISR is set to 1, the cartridge boot code will automatically switch page #0 to the same slot as page #3 (where RAM is located), then copy a ISR (Interrupt Service Routine) at address 0038h. This ISR handle VDP's V-Blank interruption (each 50/60 Hz) and call an handler function that program must provide: void VDP_InterruptHandler();

Warnings:

  • This option only work on MSX with at least 64 KB of RAM (otherwise, there is no RAM on page #0).
  • The ISR is installed from 0038h to 005Eh but it is recommended to don't use the first 256 bytes for future iteration. So, please start using page #0 RAM from 0100h.
  • Obviously, no BIOS function can be used in this program (unless you reswitched the Main-ROM on page #0 first).

You can check the Software Sprite sample program for a use example.