Difference between revisions of "Build tool/BIOSReleaseEvent"

From MSX Game Library

< Build tool

Line 3: Line 3:
 
This applies to [[target]] formats that place the ROM on page 0 (ROM_48K_ISR, ROM_64K_ISR, ROM_NEO8, and ROM_NEO16), as well as ROM formats that place RAM on page 0 (via the [[Build_tool/InstallRAMISR|InstallRAMISR]] option).
 
This applies to [[target]] formats that place the ROM on page 0 (ROM_48K_ISR, ROM_64K_ISR, ROM_NEO8, and ROM_NEO16), as well as ROM formats that place RAM on page 0 (via the [[Build_tool/InstallRAMISR|InstallRAMISR]] option).
  
 +
== Usage ==
 
To use this option, the user must provide a function that will be called by the boot process just before the BIOS is removed from page 0 (to make room for the cartridge or memory).
 
To use this option, the user must provide a function that will be called by the boot process just before the BIOS is removed from page 0 (to make room for the cartridge or memory).
  
 
Function prototype:
 
Function prototype:
 
<syntaxhighlight lang="c">void BIOS_OnRelease();</syntaxhighlight>
 
<syntaxhighlight lang="c">void BIOS_OnRelease();</syntaxhighlight>

Revision as of 12:17, 19 April 2026

Build tool option BIOSReleaseEvent is used to add a callback function to be called just before BIOS is switched out from page 0. It allows you to have an initialization code that runs while the BIOS is still accessible at page 0. For example, to detect the presence of an MSX-Music device using the BIOS routines for cross-slot reading.

This applies to target formats that place the ROM on page 0 (ROM_48K_ISR, ROM_64K_ISR, ROM_NEO8, and ROM_NEO16), as well as ROM formats that place RAM on page 0 (via the InstallRAMISR option).

Usage

To use this option, the user must provide a function that will be called by the boot process just before the BIOS is removed from page 0 (to make room for the cartridge or memory).

Function prototype:

void BIOS_OnRelease();