Modules/bios

From MSX Game Library

< Modules

bios

Code: bios.h

Category: Core

Dependencies: None

Samples:

The bios module allow to use the BIOS routines.

Note: No other modules have dependency on this module, thus all the library is BIOS 'free' and can be use without the BIOS ROM selected in page #0.

Usage

To use this module, include "bios.h" in your source code, and add "bios" to the modules list (LibModules) in your project's configuration file (project_config.js).

This module simply wraps the BIOS routines. For its use, please refer to the documents describing BIOS features:

Note: Not all BIOS routines have function in this module to encapsulate them in C (some are of very limited use in games). If you want certain functions to be added, please ask on the MSXgl's Discord Logo.png Discord server.

Samples

See module use cases in the sample programs:

Settings

Library configuration (msxgl_config.h):

// Default slot BIOS access
// - BIOS_CALL_DIRECT ............. Use direct access to Bios routines (ROM slot must be selected in corresponding page)
// - BIOS_CALL_INTERSLOT .......... Use inter-slot access to Bios routines (through CALSLT routine)
#define BIOS_CALL_MAINROM			BIOS_CALL_DIRECT
#define BIOS_CALL_SUBROM			BIOS_CALL_INTERSLOT
#define BIOS_CALL_DISKROM			BIOS_CALL_INTERSLOT

// MAIN-Bios module setting
#define BIOS_USE_MAINROM			TRUE	// Allow use of Main-ROM routines
#define BIOS_USE_VDP				TRUE	// Give access to Main-ROM routines related to VDP
#define BIOS_USE_PSG				TRUE	// Give access to Main-ROM routines related to PSG
#define BIOS_USE_SUBROM				TRUE	// Allow use of Sub-ROM routines (MSX2/2+/turbo R)
#define BIOS_USE_DISKROM			TRUE	// Allow use of Disk-ROM routines

Dependencies

Dependency on other modules: None

Documentation