gameboy-rust/docs/references.md
0xrsydn 16286e0cbd feat(timing): break CPU sequential access after DMA
Retain one pending non-sequential resume after successful DMA. Apply it to the next nominal non-refill code access and consume it only on successful CPU or IRQ progress. Preserve failed-step atomicity, host and idle isolation, existing refill costs, and WAITCNT ordering.

Add 13 original regressions for ARM/Thumb widths, ROM wait settings, sources, preemption, retries, mixed APIs, idle states, and interrupt timing. Record pinned hardware-test source and emulator evidence without claiming physical-hardware or full-pipeline conformance.

Validated on Darwin arm64: 952 workspace and 883 core/demo tests per debug/release profile, 39 Python tests, native ROM windows, ten window smoke modes, fmt, clippy, and rustdoc. Public ARM/Thumb/memory/BIOS reports remain unchanged.
2026-10-06 03:16:52 +07:00

20 KiB

References

External sources consulted while implementing the emulator. Add new sources here, or in a "References" section of the matching docs/hardware/ file when a link explains one specific behavior.

Hardware references used for the core:

BIOS protected-read root-cause research:

  • Smolka Progress Report #6, for firmware-dependent protected reads and the Ruby/Sapphire null-pointer case; the report distinguishes Emerald.
  • mGBA: Cracking the GBA BIOS, for BIOS access protection and replacement-versus-external firmware approaches.
  • Cult-of-GBA BIOS, reviewed for original boot, SWI, and IRQ exit layout and its MIT license. No source or binary was copied.
  • mGBA BIOS implementation, for the explicit post-SWI biosPrefetch compatibility value.
  • no$gba BIOS FAQ, for the distinction between simulated firmware services and using a firmware image.

See the root-cause analysis and implementation decision.

Thumb BIOS fetch research:

See Thumb BIOS prefetch snapshots for the inference, implementation limits, and original regressions.

IWRAM lane-history research:

See IWRAM Thumb bus history. These were source reviews, not local hardware or external-emulator test runs.

IWRAM refill research:

These sources support bounded refill sampling, not a claim of cycle-accurate pipeline or DMA behavior.

DMA data-latch research:

See DMA data-latch findings. Source review is not a local hardware-test pass.

DMA IWRAM continuation research:

  • jgenesis bus at fab6e2cc, for DMA read/write dispatch through the same lane-retaining IWRAM helpers as CPU accesses. Its DMA controller and memory storage distinguish channel data from local bus lanes.
  • The pinned ares DMA, bus dispatch, and IWRAM helpers above independently use the same local lane ownership.

See the bounded DMA continuation extension. These source reviews do not establish sub-instruction arbitration, exact CPU resume timing, or hardware conformance.

DMA resume-timing research:

  • NanoBoyAdvance force-nseq-access test at cc3f4a28, for equal timer expectations after RAM-source and ROM-source DMA sequences.
  • The pinned NanoBoyAdvance bus and ares DMA/bus implementations above explicitly break sequential CPU access after DMA ownership.

See non-sequential CPU resume for the nominal subset and unmodeled refill/prefetch details. The public test was reviewed, not executed. No hardware timing pass is claimed.

Use GBATEK and ARM7TDMI documentation for further hardware work. Only use game ROMs that you may lawfully use. Do not commit game ROMs, BIOS files, or game assets. The ignore file excludes roms/, common game ROM extensions, and save files.