From d89a1d921597851e7f8bea7c9207825db574e0df Mon Sep 17 00:00:00 2001 From: EliseZeroTwo Date: Mon, 15 Jan 2024 09:34:47 -0700 Subject: [PATCH] feat: better DMA, MBC1, fixup tests --- .forgejo/workflows/action.yml | 246 ++++---- .github/workflows/action.yml | 246 ++++---- generate-action-and-tests.sh | 28 +- meowgb-core/src/gameboy/dma.rs | 17 +- meowgb-core/src/gameboy/mapper/mbc1.rs | 100 ++-- meowgb-core/src/gameboy/ppu.rs | 2 +- .../expected_output/MBC1/bits_mode.bin | 1 - .../expected_output/MBC1/bits_ramg.bin | 1 - .../MBC1/multicart_rom_8Mb.bin | 1 - .../expected_output/MBC1/ram_256kb.bin | 1 - .../expected_output/MBC1/ram_64kb.bin | 1 - .../expected_output/MBC1/rom_16Mb.bin | 1 - meowgb-tests/expected_output/MBC1/rom_1Mb.bin | 1 - meowgb-tests/expected_output/MBC1/rom_2Mb.bin | 1 - meowgb-tests/expected_output/MBC1/rom_4Mb.bin | 1 - .../expected_output/MBC1/rom_512kb.bin | 1 - meowgb-tests/expected_output/MBC1/rom_8Mb.bin | 1 - .../{ => blargg}/cpu_instrs.bin | 0 .../{ => blargg}/instr_timing.bin | 0 .../{ => blargg}/mem_timing.bin | 0 .../MBC1/bits_bank1.bin | 0 .../MBC1/bits_bank2.bin | 0 .../MBC1/bits_mode.bin} | 0 .../MBC1/bits_ramg.bin} | 0 .../MBC1/multicart_rom_8Mb.bin} | 0 .../MBC1/ram_256kb.bin} | 0 .../MBC1/ram_64kb.bin} | 0 .../MBC1/rom_16Mb.bin} | 0 .../MBC1/rom_1Mb.bin} | 0 .../MBC1/rom_2Mb.bin} | 0 .../MBC1/rom_4Mb.bin} | 0 .../MBC1/rom_512kb.bin} | 0 .../MBC1/rom_8Mb.bin} | 0 .../add_sp_e_timing.bin} | 0 .../{ => mooneye-test-suite/bits}/mem_oam.bin | 0 .../{ => mooneye-test-suite/bits}/reg_f.bin | 0 .../bits}/unused_hwio-GS.bin | 0 .../boot_hwio-dmgABCmgb.bin} | 0 .../boot_regs-dmgABC.bin} | 0 .../call_cc_timing.bin} | 0 .../call_cc_timing2.bin} | 0 .../call_timing.bin} | 0 .../call_timing2.bin} | 0 .../di_timing-GS.bin} | 0 .../div_timing.bin} | 0 .../ei_sequence.bin} | 0 .../ei_timing.bin} | 0 .../halt_ime0_ei.bin} | 0 .../halt_ime0_nointr_timing.bin} | 0 .../halt_ime1_timing.bin} | 0 .../halt_ime1_timing2-GS.bin} | 0 .../if_ie_registers.bin} | 0 .../instr/daa.bin} | 0 .../intr_timing.bin} | 0 .../jp_cc_timing.bin} | 0 .../jp_timing.bin} | 0 .../ld_hl_sp_e_timing.bin} | 0 .../oam_dma/basic.bin} | 0 .../oam_dma/reg_read.bin} | 0 .../oam_dma_restart.bin} | 0 .../oam_dma_start.bin} | 0 .../oam_dma_timing.bin} | 0 .../pop_timing.bin} | 0 .../ppu/intr_1_2_timing-GS.bin} | 0 .../ppu/intr_2_0_timing.bin} | 0 .../ppu/stat_irq_blocking.bin} | 0 .../ppu/stat_lyc_onoff.bin} | 0 .../ppu}/vblank_stat_intr-GS.bin | 0 .../mooneye-test-suite/push_timing.bin | 1 + .../mooneye-test-suite/rapid_di_ei.bin | 1 + .../mooneye-test-suite/ret_cc_timing.bin | 1 + .../mooneye-test-suite/ret_timing.bin | 1 + .../mooneye-test-suite/reti_intr_timing.bin | 1 + .../mooneye-test-suite/reti_timing.bin | 1 + .../mooneye-test-suite/rst_timing.bin | 1 + .../mooneye-test-suite/timer/div_write.bin | 1 + .../mooneye-test-suite/timer/rapid_toggle.bin | 1 + .../mooneye-test-suite/timer/tim00.bin | 1 + .../timer/tim00_div_trigger.bin | 1 + .../mooneye-test-suite/timer/tim01.bin | 1 + .../timer/tim01_div_trigger.bin | 1 + .../mooneye-test-suite/timer/tim10.bin | 1 + .../timer/tim10_div_trigger.bin | 1 + .../mooneye-test-suite/timer/tim11.bin | 1 + .../timer/tim11_div_trigger.bin | 1 + .../mooneye-test-suite/timer/tima_reload.bin | 1 + .../timer/tima_write_reloading.bin | 1 + .../timer/tma_write_reloading.bin | 1 + meowgb/src/window/overlay.rs | 38 +- run-test-roms.sh | 550 ++++++++++-------- .../roms/{ => bits}/mem_oam.gb | Bin .../roms/{ => bits}/reg_f.gb | Bin .../roms/{ => bits}/unused_hwio-GS.gb | Bin .../roms/if_ie_registers.gb | Bin 0 -> 32768 bytes .../roms/{ => instr}/daa.gb | Bin .../mooneye-test-suite/roms/intr_timing.gb | Bin 0 -> 32768 bytes .../mooneye-test-suite/roms/jp_cc_timing.gb | Bin 0 -> 32768 bytes .../mooneye-test-suite/roms/jp_timing.gb | Bin 0 -> 32768 bytes .../roms/ld_hl_sp_e_timing.gb | Bin 0 -> 32768 bytes .../roms/{ => oam_dma}/basic.gb | Bin .../roms/{ => oam_dma}/reg_read.gb | Bin .../roms/{ => ppu}/intr_1_2_timing-GS.gb | Bin .../roms/{ => ppu}/intr_2_0_timing.gb | Bin .../roms/{ => ppu}/stat_irq_blocking.gb | Bin .../roms/{ => ppu}/stat_lyc_onoff.gb | Bin .../roms/{ => ppu}/vblank_stat_intr-GS.gb | Bin .../mooneye-test-suite/roms/ret_cc_timing.gb | Bin 0 -> 32768 bytes .../mooneye-test-suite/roms/ret_timing.gb | Bin 0 -> 32768 bytes .../roms/reti_intr_timing.gb | Bin 0 -> 32768 bytes .../mooneye-test-suite/roms/reti_timing.gb | Bin 0 -> 32768 bytes .../roms/{ => timer}/div_write.gb | Bin .../roms/{ => timer}/rapid_toggle.gb | Bin .../roms/{ => timer}/tim00.gb | Bin .../roms/{ => timer}/tim00_div_trigger.gb | Bin .../roms/{ => timer}/tim01.gb | Bin .../roms/{ => timer}/tim01_div_trigger.gb | Bin .../roms/{ => timer}/tim10.gb | Bin .../roms/{ => timer}/tim10_div_trigger.gb | Bin .../roms/{ => timer}/tim11.gb | Bin .../roms/{ => timer}/tim11_div_trigger.gb | Bin .../roms/{ => timer}/tima_reload.gb | Bin .../roms/{ => timer}/tima_write_reloading.gb | Bin .../roms/{ => timer}/tma_write_reloading.gb | Bin tests.md | 148 +++-- 124 files changed, 825 insertions(+), 581 deletions(-) delete mode 100644 meowgb-tests/expected_output/MBC1/bits_mode.bin delete mode 100644 meowgb-tests/expected_output/MBC1/bits_ramg.bin delete mode 100644 meowgb-tests/expected_output/MBC1/multicart_rom_8Mb.bin delete mode 100644 meowgb-tests/expected_output/MBC1/ram_256kb.bin delete mode 100644 meowgb-tests/expected_output/MBC1/ram_64kb.bin delete mode 100644 meowgb-tests/expected_output/MBC1/rom_16Mb.bin delete mode 100644 meowgb-tests/expected_output/MBC1/rom_1Mb.bin delete mode 100644 meowgb-tests/expected_output/MBC1/rom_2Mb.bin delete mode 100644 meowgb-tests/expected_output/MBC1/rom_4Mb.bin delete mode 100644 meowgb-tests/expected_output/MBC1/rom_512kb.bin delete mode 100644 meowgb-tests/expected_output/MBC1/rom_8Mb.bin rename meowgb-tests/expected_output/{ => blargg}/cpu_instrs.bin (100%) rename meowgb-tests/expected_output/{ => blargg}/instr_timing.bin (100%) rename meowgb-tests/expected_output/{ => blargg}/mem_timing.bin (100%) rename meowgb-tests/expected_output/{ => mooneye-test-suite}/MBC1/bits_bank1.bin (100%) rename meowgb-tests/expected_output/{ => mooneye-test-suite}/MBC1/bits_bank2.bin (100%) rename meowgb-tests/expected_output/{add_sp_e_timing.bin => mooneye-test-suite/MBC1/bits_mode.bin} (100%) rename meowgb-tests/expected_output/{basic.bin => mooneye-test-suite/MBC1/bits_ramg.bin} (100%) rename meowgb-tests/expected_output/{boot_hwio-dmgABCmgb.bin => mooneye-test-suite/MBC1/multicart_rom_8Mb.bin} (100%) rename meowgb-tests/expected_output/{boot_regs-dmgABC.bin => mooneye-test-suite/MBC1/ram_256kb.bin} (100%) rename meowgb-tests/expected_output/{call_cc_timing.bin => mooneye-test-suite/MBC1/ram_64kb.bin} (100%) rename meowgb-tests/expected_output/{call_cc_timing2.bin => mooneye-test-suite/MBC1/rom_16Mb.bin} (100%) rename meowgb-tests/expected_output/{call_timing.bin => mooneye-test-suite/MBC1/rom_1Mb.bin} (100%) rename meowgb-tests/expected_output/{call_timing2.bin => mooneye-test-suite/MBC1/rom_2Mb.bin} (100%) rename meowgb-tests/expected_output/{daa.bin => mooneye-test-suite/MBC1/rom_4Mb.bin} (100%) rename meowgb-tests/expected_output/{di_timing-GS.bin => mooneye-test-suite/MBC1/rom_512kb.bin} (100%) rename meowgb-tests/expected_output/{div_timing.bin => mooneye-test-suite/MBC1/rom_8Mb.bin} (100%) rename meowgb-tests/expected_output/{div_write.bin => mooneye-test-suite/add_sp_e_timing.bin} (100%) rename meowgb-tests/expected_output/{ => mooneye-test-suite/bits}/mem_oam.bin (100%) rename meowgb-tests/expected_output/{ => mooneye-test-suite/bits}/reg_f.bin (100%) rename meowgb-tests/expected_output/{ => mooneye-test-suite/bits}/unused_hwio-GS.bin (100%) rename meowgb-tests/expected_output/{ei_sequence.bin => mooneye-test-suite/boot_hwio-dmgABCmgb.bin} (100%) rename meowgb-tests/expected_output/{ei_timing.bin => mooneye-test-suite/boot_regs-dmgABC.bin} (100%) rename meowgb-tests/expected_output/{halt_ime0_ei.bin => mooneye-test-suite/call_cc_timing.bin} (100%) rename meowgb-tests/expected_output/{halt_ime0_nointr_timing.bin => mooneye-test-suite/call_cc_timing2.bin} (100%) rename meowgb-tests/expected_output/{halt_ime1_timing.bin => mooneye-test-suite/call_timing.bin} (100%) rename meowgb-tests/expected_output/{halt_ime1_timing2-GS.bin => mooneye-test-suite/call_timing2.bin} (100%) rename meowgb-tests/expected_output/{intr_1_2_timing-GS.bin => mooneye-test-suite/di_timing-GS.bin} (100%) rename meowgb-tests/expected_output/{intr_2_0_timing.bin => mooneye-test-suite/div_timing.bin} (100%) rename meowgb-tests/expected_output/{oam_dma_restart.bin => mooneye-test-suite/ei_sequence.bin} (100%) rename meowgb-tests/expected_output/{oam_dma_start.bin => mooneye-test-suite/ei_timing.bin} (100%) rename meowgb-tests/expected_output/{oam_dma_timing.bin => mooneye-test-suite/halt_ime0_ei.bin} (100%) rename meowgb-tests/expected_output/{pop_timing.bin => mooneye-test-suite/halt_ime0_nointr_timing.bin} (100%) rename meowgb-tests/expected_output/{push_timing.bin => mooneye-test-suite/halt_ime1_timing.bin} (100%) rename meowgb-tests/expected_output/{rapid_di_ei.bin => mooneye-test-suite/halt_ime1_timing2-GS.bin} (100%) rename meowgb-tests/expected_output/{rapid_toggle.bin => mooneye-test-suite/if_ie_registers.bin} (100%) rename meowgb-tests/expected_output/{reg_read.bin => mooneye-test-suite/instr/daa.bin} (100%) rename meowgb-tests/expected_output/{rst_timing.bin => mooneye-test-suite/intr_timing.bin} (100%) rename meowgb-tests/expected_output/{stat_irq_blocking.bin => mooneye-test-suite/jp_cc_timing.bin} (100%) rename meowgb-tests/expected_output/{stat_lyc_onoff.bin => mooneye-test-suite/jp_timing.bin} (100%) rename meowgb-tests/expected_output/{tim00.bin => mooneye-test-suite/ld_hl_sp_e_timing.bin} (100%) rename meowgb-tests/expected_output/{tim00_div_trigger.bin => mooneye-test-suite/oam_dma/basic.bin} (100%) rename meowgb-tests/expected_output/{tim01.bin => mooneye-test-suite/oam_dma/reg_read.bin} (100%) rename meowgb-tests/expected_output/{tim01_div_trigger.bin => mooneye-test-suite/oam_dma_restart.bin} (100%) rename meowgb-tests/expected_output/{tim10.bin => mooneye-test-suite/oam_dma_start.bin} (100%) rename meowgb-tests/expected_output/{tim10_div_trigger.bin => mooneye-test-suite/oam_dma_timing.bin} (100%) rename meowgb-tests/expected_output/{tim11.bin => mooneye-test-suite/pop_timing.bin} (100%) rename meowgb-tests/expected_output/{tim11_div_trigger.bin => mooneye-test-suite/ppu/intr_1_2_timing-GS.bin} (100%) rename meowgb-tests/expected_output/{tima_reload.bin => mooneye-test-suite/ppu/intr_2_0_timing.bin} (100%) rename meowgb-tests/expected_output/{tima_write_reloading.bin => mooneye-test-suite/ppu/stat_irq_blocking.bin} (100%) rename meowgb-tests/expected_output/{tma_write_reloading.bin => mooneye-test-suite/ppu/stat_lyc_onoff.bin} (100%) rename meowgb-tests/expected_output/{ => mooneye-test-suite/ppu}/vblank_stat_intr-GS.bin (100%) create mode 100644 meowgb-tests/expected_output/mooneye-test-suite/push_timing.bin create mode 100644 meowgb-tests/expected_output/mooneye-test-suite/rapid_di_ei.bin create mode 100644 meowgb-tests/expected_output/mooneye-test-suite/ret_cc_timing.bin create mode 100644 meowgb-tests/expected_output/mooneye-test-suite/ret_timing.bin create mode 100644 meowgb-tests/expected_output/mooneye-test-suite/reti_intr_timing.bin create mode 100644 meowgb-tests/expected_output/mooneye-test-suite/reti_timing.bin create mode 100644 meowgb-tests/expected_output/mooneye-test-suite/rst_timing.bin create mode 100644 meowgb-tests/expected_output/mooneye-test-suite/timer/div_write.bin create mode 100644 meowgb-tests/expected_output/mooneye-test-suite/timer/rapid_toggle.bin create mode 100644 meowgb-tests/expected_output/mooneye-test-suite/timer/tim00.bin create mode 100644 meowgb-tests/expected_output/mooneye-test-suite/timer/tim00_div_trigger.bin create mode 100644 meowgb-tests/expected_output/mooneye-test-suite/timer/tim01.bin create mode 100644 meowgb-tests/expected_output/mooneye-test-suite/timer/tim01_div_trigger.bin create mode 100644 meowgb-tests/expected_output/mooneye-test-suite/timer/tim10.bin create mode 100644 meowgb-tests/expected_output/mooneye-test-suite/timer/tim10_div_trigger.bin create mode 100644 meowgb-tests/expected_output/mooneye-test-suite/timer/tim11.bin create mode 100644 meowgb-tests/expected_output/mooneye-test-suite/timer/tim11_div_trigger.bin create mode 100644 meowgb-tests/expected_output/mooneye-test-suite/timer/tima_reload.bin create mode 100644 meowgb-tests/expected_output/mooneye-test-suite/timer/tima_write_reloading.bin create mode 100644 meowgb-tests/expected_output/mooneye-test-suite/timer/tma_write_reloading.bin rename test-roms/mooneye-test-suite/roms/{ => bits}/mem_oam.gb (100%) rename test-roms/mooneye-test-suite/roms/{ => bits}/reg_f.gb (100%) rename test-roms/mooneye-test-suite/roms/{ => bits}/unused_hwio-GS.gb (100%) create mode 100644 test-roms/mooneye-test-suite/roms/if_ie_registers.gb rename test-roms/mooneye-test-suite/roms/{ => instr}/daa.gb (100%) create mode 100644 test-roms/mooneye-test-suite/roms/intr_timing.gb create mode 100644 test-roms/mooneye-test-suite/roms/jp_cc_timing.gb create mode 100644 test-roms/mooneye-test-suite/roms/jp_timing.gb create mode 100644 test-roms/mooneye-test-suite/roms/ld_hl_sp_e_timing.gb rename test-roms/mooneye-test-suite/roms/{ => oam_dma}/basic.gb (100%) rename test-roms/mooneye-test-suite/roms/{ => oam_dma}/reg_read.gb (100%) rename test-roms/mooneye-test-suite/roms/{ => ppu}/intr_1_2_timing-GS.gb (100%) rename test-roms/mooneye-test-suite/roms/{ => ppu}/intr_2_0_timing.gb (100%) rename test-roms/mooneye-test-suite/roms/{ => ppu}/stat_irq_blocking.gb (100%) rename test-roms/mooneye-test-suite/roms/{ => ppu}/stat_lyc_onoff.gb (100%) rename test-roms/mooneye-test-suite/roms/{ => ppu}/vblank_stat_intr-GS.gb (100%) create mode 100644 test-roms/mooneye-test-suite/roms/ret_cc_timing.gb create mode 100644 test-roms/mooneye-test-suite/roms/ret_timing.gb create mode 100644 test-roms/mooneye-test-suite/roms/reti_intr_timing.gb create mode 100644 test-roms/mooneye-test-suite/roms/reti_timing.gb rename test-roms/mooneye-test-suite/roms/{ => timer}/div_write.gb (100%) rename test-roms/mooneye-test-suite/roms/{ => timer}/rapid_toggle.gb (100%) rename test-roms/mooneye-test-suite/roms/{ => timer}/tim00.gb (100%) rename test-roms/mooneye-test-suite/roms/{ => timer}/tim00_div_trigger.gb (100%) rename test-roms/mooneye-test-suite/roms/{ => timer}/tim01.gb (100%) rename test-roms/mooneye-test-suite/roms/{ => timer}/tim01_div_trigger.gb (100%) rename test-roms/mooneye-test-suite/roms/{ => timer}/tim10.gb (100%) rename test-roms/mooneye-test-suite/roms/{ => timer}/tim10_div_trigger.gb (100%) rename test-roms/mooneye-test-suite/roms/{ => timer}/tim11.gb (100%) rename test-roms/mooneye-test-suite/roms/{ => timer}/tim11_div_trigger.gb (100%) rename test-roms/mooneye-test-suite/roms/{ => timer}/tima_reload.gb (100%) rename test-roms/mooneye-test-suite/roms/{ => timer}/tima_write_reloading.gb (100%) rename test-roms/mooneye-test-suite/roms/{ => timer}/tma_write_reloading.gb (100%) diff --git a/.forgejo/workflows/action.yml b/.forgejo/workflows/action.yml index 38bc2d6..9c81d55 100644 --- a/.forgejo/workflows/action.yml +++ b/.forgejo/workflows/action.yml @@ -20,248 +20,284 @@ jobs: - name: Run test ROM (blargg cpu_instrs) if: always() - run: ./target/release/meowgb-tests test-roms/blargg/roms/cpu_instrs.gb test -m 100000000 -s meowgb-tests/expected_output/cpu_instrs.bin + run: ./target/release/meowgb-tests test-roms/blargg/roms/cpu_instrs.gb test -m 100000000 -s meowgb-tests/expected_output/blargg/cpu_instrs.bin - name: Run test ROM (blargg instr_timing) if: always() - run: ./target/release/meowgb-tests test-roms/blargg/roms/instr_timing.gb test -m 100000000 -s meowgb-tests/expected_output/instr_timing.bin + run: ./target/release/meowgb-tests test-roms/blargg/roms/instr_timing.gb test -m 100000000 -s meowgb-tests/expected_output/blargg/instr_timing.bin - name: Run test ROM (blargg mem_timing) if: always() - run: ./target/release/meowgb-tests test-roms/blargg/roms/mem_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mem_timing.bin + run: ./target/release/meowgb-tests test-roms/blargg/roms/mem_timing.gb test -m 100000000 -s meowgb-tests/expected_output/blargg/mem_timing.bin - name: Run test ROM (mooneye-test-suite add_sp_e_timing) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/add_sp_e_timing.gb test -m 100000000 -s meowgb-tests/expected_output/add_sp_e_timing.bin - - - name: Run test ROM (mooneye-test-suite basic) - if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/basic.gb test -m 100000000 -s meowgb-tests/expected_output/basic.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/add_sp_e_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/add_sp_e_timing.bin - name: Run test ROM (mooneye-test-suite boot_hwio-dmgABCmgb) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/boot_hwio-dmgABCmgb.gb test -m 100000000 -s meowgb-tests/expected_output/boot_hwio-dmgABCmgb.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/boot_hwio-dmgABCmgb.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/boot_hwio-dmgABCmgb.bin - name: Run test ROM (mooneye-test-suite boot_regs-dmgABC) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/boot_regs-dmgABC.gb test -m 100000000 -s meowgb-tests/expected_output/boot_regs-dmgABC.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/boot_regs-dmgABC.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/boot_regs-dmgABC.bin - name: Run test ROM (mooneye-test-suite call_cc_timing) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/call_cc_timing.gb test -m 100000000 -s meowgb-tests/expected_output/call_cc_timing.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/call_cc_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/call_cc_timing.bin - name: Run test ROM (mooneye-test-suite call_cc_timing2) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/call_cc_timing2.gb test -m 100000000 -s meowgb-tests/expected_output/call_cc_timing2.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/call_cc_timing2.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/call_cc_timing2.bin - name: Run test ROM (mooneye-test-suite call_timing) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/call_timing.gb test -m 100000000 -s meowgb-tests/expected_output/call_timing.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/call_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/call_timing.bin - name: Run test ROM (mooneye-test-suite call_timing2) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/call_timing2.gb test -m 100000000 -s meowgb-tests/expected_output/call_timing2.bin - - - name: Run test ROM (mooneye-test-suite daa) - if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/daa.gb test -m 100000000 -s meowgb-tests/expected_output/daa.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/call_timing2.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/call_timing2.bin - name: Run test ROM (mooneye-test-suite di_timing-GS) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/di_timing-GS.gb test -m 100000000 -s meowgb-tests/expected_output/di_timing-GS.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/di_timing-GS.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/di_timing-GS.bin - name: Run test ROM (mooneye-test-suite div_timing) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/div_timing.gb test -m 100000000 -s meowgb-tests/expected_output/div_timing.bin - - - name: Run test ROM (mooneye-test-suite div_write) - if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/div_write.gb test -m 100000000 -s meowgb-tests/expected_output/div_write.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/div_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/div_timing.bin - name: Run test ROM (mooneye-test-suite ei_sequence) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/ei_sequence.gb test -m 100000000 -s meowgb-tests/expected_output/ei_sequence.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/ei_sequence.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/ei_sequence.bin - name: Run test ROM (mooneye-test-suite ei_timing) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/ei_timing.gb test -m 100000000 -s meowgb-tests/expected_output/ei_timing.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/ei_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/ei_timing.bin - name: Run test ROM (mooneye-test-suite halt_ime0_ei) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/halt_ime0_ei.gb test -m 100000000 -s meowgb-tests/expected_output/halt_ime0_ei.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/halt_ime0_ei.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/halt_ime0_ei.bin - name: Run test ROM (mooneye-test-suite halt_ime0_nointr_timing) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/halt_ime0_nointr_timing.gb test -m 100000000 -s meowgb-tests/expected_output/halt_ime0_nointr_timing.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/halt_ime0_nointr_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/halt_ime0_nointr_timing.bin - name: Run test ROM (mooneye-test-suite halt_ime1_timing) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/halt_ime1_timing.gb test -m 100000000 -s meowgb-tests/expected_output/halt_ime1_timing.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/halt_ime1_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/halt_ime1_timing.bin - name: Run test ROM (mooneye-test-suite halt_ime1_timing2-GS) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/halt_ime1_timing2-GS.gb test -m 100000000 -s meowgb-tests/expected_output/halt_ime1_timing2-GS.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/halt_ime1_timing2-GS.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/halt_ime1_timing2-GS.bin - - name: Run test ROM (mooneye-test-suite intr_1_2_timing-GS) + - name: Run test ROM (mooneye-test-suite if_ie_registers) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/intr_1_2_timing-GS.gb test -m 100000000 -s meowgb-tests/expected_output/intr_1_2_timing-GS.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/if_ie_registers.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/if_ie_registers.bin - - name: Run test ROM (mooneye-test-suite intr_2_0_timing) + - name: Run test ROM (mooneye-test-suite intr_timing) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/intr_2_0_timing.gb test -m 100000000 -s meowgb-tests/expected_output/intr_2_0_timing.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/intr_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/intr_timing.bin - - name: Run test ROM (mooneye-test-suite mem_oam) + - name: Run test ROM (mooneye-test-suite jp_cc_timing) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/mem_oam.gb test -m 100000000 -s meowgb-tests/expected_output/mem_oam.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/jp_cc_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/jp_cc_timing.bin + + - name: Run test ROM (mooneye-test-suite jp_timing) + if: always() + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/jp_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/jp_timing.bin + + - name: Run test ROM (mooneye-test-suite ld_hl_sp_e_timing) + if: always() + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/ld_hl_sp_e_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/ld_hl_sp_e_timing.bin - name: Run test ROM (mooneye-test-suite oam_dma_restart) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/oam_dma_restart.gb test -m 100000000 -s meowgb-tests/expected_output/oam_dma_restart.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/oam_dma_restart.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/oam_dma_restart.bin - name: Run test ROM (mooneye-test-suite oam_dma_start) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/oam_dma_start.gb test -m 100000000 -s meowgb-tests/expected_output/oam_dma_start.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/oam_dma_start.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/oam_dma_start.bin - name: Run test ROM (mooneye-test-suite oam_dma_timing) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/oam_dma_timing.gb test -m 100000000 -s meowgb-tests/expected_output/oam_dma_timing.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/oam_dma_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/oam_dma_timing.bin - name: Run test ROM (mooneye-test-suite pop_timing) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/pop_timing.gb test -m 100000000 -s meowgb-tests/expected_output/pop_timing.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/pop_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/pop_timing.bin - name: Run test ROM (mooneye-test-suite push_timing) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/push_timing.gb test -m 100000000 -s meowgb-tests/expected_output/push_timing.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/push_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/push_timing.bin - name: Run test ROM (mooneye-test-suite rapid_di_ei) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/rapid_di_ei.gb test -m 100000000 -s meowgb-tests/expected_output/rapid_di_ei.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/rapid_di_ei.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/rapid_di_ei.bin - - name: Run test ROM (mooneye-test-suite rapid_toggle) + - name: Run test ROM (mooneye-test-suite ret_cc_timing) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/rapid_toggle.gb test -m 100000000 -s meowgb-tests/expected_output/rapid_toggle.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/ret_cc_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/ret_cc_timing.bin - - name: Run test ROM (mooneye-test-suite reg_f) + - name: Run test ROM (mooneye-test-suite ret_timing) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/reg_f.gb test -m 100000000 -s meowgb-tests/expected_output/reg_f.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/ret_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/ret_timing.bin - - name: Run test ROM (mooneye-test-suite reg_read) + - name: Run test ROM (mooneye-test-suite reti_intr_timing) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/reg_read.gb test -m 100000000 -s meowgb-tests/expected_output/reg_read.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/reti_intr_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/reti_intr_timing.bin + + - name: Run test ROM (mooneye-test-suite reti_timing) + if: always() + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/reti_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/reti_timing.bin - name: Run test ROM (mooneye-test-suite rst_timing) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/rst_timing.gb test -m 100000000 -s meowgb-tests/expected_output/rst_timing.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/rst_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/rst_timing.bin - - name: Run test ROM (mooneye-test-suite stat_irq_blocking) + - name: Run test ROM (mooneye-test-suite MBC1/bits_bank1) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/stat_irq_blocking.gb test -m 100000000 -s meowgb-tests/expected_output/stat_irq_blocking.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/bits_bank1.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/MBC1/bits_bank1.bin - - name: Run test ROM (mooneye-test-suite stat_lyc_onoff) + - name: Run test ROM (mooneye-test-suite MBC1/bits_bank2) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/stat_lyc_onoff.gb test -m 100000000 -s meowgb-tests/expected_output/stat_lyc_onoff.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/bits_bank2.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/MBC1/bits_bank2.bin - - name: Run test ROM (mooneye-test-suite tim00) + - name: Run test ROM (mooneye-test-suite MBC1/bits_mode) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/tim00.gb test -m 100000000 -s meowgb-tests/expected_output/tim00.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/bits_mode.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/MBC1/bits_mode.bin - - name: Run test ROM (mooneye-test-suite tim00_div_trigger) + - name: Run test ROM (mooneye-test-suite MBC1/bits_ramg) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/tim00_div_trigger.gb test -m 100000000 -s meowgb-tests/expected_output/tim00_div_trigger.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/bits_ramg.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/MBC1/bits_ramg.bin - - name: Run test ROM (mooneye-test-suite tim01) + - name: Run test ROM (mooneye-test-suite MBC1/multicart_rom_8Mb) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/tim01.gb test -m 100000000 -s meowgb-tests/expected_output/tim01.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/multicart_rom_8Mb.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/MBC1/multicart_rom_8Mb.bin - - name: Run test ROM (mooneye-test-suite tim01_div_trigger) + - name: Run test ROM (mooneye-test-suite MBC1/ram_256kb) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/tim01_div_trigger.gb test -m 100000000 -s meowgb-tests/expected_output/tim01_div_trigger.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/ram_256kb.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/MBC1/ram_256kb.bin - - name: Run test ROM (mooneye-test-suite tim10) + - name: Run test ROM (mooneye-test-suite MBC1/ram_64kb) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/tim10.gb test -m 100000000 -s meowgb-tests/expected_output/tim10.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/ram_64kb.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/MBC1/ram_64kb.bin - - name: Run test ROM (mooneye-test-suite tim10_div_trigger) + - name: Run test ROM (mooneye-test-suite MBC1/rom_16Mb) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/tim10_div_trigger.gb test -m 100000000 -s meowgb-tests/expected_output/tim10_div_trigger.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/rom_16Mb.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/MBC1/rom_16Mb.bin - - name: Run test ROM (mooneye-test-suite tim11) + - name: Run test ROM (mooneye-test-suite MBC1/rom_1Mb) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/tim11.gb test -m 100000000 -s meowgb-tests/expected_output/tim11.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/rom_1Mb.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/MBC1/rom_1Mb.bin - - name: Run test ROM (mooneye-test-suite tim11_div_trigger) + - name: Run test ROM (mooneye-test-suite MBC1/rom_2Mb) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/tim11_div_trigger.gb test -m 100000000 -s meowgb-tests/expected_output/tim11_div_trigger.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/rom_2Mb.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/MBC1/rom_2Mb.bin - - name: Run test ROM (mooneye-test-suite tima_reload) + - name: Run test ROM (mooneye-test-suite MBC1/rom_4Mb) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/tima_reload.gb test -m 100000000 -s meowgb-tests/expected_output/tima_reload.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/rom_4Mb.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/MBC1/rom_4Mb.bin - - name: Run test ROM (mooneye-test-suite tima_write_reloading) + - name: Run test ROM (mooneye-test-suite MBC1/rom_512kb) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/tima_write_reloading.gb test -m 100000000 -s meowgb-tests/expected_output/tima_write_reloading.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/rom_512kb.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/MBC1/rom_512kb.bin - - name: Run test ROM (mooneye-test-suite tma_write_reloading) + - name: Run test ROM (mooneye-test-suite MBC1/rom_8Mb) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/tma_write_reloading.gb test -m 100000000 -s meowgb-tests/expected_output/tma_write_reloading.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/rom_8Mb.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/MBC1/rom_8Mb.bin - - name: Run test ROM (mooneye-test-suite unused_hwio-GS) + - name: Run test ROM (mooneye-test-suite bits/mem_oam) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/unused_hwio-GS.gb test -m 100000000 -s meowgb-tests/expected_output/unused_hwio-GS.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/bits/mem_oam.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/bits/mem_oam.bin - - name: Run test ROM (mooneye-test-suite vblank_stat_intr-GS) + - name: Run test ROM (mooneye-test-suite bits/reg_f) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/vblank_stat_intr-GS.gb test -m 100000000 -s meowgb-tests/expected_output/vblank_stat_intr-GS.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/bits/reg_f.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/bits/reg_f.bin - - name: Run test ROM (mooneye-test-suite bits_bank1) + - name: Run test ROM (mooneye-test-suite bits/unused_hwio-GS) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/bits_bank1.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/bits_bank1.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/bits/unused_hwio-GS.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/bits/unused_hwio-GS.bin - - name: Run test ROM (mooneye-test-suite bits_bank2) + - name: Run test ROM (mooneye-test-suite instr/daa) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/bits_bank2.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/bits_bank2.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/instr/daa.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/instr/daa.bin - - name: Run test ROM (mooneye-test-suite bits_mode) + - name: Run test ROM (mooneye-test-suite oam_dma/basic) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/bits_mode.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/bits_mode.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/oam_dma/basic.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/oam_dma/basic.bin - - name: Run test ROM (mooneye-test-suite bits_ramg) + - name: Run test ROM (mooneye-test-suite oam_dma/reg_read) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/bits_ramg.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/bits_ramg.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/oam_dma/reg_read.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/oam_dma/reg_read.bin - - name: Run test ROM (mooneye-test-suite multicart_rom_8Mb) + - name: Run test ROM (mooneye-test-suite ppu/intr_1_2_timing-GS) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/multicart_rom_8Mb.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/multicart_rom_8Mb.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/ppu/intr_1_2_timing-GS.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/ppu/intr_1_2_timing-GS.bin - - name: Run test ROM (mooneye-test-suite ram_256kb) + - name: Run test ROM (mooneye-test-suite ppu/intr_2_0_timing) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/ram_256kb.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/ram_256kb.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/ppu/intr_2_0_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/ppu/intr_2_0_timing.bin - - name: Run test ROM (mooneye-test-suite ram_64kb) + - name: Run test ROM (mooneye-test-suite ppu/stat_irq_blocking) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/ram_64kb.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/ram_64kb.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/ppu/stat_irq_blocking.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/ppu/stat_irq_blocking.bin - - name: Run test ROM (mooneye-test-suite rom_16Mb) + - name: Run test ROM (mooneye-test-suite ppu/stat_lyc_onoff) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/rom_16Mb.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/rom_16Mb.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/ppu/stat_lyc_onoff.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/ppu/stat_lyc_onoff.bin - - name: Run test ROM (mooneye-test-suite rom_1Mb) + - name: Run test ROM (mooneye-test-suite ppu/vblank_stat_intr-GS) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/rom_1Mb.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/rom_1Mb.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/ppu/vblank_stat_intr-GS.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/ppu/vblank_stat_intr-GS.bin - - name: Run test ROM (mooneye-test-suite rom_2Mb) + - name: Run test ROM (mooneye-test-suite timer/div_write) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/rom_2Mb.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/rom_2Mb.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/timer/div_write.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/timer/div_write.bin - - name: Run test ROM (mooneye-test-suite rom_4Mb) + - name: Run test ROM (mooneye-test-suite timer/rapid_toggle) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/rom_4Mb.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/rom_4Mb.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/timer/rapid_toggle.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/timer/rapid_toggle.bin - - name: Run test ROM (mooneye-test-suite rom_512kb) + - name: Run test ROM (mooneye-test-suite timer/tim00) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/rom_512kb.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/rom_512kb.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/timer/tim00.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/timer/tim00.bin - - name: Run test ROM (mooneye-test-suite rom_8Mb) + - name: Run test ROM (mooneye-test-suite timer/tim00_div_trigger) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/rom_8Mb.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/rom_8Mb.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/timer/tim00_div_trigger.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/timer/tim00_div_trigger.bin + + - name: Run test ROM (mooneye-test-suite timer/tim01) + if: always() + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/timer/tim01.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/timer/tim01.bin + + - name: Run test ROM (mooneye-test-suite timer/tim01_div_trigger) + if: always() + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/timer/tim01_div_trigger.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/timer/tim01_div_trigger.bin + + - name: Run test ROM (mooneye-test-suite timer/tim10) + if: always() + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/timer/tim10.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/timer/tim10.bin + + - name: Run test ROM (mooneye-test-suite timer/tim10_div_trigger) + if: always() + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/timer/tim10_div_trigger.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/timer/tim10_div_trigger.bin + + - name: Run test ROM (mooneye-test-suite timer/tim11) + if: always() + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/timer/tim11.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/timer/tim11.bin + + - name: Run test ROM (mooneye-test-suite timer/tim11_div_trigger) + if: always() + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/timer/tim11_div_trigger.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/timer/tim11_div_trigger.bin + + - name: Run test ROM (mooneye-test-suite timer/tima_reload) + if: always() + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/timer/tima_reload.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/timer/tima_reload.bin + + - name: Run test ROM (mooneye-test-suite timer/tima_write_reloading) + if: always() + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/timer/tima_write_reloading.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/timer/tima_write_reloading.bin + + - name: Run test ROM (mooneye-test-suite timer/tma_write_reloading) + if: always() + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/timer/tma_write_reloading.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/timer/tma_write_reloading.bin diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 38bc2d6..9c81d55 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -20,248 +20,284 @@ jobs: - name: Run test ROM (blargg cpu_instrs) if: always() - run: ./target/release/meowgb-tests test-roms/blargg/roms/cpu_instrs.gb test -m 100000000 -s meowgb-tests/expected_output/cpu_instrs.bin + run: ./target/release/meowgb-tests test-roms/blargg/roms/cpu_instrs.gb test -m 100000000 -s meowgb-tests/expected_output/blargg/cpu_instrs.bin - name: Run test ROM (blargg instr_timing) if: always() - run: ./target/release/meowgb-tests test-roms/blargg/roms/instr_timing.gb test -m 100000000 -s meowgb-tests/expected_output/instr_timing.bin + run: ./target/release/meowgb-tests test-roms/blargg/roms/instr_timing.gb test -m 100000000 -s meowgb-tests/expected_output/blargg/instr_timing.bin - name: Run test ROM (blargg mem_timing) if: always() - run: ./target/release/meowgb-tests test-roms/blargg/roms/mem_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mem_timing.bin + run: ./target/release/meowgb-tests test-roms/blargg/roms/mem_timing.gb test -m 100000000 -s meowgb-tests/expected_output/blargg/mem_timing.bin - name: Run test ROM (mooneye-test-suite add_sp_e_timing) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/add_sp_e_timing.gb test -m 100000000 -s meowgb-tests/expected_output/add_sp_e_timing.bin - - - name: Run test ROM (mooneye-test-suite basic) - if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/basic.gb test -m 100000000 -s meowgb-tests/expected_output/basic.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/add_sp_e_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/add_sp_e_timing.bin - name: Run test ROM (mooneye-test-suite boot_hwio-dmgABCmgb) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/boot_hwio-dmgABCmgb.gb test -m 100000000 -s meowgb-tests/expected_output/boot_hwio-dmgABCmgb.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/boot_hwio-dmgABCmgb.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/boot_hwio-dmgABCmgb.bin - name: Run test ROM (mooneye-test-suite boot_regs-dmgABC) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/boot_regs-dmgABC.gb test -m 100000000 -s meowgb-tests/expected_output/boot_regs-dmgABC.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/boot_regs-dmgABC.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/boot_regs-dmgABC.bin - name: Run test ROM (mooneye-test-suite call_cc_timing) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/call_cc_timing.gb test -m 100000000 -s meowgb-tests/expected_output/call_cc_timing.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/call_cc_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/call_cc_timing.bin - name: Run test ROM (mooneye-test-suite call_cc_timing2) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/call_cc_timing2.gb test -m 100000000 -s meowgb-tests/expected_output/call_cc_timing2.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/call_cc_timing2.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/call_cc_timing2.bin - name: Run test ROM (mooneye-test-suite call_timing) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/call_timing.gb test -m 100000000 -s meowgb-tests/expected_output/call_timing.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/call_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/call_timing.bin - name: Run test ROM (mooneye-test-suite call_timing2) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/call_timing2.gb test -m 100000000 -s meowgb-tests/expected_output/call_timing2.bin - - - name: Run test ROM (mooneye-test-suite daa) - if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/daa.gb test -m 100000000 -s meowgb-tests/expected_output/daa.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/call_timing2.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/call_timing2.bin - name: Run test ROM (mooneye-test-suite di_timing-GS) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/di_timing-GS.gb test -m 100000000 -s meowgb-tests/expected_output/di_timing-GS.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/di_timing-GS.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/di_timing-GS.bin - name: Run test ROM (mooneye-test-suite div_timing) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/div_timing.gb test -m 100000000 -s meowgb-tests/expected_output/div_timing.bin - - - name: Run test ROM (mooneye-test-suite div_write) - if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/div_write.gb test -m 100000000 -s meowgb-tests/expected_output/div_write.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/div_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/div_timing.bin - name: Run test ROM (mooneye-test-suite ei_sequence) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/ei_sequence.gb test -m 100000000 -s meowgb-tests/expected_output/ei_sequence.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/ei_sequence.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/ei_sequence.bin - name: Run test ROM (mooneye-test-suite ei_timing) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/ei_timing.gb test -m 100000000 -s meowgb-tests/expected_output/ei_timing.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/ei_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/ei_timing.bin - name: Run test ROM (mooneye-test-suite halt_ime0_ei) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/halt_ime0_ei.gb test -m 100000000 -s meowgb-tests/expected_output/halt_ime0_ei.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/halt_ime0_ei.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/halt_ime0_ei.bin - name: Run test ROM (mooneye-test-suite halt_ime0_nointr_timing) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/halt_ime0_nointr_timing.gb test -m 100000000 -s meowgb-tests/expected_output/halt_ime0_nointr_timing.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/halt_ime0_nointr_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/halt_ime0_nointr_timing.bin - name: Run test ROM (mooneye-test-suite halt_ime1_timing) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/halt_ime1_timing.gb test -m 100000000 -s meowgb-tests/expected_output/halt_ime1_timing.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/halt_ime1_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/halt_ime1_timing.bin - name: Run test ROM (mooneye-test-suite halt_ime1_timing2-GS) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/halt_ime1_timing2-GS.gb test -m 100000000 -s meowgb-tests/expected_output/halt_ime1_timing2-GS.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/halt_ime1_timing2-GS.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/halt_ime1_timing2-GS.bin - - name: Run test ROM (mooneye-test-suite intr_1_2_timing-GS) + - name: Run test ROM (mooneye-test-suite if_ie_registers) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/intr_1_2_timing-GS.gb test -m 100000000 -s meowgb-tests/expected_output/intr_1_2_timing-GS.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/if_ie_registers.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/if_ie_registers.bin - - name: Run test ROM (mooneye-test-suite intr_2_0_timing) + - name: Run test ROM (mooneye-test-suite intr_timing) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/intr_2_0_timing.gb test -m 100000000 -s meowgb-tests/expected_output/intr_2_0_timing.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/intr_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/intr_timing.bin - - name: Run test ROM (mooneye-test-suite mem_oam) + - name: Run test ROM (mooneye-test-suite jp_cc_timing) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/mem_oam.gb test -m 100000000 -s meowgb-tests/expected_output/mem_oam.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/jp_cc_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/jp_cc_timing.bin + + - name: Run test ROM (mooneye-test-suite jp_timing) + if: always() + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/jp_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/jp_timing.bin + + - name: Run test ROM (mooneye-test-suite ld_hl_sp_e_timing) + if: always() + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/ld_hl_sp_e_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/ld_hl_sp_e_timing.bin - name: Run test ROM (mooneye-test-suite oam_dma_restart) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/oam_dma_restart.gb test -m 100000000 -s meowgb-tests/expected_output/oam_dma_restart.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/oam_dma_restart.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/oam_dma_restart.bin - name: Run test ROM (mooneye-test-suite oam_dma_start) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/oam_dma_start.gb test -m 100000000 -s meowgb-tests/expected_output/oam_dma_start.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/oam_dma_start.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/oam_dma_start.bin - name: Run test ROM (mooneye-test-suite oam_dma_timing) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/oam_dma_timing.gb test -m 100000000 -s meowgb-tests/expected_output/oam_dma_timing.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/oam_dma_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/oam_dma_timing.bin - name: Run test ROM (mooneye-test-suite pop_timing) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/pop_timing.gb test -m 100000000 -s meowgb-tests/expected_output/pop_timing.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/pop_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/pop_timing.bin - name: Run test ROM (mooneye-test-suite push_timing) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/push_timing.gb test -m 100000000 -s meowgb-tests/expected_output/push_timing.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/push_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/push_timing.bin - name: Run test ROM (mooneye-test-suite rapid_di_ei) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/rapid_di_ei.gb test -m 100000000 -s meowgb-tests/expected_output/rapid_di_ei.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/rapid_di_ei.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/rapid_di_ei.bin - - name: Run test ROM (mooneye-test-suite rapid_toggle) + - name: Run test ROM (mooneye-test-suite ret_cc_timing) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/rapid_toggle.gb test -m 100000000 -s meowgb-tests/expected_output/rapid_toggle.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/ret_cc_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/ret_cc_timing.bin - - name: Run test ROM (mooneye-test-suite reg_f) + - name: Run test ROM (mooneye-test-suite ret_timing) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/reg_f.gb test -m 100000000 -s meowgb-tests/expected_output/reg_f.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/ret_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/ret_timing.bin - - name: Run test ROM (mooneye-test-suite reg_read) + - name: Run test ROM (mooneye-test-suite reti_intr_timing) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/reg_read.gb test -m 100000000 -s meowgb-tests/expected_output/reg_read.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/reti_intr_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/reti_intr_timing.bin + + - name: Run test ROM (mooneye-test-suite reti_timing) + if: always() + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/reti_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/reti_timing.bin - name: Run test ROM (mooneye-test-suite rst_timing) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/rst_timing.gb test -m 100000000 -s meowgb-tests/expected_output/rst_timing.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/rst_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/rst_timing.bin - - name: Run test ROM (mooneye-test-suite stat_irq_blocking) + - name: Run test ROM (mooneye-test-suite MBC1/bits_bank1) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/stat_irq_blocking.gb test -m 100000000 -s meowgb-tests/expected_output/stat_irq_blocking.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/bits_bank1.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/MBC1/bits_bank1.bin - - name: Run test ROM (mooneye-test-suite stat_lyc_onoff) + - name: Run test ROM (mooneye-test-suite MBC1/bits_bank2) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/stat_lyc_onoff.gb test -m 100000000 -s meowgb-tests/expected_output/stat_lyc_onoff.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/bits_bank2.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/MBC1/bits_bank2.bin - - name: Run test ROM (mooneye-test-suite tim00) + - name: Run test ROM (mooneye-test-suite MBC1/bits_mode) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/tim00.gb test -m 100000000 -s meowgb-tests/expected_output/tim00.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/bits_mode.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/MBC1/bits_mode.bin - - name: Run test ROM (mooneye-test-suite tim00_div_trigger) + - name: Run test ROM (mooneye-test-suite MBC1/bits_ramg) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/tim00_div_trigger.gb test -m 100000000 -s meowgb-tests/expected_output/tim00_div_trigger.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/bits_ramg.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/MBC1/bits_ramg.bin - - name: Run test ROM (mooneye-test-suite tim01) + - name: Run test ROM (mooneye-test-suite MBC1/multicart_rom_8Mb) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/tim01.gb test -m 100000000 -s meowgb-tests/expected_output/tim01.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/multicart_rom_8Mb.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/MBC1/multicart_rom_8Mb.bin - - name: Run test ROM (mooneye-test-suite tim01_div_trigger) + - name: Run test ROM (mooneye-test-suite MBC1/ram_256kb) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/tim01_div_trigger.gb test -m 100000000 -s meowgb-tests/expected_output/tim01_div_trigger.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/ram_256kb.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/MBC1/ram_256kb.bin - - name: Run test ROM (mooneye-test-suite tim10) + - name: Run test ROM (mooneye-test-suite MBC1/ram_64kb) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/tim10.gb test -m 100000000 -s meowgb-tests/expected_output/tim10.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/ram_64kb.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/MBC1/ram_64kb.bin - - name: Run test ROM (mooneye-test-suite tim10_div_trigger) + - name: Run test ROM (mooneye-test-suite MBC1/rom_16Mb) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/tim10_div_trigger.gb test -m 100000000 -s meowgb-tests/expected_output/tim10_div_trigger.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/rom_16Mb.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/MBC1/rom_16Mb.bin - - name: Run test ROM (mooneye-test-suite tim11) + - name: Run test ROM (mooneye-test-suite MBC1/rom_1Mb) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/tim11.gb test -m 100000000 -s meowgb-tests/expected_output/tim11.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/rom_1Mb.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/MBC1/rom_1Mb.bin - - name: Run test ROM (mooneye-test-suite tim11_div_trigger) + - name: Run test ROM (mooneye-test-suite MBC1/rom_2Mb) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/tim11_div_trigger.gb test -m 100000000 -s meowgb-tests/expected_output/tim11_div_trigger.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/rom_2Mb.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/MBC1/rom_2Mb.bin - - name: Run test ROM (mooneye-test-suite tima_reload) + - name: Run test ROM (mooneye-test-suite MBC1/rom_4Mb) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/tima_reload.gb test -m 100000000 -s meowgb-tests/expected_output/tima_reload.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/rom_4Mb.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/MBC1/rom_4Mb.bin - - name: Run test ROM (mooneye-test-suite tima_write_reloading) + - name: Run test ROM (mooneye-test-suite MBC1/rom_512kb) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/tima_write_reloading.gb test -m 100000000 -s meowgb-tests/expected_output/tima_write_reloading.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/rom_512kb.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/MBC1/rom_512kb.bin - - name: Run test ROM (mooneye-test-suite tma_write_reloading) + - name: Run test ROM (mooneye-test-suite MBC1/rom_8Mb) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/tma_write_reloading.gb test -m 100000000 -s meowgb-tests/expected_output/tma_write_reloading.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/rom_8Mb.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/MBC1/rom_8Mb.bin - - name: Run test ROM (mooneye-test-suite unused_hwio-GS) + - name: Run test ROM (mooneye-test-suite bits/mem_oam) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/unused_hwio-GS.gb test -m 100000000 -s meowgb-tests/expected_output/unused_hwio-GS.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/bits/mem_oam.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/bits/mem_oam.bin - - name: Run test ROM (mooneye-test-suite vblank_stat_intr-GS) + - name: Run test ROM (mooneye-test-suite bits/reg_f) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/vblank_stat_intr-GS.gb test -m 100000000 -s meowgb-tests/expected_output/vblank_stat_intr-GS.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/bits/reg_f.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/bits/reg_f.bin - - name: Run test ROM (mooneye-test-suite bits_bank1) + - name: Run test ROM (mooneye-test-suite bits/unused_hwio-GS) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/bits_bank1.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/bits_bank1.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/bits/unused_hwio-GS.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/bits/unused_hwio-GS.bin - - name: Run test ROM (mooneye-test-suite bits_bank2) + - name: Run test ROM (mooneye-test-suite instr/daa) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/bits_bank2.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/bits_bank2.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/instr/daa.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/instr/daa.bin - - name: Run test ROM (mooneye-test-suite bits_mode) + - name: Run test ROM (mooneye-test-suite oam_dma/basic) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/bits_mode.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/bits_mode.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/oam_dma/basic.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/oam_dma/basic.bin - - name: Run test ROM (mooneye-test-suite bits_ramg) + - name: Run test ROM (mooneye-test-suite oam_dma/reg_read) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/bits_ramg.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/bits_ramg.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/oam_dma/reg_read.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/oam_dma/reg_read.bin - - name: Run test ROM (mooneye-test-suite multicart_rom_8Mb) + - name: Run test ROM (mooneye-test-suite ppu/intr_1_2_timing-GS) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/multicart_rom_8Mb.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/multicart_rom_8Mb.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/ppu/intr_1_2_timing-GS.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/ppu/intr_1_2_timing-GS.bin - - name: Run test ROM (mooneye-test-suite ram_256kb) + - name: Run test ROM (mooneye-test-suite ppu/intr_2_0_timing) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/ram_256kb.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/ram_256kb.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/ppu/intr_2_0_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/ppu/intr_2_0_timing.bin - - name: Run test ROM (mooneye-test-suite ram_64kb) + - name: Run test ROM (mooneye-test-suite ppu/stat_irq_blocking) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/ram_64kb.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/ram_64kb.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/ppu/stat_irq_blocking.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/ppu/stat_irq_blocking.bin - - name: Run test ROM (mooneye-test-suite rom_16Mb) + - name: Run test ROM (mooneye-test-suite ppu/stat_lyc_onoff) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/rom_16Mb.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/rom_16Mb.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/ppu/stat_lyc_onoff.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/ppu/stat_lyc_onoff.bin - - name: Run test ROM (mooneye-test-suite rom_1Mb) + - name: Run test ROM (mooneye-test-suite ppu/vblank_stat_intr-GS) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/rom_1Mb.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/rom_1Mb.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/ppu/vblank_stat_intr-GS.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/ppu/vblank_stat_intr-GS.bin - - name: Run test ROM (mooneye-test-suite rom_2Mb) + - name: Run test ROM (mooneye-test-suite timer/div_write) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/rom_2Mb.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/rom_2Mb.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/timer/div_write.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/timer/div_write.bin - - name: Run test ROM (mooneye-test-suite rom_4Mb) + - name: Run test ROM (mooneye-test-suite timer/rapid_toggle) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/rom_4Mb.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/rom_4Mb.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/timer/rapid_toggle.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/timer/rapid_toggle.bin - - name: Run test ROM (mooneye-test-suite rom_512kb) + - name: Run test ROM (mooneye-test-suite timer/tim00) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/rom_512kb.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/rom_512kb.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/timer/tim00.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/timer/tim00.bin - - name: Run test ROM (mooneye-test-suite rom_8Mb) + - name: Run test ROM (mooneye-test-suite timer/tim00_div_trigger) if: always() - run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/rom_8Mb.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/rom_8Mb.bin + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/timer/tim00_div_trigger.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/timer/tim00_div_trigger.bin + + - name: Run test ROM (mooneye-test-suite timer/tim01) + if: always() + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/timer/tim01.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/timer/tim01.bin + + - name: Run test ROM (mooneye-test-suite timer/tim01_div_trigger) + if: always() + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/timer/tim01_div_trigger.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/timer/tim01_div_trigger.bin + + - name: Run test ROM (mooneye-test-suite timer/tim10) + if: always() + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/timer/tim10.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/timer/tim10.bin + + - name: Run test ROM (mooneye-test-suite timer/tim10_div_trigger) + if: always() + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/timer/tim10_div_trigger.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/timer/tim10_div_trigger.bin + + - name: Run test ROM (mooneye-test-suite timer/tim11) + if: always() + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/timer/tim11.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/timer/tim11.bin + + - name: Run test ROM (mooneye-test-suite timer/tim11_div_trigger) + if: always() + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/timer/tim11_div_trigger.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/timer/tim11_div_trigger.bin + + - name: Run test ROM (mooneye-test-suite timer/tima_reload) + if: always() + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/timer/tima_reload.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/timer/tima_reload.bin + + - name: Run test ROM (mooneye-test-suite timer/tima_write_reloading) + if: always() + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/timer/tima_write_reloading.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/timer/tima_write_reloading.bin + + - name: Run test ROM (mooneye-test-suite timer/tma_write_reloading) + if: always() + run: ./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/timer/tma_write_reloading.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/timer/tma_write_reloading.bin diff --git a/generate-action-and-tests.sh b/generate-action-and-tests.sh index 915520f..4ee1688 100755 --- a/generate-action-and-tests.sh +++ b/generate-action-and-tests.sh @@ -53,7 +53,7 @@ EOF for full_f in ./test-roms/blargg/roms/*.gb do f="${full_f##*/}"; f="${f%.*}"; - TEST_CMD="./target/release/meowgb-tests test-roms/blargg/roms/$f.gb test -m 100000000 -s meowgb-tests/expected_output/$f.bin" + TEST_CMD="./target/release/meowgb-tests test-roms/blargg/roms/$f.gb test -m 100000000 -s meowgb-tests/expected_output/blargg/$f.bin" cat >>$TEST_SCRIPT_OUTPUT_FILE << EOF @@ -69,7 +69,7 @@ fi EOF cat >>$TEST_MD_FILE << EOF -* $f.gb - [ROM]($full_f) - [Expected Serial Output](./meowgb-tests/expected_output/$f.bin) +* $f.gb - [ROM]($full_f) - [Expected Serial Output](./meowgb-tests/expected_output/blargg/$f.bin) EOF tee -a $GH_ACTION_OUTPUT_FILE $FJ_ACTION_OUTPUT_FILE >/dev/null << EOF @@ -89,7 +89,7 @@ EOF for full_f in ./test-roms/mooneye-test-suite/roms/*.gb do f="${full_f##*/}"; f="${f%.*}"; - TEST_CMD="./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/$f.gb test -m 100000000 -s meowgb-tests/expected_output/$f.bin" + TEST_CMD="./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/$f.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/$f.bin" cat >>$TEST_SCRIPT_OUTPUT_FILE << EOF @@ -105,7 +105,7 @@ fi EOF cat >>$TEST_MD_FILE << EOF -* $f.gb - [ROM]($full_f) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/$f.bin) +* $f.gb - [ROM]($full_f) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/$f.bin) EOF tee -a $GH_ACTION_OUTPUT_FILE $FJ_ACTION_OUTPUT_FILE >/dev/null << EOF @@ -116,16 +116,20 @@ EOF EOF done -cat >>$TEST_MD_FILE << EOF +for directory in ./test-roms/mooneye-test-suite/roms/*/ +do + d=$(basename $directory) -### MBC1 + cat >>$TEST_MD_FILE << EOF + +### $d EOF -for full_f in ./test-roms/mooneye-test-suite/roms/MBC1/**.gb -do + for full_f in ./test-roms/mooneye-test-suite/roms/$d/*.gb + do f="${full_f##*/}"; f="${f%.*}"; - TEST_CMD="./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/$f.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/$f.bin" + TEST_CMD="./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/$d/$f.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/$d/$f.bin" cat >>$TEST_SCRIPT_OUTPUT_FILE << EOF @@ -141,15 +145,17 @@ fi EOF cat >>$TEST_MD_FILE << EOF -* $f.gb - [ROM]($full_f) - [Expected Serial Output](./meowgb-tests/expected_output/$f.bin) +* $d/$f.gb - [ROM]($full_f) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/$d/$f.bin) EOF tee -a $GH_ACTION_OUTPUT_FILE $FJ_ACTION_OUTPUT_FILE >/dev/null << EOF - - name: Run test ROM (mooneye-test-suite $f) + - name: Run test ROM (mooneye-test-suite $d/$f) if: always() run: $TEST_CMD EOF + done + done cat >>$TEST_SCRIPT_OUTPUT_FILE << EOF diff --git a/meowgb-core/src/gameboy/dma.rs b/meowgb-core/src/gameboy/dma.rs index 7f3605b..ea937a8 100644 --- a/meowgb-core/src/gameboy/dma.rs +++ b/meowgb-core/src/gameboy/dma.rs @@ -10,10 +10,9 @@ pub enum DmaMemoryBus { impl DmaMemoryBus { pub fn from_base(base: u8) -> Self { match base { - 0..=0x7F - | 0xA0..=0xFD => Self::External, + 0..=0x7F | 0xA0..=0xFD => Self::External, 0x80..=0x9F => Self::Video, - _ => Self::Other + _ => Self::Other, } } @@ -45,9 +44,7 @@ pub struct DmaState { impl DmaState { pub fn is_conflict(&self, address: u16) -> bool { - self.in_progress().map(|bus| { - bus.conflict_in_range(address) - }).unwrap_or_default() + self.in_progress().map(|bus| bus.conflict_in_range(address)).unwrap_or_default() } pub fn in_progress(&self) -> Option { @@ -58,7 +55,13 @@ impl DmaState { } pub fn new() -> Self { - Self { dma_in_progress: false, original_base: 0, base: 0, remaining_cycles: 0, restarting: None } + Self { + dma_in_progress: false, + original_base: 0, + base: 0, + remaining_cycles: 0, + restarting: None, + } } pub fn init_request(&mut self, base: u8) { diff --git a/meowgb-core/src/gameboy/mapper/mbc1.rs b/meowgb-core/src/gameboy/mapper/mbc1.rs index f257a6d..a41b638 100644 --- a/meowgb-core/src/gameboy/mapper/mbc1.rs +++ b/meowgb-core/src/gameboy/mapper/mbc1.rs @@ -9,11 +9,19 @@ pub struct MBC1 { rom_bank_number: u8, extra_2_bit_reg: u8, banking_mode_select: bool, + is_mbc1m: bool, } impl MBC1 { pub fn new(data: Vec) -> Self { - let rom_bank_count = 0b10 << data[0x148]; + assert!(data[0x147] >= 1 && data[0x147] <= 0x3); + let rom_bank_count = data[0x148]; + assert!(rom_bank_count <= 0x6, "{:#X}", rom_bank_count); + + let rom_length = (1 << rom_bank_count as usize) * 0x8000; + + assert_eq!(data.len(), rom_length); + let ram_bank_count = match data[0x149] { 0 | 1 => 0, 2 => 1, @@ -23,13 +31,16 @@ impl MBC1 { _ => panic!("Bad RAM bank count for MBC1"), }; - let ram = match ram_bank_count { + let ram = match data[0x149] { 0 | 1 => None, 2 | 3 | 4 | 5 => Some(vec![0u8; ram_bank_count as usize * (8 * 1024)]), _ => panic!("Bad RAM bank count for MBC1"), }; - assert_eq!(data.len(), rom_bank_count as usize * (16 * 1024)); + let is_mbc1m = match rom_bank_count > 3 { + true => &data[0x104..0x134] == &data[((0x10 << 14) + 0x104)..((0x10 << 14) + 0x134)], + false => false, + }; Self { rom: data, @@ -40,18 +51,16 @@ impl MBC1 { ram, ram_bank_count, banking_mode_select: false, + is_mbc1m, } } fn set_ram_enabled(&mut self, val: u8) { - self.ram_enabled = val & 0xA != 0; + self.ram_enabled = val & 0b1111 == 0xA; } - fn set_rom_bank_number(&mut self, mut val: u8) { - if val == 0 { - val = 1; - } - self.rom_bank_number = val & 0b1_1111; + fn set_rom_bank_number(&mut self, val: u8) { + self.rom_bank_number = (val & 0b11111).max(1); } fn set_extra_2_bit_reg(&mut self, val: u8) { @@ -63,30 +72,44 @@ impl MBC1 { } fn is_large_rom(&self) -> bool { - self.rom_bank_count >= 64 + self.rom_bank_count >= 5 } #[allow(unused)] fn is_large_ram(&self) -> bool { - self.ram_bank_count > 2 + self.ram_bank_count >= 4 } } impl Mapper for MBC1 { fn read_rom_u8(&self, address: u16) -> u8 { - if address <= 0x3FFF { - self.rom[if self.is_large_rom() && self.banking_mode_select { - ((self.extra_2_bit_reg << 5) as usize * 0x4000) + address as usize - } else { - address as usize - }] - } else { - self.rom[if self.is_large_rom() { - (self.rom_bank_number | (self.extra_2_bit_reg << 5)) as usize * 0x4000 - } else { - self.rom_bank_number as usize * 0x4000 - } + (address as usize - 0x4000)] - } + let mask = match self.rom_bank_count { + 0 => 0b1, + 1 => 0b11, + 2 => 0b111, + 3 => 0b1111, + 4 => 0b11111, + 5 => 0b111111, + 6 => 0b1111111, + _ => unreachable!(), + }; + let rom_bank = match address <= 0x3FFF { + true if self.banking_mode_select && self.is_mbc1m => { + (self.extra_2_bit_reg << 4) as usize + } + true if self.is_large_rom() && self.banking_mode_select && !self.is_mbc1m => { + ((self.extra_2_bit_reg as usize) << 5) & mask + } + true => 0, + false if self.is_mbc1m => { + ((self.rom_bank_number & 0b1111) | (self.extra_2_bit_reg << 4)) as usize + } + false => (self.rom_bank_number | (self.extra_2_bit_reg << 5)) as usize, + } & mask; + + let real_address = rom_bank << 14 | (address as usize & 0x3FFF); + + self.rom[real_address] } fn write_rom_u8(&mut self, address: u16, value: u8) { @@ -100,22 +123,33 @@ impl Mapper for MBC1 { } fn read_eram_u8(&self, address: u16) -> u8 { + let is_large_ram = self.is_large_ram(); + + if !self.ram_enabled { + return 0xFF; + } + match self.ram.as_ref() { - Some(ram) => match self.is_large_rom() { - true => ram[address as usize], - false => ram[(self.extra_2_bit_reg as usize * 0x2000) + address as usize], - }, + Some(ram) if is_large_ram && self.banking_mode_select => { + ram[(self.extra_2_bit_reg as usize * 0x2000) + address as usize] + } + Some(ram) => ram[address as usize], None => 0xFF, } } fn write_eram_u8(&mut self, address: u16, value: u8) { - let is_large_rom = self.is_large_rom(); + let is_large_ram = self.is_large_ram(); + + if !self.ram_enabled { + return; + } + match self.ram.as_mut() { - Some(ram) => match is_large_rom { - true => ram[address as usize] = value, - false => ram[(self.extra_2_bit_reg as usize * 0x2000) + address as usize] = value, - }, + Some(ram) if is_large_ram && self.banking_mode_select => { + ram[(self.extra_2_bit_reg as usize * 0x2000) + address as usize] = value + } + Some(ram) => ram[address as usize] = value, None => {} } } diff --git a/meowgb-core/src/gameboy/ppu.rs b/meowgb-core/src/gameboy/ppu.rs index c15dd22..70fcfc8 100644 --- a/meowgb-core/src/gameboy/ppu.rs +++ b/meowgb-core/src/gameboy/ppu.rs @@ -1,4 +1,4 @@ -use super::{interrupts::Interrupts, dma::DmaState}; +use super::{dma::DmaState, interrupts::Interrupts}; pub const FB_HEIGHT: u32 = 144; pub const FB_WIDTH: u32 = 160; diff --git a/meowgb-tests/expected_output/MBC1/bits_mode.bin b/meowgb-tests/expected_output/MBC1/bits_mode.bin deleted file mode 100644 index 6dac7b9..0000000 --- a/meowgb-tests/expected_output/MBC1/bits_mode.bin +++ /dev/null @@ -1 +0,0 @@ -BBBBBB \ No newline at end of file diff --git a/meowgb-tests/expected_output/MBC1/bits_ramg.bin b/meowgb-tests/expected_output/MBC1/bits_ramg.bin deleted file mode 100644 index 6dac7b9..0000000 --- a/meowgb-tests/expected_output/MBC1/bits_ramg.bin +++ /dev/null @@ -1 +0,0 @@ -BBBBBB \ No newline at end of file diff --git a/meowgb-tests/expected_output/MBC1/multicart_rom_8Mb.bin b/meowgb-tests/expected_output/MBC1/multicart_rom_8Mb.bin deleted file mode 100644 index 6dac7b9..0000000 --- a/meowgb-tests/expected_output/MBC1/multicart_rom_8Mb.bin +++ /dev/null @@ -1 +0,0 @@ -BBBBBB \ No newline at end of file diff --git a/meowgb-tests/expected_output/MBC1/ram_256kb.bin b/meowgb-tests/expected_output/MBC1/ram_256kb.bin deleted file mode 100644 index 6dac7b9..0000000 --- a/meowgb-tests/expected_output/MBC1/ram_256kb.bin +++ /dev/null @@ -1 +0,0 @@ -BBBBBB \ No newline at end of file diff --git a/meowgb-tests/expected_output/MBC1/ram_64kb.bin b/meowgb-tests/expected_output/MBC1/ram_64kb.bin deleted file mode 100644 index 6dac7b9..0000000 --- a/meowgb-tests/expected_output/MBC1/ram_64kb.bin +++ /dev/null @@ -1 +0,0 @@ -BBBBBB \ No newline at end of file diff --git a/meowgb-tests/expected_output/MBC1/rom_16Mb.bin b/meowgb-tests/expected_output/MBC1/rom_16Mb.bin deleted file mode 100644 index 6dac7b9..0000000 --- a/meowgb-tests/expected_output/MBC1/rom_16Mb.bin +++ /dev/null @@ -1 +0,0 @@ -BBBBBB \ No newline at end of file diff --git a/meowgb-tests/expected_output/MBC1/rom_1Mb.bin b/meowgb-tests/expected_output/MBC1/rom_1Mb.bin deleted file mode 100644 index 6dac7b9..0000000 --- a/meowgb-tests/expected_output/MBC1/rom_1Mb.bin +++ /dev/null @@ -1 +0,0 @@ -BBBBBB \ No newline at end of file diff --git a/meowgb-tests/expected_output/MBC1/rom_2Mb.bin b/meowgb-tests/expected_output/MBC1/rom_2Mb.bin deleted file mode 100644 index 6dac7b9..0000000 --- a/meowgb-tests/expected_output/MBC1/rom_2Mb.bin +++ /dev/null @@ -1 +0,0 @@ -BBBBBB \ No newline at end of file diff --git a/meowgb-tests/expected_output/MBC1/rom_4Mb.bin b/meowgb-tests/expected_output/MBC1/rom_4Mb.bin deleted file mode 100644 index 6dac7b9..0000000 --- a/meowgb-tests/expected_output/MBC1/rom_4Mb.bin +++ /dev/null @@ -1 +0,0 @@ -BBBBBB \ No newline at end of file diff --git a/meowgb-tests/expected_output/MBC1/rom_512kb.bin b/meowgb-tests/expected_output/MBC1/rom_512kb.bin deleted file mode 100644 index 6dac7b9..0000000 --- a/meowgb-tests/expected_output/MBC1/rom_512kb.bin +++ /dev/null @@ -1 +0,0 @@ -BBBBBB \ No newline at end of file diff --git a/meowgb-tests/expected_output/MBC1/rom_8Mb.bin b/meowgb-tests/expected_output/MBC1/rom_8Mb.bin deleted file mode 100644 index 6dac7b9..0000000 --- a/meowgb-tests/expected_output/MBC1/rom_8Mb.bin +++ /dev/null @@ -1 +0,0 @@ -BBBBBB \ No newline at end of file diff --git a/meowgb-tests/expected_output/cpu_instrs.bin b/meowgb-tests/expected_output/blargg/cpu_instrs.bin similarity index 100% rename from meowgb-tests/expected_output/cpu_instrs.bin rename to meowgb-tests/expected_output/blargg/cpu_instrs.bin diff --git a/meowgb-tests/expected_output/instr_timing.bin b/meowgb-tests/expected_output/blargg/instr_timing.bin similarity index 100% rename from meowgb-tests/expected_output/instr_timing.bin rename to meowgb-tests/expected_output/blargg/instr_timing.bin diff --git a/meowgb-tests/expected_output/mem_timing.bin b/meowgb-tests/expected_output/blargg/mem_timing.bin similarity index 100% rename from meowgb-tests/expected_output/mem_timing.bin rename to meowgb-tests/expected_output/blargg/mem_timing.bin diff --git a/meowgb-tests/expected_output/MBC1/bits_bank1.bin b/meowgb-tests/expected_output/mooneye-test-suite/MBC1/bits_bank1.bin similarity index 100% rename from meowgb-tests/expected_output/MBC1/bits_bank1.bin rename to meowgb-tests/expected_output/mooneye-test-suite/MBC1/bits_bank1.bin diff --git a/meowgb-tests/expected_output/MBC1/bits_bank2.bin b/meowgb-tests/expected_output/mooneye-test-suite/MBC1/bits_bank2.bin similarity index 100% rename from meowgb-tests/expected_output/MBC1/bits_bank2.bin rename to meowgb-tests/expected_output/mooneye-test-suite/MBC1/bits_bank2.bin diff --git a/meowgb-tests/expected_output/add_sp_e_timing.bin b/meowgb-tests/expected_output/mooneye-test-suite/MBC1/bits_mode.bin similarity index 100% rename from meowgb-tests/expected_output/add_sp_e_timing.bin rename to meowgb-tests/expected_output/mooneye-test-suite/MBC1/bits_mode.bin diff --git a/meowgb-tests/expected_output/basic.bin b/meowgb-tests/expected_output/mooneye-test-suite/MBC1/bits_ramg.bin similarity index 100% rename from meowgb-tests/expected_output/basic.bin rename to meowgb-tests/expected_output/mooneye-test-suite/MBC1/bits_ramg.bin diff --git a/meowgb-tests/expected_output/boot_hwio-dmgABCmgb.bin b/meowgb-tests/expected_output/mooneye-test-suite/MBC1/multicart_rom_8Mb.bin similarity index 100% rename from meowgb-tests/expected_output/boot_hwio-dmgABCmgb.bin rename to meowgb-tests/expected_output/mooneye-test-suite/MBC1/multicart_rom_8Mb.bin diff --git a/meowgb-tests/expected_output/boot_regs-dmgABC.bin b/meowgb-tests/expected_output/mooneye-test-suite/MBC1/ram_256kb.bin similarity index 100% rename from meowgb-tests/expected_output/boot_regs-dmgABC.bin rename to meowgb-tests/expected_output/mooneye-test-suite/MBC1/ram_256kb.bin diff --git a/meowgb-tests/expected_output/call_cc_timing.bin b/meowgb-tests/expected_output/mooneye-test-suite/MBC1/ram_64kb.bin similarity index 100% rename from meowgb-tests/expected_output/call_cc_timing.bin rename to meowgb-tests/expected_output/mooneye-test-suite/MBC1/ram_64kb.bin diff --git a/meowgb-tests/expected_output/call_cc_timing2.bin b/meowgb-tests/expected_output/mooneye-test-suite/MBC1/rom_16Mb.bin similarity index 100% rename from meowgb-tests/expected_output/call_cc_timing2.bin rename to meowgb-tests/expected_output/mooneye-test-suite/MBC1/rom_16Mb.bin diff --git a/meowgb-tests/expected_output/call_timing.bin b/meowgb-tests/expected_output/mooneye-test-suite/MBC1/rom_1Mb.bin similarity index 100% rename from meowgb-tests/expected_output/call_timing.bin rename to meowgb-tests/expected_output/mooneye-test-suite/MBC1/rom_1Mb.bin diff --git a/meowgb-tests/expected_output/call_timing2.bin b/meowgb-tests/expected_output/mooneye-test-suite/MBC1/rom_2Mb.bin similarity index 100% rename from meowgb-tests/expected_output/call_timing2.bin rename to meowgb-tests/expected_output/mooneye-test-suite/MBC1/rom_2Mb.bin diff --git a/meowgb-tests/expected_output/daa.bin b/meowgb-tests/expected_output/mooneye-test-suite/MBC1/rom_4Mb.bin similarity index 100% rename from meowgb-tests/expected_output/daa.bin rename to meowgb-tests/expected_output/mooneye-test-suite/MBC1/rom_4Mb.bin diff --git a/meowgb-tests/expected_output/di_timing-GS.bin b/meowgb-tests/expected_output/mooneye-test-suite/MBC1/rom_512kb.bin similarity index 100% rename from meowgb-tests/expected_output/di_timing-GS.bin rename to meowgb-tests/expected_output/mooneye-test-suite/MBC1/rom_512kb.bin diff --git a/meowgb-tests/expected_output/div_timing.bin b/meowgb-tests/expected_output/mooneye-test-suite/MBC1/rom_8Mb.bin similarity index 100% rename from meowgb-tests/expected_output/div_timing.bin rename to meowgb-tests/expected_output/mooneye-test-suite/MBC1/rom_8Mb.bin diff --git a/meowgb-tests/expected_output/div_write.bin b/meowgb-tests/expected_output/mooneye-test-suite/add_sp_e_timing.bin similarity index 100% rename from meowgb-tests/expected_output/div_write.bin rename to meowgb-tests/expected_output/mooneye-test-suite/add_sp_e_timing.bin diff --git a/meowgb-tests/expected_output/mem_oam.bin b/meowgb-tests/expected_output/mooneye-test-suite/bits/mem_oam.bin similarity index 100% rename from meowgb-tests/expected_output/mem_oam.bin rename to meowgb-tests/expected_output/mooneye-test-suite/bits/mem_oam.bin diff --git a/meowgb-tests/expected_output/reg_f.bin b/meowgb-tests/expected_output/mooneye-test-suite/bits/reg_f.bin similarity index 100% rename from meowgb-tests/expected_output/reg_f.bin rename to meowgb-tests/expected_output/mooneye-test-suite/bits/reg_f.bin diff --git a/meowgb-tests/expected_output/unused_hwio-GS.bin b/meowgb-tests/expected_output/mooneye-test-suite/bits/unused_hwio-GS.bin similarity index 100% rename from meowgb-tests/expected_output/unused_hwio-GS.bin rename to meowgb-tests/expected_output/mooneye-test-suite/bits/unused_hwio-GS.bin diff --git a/meowgb-tests/expected_output/ei_sequence.bin b/meowgb-tests/expected_output/mooneye-test-suite/boot_hwio-dmgABCmgb.bin similarity index 100% rename from meowgb-tests/expected_output/ei_sequence.bin rename to meowgb-tests/expected_output/mooneye-test-suite/boot_hwio-dmgABCmgb.bin diff --git a/meowgb-tests/expected_output/ei_timing.bin b/meowgb-tests/expected_output/mooneye-test-suite/boot_regs-dmgABC.bin similarity index 100% rename from meowgb-tests/expected_output/ei_timing.bin rename to meowgb-tests/expected_output/mooneye-test-suite/boot_regs-dmgABC.bin diff --git a/meowgb-tests/expected_output/halt_ime0_ei.bin b/meowgb-tests/expected_output/mooneye-test-suite/call_cc_timing.bin similarity index 100% rename from meowgb-tests/expected_output/halt_ime0_ei.bin rename to meowgb-tests/expected_output/mooneye-test-suite/call_cc_timing.bin diff --git a/meowgb-tests/expected_output/halt_ime0_nointr_timing.bin b/meowgb-tests/expected_output/mooneye-test-suite/call_cc_timing2.bin similarity index 100% rename from meowgb-tests/expected_output/halt_ime0_nointr_timing.bin rename to meowgb-tests/expected_output/mooneye-test-suite/call_cc_timing2.bin diff --git a/meowgb-tests/expected_output/halt_ime1_timing.bin b/meowgb-tests/expected_output/mooneye-test-suite/call_timing.bin similarity index 100% rename from meowgb-tests/expected_output/halt_ime1_timing.bin rename to meowgb-tests/expected_output/mooneye-test-suite/call_timing.bin diff --git a/meowgb-tests/expected_output/halt_ime1_timing2-GS.bin b/meowgb-tests/expected_output/mooneye-test-suite/call_timing2.bin similarity index 100% rename from meowgb-tests/expected_output/halt_ime1_timing2-GS.bin rename to meowgb-tests/expected_output/mooneye-test-suite/call_timing2.bin diff --git a/meowgb-tests/expected_output/intr_1_2_timing-GS.bin b/meowgb-tests/expected_output/mooneye-test-suite/di_timing-GS.bin similarity index 100% rename from meowgb-tests/expected_output/intr_1_2_timing-GS.bin rename to meowgb-tests/expected_output/mooneye-test-suite/di_timing-GS.bin diff --git a/meowgb-tests/expected_output/intr_2_0_timing.bin b/meowgb-tests/expected_output/mooneye-test-suite/div_timing.bin similarity index 100% rename from meowgb-tests/expected_output/intr_2_0_timing.bin rename to meowgb-tests/expected_output/mooneye-test-suite/div_timing.bin diff --git a/meowgb-tests/expected_output/oam_dma_restart.bin b/meowgb-tests/expected_output/mooneye-test-suite/ei_sequence.bin similarity index 100% rename from meowgb-tests/expected_output/oam_dma_restart.bin rename to meowgb-tests/expected_output/mooneye-test-suite/ei_sequence.bin diff --git a/meowgb-tests/expected_output/oam_dma_start.bin b/meowgb-tests/expected_output/mooneye-test-suite/ei_timing.bin similarity index 100% rename from meowgb-tests/expected_output/oam_dma_start.bin rename to meowgb-tests/expected_output/mooneye-test-suite/ei_timing.bin diff --git a/meowgb-tests/expected_output/oam_dma_timing.bin b/meowgb-tests/expected_output/mooneye-test-suite/halt_ime0_ei.bin similarity index 100% rename from meowgb-tests/expected_output/oam_dma_timing.bin rename to meowgb-tests/expected_output/mooneye-test-suite/halt_ime0_ei.bin diff --git a/meowgb-tests/expected_output/pop_timing.bin b/meowgb-tests/expected_output/mooneye-test-suite/halt_ime0_nointr_timing.bin similarity index 100% rename from meowgb-tests/expected_output/pop_timing.bin rename to meowgb-tests/expected_output/mooneye-test-suite/halt_ime0_nointr_timing.bin diff --git a/meowgb-tests/expected_output/push_timing.bin b/meowgb-tests/expected_output/mooneye-test-suite/halt_ime1_timing.bin similarity index 100% rename from meowgb-tests/expected_output/push_timing.bin rename to meowgb-tests/expected_output/mooneye-test-suite/halt_ime1_timing.bin diff --git a/meowgb-tests/expected_output/rapid_di_ei.bin b/meowgb-tests/expected_output/mooneye-test-suite/halt_ime1_timing2-GS.bin similarity index 100% rename from meowgb-tests/expected_output/rapid_di_ei.bin rename to meowgb-tests/expected_output/mooneye-test-suite/halt_ime1_timing2-GS.bin diff --git a/meowgb-tests/expected_output/rapid_toggle.bin b/meowgb-tests/expected_output/mooneye-test-suite/if_ie_registers.bin similarity index 100% rename from meowgb-tests/expected_output/rapid_toggle.bin rename to meowgb-tests/expected_output/mooneye-test-suite/if_ie_registers.bin diff --git a/meowgb-tests/expected_output/reg_read.bin b/meowgb-tests/expected_output/mooneye-test-suite/instr/daa.bin similarity index 100% rename from meowgb-tests/expected_output/reg_read.bin rename to meowgb-tests/expected_output/mooneye-test-suite/instr/daa.bin diff --git a/meowgb-tests/expected_output/rst_timing.bin b/meowgb-tests/expected_output/mooneye-test-suite/intr_timing.bin similarity index 100% rename from meowgb-tests/expected_output/rst_timing.bin rename to meowgb-tests/expected_output/mooneye-test-suite/intr_timing.bin diff --git a/meowgb-tests/expected_output/stat_irq_blocking.bin b/meowgb-tests/expected_output/mooneye-test-suite/jp_cc_timing.bin similarity index 100% rename from meowgb-tests/expected_output/stat_irq_blocking.bin rename to meowgb-tests/expected_output/mooneye-test-suite/jp_cc_timing.bin diff --git a/meowgb-tests/expected_output/stat_lyc_onoff.bin b/meowgb-tests/expected_output/mooneye-test-suite/jp_timing.bin similarity index 100% rename from meowgb-tests/expected_output/stat_lyc_onoff.bin rename to meowgb-tests/expected_output/mooneye-test-suite/jp_timing.bin diff --git a/meowgb-tests/expected_output/tim00.bin b/meowgb-tests/expected_output/mooneye-test-suite/ld_hl_sp_e_timing.bin similarity index 100% rename from meowgb-tests/expected_output/tim00.bin rename to meowgb-tests/expected_output/mooneye-test-suite/ld_hl_sp_e_timing.bin diff --git a/meowgb-tests/expected_output/tim00_div_trigger.bin b/meowgb-tests/expected_output/mooneye-test-suite/oam_dma/basic.bin similarity index 100% rename from meowgb-tests/expected_output/tim00_div_trigger.bin rename to meowgb-tests/expected_output/mooneye-test-suite/oam_dma/basic.bin diff --git a/meowgb-tests/expected_output/tim01.bin b/meowgb-tests/expected_output/mooneye-test-suite/oam_dma/reg_read.bin similarity index 100% rename from meowgb-tests/expected_output/tim01.bin rename to meowgb-tests/expected_output/mooneye-test-suite/oam_dma/reg_read.bin diff --git a/meowgb-tests/expected_output/tim01_div_trigger.bin b/meowgb-tests/expected_output/mooneye-test-suite/oam_dma_restart.bin similarity index 100% rename from meowgb-tests/expected_output/tim01_div_trigger.bin rename to meowgb-tests/expected_output/mooneye-test-suite/oam_dma_restart.bin diff --git a/meowgb-tests/expected_output/tim10.bin b/meowgb-tests/expected_output/mooneye-test-suite/oam_dma_start.bin similarity index 100% rename from meowgb-tests/expected_output/tim10.bin rename to meowgb-tests/expected_output/mooneye-test-suite/oam_dma_start.bin diff --git a/meowgb-tests/expected_output/tim10_div_trigger.bin b/meowgb-tests/expected_output/mooneye-test-suite/oam_dma_timing.bin similarity index 100% rename from meowgb-tests/expected_output/tim10_div_trigger.bin rename to meowgb-tests/expected_output/mooneye-test-suite/oam_dma_timing.bin diff --git a/meowgb-tests/expected_output/tim11.bin b/meowgb-tests/expected_output/mooneye-test-suite/pop_timing.bin similarity index 100% rename from meowgb-tests/expected_output/tim11.bin rename to meowgb-tests/expected_output/mooneye-test-suite/pop_timing.bin diff --git a/meowgb-tests/expected_output/tim11_div_trigger.bin b/meowgb-tests/expected_output/mooneye-test-suite/ppu/intr_1_2_timing-GS.bin similarity index 100% rename from meowgb-tests/expected_output/tim11_div_trigger.bin rename to meowgb-tests/expected_output/mooneye-test-suite/ppu/intr_1_2_timing-GS.bin diff --git a/meowgb-tests/expected_output/tima_reload.bin b/meowgb-tests/expected_output/mooneye-test-suite/ppu/intr_2_0_timing.bin similarity index 100% rename from meowgb-tests/expected_output/tima_reload.bin rename to meowgb-tests/expected_output/mooneye-test-suite/ppu/intr_2_0_timing.bin diff --git a/meowgb-tests/expected_output/tima_write_reloading.bin b/meowgb-tests/expected_output/mooneye-test-suite/ppu/stat_irq_blocking.bin similarity index 100% rename from meowgb-tests/expected_output/tima_write_reloading.bin rename to meowgb-tests/expected_output/mooneye-test-suite/ppu/stat_irq_blocking.bin diff --git a/meowgb-tests/expected_output/tma_write_reloading.bin b/meowgb-tests/expected_output/mooneye-test-suite/ppu/stat_lyc_onoff.bin similarity index 100% rename from meowgb-tests/expected_output/tma_write_reloading.bin rename to meowgb-tests/expected_output/mooneye-test-suite/ppu/stat_lyc_onoff.bin diff --git a/meowgb-tests/expected_output/vblank_stat_intr-GS.bin b/meowgb-tests/expected_output/mooneye-test-suite/ppu/vblank_stat_intr-GS.bin similarity index 100% rename from meowgb-tests/expected_output/vblank_stat_intr-GS.bin rename to meowgb-tests/expected_output/mooneye-test-suite/ppu/vblank_stat_intr-GS.bin diff --git a/meowgb-tests/expected_output/mooneye-test-suite/push_timing.bin b/meowgb-tests/expected_output/mooneye-test-suite/push_timing.bin new file mode 100644 index 0000000..2a02163 --- /dev/null +++ b/meowgb-tests/expected_output/mooneye-test-suite/push_timing.bin @@ -0,0 +1 @@ + " \ No newline at end of file diff --git a/meowgb-tests/expected_output/mooneye-test-suite/rapid_di_ei.bin b/meowgb-tests/expected_output/mooneye-test-suite/rapid_di_ei.bin new file mode 100644 index 0000000..2a02163 --- /dev/null +++ b/meowgb-tests/expected_output/mooneye-test-suite/rapid_di_ei.bin @@ -0,0 +1 @@ + " \ No newline at end of file diff --git a/meowgb-tests/expected_output/mooneye-test-suite/ret_cc_timing.bin b/meowgb-tests/expected_output/mooneye-test-suite/ret_cc_timing.bin new file mode 100644 index 0000000..2a02163 --- /dev/null +++ b/meowgb-tests/expected_output/mooneye-test-suite/ret_cc_timing.bin @@ -0,0 +1 @@ + " \ No newline at end of file diff --git a/meowgb-tests/expected_output/mooneye-test-suite/ret_timing.bin b/meowgb-tests/expected_output/mooneye-test-suite/ret_timing.bin new file mode 100644 index 0000000..2a02163 --- /dev/null +++ b/meowgb-tests/expected_output/mooneye-test-suite/ret_timing.bin @@ -0,0 +1 @@ + " \ No newline at end of file diff --git a/meowgb-tests/expected_output/mooneye-test-suite/reti_intr_timing.bin b/meowgb-tests/expected_output/mooneye-test-suite/reti_intr_timing.bin new file mode 100644 index 0000000..2a02163 --- /dev/null +++ b/meowgb-tests/expected_output/mooneye-test-suite/reti_intr_timing.bin @@ -0,0 +1 @@ + " \ No newline at end of file diff --git a/meowgb-tests/expected_output/mooneye-test-suite/reti_timing.bin b/meowgb-tests/expected_output/mooneye-test-suite/reti_timing.bin new file mode 100644 index 0000000..2a02163 --- /dev/null +++ b/meowgb-tests/expected_output/mooneye-test-suite/reti_timing.bin @@ -0,0 +1 @@ + " \ No newline at end of file diff --git a/meowgb-tests/expected_output/mooneye-test-suite/rst_timing.bin b/meowgb-tests/expected_output/mooneye-test-suite/rst_timing.bin new file mode 100644 index 0000000..2a02163 --- /dev/null +++ b/meowgb-tests/expected_output/mooneye-test-suite/rst_timing.bin @@ -0,0 +1 @@ + " \ No newline at end of file diff --git a/meowgb-tests/expected_output/mooneye-test-suite/timer/div_write.bin b/meowgb-tests/expected_output/mooneye-test-suite/timer/div_write.bin new file mode 100644 index 0000000..2a02163 --- /dev/null +++ b/meowgb-tests/expected_output/mooneye-test-suite/timer/div_write.bin @@ -0,0 +1 @@ + " \ No newline at end of file diff --git a/meowgb-tests/expected_output/mooneye-test-suite/timer/rapid_toggle.bin b/meowgb-tests/expected_output/mooneye-test-suite/timer/rapid_toggle.bin new file mode 100644 index 0000000..2a02163 --- /dev/null +++ b/meowgb-tests/expected_output/mooneye-test-suite/timer/rapid_toggle.bin @@ -0,0 +1 @@ + " \ No newline at end of file diff --git a/meowgb-tests/expected_output/mooneye-test-suite/timer/tim00.bin b/meowgb-tests/expected_output/mooneye-test-suite/timer/tim00.bin new file mode 100644 index 0000000..2a02163 --- /dev/null +++ b/meowgb-tests/expected_output/mooneye-test-suite/timer/tim00.bin @@ -0,0 +1 @@ + " \ No newline at end of file diff --git a/meowgb-tests/expected_output/mooneye-test-suite/timer/tim00_div_trigger.bin b/meowgb-tests/expected_output/mooneye-test-suite/timer/tim00_div_trigger.bin new file mode 100644 index 0000000..2a02163 --- /dev/null +++ b/meowgb-tests/expected_output/mooneye-test-suite/timer/tim00_div_trigger.bin @@ -0,0 +1 @@ + " \ No newline at end of file diff --git a/meowgb-tests/expected_output/mooneye-test-suite/timer/tim01.bin b/meowgb-tests/expected_output/mooneye-test-suite/timer/tim01.bin new file mode 100644 index 0000000..2a02163 --- /dev/null +++ b/meowgb-tests/expected_output/mooneye-test-suite/timer/tim01.bin @@ -0,0 +1 @@ + " \ No newline at end of file diff --git a/meowgb-tests/expected_output/mooneye-test-suite/timer/tim01_div_trigger.bin b/meowgb-tests/expected_output/mooneye-test-suite/timer/tim01_div_trigger.bin new file mode 100644 index 0000000..2a02163 --- /dev/null +++ b/meowgb-tests/expected_output/mooneye-test-suite/timer/tim01_div_trigger.bin @@ -0,0 +1 @@ + " \ No newline at end of file diff --git a/meowgb-tests/expected_output/mooneye-test-suite/timer/tim10.bin b/meowgb-tests/expected_output/mooneye-test-suite/timer/tim10.bin new file mode 100644 index 0000000..2a02163 --- /dev/null +++ b/meowgb-tests/expected_output/mooneye-test-suite/timer/tim10.bin @@ -0,0 +1 @@ + " \ No newline at end of file diff --git a/meowgb-tests/expected_output/mooneye-test-suite/timer/tim10_div_trigger.bin b/meowgb-tests/expected_output/mooneye-test-suite/timer/tim10_div_trigger.bin new file mode 100644 index 0000000..2a02163 --- /dev/null +++ b/meowgb-tests/expected_output/mooneye-test-suite/timer/tim10_div_trigger.bin @@ -0,0 +1 @@ + " \ No newline at end of file diff --git a/meowgb-tests/expected_output/mooneye-test-suite/timer/tim11.bin b/meowgb-tests/expected_output/mooneye-test-suite/timer/tim11.bin new file mode 100644 index 0000000..2a02163 --- /dev/null +++ b/meowgb-tests/expected_output/mooneye-test-suite/timer/tim11.bin @@ -0,0 +1 @@ + " \ No newline at end of file diff --git a/meowgb-tests/expected_output/mooneye-test-suite/timer/tim11_div_trigger.bin b/meowgb-tests/expected_output/mooneye-test-suite/timer/tim11_div_trigger.bin new file mode 100644 index 0000000..2a02163 --- /dev/null +++ b/meowgb-tests/expected_output/mooneye-test-suite/timer/tim11_div_trigger.bin @@ -0,0 +1 @@ + " \ No newline at end of file diff --git a/meowgb-tests/expected_output/mooneye-test-suite/timer/tima_reload.bin b/meowgb-tests/expected_output/mooneye-test-suite/timer/tima_reload.bin new file mode 100644 index 0000000..2a02163 --- /dev/null +++ b/meowgb-tests/expected_output/mooneye-test-suite/timer/tima_reload.bin @@ -0,0 +1 @@ + " \ No newline at end of file diff --git a/meowgb-tests/expected_output/mooneye-test-suite/timer/tima_write_reloading.bin b/meowgb-tests/expected_output/mooneye-test-suite/timer/tima_write_reloading.bin new file mode 100644 index 0000000..2a02163 --- /dev/null +++ b/meowgb-tests/expected_output/mooneye-test-suite/timer/tima_write_reloading.bin @@ -0,0 +1 @@ + " \ No newline at end of file diff --git a/meowgb-tests/expected_output/mooneye-test-suite/timer/tma_write_reloading.bin b/meowgb-tests/expected_output/mooneye-test-suite/timer/tma_write_reloading.bin new file mode 100644 index 0000000..2a02163 --- /dev/null +++ b/meowgb-tests/expected_output/mooneye-test-suite/timer/tma_write_reloading.bin @@ -0,0 +1 @@ + " \ No newline at end of file diff --git a/meowgb/src/window/overlay.rs b/meowgb/src/window/overlay.rs index b57b876..7e42909 100644 --- a/meowgb/src/window/overlay.rs +++ b/meowgb/src/window/overlay.rs @@ -1,6 +1,6 @@ /// Provides an [egui] based overlay for debugigng the emulator whilst it is /// running -use egui::{ClippedPrimitive, Context, Grid, TexturesDelta, RichText, Color32}; +use egui::{ClippedPrimitive, Color32, Context, Grid, RichText, TexturesDelta}; use egui_wgpu::renderer::{Renderer, ScreenDescriptor}; use meowgb_core::gameboy::serial::SerialWriter; use pixels::{wgpu, PixelsContext}; @@ -194,7 +194,7 @@ impl Gui { wram_window_open: false, oam_window_open: false, hram_window_open: false, - dma_window_open: false, + dma_window_open: false, }, state_restore: None, registers: gameboy.gameboy.registers, @@ -209,7 +209,7 @@ impl Gui { wram: gameboy.gameboy.memory.wram, hram: gameboy.gameboy.memory.hram, oam: gameboy.gameboy.ppu.oam, - dma: gameboy.gameboy.dma + dma: gameboy.gameboy.dma, } } @@ -242,7 +242,7 @@ impl Gui { if ui.button("Toggle OAM Window").clicked() { self.state.oam_window_open = !self.state.oam_window_open; } - + if ui.button("Toggle DMA Window").clicked() { self.state.dma_window_open = !self.state.dma_window_open; } @@ -347,19 +347,25 @@ impl Gui { }); }); - egui::Window::new("DMA").vscroll(true).open(&mut self.state.dma_window_open).show(ctx, |ui| { - if let Some(bus) = self.dma.in_progress() { - ui.heading(RichText::new(format!("Active ({:#?} Bus)", bus)).color(Color32::LIGHT_GREEN)); - } else { - ui.heading(RichText::new("Inactive").color(Color32::LIGHT_RED)); - } + egui::Window::new("DMA").vscroll(true).open(&mut self.state.dma_window_open).show( + ctx, + |ui| { + if let Some(bus) = self.dma.in_progress() { + ui.heading( + RichText::new(format!("Active ({:#?} Bus)", bus)) + .color(Color32::LIGHT_GREEN), + ); + } else { + ui.heading(RichText::new("Inactive").color(Color32::LIGHT_RED)); + } - let offset = (0xA0 - self.dma.remaining_cycles) as u16; - ui.label(format!("Read Address: {:#04X}", ((self.dma.base as u16) << 8) | offset)); - ui.label(format!("Write Address: {:#04X}", 0xFE00 | offset)); - ui.label(format!("Base: {:#04X}", (self.dma.base as u16) << 8)); - ui.label(format!("Remaining Bytes: {:#02X}", self.dma.remaining_cycles)); - }); + let offset = (0xA0 - self.dma.remaining_cycles) as u16; + ui.label(format!("Read Address: {:#04X}", ((self.dma.base as u16) << 8) | offset)); + ui.label(format!("Write Address: {:#04X}", 0xFE00 | offset)); + ui.label(format!("Base: {:#04X}", (self.dma.base as u16) << 8)); + ui.label(format!("Remaining Bytes: {:#02X}", self.dma.remaining_cycles)); + }, + ); egui::Window::new("HRAM").vscroll(true).open(&mut self.state.hram_window_open).show(ctx, |ui| { egui::Grid::new("memory_ov_hram").show(ui, |ui| { diff --git a/run-test-roms.sh b/run-test-roms.sh index 0424adb..f35ee73 100755 --- a/run-test-roms.sh +++ b/run-test-roms.sh @@ -11,7 +11,7 @@ echo "Running test ROM ./test-roms/blargg/roms/cpu_instrs.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/blargg/roms/cpu_instrs.gb test -m 100000000 -s meowgb-tests/expected_output/cpu_instrs.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/blargg/roms/cpu_instrs.gb test -m 100000000 -s meowgb-tests/expected_output/blargg/cpu_instrs.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" @@ -21,7 +21,7 @@ echo "Running test ROM ./test-roms/blargg/roms/instr_timing.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/blargg/roms/instr_timing.gb test -m 100000000 -s meowgb-tests/expected_output/instr_timing.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/blargg/roms/instr_timing.gb test -m 100000000 -s meowgb-tests/expected_output/blargg/instr_timing.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" @@ -31,7 +31,7 @@ echo "Running test ROM ./test-roms/blargg/roms/mem_timing.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/blargg/roms/mem_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mem_timing.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/blargg/roms/mem_timing.gb test -m 100000000 -s meowgb-tests/expected_output/blargg/mem_timing.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" @@ -41,17 +41,7 @@ echo "Running test ROM ./test-roms/mooneye-test-suite/roms/add_sp_e_timing.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/add_sp_e_timing.gb test -m 100000000 -s meowgb-tests/expected_output/add_sp_e_timing.bin 2>&1 > /dev/null) ; then - TEST_SUCCESS=$((TEST_SUCCESS + 1)) -else - echo "Failed: $res" -fi - -echo "Running test ROM ./test-roms/mooneye-test-suite/roms/basic.gb" - -TEST_TOTAL=$((TEST_TOTAL + 1)) - -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/basic.gb test -m 100000000 -s meowgb-tests/expected_output/basic.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/add_sp_e_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/add_sp_e_timing.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" @@ -61,7 +51,7 @@ echo "Running test ROM ./test-roms/mooneye-test-suite/roms/boot_hwio-dmgABCmgb.g TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/boot_hwio-dmgABCmgb.gb test -m 100000000 -s meowgb-tests/expected_output/boot_hwio-dmgABCmgb.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/boot_hwio-dmgABCmgb.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/boot_hwio-dmgABCmgb.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" @@ -71,7 +61,7 @@ echo "Running test ROM ./test-roms/mooneye-test-suite/roms/boot_regs-dmgABC.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/boot_regs-dmgABC.gb test -m 100000000 -s meowgb-tests/expected_output/boot_regs-dmgABC.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/boot_regs-dmgABC.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/boot_regs-dmgABC.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" @@ -81,7 +71,7 @@ echo "Running test ROM ./test-roms/mooneye-test-suite/roms/call_cc_timing.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/call_cc_timing.gb test -m 100000000 -s meowgb-tests/expected_output/call_cc_timing.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/call_cc_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/call_cc_timing.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" @@ -91,7 +81,7 @@ echo "Running test ROM ./test-roms/mooneye-test-suite/roms/call_cc_timing2.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/call_cc_timing2.gb test -m 100000000 -s meowgb-tests/expected_output/call_cc_timing2.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/call_cc_timing2.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/call_cc_timing2.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" @@ -101,7 +91,7 @@ echo "Running test ROM ./test-roms/mooneye-test-suite/roms/call_timing.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/call_timing.gb test -m 100000000 -s meowgb-tests/expected_output/call_timing.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/call_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/call_timing.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" @@ -111,17 +101,7 @@ echo "Running test ROM ./test-roms/mooneye-test-suite/roms/call_timing2.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/call_timing2.gb test -m 100000000 -s meowgb-tests/expected_output/call_timing2.bin 2>&1 > /dev/null) ; then - TEST_SUCCESS=$((TEST_SUCCESS + 1)) -else - echo "Failed: $res" -fi - -echo "Running test ROM ./test-roms/mooneye-test-suite/roms/daa.gb" - -TEST_TOTAL=$((TEST_TOTAL + 1)) - -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/daa.gb test -m 100000000 -s meowgb-tests/expected_output/daa.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/call_timing2.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/call_timing2.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" @@ -131,7 +111,7 @@ echo "Running test ROM ./test-roms/mooneye-test-suite/roms/di_timing-GS.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/di_timing-GS.gb test -m 100000000 -s meowgb-tests/expected_output/di_timing-GS.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/di_timing-GS.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/di_timing-GS.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" @@ -141,17 +121,7 @@ echo "Running test ROM ./test-roms/mooneye-test-suite/roms/div_timing.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/div_timing.gb test -m 100000000 -s meowgb-tests/expected_output/div_timing.bin 2>&1 > /dev/null) ; then - TEST_SUCCESS=$((TEST_SUCCESS + 1)) -else - echo "Failed: $res" -fi - -echo "Running test ROM ./test-roms/mooneye-test-suite/roms/div_write.gb" - -TEST_TOTAL=$((TEST_TOTAL + 1)) - -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/div_write.gb test -m 100000000 -s meowgb-tests/expected_output/div_write.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/div_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/div_timing.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" @@ -161,7 +131,7 @@ echo "Running test ROM ./test-roms/mooneye-test-suite/roms/ei_sequence.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/ei_sequence.gb test -m 100000000 -s meowgb-tests/expected_output/ei_sequence.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/ei_sequence.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/ei_sequence.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" @@ -171,7 +141,7 @@ echo "Running test ROM ./test-roms/mooneye-test-suite/roms/ei_timing.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/ei_timing.gb test -m 100000000 -s meowgb-tests/expected_output/ei_timing.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/ei_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/ei_timing.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" @@ -181,7 +151,7 @@ echo "Running test ROM ./test-roms/mooneye-test-suite/roms/halt_ime0_ei.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/halt_ime0_ei.gb test -m 100000000 -s meowgb-tests/expected_output/halt_ime0_ei.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/halt_ime0_ei.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/halt_ime0_ei.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" @@ -191,7 +161,7 @@ echo "Running test ROM ./test-roms/mooneye-test-suite/roms/halt_ime0_nointr_timi TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/halt_ime0_nointr_timing.gb test -m 100000000 -s meowgb-tests/expected_output/halt_ime0_nointr_timing.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/halt_ime0_nointr_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/halt_ime0_nointr_timing.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" @@ -201,7 +171,7 @@ echo "Running test ROM ./test-roms/mooneye-test-suite/roms/halt_ime1_timing.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/halt_ime1_timing.gb test -m 100000000 -s meowgb-tests/expected_output/halt_ime1_timing.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/halt_ime1_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/halt_ime1_timing.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" @@ -211,37 +181,57 @@ echo "Running test ROM ./test-roms/mooneye-test-suite/roms/halt_ime1_timing2-GS. TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/halt_ime1_timing2-GS.gb test -m 100000000 -s meowgb-tests/expected_output/halt_ime1_timing2-GS.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/halt_ime1_timing2-GS.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/halt_ime1_timing2-GS.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" fi -echo "Running test ROM ./test-roms/mooneye-test-suite/roms/intr_1_2_timing-GS.gb" +echo "Running test ROM ./test-roms/mooneye-test-suite/roms/if_ie_registers.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/intr_1_2_timing-GS.gb test -m 100000000 -s meowgb-tests/expected_output/intr_1_2_timing-GS.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/if_ie_registers.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/if_ie_registers.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" fi -echo "Running test ROM ./test-roms/mooneye-test-suite/roms/intr_2_0_timing.gb" +echo "Running test ROM ./test-roms/mooneye-test-suite/roms/intr_timing.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/intr_2_0_timing.gb test -m 100000000 -s meowgb-tests/expected_output/intr_2_0_timing.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/intr_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/intr_timing.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" fi -echo "Running test ROM ./test-roms/mooneye-test-suite/roms/mem_oam.gb" +echo "Running test ROM ./test-roms/mooneye-test-suite/roms/jp_cc_timing.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/mem_oam.gb test -m 100000000 -s meowgb-tests/expected_output/mem_oam.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/jp_cc_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/jp_cc_timing.bin 2>&1 > /dev/null) ; then + TEST_SUCCESS=$((TEST_SUCCESS + 1)) +else + echo "Failed: $res" +fi + +echo "Running test ROM ./test-roms/mooneye-test-suite/roms/jp_timing.gb" + +TEST_TOTAL=$((TEST_TOTAL + 1)) + +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/jp_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/jp_timing.bin 2>&1 > /dev/null) ; then + TEST_SUCCESS=$((TEST_SUCCESS + 1)) +else + echo "Failed: $res" +fi + +echo "Running test ROM ./test-roms/mooneye-test-suite/roms/ld_hl_sp_e_timing.gb" + +TEST_TOTAL=$((TEST_TOTAL + 1)) + +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/ld_hl_sp_e_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/ld_hl_sp_e_timing.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" @@ -251,7 +241,7 @@ echo "Running test ROM ./test-roms/mooneye-test-suite/roms/oam_dma_restart.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/oam_dma_restart.gb test -m 100000000 -s meowgb-tests/expected_output/oam_dma_restart.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/oam_dma_restart.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/oam_dma_restart.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" @@ -261,7 +251,7 @@ echo "Running test ROM ./test-roms/mooneye-test-suite/roms/oam_dma_start.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/oam_dma_start.gb test -m 100000000 -s meowgb-tests/expected_output/oam_dma_start.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/oam_dma_start.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/oam_dma_start.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" @@ -271,7 +261,7 @@ echo "Running test ROM ./test-roms/mooneye-test-suite/roms/oam_dma_timing.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/oam_dma_timing.gb test -m 100000000 -s meowgb-tests/expected_output/oam_dma_timing.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/oam_dma_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/oam_dma_timing.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" @@ -281,7 +271,7 @@ echo "Running test ROM ./test-roms/mooneye-test-suite/roms/pop_timing.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/pop_timing.gb test -m 100000000 -s meowgb-tests/expected_output/pop_timing.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/pop_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/pop_timing.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" @@ -291,7 +281,7 @@ echo "Running test ROM ./test-roms/mooneye-test-suite/roms/push_timing.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/push_timing.gb test -m 100000000 -s meowgb-tests/expected_output/push_timing.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/push_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/push_timing.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" @@ -301,37 +291,47 @@ echo "Running test ROM ./test-roms/mooneye-test-suite/roms/rapid_di_ei.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/rapid_di_ei.gb test -m 100000000 -s meowgb-tests/expected_output/rapid_di_ei.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/rapid_di_ei.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/rapid_di_ei.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" fi -echo "Running test ROM ./test-roms/mooneye-test-suite/roms/rapid_toggle.gb" +echo "Running test ROM ./test-roms/mooneye-test-suite/roms/ret_cc_timing.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/rapid_toggle.gb test -m 100000000 -s meowgb-tests/expected_output/rapid_toggle.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/ret_cc_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/ret_cc_timing.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" fi -echo "Running test ROM ./test-roms/mooneye-test-suite/roms/reg_f.gb" +echo "Running test ROM ./test-roms/mooneye-test-suite/roms/ret_timing.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/reg_f.gb test -m 100000000 -s meowgb-tests/expected_output/reg_f.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/ret_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/ret_timing.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" fi -echo "Running test ROM ./test-roms/mooneye-test-suite/roms/reg_read.gb" +echo "Running test ROM ./test-roms/mooneye-test-suite/roms/reti_intr_timing.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/reg_read.gb test -m 100000000 -s meowgb-tests/expected_output/reg_read.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/reti_intr_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/reti_intr_timing.bin 2>&1 > /dev/null) ; then + TEST_SUCCESS=$((TEST_SUCCESS + 1)) +else + echo "Failed: $res" +fi + +echo "Running test ROM ./test-roms/mooneye-test-suite/roms/reti_timing.gb" + +TEST_TOTAL=$((TEST_TOTAL + 1)) + +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/reti_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/reti_timing.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" @@ -341,157 +341,7 @@ echo "Running test ROM ./test-roms/mooneye-test-suite/roms/rst_timing.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/rst_timing.gb test -m 100000000 -s meowgb-tests/expected_output/rst_timing.bin 2>&1 > /dev/null) ; then - TEST_SUCCESS=$((TEST_SUCCESS + 1)) -else - echo "Failed: $res" -fi - -echo "Running test ROM ./test-roms/mooneye-test-suite/roms/stat_irq_blocking.gb" - -TEST_TOTAL=$((TEST_TOTAL + 1)) - -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/stat_irq_blocking.gb test -m 100000000 -s meowgb-tests/expected_output/stat_irq_blocking.bin 2>&1 > /dev/null) ; then - TEST_SUCCESS=$((TEST_SUCCESS + 1)) -else - echo "Failed: $res" -fi - -echo "Running test ROM ./test-roms/mooneye-test-suite/roms/stat_lyc_onoff.gb" - -TEST_TOTAL=$((TEST_TOTAL + 1)) - -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/stat_lyc_onoff.gb test -m 100000000 -s meowgb-tests/expected_output/stat_lyc_onoff.bin 2>&1 > /dev/null) ; then - TEST_SUCCESS=$((TEST_SUCCESS + 1)) -else - echo "Failed: $res" -fi - -echo "Running test ROM ./test-roms/mooneye-test-suite/roms/tim00.gb" - -TEST_TOTAL=$((TEST_TOTAL + 1)) - -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/tim00.gb test -m 100000000 -s meowgb-tests/expected_output/tim00.bin 2>&1 > /dev/null) ; then - TEST_SUCCESS=$((TEST_SUCCESS + 1)) -else - echo "Failed: $res" -fi - -echo "Running test ROM ./test-roms/mooneye-test-suite/roms/tim00_div_trigger.gb" - -TEST_TOTAL=$((TEST_TOTAL + 1)) - -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/tim00_div_trigger.gb test -m 100000000 -s meowgb-tests/expected_output/tim00_div_trigger.bin 2>&1 > /dev/null) ; then - TEST_SUCCESS=$((TEST_SUCCESS + 1)) -else - echo "Failed: $res" -fi - -echo "Running test ROM ./test-roms/mooneye-test-suite/roms/tim01.gb" - -TEST_TOTAL=$((TEST_TOTAL + 1)) - -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/tim01.gb test -m 100000000 -s meowgb-tests/expected_output/tim01.bin 2>&1 > /dev/null) ; then - TEST_SUCCESS=$((TEST_SUCCESS + 1)) -else - echo "Failed: $res" -fi - -echo "Running test ROM ./test-roms/mooneye-test-suite/roms/tim01_div_trigger.gb" - -TEST_TOTAL=$((TEST_TOTAL + 1)) - -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/tim01_div_trigger.gb test -m 100000000 -s meowgb-tests/expected_output/tim01_div_trigger.bin 2>&1 > /dev/null) ; then - TEST_SUCCESS=$((TEST_SUCCESS + 1)) -else - echo "Failed: $res" -fi - -echo "Running test ROM ./test-roms/mooneye-test-suite/roms/tim10.gb" - -TEST_TOTAL=$((TEST_TOTAL + 1)) - -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/tim10.gb test -m 100000000 -s meowgb-tests/expected_output/tim10.bin 2>&1 > /dev/null) ; then - TEST_SUCCESS=$((TEST_SUCCESS + 1)) -else - echo "Failed: $res" -fi - -echo "Running test ROM ./test-roms/mooneye-test-suite/roms/tim10_div_trigger.gb" - -TEST_TOTAL=$((TEST_TOTAL + 1)) - -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/tim10_div_trigger.gb test -m 100000000 -s meowgb-tests/expected_output/tim10_div_trigger.bin 2>&1 > /dev/null) ; then - TEST_SUCCESS=$((TEST_SUCCESS + 1)) -else - echo "Failed: $res" -fi - -echo "Running test ROM ./test-roms/mooneye-test-suite/roms/tim11.gb" - -TEST_TOTAL=$((TEST_TOTAL + 1)) - -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/tim11.gb test -m 100000000 -s meowgb-tests/expected_output/tim11.bin 2>&1 > /dev/null) ; then - TEST_SUCCESS=$((TEST_SUCCESS + 1)) -else - echo "Failed: $res" -fi - -echo "Running test ROM ./test-roms/mooneye-test-suite/roms/tim11_div_trigger.gb" - -TEST_TOTAL=$((TEST_TOTAL + 1)) - -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/tim11_div_trigger.gb test -m 100000000 -s meowgb-tests/expected_output/tim11_div_trigger.bin 2>&1 > /dev/null) ; then - TEST_SUCCESS=$((TEST_SUCCESS + 1)) -else - echo "Failed: $res" -fi - -echo "Running test ROM ./test-roms/mooneye-test-suite/roms/tima_reload.gb" - -TEST_TOTAL=$((TEST_TOTAL + 1)) - -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/tima_reload.gb test -m 100000000 -s meowgb-tests/expected_output/tima_reload.bin 2>&1 > /dev/null) ; then - TEST_SUCCESS=$((TEST_SUCCESS + 1)) -else - echo "Failed: $res" -fi - -echo "Running test ROM ./test-roms/mooneye-test-suite/roms/tima_write_reloading.gb" - -TEST_TOTAL=$((TEST_TOTAL + 1)) - -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/tima_write_reloading.gb test -m 100000000 -s meowgb-tests/expected_output/tima_write_reloading.bin 2>&1 > /dev/null) ; then - TEST_SUCCESS=$((TEST_SUCCESS + 1)) -else - echo "Failed: $res" -fi - -echo "Running test ROM ./test-roms/mooneye-test-suite/roms/tma_write_reloading.gb" - -TEST_TOTAL=$((TEST_TOTAL + 1)) - -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/tma_write_reloading.gb test -m 100000000 -s meowgb-tests/expected_output/tma_write_reloading.bin 2>&1 > /dev/null) ; then - TEST_SUCCESS=$((TEST_SUCCESS + 1)) -else - echo "Failed: $res" -fi - -echo "Running test ROM ./test-roms/mooneye-test-suite/roms/unused_hwio-GS.gb" - -TEST_TOTAL=$((TEST_TOTAL + 1)) - -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/unused_hwio-GS.gb test -m 100000000 -s meowgb-tests/expected_output/unused_hwio-GS.bin 2>&1 > /dev/null) ; then - TEST_SUCCESS=$((TEST_SUCCESS + 1)) -else - echo "Failed: $res" -fi - -echo "Running test ROM ./test-roms/mooneye-test-suite/roms/vblank_stat_intr-GS.gb" - -TEST_TOTAL=$((TEST_TOTAL + 1)) - -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/vblank_stat_intr-GS.gb test -m 100000000 -s meowgb-tests/expected_output/vblank_stat_intr-GS.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/rst_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/rst_timing.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" @@ -501,7 +351,7 @@ echo "Running test ROM ./test-roms/mooneye-test-suite/roms/MBC1/bits_bank1.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/bits_bank1.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/bits_bank1.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/bits_bank1.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/MBC1/bits_bank1.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" @@ -511,7 +361,7 @@ echo "Running test ROM ./test-roms/mooneye-test-suite/roms/MBC1/bits_bank2.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/bits_bank2.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/bits_bank2.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/bits_bank2.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/MBC1/bits_bank2.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" @@ -521,7 +371,7 @@ echo "Running test ROM ./test-roms/mooneye-test-suite/roms/MBC1/bits_mode.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/bits_mode.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/bits_mode.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/bits_mode.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/MBC1/bits_mode.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" @@ -531,7 +381,7 @@ echo "Running test ROM ./test-roms/mooneye-test-suite/roms/MBC1/bits_ramg.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/bits_ramg.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/bits_ramg.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/bits_ramg.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/MBC1/bits_ramg.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" @@ -541,7 +391,7 @@ echo "Running test ROM ./test-roms/mooneye-test-suite/roms/MBC1/multicart_rom_8M TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/multicart_rom_8Mb.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/multicart_rom_8Mb.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/multicart_rom_8Mb.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/MBC1/multicart_rom_8Mb.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" @@ -551,7 +401,7 @@ echo "Running test ROM ./test-roms/mooneye-test-suite/roms/MBC1/ram_256kb.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/ram_256kb.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/ram_256kb.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/ram_256kb.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/MBC1/ram_256kb.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" @@ -561,7 +411,7 @@ echo "Running test ROM ./test-roms/mooneye-test-suite/roms/MBC1/ram_64kb.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/ram_64kb.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/ram_64kb.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/ram_64kb.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/MBC1/ram_64kb.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" @@ -571,7 +421,7 @@ echo "Running test ROM ./test-roms/mooneye-test-suite/roms/MBC1/rom_16Mb.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/rom_16Mb.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/rom_16Mb.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/rom_16Mb.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/MBC1/rom_16Mb.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" @@ -581,7 +431,7 @@ echo "Running test ROM ./test-roms/mooneye-test-suite/roms/MBC1/rom_1Mb.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/rom_1Mb.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/rom_1Mb.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/rom_1Mb.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/MBC1/rom_1Mb.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" @@ -591,7 +441,7 @@ echo "Running test ROM ./test-roms/mooneye-test-suite/roms/MBC1/rom_2Mb.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/rom_2Mb.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/rom_2Mb.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/rom_2Mb.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/MBC1/rom_2Mb.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" @@ -601,7 +451,7 @@ echo "Running test ROM ./test-roms/mooneye-test-suite/roms/MBC1/rom_4Mb.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/rom_4Mb.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/rom_4Mb.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/rom_4Mb.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/MBC1/rom_4Mb.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" @@ -611,7 +461,7 @@ echo "Running test ROM ./test-roms/mooneye-test-suite/roms/MBC1/rom_512kb.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/rom_512kb.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/rom_512kb.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/rom_512kb.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/MBC1/rom_512kb.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" @@ -621,7 +471,247 @@ echo "Running test ROM ./test-roms/mooneye-test-suite/roms/MBC1/rom_8Mb.gb" TEST_TOTAL=$((TEST_TOTAL + 1)) -if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/rom_8Mb.gb test -m 100000000 -s meowgb-tests/expected_output/MBC1/rom_8Mb.bin 2>&1 > /dev/null) ; then +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/MBC1/rom_8Mb.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/MBC1/rom_8Mb.bin 2>&1 > /dev/null) ; then + TEST_SUCCESS=$((TEST_SUCCESS + 1)) +else + echo "Failed: $res" +fi + +echo "Running test ROM ./test-roms/mooneye-test-suite/roms/bits/mem_oam.gb" + +TEST_TOTAL=$((TEST_TOTAL + 1)) + +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/bits/mem_oam.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/bits/mem_oam.bin 2>&1 > /dev/null) ; then + TEST_SUCCESS=$((TEST_SUCCESS + 1)) +else + echo "Failed: $res" +fi + +echo "Running test ROM ./test-roms/mooneye-test-suite/roms/bits/reg_f.gb" + +TEST_TOTAL=$((TEST_TOTAL + 1)) + +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/bits/reg_f.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/bits/reg_f.bin 2>&1 > /dev/null) ; then + TEST_SUCCESS=$((TEST_SUCCESS + 1)) +else + echo "Failed: $res" +fi + +echo "Running test ROM ./test-roms/mooneye-test-suite/roms/bits/unused_hwio-GS.gb" + +TEST_TOTAL=$((TEST_TOTAL + 1)) + +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/bits/unused_hwio-GS.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/bits/unused_hwio-GS.bin 2>&1 > /dev/null) ; then + TEST_SUCCESS=$((TEST_SUCCESS + 1)) +else + echo "Failed: $res" +fi + +echo "Running test ROM ./test-roms/mooneye-test-suite/roms/instr/daa.gb" + +TEST_TOTAL=$((TEST_TOTAL + 1)) + +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/instr/daa.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/instr/daa.bin 2>&1 > /dev/null) ; then + TEST_SUCCESS=$((TEST_SUCCESS + 1)) +else + echo "Failed: $res" +fi + +echo "Running test ROM ./test-roms/mooneye-test-suite/roms/oam_dma/basic.gb" + +TEST_TOTAL=$((TEST_TOTAL + 1)) + +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/oam_dma/basic.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/oam_dma/basic.bin 2>&1 > /dev/null) ; then + TEST_SUCCESS=$((TEST_SUCCESS + 1)) +else + echo "Failed: $res" +fi + +echo "Running test ROM ./test-roms/mooneye-test-suite/roms/oam_dma/reg_read.gb" + +TEST_TOTAL=$((TEST_TOTAL + 1)) + +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/oam_dma/reg_read.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/oam_dma/reg_read.bin 2>&1 > /dev/null) ; then + TEST_SUCCESS=$((TEST_SUCCESS + 1)) +else + echo "Failed: $res" +fi + +echo "Running test ROM ./test-roms/mooneye-test-suite/roms/ppu/intr_1_2_timing-GS.gb" + +TEST_TOTAL=$((TEST_TOTAL + 1)) + +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/ppu/intr_1_2_timing-GS.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/ppu/intr_1_2_timing-GS.bin 2>&1 > /dev/null) ; then + TEST_SUCCESS=$((TEST_SUCCESS + 1)) +else + echo "Failed: $res" +fi + +echo "Running test ROM ./test-roms/mooneye-test-suite/roms/ppu/intr_2_0_timing.gb" + +TEST_TOTAL=$((TEST_TOTAL + 1)) + +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/ppu/intr_2_0_timing.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/ppu/intr_2_0_timing.bin 2>&1 > /dev/null) ; then + TEST_SUCCESS=$((TEST_SUCCESS + 1)) +else + echo "Failed: $res" +fi + +echo "Running test ROM ./test-roms/mooneye-test-suite/roms/ppu/stat_irq_blocking.gb" + +TEST_TOTAL=$((TEST_TOTAL + 1)) + +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/ppu/stat_irq_blocking.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/ppu/stat_irq_blocking.bin 2>&1 > /dev/null) ; then + TEST_SUCCESS=$((TEST_SUCCESS + 1)) +else + echo "Failed: $res" +fi + +echo "Running test ROM ./test-roms/mooneye-test-suite/roms/ppu/stat_lyc_onoff.gb" + +TEST_TOTAL=$((TEST_TOTAL + 1)) + +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/ppu/stat_lyc_onoff.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/ppu/stat_lyc_onoff.bin 2>&1 > /dev/null) ; then + TEST_SUCCESS=$((TEST_SUCCESS + 1)) +else + echo "Failed: $res" +fi + +echo "Running test ROM ./test-roms/mooneye-test-suite/roms/ppu/vblank_stat_intr-GS.gb" + +TEST_TOTAL=$((TEST_TOTAL + 1)) + +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/ppu/vblank_stat_intr-GS.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/ppu/vblank_stat_intr-GS.bin 2>&1 > /dev/null) ; then + TEST_SUCCESS=$((TEST_SUCCESS + 1)) +else + echo "Failed: $res" +fi + +echo "Running test ROM ./test-roms/mooneye-test-suite/roms/timer/div_write.gb" + +TEST_TOTAL=$((TEST_TOTAL + 1)) + +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/timer/div_write.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/timer/div_write.bin 2>&1 > /dev/null) ; then + TEST_SUCCESS=$((TEST_SUCCESS + 1)) +else + echo "Failed: $res" +fi + +echo "Running test ROM ./test-roms/mooneye-test-suite/roms/timer/rapid_toggle.gb" + +TEST_TOTAL=$((TEST_TOTAL + 1)) + +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/timer/rapid_toggle.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/timer/rapid_toggle.bin 2>&1 > /dev/null) ; then + TEST_SUCCESS=$((TEST_SUCCESS + 1)) +else + echo "Failed: $res" +fi + +echo "Running test ROM ./test-roms/mooneye-test-suite/roms/timer/tim00.gb" + +TEST_TOTAL=$((TEST_TOTAL + 1)) + +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/timer/tim00.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/timer/tim00.bin 2>&1 > /dev/null) ; then + TEST_SUCCESS=$((TEST_SUCCESS + 1)) +else + echo "Failed: $res" +fi + +echo "Running test ROM ./test-roms/mooneye-test-suite/roms/timer/tim00_div_trigger.gb" + +TEST_TOTAL=$((TEST_TOTAL + 1)) + +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/timer/tim00_div_trigger.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/timer/tim00_div_trigger.bin 2>&1 > /dev/null) ; then + TEST_SUCCESS=$((TEST_SUCCESS + 1)) +else + echo "Failed: $res" +fi + +echo "Running test ROM ./test-roms/mooneye-test-suite/roms/timer/tim01.gb" + +TEST_TOTAL=$((TEST_TOTAL + 1)) + +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/timer/tim01.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/timer/tim01.bin 2>&1 > /dev/null) ; then + TEST_SUCCESS=$((TEST_SUCCESS + 1)) +else + echo "Failed: $res" +fi + +echo "Running test ROM ./test-roms/mooneye-test-suite/roms/timer/tim01_div_trigger.gb" + +TEST_TOTAL=$((TEST_TOTAL + 1)) + +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/timer/tim01_div_trigger.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/timer/tim01_div_trigger.bin 2>&1 > /dev/null) ; then + TEST_SUCCESS=$((TEST_SUCCESS + 1)) +else + echo "Failed: $res" +fi + +echo "Running test ROM ./test-roms/mooneye-test-suite/roms/timer/tim10.gb" + +TEST_TOTAL=$((TEST_TOTAL + 1)) + +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/timer/tim10.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/timer/tim10.bin 2>&1 > /dev/null) ; then + TEST_SUCCESS=$((TEST_SUCCESS + 1)) +else + echo "Failed: $res" +fi + +echo "Running test ROM ./test-roms/mooneye-test-suite/roms/timer/tim10_div_trigger.gb" + +TEST_TOTAL=$((TEST_TOTAL + 1)) + +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/timer/tim10_div_trigger.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/timer/tim10_div_trigger.bin 2>&1 > /dev/null) ; then + TEST_SUCCESS=$((TEST_SUCCESS + 1)) +else + echo "Failed: $res" +fi + +echo "Running test ROM ./test-roms/mooneye-test-suite/roms/timer/tim11.gb" + +TEST_TOTAL=$((TEST_TOTAL + 1)) + +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/timer/tim11.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/timer/tim11.bin 2>&1 > /dev/null) ; then + TEST_SUCCESS=$((TEST_SUCCESS + 1)) +else + echo "Failed: $res" +fi + +echo "Running test ROM ./test-roms/mooneye-test-suite/roms/timer/tim11_div_trigger.gb" + +TEST_TOTAL=$((TEST_TOTAL + 1)) + +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/timer/tim11_div_trigger.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/timer/tim11_div_trigger.bin 2>&1 > /dev/null) ; then + TEST_SUCCESS=$((TEST_SUCCESS + 1)) +else + echo "Failed: $res" +fi + +echo "Running test ROM ./test-roms/mooneye-test-suite/roms/timer/tima_reload.gb" + +TEST_TOTAL=$((TEST_TOTAL + 1)) + +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/timer/tima_reload.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/timer/tima_reload.bin 2>&1 > /dev/null) ; then + TEST_SUCCESS=$((TEST_SUCCESS + 1)) +else + echo "Failed: $res" +fi + +echo "Running test ROM ./test-roms/mooneye-test-suite/roms/timer/tima_write_reloading.gb" + +TEST_TOTAL=$((TEST_TOTAL + 1)) + +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/timer/tima_write_reloading.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/timer/tima_write_reloading.bin 2>&1 > /dev/null) ; then + TEST_SUCCESS=$((TEST_SUCCESS + 1)) +else + echo "Failed: $res" +fi + +echo "Running test ROM ./test-roms/mooneye-test-suite/roms/timer/tma_write_reloading.gb" + +TEST_TOTAL=$((TEST_TOTAL + 1)) + +if res=$(./target/release/meowgb-tests test-roms/mooneye-test-suite/roms/timer/tma_write_reloading.gb test -m 100000000 -s meowgb-tests/expected_output/mooneye-test-suite/timer/tma_write_reloading.bin 2>&1 > /dev/null) ; then TEST_SUCCESS=$((TEST_SUCCESS + 1)) else echo "Failed: $res" diff --git a/test-roms/mooneye-test-suite/roms/mem_oam.gb b/test-roms/mooneye-test-suite/roms/bits/mem_oam.gb similarity index 100% rename from test-roms/mooneye-test-suite/roms/mem_oam.gb rename to test-roms/mooneye-test-suite/roms/bits/mem_oam.gb diff --git a/test-roms/mooneye-test-suite/roms/reg_f.gb b/test-roms/mooneye-test-suite/roms/bits/reg_f.gb similarity index 100% rename from test-roms/mooneye-test-suite/roms/reg_f.gb rename to test-roms/mooneye-test-suite/roms/bits/reg_f.gb diff --git a/test-roms/mooneye-test-suite/roms/unused_hwio-GS.gb b/test-roms/mooneye-test-suite/roms/bits/unused_hwio-GS.gb similarity index 100% rename from test-roms/mooneye-test-suite/roms/unused_hwio-GS.gb rename to test-roms/mooneye-test-suite/roms/bits/unused_hwio-GS.gb diff --git a/test-roms/mooneye-test-suite/roms/if_ie_registers.gb b/test-roms/mooneye-test-suite/roms/if_ie_registers.gb new file mode 100644 index 0000000000000000000000000000000000000000..8a434d59e4b2db7d50df14aba6d532f4b6ae67ad GIT binary patch literal 32768 zcmeI4Uq~EB7{K?|tJ$bAYfQpwx5?gd*o`&87$JwfZr62VPFFZdDgi5KwQ53Jl_>OL z&WkoptNH(6AOWFy3-m<_r6B|YMUr}4uH>bGKvL!jZ!d$E8`(OI{Zmtmu^M-|^LXogWkV-aBP6@?# zZw@TnyLacp)vNtI1I0hzym$A)7gw+BFg_X_9OymNyS2Yt8|fV$5!%}YDxMv});q61 zntiY~{UDw0{L8mCZAc%3<=;p{JmO0~k3@Uve&U^vwoj(-|8V{Bc7e>2NphS_k(1;E zIZaNHv*e5+kdwa2bn>?G6FC8c9}N#V4TA-PkW(;t_{it(o_nMDdEW!(Ljp(u2_OL^ zfCP{L5F*+tmP8OF32Zu*l|H&2i?IgtlC)`)uB&Q6K_~;Xdtjb!+@UYyyp?1heCWd`^o%8 zk>%Dj(*&EM1OgV7KtNGImn21j+>)fKpoc=1<@G9xro}V$&vnaUYk zlS(WG_N>l$!}{anGc!CMP9Bd#Z&~2aZWj0(2I#5^)!_AVf7=d+TU&>Q!eQG6JFLWn zow&Zfr>Cv0si~d{*e$EOd(WQc=Eg>rUse4}!tR%yk7WS=<#tiz=WlK0>w#UCi;Dby z7JuXj?3D>ykDZ0z=fni)0V=G%U|&s5ZEZb0e1BkJRS5C*^?v{Q_1S#cdST}a2H~}U zF#e{=-j3G`yM_DB#I9al$n3KG^!o)b5SEX>J2nS>C?tx8(b!m52O5xp`t9!S=l~sr zy=iuSk&0nh7WZc_23`TLUqzASU{I#Qq6MM0wxz|kYiqq;cA8)i_yhuAhuU7knR(x! z^A{;eLql-#KtR{4tE;NOAM!F`d||Gyue}|p!x&`SwwfBabf&Q#^810gj*jkb%YsTZ zP0;J=pjzM!iW#O=RW&uRF4)-V6$SRrbXg9CU7P?d^Si zSv%Cga-G$HEVDNYzgb}w@K;q?uBIZ(j6Y|^D+cbrh>9ff{XtYsO-l=W!mVco^pf#( z>YS6h?d<98KQKJfdvI6)o&J2&OnZ0ovc8pC>xYMX4~`rd9C%{3!lRe?0sKI%y-_35CK=Ekd6Q{ z6(Q+l;u?9}c*LE`C64U|670<+uy}%_5%**+36k$-;u?6|ClU8VE^*m~dol@Zp5R!- zJ)KK}7=F{pKv|_Gq3r~baK(P7td&a(*A6we=;7uq!s7q6~D4k+O(!( z!#2Mn8P@K|zRvzZGxentERUuJoI|vY(sr1(7;R&;DeI!dbBK6GiRUo!#E55%cuZxn zG*dkFw8qM5alM++8ke-vQVNMVSSuVFo^`NSIP7}XA-uw&Ww}FQmRO{LIHcJqA*S&+ z**$mBDagAtzgVE>`IX0X7m5o|;`5A0@>+s;j0qynz6CE)`y;WicCjER-dJ^`+Mn>r z<0XRWaaYY+X7UiQCj@cc*s2_OL^fCP{L53T_2I_mTBSAG_O7AqA|-kSIA{CS?`RuoMGnRL)wRcBnl?73QHjOCp4Ay|7=LndZqAK|mB-`I>N@zdody1? z3c4&qHF!L(zhOioEiJ>tk%(b{9Y$ipRvZrZ_O`V(HioHyUDtbhT3ef%>g!p4S@tap z+h4XmmI3@%+If0m2eY@dxZ{Cc6blM`J{EuYFwB(+8;`BU-Os5h(EU_ceZjmM8{67? zd)@hgg;gQMhr>SK=FQoB*?M8?3kKn|fH3}=#?Fq%1G9zwbz;}A&u4Z~eER%?7YNJe zo;%hDZ79U^s#;%PTMHVHf%@&~>Ffj@gq>-&ex8b|>bmRCP7Is^w|*r_6oWyL3X3MB zrlz^sFluT%9=4ib5cv50V29dX#_61I(A^U$2*bm$a=$+isH&>01b@iOgz<&G{{D^* zpbqaKJ9k!B!=^Kh&CuN+=CttlR80fDwic=d&LHnFt*orBhH=5hRxe2~cczPC zCJJewI`vv-@sC0Dn_h;=;11oh_1ER>zEPS)VDBv&4qF6;m6d8Y) zm0K~e{{>V8!JQvORaZAR!zb)|RzNSB%&?1PTKfj}kBs&m7$Kn3zwhD38GHItUH-`Vs|KDWARpWGWt|cxz@Q9Nj;wJbq zYM)t4g47`=uGx+IB5I#rOI+ftN$&&V_BLI+m%e2N*QdM8^jl_n#`Kb}lF;*pSIeZ9 zY-8!P@)vE-IPH`7@e4{}ZcgEACBoJXIoRkj2F;Zo=X;X{p#Lo-nPkGFn`(J6ip+R$NRWF$aB>L*26u z#wv%s&pJd_InbM!oB^F7lJk~s)mf(1q!wA4`nT1PIB(|VTv%Aj3*`8uhjbQ_4N&3> zj7REf(&E%9i=TfRPNMQ>a&hBQUXZ`O?s}Ck=@lo7h{oCL5?9TM#clVug^mv0@+ZAy zk|WA|;zx7d;%$C$YGF_EVQNo$!u&lkVUAr~DDxHPOOM*=+qf@Z`olJEpMNL$Lpo|+ zOTJP+WN@)a00|%gB!C2v01`j~NB{{S0VIF~kN^@u0!RP}AOR$R1dsp{Kmter2_OL^ qfCP{L5OBYGCo?-$yf;^ zV?BzCV#|AqqKnFdAinXqWhuHZZnhLVlrgF=6*t%8Z!4v>6P0pM5d$yF9<9@-M5`#@ z5$)^o538>JzJbAB>&)rlmwfA}X!XkL@z4L+n6W5T~l^sAw=o*oi#h$FhBqVK;S+GI*M@${?ZfqM`D0T2KI5C8!X009sH0T2KI z5C8!X009sH0T2KI5C8!X009sH0T2KI5ZJv03N@ntVy`g^uy-F1TGLu-+Y&<4s6HiC z>!+H0o(t7$+JOV9lxa3J*fzBo8(UnwaG|yJ;KBNO@|&h5)z;S8+1AGK+%MgeG)>nj zLf5&TK4Vf;PyVhh({vou?CK(mL=$uzy0RTzqZVY_c2rya#W*F4BrkN($w(WVbm|<8}VQc?Kw&(E}6rV~3K|as@7YeSM&#P+Ww{5a%1dcBh zc8*W|QHlI~?>MSj&4GKa<{Q~esJ`AX#>NbTdDEO}raW7+*hevBWiq}``3S+SDMR01 zT3TEj9kndeG^CPAo(09{a=uT6u2K7B&O z*)wNOp6u`E{!KHnEnZ*Fk9(l_TED7B`40_66N_;+nGEqsCdp5GdmHE0`6fF$k(xF=O_?W?snn4p-Q5&V z{j!)Z)lE!{j1YCYCmlYVPSc{Z#WRf7hw4U0vsurho$9(|_x93mp);s%G41Y7r)gaB zarTBmb7x!EZJTCL9iPVP>}+pmKkdQl^M&dbq((+2CaQkg1GP5q0bS=aOHWoBh2l+9 z*N;f)I`fZMMLUMpze!5dqWMv)bb4@*K55mfBKxQam4@Kf_mxLMW^d(MP?-xVH-or% zw@fw9#of)@8?}FoSbINv-D<9{Yu?kU9oX0T?BRr=Io^rWXJ0u#p1J zuuV4G4Js%e>LCXU!Rp1{3?8LakhPGtS@9r((#l*cRa7ED)M69gFTV`C5%DUf-!Ht` z`Muxo{rP>~d&9yev$geTOO!^H&wrYpUOONf>n?~_M3Xomw3d$7-w@4r*3RF%d-vuig0QnDg??%=t5y&KxKZtKWY*~)(i(4(l4rP++OU12?_?t>;{dlDuRK(B=vPWy=q-Yi8 zl4#$Ezh89?4h#+VTc<|Gp7*VzqSY&J#6SIKZ<@T1_QE225C8!X009sH0T2KI5C8!X z009sH0T2KI5C8!X009sHfjvN=bWPcng%G7zch~H4!vFyg0D=FQfb-c8TMz3yYkxI% zis9fs>!JKfS^j4Hz4Oh#1Z+p_WFVh+@6{$#x{0S>Ef3s-00@8p2!H?xfB*=900@8p z2!H?xfB*=900@8p2!H?xfB*=900@8p2!O!eB~Yjl{TF+US%AIwc+i^GO52eTnnv|0 zsaikPqo}_8I zP7%7!_4FB&qI&Xob(yB)m}XZOStOdEL$+m6Ji^UAXvI^V#Ke9cK$DsIBDhTp=>W@m~=X=Ld)oKphb2Z<{W*jKwrSFCh{d9K-w%S((b?G`@O|>rNG#5HU|?!$Y;0&~K#KgH zm(89!b>hU}Aop*Yi5>C!a(>(c#n<{(HOhZSXtuPz+imyn zZ)Cr&|NZ<@6p8zb&K=j$)wWgDaRvwb`^h3Qw12bNi3zeve5N^nRmyQZFN)_AL#H6x zzlNdfnT#&Qt%d088y@!kzP?zDv&m$LPclh<+S@xgx6e1((TUWw*;&dwnM|d6d%L?S zp891mU#gp)9v>&_bWiH(NvCPi+2R>S>qB)D6WOfi(N1+;vitjKx6m0>x0!Z#r_(ep z`8a#Spt-ZH>$XiZsE$u#b#}J5v!C{0_4z_|i&Ep`)6-Qy?SWdG_kgbRnWZNyjY9FJ zsq4K`y3YI~R?&{3^>32Wv}k_RDxDr4rcYY+s>nVnLZuzenqYKIPVKG~BnG{-wWa{9%yGj8SEAk&_!d=Olc zWlolPS@NaMSD zHl*qj#;@{qIL127r?ARz)4Ba|IaHj*P+fV3GO_+B$Ms^1aFzAPO80|>dmTS_*ssle zku1yC?kK`qDg6?xgzCC_Z*leMa_+;`_QVs7#&4(P-CUy4_fL9{pH!{{xA3Z* zz54|hnSlTZfB*=900@8p2!H?xfB*=900@8p2!H?xfB*=900@8p2!H?xfB*=900@8p l2!H?xfB*=900@8p2!H?xfB*=900@8p2!H?xfWZHhz+a*E)R+JO literal 0 HcmV?d00001 diff --git a/test-roms/mooneye-test-suite/roms/ld_hl_sp_e_timing.gb b/test-roms/mooneye-test-suite/roms/ld_hl_sp_e_timing.gb new file mode 100644 index 0000000000000000000000000000000000000000..6fc8b296d372de4d2573acdfc81364f528c766c3 GIT binary patch literal 32768 zcmeI4T}T{P6o6;OjhU#ivoQ&yohGx(A{(p07$J+@PR4O!R!3M#D*-FSYSo0cD$xgH z*3H^9jpqNsKm(TMEzlP!l!hP#!jjZwvyFL(P)N%3Awr=IQ$lDO8n^fC^>){Wf)9m2 za}LhzJ@@?FbH978;Deh^zuLmZTlw#Q?d`q2o-527;*N7g+r#h%hK9NJc8&i<6;aHhE;E(^zrBFy`V zjTN)Su>sF^DKi z5_m`worg~s5ts*iMTMehnxa%xfCd5uY8t$$&fY8n^k9(9Wx|Cw$WbPe$L`$M5fgyxS%bv+Uh1ZEEgL5CHn ze>A#seaHt7v(vGr2|{)cG;?;pOs9nM^JTfSQ^j&EjK3OfwK*cCa#gB%e%zPr1vt*NP= z2-ppyt83rB=H|vmnqN`8%RH5Tvh~0&Nkv6oFO5HT3~Hr9*Q0x3 z=Q%zOx{nC$FQ}`jsjaQMo7D#v+Jz8bU+?v9+?dUm?H9VgKmcwF2<5Nq^zOJ^P%WHq zCU)JrLTZOccB(7#<>9UY*9&^t}{FA&i*!(jgO z#=tFL{VU6o6bMK}Xf(&w*0!{mW^Jv@MRyYj03V+Z?9kiGI5YPfbao>}ac~fJ?(_Nm z)zy`i;17AJP`)tN+uPm_)L{&=eS1v}96Hr#h3tG_uA`%?%P^o*bshA&I_MU-gF=RB zWo1nbtP3`}ds&9ssV+&uAXJcDAJ!@_FDs*V=)vso7nmC-(%#v)-iDYMMOlA)dx{EH7zah38$VF(A}|g>Y|leu=e%z9U2<$ zIXuLHPJX^^CU0lrs=ta@>xYJV4i6t1=>OYnghsFWH_+I3$+zC9z3(6TsOJMNF|*&9 zI6y)OuVjON8w7LYRi|>!c-T30&0m!I1{UOoU5XnYcz47YjR+ ztBIr4K!SHN2@ICtc-T3!ngq%BGI0$o?vt={dNpy`g}XBeOqSq8*g3bF1j!FGaeG+Y zr(x&pYT~jB4`mXBSb~#b=fY|dB#&m|T3Fm?Vdwm6;^G%A^4&!Ip5~hmQ}b3}UFv|9 zddo^pS|0B61kAkQ(bLJL+^-$V9gkj7i}Uk}*K8KItS{fR-7AZlu{XT`K;M9#`pOEF zjimamBjgz+&r$M3$TLPBdBcd!AF=sSn?Gvv5t|>gd0k#A$uv(r>9I1>T(4)e#$~Of zgg~MW#tMgq7ahzM4trj72(55v$#qD~*oNI;TXwVNwsq}KdvE-*RgiaOZmGbZ=arw3 zDr5(sMCa(YK_#yzY+f6;g_*bECaQlV7GGN`2ne^<-m3N{JW|Zf>AbTxe%%^d-1=y1 z@WjBpFG0RSis#gs_;=QfEjYsB_}s39oL zxV$@YBNeu8CSJzh6SyW4Kmter2_OL^fCP{L5wpWAU)vCucc{s->t zoO{ka_nhyZ8v-F)t3BBwR>!r^f0~`WxkI!zoe{5#HnBq(9lPIrOSIp*dHT-n+uvNd ze*NUk>GmIQ-oAC^>h+Hfy06X6oj!5?#NLy6=j@3yXT{{CkfI$Fd%xUBmTMimbWIo4 zyWx7UdD(d&pKm)4lC=%Dd@d=?49sVwG}oC6~jB z>FK4VQ>QvR_v~qIhTXOuDP3K?yo=T6O@e1gPm-GEZ!m=Ev zwAKHy?)z#F_-8Uy33q zsJYp)rl&1S@kY+bRAmcI+28{$n+*cgBZOLw3WH#Id1+~C%5iMll9EoVEZ|=#1OWz~ z@%plqAjoE8JFKz2SoFL?!IM%f!d}-EZ|q+#FE7XIQF*C^r|-jGoh`1t&M7zP3C*hz`1czAebW@2J=bXW@PzMsz@J9hZ+$cTz>+o^}5&R5l^BEY}V zuIq9AIyMn@+mW@h62U{PI&^~1xd z)Xtstc=di!^<}fTEfB@u^VHo*B#i%K04L&pbrh9TW|;UEvEhb0|VF>HdVc4A$O&lW-f;e>ic7_-rnwRWk(Oz zf4*RDQOe}x>}=hR9%$56516L9v-ru1UEpuqrnz5=X)69PtGHuu{%ukWBhC-21_s8) z@QG8e3-kjb(pthB-&Y@m+3nSVlPiajiA-_WBvrj6K z<}OD1$_uE(`Mr`f%N@eg)}LCv8(zG#``+%{8*^WzEAm@*G~ukQ{v57E`nrB+aqam^ z;e)mA)HAKtugB%vLaNpJZ9Vw*_!Fp%+Qk3> literal 0 HcmV?d00001 diff --git a/test-roms/mooneye-test-suite/roms/ret_timing.gb b/test-roms/mooneye-test-suite/roms/ret_timing.gb new file mode 100644 index 0000000000000000000000000000000000000000..4831cf4fcdb416fb0b9c7a0c8f28c4ef2b91dbd7 GIT binary patch literal 32768 zcmeI4QD_`h6ozLe+c-_qFwq(&VN7P1C2m7n+HJrkjN@b+(n%X^D274^7&bKRi%p<~ zZqw~{g9!Rm!8}-q)VIDFd=e=N5`--6N*_cJTA3F^1(lT|YOz`GpWAU)vCucc{s->t zoO{ka_nhyZ8v-F)uRqzMtWT<6{y0B>bC=TIaz=SW=}>kldRPBjZ!4X*Z=T+~bLX2Y z*RP+PJKg!i%{#ZRT)qCuLHG5Ah0`a_pV)gcZ=XGJ=BzS3tq4&MDtm9WC(HG&eofVs z>fNvwY+bhRi|0G`{bc=tTRxXm%C3FxK>b1TUA6W3X1iOC#&*~bM4ZaUnZA3;_to{< zp=u?pD&u3L;}awHv7=M31oi=?+pjdQODbD#eLLdjBO{8Cwg_4K_mEkHyqE0M{@U`xe&7waPMbUN4XM{A{F;gtcfq7l;>&s*;tF6s( zuwr(0W#!bV?(RK%T3cbaEL%uV&%i)WkMx&u@ea{-!+?ij$a#DwgkT=_!9mM%UCSCA zga$!^u8XJC<7d1Ay5q#NjZf*XX)?BLdme12nNIsc(rMF#uIr|W*t%|6&>hG36A9C_ z?b3Gt$GY#!J>Z|ogkiBL!*g^W2N`K!U@i1b$e0N<uSeyj5}v*fe|fUt@4C<}3*C@N z#Qs4LhLe+vi(wc9uwy4Fvf|Ovxw)yS@$pe1u={>Kf9%-d!((GIzGbBziacLgpNs(i zX1k`v^-oU5`@wD)9UZBZTz}~ja+Mxx5TLEkyPg@){qXnwp!7^MgfpA=ZzM zrc%3iH{vz=Mb?+g;kG~|f6tS5Cy_w5IN$BHJ9oBAyJ7tE{=y3)(_+1uJ6bG^2Xp6#QkfUhLOt|LgZ>i86KXP2!i3^L_$`R z%Yjci4Lf@KA48@vx++g=iebj*W>)KDw~~{ zz$Z?aKt2=<(N1E_l^%!(4Bn`eArpj3qHHh*1>dq8R4Wg-AUgsY{W1AySKx zdNEQxb89W~qnD#2(P6hM^4ve7L+f9KZ7tU}w%Rf+Df1Wc z_-Lay^-R0@>v8e6lxjDBs|8gDi@$|HY0qJacRfCNZ@1W14cNPq-LfCNZ@ z1W14cNPq-LfCNZ@1W14cNPq-LfCNZ@1W14cNPq-LfCNZ@1W14cNPq-LfCNZ@1W14c RNPq-LfCNZ@1pX5Oe*z)E*WdsE literal 0 HcmV?d00001 diff --git a/test-roms/mooneye-test-suite/roms/reti_intr_timing.gb b/test-roms/mooneye-test-suite/roms/reti_intr_timing.gb new file mode 100644 index 0000000000000000000000000000000000000000..83c845db98fb61583251d4e504125454e6cc31ea GIT binary patch literal 32768 zcmeI4T}T{P6o6;Ptr>rkjM0SAPLpw2WMfS*M#y5f({Y^W>If@oMX-Wat0uHni9Q&! zZnSAy&Hsae288A<&=)C`h7bsZC8^71OI{iXBrq@WA+%vi2>r$FJ$t-aZSo+Llu*vW zd-tAue(t^BJ$JzeO{f2zl-zr9yc+NEyx8(;%?j~0&ksKj4BXx*6y%Hw$Av;+qaYRS zn3)we-M>Aw^x(n0i`T9V_6=?N>Gp&B7r(l8b+7)(@bFOok^WtSz1mp+=$O#iDKPQu z6?S#sc%tV$+MIrrPA@cdbpPq~KG`#qe)!|fr+Wlv!I^PRISr1c(3;AOb{y2oM1xKm>>Y5g-CYfCvx) zB0vO)01+SpM1Tko0U|&IhyW2F0z`la5CI}U1c(3;AOb{y2oM1xKm>>Y5g-CYfCvx) zB0vO)01+SpM1Tko0U|&IhyW2F0xyd|Y?Z)Yv9D5Nr2qeTz@4rZX+;DN@nO^PWe59t!c<>?it*BIedK!vLG2`28jmzh6;6 zmn21j+>)fKpoc=H>Gdj#ro}S#&vnzpHNZa*2#2Fl%pZ#xMl>pl+#U*n4lAI4EVg!i z$Onzvajfg2m^}k#&YqX+NGLZ~QF?k51$o1sVW+rT(9i}xpap}L1?Le2jD{0h*8Ke3 zTvwN-sj9-n@5fz$|M<9NL4%&hPcgBqV36Cv%I(ppVT_L(OrlY+XLaNa>rYM1&+~XV zc`OFKX@WoAEb!NL&{Y+x!RzJzmK6@SwT+B~!{o?sB1Ng7Diy}XNTN_^w?6O=~=<{Lxv171T6kHF_!tZl>8gxGs ztS{JCb8~xpUmxEeSg;BqzP{e)D=Eq5%hn5?FBpW^0)qSv1K*C<3%iB;&BW&A6`);~ z|M`Bw3k37=cZYM(heD#L>y3?db)W$msNde+t}f6)@J-|SMJBp#n%o~>47>tfzltKu z!Jy0pqXnV1wzbu=YHPh-JWVhNeEfc}Lv63%%)D>V`HPgKkr6n#-yaB6S65YmKjcM0 zzA!g1(Af#pVGOc+cTEjkI%>E>em^kR)z#Z;noy~R0eW2>R13U8F~hW~s-_0k1sk4T zQDE<=%W^0LJIJmNYgJT~m7yJKF#G)ibJI*ZI|l}`cBp~XI@W+J|)mX(b4|HV~2)^o|(tfG9Xptp>b6sF*{NB(T=+5p zGjEg|>EyC&EuYi=VEy?_|7<*QS=*GGv+1>M()NuNTX*{uNjIA!9o>V&M(S%jST>#- zvX8Jf!P-&QqO47_rfeB^JVzYQgyT8tc%qJH((xF|a&e}3>RFAIvEq6?qcyH*#l;K~ zI+$x58lHEs);R2c-XXlkp>?%GV!<(;2FG?<^diU5|8kn*m+btU%ZtnTfgGRml>Y5g-CYfCvx) wB0vO)01+SpM1Tko0U|&IhyW2F0z`la5CI}U1c(3;AOb{y2oM1x@ZS*l8;8Yb%m4rY literal 0 HcmV?d00001 diff --git a/test-roms/mooneye-test-suite/roms/reti_timing.gb b/test-roms/mooneye-test-suite/roms/reti_timing.gb new file mode 100644 index 0000000000000000000000000000000000000000..5226076cd4287ba5a4bf15e8da2bff569987e87f GIT binary patch literal 32768 zcmeI4QD_`h6ozLe+c-_qFwq(&VN7P1C2nI{+HJrktm9-H(n%X^2!=uk7&bKRi%p<~ zZqw~{g9!Rm!8}-q)VIDFd=e=N5(-(`EqxH7(8|0RDyXa!QG?BT|J;tdiiN%j_CIiE z=iGDdx#xWM+z<%aTJ7l;Wo=x&_2b;!&0R`s(`n^xrA^tT=pDW9zNfU`y?JWm-n~1Q zuU$Jad#e41oA>TszH;sJgU(y?^QVrVJHGcs&OUSe^ciJpN)e(SRQBF}DPF2|^lGZ6 zRPF~=f9sOHDW31!oAKI1r*t;1lpOo)f!f3P2Ws<+jdrILj_j}>ia2*ZOZ7a6f26Ke z4^_%RMHw9#9vvI9Cyq|O?%M~HPOsd!F0O1jwe5%-kBulo+9G82-$SMm@*ZVy&Z0wh2JBtQZrKmsH{0wh2JBtQZrKmsH{0wh2JBtQZrKmsH{ z0wh2JB=Cd;9F>1zenM1qBLNa10TLhq5+DH*AOR8}0TLhq5+DH*AOR8}0TLhq5+DH* zAOR8}0TLjA#}X(u2>y$`K`m1M|M9??Hj4g86h+rDpAyn&$4sFh2j+FXrze%Ntd^E+ z7At0EmX}YS?CjjLr@0w+%d&-Zb@laibxD627w-^VHw<_fhMdP|ObF&-@9(!P$FZ#b zerOOR=s0*vJ$gnfpl7quZ2eREYnqI0+pY_nX(p4NkYv&{q3gP7BDStu7W8b^^I|d6 zwC&<{|3|v#$vxnoN(DioAmbN{u3IQ*T4c{=p<@T>Uo8H8f5gLx?DE}lG_78Pj9jlb z(j}qhX49ORF-^%EIU`e%GQMRc9*I0(S)Ysm z|36p?B!AbHcPAD@wm9GIwL5pVO1okF^ZvpMBI8B(PR`+(&1#zC zjEoEoK?51|Z!R}I4ILuyw5(qf;y9ic`O6!FTM+fHX&Oc*V+fI}6=iU6Y|Qru2V*f= zO(p|A$t3LP?MFDb?>F@5M(X;)0xC}?Q>p#?2L|AexKbov%+1YBO@TVzA^Y~F(>Qdg z$qb|O!QAw8F6VjZRM&+*G=y%!9n`j&4h*Ez*cUcgy=fwMsT)Q%iwx@fW3Rrx?rv#E z57vLaU~Wms)YRNu-Hsk;)MXDChP<=*$%IFV{ra$LUcXK53ADY zu`zt&)awHMfD)=L!S(Mdn?Yu0w3*%)AhHYd5wUzh9>DeetT@-rUr_ zqf_tM)%X0qgsD5;p`*v%JTdQ9z6~iJMD zgzAM*bc1cLD(Pw literal 0 HcmV?d00001 diff --git a/test-roms/mooneye-test-suite/roms/div_write.gb b/test-roms/mooneye-test-suite/roms/timer/div_write.gb similarity index 100% rename from test-roms/mooneye-test-suite/roms/div_write.gb rename to test-roms/mooneye-test-suite/roms/timer/div_write.gb diff --git a/test-roms/mooneye-test-suite/roms/rapid_toggle.gb b/test-roms/mooneye-test-suite/roms/timer/rapid_toggle.gb similarity index 100% rename from test-roms/mooneye-test-suite/roms/rapid_toggle.gb rename to test-roms/mooneye-test-suite/roms/timer/rapid_toggle.gb diff --git a/test-roms/mooneye-test-suite/roms/tim00.gb b/test-roms/mooneye-test-suite/roms/timer/tim00.gb similarity index 100% rename from test-roms/mooneye-test-suite/roms/tim00.gb rename to test-roms/mooneye-test-suite/roms/timer/tim00.gb diff --git a/test-roms/mooneye-test-suite/roms/tim00_div_trigger.gb b/test-roms/mooneye-test-suite/roms/timer/tim00_div_trigger.gb similarity index 100% rename from test-roms/mooneye-test-suite/roms/tim00_div_trigger.gb rename to test-roms/mooneye-test-suite/roms/timer/tim00_div_trigger.gb diff --git a/test-roms/mooneye-test-suite/roms/tim01.gb b/test-roms/mooneye-test-suite/roms/timer/tim01.gb similarity index 100% rename from test-roms/mooneye-test-suite/roms/tim01.gb rename to test-roms/mooneye-test-suite/roms/timer/tim01.gb diff --git a/test-roms/mooneye-test-suite/roms/tim01_div_trigger.gb b/test-roms/mooneye-test-suite/roms/timer/tim01_div_trigger.gb similarity index 100% rename from test-roms/mooneye-test-suite/roms/tim01_div_trigger.gb rename to test-roms/mooneye-test-suite/roms/timer/tim01_div_trigger.gb diff --git a/test-roms/mooneye-test-suite/roms/tim10.gb b/test-roms/mooneye-test-suite/roms/timer/tim10.gb similarity index 100% rename from test-roms/mooneye-test-suite/roms/tim10.gb rename to test-roms/mooneye-test-suite/roms/timer/tim10.gb diff --git a/test-roms/mooneye-test-suite/roms/tim10_div_trigger.gb b/test-roms/mooneye-test-suite/roms/timer/tim10_div_trigger.gb similarity index 100% rename from test-roms/mooneye-test-suite/roms/tim10_div_trigger.gb rename to test-roms/mooneye-test-suite/roms/timer/tim10_div_trigger.gb diff --git a/test-roms/mooneye-test-suite/roms/tim11.gb b/test-roms/mooneye-test-suite/roms/timer/tim11.gb similarity index 100% rename from test-roms/mooneye-test-suite/roms/tim11.gb rename to test-roms/mooneye-test-suite/roms/timer/tim11.gb diff --git a/test-roms/mooneye-test-suite/roms/tim11_div_trigger.gb b/test-roms/mooneye-test-suite/roms/timer/tim11_div_trigger.gb similarity index 100% rename from test-roms/mooneye-test-suite/roms/tim11_div_trigger.gb rename to test-roms/mooneye-test-suite/roms/timer/tim11_div_trigger.gb diff --git a/test-roms/mooneye-test-suite/roms/tima_reload.gb b/test-roms/mooneye-test-suite/roms/timer/tima_reload.gb similarity index 100% rename from test-roms/mooneye-test-suite/roms/tima_reload.gb rename to test-roms/mooneye-test-suite/roms/timer/tima_reload.gb diff --git a/test-roms/mooneye-test-suite/roms/tima_write_reloading.gb b/test-roms/mooneye-test-suite/roms/timer/tima_write_reloading.gb similarity index 100% rename from test-roms/mooneye-test-suite/roms/tima_write_reloading.gb rename to test-roms/mooneye-test-suite/roms/timer/tima_write_reloading.gb diff --git a/test-roms/mooneye-test-suite/roms/tma_write_reloading.gb b/test-roms/mooneye-test-suite/roms/timer/tma_write_reloading.gb similarity index 100% rename from test-roms/mooneye-test-suite/roms/tma_write_reloading.gb rename to test-roms/mooneye-test-suite/roms/timer/tma_write_reloading.gb diff --git a/tests.md b/tests.md index f97cc50..3df0400 100644 --- a/tests.md +++ b/tests.md @@ -2,71 +2,95 @@ ## Blargg's Test ROMs -* cpu_instrs.gb - [ROM](./test-roms/blargg/roms/cpu_instrs.gb) - [Expected Serial Output](./meowgb-tests/expected_output/cpu_instrs.bin) -* instr_timing.gb - [ROM](./test-roms/blargg/roms/instr_timing.gb) - [Expected Serial Output](./meowgb-tests/expected_output/instr_timing.bin) -* mem_timing.gb - [ROM](./test-roms/blargg/roms/mem_timing.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mem_timing.bin) +* cpu_instrs.gb - [ROM](./test-roms/blargg/roms/cpu_instrs.gb) - [Expected Serial Output](./meowgb-tests/expected_output/blargg/cpu_instrs.bin) +* instr_timing.gb - [ROM](./test-roms/blargg/roms/instr_timing.gb) - [Expected Serial Output](./meowgb-tests/expected_output/blargg/instr_timing.bin) +* mem_timing.gb - [ROM](./test-roms/blargg/roms/mem_timing.gb) - [Expected Serial Output](./meowgb-tests/expected_output/blargg/mem_timing.bin) ## Mooneye Test Suite -* add_sp_e_timing.gb - [ROM](./test-roms/mooneye-test-suite/roms/add_sp_e_timing.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/add_sp_e_timing.bin) -* basic.gb - [ROM](./test-roms/mooneye-test-suite/roms/basic.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/basic.bin) -* boot_hwio-dmgABCmgb.gb - [ROM](./test-roms/mooneye-test-suite/roms/boot_hwio-dmgABCmgb.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/boot_hwio-dmgABCmgb.bin) -* boot_regs-dmgABC.gb - [ROM](./test-roms/mooneye-test-suite/roms/boot_regs-dmgABC.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/boot_regs-dmgABC.bin) -* call_cc_timing.gb - [ROM](./test-roms/mooneye-test-suite/roms/call_cc_timing.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/call_cc_timing.bin) -* call_cc_timing2.gb - [ROM](./test-roms/mooneye-test-suite/roms/call_cc_timing2.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/call_cc_timing2.bin) -* call_timing.gb - [ROM](./test-roms/mooneye-test-suite/roms/call_timing.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/call_timing.bin) -* call_timing2.gb - [ROM](./test-roms/mooneye-test-suite/roms/call_timing2.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/call_timing2.bin) -* daa.gb - [ROM](./test-roms/mooneye-test-suite/roms/daa.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/daa.bin) -* di_timing-GS.gb - [ROM](./test-roms/mooneye-test-suite/roms/di_timing-GS.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/di_timing-GS.bin) -* div_timing.gb - [ROM](./test-roms/mooneye-test-suite/roms/div_timing.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/div_timing.bin) -* div_write.gb - [ROM](./test-roms/mooneye-test-suite/roms/div_write.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/div_write.bin) -* ei_sequence.gb - [ROM](./test-roms/mooneye-test-suite/roms/ei_sequence.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/ei_sequence.bin) -* ei_timing.gb - [ROM](./test-roms/mooneye-test-suite/roms/ei_timing.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/ei_timing.bin) -* halt_ime0_ei.gb - [ROM](./test-roms/mooneye-test-suite/roms/halt_ime0_ei.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/halt_ime0_ei.bin) -* halt_ime0_nointr_timing.gb - [ROM](./test-roms/mooneye-test-suite/roms/halt_ime0_nointr_timing.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/halt_ime0_nointr_timing.bin) -* halt_ime1_timing.gb - [ROM](./test-roms/mooneye-test-suite/roms/halt_ime1_timing.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/halt_ime1_timing.bin) -* halt_ime1_timing2-GS.gb - [ROM](./test-roms/mooneye-test-suite/roms/halt_ime1_timing2-GS.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/halt_ime1_timing2-GS.bin) -* intr_1_2_timing-GS.gb - [ROM](./test-roms/mooneye-test-suite/roms/intr_1_2_timing-GS.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/intr_1_2_timing-GS.bin) -* intr_2_0_timing.gb - [ROM](./test-roms/mooneye-test-suite/roms/intr_2_0_timing.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/intr_2_0_timing.bin) -* mem_oam.gb - [ROM](./test-roms/mooneye-test-suite/roms/mem_oam.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/mem_oam.bin) -* oam_dma_restart.gb - [ROM](./test-roms/mooneye-test-suite/roms/oam_dma_restart.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/oam_dma_restart.bin) -* oam_dma_start.gb - [ROM](./test-roms/mooneye-test-suite/roms/oam_dma_start.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/oam_dma_start.bin) -* oam_dma_timing.gb - [ROM](./test-roms/mooneye-test-suite/roms/oam_dma_timing.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/oam_dma_timing.bin) -* pop_timing.gb - [ROM](./test-roms/mooneye-test-suite/roms/pop_timing.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/pop_timing.bin) -* push_timing.gb - [ROM](./test-roms/mooneye-test-suite/roms/push_timing.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/push_timing.bin) -* rapid_di_ei.gb - [ROM](./test-roms/mooneye-test-suite/roms/rapid_di_ei.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/rapid_di_ei.bin) -* rapid_toggle.gb - [ROM](./test-roms/mooneye-test-suite/roms/rapid_toggle.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/rapid_toggle.bin) -* reg_f.gb - [ROM](./test-roms/mooneye-test-suite/roms/reg_f.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/reg_f.bin) -* reg_read.gb - [ROM](./test-roms/mooneye-test-suite/roms/reg_read.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/reg_read.bin) -* rst_timing.gb - [ROM](./test-roms/mooneye-test-suite/roms/rst_timing.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/rst_timing.bin) -* stat_irq_blocking.gb - [ROM](./test-roms/mooneye-test-suite/roms/stat_irq_blocking.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/stat_irq_blocking.bin) -* stat_lyc_onoff.gb - [ROM](./test-roms/mooneye-test-suite/roms/stat_lyc_onoff.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/stat_lyc_onoff.bin) -* tim00.gb - [ROM](./test-roms/mooneye-test-suite/roms/tim00.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/tim00.bin) -* tim00_div_trigger.gb - [ROM](./test-roms/mooneye-test-suite/roms/tim00_div_trigger.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/tim00_div_trigger.bin) -* tim01.gb - [ROM](./test-roms/mooneye-test-suite/roms/tim01.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/tim01.bin) -* tim01_div_trigger.gb - [ROM](./test-roms/mooneye-test-suite/roms/tim01_div_trigger.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/tim01_div_trigger.bin) -* tim10.gb - [ROM](./test-roms/mooneye-test-suite/roms/tim10.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/tim10.bin) -* tim10_div_trigger.gb - [ROM](./test-roms/mooneye-test-suite/roms/tim10_div_trigger.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/tim10_div_trigger.bin) -* tim11.gb - [ROM](./test-roms/mooneye-test-suite/roms/tim11.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/tim11.bin) -* tim11_div_trigger.gb - [ROM](./test-roms/mooneye-test-suite/roms/tim11_div_trigger.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/tim11_div_trigger.bin) -* tima_reload.gb - [ROM](./test-roms/mooneye-test-suite/roms/tima_reload.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/tima_reload.bin) -* tima_write_reloading.gb - [ROM](./test-roms/mooneye-test-suite/roms/tima_write_reloading.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/tima_write_reloading.bin) -* tma_write_reloading.gb - [ROM](./test-roms/mooneye-test-suite/roms/tma_write_reloading.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/tma_write_reloading.bin) -* unused_hwio-GS.gb - [ROM](./test-roms/mooneye-test-suite/roms/unused_hwio-GS.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/unused_hwio-GS.bin) -* vblank_stat_intr-GS.gb - [ROM](./test-roms/mooneye-test-suite/roms/vblank_stat_intr-GS.gb) - [Expected Serial Output](./meowgb-tests/expected_output/MBC1/vblank_stat_intr-GS.bin) +* add_sp_e_timing.gb - [ROM](./test-roms/mooneye-test-suite/roms/add_sp_e_timing.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/add_sp_e_timing.bin) +* boot_hwio-dmgABCmgb.gb - [ROM](./test-roms/mooneye-test-suite/roms/boot_hwio-dmgABCmgb.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/boot_hwio-dmgABCmgb.bin) +* boot_regs-dmgABC.gb - [ROM](./test-roms/mooneye-test-suite/roms/boot_regs-dmgABC.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/boot_regs-dmgABC.bin) +* call_cc_timing.gb - [ROM](./test-roms/mooneye-test-suite/roms/call_cc_timing.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/call_cc_timing.bin) +* call_cc_timing2.gb - [ROM](./test-roms/mooneye-test-suite/roms/call_cc_timing2.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/call_cc_timing2.bin) +* call_timing.gb - [ROM](./test-roms/mooneye-test-suite/roms/call_timing.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/call_timing.bin) +* call_timing2.gb - [ROM](./test-roms/mooneye-test-suite/roms/call_timing2.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/call_timing2.bin) +* di_timing-GS.gb - [ROM](./test-roms/mooneye-test-suite/roms/di_timing-GS.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/di_timing-GS.bin) +* div_timing.gb - [ROM](./test-roms/mooneye-test-suite/roms/div_timing.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/div_timing.bin) +* ei_sequence.gb - [ROM](./test-roms/mooneye-test-suite/roms/ei_sequence.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/ei_sequence.bin) +* ei_timing.gb - [ROM](./test-roms/mooneye-test-suite/roms/ei_timing.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/ei_timing.bin) +* halt_ime0_ei.gb - [ROM](./test-roms/mooneye-test-suite/roms/halt_ime0_ei.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/halt_ime0_ei.bin) +* halt_ime0_nointr_timing.gb - [ROM](./test-roms/mooneye-test-suite/roms/halt_ime0_nointr_timing.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/halt_ime0_nointr_timing.bin) +* halt_ime1_timing.gb - [ROM](./test-roms/mooneye-test-suite/roms/halt_ime1_timing.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/halt_ime1_timing.bin) +* halt_ime1_timing2-GS.gb - [ROM](./test-roms/mooneye-test-suite/roms/halt_ime1_timing2-GS.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/halt_ime1_timing2-GS.bin) +* if_ie_registers.gb - [ROM](./test-roms/mooneye-test-suite/roms/if_ie_registers.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/if_ie_registers.bin) +* intr_timing.gb - [ROM](./test-roms/mooneye-test-suite/roms/intr_timing.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/intr_timing.bin) +* jp_cc_timing.gb - [ROM](./test-roms/mooneye-test-suite/roms/jp_cc_timing.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/jp_cc_timing.bin) +* jp_timing.gb - [ROM](./test-roms/mooneye-test-suite/roms/jp_timing.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/jp_timing.bin) +* ld_hl_sp_e_timing.gb - [ROM](./test-roms/mooneye-test-suite/roms/ld_hl_sp_e_timing.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/ld_hl_sp_e_timing.bin) +* oam_dma_restart.gb - [ROM](./test-roms/mooneye-test-suite/roms/oam_dma_restart.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/oam_dma_restart.bin) +* oam_dma_start.gb - [ROM](./test-roms/mooneye-test-suite/roms/oam_dma_start.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/oam_dma_start.bin) +* oam_dma_timing.gb - [ROM](./test-roms/mooneye-test-suite/roms/oam_dma_timing.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/oam_dma_timing.bin) +* pop_timing.gb - [ROM](./test-roms/mooneye-test-suite/roms/pop_timing.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/pop_timing.bin) +* push_timing.gb - [ROM](./test-roms/mooneye-test-suite/roms/push_timing.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/push_timing.bin) +* rapid_di_ei.gb - [ROM](./test-roms/mooneye-test-suite/roms/rapid_di_ei.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/rapid_di_ei.bin) +* ret_cc_timing.gb - [ROM](./test-roms/mooneye-test-suite/roms/ret_cc_timing.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/ret_cc_timing.bin) +* ret_timing.gb - [ROM](./test-roms/mooneye-test-suite/roms/ret_timing.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/ret_timing.bin) +* reti_intr_timing.gb - [ROM](./test-roms/mooneye-test-suite/roms/reti_intr_timing.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/reti_intr_timing.bin) +* reti_timing.gb - [ROM](./test-roms/mooneye-test-suite/roms/reti_timing.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/reti_timing.bin) +* rst_timing.gb - [ROM](./test-roms/mooneye-test-suite/roms/rst_timing.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/rst_timing.bin) ### MBC1 -* bits_bank1.gb - [ROM](./test-roms/mooneye-test-suite/roms/MBC1/bits_bank1.gb) - [Expected Serial Output](./meowgb-tests/expected_output/bits_bank1.bin) -* bits_bank2.gb - [ROM](./test-roms/mooneye-test-suite/roms/MBC1/bits_bank2.gb) - [Expected Serial Output](./meowgb-tests/expected_output/bits_bank2.bin) -* bits_mode.gb - [ROM](./test-roms/mooneye-test-suite/roms/MBC1/bits_mode.gb) - [Expected Serial Output](./meowgb-tests/expected_output/bits_mode.bin) -* bits_ramg.gb - [ROM](./test-roms/mooneye-test-suite/roms/MBC1/bits_ramg.gb) - [Expected Serial Output](./meowgb-tests/expected_output/bits_ramg.bin) -* multicart_rom_8Mb.gb - [ROM](./test-roms/mooneye-test-suite/roms/MBC1/multicart_rom_8Mb.gb) - [Expected Serial Output](./meowgb-tests/expected_output/multicart_rom_8Mb.bin) -* ram_256kb.gb - [ROM](./test-roms/mooneye-test-suite/roms/MBC1/ram_256kb.gb) - [Expected Serial Output](./meowgb-tests/expected_output/ram_256kb.bin) -* ram_64kb.gb - [ROM](./test-roms/mooneye-test-suite/roms/MBC1/ram_64kb.gb) - [Expected Serial Output](./meowgb-tests/expected_output/ram_64kb.bin) -* rom_16Mb.gb - [ROM](./test-roms/mooneye-test-suite/roms/MBC1/rom_16Mb.gb) - [Expected Serial Output](./meowgb-tests/expected_output/rom_16Mb.bin) -* rom_1Mb.gb - [ROM](./test-roms/mooneye-test-suite/roms/MBC1/rom_1Mb.gb) - [Expected Serial Output](./meowgb-tests/expected_output/rom_1Mb.bin) -* rom_2Mb.gb - [ROM](./test-roms/mooneye-test-suite/roms/MBC1/rom_2Mb.gb) - [Expected Serial Output](./meowgb-tests/expected_output/rom_2Mb.bin) -* rom_4Mb.gb - [ROM](./test-roms/mooneye-test-suite/roms/MBC1/rom_4Mb.gb) - [Expected Serial Output](./meowgb-tests/expected_output/rom_4Mb.bin) -* rom_512kb.gb - [ROM](./test-roms/mooneye-test-suite/roms/MBC1/rom_512kb.gb) - [Expected Serial Output](./meowgb-tests/expected_output/rom_512kb.bin) -* rom_8Mb.gb - [ROM](./test-roms/mooneye-test-suite/roms/MBC1/rom_8Mb.gb) - [Expected Serial Output](./meowgb-tests/expected_output/rom_8Mb.bin) +* MBC1/bits_bank1.gb - [ROM](./test-roms/mooneye-test-suite/roms/MBC1/bits_bank1.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/MBC1/bits_bank1.bin) +* MBC1/bits_bank2.gb - [ROM](./test-roms/mooneye-test-suite/roms/MBC1/bits_bank2.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/MBC1/bits_bank2.bin) +* MBC1/bits_mode.gb - [ROM](./test-roms/mooneye-test-suite/roms/MBC1/bits_mode.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/MBC1/bits_mode.bin) +* MBC1/bits_ramg.gb - [ROM](./test-roms/mooneye-test-suite/roms/MBC1/bits_ramg.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/MBC1/bits_ramg.bin) +* MBC1/multicart_rom_8Mb.gb - [ROM](./test-roms/mooneye-test-suite/roms/MBC1/multicart_rom_8Mb.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/MBC1/multicart_rom_8Mb.bin) +* MBC1/ram_256kb.gb - [ROM](./test-roms/mooneye-test-suite/roms/MBC1/ram_256kb.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/MBC1/ram_256kb.bin) +* MBC1/ram_64kb.gb - [ROM](./test-roms/mooneye-test-suite/roms/MBC1/ram_64kb.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/MBC1/ram_64kb.bin) +* MBC1/rom_16Mb.gb - [ROM](./test-roms/mooneye-test-suite/roms/MBC1/rom_16Mb.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/MBC1/rom_16Mb.bin) +* MBC1/rom_1Mb.gb - [ROM](./test-roms/mooneye-test-suite/roms/MBC1/rom_1Mb.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/MBC1/rom_1Mb.bin) +* MBC1/rom_2Mb.gb - [ROM](./test-roms/mooneye-test-suite/roms/MBC1/rom_2Mb.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/MBC1/rom_2Mb.bin) +* MBC1/rom_4Mb.gb - [ROM](./test-roms/mooneye-test-suite/roms/MBC1/rom_4Mb.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/MBC1/rom_4Mb.bin) +* MBC1/rom_512kb.gb - [ROM](./test-roms/mooneye-test-suite/roms/MBC1/rom_512kb.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/MBC1/rom_512kb.bin) +* MBC1/rom_8Mb.gb - [ROM](./test-roms/mooneye-test-suite/roms/MBC1/rom_8Mb.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/MBC1/rom_8Mb.bin) + +### bits + +* bits/mem_oam.gb - [ROM](./test-roms/mooneye-test-suite/roms/bits/mem_oam.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/bits/mem_oam.bin) +* bits/reg_f.gb - [ROM](./test-roms/mooneye-test-suite/roms/bits/reg_f.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/bits/reg_f.bin) +* bits/unused_hwio-GS.gb - [ROM](./test-roms/mooneye-test-suite/roms/bits/unused_hwio-GS.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/bits/unused_hwio-GS.bin) + +### instr + +* instr/daa.gb - [ROM](./test-roms/mooneye-test-suite/roms/instr/daa.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/instr/daa.bin) + +### oam_dma + +* oam_dma/basic.gb - [ROM](./test-roms/mooneye-test-suite/roms/oam_dma/basic.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/oam_dma/basic.bin) +* oam_dma/reg_read.gb - [ROM](./test-roms/mooneye-test-suite/roms/oam_dma/reg_read.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/oam_dma/reg_read.bin) + +### ppu + +* ppu/intr_1_2_timing-GS.gb - [ROM](./test-roms/mooneye-test-suite/roms/ppu/intr_1_2_timing-GS.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/ppu/intr_1_2_timing-GS.bin) +* ppu/intr_2_0_timing.gb - [ROM](./test-roms/mooneye-test-suite/roms/ppu/intr_2_0_timing.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/ppu/intr_2_0_timing.bin) +* ppu/stat_irq_blocking.gb - [ROM](./test-roms/mooneye-test-suite/roms/ppu/stat_irq_blocking.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/ppu/stat_irq_blocking.bin) +* ppu/stat_lyc_onoff.gb - [ROM](./test-roms/mooneye-test-suite/roms/ppu/stat_lyc_onoff.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/ppu/stat_lyc_onoff.bin) +* ppu/vblank_stat_intr-GS.gb - [ROM](./test-roms/mooneye-test-suite/roms/ppu/vblank_stat_intr-GS.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/ppu/vblank_stat_intr-GS.bin) + +### timer + +* timer/div_write.gb - [ROM](./test-roms/mooneye-test-suite/roms/timer/div_write.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/timer/div_write.bin) +* timer/rapid_toggle.gb - [ROM](./test-roms/mooneye-test-suite/roms/timer/rapid_toggle.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/timer/rapid_toggle.bin) +* timer/tim00.gb - [ROM](./test-roms/mooneye-test-suite/roms/timer/tim00.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/timer/tim00.bin) +* timer/tim00_div_trigger.gb - [ROM](./test-roms/mooneye-test-suite/roms/timer/tim00_div_trigger.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/timer/tim00_div_trigger.bin) +* timer/tim01.gb - [ROM](./test-roms/mooneye-test-suite/roms/timer/tim01.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/timer/tim01.bin) +* timer/tim01_div_trigger.gb - [ROM](./test-roms/mooneye-test-suite/roms/timer/tim01_div_trigger.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/timer/tim01_div_trigger.bin) +* timer/tim10.gb - [ROM](./test-roms/mooneye-test-suite/roms/timer/tim10.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/timer/tim10.bin) +* timer/tim10_div_trigger.gb - [ROM](./test-roms/mooneye-test-suite/roms/timer/tim10_div_trigger.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/timer/tim10_div_trigger.bin) +* timer/tim11.gb - [ROM](./test-roms/mooneye-test-suite/roms/timer/tim11.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/timer/tim11.bin) +* timer/tim11_div_trigger.gb - [ROM](./test-roms/mooneye-test-suite/roms/timer/tim11_div_trigger.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/timer/tim11_div_trigger.bin) +* timer/tima_reload.gb - [ROM](./test-roms/mooneye-test-suite/roms/timer/tima_reload.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/timer/tima_reload.bin) +* timer/tima_write_reloading.gb - [ROM](./test-roms/mooneye-test-suite/roms/timer/tima_write_reloading.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/timer/tima_write_reloading.bin) +* timer/tma_write_reloading.gb - [ROM](./test-roms/mooneye-test-suite/roms/timer/tma_write_reloading.gb) - [Expected Serial Output](./meowgb-tests/expected_output/mooneye-test-suite/timer/tma_write_reloading.bin)