mirror of
https://github.com/rjanicek/vice.js.git
synced 2025-06-18 16:45:35 -04:00
Versatile Commodore Emulator for JavaScript
emscripten | ||
fs-x64/bin | ||
fs-x128/bin | ||
js | ||
vice | ||
build | ||
build-x64 | ||
build-x128 | ||
build-xvic | ||
GPL.V2 | ||
library-vice.js | ||
README.md |
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