Skip to content

akadata/js68xkjit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mnemonic

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
  • 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.js

Build/run flow:

  • default CPU runner uses cached test/r/*.r artefacts 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
  • J68_CHIP_RAM_SIZE
    • default comes from TestMachine
  • J68_FAST_RAM_SIZE
    • default comes from TestMachine
  • M68K_AS
  • M68K_OBJCOPY

Current stable baseline:

  • ./runtests.sh stays green

  • cd test && node runner.js stays 231/233

  • CALLM and RTM remain 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

Audio

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

About

js68xkjit — 68k CPU core in Node.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors