Set the current segment of the given bank
| b | Bank number to set (0-5, depending of the mapper). Must be an inline number (not a variable) |
| s | Segment to select in this bank |
Get the current segment of the given bank
| b | Bank number to get (0-5, depending of the mapper). Must be an inline number (not a variable) |
Segment selected in this bank
Helper inline functions
Enable interruption
Disable interruption
Pause the CPU until a new interruption occured
| 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 |
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 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 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 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 |
| a u8 | Value to transfer to driver's main function |
Slot handling functions
| u8 Sys_GetPageSlot( |
| ) |
Get the slot ID of a given page
| page u8 | The page to ckeck |
| 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 |
| 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 |
| inline u8 Sys_SlotGetPrimary( |
| ) |
Get primary slot from slot ID
| slotId u8 | The slot ID |
| inline u8 Sys_SlotGetSecondary( |
| ) |
Get secondary slot from slot ID
| slotId u8 | The slot ID |
| u8 Sys_CheckSlot( |
| ) |
Check all slots with a given callback function
Binary address functions
Get first address of program binary
Get address of program header (if any)
Get last address of program binary
Miscellaneous helper functions
Play the click sound
Stop the click sound