Difference between revisions of "Modules/bios"

From MSX Game Library

< Modules

(Created page with "The {{MOD|bios}} module allow to use het BIOS routines. Note: No other modules have dependency on this module, thus all the library is BIOS 'free' and can be use without the...")
 
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
The {{MOD|bios}} module allow to use het BIOS routines.
+
{{MODULE
 
+
|name=bios
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.
+
|category=Core
 
+
|image=raw.githubusercontent.com/aoineko-fr/MSXgl/main/engine/doc/img/sample_bios.jpg
== Dependencies ==
+
|dependency1=
* ''None''
+
|dependency2=
 
+
|dependency3=
== Settings ==
+
|sample1=s_bios
* ''None''
+
|sample2=
 
+
|sample3=
== Usage ==
+
}}
 
 
== Annexe ==
 
* See also: Sample program {{SAMPLE|s_bios}}
 
 
 
== Documentation ==
 
{{FRAME_DOC|bios}}
 
 
 
[[category:Module]][[category:Module/Core]]
 

Latest revision as of 22:23, 12 January 2024

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