xv68k
https://www.v68k.org/xv68k/
Introduction
xv68k is a command-line program that runs m68k code in emulation using the v68k library.
xv68k provides several interfaces between the host system and the emulated environment:
- xv68k’s post-option arguments as argv
- native system call bridge
read(),write(),writev()select()getpid(),kill()(self only)nanosleep(),gettimeofday()_exit()
- general-purpose memory allocator (64K blocks)
In addition, xv68k implements minimal Mac OS support for compatibility with Metrowerks runtime code:
- A-line trap dispatcher
- OS and Toolbox trap tables
_NewPtr,_DisposePtr,_BlockMove
xv68k also implements some low memory globals (e.g. Ticks and MemErr), and _Gestalt (defining the 'v68k' selector) so Mac programs can detect whether they’re running in the emulator.
Additional Mac OS support is available by loading the ams-core module:
xv68k -m ams-core screen-test
Compatibility
xv68k’s runtime interface overlaps with that of MacRelix, so the same binaries work in both environments. The differences are:
- xv68k implements way fewer system calls (and those present may be restricted, e.g.
kill()) - Access to the system is default-allow in MacRelix, but default-deny in xv68k
- xv68k maps native callback function addresses into high memory

