js68xkjit — a 68k CPU and test computer platform in Node.js.
Originally built around the j68 CPU core created by Takashi Toyoshima https://github.com/toyoshim/j68k
This project has since grown into a broader bring-up, monitor, test, and CPU validation platform around that base.
A small virtual Motorola 68k test computer built around the j68k CPU core and now includes Audio playback, video is next on the menu
This project is a bring-up machine, not a full Amiga implementation. The focus is:
- reset and vector behavior
- ROM/RAM/MMIO integration
- UART-backed machine-code monitor
- small guest programs loaded from the monitor
- deterministic system tests around exceptions, IRQs, and monitor workflows
Current project shape:
src/j68.js- CPU core
src/machine/- machine, bus, memory map, devices
src/monitor/- monitor shell, tiny assembler/disassembler, commands
rom/- monitor and test ROMs
source/- monitor-loadable assembly source for
loadasm
- monitor-loadable assembly source for
save/- compiled binaries and saved monitor artifacts
work/programs/- host-assembled standalone 68k programs and guest-side helper libraries
test/system/- machine and monitor integration tests
Quick start:
./runtests.sh
cd test && node runner.js
node tools/monitor.jsBuild/run flow:
- default CPU runner uses cached
test/r/*.rartefacts and rebuilds only missing outputs:cd test && node runner.js
- explicit source rebuild path for CPU tests:
cd test && node runner.js --from-source
- explicit clean + full CPU test rebuild:
cd test && node runner.js --clean --rebuild-all
- direct CPU test artefact maintenance:
cd test && node build.js --rebuild-missing cd test && node build.js --rebuild-all cd test && node build.js --clean --rebuild-all
- monitor startup uses cached generated ROM binaries by default:
node tools/monitor.js
- explicit monitor ROM rebuild from source:
node tools/monitor.js --from-source
Generated ROM binaries are cached under build/generated/m68k/.
Typical monitor flow:
list
load 00090000 puthex.bin
g 00090000
source
loadasm 00090000 helloworld.asm
g 00090000
Environment:
J68_CPU_TYPE- default:
68000
- default:
J68_CHIP_RAM_SIZE- default comes from
TestMachine
- default comes from
J68_FAST_RAM_SIZE- default comes from
TestMachine
- default comes from
M68K_ASM68K_OBJCOPY
Current stable baseline:
-
./runtests.shstays green -
cd test && node runner.jsstays231/233 -
CALLMandRTMremain explicitly deferred -
Passed: 231/233
-
Failed: 0/231
-
Deferred: 2/233
deferred invalid smoke test: 2
r/callm.r [deferred invalid smoke test]: CALLM requires a valid module descriptor and transfer target; this local smoke test points A0 at the program image r/rtm.r [deferred invalid smoke test]: RTM requires a saved module state on the stack from a prior CALLM
Yes we can now play Audio, its a little choppy and raw however this is a machine code demo, its not polished
./startmonitor.sh
j68
j68> loadasm 00090000 axelf.asm
j68> g 00090000
Is that not Axel F and is that not just fitting for a 68000 CPU