GithubHelp home page GithubHelp logo

tomsoftware / dbopl Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 1.0 68 KB

DBOPL - Typescript porting of DosBox Adlib OPL3 Emulator

License: GNU General Public License v3.0

HTML 1.09% PHP 1.11% TypeScript 97.81%
opl-emulator adlib typescript-port opl3-emulator opl3 dos javascript-port opl dosbox

dbopl's Introduction

OPL 3 Emulator

This is a Typescript-Port (not a cross compile) of the "dbopl.cpp"/"adlib.h",... Adlib OPL3 Emulator original written by "dosbox team"

Why

There are some cross compiled versions of the DOSBox OPL emulator using Emscripten Compiler Frontend (emcc) and WebAssembly. But, these cross compiled versions are big, slow and not easy to integrate into a TypScript application. So I decided to create a port of the C++ DOSBox OPL emulator to use it in my Lemmings.ts project. Cause of this some changes need to be made.

  • replacing C++ templates by methods
  • handling crazy address jumping
  • fix type mismatch between c++ and Typescript

License of the original code written by "dosbox team"

GNU General Public License OPL emulator: Copyright 2002-2015 The DOSBox Team

DosBox

Test.js is used from

[opljs]https://github.com/Malvineous/opljs)

Run

open test.html

Use

	/// create emulator
    let opl = new DBOPL.OPL(audioCtx.sampleRate, 2);
	
	/// write register
	opl.write(reg, val);
	
	/// generate samples / wave
	let samples = opl.generate(sampelCount);

Deploy

you only need the alib.js file

License of this port

Cause the original is "GNU General Public License" this port is also "GNU General Public License"

dbopl's People

Contributors

tomsoftware avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.