The core source tree is organized by Jaguar hardware ownership. Keep mechanical file moves separate from behavior changes so emulator fixes stay easy to review and bisect.
libretro.cowns the libretro API entry points, core options, input polling, serialization glue, cheats, and per-frame execution handoff.Makefile.commonis the source list used by the main Makefile and Android NDK build. Update it whenever a C file is added, moved, or removed.
src/core/contains system orchestration, the memory map, event scheduling, settings, file helpers, cheats, memory tracking, MMU helpers, and save-state support shared by multiple chips.src/tom/contains TOM-side hardware: video timing, Object Processor, GPU, Blitter, and Blitter SIMD implementations.src/jerry/contains JERRY-side hardware: DSP, DAC/audio pipeline, EEPROM, input/joystick handling, and wavetable data.src/cd/contains Jaguar CD/BUTCH register emulation and the disc-interface abstraction.src/bios/contains embedded BIOS and boot stub arrays. These are data-heavy generated/static inputs, not regular refactor targets.src/m68000/contains the UAE-derived 68K CPU core. Most files here are generated or upstream-derived and should remain isolated.
- Preserve C89/GNU89 compatibility: declarations stay at the top of each block.
- Keep public interfaces in subsystem headers and private cross-file state in
small
*_internal.hheaders scoped to one subsystem. - Prefer one concern per commit: source moves, build updates, and logic changes should not be mixed unless the build cannot remain green otherwise.
- When adding a new C file, update
Makefile.commonand the manual MSVC source list in.github/workflows/c-cpp.yml. - After source layout changes, run
make lint, a clean native build, and the focused unit tests for the touched subsystem.
src/tom/blitter.ccontains the active Blitter implementation and Oberon-derived hardware logic.src/tom/blitter_mmio.ccontains Blitter lifecycle, register reads/writes, and command dispatch.src/tom/blitter_compare.ccontains comparison-mode diagnostics used when validating fast Blitter behavior against the accurate implementation.src/tom/blitter_simd_*.ccontains SIMD acceleration for selected data-path operations.