Skip to content

suzukiplan/tinymsx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TinyMSX

TinyMSX is a multi-emulator core library for C/C++ that supports following game consoles:

  • SG-1000
  • TSUKUDA ORIGINAL Othello MultiVision
  • MSX1 16KB or 32KB cartridge games
  • MSX1 ASCII-8 MegaRom cartridge games
  • MSX1 ASCII-8 MegaRom + SRAM(8K) cartridge games
SG-1000 Othello MultiVision MSX1
SG-1000 OTHELLO MSX1

How to use

Basic usage

#include "tinymsx.h"
    // Create an instance
    TinyMSX msx(TINYMSX_TYPE_MSX1, rom, romSize, ramSize, TINYMSX_COLOR_MODE_RGB555);

    // Load main BIOS of MSX1
    msx.loadBiosFromFile("/path/to/main-bios.rom");

    // Reset
    msx.reset();

    // Execute 1 frame
    msx.tick(0, 0);

    // Get display buffer (256 x 192 x 2 bytes)
    unsigned short* display = msx.getDisplayBuffer();

    // Get and clear the buffered audio data (44.1Hz/16bit/2ch) by tick execution.
    size_t soundSize;
    void* soundBuffer = msx.getSoundBuffer(&soundSize);

    // State save (quick save)
    size_t stateSize;
    const void* stateData = msx.saveState(&stateSize);

    // State load (quick load)
    msx.loadState(stateData, stateSize);

Example

License

MIT

About

Multiple Emulator for MSX1 cartridge (16KB or 32KB) games, SG-1000, Othello MultiVision

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published