Versatile Commodore Emulator for JavaScript
Go to file
2013-12-02 19:14:00 -05:00
emscripten -updated to Emscripten 1.7.8 2013-12-02 19:14:00 -05:00
fs-x64/bin -added C-128 2013-08-06 17:50:35 -04:00
fs-x128/bin -added C-128 2013-08-06 17:50:35 -04:00
js -updated to Emscripten 1.7.8 2013-12-02 19:14:00 -05:00
vice -added initial files 2013-07-16 21:20:14 -04:00
build -added C-128 2013-08-06 17:50:35 -04:00
build-x64 -updated to Emscripten 1.7.8 2013-12-02 19:14:00 -05:00
build-x128 -updated to Emscripten 1.7.8 2013-12-02 19:14:00 -05:00
build-xvic -added C-128 2013-08-06 17:50:35 -04:00
GPL.V2 -added initial files 2013-07-16 21:20:14 -04:00
library-vice.js -added initial files 2013-07-16 21:20:14 -04:00
README.md -updated to Emscripten 1.7.8 2013-12-02 19:14:00 -05:00

VICE.js

Versatile Commodore Emulator for JavaScript

JavaScript port of VICE 2.4 using Emscripten.

Website -> http://vice.janicek.co
VICE -> http://sourceforge.net/projects/vice-emu/
Emscripten -> https://github.com/kripken/emscripten

Status

  • Firefox 25 - ok
    • -o3 -> 100 second asm.js compile time
  • Firefox 28 - sound clicks
  • Chrome 31 - slow
  • Chrome 33 - ok
  • IE 11 - broken
    • Typed array constructor argument is invalid

Tasks

  • fix joystick
  • Gamepad API
  • try using worker thread (emcc --proxy-to-worker)
  • add other computers
    • VIC-20
  • fix vice menu ui (F12)
  • fix IE

Example

<!doctype html>
<html lang="en-us">
    <head></head>
    <body>
        <!-- the canvas *must not* have any border or padding, or mouse coords will be wrong -->
        <canvas  id="canvas" style="border: 0px none;"></canvas>
        <script type="text/javascript" >
            var Module = {
                arguments: ['+sound'],
                canvas: document.getElementById('canvas'),
            };
        </script>
        <script type="text/javascript" src="js/x64.js"></script>
    </body>
</html>

Best Configuration Options

async mode:

  • soundfragsize 2 -soundrate 22050 -soundsync 0

sync mode:

  • soundfragsize 2 -soundrate 22050 -soundsync 0 -ntsc
  • ntsc is important because browser requestAnimationFame is going to deliver 60 fps which means less cpu time is wasted during vsync delay

Resources

C64 Wiki
Commodore 64 keyboard matrix layout
COMMODORE 64 ROGRAMMER'S REFERENCE GUIDE
Commodore Manuals
Coroutines in C
requestAnimationFrame setting fps
SDL 1.2 to 2.0 Migration Guide
VICE Manual