Functions to read and write memory
| inline void Poke( |
| ) |
Set a 8-bit value at the given address
| addr u16 | Address to set |
| val u8 | 8-bit value to set |
| inline void Poke16( |
| ) |
Set a 16-bit value at the given address
| addr u16 | Address to set |
| val u16 | 16-bit value to set |
| inline u8 Peek( |
| ) |
Get the 8-bit value at the given address
| addr u16 | Address to get |
8-bit value stored at the given address
| inline u16 Peek16( |
| ) |
Get the 16-bit value at the given address
| addr u16 | Address to get |
16-bit value stored at the given address
Functions to access low level functions
Enable interruption
Disable interruption
Pause the CPU until a new interruption occured
Functions to get information from the system
Get BIOS information (frequency, keyboard type, etc.)
The BIOS information
Get the MSX version
The MSX version (0: MSX1, 1: MSX2, 2: MSX2+, 3: MSX turbo R)
Get the system frequency (from BIOS)
SYS_FERQ_50HZ or SYS_FERQ_60HZ
Get the system frequency (from BIOS)
TRUE if the BIOS is 60 Hz
Get the system frequency (from BIOS)
TRUE if the BIOS is 50 Hz
Functions to call routines
| inline void Call( |
| ) |
Direct call a routine at a given address (generate ASM code: "call XXXX") No extra cost due to calling a C function.
| addr u16 | Address to call |
| inline u8 CallToA( |
| ) |
Direct call a routine at a given address (generate ASM code: "call XXXX") No extra cost due to calling a C function.
| addr u16 | Address to call |
Value stored in register A
| inline void CallA( |
| ) |
Direct call a routine at a given address with a 8-bits parameter in register A (generate ASM code: "call XXXX") No extra cost due to calling a C function.
| addr u16 | Address to call |
| a u8 | Function parameter to put in register A |
| inline u8 CallAToA( |
| ) |
Direct call a routine at a given address with a 8-bits parameter in register A (generate ASM code: "call XXXX") No extra cost due to calling a C function.
| addr u16 | Address to call |
| a u8 | Function parameter to put in register A |
Value stored in register A
| inline void CallL( |
| ) |
Direct call a routine at a given address with a 8-bits parameter in register L (generate ASM code: "call XXXX") No extra cost due to calling a C function.
| addr u16 | Address to call |
| l u8 | Function parameter to put in register L |
| inline u8 CallLToA( |
| ) |
Direct call a routine at a given address with a 8-bits parameter in register L (generate ASM code: "call XXXX") No extra cost due to calling a C function.
| addr u16 | Address to call |
| l u8 | Function parameter to put in register L |
Value stored in register A
| inline void CallHL( |
| ) |
Direct call a routine at a given address with a 16-bits parameter in register HL (generate ASM code: "call XXXX") No extra cost due to calling a C function.
| addr u16 | Address to call |
| val | Function parameter to put in register HL |
| inline u8 CallHLToA( |
| ) |
Direct call a routine at a given address with a 16-bits parameter in register HL (generate ASM code: "call XXXX") No extra cost due to calling a C function.
| addr u16 | Address to call |
| val | Function parameter to put in register HL |
Value stored in register A
| inline u8 CallDriver( |
| ) |
Direct call a routine at a given address with a 8-bits parameter in register A (generate ASM code: "call XXXX") No extra cost due to calling a C function.
| addr u16 | Address of the driver |
| val u8 | 8-bit value to transfer to driver's main function |
Value returned by the driver
Slot handling functions
| u8 Sys_GetPageSlot( |
| ) |
Get the slot ID of a given page
| page u8 | The page to ckeck |
The slot ID
| void Sys_SetPageSlot( |
| ) |
Select a slot in a given page
| page u8 | The page to change |
| slotId u8 | The slot ID to select |
| inline bool Sys_IsSlotExpanded( |
| ) |
Check if slot is expanded
| slot u8 | The slot to check |
FALSE if the slot is not expanded
| void Sys_SetPage0Slot( |
| ) |
Select a given slot in page 0
| slotId u8 | The slot to select |
| inline bool Sys_SlotIsExpended( |
| ) |
Check expended flag from slot ID
| slotId u8 | The slot ID |
FALSE if the slot is not expended
| inline u8 Sys_SlotGetPrimary( |
| ) |
Get primary slot from slot ID
| slotId u8 | The slot ID |
The primary slot of the slot ID
| inline u8 Sys_SlotGetSecondary( |
| ) |
Get secondary slot from slot ID
| slotId u8 | The slot ID |
The secondary slot of the slot ID
| u8 Sys_CheckSlot( |
| ) |
Check all slots with a given callback function
| cb CheckSlotCallback | Callback function to call for each slot |
The slot ID that match the callback function
Binary address functions
Get first address of program binary
The first address of the program binary
Get address of program header (if any)
The address of the program header
Get last address of program binary
The last address of the program binary
Miscellaneous helper functions
Play the click sound
Stop the click sound