Fantasy ISA VM

This is unfinished! Notable missing features are an assembler and a way of loading programs other than the built-in demo.


Assembler (not functional)

Instruction Set Spec

Memory Map for this Virtual Machine

Address Name Comment
$0000 Reset Vector
$0000-$7EFF ROM
$7F00-$7FFF I/O Space
$8000-$EFFF RAM
$F000-$FFFF Video RAM Fixed-palette 64x64 4-bit bitmap
I/O Registers
$7F00 Monitor UART Read/write, reading pops ASCII keycode from internal FIFO
$7F10 Audio voice 1 Pan/Volume Left nibble is pan, 0X for left, FX for right, and 8X for center
$7F11 Audio voice 2 Pan/Volume
$7F12 Audio voice 3 Pan/Volume
$7F13 Audio voice 4 Pan/Volume
$7F14-$7F17 Reserved Might be used later for voice waveforms
$7F18 Audio voice 1 Frequency Hertz, in 12-4 fixed point
$7F1A Audio voice 2 Frequency
$7F1C Audio voice 3 Frequency
$7F1E Audio voice 4 Frequency

Source Files

These source files are all public domain. Feel free to take, modify, or rehost them; No credit required. Please let me know if you make something cool with them!
Read more here.

index.html: Debugger interface
glue.js: Debugger glue and memory mapping
vm.js: CPU emulator
snd.js: Voice chip emulator
asm.js: Assembler