libmsx
C library for MSX
Loading...
Searching...
No Matches

Get the system version, VSYNC frequency, etc. More...

+ Collaboration diagram for System configuration:

Macros

#define PAGE_SIZE   (uint16_t)(0x4000)
 MSX Size of a page (16KiB) in bytes.
 
#define PAGE_ADDR(p)   ((void *)(PAGE_SIZE * (p)))
 MSX Constructs base address of the specified page.
 
#define CARTRIDGE_SLOT   (libmsx_initial_slots[1])
 MSX The cartrige slot address.
 

Functions

uint8_t msx_get_version (void)
 MSX Returns MSX system version code.
 
uint8_t msx_get_vsync_frequency (void)
 MSX Returns VSYNC frequency in Hz.
 

Variables

const uint8_t libmsx_initial_slots [4]
 MSX Initial slot addresses for each page.
 

Detailed Description

Get the system version, VSYNC frequency, etc.

Macro Definition Documentation

◆ PAGE_SIZE

#define PAGE_SIZE   (uint16_t)(0x4000)

MSX Size of a page (16KiB) in bytes.

Definition at line 44 of file bios.h.

◆ PAGE_ADDR

#define PAGE_ADDR (   p)    ((void *)(PAGE_SIZE * (p)))

MSX Constructs base address of the specified page.

Parameters
ppage number (0..3)
Returns
base address of the page #p.

Definition at line 52 of file bios.h.

◆ CARTRIDGE_SLOT

#define CARTRIDGE_SLOT   (libmsx_initial_slots[1])

MSX The cartrige slot address.

Definition at line 62 of file bios.h.

Function Documentation

◆ msx_get_version()

uint8_t msx_get_version ( void  )
inline

MSX Returns MSX system version code.

Returns
0 (MSX1), 1 (MSX2), 2 (MSX2+), 3 (MSXturboR), or else.

Definition at line 69 of file bios.h.

◆ msx_get_vsync_frequency()

uint8_t msx_get_vsync_frequency ( void  )
inline

MSX Returns VSYNC frequency in Hz.

Returns
50 (PAL/SECAM), or 60 (NTSC)

Definition at line 78 of file bios.h.

Variable Documentation

◆ libmsx_initial_slots

const uint8_t libmsx_initial_slots[4]
extern

MSX Initial slot addresses for each page.