Skip to content

Commit 50a0463

Browse files
committed
test(gb-test-runner): add turtle-tests report
1 parent de49cbf commit 50a0463

13 files changed

Lines changed: 106 additions & 9 deletions

crates/gb-test-runner/data/reports.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,14 @@ id = "little-things-gb"
8080
store_dir = "little-things-gb"
8181
sources = "little-things-gb/sources.report.toml"
8282

83+
[[report]]
84+
id = "turtle-tests"
85+
store_dir = "turtle-tests"
86+
sources = "turtle-tests/sources.report.toml"
87+
family_order = [
88+
"turtle-tests",
89+
]
90+
8391
[[report]]
8492
id = "nitro2k01"
8593
store_dir = "nitro2k01"

crates/gb-test-runner/data/rom-reports-pages.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@
1212
{ "name": "mbc3-tester" },
1313
{ "name": "nitro2k01", "boot_roms": true },
1414
{ "name": "little-things-gb" },
15+
{ "name": "turtle-tests" },
1516
{ "name": "magen" }
1617
]
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
[[source]]
2+
id = "game-boy-test-roms"
3+
archive_url = "https://github.com/c-sp/game-boy-test-roms/releases/download/v7.0/game-boy-test-roms-v7.0.zip"
4+
archive_sha256 = "b9a9d7a1075aa35a3d07c07c34974048672d8520dca9e07a50178f5860c3832c"
5+
archive_format = "zip"
6+
7+
[[source.family]]
8+
id = "turtle-tests"
9+
target_root = "turtle-tests"
10+
11+
[[source.family.file]]
12+
path = "turtle-tests/window_y_trigger/window_y_trigger.gb"
13+
target = "window_y_trigger/window_y_trigger.gb"
14+
sha256 = "c844be570060efeab721e8a8e160f518e4295ca46e47e55f5083a181a5dc4fe8"
15+
16+
[[source.family.file]]
17+
path = "turtle-tests/window_y_trigger/window_y_trigger.png"
18+
target = "window_y_trigger/window_y_trigger.png"
19+
sha256 = "5ccea69d275ca538aac535e56da47fcac394bd1a7fc48da27c98774c77d3466f"
20+
21+
[[source.family.file]]
22+
path = "turtle-tests/window_y_trigger_wx_offscreen/window_y_trigger_wx_offscreen.gb"
23+
target = "window_y_trigger_wx_offscreen/window_y_trigger_wx_offscreen.gb"
24+
sha256 = "6eeae0e54a083f0b84cc136f72c0f926bbb9bbe8194faeb8735d6f4a9d88e021"
25+
26+
[[source.family.file]]
27+
path = "turtle-tests/window_y_trigger_wx_offscreen/window_y_trigger_wx_offscreen.png"
28+
target = "window_y_trigger_wx_offscreen/window_y_trigger_wx_offscreen.png"
29+
sha256 = "cbca426b18a00730fec2d4bc54f164414a8beea22e0bf66efbaff6fc77391819"
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
family = "turtle-tests"
2+
suite_name = "turtle-tests-window-y-trigger-wx-offscreen"
3+
report = "turtle-tests"
4+
model = "dmg"
5+
timeout_frames = 30
6+
oracle = { type = "framebuffer", mode = "until-match" }
7+
8+
[[case]]
9+
id = "turtle-tests-window-y-trigger-wx-offscreen"
10+
rom = "window_y_trigger_wx_offscreen/window_y_trigger_wx_offscreen.gb"
11+
oracle = { fixture = "window_y_trigger_wx_offscreen/window_y_trigger_wx_offscreen.png" }
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
family = "turtle-tests"
2+
suite_name = "turtle-tests-window-y-trigger"
3+
report = "turtle-tests"
4+
model = "dmg"
5+
timeout_frames = 30
6+
oracle = { type = "framebuffer", mode = "until-match" }
7+
8+
[[case]]
9+
id = "turtle-tests-window-y-trigger"
10+
rom = "window_y_trigger/window_y_trigger.gb"
11+
oracle = { fixture = "window_y_trigger/window_y_trigger.png" }

crates/gb-test-runner/src/suite/test/cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ fn run_requires_report_and_lists_available_reports() {
117117
assert!(output.is_empty());
118118
assert_eq!(
119119
error,
120-
"test ROM report must be provided; available reports: gb-emulator-shootout, docboy, gbmicrotest, acid, ashiepaws, blargg, mooneye, little-things-gb, nitro2k01, magen, mealybug-tearoom-tests, samesuite, wilbertpol, rtc3test, mbc3-tester, linked"
120+
"test ROM report must be provided; available reports: gb-emulator-shootout, docboy, gbmicrotest, acid, ashiepaws, blargg, mooneye, little-things-gb, turtle-tests, nitro2k01, magen, mealybug-tearoom-tests, samesuite, wilbertpol, rtc3test, mbc3-tester, linked"
121121
);
122122
}
123123

crates/gb-test-runner/src/suite/test/manifest.rs

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1777,6 +1777,23 @@ fn real_standalone_extra_report_manifests_load_new_runner_oracles() {
17771777
"little-things-gb",
17781778
)][..],
17791779
),
1780+
(
1781+
"turtle-tests",
1782+
&[
1783+
(
1784+
"turtle-tests-window-y-trigger",
1785+
1,
1786+
"turtle-tests",
1787+
"turtle-tests",
1788+
),
1789+
(
1790+
"turtle-tests-window-y-trigger-wx-offscreen",
1791+
1,
1792+
"turtle-tests",
1793+
"turtle-tests",
1794+
),
1795+
][..],
1796+
),
17801797
(
17811798
"acid",
17821799
&[
@@ -2068,6 +2085,24 @@ fn real_standalone_extra_report_manifests_load_new_runner_oracles() {
20682085
assert_eq!(cgb.hardware_revision, gb_core::HardwareRevision::CpuCgbD);
20692086
assert_eq!(cgb.report_rom(), "rtc3test.gb (GBC)");
20702087
}
2088+
if report_id == "turtle-tests" {
2089+
for suite_name in [
2090+
"turtle-tests-window-y-trigger",
2091+
"turtle-tests-window-y-trigger-wx-offscreen",
2092+
] {
2093+
let suites = load_selected_suites(&workspace, report, Some(suite_name), None)
2094+
.unwrap_or_else(|error| panic!("{suite_name} should load: {error}"));
2095+
let suite = &suites[0];
2096+
assert!(suite.cases.iter().all(|case| {
2097+
case.console_model == gb_core::ConsoleModel::GameBoy
2098+
&& case.hardware_revision == gb_core::HardwareRevision::DmgCpuC
2099+
&& case.startup_mode == gb_core::StartupMode::SkipBoot
2100+
&& case.timeout_frames == 30
2101+
&& !case.report_model_suffix
2102+
&& matches!(&case.oracle, Oracle::Framebuffer(_))
2103+
}));
2104+
}
2105+
}
20712106
if report_id == "mbc3-tester" {
20722107
let suites = load_selected_suites(&workspace, report, Some("mbc3-tester"), None)
20732108
.expect("mbc3-tester suite should load");

docs/EXECUTION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This file owns the day-to-day implementation workflow: how to choose authority d
2020
- [`docs/TESTING.md`](TESTING.md) owns validation policy; [`docs/info/ROM-SUITES.md`](info/ROM-SUITES.md) owns external ROM materialization, report channels, and runner commands.
2121
- [`docs/REFERENCES.md`](REFERENCES.md) owns the current consultation order for Pan Docs, AntonioND, Gekkio, GBEmulatorShootout, DocBoy, and other active references.
2222
- `crates/gb-test-runner/data/reports.toml` and each report-local `sources.report.toml` own report fetch metadata for `cargo rom-fetch`, `cargo rom-suite`, and `cargo rom-suite-link`; update those files rather than documenting ad hoc source lists elsewhere. Local reports such as `linked` deliberately omit `sources.report.toml` because their assets are committed under `crates/gb-test-runner/data/<report>/`.
23-
- `/test/gb-emulator-shootout/`, `/test/docboy/`, `/test/gbmicrotest/`, and standalone exploratory report roots such as `/test/mooneye/`, `/test/little-things-gb/`, `/test/magen/`, `/test/mealybug-tearoom-tests/`, `/test/samesuite/`, `/test/wilbertpol/`, `/test/rtc3test/`, or `/test/mbc3-tester/` are generated/local evidence channels; keep before/after copies when the mandatory external-ROM regression workflow applies.
23+
- `/test/gb-emulator-shootout/`, `/test/docboy/`, `/test/gbmicrotest/`, and standalone exploratory report roots such as `/test/mooneye/`, `/test/little-things-gb/`, `/test/turtle-tests/`, `/test/magen/`, `/test/mealybug-tearoom-tests/`, `/test/samesuite/`, `/test/wilbertpol/`, `/test/rtc3test/`, or `/test/mbc3-tester/` are generated/local evidence channels; keep before/after copies when the mandatory external-ROM regression workflow applies.
2424

2525
## Change policy
2626

docs/REFERENCES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ Consult primary documentation and hardware research before emulator source code.
2929
- [gb-cycle GBEmulatorShootout fork dashboard](https://pakitovic.github.io/GBEmulatorShootout/) — project-facing summary of the current gb-cycle counted rows.
3030
- [blargg test ROMs](https://github.com/retrio/gb-test-roms) — CPU, timing, memory, OAM, and DMG/CGB sound ROMs, currently consumed through the curated GBEmulatorShootout source path rather than a direct retrio checkout.
3131
- [Mooneye GB](https://github.com/Gekkio/mooneye-gb) — acceptance, boot, CPU/interrupt/timer/DMA, serial, and model-specific executable tests plus documentary reasoning.
32-
- [c-sp/game-boy-test-roms](https://github.com/c-sp/game-boy-test-roms) — release-ZIP aggregate used for archive-backed Blargg, Mooneye, GBMicrotest, Wilbertpol, standalone SameSuite, standalone rtc3test, and standalone mbc3-tester channels, including independently pinned ROM and fixture hashes.
32+
- [c-sp/game-boy-test-roms](https://github.com/c-sp/game-boy-test-roms) — release-ZIP aggregate used for archive-backed Blargg, Mooneye, GBMicrotest, Wilbertpol, standalone SameSuite, standalone rtc3test, standalone turtle-tests, and standalone mbc3-tester channels, including independently pinned ROM and fixture hashes.
3333
- [dmg-acid2](https://github.com/mattcurrie/dmg-acid2), [cgb-acid2](https://github.com/mattcurrie/cgb-acid2), and Acid-family CGB hardening ROMs — framebuffer-oracle visual PPU references.
3434
- [mealybug-tearoom-tests](https://github.com/mattcurrie/mealybug-tearoom-tests) — DMG/CGB PPU timing and LCD pipeline framebuffer-oracle rows.
3535
- [SameSuite](https://github.com/LIJI32/SameSuite) — CGB APU, DMA, palette/PPU, and SGB command/multiplayer executable tests.
3636
- [MagenTests](https://github.com/alloncm/MagenTests) — official source/release origin for Magen CGB priority, HDMA, KEY0, PPU-off STAT, and MBC out-of-bounds SRAM executable tests.
3737
- [docboy-test-suite](https://github.com/Docheinstein/docboy-test-suite/) and [docboy repository](https://github.com/Docheinstein/docboy) — large high-precision DMG/CGB/linked-session ROM corpus and a structural implementation cross-check for timing-sensitive behavior.
38-
- GBEmulatorShootout/DocBoy/c-sp/MagenTests-sourced family names actively used by manifests include `acid`, `ashiepaws`, `ax6`, `blargg`, `cpp`, `daid`, `gbmicrotest`, `little-things-gb`, `magen`, `mealybug-tearoom-tests`, `mooneye`, `samesuite`, `wilbertpol`, `mbc3-tester`, `rtc3test` report families `basic-tests`, `range-tests`, and `sub-second-writes`, `docboy-dmg`, `docboy-cgb`, `docboy-cgb-dmg`, and `docboy-cgb-dmg-ext`; pinned source revisions, archive hashes, or file-base release asset URLs plus file hashes for report-local cargo lanes live in `crates/gb-test-runner/data/reports.toml` plus each report-local `sources.report.toml`; linked-session manifests use the report-local `*.link.suite.toml` model and share the same report registry.
38+
- GBEmulatorShootout/DocBoy/c-sp/MagenTests-sourced family names actively used by manifests include `acid`, `ashiepaws`, `ax6`, `blargg`, `cpp`, `daid`, `gbmicrotest`, `little-things-gb`, `magen`, `mealybug-tearoom-tests`, `mooneye`, `samesuite`, `turtle-tests`, `wilbertpol`, `mbc3-tester`, `rtc3test` report families `basic-tests`, `range-tests`, and `sub-second-writes`, `docboy-dmg`, `docboy-cgb`, `docboy-cgb-dmg`, and `docboy-cgb-dmg-ext`; pinned source revisions, archive hashes, or file-base release asset URLs plus file hashes for report-local cargo lanes live in `crates/gb-test-runner/data/reports.toml` plus each report-local `sources.report.toml`; linked-session manifests use the report-local `*.link.suite.toml` model and share the same report registry.
3939

4040
## Open-source emulator consultation tier
4141

docs/TODO.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ PPU hardening toward a hardware-true engine (post PR #245): the sprite Mode 3 pe
2121
- [PPU][MODE3-OBSERVATION-TABLES] Mid-line register-write landing on sprite lines is still resolved through per-sprite-`x`/`scx` phase-fitted tables (`PpuMode3ObservedLcdc3PhaseTable`, `Lcdc4PhaseTable`, `Lcdc2ObjSizePhaseTable`, `ScyObjPhaseTable` in `helpers/mode3_policies.rs`; the window-activation tilemap masks in `mode3/window.rs`; the `SCX` coarse-bit refetch gating) which PR #245 refit to the corrected schedule rather than deriving from the fetcher. Evidence: mealybug DMG + CGB-compat suites are green. Superseded direction: do not extend these tables for new cases. Highest-value next step: once [MODE3-FETCHER-LEAD] is fixed, resolve tilemap / tile-data / `SCY` / tile-select at the actual fetch dots and delete the tables.
2222
- [PPU][MODE0-PUBLISH-HALT-GRID] The steady-frame published-`STAT` Mode 0 boundary override gated on `scx == 0 || Mode 0 IRQ enabled`, plus the Mode 0 halt-wake deferral table (CGB-family all `SCX` low bits, DMG-family `SCX&7` in `{1,2,5,6}`), compensate a measured 1-4 T-cycle offset between the halt-dispatch and nop-dispatch grids — wilbertpol `intr_2_mode0_timing_sprites_nops` measures on post-LCD-enable frames, mooneye halt variants on steady frames. Superseded direction: never refit sprite penalties (PR #245 froze them hardware-true). Highest-value next step: a uniform halt-wake dispatch convention plus recalibrated Mode 0 / Mode 2 pretrigger apertures, validated against SameBoy/DocBoy.
2323
- [PPU][MODE3-SCY-OBJ-PHASE-POLICY] `m3_scy_change.gb` is green through `PpuMode3ScyObjPhasePolicy` plus `PpuMode3ObservedScyObjPhaseTable`; if a stronger oracle resolves the exact BG/OBJ handoff phase, replace the observed-table ranges with direct shared BG/OBJ fetcher arbitration rather than extending the table.
24-
- [PPU][WINDOW-GLITCH-ORACLE] The active window ROM block is green (`m3_window_timing`, `m3_window_timing_wx_0`, `m3_lcdc_win_en_change_multiple*`, `m3_wx_*`), but stricter hardware/oracle evidence is still missing for `WX = 0`, `WX = 166`, `WX`/`WY`, and `LCDC.5` mid-frame glitches, especially `WX = 0 && (SCX & 7) > 0`.
24+
- [PPU][WINDOW-GLITCH-ORACLE] The existing active window ROM block is green (`m3_window_timing`, `m3_window_timing_wx_0`, `m3_lcdc_win_en_change_multiple*`, `m3_wx_*`), but standalone c-sp v7 `turtle-tests/window_y_trigger_wx_offscreen.gb` now fails against its upstream framebuffer fixture while `turtle-tests/window_y_trigger.gb` passes. Stricter hardware/oracle evidence is still missing for offscreen `WX`, `WX = 0`, `WX = 166`, `WX`/`WY`, and `LCDC.5` mid-frame glitches, especially `WX = 0 && (SCX & 7) > 0`.
2525
- [PPU][OAM-CORRUPTION-ORACLE] Deterministic unit/integration coverage exists for Mode `2` OAM access, `FEA0-FEFF` reads, `inc rr`, `[hli]` / `[hld]`, stack/interrupt paths, DMG variants, and the CGB negative path; the promoted GB Emulator Shootout `oam_bug` subset is green, and the standalone `blargg` report now keeps `oam_bug.gb` plus `7-timing_effect.gb` green with pinned framebuffer fixtures, but independent oracle comparison is still missing.
2626
- [PPU][FF44-HBLANK-SEAM] The exact DMG `FF44` advance point inside late HBlank remains hypothesis-only; a direct later-dot retune regressed `mooneye acceptance/ppu/hblank_ly_scx_timing-GS`, so re-entry must start from a narrow trace or oracle comparison around the late-HBlank `LY` / `SCX` polling seam while keeping that ROM green.
2727
- [PPU][LCDC2-8X16-ARTIFACTS] Core `8x16` rules and the mid-frame `LCDC.2` shrink crash are fixed through a narrow model; re-check finer DMG-visible artifacts only with a targeted ROM or oracle, not by broadening the current line-start latch / queued-FIFO / repaint policy speculatively.

0 commit comments

Comments
 (0)