Modules/system/Usage

From MSX Game Library

< Modules‎ | system

Some examples:

Sys_StopClickSound(); // Stop keyboard "click" sound

DisableInterrupt();   // Disable interruption. ISR will not been called event is interruption signal is set
// Code you don't want to be interrupted
EnableInterrupt();    // Restore interruption

while(1)
{
	Halt(); // Wait for signal (should be screen synchronization)
	// Code to be synchronized at 50/60 Hz
}

Example for mapped ROM (for a 8K mapper):

u8 prevSeg = GET_BANK_SEGMENT(3); // Backup previous segment number in bank #3 (for mapper ROM)
SET_BANK_SEGMENT(3, 10);          // Set segment #10 in bank #3
// Here you can access to segment #10 data at addresses A000~BFFFh
SET_BANK_SEGMENT(3, prevSeg);     // Restore the previous segment number in bank #3