From 4e2c91d724b3edcc2af33a7222a395149b3f96b6 Mon Sep 17 00:00:00 2001 From: YushiOMOTE Date: Wed, 31 Jul 2024 20:23:25 +0900 Subject: [PATCH] Add channel 4 lfsr mode flip rom tests --- README.md | 2 + core/src/apu/noise.rs | 5 + .../same_suite_channel_4_lfsr_15_7.txt | 144 ++++++++++++++++++ .../same_suite_channel_4_lfsr_7_15.txt | 144 ++++++++++++++++++ core/tests/test_roms.rs | 16 ++ 5 files changed, 311 insertions(+) create mode 100644 core/tests/expects/same_suite_channel_4_lfsr_15_7.txt create mode 100644 core/tests/expects/same_suite_channel_4_lfsr_7_15.txt diff --git a/README.md b/README.md index 1b47e5f..c336f03 100644 --- a/README.md +++ b/README.md @@ -114,6 +114,8 @@ Test status of [Same Suite](https://github.com/YushiOMOTE/SameSuite/tree/430ab7f * [x] `apu/div_trigger_volume_10.gb` * [x] `apu/channel_4/channel_4_lfsr.gb` * [x] `apu/channel_4/channel_4_lfsr15.gb` +* [x] `apu/channel_4/channel_4_lfsr_7_15.gb` +* [x] `apu/channel_4/channel_4_lfsr_15_7.gb` ## Projects diff --git a/core/src/apu/noise.rs b/core/src/apu/noise.rs index 56b8a0e..4f27075 100644 --- a/core/src/apu/noise.rs +++ b/core/src/apu/noise.rs @@ -126,6 +126,7 @@ impl Noise { } self.nr43 = Nr43::from_bits(value); + self.lfsr.set_mode(self.nr43.step()); } /// Read NR44 register (0xff23) @@ -277,6 +278,10 @@ impl Lfsr { self.value = 0xff; } + fn set_mode(&mut self, short: bool) { + self.short = short; + } + fn update(&mut self) { // Xor bit 0 and 1. let bit = (self.value & 1) ^ ((self.value & 2) >> 1) & 1; diff --git a/core/tests/expects/same_suite_channel_4_lfsr_15_7.txt b/core/tests/expects/same_suite_channel_4_lfsr_15_7.txt new file mode 100644 index 0000000..7d18ce0 --- /dev/null +++ b/core/tests/expects/same_suite_channel_4_lfsr_15_7.txt @@ -0,0 +1,144 @@ +.######..######..######..######....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.. +.##..##..##..##..##..##..##..##....#.....#...#.....#.....#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.. +.##......##..##..##..##..##..##....#.....#...#.....#.....#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.. +.##......##..##..##..##..##..##....####..#...#.....####..#...#.....####..#...#.....####..#...#.....#...#.#...#.....#...#.#...#.....####..#...#.....####..#...#.. +.##......##..##..##..##..##..##....#.....#...#.....#.....#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.. +.##..##..##..##..##..##..##..##....#.....#...#.....#.....#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.. +.######..######..######..######....#.....#####.....#.....#####.....#.....#####.....#.....#####.....#####.#####.....#####.#####.....#.....#####.....#.....#####.. +................................................................................................................................................................ +.######..######..######..######....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.. +.##..##..##..##..##..##..##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#.....#...#.. +.##......##..##..##..##..##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#.....#...#.. +.##......##..##..##..##..######....####..#...#.....####..#...#.....#...#.#...#.....####..#...#.....#...#.#...#.....####..#...#.....####..#...#.....####..#...#.. +.##......##..##..##..##..##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#.....#...#.. +.##..##..##..##..##..##..##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#.....#...#.. +.######..######..######..######....#.....#####.....#.....#####.....#####.#####.....#.....#####.....#####.#####.....#.....#####.....#.....#####.....#.....#####.. +................................................................................................................................................................ +.######..######...###....######....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.. +.##..##..##..##..####....##..##....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.. +.##......##..##..####....##..##....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.. +.##......##..##....##....##..##....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....####..#...#.....####..#...#.....#...#.#...#.....####..#...#.. +.##......##..##....##....##..##....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.. +.##..##..##..##....##....##..##....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.. +.######..######..######..######....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#.....#####.....#.....#####.....#####.#####.....#.....#####.. +................................................................................................................................................................ +.######..######...###....######....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.. +.##..##..##..##..####....##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.. +.##......##..##..####....##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.. +.##......##..##....##....######....####..#...#.....####..#...#.....#...#.#...#.....####..#...#.....#...#.#...#.....#...#.#...#.....####..#...#.....####..#...#.. +.##......##..##....##....##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.. +.##..##..##..##....##....##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.. +.######..######..######..######....#.....#####.....#.....#####.....#####.#####.....#.....#####.....#####.#####.....#####.#####.....#.....#####.....#.....#####.. +................................................................................................................................................................ +.######..######..######..######....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.. +.##..##..##..##..##..##..##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.. +.##......##..##......##..##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.. +.##......##..##.....##...##..##....####..#...#.....####..#...#.....#...#.#...#.....####..#...#.....#...#.#...#.....#...#.#...#.....####..#...#.....####..#...#.. +.##......##..##....##....##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.. +.##..##..##..##...##.....##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.. +.######..######..######..######....#.....#####.....#.....#####.....#####.#####.....#.....#####.....#####.#####.....#####.#####.....#.....#####.....#.....#####.. +................................................................................................................................................................ +.######..######..######..######....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.. +.##..##..##..##..##..##..##..##....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.. +.##......##..##......##..##..##....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.. +.##......##..##.....##...######....#...#.#...#.....#...#.#...#.....#...#.#...#.....####..#...#.....#...#.#...#.....####..#...#.....#...#.#...#.....####..#...#.. +.##......##..##....##....##..##....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.. +.##..##..##..##...##.....##..##....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.. +.######..######..######..######....#####.#####.....#####.#####.....#####.#####.....#.....#####.....#####.#####.....#.....#####.....#####.#####.....#.....#####.. +................................................................................................................................................................ +.######..######..######..######....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.. +.##..##..##..##..##..##..##..##....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.. +.##......##..##......##..##..##....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.. +.##......##..##....####..##..##....####..#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....####..#...#.....#...#.#...#.. +.##......##..##......##..##..##....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.. +.##..##..##..##..##..##..##..##....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.. +.######..######..######..######....#.....#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#.....#####.....#####.#####.. +................................................................................................................................................................ +.######..######..######..######....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.. +.##..##..##..##..##..##..##..##....#.....#...#.....#.....#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.##......##..##......##..##..##....#.....#...#.....#.....#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.##......##..##....####..######....####..#...#.....####..#...#.....####..#...#.....####..#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....####..#...#.. +.##......##..##......##..##..##....#.....#...#.....#.....#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.##..##..##..##..##..##..##..##....#.....#...#.....#.....#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.######..######..######..######....#.....#####.....#.....#####.....#.....#####.....#.....#####.....#####.#####.....#####.#####.....#####.#####.....#.....#####.. +................................................................................................................................................................ +.######..######....###...######....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.. +.##..##..##..##...####...##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#.....#...#.. +.##......##..##...####...##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#.....#...#.. +.##......##..##..#####...##..##....####..#...#.....####..#...#.....#...#.#...#.....####..#...#.....####..#...#.....#...#.#...#.....####..#...#.....####..#...#.. +.##......##..##..##.##...##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#.....#...#.. +.##..##..##..##..######..##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#.....#...#.. +.######..######.....##...######....#.....#####.....#.....#####.....#####.#####.....#.....#####.....#.....#####.....#####.#####.....#.....#####.....#.....#####.. +................................................................................................................................................................ +.######..######....###...######....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.. +.##..##..##..##...####...##..##....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.. +.##......##..##...####...##..##....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.. +.##......##..##..#####...######....#...#.#...#.....#...#.#...#.....####..#...#.....#...#.#...#.....#...#.#...#.....####..#...#.....#...#.#...#.....####..#...#.. +.##......##..##..##.##...##..##....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.. +.##..##..##..##..######..##..##....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.. +.######..######.....##...######....#####.#####.....#####.#####.....#.....#####.....#####.#####.....#####.#####.....#.....#####.....#####.#####.....#.....#####.. +................................................................................................................................................................ +.######..######..######..######....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.. +.##..##..##..##..###.....##..##....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.##......##..##..######..##..##....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.##......##..##......##..##..##....#...#.#...#.....#...#.#...#.....####..#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....####..#...#.. +.##......##..##......##..##..##....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.##..##..##..##..##..##..##..##....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.######..######..######..######....#####.#####.....#####.#####.....#.....#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#.....#####.. +................................................................................................................................................................ +.######..######..######..######....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.. +.##..##..##..##..###.....##..##....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.##......##..##..######..##..##....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.##......##..##......##..######....#...#.#...#.....#...#.#...#.....####..#...#.....####..#...#.....####..#...#.....#...#.#...#.....#...#.#...#.....####..#...#.. +.##......##..##......##..##..##....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.##..##..##..##..##..##..##..##....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.######..######..######..######....#####.#####.....#####.#####.....#.....#####.....#.....#####.....#.....#####.....#####.#####.....#####.#####.....#.....#####.. +................................................................................................................................................................ +.######..######..#####...######....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.. +.##..##..##..##..##......##..##....#...#.#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.. +.##......##..##..######..##..##....#...#.#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.. +.##......##..##..##..##..##..##....#...#.#...#.....####..#...#.....####..#...#.....#...#.#...#.....####..#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.. +.##......##..##..##..##..##..##....#...#.#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.. +.##..##..##..##..##..##..##..##....#...#.#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.. +.######..######..######..######....#####.#####.....#.....#####.....#.....#####.....#####.#####.....#.....#####.....#####.#####.....#####.#####.....#####.#####.. +................................................................................................................................................................ +.######..######..#####...######....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.. +.##..##..##..##..##......##..##....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.. +.##......##..##..######..##..##....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.. +.##......##..##..##..##..######....####..#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....####..#...#.....####..#...#.....#...#.#...#.....#...#.#...#.. +.##......##..##..##..##..##..##....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.. +.##..##..##..##..##..##..##..##....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.. +.######..######..######..######....#.....#####.....#####.#####.....#####.#####.....#####.#####.....#.....#####.....#.....#####.....#####.#####.....#####.#####.. +................................................................................................................................................................ +.######..######..######..######....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.. +.##..##..##..##..#...##..##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.. +.##......##..##.....###..##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.. +.##......##..##.....##...##..##....####..#...#.....####..#...#.....#...#.#...#.....####..#...#.....#...#.#...#.....####..#...#.....#...#.#...#.....####..#...#.. +.##......##..##....###...##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.. +.##..##..##..##....###...##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.. +.######..######....##....######....#.....#####.....#.....#####.....#####.#####.....#.....#####.....#####.#####.....#.....#####.....#####.#####.....#.....#####.. +................................................................................................................................................................ +.######..######..######..######....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.. +.##..##..##..##..#...##..##..##....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.##......##..##.....###..##..##....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.##......##..##.....##...######....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....####..#...#.. +.##......##..##....###...##..##....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.##..##..##..##....###...##..##....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.######..######....##....######....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#.....#####.. +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ diff --git a/core/tests/expects/same_suite_channel_4_lfsr_7_15.txt b/core/tests/expects/same_suite_channel_4_lfsr_7_15.txt new file mode 100644 index 0000000..75da078 --- /dev/null +++ b/core/tests/expects/same_suite_channel_4_lfsr_7_15.txt @@ -0,0 +1,144 @@ +.######..######..######..######....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.. +.##..##..##..##..##..##..##..##....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#.....#...#.....#.....#...#.. +.##......##..##..##..##..##..##....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#.....#...#.....#.....#...#.. +.##......##..##..##..##..##..##....####..#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....####..#...#.....####..#...#.....####..#...#.....####..#...#.. +.##......##..##..##..##..##..##....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#.....#...#.....#.....#...#.. +.##..##..##..##..##..##..##..##....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#.....#...#.....#.....#...#.. +.######..######..######..######....#.....#####.....#####.#####.....#####.#####.....#####.#####.....#.....#####.....#.....#####.....#.....#####.....#.....#####.. +................................................................................................................................................................ +.######..######..######..######....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.. +.##..##..##..##..##..##..##..##....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#.....#...#.....#...#.#...#.. +.##......##..##..##..##..##..##....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#.....#...#.....#...#.#...#.. +.##......##..##..##..##..######....####..#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....####..#...#.....####..#...#.....####..#...#.....#...#.#...#.. +.##......##..##..##..##..##..##....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#.....#...#.....#...#.#...#.. +.##..##..##..##..##..##..##..##....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#.....#...#.....#...#.#...#.. +.######..######..######..######....#.....#####.....#####.#####.....#####.#####.....#####.#####.....#.....#####.....#.....#####.....#.....#####.....#####.#####.. +................................................................................................................................................................ +.######..######...###....######....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.. +.##..##..##..##..####....##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#.....#...#.....#.....#...#.....#...#.#...#.. +.##......##..##..####....##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#.....#...#.....#.....#...#.....#...#.#...#.. +.##......##..##....##....##..##....####..#...#.....####..#...#.....#...#.#...#.....####..#...#.....####..#...#.....####..#...#.....####..#...#.....#...#.#...#.. +.##......##..##....##....##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#.....#...#.....#.....#...#.....#...#.#...#.. +.##..##..##..##....##....##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#.....#...#.....#.....#...#.....#...#.#...#.. +.######..######..######..######....#.....#####.....#.....#####.....#####.#####.....#.....#####.....#.....#####.....#.....#####.....#.....#####.....#####.#####.. +................................................................................................................................................................ +.######..######...###....######....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.. +.##..##..##..##..####....##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.##......##..##..####....##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.##......##..##....##....######....####..#...#.....####..#...#.....#...#.#...#.....####..#...#.....####..#...#.....#...#.#...#.....#...#.#...#.....####..#...#.. +.##......##..##....##....##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.##..##..##..##....##....##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.######..######..######..######....#.....#####.....#.....#####.....#####.#####.....#.....#####.....#.....#####.....#####.#####.....#####.#####.....#.....#####.. +................................................................................................................................................................ +.######..######..######..######....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.. +.##..##..##..##..##..##..##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.##......##..##......##..##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.##......##..##.....##...##..##....####..#...#.....####..#...#.....#...#.#...#.....####..#...#.....####..#...#.....#...#.#...#.....#...#.#...#.....####..#...#.. +.##......##..##....##....##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.##..##..##..##...##.....##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.######..######..######..######....#.....#####.....#.....#####.....#####.#####.....#.....#####.....#.....#####.....#####.#####.....#####.#####.....#.....#####.. +................................................................................................................................................................ +.######..######..######..######....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.. +.##..##..##..##..##..##..##..##....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.##......##..##......##..##..##....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.##......##..##.....##...######....#...#.#...#.....#...#.#...#.....####..#...#.....####..#...#.....####..#...#.....#...#.#...#.....#...#.#...#.....####..#...#.. +.##......##..##....##....##..##....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.##..##..##..##...##.....##..##....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.######..######..######..######....#####.#####.....#####.#####.....#.....#####.....#.....#####.....#.....#####.....#####.#####.....#####.#####.....#.....#####.. +................................................................................................................................................................ +.######..######..######..######....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.. +.##..##..##..##..##..##..##..##....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.##......##..##......##..##..##....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.##......##..##....####..##..##....#...#.#...#.....#...#.#...#.....####..#...#.....#...#.#...#.....####..#...#.....#...#.#...#.....#...#.#...#.....####..#...#.. +.##......##..##......##..##..##....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.##..##..##..##..##..##..##..##....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.######..######..######..######....#####.#####.....#####.#####.....#.....#####.....#####.#####.....#.....#####.....#####.#####.....#####.#####.....#.....#####.. +................................................................................................................................................................ +.######..######..######..######....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.. +.##..##..##..##..##..##..##..##....#...#.#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.##......##..##......##..##..##....#...#.#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.##......##..##....####..######....#...#.#...#.....####..#...#.....####..#...#.....#...#.#...#.....####..#...#.....#...#.#...#.....#...#.#...#.....####..#...#.. +.##......##..##......##..##..##....#...#.#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.##..##..##..##..##..##..##..##....#...#.#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.######..######..######..######....#####.#####.....#.....#####.....#.....#####.....#####.#####.....#.....#####.....#####.#####.....#####.#####.....#.....#####.. +................................................................................................................................................................ +.######..######....###...######....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.. +.##..##..##..##...####...##..##....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.. +.##......##..##...####...##..##....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.. +.##......##..##..#####...##..##....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....####..#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.. +.##......##..##..##.##...##..##....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.. +.##..##..##..##..######..##..##....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.. +.######..######.....##...######....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#.....#####.....#####.#####.....#####.#####.....#####.#####.. +................................................................................................................................................................ +.######..######....###...######....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.. +.##..##..##..##...####...##..##....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.##......##..##...####...##..##....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.##......##..##..#####...######....####..#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....####..#...#.....#...#.#...#.....#...#.#...#.....####..#...#.. +.##......##..##..##.##...##..##....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.##..##..##..##..######..##..##....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.. +.######..######.....##...######....#.....#####.....#####.#####.....#####.#####.....#####.#####.....#.....#####.....#####.#####.....#####.#####.....#.....#####.. +................................................................................................................................................................ +.######..######..######..######....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.. +.##..##..##..##..###.....##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.. +.##......##..##..######..##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.. +.##......##..##......##..##..##....####..#...#.....####..#...#.....#...#.#...#.....#...#.#...#.....####..#...#.....####..#...#.....#...#.#...#.....#...#.#...#.. +.##......##..##......##..##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.. +.##..##..##..##..##..##..##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.. +.######..######..######..######....#.....#####.....#.....#####.....#####.#####.....#####.#####.....#.....#####.....#.....#####.....#####.#####.....#####.#####.. +................................................................................................................................................................ +.######..######..######..######....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.. +.##..##..##..##..###.....##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#.....#...#.. +.##......##..##..######..##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#.....#...#.. +.##......##..##......##..######....####..#...#.....####..#...#.....#...#.#...#.....#...#.#...#.....####..#...#.....#...#.#...#.....####..#...#.....####..#...#.. +.##......##..##......##..##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#.....#...#.. +.##..##..##..##..##..##..##..##....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#.....#...#.. +.######..######..######..######....#.....#####.....#.....#####.....#####.#####.....#####.#####.....#.....#####.....#####.#####.....#.....#####.....#.....#####.. +................................................................................................................................................................ +.######..######..#####...######....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.. +.##..##..##..##..##......##..##....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.. +.##......##..##..######..##..##....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.. +.##......##..##..##..##..##..##....#...#.#...#.....####..#...#.....#...#.#...#.....####..#...#.....#...#.#...#.....####..#...#.....#...#.#...#.....####..#...#.. +.##......##..##..##..##..##..##....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.. +.##..##..##..##..##..##..##..##....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#.....#...#.. +.######..######..######..######....#####.#####.....#.....#####.....#####.#####.....#.....#####.....#####.#####.....#.....#####.....#####.#####.....#.....#####.. +................................................................................................................................................................ +.######..######..#####...######....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.. +.##..##..##..##..##......##..##....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.. +.##......##..##..######..##..##....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.. +.##......##..##..##..##..######....#...#.#...#.....####..#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....####..#...#.....#...#.#...#.....#...#.#...#.. +.##......##..##..##..##..##..##....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.. +.##..##..##..##..##..##..##..##....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.. +.######..######..######..######....#####.#####.....#.....#####.....#####.#####.....#####.#####.....#####.#####.....#.....#####.....#####.#####.....#####.#####.. +................................................................................................................................................................ +.######..######..######..######....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.. +.##..##..##..##..#...##..##..##....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.. +.##......##..##.....###..##..##....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.. +.##......##..##.....##...##..##....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.. +.##......##..##....###...##..##....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.. +.##..##..##..##....###...##..##....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.....#...#.#...#.. +.######..######....##....######....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.. +................................................................................................................................................................ +.######..######..######..######....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.....#####.#####.. +.##..##..##..##..#...##..##..##....#...#.#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#.....#...#.. +.##......##..##.....###..##..##....#...#.#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#.....#...#.. +.##......##..##.....##...######....#...#.#...#.....####..#...#.....####..#...#.....#...#.#...#.....#...#.#...#.....####..#...#.....####..#...#.....####..#...#.. +.##......##..##....###...##..##....#...#.#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#.....#...#.. +.##..##..##..##....###...##..##....#...#.#...#.....#.....#...#.....#.....#...#.....#...#.#...#.....#...#.#...#.....#.....#...#.....#.....#...#.....#.....#...#.. +.######..######....##....######....#####.#####.....#.....#####.....#.....#####.....#####.#####.....#####.#####.....#.....#####.....#.....#####.....#.....#####.. +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ diff --git a/core/tests/test_roms.rs b/core/tests/test_roms.rs index f2a0f65..a970987 100644 --- a/core/tests/test_roms.rs +++ b/core/tests/test_roms.rs @@ -361,3 +361,19 @@ fn same_suite_channel_4_lfsr15() { "../roms/same_suite/apu/channel_4/channel_4_lfsr15.gb", ); } + +#[test] +fn same_suite_channel_4_lfsr_7_15() { + test_rom( + Expected::from_file("tests/expects/same_suite_channel_4_lfsr_7_15.txt"), + "../roms/same_suite/apu/channel_4/channel_4_lfsr_7_15.gb", + ); +} + +#[test] +fn same_suite_channel_4_lfsr_15_7() { + test_rom( + Expected::from_file("tests/expects/same_suite_channel_4_lfsr_15_7.txt"), + "../roms/same_suite/apu/channel_4/channel_4_lfsr_15_7.gb", + ); +}