TL;DR
Musashi is a portable emulator for Motorola 680×0-series CPUs implemented in ANSI C and hosted on GitHub. It supports multiple 680×0 variants, is designed for portability and speed, and is distributed under a permissive license with configuration hooks for host systems.
What happened
Musashi is an open-source emulation engine for Motorola 680×0 processors, released as version 4.10 and maintained in a public GitHub repository. The codebase implements emulation for a range of CPU types — including the 68000, 68010, 68EC020, 68020, 68EC030, 68030, 68EC040, 68040 and the SCC68070 — and is written to ANSI C89 standards while using inline functions compatible with C9X. The project emphasizes portability and performance; it includes configuration headers and documented callbacks so host programs can supply memory read/write handlers, interrupt acknowledge routines, and function-code handling. Musashi documents configurations for basic setups, more accurate interrupt handling, separate immediate reads, address-space function code emulation, and clock/cycle management. The repository notes successful long-term use in the MAME project and provides a contact email for the author. The code and documentation are available from the GitHub repository URL included in the project README.
Why it matters
- Enables accurate emulation of a widely used historical CPU family for preservation, development and testing.
- Written in portable ANSI C, making it easier to integrate into a wide range of host environments and toolchains.
- Provides configurable hooks (memory callbacks, interrupt acknowledge, function code handling) so emulation can match diverse hardware setups.
- Distributed under a permissive license included in the repository, allowing reuse and modification in other projects.
- Proven in long-running projects such as MAME, indicating maturity and practical interoperability.
Key facts
- Project name: Musashi, version referenced in the repository: 4.10.
- Language and standards: implemented in C (ANSI C89) and uses inline functions compatible with C9X.
- Supported CPU types listed in the repository: 68000, 68010, 68EC020, 68020, 68EC030, 68030, 68EC040, 68040, and SCC68070.
- Repository hosting: available on GitHub (https://github.com/kstenerud/Musashi).
- License: repository carries a permissive copyright notice and permission text allowing use, copy, modification, distribution and sublicensing (license text included in repo).
- Basic integration requires host-implemented memory access functions (m68k_read_memory_8/16/32 and m68k_write_memory_8/16/32) and calling m68k_pulse_reset() before use.
- Execution and interrupt APIs include m68k_execute(), m68k_set_irq(), and optional interrupt acknowledge callbacks when configured.
- Options in m68kconf.h allow enabling separate immediate reads, function-code emulation, and selecting which CPU variants are compiled in.
- Cycle and timeslice management functions are provided (m68k_cycles_run(), m68k_cycles_remaining(), m68k_modify_timeslice(), m68k_end_timeslice()).
- The README notes long-term use of the emulator within the MAME project, indicating practical deployment history.
What to watch next
- Repository activity on GitHub (issues, pull requests, and merged commits) for updates and fixes — the repository shows active PRs and issues.
- Changes to configured CPU support or new CPU feature implementations as contributors update m68kconf.h and related source files.
- not confirmed in the source: formal performance benchmarks or comparative speed/accuracy reports against other 680×0 emulators.
Quick glossary
- Emulator: Software that imitates the behavior of another computing system so programs written for the original system can run on different hardware or environments.
- ANSI C89: A version of the C programming language standardized in 1989; code written to this standard aims for wide portability across C compilers.
- Autovectored interrupt: An interrupt type where the CPU uses a default vector number supplied by the interrupt priority level rather than a device-specific vector provided during an acknowledge cycle.
- Immediate read: A memory fetch for instruction operands or opcodes that is guaranteed to come from program space (often ROM) rather than data space.
- Function code (FC) pins: Hardware signals on some CPU families that indicate which address space (user/supervisor, program/data) is being accessed, used by systems with multiple address spaces.
Reader FAQ
Where can I get Musashi's source code?
The repository is hosted on GitHub at https://github.com/kstenerud/Musashi (link provided in the README).
Which 680×0 CPU models does Musashi emulate?
The project lists support for 68000, 68010, 68EC020, 68020, 68EC030, 68030, 68EC040, 68040 and SCC68070.
What license covers Musashi?
The repository includes a permissive copyright and permission notice granting broad rights to use, modify and distribute the software (full text in the repo).
How do I start using Musashi in a host program?
Implement the required memory read/write callbacks, call m68k_pulse_reset() to initialize the core, then use m68k_execute() to run instructions and m68k_set_irq() to raise interrupts.
Is Musashi used in other projects?
The README states the emulator has been running in the MAME project for years.
kstenerud / Musashi Public Notifications Fork 113 Star 482 Code Issues 41 Pull requests 8 Actions Projects Wiki kstenerud/Musashi master Go to file Code Folders and files Name Last commit…
Sources
- Musashi: Motorola 680×0 emulator written in C
- Musashi/m68kconf.h at master
- Getting started for executing retro emulator-newbie [closed]
Related posts
- Play Aardwolf: Free, Feature-Rich Text RPG Set in Andolor’s World
- LaTeX Coffee Stains (2021 PDF): Notes on the CoffeeStains Package
- A to Z: A road‑trip inspired word game built from a childhood memory