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

User Tools

Site Tools


library:msx

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

library:msx [2017/03/25 08:46] (current)
Line 1: Line 1:
 +====== MSX LIBRARY (msx.h) ======
 +
 +^ Version    | all                                                                                                             |
 +^ Header     | [[https://raw.githubusercontent.com/z88dk/z88dk/master/include/msx.h|{z88dk}/include/msx.h]]                |
 +^ Source     | [[https://github.com/z88dk/z88dk/tree/master/libsrc/msx/|{z88dk}/libsrc/msx]]                                 |
 +^ Include    | #include <msx.h>                                                                                                |
 +^ Linking    | n/a                                                                                                            |
 +^ Compile    | n/a                                                                                                             |
 +^ Supported  | [[platform:msx|MSX]], [[platform:spectravideo|Spectravideo]], [[platform:sc3000|SC-3000]], [[platform:einstein|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  | 0x00  |
 +| BLACK        | 0x01  |
 +| MEDIUM_GREEN | 0x02  |
 +| LIGHT_GREEN  | 0x03  |
 +| DARK_BLUE    | 0x04  |
 +| LIGHT_BLUE   | 0x05  |
 +| DARK_RED     | 0x06  |
 +| CYAN         | 0x07  |
 +| MEDIUM_RED   | 0x08  |
 +| LIGHT_RED    | 0x09  |
 +| 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 (external edit)