gameboy-rust/docs/references.md

22 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 persistent IWRAM bus history. The pinned ares helpers also support state-independent local ownership: they do not gate updates on the executing PC or CPU state. The pinned NanoBoyAdvance loop/refill helpers below support driving actual new samples, without replaying retained instruction slots. 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 DMA local-lane 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.

ARM/Thumb instruction-buffer research:

  • ARM7TDMI instruction pipeline and technical reference manual, for fetch/decode/execute stages and the visible ARM/Thumb PC offsets.
  • The pinned NanoBoyAdvance ARM7TDMI Run, ReloadPipeline32, and ReloadPipeline16 helpers above, for retained instructions, pre-execution fetching, and target-pair refill order.
  • The ARM branch cycle sequence above, for target and target+instruction-width fetches.
  • ARM Thumb branch-with-link timing, for sequential prefix execution and suffix target refill.

See persistent ARM instruction buffering and its Thumb extension. Instruction retention and supported bus snapshots now use shared fetch samples. That refactor reuses the pinned NanoBoyAdvance loop/refill and ares local-lane evidence above. Complete bus history and per-access timing remain incomplete; no new hardware conformance result is claimed.

Fetch-region boundary research:

  • The pinned ares getBus and IWRAM helpers above, for address-based dispatch, local lane updates, and the full pre-shift bus value.
  • ares OAM reads at 6f6786e0, for full aligned words before CPU halfword selection.
  • The pinned jgenesis bus above, for width-dependent general-bus updates and IWRAM's complete local word driving open bus.
  • The nocash open-bus discussion above, revisited through a boundary-focused web search. It documents region formulas, not a dedicated boundary hardware test.

See fetch-region boundary findings for source agreement, implementation differences, and retained diagnostics. No physical-hardware or external-emulator differential result 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.