This shows you the differences between two versions of the page.
— |
library:msx [2017/03/25 08:46] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== MSX LIBRARY (msx.h) ====== | ||
+ | |||
+ | ^ Version | ||
+ | ^ Header | ||
+ | ^ Source | ||
+ | ^ Include | ||
+ | ^ Linking | ||
+ | ^ Compile | ||
+ | ^ Supported | ||
+ | ^ Comments | ||
+ | |||
+ | |||
+ | 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 | ||
+ | | BLACK | 0x01 | | ||
+ | | MEDIUM_GREEN | 0x02 | | ||
+ | | LIGHT_GREEN | ||
+ | | DARK_BLUE | ||
+ | | LIGHT_BLUE | ||
+ | | DARK_RED | ||
+ | | CYAN | 0x07 | | ||
+ | | MEDIUM_RED | ||
+ | | LIGHT_RED | ||
+ | | DARK_YELLOW | ||
+ | | LIGHT_YELLOW | 0x0B | | ||
+ | | DARK_GREEN | ||
+ | | MAGENTA | ||
+ | | 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 | ||
+ | |||
+ | |||