This wiki is being migrated to http://www.github.com/z88dk/z88dk/wiki

 

MSX LIBRARY (msx.h)

Version all
Header {z88dk}/include/msx.h
Source {z88dk}/libsrc/msx
Include #include <msx.h>
Linking n/a
Compile n/a
Supported MSX, Spectravideo, SC-3000, EINSTEIN
Comments n/a

NOTE: not all the functions are fully supported on all the listed targets

Sound Functions

void msx_initpsg()

Init the PSG (reset sound etc..)

void msx_sound(int reg, int val)

Play a sound by PSG

int msx_readpsg(int regno)

Read the PSG register

Video related functions

void msx_screen(int mode)

Set the screen mode

int msx_screenmode()

Get the screen mode

int msx_vpeek(int address)

VRAM read

void msx_vpoke(int address, int value)

VRAM write

void msx_text()

Switch to text mode

void msx_blank()

Disable screen

void msx_noblank()

Enable screen

int msx_color(int foreground, int background, int border)

Change the MSX color attributes

Color Value
TRANSPARENT 0×00
BLACK 0×01
MEDIUM_GREEN 0×02
LIGHT_GREEN 0×03
DARK_BLUE 0×04
LIGHT_BLUE 0×05
DARK_RED 0×06
CYAN 0×07
MEDIUM_RED 0×08
LIGHT_RED 0×09
DARK_YELLOW 0x0A
LIGHT_YELLOW 0x0B
DARK_GREEN 0x0C
MAGENTA 0x0D
GRAY 0x0E
WHITE 0x0F

Misc functions

int msx_type()

Check if MSX 1 or MSX 2

int msx_vram()

Detect the VRAM size (in KB)

int msx_lpt()

Check if the line printer is ready (1=ready, 0 if not)

int msx_break()

Check if Ctrl-STOP is being pressed (1=if pressed, 0 if not)

void msx_clearkey()

Clear the keyboard buffer

void msx_breakoff()

Disable the CTRL-STOP effect (when a BASIC routine is being called)

void msx_breakon()

Restore the CTRL-STOP break command

 
library/msx.txt · Last modified: 2017/03/25 08:46 by stefano
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki