| void BIOS_Exit( |
| ) |
Handle clean exit form Basic or MSX-DOS environment
| ret u8 | Return value (for MSX-DOS environment) |
| inline void BIOS_SetKeyClick( |
| ) |
Enable or disable key click
| enable bool | TRUE to enable and FALSE to disable |
Get MSX generation version
MSXVER_1 (0) for MSX1.
MSXVER_2 (1) for MSX2.
MSXVER_2P (2) for MSX2+.
MSXVER_TR (3) for MSX turbo R.
Tests RAM and sets RAM slot for the system. Wrapper for CHKRAM routine.
| u8 BIOS_InterSlotRead( |
| ) |
Reads the value of an address in another slot. Wrapper for RDSLT routine.
| void BIOS_InterSlotWrite( |
| ) |
Writes a value to an address in another slot. Wrapper for WRSLT routine.
| void BIOS_InterSlotCall( |
| ) |
Executes inter-slot call. Wrapper for CALSLT routine.
| void BIOS_SwitchSlot( |
| ) |
Switches to specified slot and page definitively. Wrapper for ENASLT routine.
Executes an interslot call. Wrapper for CALLF routine.
Inhibits the screen display. Wrapper for DISSCR routine.
Displays the screen. Wrapper for ENASCR routine.
Display or disable the screen.
| void BIOS_WriteVDP( |
| ) |
Writes data in the VDP-register. Wrapper for WRTVDP routine.
| inline u8 BIOS_ReadVDP( |
| ) |
Reads data from the VDP-register.
| inline u8 BIOS_ReadVRAM( |
| ) |
Reads the content of VRAM. Wrapper for RDVRM routine.
| void BIOS_WriteVRAM( |
| ) |
Writes data in VRAM. Wrapper for WRTVRM routine.
| inline void BIOS_SetAddressForRead( |
| ) |
Enables VDP to read. Wrapper for SETRD routine.
| inline void BIOS_SetAddressForWrite( |
| ) |
Enables VDP to write. Wrapper for SETWRT routine.
| void BIOS_FillVRAM( |
| ) |
Fills VRAM with value. Wrapper for FILVRM routine.
| void BIOS_CopyVRAMtoRAM( |
| ) |
Block transfer to memory from VRAM. Wrapper for LDIRMV routine.
| void BIOS_CopyRAMtoVRAM( |
| ) |
Block transfer to VRAM from memory. Wrapper for LDIRVM routine.
| inline void BIOS_SetScreenMode( |
| ) |
Switches to given screen mode. Wrapper for CHGMOD routine.
| inline void BIOS_SetColor( |
| ) |
Set screen colors.
| inline void BIOS_ApplyColor( |
| ) |
Changes the screen colors. Wrapper for CHGCLR routine.
| inline void BIOS_ApplyBorder( |
| ) |
Changes the screen colors. Wrapper for CHGCLR routine.
| inline void BIOS_SetWidth40( |
| ) |
Switches to SCREEN 0 (text screen with 40*24 characters). Wrapper for INITXT routine.
| inline void BIOS_InitScreen0Color( |
| ) |
Switches to SCREEN 0 (text screen with 40*24 characters). Wrapper for INITXT routine.
| inline void BIOS_InitScreen0Ex( |
| ) |
Switches to SCREEN 0 (text screen with 40*24 characters). Wrapper for INITXT routine.
Switches VDP in SCREEN 0 mode. Wrapper for SETTXT routine.
| inline void BIOS_SetWidth32( |
| ) |
Switches to SCREEN 1 (text screen with 32*24 characters). Wrapper for INIT32 routine.
| inline void BIOS_InitScreen1Color( |
| ) |
Switches to SCREEN 1 (text screen with 32*24 characters). Wrapper for INIT32 routine.
| inline void BIOS_InitScreen1Ex( |
| ) |
Switches to SCREEN 1 (text screen with 32*24 characters). Wrapper for INIT32 routine.
Switches VDP in SCREEN 1 mode. Wrapper for SETT32 routine.
Switches to SCREEN 2 (high resolution screen with 256*192 pixels). Wrapper for INIGRP routine.
| inline void BIOS_InitScreen2Color( |
| ) |
Switches to SCREEN 2 (high resolution screen with 256*192 pixels). Wrapper for INIGRP routine.
| inline void BIOS_InitScreen2Ex( |
| ) |
Switches to SCREEN 2 (high resolution screen with 256*192 pixels). Wrapper for INIGRP routine.
Switches VDP to SCREEN 2 mode. Wrapper for SETGRP routine.
Switches to SCREEN 3 (multi-color screen 64*48 pixels). Wrapper for INIMLT routine.
| void BIOS_InitScreen3Ex( |
| ) |
Switches to SCREEN 3 (multi-color screen 64*48 pixels). Wrapper for INIMLT routine.
Switches VDP to SCREEN 3 mode. Wrapper for SETMLT routine.
Initialises all sprites.
| inline void BIOS_SetSpriteMode( |
| ) |
Set sprite size (8x8 or 16x16) and magnification mode (x1 or x2).
| size u8 | Sprite size (BIOS_SPRITE_SIZE_8 or BIOS_SPRITE_SIZE_16) |
| mag u8 | Sprite magnification (BIOS_SPRITE_MAG_1 or BIOS_SPRITE_MAG_2) |
| u16 BIOS_GetSpritePatternAddress( |
| ) |
Returns the address of the sprite pattern table. Wrapper for CALPAT routine.
| id u8 | Sprite pattern number [0:255] of 8x8 size and [0:63] of 16x16 size) |
VRAM address of the sprite pattern table for the given sprite number
| u16 BIOS_GetSpriteAttributeAddress( |
| ) |
Returns the address of the sprite attribute table. Wrapper for CALATR routine.
| id u8 | Sprite attribute number [0:31] |
VRAM address of the sprite attribute table for the given sprite number
| inline void BIOS_SetSpritePosition( |
| ) |
Set the position of a sprite on the screen.
| id u8 | Sprite attribute number [0:31] |
| x u8 | Horizontal position of the sprite [0:255] |
| y u8 | Vertical position of the sprite [0:255] |
| inline void BIOS_SetSpritePattern( |
| ) |
Set the pattern of a sprite.
| id u8 | Sprite attribute number [0:31] |
| pat u8 | Sprite pattern number [0:255] |
| inline void BIOS_SetSpriteColor( |
| ) |
Set the color of a sprite.
| id u8 | Sprite attribute number [0:31] |
| color u8 | Sprite color [0:15] |
| inline void BIOS_SetSprite( |
| ) |
Set sprite attributes.
| id u8 | Sprite attribute number [0:31] |
| x u8 | Horizontal position of the sprite [0:255] |
| y u8 | Vertical position of the sprite [0:255] |
| pat u8 | Sprite pattern number [0:255] |
| color u8 | Sprite color [0:15] |
| inline void BIOS_SetSpriteData( |
| ) |
Set a sprite attributes.
| id u8 | Sprite attribute number [0:31] |
| attrs const BIOS_SpriteAttributes* | Pointer to a 4-bytes array containing the sprite attributes (y, x, pattern and color) |
Returns current sprite size in bytes (8 or 32). Wrapper for GSPSIZ routine.
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).
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).
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).
| inline void BIOS_GraphSetCursor( |
| ) |
Moves graphical cursor to the specified position.
| inline void BIOS_GraphPrintChar( |
| ) |
Displays a character on the graphic screen. Wrapper for GRPPRT routine.
| inline void BIOS_GraphPrint( |
| ) |
Displays a string on the graphic screen. Wrapper for GRPPRT routine.
| inline void BIOS_GraphPrintAt( |
| ) |
Displays a string on the graphic screen. Wrapper for GRPPRT routine.
| inline void BIOS_GraphSetOperator( |
| ) |
Changes the operator used for graphical print.
Initialises PSG and sets initial value for the PLAY statement. Wrapper for GICINI routine.
GICINI
Address : #0090
Function : Initialises PSG and sets initial value for the PLAY statement
Registers: All
Remarks : Interrupts must be disabled to call this routine
| void BIOS_WritePSG( |
| ) |
Writes data to PSG-register. Wrapper for WRTPSG routine.
WRTPSG
Address : #0093
Function : Writes data to PSG register
Input : A - PSG register number
E - Data write
Remarks : See https://www.msx.org/wiki/SOUND#Registers_Description
| reg u8 | PSG register number (0-15) |
| value u8 | Value to write in the PSG register |
| inline u8 BIOS_ReadPSG( |
| ) |
Reads value from PSG-register. Wrapper for RDPSG routine.
RDPSG
Address : #0096
Function : Reads value from PSG register
Input : A - PSG register read
Output : A - Value read
| reg u8 | PSG register number (0-15) |
Value read from the PSG register
Tests whether the PLAY statement is being executed as a background task. Wrapper for STRTMS routine.
STRTMS
Address : #0099
Function : Tests whether the PLAY statement is being executed as a background
task. If not, begins to execute the PLAY statement
Registers: All
One character input (waiting). Wrapper for CHGET routine.
Get a character input (if any) or return 0.
| void BIOS_TextSetCursor( |
| ) |
Moves cursor to the specified position. Wrapper for POSIT routine.
| inline void BIOS_TextPrintChar( |
| ) |
Displays one character. Wrapper for CHPUT routine.
| inline void BIOS_TextPrint( |
| ) |
Displays a null-terminated string.
| inline void BIOS_TextPrintAt( |
| ) |
Print a text at the specified position
Generates beep. Wrapper for BEEP routine.
Clears the screen. Wrapper for CLS routine.
| inline u8 BIOS_GetJoystickDirection( |
| ) |
Returns the state of the joystick or the cursor keys. Wrapper for GTSTCK routine.
| port u8 | Joystick number to be tested: |
0 = Cursor keys
1 = Joystick on port 1
2 = Joystick on port 2
Direction of the joystick or function keys (0-8):
8 1 2
\ | /
7 - 0 - 3
/ |'\'
6 5 4
| inline bool BIOS_GetJoystickTrigger( |
| ) |
Returns the state of the mouse, joystick or keyboard space bar buttons. Wrapper for GTTRIG routine.
| trigger u8 | Trigger button to test: |
0 = space bar
1 = port 1, button A
2 = port 2, button A
3 = port 1, button B
4 = port 2, button B
FALSE if trigger button is not pressed
| inline u8 BIOS_GetTouchPad( |
| ) |
Returns the touch pad status. Wrapper for GTPAD routine.
| entry u8 | Function call number. Fetch device data first, then read: |
MSX1:
0 = Fetch touch pad data from port 1 (#FF if available)
1 = Read X-position
2 = Read Y-position
3 = Read touchpad status from port 1 (#FF if pressed
4 = Fetch touch pad data from port 2 (#FF if available)
5 = Read X-position
6 = Read Y-position
7 = Read touchpad status from port 2 (#FF if pressed)
MSX2/2+/turbo R:
8 = Fetch light pen data (#FF if available)
9 = Read X-position
10 = Read Y-position
11 = Read light pen status (#FF if pressed)
12 = Fetch mouse data from port 1 (#FF if available)
13 = Read X-position
14 = Read Y-position
15 = Read mouse button status from port 1 (#FF if pressed)
16 = Fetch mouse data from port 2 (#FF if available)
17 = Read X-position
18 = Read Y-position
19 = Read mouse button status from port 2 (#FF if pressed)
Value depending on entry parameter
| inline u8 BIOS_GetPaddle( |
| ) |
Returns the paddle position. Wrapper for GTPDL routine.
| num u8 | Paddle number (1-12): |
Paddle | Port1 | Port2
-------+-------+-------
A | 1 | 2
B | 3 | 4
C | 5 | 6
D | 7 | 8
E | 9 | 10
F | 11 | 12
Paddle position [0:255]
| inline u8 BIOS_GetKeyboardMatrix( |
| ) |
Returns the value of the specified line from the keyboard matrix. Wrapper for SNSMAT routine.
| inline bool BIOS_IsKeyPressed( |
| ) |
Check if the given key is pressed
| inline void BIOS_SetCPUMode( |
| ) |
Changes CPU mode. Wrapper for CHGCPU routine.
Returns current CPU mode. Wrapper for GETCPU routine.