Helper
Bios_Exit
void Bios_Exit(
u8 ret
)

Handle clean exit form Basic or MSX-DOS environment

Parameters
ret
u8

Return value (for MSX-DOS environment)

Bios_SetKeyClick
inline void Bios_SetKeyClick(
bool enable
)

Enable or disable key click

Parameters
enable
bool

TRUE to enable and FALSE to disable

Bios_GetMSXVersion
inline u8 Bios_GetMSXVersion()

Get MSX generation version

Return
Main-ROM - Core
Bios_Startup
inline void Bios_Startup()

Tests RAM and sets RAM slot for the system.  Wrapper for CHKRAM routine.

Bios_InterSlotRead
u8 Bios_InterSlotRead(
u8 slot,
u16 addr
)

Reads the value of an address in another slot.  Wrapper for RDSLT routine.

Bios_InterSlotWrite
void Bios_InterSlotWrite(
u8 slot,
u16 addr,
u8 value
)

Writes a value to an address in another slot.  Wrapper for WRSLT routine.

Bios_InterSlotCall
void Bios_InterSlotCall(
u8 slot,
u16 addr
)

Executes inter-slot call.  Wrapper for CALSLT routine.

Bios_SwitchSlot
void Bios_SwitchSlot(
u8 page,
u8 slot
)

Switches to specified slot and page definitively.  Wrapper for ENASLT routine.

BIOS_CALLF

Executes an interslot call.  Wrapper for CALLF routine.

Main-ROM - Init
Main-ROM - VDP
Bios_DisableScreen
inline void Bios_DisableScreen()

Inhibits the screen display. Wrapper for DISSCR routine.

Bios_EnableScreen
inline void Bios_EnableScreen()

Displays the screen. Wrapper for ENASCR routine.

Bios_WriteVDP
void Bios_WriteVDP(
u8 reg,
u8 value
)

Writes data in the VDP-register. Wrapper for WRTVDP routine.

Bios_ReadVRAM
inline u8 Bios_ReadVRAM(
u16 addr
)

Reads the content of VRAM. Wrapper for RDVRM routine.

Bios_WriteVRAM
void Bios_WriteVRAM(
u16 addr,
u8 value
)

Writes data in VRAM. Wrapper for WRTVRM routine.

Bios_SetAddressForRead
inline void Bios_SetAddressForRead(
u16 addr
)

Enables VDP to read. Wrapper for SETRD routine.

Bios_SetAddressForWrite
inline void Bios_SetAddressForWrite(
u16 addr
)

Enables VDP to write. Wrapper for SETWRT routine.

Bios_FillVRAM
void Bios_FillVRAM(
u16 addr,
u16 length,
u8 value
)

Fills VRAM with value. Wrapper for FILVRM routine.

Bios_TransfertVRAMtoRAM
void Bios_TransfertVRAMtoRAM(
u16 vram,
u16 ram,
u16 length
)

Block transfer to memory from VRAM. Wrapper for LDIRMV routine.

Bios_TransfertRAMtoVRAM
void Bios_TransfertRAMtoVRAM(
u16 ram,
u16 vram,
u16 length
)

Block transfer to VRAM from memory. Wrapper for LDIRVM routine.

Bios_ChangeMode
inline void Bios_ChangeMode(
u8 screen
)

Switches to given screen mode. Wrapper for CHGMOD routine.

Bios_ChangeColor
void Bios_ChangeColor(
u8 text,
u8 back,
u8 border
)

Changes the screen colors. Wrapper for CHGCLR routine.

Bios_InitScreen0
inline void Bios_InitScreen0()

Switches to SCREEN 0 (text screen with 40*24 characters). Wrapper for INITXT routine.

Bios_InitScreen0Ex
void Bios_InitScreen0Ex(
u16 pnt,
u16 pgt,
u8 width,
u8 text,
u8 bg,
u8 border
)

Switches to SCREEN 0 (text screen with 40*24 characters). Wrapper for INITXT routine.

Bios_InitScreen1
inline void Bios_InitScreen1()

Switches to SCREEN 1 (text screen with 32*24 characters). Wrapper for INIT32 routine.

Bios_InitScreen1Ex
void Bios_InitScreen1Ex(
u16 pnt,
u16 ct,
u16 pgt,
u16 sat,
u16 sgt,
u8 text,
u8 bg,
u8 border
)

Switches to SCREEN 1 (text screen with 32*24 characters). Wrapper for INIT32 routine.

Bios_InitScreen2
inline void Bios_InitScreen2()

Switches to SCREEN 2 (high resolution screen with 256*192 pixels). Wrapper for INIGRP routine.

Bios_InitScreen2Ex
void Bios_InitScreen2Ex(
u16 pnt,
u16 ct,
u16 pgt,
u16 sat,
u16 sgt,
u8 text,
u8 bg,
u8 border
)

Switches to SCREEN 2 (high resolution screen with 256*192 pixels). Wrapper for INIGRP routine.

Bios_InitScreen3
inline void Bios_InitScreen3()

Switches to SCREEN 3 (multi-color screen 64*48 pixels). Wrapper for INIMLT routine.

Bios_InitScreen3Ex
void Bios_InitScreen3Ex(
u16 pnt,
u16 ct,
u16 pgt,
u16 sat,
u16 sgt,
u8 text,
u8 bg,
u8 border
)

Switches to SCREEN 3 (multi-color screen 64*48 pixels). Wrapper for INIMLT routine.

Bios_SetScreen0
inline void Bios_SetScreen0()

Switches VDP in SCREEN 0 mode. Wrapper for SETTXT routine.

Bios_SetScreen1
inline void Bios_SetScreen1()

Switches VDP in SCREEN 1 mode. Wrapper for SETT32 routine.

Bios_SetScreen2
inline void Bios_SetScreen2()

Switches VDP to SCREEN 2 mode. Wrapper for SETGRP routine.

Bios_SetScreen3
inline void Bios_SetScreen3()

Switches VDP to SCREEN 3 mode. Wrapper for SETMLT routine.

Bios_GetPatternTableAddress
u16 Bios_GetPatternTableAddress(
u8 id
) __FASTCALL

Returns the address of the sprite pattern table. Wrapper for CALPAT routine.

Bios_GetAttributeTableAddress
u16 Bios_GetAttributeTableAddress(
u8 id
) __FASTCALL

Returns the address of the sprite attribute table. Wrapper for CALATR routine.

Bios_GetSpriteSize
inline u8 Bios_GetSpriteSize()

Returns current sprite size. Wrapper for GSPSIZ routine.

Bios_GraphPrintChar
inline void Bios_GraphPrintChar(
u8 chr
)

Displays a character on the graphic screen. Wrapper for GRPPRT routine.

Bios_GraphPrintCharEx
void Bios_GraphPrintCharEx(
u8 chr,
u16 x,
u8 y,
u8 color,
u8 op
)

Displays a character on the graphic screen. Wrapper for GRPPRT routine.

Bios_IsSpriteCollision
inline bool Bios_IsSpriteCollision()

Returns FALSE if no collision occured during the previous frame, otherwise returns S00_C.  This function use value of VDP status register S#0 that BIOS backup in RAM (STATFL).

Bios_IsSpriteOverScan
inline bool Bios_IsSpriteOverScan()

Returns FALSE if no over-scan occured during the previous frame (more than 4/8 sprites on the same line), otherwise returns S00_5S.  This function use value of VDP status register S#0 that BIOS backup in RAM (STATFL).

Bios_GetSpriteOverScanId
inline u8 Bios_GetSpriteOverScanId()

Returns index of the over-scaned sprite (5th/8th sprite on line). Value is in 0-31 range.  This function use value of VDP status register S#0 that BIOS backup in RAM (STATFL).

Main-ROM - PSG
Bios_InitPSG
inline void Bios_InitPSG()

Initialises PSG and sets initial value for the PLAY statement. Wrapper for GICINI routine.

Bios_WritePSG
void Bios_WritePSG(
u8 reg,
u8 value
)

Writes data to PSG-register. Wrapper for WRTPSG routine.

Bios_ReadPSG
inline u8 Bios_ReadPSG(
u8 reg
)

Reads value from PSG-register. Wrapper for RDPSG routine.

Bios_PlayPSG
inline void Bios_PlayPSG()

Tests whether the PLAY statement is being executed as a background task. Wrapper for STRTMS routine.

Main-ROM - Console
Bios_GetCharacter
inline c8 Bios_GetCharacter()

One character input (waiting). Wrapper for CHGET routine.

Bios_HasCharacter
u8 Bios_HasCharacter() __FASTCALL

Get a character input (if any) or return 0.

Bios_TextPrintChar
inline void Bios_TextPrintChar(
c8 chr
)

Displays one character. Wrapper for CHPUT routine.

Bios_TextPrintSting
inline void Bios_TextPrintSting(
const c8* str
)

Displays a null-terminated string.

Bios_Beep
inline void Bios_Beep()

Generates beep. Wrapper for BEEP routine.

Bios_ClearScreen
void Bios_ClearScreen()

Clears the screen. Wrapper for CLS routine.

Bios_SetCursorPosition
void Bios_SetCursorPosition(
u8 X,
u8 Y
)

Moves cursor to the specified position. Wrapper for POSIT routine.

Main-ROM - Controller
Bios_GetJoystickDirection
inline u8 Bios_GetJoystickDirection(
u8 port
)

Returns the joystick status. Wrapper for GTSTCK routine.

Bios_GetJoystickTrigger
inline bool Bios_GetJoystickTrigger(
u8 trigger
)

Returns current trigger status. Wrapper for GTTRIG routine.

Main-ROM - Misc
Bios_GetKeyboardMatrix
inline u8 Bios_GetKeyboardMatrix(
u8 line
)

Returns the value of the specified line from the keyboard matrix. Wrapper for SNSMAT routine.

Bios_IsKeyPressed
inline bool Bios_IsKeyPressed(
u8 key
)

Check if the given key is pressed

Main-ROM - MSX2
Main-ROM - MSX2+
Main-ROM - MSX turbo R
Bios_SetCPUMode
inline void Bios_SetCPUMode(
u8 mode
)

Changes CPU mode. Wrapper for CHGCPU routine.

Bios_GetCPUMode
inline u8 Bios_GetCPUMode()

Returns current CPU mode. Wrapper for GETCPU routine.