├── LICENSE ├── default_rom ├── blarrg │ ├── cpu_instrs │ │ ├── source │ │ │ ├── linkfile │ │ │ ├── common │ │ │ │ ├── console.bin │ │ │ │ ├── multi_custom.s │ │ │ │ ├── cpu_speed.s │ │ │ │ ├── crc.s │ │ │ │ ├── gb.inc │ │ │ │ ├── build_rom.s │ │ │ │ ├── macros.inc │ │ │ │ ├── crc_fast.s │ │ │ │ ├── checksums.s │ │ │ │ ├── printing.s │ │ │ │ ├── instr_test.s │ │ │ │ └── build_gbs.s │ │ │ ├── shell.inc │ │ │ ├── 01-special.s │ │ │ ├── 02-interrupts.s │ │ │ ├── 04-op r,imm.s │ │ │ ├── 05-op rp.s │ │ │ ├── 03-op sp,hl.s │ │ │ └── 08-misc instrs.s │ │ ├── cpu_instrs.gb │ │ └── individual │ │ │ ├── 01-special.gb │ │ │ ├── 05-op rp.gb │ │ │ ├── 06-ld r,r.gb │ │ │ ├── 09-op r,r.gb │ │ │ ├── 10-bit ops.gb │ │ │ ├── 03-op sp,hl.gb │ │ │ ├── 04-op r,imm.gb │ │ │ ├── 11-op a,(hl).gb │ │ │ ├── 02-interrupts.gb │ │ │ ├── 08-misc instrs.gb │ │ │ └── 07-jr,jp,call,ret,rst.gb │ ├── instr_timing │ │ ├── source │ │ │ ├── linkfile │ │ │ ├── common │ │ │ │ ├── console.bin │ │ │ │ ├── crc.s │ │ │ │ ├── gb.inc │ │ │ │ ├── build_rom.s │ │ │ │ ├── macros.inc │ │ │ │ ├── timer.s │ │ │ │ ├── printing.s │ │ │ │ └── build_gbs.s │ │ │ └── shell.inc │ │ └── instr_timing.gb │ ├── mem_timing-2 │ │ ├── source │ │ │ ├── linkfile │ │ │ ├── common │ │ │ │ ├── console.bin │ │ │ │ ├── tima_64.s │ │ │ │ ├── crc.s │ │ │ │ ├── printing.s │ │ │ │ ├── build_rom.s │ │ │ │ ├── macros.inc │ │ │ │ └── gb.inc │ │ │ ├── shell.inc │ │ │ ├── 02-write_timing.s │ │ │ └── readme.txt │ │ ├── mem_timing.gb │ │ └── rom_singles │ │ │ ├── 01-read_timing.gb │ │ │ ├── 02-write_timing.gb │ │ │ └── 03-modify_timing.gb │ ├── mem_timing │ │ ├── source │ │ │ ├── linkfile │ │ │ ├── common │ │ │ │ ├── console.bin │ │ │ │ ├── tima_64.s │ │ │ │ ├── crc.s │ │ │ │ ├── gb.inc │ │ │ │ ├── build_rom.s │ │ │ │ ├── macros.inc │ │ │ │ ├── printing.s │ │ │ │ └── build_gbs.s │ │ │ ├── shell.inc │ │ │ └── 02-write_timing.s │ │ ├── mem_timing.gb │ │ └── individual │ │ │ ├── 01-read_timing.gb │ │ │ ├── 02-write_timing.gb │ │ │ └── 03-modify_timing.gb │ └── interrupt_time │ │ ├── interrupt_time.gb │ │ └── interrupt_time.s ├── default │ ├── default_rom.gb │ ├── default_rom.2bpp │ ├── default_rom.obj │ ├── default_rom.sym │ ├── Makefile │ ├── hardware.inc │ ├── default_rom.map │ └── default_rom.asm └── mooneye_test_suite │ ├── misc │ ├── boot_div-A.gb │ ├── boot_hwio-C.gb │ ├── boot_regs-A.gb │ ├── boot_div-cgb0.gb │ ├── boot_regs-cgb.gb │ ├── boot_div-cgbABCDE.gb │ ├── bits │ │ └── unused_hwio-C.gb │ ├── ppu │ │ └── vblank_stat_intr-C.gb │ └── boot_hwio-C.sym │ ├── acceptance │ ├── ei_timing.gb │ ├── instr │ │ ├── daa.gb │ │ └── daa.sym │ ├── jp_timing.gb │ ├── bits │ │ ├── reg_f.gb │ │ ├── mem_oam.gb │ │ ├── unused_hwio-GS.gb │ │ └── mem_oam.sym │ ├── boot_div-S.gb │ ├── boot_div2-S.gb │ ├── boot_hwio-S.gb │ ├── call_timing.gb │ ├── div_timing.gb │ ├── ei_sequence.gb │ ├── intr_timing.gb │ ├── pop_timing.gb │ ├── push_timing.gb │ ├── rapid_di_ei.gb │ ├── ret_timing.gb │ ├── reti_timing.gb │ ├── rst_timing.gb │ ├── timer │ │ ├── tim00.gb │ │ ├── tim01.gb │ │ ├── tim10.gb │ │ ├── tim11.gb │ │ ├── div_write.gb │ │ ├── rapid_toggle.gb │ │ ├── tima_reload.gb │ │ ├── tim00_div_trigger.gb │ │ ├── tim01_div_trigger.gb │ │ ├── tim10_div_trigger.gb │ │ ├── tim11_div_trigger.gb │ │ ├── tima_write_reloading.gb │ │ ├── tma_write_reloading.gb │ │ └── div_write.sym │ ├── boot_div-dmg0.gb │ ├── boot_hwio-dmg0.gb │ ├── boot_regs-dmg0.gb │ ├── boot_regs-mgb.gb │ ├── boot_regs-sgb.gb │ ├── boot_regs-sgb2.gb │ ├── call_cc_timing.gb │ ├── call_timing2.gb │ ├── di_timing-GS.gb │ ├── halt_ime0_ei.gb │ ├── jp_cc_timing.gb │ ├── oam_dma │ │ ├── basic.gb │ │ ├── reg_read.gb │ │ ├── sources-GS.gb │ │ └── basic.sym │ ├── oam_dma_start.gb │ ├── oam_dma_timing.gb │ ├── ret_cc_timing.gb │ ├── add_sp_e_timing.gb │ ├── boot_regs-dmgABC.gb │ ├── call_cc_timing2.gb │ ├── halt_ime1_timing.gb │ ├── if_ie_registers.gb │ ├── oam_dma_restart.gb │ ├── reti_intr_timing.gb │ ├── boot_div-dmgABCmgb.gb │ ├── boot_hwio-dmgABCmgb.gb │ ├── interrupts │ │ └── ie_push.gb │ ├── ld_hl_sp_e_timing.gb │ ├── ppu │ │ ├── intr_2_0_timing.gb │ │ ├── lcdon_timing-GS.gb │ │ ├── stat_lyc_onoff.gb │ │ ├── stat_irq_blocking.gb │ │ ├── intr_1_2_timing-GS.gb │ │ ├── intr_2_mode0_timing.gb │ │ ├── intr_2_mode3_timing.gb │ │ ├── intr_2_oam_ok_timing.gb │ │ ├── vblank_stat_intr-GS.gb │ │ ├── lcdon_write_timing-GS.gb │ │ ├── hblank_ly_scx_timing-GS.gb │ │ ├── intr_2_mode0_timing_sprites.gb │ │ └── stat_lyc_onoff.sym │ ├── halt_ime1_timing2-GS.gb │ ├── halt_ime0_nointr_timing.gb │ ├── serial │ │ └── boot_sclk_align-dmgABCmgb.gb │ ├── halt_ime0_ei.sym │ ├── boot_hwio-S.sym │ ├── boot_hwio-dmg0.sym │ ├── boot_hwio-dmgABCmgb.sym │ ├── ret_timing.sym │ ├── reti_timing.sym │ ├── ret_cc_timing.sym │ ├── call_timing.sym │ ├── jp_timing.sym │ ├── jp_cc_timing.sym │ ├── call_cc_timing.sym │ └── di_timing-GS.sym │ ├── utils │ ├── bootrom_dumper.gb │ ├── dump_boot_hwio.gb │ ├── bootrom_dumper.sym │ └── dump_boot_hwio.sym │ ├── emulator-only │ ├── mbc2 │ │ ├── ram.gb │ │ ├── rom_1Mb.gb │ │ ├── rom_2Mb.gb │ │ ├── bits_ramg.gb │ │ ├── bits_romb.gb │ │ ├── bits_unused.gb │ │ ├── rom_512kb.gb │ │ ├── bits_unused.sym │ │ ├── bits_romb.sym │ │ ├── rom_1Mb.sym │ │ └── rom_2Mb.sym │ ├── mbc1 │ │ ├── ram_64kb.gb │ │ ├── rom_16Mb.gb │ │ ├── rom_1Mb.gb │ │ ├── rom_2Mb.gb │ │ ├── rom_4Mb.gb │ │ ├── rom_8Mb.gb │ │ ├── bits_bank1.gb │ │ ├── bits_bank2.gb │ │ ├── bits_mode.gb │ │ ├── bits_ramg.gb │ │ ├── ram_256kb.gb │ │ ├── rom_512kb.gb │ │ ├── bits_bank2.gb.ram │ │ ├── multicart_rom_8Mb.gb │ │ ├── bits_bank1.sym │ │ ├── bits_bank2.sym │ │ ├── bits_mode.sym │ │ └── ram_64kb.sym │ └── mbc5 │ │ ├── rom_16Mb.gb │ │ ├── rom_1Mb.gb │ │ ├── rom_2Mb.gb │ │ ├── rom_32Mb.gb │ │ ├── rom_4Mb.gb │ │ ├── rom_64Mb.gb │ │ ├── rom_8Mb.gb │ │ └── rom_512kb.gb │ ├── manual-only │ ├── sprite_priority.gb │ └── sprite_priority.sym │ ├── madness │ ├── mgb_oam_dma_halt_sprites.gb │ └── mgb_oam_dma_halt_sprites.sym │ └── LICENSE ├── docs ├── bgb.gif ├── blue.gif ├── loz.gif ├── crystal.gif ├── tetris.gif ├── cgb-acid2.png ├── cpu_instrs.png ├── dmg-acid2.png ├── dr_mario.png ├── gobc_logo.png ├── rtc_basic.png ├── rtc_range.png ├── instr_timing.png └── rtc_sub_second.png ├── internal ├── motherboard │ ├── bootrom_cgb.bin │ └── bootrom_dmg.bin ├── cartridge │ ├── rom_only.go │ └── mbc5.go └── windows │ ├── root.go │ └── windows.go ├── go.mod ├── TESTS.md ├── .github └── workflows │ └── go.yml └── cmd └── cartdump └── main.go /LICENSE: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /default_rom/blarrg/cpu_instrs/source/linkfile: -------------------------------------------------------------------------------- 1 | [objects] 2 | test.o 3 | -------------------------------------------------------------------------------- /default_rom/blarrg/instr_timing/source/linkfile: -------------------------------------------------------------------------------- 1 | [objects] 2 | test.o 3 | -------------------------------------------------------------------------------- /default_rom/blarrg/mem_timing-2/source/linkfile: -------------------------------------------------------------------------------- 1 | [objects] 2 | test.o 3 | -------------------------------------------------------------------------------- /default_rom/blarrg/mem_timing/source/linkfile: -------------------------------------------------------------------------------- 1 | [objects] 2 | test.o 3 | -------------------------------------------------------------------------------- /docs/bgb.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/docs/bgb.gif -------------------------------------------------------------------------------- /docs/blue.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/docs/blue.gif -------------------------------------------------------------------------------- /docs/loz.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/docs/loz.gif -------------------------------------------------------------------------------- /docs/crystal.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/docs/crystal.gif -------------------------------------------------------------------------------- /docs/tetris.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/docs/tetris.gif -------------------------------------------------------------------------------- /docs/cgb-acid2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/docs/cgb-acid2.png -------------------------------------------------------------------------------- /docs/cpu_instrs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/docs/cpu_instrs.png -------------------------------------------------------------------------------- /docs/dmg-acid2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/docs/dmg-acid2.png -------------------------------------------------------------------------------- /docs/dr_mario.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/docs/dr_mario.png -------------------------------------------------------------------------------- /docs/gobc_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/docs/gobc_logo.png -------------------------------------------------------------------------------- /docs/rtc_basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/docs/rtc_basic.png -------------------------------------------------------------------------------- /docs/rtc_range.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/docs/rtc_range.png -------------------------------------------------------------------------------- /docs/instr_timing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/docs/instr_timing.png -------------------------------------------------------------------------------- /docs/rtc_sub_second.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/docs/rtc_sub_second.png -------------------------------------------------------------------------------- /default_rom/default/default_rom.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/default/default_rom.gb -------------------------------------------------------------------------------- /default_rom/default/default_rom.2bpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/default/default_rom.2bpp -------------------------------------------------------------------------------- /default_rom/default/default_rom.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/default/default_rom.obj -------------------------------------------------------------------------------- /internal/motherboard/bootrom_cgb.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/internal/motherboard/bootrom_cgb.bin -------------------------------------------------------------------------------- /internal/motherboard/bootrom_dmg.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/internal/motherboard/bootrom_dmg.bin -------------------------------------------------------------------------------- /default_rom/blarrg/cpu_instrs/cpu_instrs.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/blarrg/cpu_instrs/cpu_instrs.gb -------------------------------------------------------------------------------- /default_rom/blarrg/mem_timing/mem_timing.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/blarrg/mem_timing/mem_timing.gb -------------------------------------------------------------------------------- /default_rom/blarrg/mem_timing-2/mem_timing.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/blarrg/mem_timing-2/mem_timing.gb -------------------------------------------------------------------------------- /default_rom/blarrg/instr_timing/instr_timing.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/blarrg/instr_timing/instr_timing.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/misc/boot_div-A.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/misc/boot_div-A.gb -------------------------------------------------------------------------------- /default_rom/blarrg/interrupt_time/interrupt_time.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/blarrg/interrupt_time/interrupt_time.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/misc/boot_hwio-C.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/misc/boot_hwio-C.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/misc/boot_regs-A.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/misc/boot_regs-A.gb -------------------------------------------------------------------------------- /default_rom/blarrg/cpu_instrs/individual/01-special.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/blarrg/cpu_instrs/individual/01-special.gb -------------------------------------------------------------------------------- /default_rom/blarrg/cpu_instrs/individual/05-op rp.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/blarrg/cpu_instrs/individual/05-op rp.gb -------------------------------------------------------------------------------- /default_rom/blarrg/cpu_instrs/individual/06-ld r,r.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/blarrg/cpu_instrs/individual/06-ld r,r.gb -------------------------------------------------------------------------------- /default_rom/blarrg/cpu_instrs/individual/09-op r,r.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/blarrg/cpu_instrs/individual/09-op r,r.gb -------------------------------------------------------------------------------- /default_rom/blarrg/cpu_instrs/individual/10-bit ops.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/blarrg/cpu_instrs/individual/10-bit ops.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/ei_timing.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/ei_timing.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/instr/daa.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/instr/daa.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/jp_timing.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/jp_timing.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/misc/boot_div-cgb0.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/misc/boot_div-cgb0.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/misc/boot_regs-cgb.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/misc/boot_regs-cgb.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/utils/bootrom_dumper.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/utils/bootrom_dumper.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/utils/dump_boot_hwio.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/utils/dump_boot_hwio.gb -------------------------------------------------------------------------------- /default_rom/blarrg/cpu_instrs/individual/03-op sp,hl.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/blarrg/cpu_instrs/individual/03-op sp,hl.gb -------------------------------------------------------------------------------- /default_rom/blarrg/cpu_instrs/individual/04-op r,imm.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/blarrg/cpu_instrs/individual/04-op r,imm.gb -------------------------------------------------------------------------------- /default_rom/blarrg/cpu_instrs/individual/11-op a,(hl).gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/blarrg/cpu_instrs/individual/11-op a,(hl).gb -------------------------------------------------------------------------------- /default_rom/blarrg/cpu_instrs/source/common/console.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/blarrg/cpu_instrs/source/common/console.bin -------------------------------------------------------------------------------- /default_rom/blarrg/mem_timing/source/common/console.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/blarrg/mem_timing/source/common/console.bin -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/bits/reg_f.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/bits/reg_f.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/boot_div-S.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/boot_div-S.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/boot_div2-S.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/boot_div2-S.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/boot_hwio-S.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/boot_hwio-S.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/call_timing.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/call_timing.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/div_timing.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/div_timing.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/ei_sequence.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/ei_sequence.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/intr_timing.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/intr_timing.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/pop_timing.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/pop_timing.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/push_timing.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/push_timing.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/rapid_di_ei.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/rapid_di_ei.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/ret_timing.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/ret_timing.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/reti_timing.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/reti_timing.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/rst_timing.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/rst_timing.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/timer/tim00.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/timer/tim00.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/timer/tim01.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/timer/tim01.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/timer/tim10.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/timer/tim10.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/timer/tim11.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/timer/tim11.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/emulator-only/mbc2/ram.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/emulator-only/mbc2/ram.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/misc/boot_div-cgbABCDE.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/misc/boot_div-cgbABCDE.gb -------------------------------------------------------------------------------- /default_rom/blarrg/cpu_instrs/individual/02-interrupts.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/blarrg/cpu_instrs/individual/02-interrupts.gb -------------------------------------------------------------------------------- /default_rom/blarrg/cpu_instrs/individual/08-misc instrs.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/blarrg/cpu_instrs/individual/08-misc instrs.gb -------------------------------------------------------------------------------- /default_rom/blarrg/instr_timing/source/common/console.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/blarrg/instr_timing/source/common/console.bin -------------------------------------------------------------------------------- /default_rom/blarrg/mem_timing-2/source/common/console.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/blarrg/mem_timing-2/source/common/console.bin -------------------------------------------------------------------------------- /default_rom/blarrg/mem_timing/individual/01-read_timing.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/blarrg/mem_timing/individual/01-read_timing.gb -------------------------------------------------------------------------------- /default_rom/blarrg/mem_timing/individual/02-write_timing.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/blarrg/mem_timing/individual/02-write_timing.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/bits/mem_oam.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/bits/mem_oam.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/boot_div-dmg0.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/boot_div-dmg0.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/boot_hwio-dmg0.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/boot_hwio-dmg0.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/boot_regs-dmg0.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/boot_regs-dmg0.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/boot_regs-mgb.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/boot_regs-mgb.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/boot_regs-sgb.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/boot_regs-sgb.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/boot_regs-sgb2.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/boot_regs-sgb2.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/call_cc_timing.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/call_cc_timing.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/call_timing2.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/call_timing2.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/di_timing-GS.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/di_timing-GS.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/halt_ime0_ei.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/halt_ime0_ei.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/jp_cc_timing.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/jp_cc_timing.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/oam_dma/basic.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/oam_dma/basic.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/oam_dma_start.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/oam_dma_start.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/oam_dma_timing.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/oam_dma_timing.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/ret_cc_timing.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/ret_cc_timing.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/misc/bits/unused_hwio-C.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/misc/bits/unused_hwio-C.gb -------------------------------------------------------------------------------- /default_rom/blarrg/mem_timing-2/rom_singles/01-read_timing.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/blarrg/mem_timing-2/rom_singles/01-read_timing.gb -------------------------------------------------------------------------------- /default_rom/blarrg/mem_timing/individual/03-modify_timing.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/blarrg/mem_timing/individual/03-modify_timing.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/add_sp_e_timing.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/add_sp_e_timing.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/boot_regs-dmgABC.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/boot_regs-dmgABC.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/call_cc_timing2.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/call_cc_timing2.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/halt_ime1_timing.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/halt_ime1_timing.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/if_ie_registers.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/if_ie_registers.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/oam_dma/reg_read.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/oam_dma/reg_read.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/oam_dma_restart.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/oam_dma_restart.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/reti_intr_timing.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/reti_intr_timing.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/timer/div_write.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/timer/div_write.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/emulator-only/mbc1/ram_64kb.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/emulator-only/mbc1/ram_64kb.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/emulator-only/mbc1/rom_16Mb.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/emulator-only/mbc1/rom_16Mb.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/emulator-only/mbc1/rom_1Mb.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/emulator-only/mbc1/rom_1Mb.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/emulator-only/mbc1/rom_2Mb.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/emulator-only/mbc1/rom_2Mb.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/emulator-only/mbc1/rom_4Mb.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/emulator-only/mbc1/rom_4Mb.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/emulator-only/mbc1/rom_8Mb.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/emulator-only/mbc1/rom_8Mb.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/emulator-only/mbc2/rom_1Mb.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/emulator-only/mbc2/rom_1Mb.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/emulator-only/mbc2/rom_2Mb.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/emulator-only/mbc2/rom_2Mb.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/emulator-only/mbc5/rom_16Mb.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/emulator-only/mbc5/rom_16Mb.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/emulator-only/mbc5/rom_1Mb.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/emulator-only/mbc5/rom_1Mb.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/emulator-only/mbc5/rom_2Mb.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/emulator-only/mbc5/rom_2Mb.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/emulator-only/mbc5/rom_32Mb.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/emulator-only/mbc5/rom_32Mb.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/emulator-only/mbc5/rom_4Mb.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/emulator-only/mbc5/rom_4Mb.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/emulator-only/mbc5/rom_64Mb.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/emulator-only/mbc5/rom_64Mb.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/emulator-only/mbc5/rom_8Mb.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/emulator-only/mbc5/rom_8Mb.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/manual-only/sprite_priority.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/manual-only/sprite_priority.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/misc/ppu/vblank_stat_intr-C.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/misc/ppu/vblank_stat_intr-C.gb -------------------------------------------------------------------------------- /default_rom/blarrg/mem_timing-2/rom_singles/02-write_timing.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/blarrg/mem_timing-2/rom_singles/02-write_timing.gb -------------------------------------------------------------------------------- /default_rom/blarrg/mem_timing-2/rom_singles/03-modify_timing.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/blarrg/mem_timing-2/rom_singles/03-modify_timing.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/bits/unused_hwio-GS.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/bits/unused_hwio-GS.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/boot_div-dmgABCmgb.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/boot_div-dmgABCmgb.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/boot_hwio-dmgABCmgb.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/boot_hwio-dmgABCmgb.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/interrupts/ie_push.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/interrupts/ie_push.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/ld_hl_sp_e_timing.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/ld_hl_sp_e_timing.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/oam_dma/sources-GS.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/oam_dma/sources-GS.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/ppu/intr_2_0_timing.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/ppu/intr_2_0_timing.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/ppu/lcdon_timing-GS.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/ppu/lcdon_timing-GS.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/ppu/stat_lyc_onoff.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/ppu/stat_lyc_onoff.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/timer/rapid_toggle.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/timer/rapid_toggle.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/timer/tima_reload.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/timer/tima_reload.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/emulator-only/mbc1/bits_bank1.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/emulator-only/mbc1/bits_bank1.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/emulator-only/mbc1/bits_bank2.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/emulator-only/mbc1/bits_bank2.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/emulator-only/mbc1/bits_mode.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/emulator-only/mbc1/bits_mode.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/emulator-only/mbc1/bits_ramg.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/emulator-only/mbc1/bits_ramg.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/emulator-only/mbc1/ram_256kb.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/emulator-only/mbc1/ram_256kb.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/emulator-only/mbc1/rom_512kb.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/emulator-only/mbc1/rom_512kb.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/emulator-only/mbc2/bits_ramg.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/emulator-only/mbc2/bits_ramg.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/emulator-only/mbc2/bits_romb.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/emulator-only/mbc2/bits_romb.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/emulator-only/mbc2/bits_unused.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/emulator-only/mbc2/bits_unused.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/emulator-only/mbc2/rom_512kb.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/emulator-only/mbc2/rom_512kb.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/emulator-only/mbc5/rom_512kb.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/emulator-only/mbc5/rom_512kb.gb -------------------------------------------------------------------------------- /default_rom/blarrg/cpu_instrs/individual/07-jr,jp,call,ret,rst.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/blarrg/cpu_instrs/individual/07-jr,jp,call,ret,rst.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/halt_ime1_timing2-GS.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/halt_ime1_timing2-GS.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/ppu/stat_irq_blocking.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/ppu/stat_irq_blocking.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/madness/mgb_oam_dma_halt_sprites.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/madness/mgb_oam_dma_halt_sprites.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/halt_ime0_nointr_timing.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/halt_ime0_nointr_timing.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/ppu/intr_1_2_timing-GS.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/ppu/intr_1_2_timing-GS.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/ppu/intr_2_mode0_timing.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/ppu/intr_2_mode0_timing.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/ppu/intr_2_mode3_timing.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/ppu/intr_2_mode3_timing.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/ppu/intr_2_oam_ok_timing.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/ppu/intr_2_oam_ok_timing.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/ppu/vblank_stat_intr-GS.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/ppu/vblank_stat_intr-GS.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/timer/tim00_div_trigger.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/timer/tim00_div_trigger.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/timer/tim01_div_trigger.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/timer/tim01_div_trigger.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/timer/tim10_div_trigger.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/timer/tim10_div_trigger.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/timer/tim11_div_trigger.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/timer/tim11_div_trigger.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/emulator-only/mbc1/bits_bank2.gb.ram: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/emulator-only/mbc1/bits_bank2.gb.ram -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/ppu/lcdon_write_timing-GS.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/ppu/lcdon_write_timing-GS.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/timer/tima_write_reloading.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/timer/tima_write_reloading.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/timer/tma_write_reloading.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/timer/tma_write_reloading.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/emulator-only/mbc1/multicart_rom_8Mb.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/emulator-only/mbc1/multicart_rom_8Mb.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/ppu/hblank_ly_scx_timing-GS.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/ppu/hblank_ly_scx_timing-GS.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/ppu/intr_2_mode0_timing_sprites.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/ppu/intr_2_mode0_timing_sprites.gb -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/serial/boot_sclk_align-dmgABCmgb.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duysqubix/gobc/HEAD/default_rom/mooneye_test_suite/acceptance/serial/boot_sclk_align-dmgABCmgb.gb -------------------------------------------------------------------------------- /default_rom/default/default_rom.sym: -------------------------------------------------------------------------------- 1 | ; File generated by rgblink 2 | 00:0000 Tilemap 3 | 00:0100 EntryPoint 4 | 00:0150 Main 5 | 00:0155 Main.waitVBlank 6 | 00:015c Main.setup 7 | 00:0174 Main.readTileset 8 | 00:0187 Main.readTilemap 9 | 00:01a0 Main.clearOAM 10 | 00:01ab Main.loop 11 | 00:01ba Main.sync 12 | 00:01c1 Main.move 13 | 00:01cc Tileset 14 | -------------------------------------------------------------------------------- /default_rom/blarrg/cpu_instrs/source/shell.inc: -------------------------------------------------------------------------------- 1 | .incdir "common" 2 | 3 | ; GBS music file 4 | .ifdef BUILD_GBS 5 | .include "build_gbs.s" 6 | .endif 7 | 8 | ; Devcart 9 | .ifdef BUILD_DEVCART 10 | .include "build_devcart.s" 11 | .endif 12 | 13 | ; Sub-test in a multi-test ROM 14 | .ifdef BUILD_MULTI 15 | .include "build_multi.s" 16 | .endif 17 | 18 | ; GB ROM (default) 19 | .ifndef RUNTIME_INCLUDED 20 | .include "build_rom.s" 21 | .endif 22 | -------------------------------------------------------------------------------- /default_rom/blarrg/mem_timing/source/shell.inc: -------------------------------------------------------------------------------- 1 | .incdir "common" 2 | 3 | ; GBS music file 4 | .ifdef BUILD_GBS 5 | .include "build_gbs.s" 6 | .endif 7 | 8 | ; Devcart 9 | .ifdef BUILD_DEVCART 10 | .include "build_devcart.s" 11 | .endif 12 | 13 | ; Sub-test in a multi-test ROM 14 | .ifdef BUILD_MULTI 15 | .include "build_multi.s" 16 | .endif 17 | 18 | ; GB ROM (default) 19 | .ifndef RUNTIME_INCLUDED 20 | .include "build_rom.s" 21 | .endif 22 | -------------------------------------------------------------------------------- /default_rom/blarrg/instr_timing/source/shell.inc: -------------------------------------------------------------------------------- 1 | .incdir "common" 2 | 3 | ; GBS music file 4 | .ifdef BUILD_GBS 5 | .include "build_gbs.s" 6 | .endif 7 | 8 | ; Devcart 9 | .ifdef BUILD_DEVCART 10 | .include "build_devcart.s" 11 | .endif 12 | 13 | ; Sub-test in a multi-test ROM 14 | .ifdef BUILD_MULTI 15 | .include "build_multi.s" 16 | .endif 17 | 18 | ; GB ROM (default) 19 | .ifndef RUNTIME_INCLUDED 20 | .include "build_rom.s" 21 | .endif 22 | -------------------------------------------------------------------------------- /default_rom/default/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .PHONY: build 3 | 4 | all: build 5 | 6 | ROOT_DIR := $(shell git rev-parse --show-toplevel) 7 | 8 | build: 9 | rgbasm -o default_rom.obj default_rom.asm 10 | rgblink -m default_rom.map -n default_rom.sym -o ${ROOT_DIR}/default_rom//default/default_rom.gb default_rom.obj 11 | rgbfix -p0 -f hg ${ROOT_DIR}/default_rom/default/default_rom.gb 12 | 13 | clean: 14 | rm default_rom.map default_rom.sym default_rom.obj 15 | -------------------------------------------------------------------------------- /default_rom/blarrg/mem_timing-2/source/shell.inc: -------------------------------------------------------------------------------- 1 | ; Included at beginning of all programs 2 | ; that use standard shell 3 | 4 | ; Get include files from common/ 5 | .incdir "common" 6 | 7 | ; Sub-test in a multi-test ROM 8 | .ifdef BUILD_MULTI 9 | .include "build_multi.s" 10 | .else 11 | 12 | ; GBS music file 13 | .ifdef BUILD_GBS 14 | .include "build_gbs.s" 15 | .endif 16 | 17 | ; Devcart 18 | .ifdef BUILD_DEVCART 19 | .include "build_devcart.s" 20 | .endif 21 | 22 | ; GB ROM (default) 23 | .ifndef RUNTIME_INCLUDED 24 | .include "build_rom.s" 25 | .endif 26 | 27 | .endif ; .ifdef BUILD_MULTI 28 | -------------------------------------------------------------------------------- /default_rom/blarrg/cpu_instrs/source/common/multi_custom.s: -------------------------------------------------------------------------------- 1 | ; RST handlers 2 | .bank 0 slot 0 3 | .org 0 4 | inc a 5 | ret 6 | .ds 6,0 7 | inc a 8 | ret 9 | .ds 6,0 10 | inc a 11 | ret 12 | .ds 6,0 13 | inc a 14 | ret 15 | .ds 6,0 16 | inc a 17 | ret 18 | .ds 6,0 19 | inc a 20 | ret 21 | .ds 6,0 22 | inc a 23 | ret 24 | .ds 6,0 25 | inc a 26 | ret 27 | .ds 6,0 28 | inc a 29 | ret 30 | .ds 6,0 31 | inc a 32 | ret 33 | .ds 6,0 34 | inc a 35 | ret 36 | .ds 6,0 37 | inc a 38 | ret 39 | -------------------------------------------------------------------------------- /default_rom/default/hardware.inc: -------------------------------------------------------------------------------- 1 | ; hardware.inc 2 | rP1 EQU $FF00 3 | rSB EQU $FF01 4 | rSC EQU $FF02 5 | rDIV EQU $FF04 6 | rTIMA EQU $FF05 7 | rTMA EQU $FF06 8 | rTAC EQU $FF07 9 | rIF EQU $FF0F 10 | rLCDC EQU $FF40 11 | rSTAT EQU $FF41 12 | rSCY EQU $FF42 13 | rSCX EQU $FF43 14 | rLY EQU $FF44 15 | rLYC EQU $FF45 16 | rDMA EQU $FF46 17 | rBGP EQU $FF47 18 | rOBP0 EQU $FF48 19 | rOBP1 EQU $FF49 20 | rWY EQU $FF4A 21 | rWX EQU $FF4B 22 | rIE EQU $FFFF 23 | 24 | _VRAM EQU $8000 25 | _SCRN0 EQU $9800 26 | _SCRN1 EQU $9C00 27 | _RAM EQU $C000 28 | _HRAM EQU $FF80 29 | _OAMRAM EQU $FE00 30 | -------------------------------------------------------------------------------- /default_rom/blarrg/mem_timing/source/common/tima_64.s: -------------------------------------------------------------------------------- 1 | ; Timer that's incremented every 64 cycles 2 | 3 | ; Initializes timer for use by sync_tima_64 4 | init_tima_64: 5 | wreg TMA,0 6 | wreg TAC,$07 7 | ret 8 | 9 | ; Synchronizes to timer 10 | sync_tima_64: 11 | push af 12 | push hl 13 | 14 | ld a,0 15 | ld hl,TIMA 16 | ld (hl),a 17 | - or (hl) 18 | jr z,- 19 | 20 | - delay 65-12 21 | xor a 22 | ld (hl),a 23 | or (hl) 24 | delay 4 25 | jr z,- 26 | 27 | pop hl 28 | pop af 29 | ret 30 | 31 | ; Read from this to get count that's incremented 32 | ; every 64 cycles. 33 | .define tima_64 TIMA 34 | -------------------------------------------------------------------------------- /default_rom/blarrg/mem_timing-2/source/common/tima_64.s: -------------------------------------------------------------------------------- 1 | ; Timer that's incremented every 64 cycles 2 | 3 | ; Initializes timer for use by sync_tima_64 4 | init_tima_64: 5 | wreg TMA,0 6 | wreg TAC,$07 7 | ret 8 | 9 | ; Synchronizes to timer 10 | ; Preserved: AF, BC, DE, HL 11 | sync_tima_64: 12 | push af 13 | push hl 14 | 15 | ; Coarse 16 | ld hl,TIMA 17 | ld a,0 18 | ld (hl),a 19 | - or (hl) 20 | jr z,- 21 | 22 | ; Fine 23 | - delay 65-12 24 | xor a 25 | ld (hl),a 26 | or (hl) 27 | delay 4 28 | jr z,- 29 | 30 | pop hl 31 | pop af 32 | ret 33 | 34 | ; Read from this to get count that's incremented 35 | ; every 64 cycles. 36 | .define tima_64 TIMA 37 | -------------------------------------------------------------------------------- /default_rom/default/default_rom.map: -------------------------------------------------------------------------------- 1 | ROM0 bank #0: 2 | SECTION: $0000-$001b ($001c bytes) ["Tilemap"] 3 | $0000 = Tilemap 4 | EMPTY: $001c-$00ff ($00e4 bytes) 5 | SECTION: $0100-$0103 ($0004 bytes) ["Header"] 6 | $0100 = EntryPoint 7 | EMPTY: $0104-$0133 ($0030 bytes) 8 | SECTION: $0134-$0139 ($0006 bytes) ["Title"] 9 | EMPTY: $013a-$014f ($0016 bytes) 10 | SECTION: $0150-$01cb ($007c bytes) ["Main"] 11 | $0150 = Main 12 | $0155 = Main.waitVBlank 13 | $015c = Main.setup 14 | $0174 = Main.readTileset 15 | $0187 = Main.readTilemap 16 | $01a0 = Main.clearOAM 17 | $01ab = Main.loop 18 | $01ba = Main.sync 19 | $01c1 = Main.move 20 | SECTION: $01cc-$02eb ($0120 bytes) ["Tileset"] 21 | $01cc = Tileset 22 | EMPTY: $02ec-$3fff ($3d14 bytes) 23 | TOTAL EMPTY: $3e3e bytes 24 | 25 | SUMMARY: 26 | ROM0: 450 bytes used / 15934 free 27 | -------------------------------------------------------------------------------- /internal/cartridge/rom_only.go: -------------------------------------------------------------------------------- 1 | package cartridge 2 | 3 | import "bytes" 4 | 5 | type RomOnlyCartridge struct { 6 | parent *Cartridge 7 | } 8 | 9 | func (c *RomOnlyCartridge) Init() { 10 | } 11 | 12 | func (c *RomOnlyCartridge) Serialize() *bytes.Buffer { 13 | buf := new(bytes.Buffer) 14 | return buf 15 | } 16 | 17 | func (c *RomOnlyCartridge) Deserialize(data *bytes.Buffer) error { 18 | return nil 19 | } 20 | 21 | func (c *RomOnlyCartridge) SetItem(addr uint16, value uint8) { 22 | // do nothing 23 | // can't write to ROM and RAM doesn't exist on these carts 24 | } 25 | 26 | func (c *RomOnlyCartridge) GetItem(addr uint16) uint8 { 27 | switch { 28 | case addr < 0x4000: 29 | return c.parent.RomBanks[0][addr] 30 | 31 | case 0x4000 <= addr && addr < 0x8000: 32 | 33 | return c.parent.RomBanks[1][addr-0x4000] 34 | 35 | case 0xA000 <= addr && addr < 0xC000: 36 | // RAM doesn't exist, but if an attempt is made, return 0xFF 37 | return 0xFF 38 | default: 39 | 40 | } 41 | return 0 42 | } 43 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/duysqubix/gobc 2 | 3 | go 1.23.0 4 | 5 | require ( 6 | github.com/chigopher/pathlib v0.15.0 7 | github.com/gopxl/pixel/v2 v2.2.0 8 | github.com/olekukonko/tablewriter v0.0.5 9 | github.com/sirupsen/logrus v1.9.3 10 | github.com/spf13/afero v1.10.0 11 | github.com/urfave/cli/v2 v2.25.7 12 | golang.org/x/image v0.13.0 13 | ) 14 | 15 | require ( 16 | github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect 17 | github.com/go-gl/gl v0.0.0-20211210172815-726fda9656d6 // indirect 18 | github.com/go-gl/glfw/v3.3/glfw v0.0.0-20221017161538-93cebf72946b // indirect 19 | github.com/go-gl/mathgl v1.1.0 // indirect 20 | github.com/gopxl/glhf/v2 v2.0.0 // indirect 21 | github.com/gopxl/mainthread/v2 v2.0.0 // indirect 22 | github.com/mattn/go-runewidth v0.0.9 // indirect 23 | github.com/pkg/errors v0.9.1 // indirect 24 | github.com/russross/blackfriday/v2 v2.1.0 // indirect 25 | github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect 26 | golang.org/x/sys v0.5.0 // indirect 27 | golang.org/x/text v0.13.0 // indirect 28 | ) 29 | -------------------------------------------------------------------------------- /internal/windows/root.go: -------------------------------------------------------------------------------- 1 | package windows 2 | 3 | import ( 4 | "image/color" 5 | 6 | "github.com/duysqubix/gobc/internal/motherboard" 7 | "github.com/gopxl/pixel/v2" 8 | ) 9 | 10 | func updatePicture(pictureHeight int, pictureWidth int, tileHeight int, tileWidth int, tileData *[]uint8, canvas *pixel.PictureData) { 11 | tileNum := 0 12 | for yCursor := pictureHeight - tileHeight; yCursor >= 0; yCursor -= tileHeight { 13 | for xCursor := 0; xCursor < pictureWidth; xCursor += tileWidth { 14 | 15 | tile := motherboard.Tile((*tileData)[tileNum : tileNum+16]) 16 | palletteTile := tile.ParseTile() 17 | 18 | for yPixel := 0; yPixel < tileHeight; yPixel++ { 19 | for xPixel := 0; xPixel < tileWidth; xPixel++ { 20 | colIndex := palletteTile[yPixel*tileWidth+xPixel] 21 | col := motherboard.Palettes[0][colIndex] 22 | rgb := color.RGBA{R: col[0], G: col[1], B: col[2], A: 0xFF} 23 | idx := (yCursor+yPixel)*pictureWidth + (xCursor + xPixel) 24 | canvas.Pix[idx] = rgb 25 | } 26 | } 27 | tileNum += 16 28 | } 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/manual-only/sprite_priority.sym: -------------------------------------------------------------------------------- 1 | ; this file was created with wlalink by ville helin . 2 | ; wla symbolic information for "/home/runner/work/mooneye-test-suite/mooneye-test-suite/build/manual-only/sprite_priority.gb". 3 | 4 | [information] 5 | version 2 6 | 7 | [labels] 8 | 01:481f clear_oam 9 | 01:4829 clear_vram 10 | 01:4804 disable_ppu_safe 11 | 01:480a disable_ppu_safe@wait_ly_0 12 | 01:4833 memcpy 13 | 01:483c memset 14 | 01:4813 print_load_font 15 | 01:47f0 reset_screen 16 | 01:4000 font 17 | 00:0150 main 18 | 00:017f main@wait_ly_5 19 | 00:0185 main@wait_ly_6 20 | 00:018b main@wait_ly_7 21 | 00:0191 main@wait_ly_8 22 | 00:0198 main@halt_execution_1 23 | 00:019a data 24 | 00:022e data_end 25 | 26 | [definitions] 27 | 0000000a _sizeof_clear_oam 28 | 0000000a _sizeof_clear_vram 29 | 0000000f _sizeof_disable_ppu_safe 30 | 00000009 _sizeof_memcpy 31 | 00000009 _sizeof_memset 32 | 0000000c _sizeof_print_load_font 33 | 00000014 _sizeof_reset_screen 34 | 000007f0 _sizeof_font 35 | 0000004a _sizeof_main 36 | 00000094 _sizeof_data 37 | -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/utils/bootrom_dumper.sym: -------------------------------------------------------------------------------- 1 | ; this file was created with wlalink by ville helin . 2 | ; wla symbolic information for "/home/runner/work/mooneye-test-suite/mooneye-test-suite/build/utils/bootrom_dumper.gb". 3 | 4 | [information] 5 | version 2 6 | 7 | [labels] 8 | 01:7d01 enable_cartridge_ram 9 | 01:7d06 copy_data 10 | 01:7d12 disable_cartridge_ram 11 | 01:7d16 compare_data 12 | 01:7d23 finish 13 | 01:7d29 finish@check_ppu 14 | 01:7d2f finish@wait_vblank 15 | 01:7d35 finish@disable_ppu 16 | 01:7d39 finish@clear_tilemap 17 | 01:7d43 finish@choose_tilemap 18 | 01:7d50 finish@setup_tilemap 19 | 01:7d68 finish@clear_tiles 20 | 01:7d72 finish@setup_tile 21 | 01:7d7d finish@setup_audio 22 | 01:7d93 finish@enable_ppu 23 | 01:7da9 memcpy 24 | 01:7db2 memset 25 | 01:7dbb tilemap_happyface 26 | 01:7e83 tilemap_sadface 27 | 28 | [definitions] 29 | 00000005 _sizeof_enable_cartridge_ram 30 | 0000000c _sizeof_copy_data 31 | 00000004 _sizeof_disable_cartridge_ram 32 | 0000000d _sizeof_compare_data 33 | 00000086 _sizeof_finish 34 | 00000009 _sizeof_memcpy 35 | 00000009 _sizeof_memset 36 | 000000c8 _sizeof_tilemap_happyface 37 | -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014-2022 Joonas Javanainen 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /TESTS.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 10 | 11 | 14 | 15 | 16 | 19 | 22 | 25 | 26 | 29 | 32 | 35 | 36 | 37 | 38 |
5 | 6 | 8 | 9 | 12 | 13 |
17 | 18 | 20 | 21 | 23 | 24 |
27 | 28 | 30 | 31 | 33 | 34 |
-------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/madness/mgb_oam_dma_halt_sprites.sym: -------------------------------------------------------------------------------- 1 | ; this file was created with wlalink by ville helin . 2 | ; wla symbolic information for "/home/runner/work/mooneye-test-suite/mooneye-test-suite/build/madness/mgb_oam_dma_halt_sprites.gb". 3 | 4 | [information] 5 | version 2 6 | 7 | [labels] 8 | 01:481f clear_oam 9 | 01:4829 clear_vram 10 | 01:4804 disable_ppu_safe 11 | 01:480a disable_ppu_safe@wait_ly_0 12 | 01:4833 memcpy 13 | 01:483c memset 14 | 01:4813 print_load_font 15 | 01:47f0 reset_screen 16 | 01:4000 font 17 | 00:0150 main 18 | 00:019b main@wait_ly_5 19 | 00:01a1 main@wait_ly_6 20 | 00:01b6 hiram_test 21 | 00:01bb hiram_test@wait_ly_7 22 | 00:01c1 hiram_test@wait_ly_8 23 | 00:01ce vram_checkerboard 24 | 00:05ce vram_checkerboard_end 25 | 00:05ce initial_data 26 | 00:05d6 initial_data_end 27 | 28 | [definitions] 29 | 0000000a _sizeof_clear_oam 30 | 0000000a _sizeof_clear_vram 31 | 0000000f _sizeof_disable_ppu_safe 32 | 00000009 _sizeof_memcpy 33 | 00000009 _sizeof_memset 34 | 0000000c _sizeof_print_load_font 35 | 00000014 _sizeof_reset_screen 36 | 000007f0 _sizeof_font 37 | 00000066 _sizeof_main 38 | 00000018 _sizeof_hiram_test 39 | 00000400 _sizeof_vram_checkerboard 40 | 00000000 _sizeof_vram_checkerboard_end 41 | 00000008 _sizeof_initial_data 42 | -------------------------------------------------------------------------------- /.github/workflows/go.yml: -------------------------------------------------------------------------------- 1 | # This workflow will build a golang project 2 | # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go 3 | 4 | name: Gobc 5 | 6 | on: 7 | push: 8 | branches: [ "master" ] 9 | pull_request: 10 | branches: [ "master" ] 11 | workflow_dispatch: 12 | 13 | jobs: 14 | 15 | build: 16 | runs-on: ubuntu-latest 17 | steps: 18 | - uses: actions/checkout@v3 19 | 20 | - name: Set up Go 1.21 21 | uses: actions/setup-go@v4 22 | with: 23 | go-version: '1.21' 24 | 25 | - name: Install dependencies 26 | run: | 27 | sudo apt-get update 28 | sudo apt-get install -y libgl1-mesa-dev xorg-dev 29 | 30 | - name: Build GoBC Binary 31 | run: go build -v -o gobc cmd/gobc/gobc.go 32 | 33 | - name: Test Blarrgs CPU_INSTR 34 | run: | 35 | set -e 36 | output=$(./gobc --no-gui default_rom/blarrg/cpu_instrs/cpu_instrs.gb) 37 | echo $output | grep 'Passed' 38 | echo $output 39 | 40 | - name: Test Blarrgs INSTR_TIMING 41 | run: | 42 | set -e 43 | output=$(./gobc --no-gui default_rom/blarrg/instr_timing/instr_timing.gb) 44 | echo $output | grep 'Passed' 45 | echo $output 46 | 47 | 48 | -------------------------------------------------------------------------------- /default_rom/blarrg/cpu_instrs/source/common/cpu_speed.s: -------------------------------------------------------------------------------- 1 | ; CPU speed manipulation. 2 | 3 | ; Switches to normal speed. No effect on DMG. 4 | ; Preserved: BC, DE, HL 5 | cpu_norm: 6 | ; Do nothing if not CGB 7 | ld a,(gb_id) 8 | and gb_id_cgb 9 | ret z 10 | 11 | lda KEY1 12 | rlca 13 | ret nc 14 | jr cpu_speed_toggle 15 | 16 | 17 | ; Switches to double speed. No effect on DMG. 18 | ; Preserved: BC, DE, HL 19 | cpu_fast: 20 | ; Do nothing if not CGB 21 | ld a,(gb_id) 22 | and gb_id_cgb 23 | ret z 24 | 25 | lda KEY1 26 | rlca 27 | ret c 28 | cpu_speed_toggle: 29 | di 30 | lda IE 31 | push af 32 | xor a 33 | sta IE 34 | sta IF 35 | wreg P1,$30 36 | wreg KEY1,1 37 | stop 38 | nop 39 | pop af 40 | sta IE 41 | ret 42 | 43 | 44 | ; Determines current CPU speed without using KEY1. 45 | ; A=1 if fast, 0 if normal. Always 0 on DMG. 46 | ; Preserved: BC, DE,HL 47 | get_cpu_speed: 48 | push bc 49 | call sync_apu 50 | wreg NR14,$C0 51 | wreg NR11,-1 52 | wreg NR12,8 53 | wreg NR14,$C0 54 | ld bc,-$262 55 | - inc bc 56 | lda NR52 57 | and 1 58 | jr nz,- 59 | ld a,0 60 | bit 7,b 61 | jr nz,+ 62 | inc a 63 | + pop bc 64 | ret 65 | -------------------------------------------------------------------------------- /default_rom/blarrg/interrupt_time/interrupt_time.s: -------------------------------------------------------------------------------- 1 | ; Tests interrupt handling time for slow and fast 2 | ; CPU. First value is CPU speed (0=slow, 1=fast), 3 | ; second is number of cycles taken by interrupt. 4 | ; Should take 13 cycles at either speed. 5 | .define REQUIRE_CGB 1 6 | 7 | .include "shell.inc" 8 | .include "cpu_speed.s" 9 | .include "timer.s" 10 | .include "apu.s" 11 | 12 | ; $58: JP $DEC3 13 | ; $DEC3: RET 14 | .define sint $DEC3 15 | 16 | main: 17 | call init_timer 18 | 19 | ld d,0 20 | call test_interrupt 21 | ld d,8 22 | call test_interrupt 23 | call cpu_fast 24 | ld d,0 25 | call test_interrupt 26 | ld d,8 27 | call test_interrupt 28 | 29 | check_crc $C86CC74D 30 | jp tests_passed 31 | 32 | test_interrupt: 33 | call get_cpu_speed 34 | call print_a 35 | call print_d 36 | 37 | ld a,$C9 ; RET 38 | ld (sint),a 39 | 40 | wreg IE,$08 41 | wreg IF,$00 42 | call start_timer 43 | ei 44 | ld a,d 45 | ld (IF),a ; $00 = 0 clocks, $08 = 13 clocks 46 | di 47 | call stop_timer 48 | sub 3+4 ; instruction overhead 49 | call print_a 50 | call print_newline 51 | 52 | ret 53 | 54 | ; RST handler that matches the one in my devcart 55 | .bank 0 slot 0 56 | .org $58 57 | jp $DEC3 58 | -------------------------------------------------------------------------------- /default_rom/blarrg/cpu_instrs/source/01-special.s: -------------------------------------------------------------------------------- 1 | ; Tests instructions that don't fit template 2 | 3 | .include "shell.inc" 4 | 5 | main: 6 | set_test 2,"JR negative" 7 | ld a,0 8 | jp jr_neg 9 | inc a 10 | - inc a 11 | inc a 12 | cp 2 13 | jp nz,test_failed 14 | jp + 15 | jr_neg: 16 | jr - 17 | + 18 | 19 | set_test 3,"JR positive" 20 | ld a,0 21 | jr + 22 | inc a 23 | + inc a 24 | inc a 25 | cp 2 26 | jp nz,test_failed 27 | 28 | 29 | set_test 4,"LD PC,HL" 30 | ld hl,+ 31 | ld a,0 32 | ld pc,hl 33 | inc a 34 | + inc a 35 | inc a 36 | cp 2 37 | jp nz,test_failed 38 | 39 | 40 | set_test 5,"POP AF" 41 | ld bc,$1200 42 | - push bc 43 | pop af 44 | push af 45 | pop de 46 | ld a,c 47 | and $F0 48 | cp e 49 | jp nz,test_failed 50 | inc b 51 | inc c 52 | jr nz,- 53 | 54 | 55 | set_test 6,"DAA" 56 | ; Test all combinations of A and flags (256*16 total) 57 | ld de,0 58 | - push de 59 | pop af 60 | daa 61 | 62 | push af 63 | call update_crc 64 | pop hl 65 | ld a,l 66 | call update_crc 67 | 68 | inc d 69 | jr nz,- 70 | 71 | ld a,e 72 | add $10 73 | ld e,a 74 | jr nz,- 75 | 76 | check_crc $6A9F8D8A 77 | 78 | jp tests_passed 79 | -------------------------------------------------------------------------------- /default_rom/blarrg/cpu_instrs/source/02-interrupts.s: -------------------------------------------------------------------------------- 1 | ; Tests DI, EI, and HALT (STOP proved untestable) 2 | 3 | .include "shell.inc" 4 | 5 | main: 6 | wreg IE,$04 7 | 8 | set_test 2,"EI" 9 | ei 10 | ld bc,0 11 | push bc 12 | pop bc 13 | inc b 14 | wreg IF,$04 15 | interrupt_addr: 16 | dec b 17 | jp nz,test_failed 18 | ld hl,sp-2 19 | ldi a,(hl) 20 | cp interrupt_addr 24 | jp nz,test_failed 25 | lda IF 26 | and $04 27 | jp nz,test_failed 28 | 29 | set_test 3,"DI" 30 | di 31 | ld bc,0 32 | push bc 33 | pop bc 34 | wreg IF,$04 35 | ld hl,sp-2 36 | ldi a,(hl) 37 | or (hl) 38 | jp nz,test_failed 39 | lda IF 40 | and $04 41 | jp z,test_failed 42 | 43 | set_test 4,"Timer doesn't work" 44 | wreg TAC,$05 45 | wreg TIMA,0 46 | wreg IF,0 47 | delay 500 48 | lda IF 49 | delay 500 50 | and $04 51 | jp nz,test_failed 52 | delay 500 53 | lda IF 54 | and $04 55 | jp z,test_failed 56 | pop af 57 | 58 | set_test 5,"HALT" 59 | wreg TAC,$05 60 | wreg TIMA,0 61 | wreg IF,0 62 | halt ; timer interrupt will exit halt 63 | nop ; avoids DMG bug 64 | lda IF 65 | and $04 66 | jp z,test_failed 67 | 68 | jp tests_passed 69 | 70 | .bank 0 slot 0 71 | .org $50 72 | inc a 73 | ret 74 | -------------------------------------------------------------------------------- /default_rom/blarrg/cpu_instrs/source/common/crc.s: -------------------------------------------------------------------------------- 1 | ; CRC-32 checksum calculation 2 | 3 | .define checksum dp+0 ; little-endian, complemented 4 | .redefine dp dp+4 5 | 6 | 7 | ; Initializes checksum module. Might initialize tables 8 | ; in the future. 9 | init_crc: 10 | jr reset_crc 11 | 12 | 13 | ; Clears CRC 14 | ; Preserved: BC, DE, HL 15 | reset_crc: 16 | ld a,$FF 17 | sta checksum+0 18 | sta checksum+1 19 | sta checksum+2 20 | sta checksum+3 21 | ret 22 | 23 | 24 | ; Updates current checksum with byte A 25 | ; Preserved: AF, BC, DE, HL 26 | ; Time: 237 cycles average 27 | update_crc: 28 | ; 65 cycles + 8*cycles per bit 29 | ; min cycles per bit: 14 30 | ; max cycles per bit: 29 31 | push af 32 | push bc 33 | push de 34 | push hl 35 | 36 | ld hl,checksum+3 37 | ld b,(hl) 38 | dec l 39 | ld c,(hl) 40 | dec l 41 | ld d,(hl) 42 | dec l 43 | xor (hl) 44 | 45 | ld h,8 46 | - srl b 47 | rr c 48 | rr d 49 | rra 50 | jr nc,+ 51 | ld e,a 52 | ld a,b 53 | xor $ED 54 | ld b,a 55 | ld a,c 56 | xor $B8 57 | ld c,a 58 | ld a,d 59 | xor $83 60 | ld d,a 61 | ld a,e 62 | xor $20 63 | + dec h 64 | jr nz,- 65 | 66 | ld h,>checksum 67 | ldi (hl),a 68 | ld (hl),d 69 | inc l 70 | ld (hl),c 71 | inc l 72 | ld (hl),b 73 | 74 | pop hl 75 | pop de 76 | pop bc 77 | pop af 78 | ret 79 | -------------------------------------------------------------------------------- /default_rom/blarrg/instr_timing/source/common/crc.s: -------------------------------------------------------------------------------- 1 | ; CRC-32 checksum calculation 2 | 3 | .define checksum dp+0 ; little-endian, complemented 4 | .redefine dp dp+4 5 | 6 | 7 | ; Initializes checksum module. Might initialize tables 8 | ; in the future. 9 | init_crc: 10 | jr reset_crc 11 | 12 | 13 | ; Clears CRC 14 | ; Preserved: BC, DE, HL 15 | reset_crc: 16 | ld a,$FF 17 | sta checksum+0 18 | sta checksum+1 19 | sta checksum+2 20 | sta checksum+3 21 | ret 22 | 23 | 24 | ; Updates current checksum with byte A 25 | ; Preserved: AF, BC, DE, HL 26 | ; Time: 237 cycles average 27 | update_crc: 28 | ; 65 cycles + 8*cycles per bit 29 | ; min cycles per bit: 14 30 | ; max cycles per bit: 29 31 | push af 32 | push bc 33 | push de 34 | push hl 35 | 36 | ld hl,checksum+3 37 | ld b,(hl) 38 | dec l 39 | ld c,(hl) 40 | dec l 41 | ld d,(hl) 42 | dec l 43 | xor (hl) 44 | 45 | ld h,8 46 | - srl b 47 | rr c 48 | rr d 49 | rra 50 | jr nc,+ 51 | ld e,a 52 | ld a,b 53 | xor $ED 54 | ld b,a 55 | ld a,c 56 | xor $B8 57 | ld c,a 58 | ld a,d 59 | xor $83 60 | ld d,a 61 | ld a,e 62 | xor $20 63 | + dec h 64 | jr nz,- 65 | 66 | ld h,>checksum 67 | ldi (hl),a 68 | ld (hl),d 69 | inc l 70 | ld (hl),c 71 | inc l 72 | ld (hl),b 73 | 74 | pop hl 75 | pop de 76 | pop bc 77 | pop af 78 | ret 79 | -------------------------------------------------------------------------------- /default_rom/blarrg/mem_timing-2/source/common/crc.s: -------------------------------------------------------------------------------- 1 | ; CRC-32 checksum calculation 2 | 3 | .define checksum dp+0 ; little-endian, complemented 4 | .redefine dp dp+4 5 | 6 | 7 | ; Initializes checksum module. Might initialize tables 8 | ; in the future. 9 | init_crc: 10 | jr reset_crc 11 | 12 | 13 | ; Clears CRC 14 | ; Preserved: BC, DE, HL 15 | reset_crc: 16 | ld a,$FF 17 | sta checksum+0 18 | sta checksum+1 19 | sta checksum+2 20 | sta checksum+3 21 | ret 22 | 23 | 24 | ; Updates current checksum with byte A 25 | ; Preserved: AF, BC, DE, HL 26 | ; Time: 237 cycles average 27 | update_crc: 28 | ; 65 cycles + 8*cycles per bit 29 | ; min cycles per bit: 14 30 | ; max cycles per bit: 29 31 | push af 32 | push bc 33 | push de 34 | push hl 35 | 36 | ld hl,checksum+3 37 | ld b,(hl) 38 | dec l 39 | ld c,(hl) 40 | dec l 41 | ld d,(hl) 42 | dec l 43 | xor (hl) 44 | 45 | ld h,8 46 | - srl b 47 | rr c 48 | rr d 49 | rra 50 | jr nc,+ 51 | ld e,a 52 | ld a,b 53 | xor $ED 54 | ld b,a 55 | ld a,c 56 | xor $B8 57 | ld c,a 58 | ld a,d 59 | xor $83 60 | ld d,a 61 | ld a,e 62 | xor $20 63 | + dec h 64 | jr nz,- 65 | 66 | ld h,>checksum 67 | ldi (hl),a 68 | ld (hl),d 69 | inc l 70 | ld (hl),c 71 | inc l 72 | ld (hl),b 73 | 74 | pop hl 75 | pop de 76 | pop bc 77 | pop af 78 | ret 79 | -------------------------------------------------------------------------------- /default_rom/blarrg/mem_timing/source/common/crc.s: -------------------------------------------------------------------------------- 1 | ; CRC-32 checksum calculation 2 | 3 | .define checksum dp+0 ; little-endian, complemented 4 | .redefine dp dp+4 5 | 6 | 7 | ; Initializes checksum module. Might initialize tables 8 | ; in the future. 9 | init_crc: 10 | jr reset_crc 11 | 12 | 13 | ; Clears CRC 14 | ; Preserved: BC, DE, HL 15 | reset_crc: 16 | ld a,$FF 17 | sta checksum+0 18 | sta checksum+1 19 | sta checksum+2 20 | sta checksum+3 21 | ret 22 | 23 | 24 | ; Updates current checksum with byte A 25 | ; Preserved: AF, BC, DE, HL 26 | ; Time: 237 cycles average 27 | update_crc: 28 | ; 65 cycles + 8*cycles per bit 29 | ; min cycles per bit: 14 30 | ; max cycles per bit: 29 31 | push af 32 | push bc 33 | push de 34 | push hl 35 | 36 | ld hl,checksum+3 37 | ld b,(hl) 38 | dec l 39 | ld c,(hl) 40 | dec l 41 | ld d,(hl) 42 | dec l 43 | xor (hl) 44 | 45 | ld h,8 46 | - srl b 47 | rr c 48 | rr d 49 | rra 50 | jr nc,+ 51 | ld e,a 52 | ld a,b 53 | xor $ED 54 | ld b,a 55 | ld a,c 56 | xor $B8 57 | ld c,a 58 | ld a,d 59 | xor $83 60 | ld d,a 61 | ld a,e 62 | xor $20 63 | + dec h 64 | jr nz,- 65 | 66 | ld h,>checksum 67 | ldi (hl),a 68 | ld (hl),d 69 | inc l 70 | ld (hl),c 71 | inc l 72 | ld (hl),b 73 | 74 | pop hl 75 | pop de 76 | pop bc 77 | pop af 78 | ret 79 | -------------------------------------------------------------------------------- /default_rom/blarrg/cpu_instrs/source/common/gb.inc: -------------------------------------------------------------------------------- 1 | ; Game Boy hardware addresses 2 | 3 | ; Memory 4 | .define VRAM $8000 ; video memory 5 | .define TILES $8000 ; tile images 6 | .define BGMAP0 $9800 ; first 32x32 tilemap 7 | .define BGMAP1 $9C00 ; second 32x32 tilemap 8 | .define WRAM $C000 ; internal memory 9 | .define OAM $FE00 ; sprite memory 10 | .define HRAM $FF80 ; fast memory for LDH 11 | 12 | .define P1 $FF00 13 | 14 | ; Game link I/O 15 | .define SB $FF01 16 | .define SC $FF02 17 | 18 | ; Interrupts 19 | .define DIV $FF04 20 | .define TIMA $FF05 21 | .define TMA $FF06 22 | .define TAC $FF07 23 | .define IF $FF0F 24 | .define IE $FFFF 25 | 26 | ; LCD registers 27 | .define LCDC $FF40 ; control 28 | .define STAT $FF41 ; status 29 | .define SCY $FF42 ; scroll Y 30 | .define SCX $FF43 ; scroll X 31 | .define LY $FF44 ; current Y being rendered 32 | .define BGP $FF47 33 | 34 | .define KEY1 $FF4D ; for changing CPU speed 35 | .define VBK $FF4F 36 | 37 | ; Sound registers 38 | .define NR10 $FF10 39 | .define NR11 $FF11 40 | .define NR12 $FF12 41 | .define NR13 $FF13 42 | .define NR14 $FF14 43 | 44 | .define NR21 $FF16 45 | .define NR22 $FF17 46 | .define NR23 $FF18 47 | .define NR24 $FF19 48 | 49 | .define NR30 $FF1A 50 | .define NR31 $FF1B 51 | .define NR32 $FF1C 52 | .define NR33 $FF1D 53 | .define NR34 $FF1E 54 | 55 | .define NR41 $FF20 56 | .define NR42 $FF21 57 | .define NR43 $FF22 58 | .define NR44 $FF23 59 | 60 | .define NR50 $FF24 61 | .define NR51 $FF25 62 | .define NR52 $FF26 63 | 64 | .define WAVE $FF30 65 | -------------------------------------------------------------------------------- /default_rom/blarrg/instr_timing/source/common/gb.inc: -------------------------------------------------------------------------------- 1 | ; Game Boy hardware addresses 2 | 3 | ; Memory 4 | .define VRAM $8000 ; video memory 5 | .define TILES $8000 ; tile images 6 | .define BGMAP0 $9800 ; first 32x32 tilemap 7 | .define BGMAP1 $9C00 ; second 32x32 tilemap 8 | .define WRAM $C000 ; internal memory 9 | .define OAM $FE00 ; sprite memory 10 | .define HRAM $FF80 ; fast memory for LDH 11 | 12 | .define P1 $FF00 13 | 14 | ; Game link I/O 15 | .define SB $FF01 16 | .define SC $FF02 17 | 18 | ; Interrupts 19 | .define DIV $FF04 20 | .define TIMA $FF05 21 | .define TMA $FF06 22 | .define TAC $FF07 23 | .define IF $FF0F 24 | .define IE $FFFF 25 | 26 | ; LCD registers 27 | .define LCDC $FF40 ; control 28 | .define STAT $FF41 ; status 29 | .define SCY $FF42 ; scroll Y 30 | .define SCX $FF43 ; scroll X 31 | .define LY $FF44 ; current Y being rendered 32 | .define BGP $FF47 33 | 34 | .define KEY1 $FF4D ; for changing CPU speed 35 | .define VBK $FF4F 36 | 37 | ; Sound registers 38 | .define NR10 $FF10 39 | .define NR11 $FF11 40 | .define NR12 $FF12 41 | .define NR13 $FF13 42 | .define NR14 $FF14 43 | 44 | .define NR21 $FF16 45 | .define NR22 $FF17 46 | .define NR23 $FF18 47 | .define NR24 $FF19 48 | 49 | .define NR30 $FF1A 50 | .define NR31 $FF1B 51 | .define NR32 $FF1C 52 | .define NR33 $FF1D 53 | .define NR34 $FF1E 54 | 55 | .define NR41 $FF20 56 | .define NR42 $FF21 57 | .define NR43 $FF22 58 | .define NR44 $FF23 59 | 60 | .define NR50 $FF24 61 | .define NR51 $FF25 62 | .define NR52 $FF26 63 | 64 | .define WAVE $FF30 65 | -------------------------------------------------------------------------------- /default_rom/blarrg/mem_timing/source/common/gb.inc: -------------------------------------------------------------------------------- 1 | ; Game Boy hardware addresses 2 | 3 | ; Memory 4 | .define VRAM $8000 ; video memory 5 | .define TILES $8000 ; tile images 6 | .define BGMAP0 $9800 ; first 32x32 tilemap 7 | .define BGMAP1 $9C00 ; second 32x32 tilemap 8 | .define WRAM $C000 ; internal memory 9 | .define OAM $FE00 ; sprite memory 10 | .define HRAM $FF80 ; fast memory for LDH 11 | 12 | .define P1 $FF00 13 | 14 | ; Game link I/O 15 | .define SB $FF01 16 | .define SC $FF02 17 | 18 | ; Interrupts 19 | .define DIV $FF04 20 | .define TIMA $FF05 21 | .define TMA $FF06 22 | .define TAC $FF07 23 | .define IF $FF0F 24 | .define IE $FFFF 25 | 26 | ; LCD registers 27 | .define LCDC $FF40 ; control 28 | .define STAT $FF41 ; status 29 | .define SCY $FF42 ; scroll Y 30 | .define SCX $FF43 ; scroll X 31 | .define LY $FF44 ; current Y being rendered 32 | .define BGP $FF47 33 | 34 | .define KEY1 $FF4D ; for changing CPU speed 35 | .define VBK $FF4F 36 | 37 | ; Sound registers 38 | .define NR10 $FF10 39 | .define NR11 $FF11 40 | .define NR12 $FF12 41 | .define NR13 $FF13 42 | .define NR14 $FF14 43 | 44 | .define NR21 $FF16 45 | .define NR22 $FF17 46 | .define NR23 $FF18 47 | .define NR24 $FF19 48 | 49 | .define NR30 $FF1A 50 | .define NR31 $FF1B 51 | .define NR32 $FF1C 52 | .define NR33 $FF1D 53 | .define NR34 $FF1E 54 | 55 | .define NR41 $FF20 56 | .define NR42 $FF21 57 | .define NR43 $FF22 58 | .define NR44 $FF23 59 | 60 | .define NR50 $FF24 61 | .define NR51 $FF25 62 | .define NR52 $FF26 63 | 64 | .define WAVE $FF30 65 | -------------------------------------------------------------------------------- /default_rom/blarrg/cpu_instrs/source/common/build_rom.s: -------------------------------------------------------------------------------- 1 | ; Build as GB ROM 2 | 3 | .memoryMap 4 | defaultSlot 0 5 | slot 0 $0000 size $4000 6 | slot 1 $C000 size $4000 7 | .endMe 8 | 9 | .romBankSize $4000 ; generates $8000 byte ROM 10 | .romBanks 2 11 | 12 | .cartridgeType 1 ; MBC1 13 | .computeChecksum 14 | .computeComplementCheck 15 | 16 | 17 | ;;;; GB ROM header 18 | 19 | ; GB header read by bootrom 20 | .org $100 21 | nop 22 | jp reset 23 | 24 | ; Nintendo logo required for proper boot 25 | .byte $CE,$ED,$66,$66,$CC,$0D,$00,$0B 26 | .byte $03,$73,$00,$83,$00,$0C,$00,$0D 27 | .byte $00,$08,$11,$1F,$88,$89,$00,$0E 28 | .byte $DC,$CC,$6E,$E6,$DD,$DD,$D9,$99 29 | .byte $BB,$BB,$67,$63,$6E,$0E,$EC,$CC 30 | .byte $DD,$DC,$99,$9F,$BB,$B9,$33,$3E 31 | 32 | ; Internal name 33 | .ifdef ROM_NAME 34 | .byte ROM_NAME 35 | .endif 36 | 37 | ; CGB/DMG requirements 38 | .org $143 39 | .ifdef REQUIRE_CGB 40 | .byte $C0 41 | .else 42 | .ifndef REQUIRE_DMG 43 | .byte $80 44 | .endif 45 | .endif 46 | 47 | .org $200 48 | 49 | 50 | ;;;; Shell 51 | 52 | .include "runtime.s" 53 | .include "console.s" 54 | 55 | init_runtime: 56 | call console_init 57 | .ifdef TEST_NAME 58 | print_str TEST_NAME,newline,newline 59 | .endif 60 | ret 61 | 62 | std_print: 63 | push af 64 | sta SB 65 | wreg SC,$81 66 | delay 2304 67 | pop af 68 | jp console_print 69 | 70 | post_exit: 71 | call console_show 72 | call play_byte 73 | forever: 74 | wreg NR52,0 ; sound off 75 | - jr - 76 | 77 | play_byte: 78 | ret 79 | 80 | .ends 81 | -------------------------------------------------------------------------------- /default_rom/blarrg/mem_timing/source/common/build_rom.s: -------------------------------------------------------------------------------- 1 | ; Build as GB ROM 2 | 3 | .memoryMap 4 | defaultSlot 0 5 | slot 0 $0000 size $4000 6 | slot 1 $C000 size $4000 7 | .endMe 8 | 9 | .romBankSize $4000 ; generates $8000 byte ROM 10 | .romBanks 2 11 | 12 | .cartridgeType 1 ; MBC1 13 | .computeChecksum 14 | .computeComplementCheck 15 | 16 | 17 | ;;;; GB ROM header 18 | 19 | ; GB header read by bootrom 20 | .org $100 21 | nop 22 | jp reset 23 | 24 | ; Nintendo logo required for proper boot 25 | .byte $CE,$ED,$66,$66,$CC,$0D,$00,$0B 26 | .byte $03,$73,$00,$83,$00,$0C,$00,$0D 27 | .byte $00,$08,$11,$1F,$88,$89,$00,$0E 28 | .byte $DC,$CC,$6E,$E6,$DD,$DD,$D9,$99 29 | .byte $BB,$BB,$67,$63,$6E,$0E,$EC,$CC 30 | .byte $DD,$DC,$99,$9F,$BB,$B9,$33,$3E 31 | 32 | ; Internal name 33 | .ifdef ROM_NAME 34 | .byte ROM_NAME 35 | .endif 36 | 37 | ; CGB/DMG requirements 38 | .org $143 39 | .ifdef REQUIRE_CGB 40 | .byte $C0 41 | .else 42 | .ifndef REQUIRE_DMG 43 | .byte $80 44 | .endif 45 | .endif 46 | 47 | .org $200 48 | 49 | 50 | ;;;; Shell 51 | 52 | .include "runtime.s" 53 | .include "console.s" 54 | 55 | init_runtime: 56 | call console_init 57 | .ifdef TEST_NAME 58 | print_str TEST_NAME,newline,newline 59 | .endif 60 | ret 61 | 62 | std_print: 63 | push af 64 | sta SB 65 | wreg SC,$81 66 | delay 2304 67 | pop af 68 | jp console_print 69 | 70 | post_exit: 71 | call console_show 72 | call play_byte 73 | forever: 74 | wreg NR52,0 ; sound off 75 | - jr - 76 | 77 | play_byte: 78 | ret 79 | 80 | .ends 81 | -------------------------------------------------------------------------------- /default_rom/blarrg/instr_timing/source/common/build_rom.s: -------------------------------------------------------------------------------- 1 | ; Build as GB ROM 2 | 3 | .memoryMap 4 | defaultSlot 0 5 | slot 0 $0000 size $4000 6 | slot 1 $C000 size $4000 7 | .endMe 8 | 9 | .romBankSize $4000 ; generates $8000 byte ROM 10 | .romBanks 2 11 | 12 | .cartridgeType 1 ; MBC1 13 | .computeChecksum 14 | .computeComplementCheck 15 | 16 | 17 | ;;;; GB ROM header 18 | 19 | ; GB header read by bootrom 20 | .org $100 21 | nop 22 | jp reset 23 | 24 | ; Nintendo logo required for proper boot 25 | .byte $CE,$ED,$66,$66,$CC,$0D,$00,$0B 26 | .byte $03,$73,$00,$83,$00,$0C,$00,$0D 27 | .byte $00,$08,$11,$1F,$88,$89,$00,$0E 28 | .byte $DC,$CC,$6E,$E6,$DD,$DD,$D9,$99 29 | .byte $BB,$BB,$67,$63,$6E,$0E,$EC,$CC 30 | .byte $DD,$DC,$99,$9F,$BB,$B9,$33,$3E 31 | 32 | ; Internal name 33 | .ifdef ROM_NAME 34 | .byte ROM_NAME 35 | .endif 36 | 37 | ; CGB/DMG requirements 38 | .org $143 39 | .ifdef REQUIRE_CGB 40 | .byte $C0 41 | .else 42 | .ifndef REQUIRE_DMG 43 | .byte $80 44 | .endif 45 | .endif 46 | 47 | .org $200 48 | 49 | 50 | ;;;; Shell 51 | 52 | .include "runtime.s" 53 | .include "console.s" 54 | 55 | init_runtime: 56 | call console_init 57 | .ifdef TEST_NAME 58 | print_str TEST_NAME,newline,newline 59 | .endif 60 | ret 61 | 62 | std_print: 63 | push af 64 | sta SB 65 | wreg SC,$81 66 | delay 2304 67 | pop af 68 | jp console_print 69 | 70 | post_exit: 71 | call console_show 72 | call play_byte 73 | forever: 74 | wreg NR52,0 ; sound off 75 | - jr - 76 | 77 | play_byte: 78 | ret 79 | 80 | .ends 81 | -------------------------------------------------------------------------------- /default_rom/blarrg/cpu_instrs/source/common/macros.inc: -------------------------------------------------------------------------------- 1 | ; General macros 2 | 3 | ; Reads A from addr, from $FF00 to $FFFF 4 | ; Preserved: F, BC, DE, HL 5 | ; Time: 3 cycles 6 | .macro lda ARGS addr 7 | ldh a,(addr - $FF00) 8 | .endm 9 | 10 | ; Writes A to addr, from $FF00 to $FFFF 11 | ; Preserved: AF, BC, DE, HL 12 | ; Time: 3 cycles 13 | .macro sta ARGS addr 14 | ldh (addr - $FF00),a 15 | .endm 16 | 17 | ; Writes immediate data to addr, from $FF00 to $FFFF 18 | ; Preserved: F, BC, DE, HL 19 | ; Time: 5 cycles 20 | .macro wreg ARGS addr, data 21 | ld a,data 22 | sta addr 23 | .endm 24 | 25 | ; Calls routine multiple times, with A having the 26 | ; value 'start' the first time, 'start+step' the 27 | ; second time, up to 'end' for the last time. 28 | ; Preserved: BC, DE, HL 29 | .macro for_loop ; routine,start,end,step 30 | ld a,\2 31 | 32 | for_loop\@: 33 | push af 34 | call \1 35 | pop af 36 | 37 | add \4 38 | cp <(\3 + \4) 39 | jr nz,for_loop\@ 40 | .endm 41 | 42 | ; Calls routine n times. The value of A in the routine 43 | ; counts from 0 to n-1. 44 | ; Preserved: BC, DE, HL 45 | .macro loop_n_times ; routine,n 46 | for_loop \1,0,\2 - 1,+1 47 | .endm 48 | 49 | ; Same as for_loop, but counts with 16-bit value in BC. 50 | ; Preserved: DE, HL 51 | .macro for_loop16 ; routine,start,end,step 52 | ld bc,\2 53 | 54 | for_loop16\@: 55 | push bc 56 | call \1 57 | pop bc 58 | 59 | ld a,c 60 | add <\4 61 | ld c,a 62 | 63 | ld a,b 64 | adc >\4 65 | ld b,a 66 | 67 | cp >(\3+\4) 68 | jr nz,for_loop16\@ 69 | 70 | ld a,c 71 | cp <(\3+\4) 72 | jr nz,for_loop16\@ 73 | .endm 74 | -------------------------------------------------------------------------------- /default_rom/blarrg/mem_timing/source/common/macros.inc: -------------------------------------------------------------------------------- 1 | ; General macros 2 | 3 | ; Reads A from addr, from $FF00 to $FFFF 4 | ; Preserved: F, BC, DE, HL 5 | ; Time: 3 cycles 6 | .macro lda ARGS addr 7 | ldh a,(addr - $FF00) 8 | .endm 9 | 10 | ; Writes A to addr, from $FF00 to $FFFF 11 | ; Preserved: AF, BC, DE, HL 12 | ; Time: 3 cycles 13 | .macro sta ARGS addr 14 | ldh (addr - $FF00),a 15 | .endm 16 | 17 | ; Writes immediate data to addr, from $FF00 to $FFFF 18 | ; Preserved: F, BC, DE, HL 19 | ; Time: 5 cycles 20 | .macro wreg ARGS addr, data 21 | ld a,data 22 | sta addr 23 | .endm 24 | 25 | ; Calls routine multiple times, with A having the 26 | ; value 'start' the first time, 'start+step' the 27 | ; second time, up to 'end' for the last time. 28 | ; Preserved: BC, DE, HL 29 | .macro for_loop ; routine,start,end,step 30 | ld a,\2 31 | 32 | for_loop\@: 33 | push af 34 | call \1 35 | pop af 36 | 37 | add \4 38 | cp <(\3 + \4) 39 | jr nz,for_loop\@ 40 | .endm 41 | 42 | ; Calls routine n times. The value of A in the routine 43 | ; counts from 0 to n-1. 44 | ; Preserved: BC, DE, HL 45 | .macro loop_n_times ; routine,n 46 | for_loop \1,0,\2 - 1,+1 47 | .endm 48 | 49 | ; Same as for_loop, but counts with 16-bit value in BC. 50 | ; Preserved: DE, HL 51 | .macro for_loop16 ; routine,start,end,step 52 | ld bc,\2 53 | 54 | for_loop16\@: 55 | push bc 56 | call \1 57 | pop bc 58 | 59 | ld a,c 60 | add <\4 61 | ld c,a 62 | 63 | ld a,b 64 | adc >\4 65 | ld b,a 66 | 67 | cp >(\3+\4) 68 | jr nz,for_loop16\@ 69 | 70 | ld a,c 71 | cp <(\3+\4) 72 | jr nz,for_loop16\@ 73 | .endm 74 | -------------------------------------------------------------------------------- /default_rom/blarrg/instr_timing/source/common/macros.inc: -------------------------------------------------------------------------------- 1 | ; General macros 2 | 3 | ; Reads A from addr, from $FF00 to $FFFF 4 | ; Preserved: F, BC, DE, HL 5 | ; Time: 3 cycles 6 | .macro lda ARGS addr 7 | ldh a,(addr - $FF00) 8 | .endm 9 | 10 | ; Writes A to addr, from $FF00 to $FFFF 11 | ; Preserved: AF, BC, DE, HL 12 | ; Time: 3 cycles 13 | .macro sta ARGS addr 14 | ldh (addr - $FF00),a 15 | .endm 16 | 17 | ; Writes immediate data to addr, from $FF00 to $FFFF 18 | ; Preserved: F, BC, DE, HL 19 | ; Time: 5 cycles 20 | .macro wreg ARGS addr, data 21 | ld a,data 22 | sta addr 23 | .endm 24 | 25 | ; Calls routine multiple times, with A having the 26 | ; value 'start' the first time, 'start+step' the 27 | ; second time, up to 'end' for the last time. 28 | ; Preserved: BC, DE, HL 29 | .macro for_loop ; routine,start,end,step 30 | ld a,\2 31 | 32 | for_loop\@: 33 | push af 34 | call \1 35 | pop af 36 | 37 | add \4 38 | cp <(\3 + \4) 39 | jr nz,for_loop\@ 40 | .endm 41 | 42 | ; Calls routine n times. The value of A in the routine 43 | ; counts from 0 to n-1. 44 | ; Preserved: BC, DE, HL 45 | .macro loop_n_times ; routine,n 46 | for_loop \1,0,\2 - 1,+1 47 | .endm 48 | 49 | ; Same as for_loop, but counts with 16-bit value in BC. 50 | ; Preserved: DE, HL 51 | .macro for_loop16 ; routine,start,end,step 52 | ld bc,\2 53 | 54 | for_loop16\@: 55 | push bc 56 | call \1 57 | pop bc 58 | 59 | ld a,c 60 | add <\4 61 | ld c,a 62 | 63 | ld a,b 64 | adc >\4 65 | ld b,a 66 | 67 | cp >(\3+\4) 68 | jr nz,for_loop16\@ 69 | 70 | ld a,c 71 | cp <(\3+\4) 72 | jr nz,for_loop16\@ 73 | .endm 74 | -------------------------------------------------------------------------------- /default_rom/blarrg/mem_timing-2/source/common/printing.s: -------------------------------------------------------------------------------- 1 | ; Main printing routine that checksums and 2 | ; prints to output device 3 | 4 | ; Character that does equivalent of print_newline 5 | .define newline 10 6 | 7 | ; Prints char without updating checksum 8 | ; Preserved: BC, DE, HL 9 | ;print_char_nocrc (defined by user) 10 | 11 | 12 | ; Prints character and updates checksum UNLESS 13 | ; it's a newline. 14 | ; Preserved: AF, BC, DE, HL 15 | print_char: 16 | push af 17 | cp newline 18 | call nz,update_crc 19 | call print_char_nocrc 20 | pop af 21 | ret 22 | 23 | 24 | ; Prints space. Does NOT update checksum. 25 | ; Preserved: AF, BC, DE, HL 26 | print_space: 27 | push af 28 | ld a,' ' 29 | call print_char_nocrc 30 | pop af 31 | ret 32 | 33 | 34 | ; Advances to next line. Does NOT update checksum. 35 | ; Preserved: AF, BC, DE, HL 36 | print_newline: 37 | push af 38 | ld a,newline 39 | call print_char_nocrc 40 | pop af 41 | ret 42 | 43 | 44 | ; Prints immediate string 45 | ; Preserved: AF, BC, DE, HL 46 | .macro print_str ; string,string2 47 | push hl 48 | call print_str_ 49 | .byte \1 50 | .if NARGS > 1 51 | .byte \2 52 | .endif 53 | .if NARGS > 2 54 | .byte \3 55 | .endif 56 | .byte 0 57 | pop hl 58 | .endm 59 | 60 | print_str_: 61 | pop hl 62 | call print_str_hl 63 | jp hl 64 | 65 | 66 | ; Prints zero-terminated string pointed to by HL. 67 | ; On return, HL points to byte AFTER zero terminator. 68 | ; Preserved: AF, BC, DE 69 | print_str_hl: 70 | push af 71 | jr + 72 | - call print_char 73 | + ldi a,(hl) 74 | or a 75 | jr nz,- 76 | pop af 77 | ret 78 | -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/timer/div_write.sym: -------------------------------------------------------------------------------- 1 | ; this file was created with wlalink by ville helin . 2 | ; wla symbolic information for "/home/runner/work/mooneye-test-suite/mooneye-test-suite/build/acceptance/timer/div_write.gb". 3 | 4 | [information] 5 | version 2 6 | 7 | [labels] 8 | 01:48d4 clear_vram 9 | 01:489f disable_ppu_safe 10 | 01:48a5 disable_ppu_safe@wait_ly_0 11 | 01:48fa is_ppu_broken 12 | 01:48de is_serial_broken 13 | 01:48e8 memcpy 14 | 01:48f1 memset 15 | 01:4900 print_inline_string 16 | 01:48bd print_load_font 17 | 01:48c9 print_newline 18 | 01:488f print_string 19 | 01:4897 print_string@char 20 | 01:489a print_string@newline 21 | 01:47f0 quit 22 | 01:4806 quit@callback 23 | 01:480a quit@cb_return 24 | 01:4814 quit@wait_ly_1 25 | 01:481a quit@wait_ly_2 26 | 01:4820 quit@wait_ly_3 27 | 01:4826 quit@wait_ly_4 28 | 01:482c quit@report_result 29 | 01:4830 quit@success 30 | 01:483e quit@failure 31 | 01:4846 quit@serial_dump 32 | 01:484c quit@normal 33 | 01:4866 quit@fast 34 | 01:4878 quit@halt 35 | 01:4879 quit@halt_execution_0 36 | 01:487b reset_screen 37 | 01:48ae serial_send_byte 38 | 01:4000 font 39 | 00:0150 main 40 | 00:0150 test 41 | 00:0175 test@quit_inline_1 42 | 00:0186 quit_failure 43 | 00:018d quit_failure@quit_inline_2 44 | 45 | [definitions] 46 | 0000000a _sizeof_clear_vram 47 | 0000000f _sizeof_disable_ppu_safe 48 | 00000006 _sizeof_is_ppu_broken 49 | 0000000a _sizeof_is_serial_broken 50 | 00000009 _sizeof_memcpy 51 | 00000009 _sizeof_memset 52 | 00000006 _sizeof_print_inline_string 53 | 0000000c _sizeof_print_load_font 54 | 0000000b _sizeof_print_newline 55 | 00000010 _sizeof_print_string 56 | 0000008b _sizeof_quit 57 | 00000014 _sizeof_reset_screen 58 | 0000000f _sizeof_serial_send_byte 59 | 000007f0 _sizeof_font 60 | 00000000 _sizeof_test 61 | 00000036 _sizeof_main 62 | -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/halt_ime0_ei.sym: -------------------------------------------------------------------------------- 1 | ; this file was created with wlalink by ville helin . 2 | ; wla symbolic information for "/home/runner/work/mooneye-test-suite/mooneye-test-suite/build/acceptance/halt_ime0_ei.gb". 3 | 4 | [information] 5 | version 2 6 | 7 | [labels] 8 | 01:48d4 clear_vram 9 | 01:489f disable_ppu_safe 10 | 01:48a5 disable_ppu_safe@wait_ly_0 11 | 01:48fa is_ppu_broken 12 | 01:48de is_serial_broken 13 | 01:48e8 memcpy 14 | 01:48f1 memset 15 | 01:4900 print_inline_string 16 | 01:48bd print_load_font 17 | 01:48c9 print_newline 18 | 01:488f print_string 19 | 01:4897 print_string@char 20 | 01:489a print_string@newline 21 | 01:47f0 quit 22 | 01:4806 quit@callback 23 | 01:480a quit@cb_return 24 | 01:4814 quit@wait_ly_1 25 | 01:481a quit@wait_ly_2 26 | 01:4820 quit@wait_ly_3 27 | 01:4826 quit@wait_ly_4 28 | 01:482c quit@report_result 29 | 01:4830 quit@success 30 | 01:483e quit@failure 31 | 01:4846 quit@serial_dump 32 | 01:484c quit@normal 33 | 01:4866 quit@fast 34 | 01:4878 quit@halt 35 | 01:4879 quit@halt_execution_0 36 | 01:487b reset_screen 37 | 01:48ae serial_send_byte 38 | 01:4000 font 39 | 00:0150 main 40 | 00:0151 main@wait_ly_5 41 | 00:0161 result_ime0 42 | 00:0168 result_ime0@quit_inline_1 43 | 00:0177 result_ime1 44 | 00:017e result_ime1@quit_inline_2 45 | 46 | [definitions] 47 | 0000000a _sizeof_clear_vram 48 | 0000000f _sizeof_disable_ppu_safe 49 | 00000006 _sizeof_is_ppu_broken 50 | 0000000a _sizeof_is_serial_broken 51 | 00000009 _sizeof_memcpy 52 | 00000009 _sizeof_memset 53 | 00000006 _sizeof_print_inline_string 54 | 0000000c _sizeof_print_load_font 55 | 0000000b _sizeof_print_newline 56 | 00000010 _sizeof_print_string 57 | 0000008b _sizeof_quit 58 | 00000014 _sizeof_reset_screen 59 | 0000000f _sizeof_serial_send_byte 60 | 000007f0 _sizeof_font 61 | 00000011 _sizeof_main 62 | 00000016 _sizeof_result_ime0 63 | -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/bits/mem_oam.sym: -------------------------------------------------------------------------------- 1 | ; this file was created with wlalink by ville helin . 2 | ; wla symbolic information for "/home/runner/work/mooneye-test-suite/mooneye-test-suite/build/acceptance/bits/mem_oam.gb". 3 | 4 | [information] 5 | version 2 6 | 7 | [labels] 8 | 01:48d4 clear_vram 9 | 01:489f disable_ppu_safe 10 | 01:48a5 disable_ppu_safe@wait_ly_0 11 | 01:48fa is_ppu_broken 12 | 01:48de is_serial_broken 13 | 01:48e8 memcpy 14 | 01:48f1 memset 15 | 01:4900 print_inline_string 16 | 01:48bd print_load_font 17 | 01:48c9 print_newline 18 | 01:488f print_string 19 | 01:4897 print_string@char 20 | 01:489a print_string@newline 21 | 01:47f0 quit 22 | 01:4806 quit@callback 23 | 01:480a quit@cb_return 24 | 01:4814 quit@wait_ly_1 25 | 01:481a quit@wait_ly_2 26 | 01:4820 quit@wait_ly_3 27 | 01:4826 quit@wait_ly_4 28 | 01:482c quit@report_result 29 | 01:4830 quit@success 30 | 01:483e quit@failure 31 | 01:4846 quit@serial_dump 32 | 01:484c quit@normal 33 | 01:4866 quit@fast 34 | 01:4878 quit@halt 35 | 01:4879 quit@halt_execution_0 36 | 01:487b reset_screen 37 | 01:48ae serial_send_byte 38 | 01:4000 font 39 | 00:0150 main 40 | 00:0171 test_finish 41 | 00:0178 test_finish@quit_inline_1 42 | 00:0189 fail_1 43 | 00:0190 fail_1@quit_inline_2 44 | 00:01a6 fail_0 45 | 00:01ad fail_0@quit_inline_3 46 | 47 | [definitions] 48 | 0000000a _sizeof_clear_vram 49 | 0000000f _sizeof_disable_ppu_safe 50 | 00000006 _sizeof_is_ppu_broken 51 | 0000000a _sizeof_is_serial_broken 52 | 00000009 _sizeof_memcpy 53 | 00000009 _sizeof_memset 54 | 00000006 _sizeof_print_inline_string 55 | 0000000c _sizeof_print_load_font 56 | 0000000b _sizeof_print_newline 57 | 00000010 _sizeof_print_string 58 | 0000008b _sizeof_quit 59 | 00000014 _sizeof_reset_screen 60 | 0000000f _sizeof_serial_send_byte 61 | 000007f0 _sizeof_font 62 | 00000021 _sizeof_main 63 | 00000018 _sizeof_test_finish 64 | 0000001d _sizeof_fail_1 65 | -------------------------------------------------------------------------------- /cmd/cartdump/main.go: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | This handles cartridge metadata and viewing 4 | 5 | */ 6 | 7 | package main 8 | 9 | import ( 10 | "fmt" 11 | "os" 12 | 13 | "path/filepath" 14 | 15 | "github.com/chigopher/pathlib" 16 | "github.com/duysqubix/gobc/internal" 17 | "github.com/duysqubix/gobc/internal/cartridge" 18 | ) 19 | 20 | var SUPPORTED_ROMS = []string{".gbc", ".gb"} 21 | var logger = internal.Logger 22 | 23 | func main() { 24 | 25 | if len(os.Args) < 2 { 26 | fmt.Println("Please provide path to ROM cartridge") 27 | os.Exit(1) 28 | } 29 | 30 | filename := os.Args[1] 31 | 32 | if filename == "" { 33 | fmt.Println("Please provide a filename") 34 | os.Exit(1) 35 | } 36 | 37 | // Open the file 38 | obj := pathlib.NewPath(filename) 39 | 40 | // check if not file and panic 41 | is_file, err := obj.IsFile() 42 | if err != nil { 43 | panic(err) 44 | } 45 | 46 | if !is_file { 47 | panic("Not a file") 48 | } 49 | 50 | // check if file is supported 51 | ext := filepath.Ext(filename) 52 | if !internal.IsInStrArray(ext, SUPPORTED_ROMS) { 53 | internal.Logger.Panicf("Not a supported ROM: %s", ext) 54 | } 55 | 56 | fmt.Println("Reading ROM file: ", filename) 57 | // create cartridge 58 | cart := cartridge.NewCartridge(obj) 59 | 60 | // check if flag --raw is set 61 | if internal.IsInStrArray("--raw", os.Args) { 62 | cart.RawHeaderDump() 63 | } else { 64 | file, err := os.Create("cartdump.txt") 65 | if err != nil { 66 | panic(err) 67 | } 68 | 69 | defer file.Close() 70 | 71 | include_nop := false 72 | 73 | if internal.IsInStrArray("--include-nop", os.Args) { 74 | include_nop = true 75 | } 76 | if internal.IsInStrArray("--instruction-set", os.Args) { 77 | cart.Dump(file) 78 | cart.DumpInstructionSet(file, include_nop) 79 | } else { 80 | cart.Dump(file) 81 | } 82 | 83 | fmt.Println("Dumped cartridge metadata to cartdump.txt") 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /default_rom/default/default_rom.asm: -------------------------------------------------------------------------------- 1 | INCLUDE "hardware.inc" 2 | 3 | SECTION "Header", ROM0[$100] 4 | EntryPoint: 5 | nop 6 | jp Main 7 | 8 | SECTION "Title", ROM0[$134] 9 | db "NO-ROM" 10 | 11 | SECTION "Tileset", ROM0 12 | Tileset: 13 | INCBIN "default_rom.2bpp" 14 | 15 | SECTION "Tilemap", ROM0 16 | Tilemap: 17 | db $40, $41, $42, $43, $44, $45, $46, $41, $41, $41, $47, $41, $41, $41 18 | db $48, $49, $4A, $4B, $4C, $4D, $4E, $49, $4F, $50, $51, $41, $41, $41 19 | 20 | SECTION "Main", ROM0[$150] 21 | Main: 22 | nop 23 | di 24 | jp .setup 25 | 26 | 27 | .waitVBlank 28 | ldh a, [rLY] 29 | cp 144 30 | jr c, .waitVBlank 31 | ret 32 | 33 | .setup 34 | ld hl, rLCDC 35 | set 6, [hl] 36 | set 5, [hl] 37 | ld hl, rWY 38 | ld [hl], 144 39 | inc hl 40 | ld [hl], 43 41 | 42 | ld bc, $8400 43 | ld de, $8700 44 | ld hl, Tileset 45 | 46 | .readTileset 47 | call .waitVBlank 48 | ld a, [hli] 49 | ld [bc], a 50 | inc bc 51 | ld a, b 52 | cp a, d 53 | jr c, .readTileset 54 | 55 | ld hl, Tilemap 56 | ld bc, $9C00 57 | ld de, $9C0E 58 | 59 | .readTilemap 60 | call .waitVBlank 61 | ld a, [hli] 62 | ld [bc], a 63 | inc bc 64 | ld a, c 65 | cp a, e 66 | jr c, .readTilemap 67 | 68 | add $12 69 | ld c, a 70 | ld a, e 71 | add $20 72 | ld e, a 73 | ld a, e 74 | 75 | cp a, $2F 76 | jr c, .readTilemap 77 | 78 | ld hl, _OAMRAM 79 | 80 | .clearOAM 81 | call .waitVBlank 82 | ld [hl], 0 83 | inc hl 84 | ld a, l 85 | cp a, $F0 86 | jr nz, .clearOAM 87 | 88 | .loop 89 | ld a, [rWY] 90 | cp a, 90 91 | jr c, .loop 92 | 93 | ldh a, [rDIV] 94 | cp a, 255 95 | jp z, .move 96 | jr .loop 97 | 98 | .sync 99 | ldh a, [rLY] 100 | cp 144 101 | jr nz, .sync 102 | ret 103 | 104 | .move 105 | call .sync 106 | ld hl, rWY 107 | dec [hl] 108 | 109 | ldh [rDIV], a 110 | jr .loop -------------------------------------------------------------------------------- /default_rom/blarrg/mem_timing-2/source/common/build_rom.s: -------------------------------------------------------------------------------- 1 | ; Build as GB ROM 2 | 3 | .memoryMap 4 | defaultSlot 0 5 | slot 0 $0000 size $4000 6 | slot 1 $C000 size $4000 7 | .endMe 8 | 9 | .romBankSize $4000 10 | .romBanks 2 11 | 12 | .cartridgeType 3 ; MBC1+RAM+battery 13 | .ramsize 02 ; 8K 14 | .computeChecksum 15 | .computeComplementCheck 16 | .emptyfill $FF 17 | 18 | ;;;; GB ROM header 19 | 20 | .org $134 21 | .ds 15,0 22 | 23 | ; Reserve space for RST handlers 24 | .org $70 25 | 26 | ; Keep unused space filled, otherwise 27 | ; wla moves code here 28 | .ds $90,0 29 | 30 | ; GB header read by bootrom 31 | .org $100 32 | nop 33 | jp reset 34 | 35 | ; Nintendo logo required for proper boot 36 | .byte $CE,$ED,$66,$66,$CC,$0D,$00,$0B 37 | .byte $03,$73,$00,$83,$00,$0C,$00,$0D 38 | .byte $00,$08,$11,$1F,$88,$89,$00,$0E 39 | .byte $DC,$CC,$6E,$E6,$DD,$DD,$D9,$99 40 | .byte $BB,$BB,$67,$63,$6E,$0E,$EC,$CC 41 | .byte $DD,$DC,$99,$9F,$BB,$B9,$33,$3E 42 | 43 | .section "HEADER" OVERWRITE 44 | ; Internal name 45 | .ifdef ROM_NAME 46 | .byte ROM_NAME 47 | .else 48 | .ifdef ROM_NAME_DEFAULT 49 | .byte ROM_NAME_DEFAULT 50 | .endif 51 | .endif 52 | .ends 53 | 54 | ; CGB/DMG requirements 55 | .org $143 56 | .ifdef REQUIRE_CGB 57 | .byte $C0 58 | .else 59 | .ifndef REQUIRE_DMG 60 | .byte $80 61 | .endif 62 | .endif 63 | .byte 0,0,0 64 | 65 | .org $14A 66 | .byte 0,0,0 67 | 68 | ; Keep unused space filled, otherwise 69 | ; wla moves code here 70 | .org $150 71 | .ds $2150-$150,$FF 72 | 73 | ;;;; Shell 74 | 75 | .define NEED_CONSOLE 1 76 | .include "shell.s" 77 | 78 | init_runtime: 79 | ret 80 | 81 | play_byte: 82 | ret 83 | 84 | .ends 85 | -------------------------------------------------------------------------------- /default_rom/blarrg/cpu_instrs/source/common/crc_fast.s: -------------------------------------------------------------------------------- 1 | ; Fast table-based CRC-32 2 | 3 | .define crc_tables (bss+$FF)&$FF00 ; 256-byte aligned 4 | .redefine bss crc_tables+$400 5 | 6 | 7 | ; Initializes fast CRC tables and resets checksum. 8 | ; Time: 47 msec 9 | init_crc_fast: 10 | ld l,0 11 | @next: 12 | xor a 13 | ld c,a 14 | ld d,a 15 | ld e,l 16 | 17 | ld h,8 18 | - rra 19 | rr c 20 | rr d 21 | rr e 22 | jr nc,+ 23 | xor $ED 24 | ld b,a 25 | ld a,c 26 | xor $B8 27 | ld c,a 28 | ld a,d 29 | xor $83 30 | ld d,a 31 | ld a,e 32 | xor $20 33 | ld e,a 34 | ld a,b 35 | 36 | + dec h 37 | jr nz,- 38 | 39 | ld h,>crc_tables 40 | ld (hl),e 41 | inc h 42 | ld (hl),d 43 | inc h 44 | ld (hl),c 45 | inc h 46 | ld (hl),a 47 | 48 | inc l 49 | jr nz,@next 50 | 51 | jp init_crc 52 | 53 | 54 | ; Faster version of update_crc 55 | ; Preserved: BC, DE 56 | ; Time: 50 cycles (including CALL) 57 | update_crc_fast: 58 | 59 | ; Fastest inline macro version of update_crc_fast 60 | ; Time: 40 cycles 61 | ; Size: 28 bytes 62 | .macro update_crc_fast 63 | ld l,a ; 1 64 | lda checksum ; 3 65 | xor l ; 1 66 | ld l,a ; 1 67 | ld h,>crc_tables ; 2 68 | 69 | lda checksum+1 ; 3 70 | xor (hl) ; 2 71 | inc h ; 1 72 | sta checksum ; 3 73 | 74 | lda checksum+2 ; 3 75 | xor (hl) ; 2 76 | inc h ; 1 77 | sta checksum+1 ; 3 78 | 79 | lda checksum+3 ; 3 80 | xor (hl) ; 2 81 | inc h ; 1 82 | sta checksum+2 ; 3 83 | 84 | ld a,(hl) ; 2 85 | sta checksum+3 ; 3 86 | .endm 87 | update_crc_fast 88 | ret 89 | -------------------------------------------------------------------------------- /default_rom/blarrg/instr_timing/source/common/timer.s: -------------------------------------------------------------------------------- 1 | ; Cycle-accurate timer 2 | 3 | ; TIMA is incremented every 4 cycles. Loops 4 | ; check for increment within 3-cycle window, 5 | ; so when it occurs outside this, loop is 6 | ; exactly synchronized. Loop iterations are 7 | ; one more or less than 12 cycles, so they 8 | ; will never run more than 4 times. 9 | 10 | ; Initializes timer 11 | ; Preserved: AF, BC, DE, HL 12 | init_timer: 13 | push af 14 | di 15 | lda IE ; disable timer interrupt 16 | and ~$04 17 | sta IE 18 | wreg TMA,0 ; max period 19 | wreg TAC,$05 ; 262144 Hz 20 | 21 | ; Be sure timer doesn't expire 22 | ; immediately or take too long 23 | wreg IF,0 24 | wreg TIMA,-20 25 | delay 70 26 | lda IF 27 | and $04 28 | jp nz,test_failed 29 | lda IF 30 | and $04 31 | jp z,test_failed 32 | 33 | pop af 34 | ret 35 | 36 | 37 | ; Starts timer 38 | ; Preserved: AF, BC, DE, HL 39 | start_timer: 40 | push af 41 | 42 | - xor a ; 1 43 | sta TIMA ; 3 44 | lda TIMA ; 3 45 | or a ; 1 46 | jr nz,- ; 3 47 | 48 | pop af 49 | ret 50 | 51 | 52 | ; Stops timer and determines cycles since 53 | ; it was started. A = cycles (0 to 255). 54 | ; Preserved: BC, DE, HL 55 | stop_timer: 56 | push de 57 | call stop_timer_word 58 | ld a,e 59 | sub 10 60 | pop de 61 | ret 62 | 63 | 64 | ; Same as stop_timer, but with greater range. 65 | ; DE = cycles (0 to 1019). 66 | ; Preserved: BC, HL 67 | stop_timer_word: 68 | 69 | ld d,0 70 | 71 | ; Get main count (TIMA*4) 72 | lda TIMA 73 | sub 5 74 | add a 75 | rl d 76 | add a 77 | rl d 78 | ld e,a 79 | 80 | ; One iteration per remaining cycle 81 | - xor a ; 1 82 | sta TIMA ; 3 83 | lda TIMA ; 3 84 | dec de ; 2 85 | or a ; 1 86 | jr nz,- ; 3 87 | 88 | ret 89 | -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/utils/dump_boot_hwio.sym: -------------------------------------------------------------------------------- 1 | ; this file was created with wlalink by ville helin . 2 | ; wla symbolic information for "/home/runner/work/mooneye-test-suite/mooneye-test-suite/build/utils/dump_boot_hwio.gb". 3 | 4 | [information] 5 | version 2 6 | 7 | [labels] 8 | 01:4907 clear_vram 9 | 01:48c6 disable_ppu_safe 10 | 01:48cc disable_ppu_safe@wait_ly_0 11 | 01:4937 is_ppu_broken 12 | 01:4911 is_serial_broken 13 | 01:4925 memcpy 14 | 01:492e memset 15 | 01:48e4 print_hex4 16 | 01:491b print_hex8 17 | 01:48f0 print_load_font 18 | 01:48fc print_newline 19 | 01:47f0 quit 20 | 01:4806 quit@callback 21 | 01:480a quit@cb_return 22 | 01:4814 quit@wait_ly_1 23 | 01:481a quit@wait_ly_2 24 | 01:4820 quit@wait_ly_3 25 | 01:4826 quit@wait_ly_4 26 | 01:482c quit@report_result 27 | 01:4830 quit@success 28 | 01:483e quit@failure 29 | 01:4846 quit@serial_dump 30 | 01:484c quit@normal 31 | 01:4866 quit@fast 32 | 01:4878 quit@halt 33 | 01:4879 quit@halt_execution_0 34 | 01:487b quit_dump_mem 35 | 01:488a quit_dump_mem@quit_inline_0 36 | 01:4893 quit_dump_mem@line 37 | 00:ff80 hram.memdump_len 38 | 00:ff81 hram.memdump 39 | 00:ff81 hram.memdump_l 40 | 00:ff82 hram.memdump_h 41 | 01:48b2 reset_screen 42 | 01:48d5 serial_send_byte 43 | 01:4000 font 44 | 00:0150 main 45 | 00:ff80 RAM_USAGE_SLOT_4_BANK_0_START 46 | 00:ff82 RAM_USAGE_SLOT_4_BANK_0_END 47 | 48 | [definitions] 49 | 0000000a _sizeof_clear_vram 50 | 0000000f _sizeof_disable_ppu_safe 51 | 00000006 _sizeof_is_ppu_broken 52 | 0000000a _sizeof_is_serial_broken 53 | 00000009 _sizeof_memcpy 54 | 00000009 _sizeof_memset 55 | 0000000c _sizeof_print_hex4 56 | 0000000a _sizeof_print_hex8 57 | 0000000c _sizeof_print_load_font 58 | 0000000b _sizeof_print_newline 59 | 0000008b _sizeof_quit 60 | 00000037 _sizeof_quit_dump_mem 61 | 00000001 _sizeof_hram.memdump_len 62 | 00000002 _sizeof_hram.memdump 63 | 00000001 _sizeof_hram.memdump_l 64 | 00000001 _sizeof_hram.memdump_h 65 | 00000014 _sizeof_reset_screen 66 | 0000000f _sizeof_serial_send_byte 67 | 000007f0 _sizeof_font 68 | 00000002 _sizeof_RAM_USAGE_SLOT_4_BANK_0_START 69 | -------------------------------------------------------------------------------- /default_rom/blarrg/mem_timing-2/source/common/macros.inc: -------------------------------------------------------------------------------- 1 | ; General macros 2 | 3 | ; Reads A from addr, from $FF00 to $FFFF 4 | ; Preserved: F, BC, DE, HL 5 | ; Time: 3 cycles 6 | .macro lda ; addr 7 | ldh a,(\1 - $FF00) 8 | .endm 9 | 10 | ; Writes A to addr, from $FF00 to $FFFF 11 | ; Preserved: AF, BC, DE, HL 12 | ; Time: 3 cycles 13 | .macro sta ; addr 14 | ldh (\1 - $FF00),a 15 | .endm 16 | 17 | ; Writes immediate data to addr, from $FF00 to $FFFF 18 | ; Preserved: F, BC, DE, HL 19 | ; Time: 5 cycles 20 | .macro wreg ARGS addr, data 21 | ld a,data 22 | sta addr 23 | .endm 24 | 25 | ; Writes byte to addr 26 | ; Preserved: F, BC, DE, HL 27 | ; Time: 6 cycles 28 | .macro setb ; addr, data 29 | ld a,\2 30 | ld (\1),a 31 | .endm 32 | 33 | ; Writes word to addr 34 | ; Preserved: F, BC, DE, HL 35 | ; Time: 12 cycles 36 | .macro setw ; addr, data 37 | ld a,<\2 38 | ld (\1),a 39 | ld a,>\2 40 | ld (\1+1),a 41 | .endm 42 | 43 | ; Calls routine multiple times, with A having the 44 | ; value 'start' the first time, 'start+step' the 45 | ; second time, up to 'end' for the last time. 46 | ; Preserved: BC, DE, HL 47 | .macro for_loop ; routine,start,end,step 48 | ld a,\2 49 | 50 | for_loop\@: 51 | push af 52 | call \1 53 | pop af 54 | 55 | add \4 56 | cp <(\3 + \4) 57 | jr nz,for_loop\@ 58 | .endm 59 | 60 | ; Calls routine n times. The value of A in the routine 61 | ; counts from 0 to n-1. 62 | ; Preserved: BC, DE, HL 63 | .macro loop_n_times ; routine,n 64 | for_loop \1,0,\2 - 1,+1 65 | .endm 66 | 67 | ; Same as for_loop, but counts with 16-bit value in BC. 68 | ; Preserved: DE, HL 69 | .macro for_loop16 ; routine,start,end,step 70 | ld bc,\2 71 | 72 | for_loop16\@: 73 | push bc 74 | call \1 75 | pop bc 76 | 77 | ld a,c 78 | add <\4 79 | ld c,a 80 | 81 | ld a,b 82 | adc >\4 83 | ld b,a 84 | 85 | cp >(\3+\4) 86 | jr nz,for_loop16\@ 87 | 88 | ld a,c 89 | cp <(\3+\4) 90 | jr nz,for_loop16\@ 91 | .endm 92 | -------------------------------------------------------------------------------- /default_rom/blarrg/mem_timing-2/source/common/gb.inc: -------------------------------------------------------------------------------- 1 | ; Game Boy hardware addresses 2 | 3 | ; $0000-$3FFF Fixed ROM bank 4 | ; $4000-$7FFF Switchable bank 5 | ; $8000-$9FFF VRAM 6 | ; $A000-$BFFF optional cartridge RAM 7 | ; $C000-$DFFF RAM 8 | ; $E000-$FDFF RAM mirror 9 | ; $FE00-$FE9F OAM 10 | ; $FEA0-$FEFF unused 11 | ; $FF00-$FF7F registers 12 | ; $FF80-$FFFE RAM 13 | ; $FFFF register 14 | 15 | ; Memory 16 | .define VRAM $8000 ; video memory 17 | .define TILES $8000 ; tile images 18 | .define BGMAP0 $9800 ; first 32x32 tilemap 19 | .define BGMAP1 $9C00 ; second 32x32 tilemap 20 | .define BRAM $A000 ; cart memory 21 | .define WRAM $C000 ; internal memory 22 | .define OAM $FE00 ; sprite memory 23 | .define HRAM $FF80 ; fast memory for LDH 24 | 25 | ; Registers 26 | 27 | .define RAMEN $0000 ; cartridge WRAM control 28 | .define BANK $2000 ; bank select 29 | .define P1 $FF00 ; controller 30 | 31 | ; Game link I/O 32 | .define SB $FF01 ; serial buffer 33 | .define SC $FF02 ; serial control 34 | 35 | ; Interrupts 36 | .define DIV $FF04 37 | .define TIMA $FF05 38 | .define TMA $FF06 39 | .define TAC $FF07 40 | .define IF $FF0F 41 | .define IE $FFFF 42 | 43 | ; LCD registers 44 | .define LCDC $FF40 ; control 45 | .define STAT $FF41 ; status 46 | .define SCY $FF42 ; scroll Y 47 | .define SCX $FF43 ; scroll X 48 | .define LY $FF44 ; current Y being rendered 49 | .define BGP $FF47 50 | 51 | .define KEY1 $FF4D ; for changing CPU speed 52 | .define VBK $FF4F 53 | 54 | ; Sound registers 55 | .define NR10 $FF10 56 | .define NR11 $FF11 57 | .define NR12 $FF12 58 | .define NR13 $FF13 59 | .define NR14 $FF14 60 | 61 | .define NR21 $FF16 62 | .define NR22 $FF17 63 | .define NR23 $FF18 64 | .define NR24 $FF19 65 | 66 | .define NR30 $FF1A 67 | .define NR31 $FF1B 68 | .define NR32 $FF1C 69 | .define NR33 $FF1D 70 | .define NR34 $FF1E 71 | 72 | .define NR41 $FF20 73 | .define NR42 $FF21 74 | .define NR43 $FF22 75 | .define NR44 $FF23 76 | 77 | .define NR50 $FF24 78 | .define NR51 $FF25 79 | .define NR52 $FF26 80 | 81 | .define WAVE $FF30 82 | -------------------------------------------------------------------------------- /default_rom/blarrg/cpu_instrs/source/common/checksums.s: -------------------------------------------------------------------------------- 1 | ; Multiple checksum table handling 2 | 3 | .define next_checksum bss+0 4 | .redefine bss bss+2 5 | 6 | ; If PRINT_CHECKSUMS is defined, checksums are printed 7 | ; rather than compared. 8 | 9 | ; Initializes multiple checksum handler to use checksums 10 | ; table (defined by user). 11 | ; Preserved: BC, DE, HL 12 | checksums_init: 13 | ld a,checksums 16 | ld (next_checksum+1),a 17 | ret 18 | 19 | ; Compares current checksum with next checksum in 20 | ; list. Z if they match, NZ if not. 21 | ; Preserved: BC, DE, HL 22 | checksums_compare: 23 | .ifdef PRINT_CHECKSUMS 24 | lda checksum+3 25 | push af 26 | lda checksum+2 27 | push af 28 | lda checksum+1 29 | push af 30 | lda checksum+0 31 | push af 32 | 33 | ld a,(next_checksum) 34 | inc a 35 | ld (next_checksum),a 36 | sub . 2 | ; wla symbolic information for "/home/runner/work/mooneye-test-suite/mooneye-test-suite/build/misc/boot_hwio-C.gb". 3 | 4 | [information] 5 | version 2 6 | 7 | [labels] 8 | 01:48e0 clear_vram 9 | 01:489f disable_ppu_safe 10 | 01:48a5 disable_ppu_safe@wait_ly_0 11 | 01:4910 is_ppu_broken 12 | 01:48ea is_serial_broken 13 | 01:48fe memcpy 14 | 01:4907 memset 15 | 01:48bd print_hex4 16 | 01:48f4 print_hex8 17 | 01:4916 print_inline_string 18 | 01:48c9 print_load_font 19 | 01:48d5 print_newline 20 | 01:488f print_string 21 | 01:4897 print_string@char 22 | 01:489a print_string@newline 23 | 01:47f0 quit 24 | 01:4806 quit@callback 25 | 01:480a quit@cb_return 26 | 01:4814 quit@wait_ly_1 27 | 01:481a quit@wait_ly_2 28 | 01:4820 quit@wait_ly_3 29 | 01:4826 quit@wait_ly_4 30 | 01:482c quit@report_result 31 | 01:4830 quit@success 32 | 01:483e quit@failure 33 | 01:4846 quit@serial_dump 34 | 01:484c quit@normal 35 | 01:4866 quit@fast 36 | 01:4878 quit@halt 37 | 01:4879 quit@halt_execution_0 38 | 01:487b reset_screen 39 | 01:48ae serial_send_byte 40 | 01:4000 font 41 | 00:0150 main 42 | 00:01ce main@quit_inline_1 43 | 00:01df mismatch 44 | 00:01f5 mismatch@quit_inline_2 45 | 00:0244 hwio_data 46 | 00:ff80 mismatch_addr 47 | 00:ff82 mismatch_data 48 | 00:ff83 mismatch_mem 49 | 00:ff80 RAM_USAGE_SLOT_4_BANK_0_START 50 | 00:ff83 RAM_USAGE_SLOT_4_BANK_0_END 51 | 52 | [definitions] 53 | 0000000a _sizeof_clear_vram 54 | 0000000f _sizeof_disable_ppu_safe 55 | 00000006 _sizeof_is_ppu_broken 56 | 0000000a _sizeof_is_serial_broken 57 | 00000009 _sizeof_memcpy 58 | 00000009 _sizeof_memset 59 | 0000000c _sizeof_print_hex4 60 | 0000000a _sizeof_print_hex8 61 | 00000006 _sizeof_print_inline_string 62 | 0000000c _sizeof_print_load_font 63 | 0000000b _sizeof_print_newline 64 | 00000010 _sizeof_print_string 65 | 0000008b _sizeof_quit 66 | 00000014 _sizeof_reset_screen 67 | 0000000f _sizeof_serial_send_byte 68 | 000007f0 _sizeof_font 69 | 00000002 _sizeof_mismatch_addr 70 | 00000001 _sizeof_mismatch_data 71 | 00000001 _sizeof_mismatch_mem 72 | 00000003 _sizeof_RAM_USAGE_SLOT_4_BANK_0_START 73 | 0000008f _sizeof_main 74 | 00000065 _sizeof_mismatch 75 | -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/boot_hwio-S.sym: -------------------------------------------------------------------------------- 1 | ; this file was created with wlalink by ville helin . 2 | ; wla symbolic information for "/home/runner/work/mooneye-test-suite/mooneye-test-suite/build/acceptance/boot_hwio-S.gb". 3 | 4 | [information] 5 | version 2 6 | 7 | [labels] 8 | 01:48e0 clear_vram 9 | 01:489f disable_ppu_safe 10 | 01:48a5 disable_ppu_safe@wait_ly_0 11 | 01:4910 is_ppu_broken 12 | 01:48ea is_serial_broken 13 | 01:48fe memcpy 14 | 01:4907 memset 15 | 01:48bd print_hex4 16 | 01:48f4 print_hex8 17 | 01:4916 print_inline_string 18 | 01:48c9 print_load_font 19 | 01:48d5 print_newline 20 | 01:488f print_string 21 | 01:4897 print_string@char 22 | 01:489a print_string@newline 23 | 01:47f0 quit 24 | 01:4806 quit@callback 25 | 01:480a quit@cb_return 26 | 01:4814 quit@wait_ly_1 27 | 01:481a quit@wait_ly_2 28 | 01:4820 quit@wait_ly_3 29 | 01:4826 quit@wait_ly_4 30 | 01:482c quit@report_result 31 | 01:4830 quit@success 32 | 01:483e quit@failure 33 | 01:4846 quit@serial_dump 34 | 01:484c quit@normal 35 | 01:4866 quit@fast 36 | 01:4878 quit@halt 37 | 01:4879 quit@halt_execution_0 38 | 01:487b reset_screen 39 | 01:48ae serial_send_byte 40 | 01:4000 font 41 | 00:0150 main 42 | 00:01d9 main@quit_inline_1 43 | 00:01ea mismatch 44 | 00:0200 mismatch@quit_inline_2 45 | 00:024f hwio_data 46 | 00:ff80 mismatch_addr 47 | 00:ff82 mismatch_data 48 | 00:ff83 mismatch_mem 49 | 00:ff80 RAM_USAGE_SLOT_4_BANK_0_START 50 | 00:ff83 RAM_USAGE_SLOT_4_BANK_0_END 51 | 52 | [definitions] 53 | 0000000a _sizeof_clear_vram 54 | 0000000f _sizeof_disable_ppu_safe 55 | 00000006 _sizeof_is_ppu_broken 56 | 0000000a _sizeof_is_serial_broken 57 | 00000009 _sizeof_memcpy 58 | 00000009 _sizeof_memset 59 | 0000000c _sizeof_print_hex4 60 | 0000000a _sizeof_print_hex8 61 | 00000006 _sizeof_print_inline_string 62 | 0000000c _sizeof_print_load_font 63 | 0000000b _sizeof_print_newline 64 | 00000010 _sizeof_print_string 65 | 0000008b _sizeof_quit 66 | 00000014 _sizeof_reset_screen 67 | 0000000f _sizeof_serial_send_byte 68 | 000007f0 _sizeof_font 69 | 00000002 _sizeof_mismatch_addr 70 | 00000001 _sizeof_mismatch_data 71 | 00000001 _sizeof_mismatch_mem 72 | 00000003 _sizeof_RAM_USAGE_SLOT_4_BANK_0_START 73 | 0000009a _sizeof_main 74 | 00000065 _sizeof_mismatch 75 | -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/boot_hwio-dmg0.sym: -------------------------------------------------------------------------------- 1 | ; this file was created with wlalink by ville helin . 2 | ; wla symbolic information for "/home/runner/work/mooneye-test-suite/mooneye-test-suite/build/acceptance/boot_hwio-dmg0.gb". 3 | 4 | [information] 5 | version 2 6 | 7 | [labels] 8 | 01:48e0 clear_vram 9 | 01:489f disable_ppu_safe 10 | 01:48a5 disable_ppu_safe@wait_ly_0 11 | 01:4910 is_ppu_broken 12 | 01:48ea is_serial_broken 13 | 01:48fe memcpy 14 | 01:4907 memset 15 | 01:48bd print_hex4 16 | 01:48f4 print_hex8 17 | 01:4916 print_inline_string 18 | 01:48c9 print_load_font 19 | 01:48d5 print_newline 20 | 01:488f print_string 21 | 01:4897 print_string@char 22 | 01:489a print_string@newline 23 | 01:47f0 quit 24 | 01:4806 quit@callback 25 | 01:480a quit@cb_return 26 | 01:4814 quit@wait_ly_1 27 | 01:481a quit@wait_ly_2 28 | 01:4820 quit@wait_ly_3 29 | 01:4826 quit@wait_ly_4 30 | 01:482c quit@report_result 31 | 01:4830 quit@success 32 | 01:483e quit@failure 33 | 01:4846 quit@serial_dump 34 | 01:484c quit@normal 35 | 01:4866 quit@fast 36 | 01:4878 quit@halt 37 | 01:4879 quit@halt_execution_0 38 | 01:487b reset_screen 39 | 01:48ae serial_send_byte 40 | 01:4000 font 41 | 00:0150 main 42 | 00:01d9 main@quit_inline_1 43 | 00:01ea mismatch 44 | 00:0200 mismatch@quit_inline_2 45 | 00:024f hwio_data 46 | 00:ff80 mismatch_addr 47 | 00:ff82 mismatch_data 48 | 00:ff83 mismatch_mem 49 | 00:ff80 RAM_USAGE_SLOT_4_BANK_0_START 50 | 00:ff83 RAM_USAGE_SLOT_4_BANK_0_END 51 | 52 | [definitions] 53 | 0000000a _sizeof_clear_vram 54 | 0000000f _sizeof_disable_ppu_safe 55 | 00000006 _sizeof_is_ppu_broken 56 | 0000000a _sizeof_is_serial_broken 57 | 00000009 _sizeof_memcpy 58 | 00000009 _sizeof_memset 59 | 0000000c _sizeof_print_hex4 60 | 0000000a _sizeof_print_hex8 61 | 00000006 _sizeof_print_inline_string 62 | 0000000c _sizeof_print_load_font 63 | 0000000b _sizeof_print_newline 64 | 00000010 _sizeof_print_string 65 | 0000008b _sizeof_quit 66 | 00000014 _sizeof_reset_screen 67 | 0000000f _sizeof_serial_send_byte 68 | 000007f0 _sizeof_font 69 | 00000002 _sizeof_mismatch_addr 70 | 00000001 _sizeof_mismatch_data 71 | 00000001 _sizeof_mismatch_mem 72 | 00000003 _sizeof_RAM_USAGE_SLOT_4_BANK_0_START 73 | 0000009a _sizeof_main 74 | 00000065 _sizeof_mismatch 75 | -------------------------------------------------------------------------------- /default_rom/blarrg/cpu_instrs/source/common/printing.s: -------------------------------------------------------------------------------- 1 | ; Main printing routine that checksums and 2 | ; prints to output device 3 | 4 | ; Character that does equivalent of print_newline 5 | .define newline 10 6 | 7 | ; Prints char without updating checksum 8 | ; Preserved: BC, DE, HL 9 | .define print_char_nocrc bss 10 | .redefine bss bss+3 11 | 12 | 13 | ; Initializes printing. HL = print routine 14 | init_printing: 15 | ld a,l 16 | ld (print_char_nocrc+1),a 17 | ld a,h 18 | ld (print_char_nocrc+2),a 19 | jr show_printing 20 | 21 | 22 | ; Hides/shows further printing 23 | ; Preserved: BC, DE, HL 24 | hide_printing: 25 | ld a,$C9 ; RET 26 | jr + 27 | show_printing: 28 | ld a,$C3 ; JP (nn) 29 | + ld (print_char_nocrc),a 30 | ret 31 | 32 | 33 | ; Prints character and updates checksum UNLESS 34 | ; it's a newline. 35 | ; Preserved: AF, BC, DE, HL 36 | print_char: 37 | push af 38 | cp newline 39 | call nz,update_crc 40 | call print_char_nocrc 41 | pop af 42 | ret 43 | 44 | 45 | ; Prints space. Does NOT update checksum. 46 | ; Preserved: AF, BC, DE, HL 47 | print_space: 48 | push af 49 | ld a,' ' 50 | call print_char_nocrc 51 | pop af 52 | ret 53 | 54 | 55 | ; Advances to next line. Does NOT update checksum. 56 | ; Preserved: AF, BC, DE, HL 57 | print_newline: 58 | push af 59 | ld a,newline 60 | call print_char_nocrc 61 | pop af 62 | ret 63 | 64 | 65 | ; Prints immediate string 66 | ; Preserved: AF, BC, DE, HL 67 | .macro print_str ; string,string2 68 | push hl 69 | call print_str_ 70 | .byte \1 71 | .if NARGS > 1 72 | .byte \2 73 | .endif 74 | .if NARGS > 2 75 | .byte \3 76 | .endif 77 | .byte 0 78 | pop hl 79 | .endm 80 | 81 | print_str_: 82 | pop hl 83 | call print_str_hl 84 | jp hl 85 | 86 | 87 | ; Prints zero-terminated string pointed to by HL. 88 | ; On return, HL points to byte AFTER zero terminator. 89 | ; Preserved: AF, BC, DE 90 | print_str_hl: 91 | push af 92 | jr + 93 | - call print_char 94 | + ldi a,(hl) 95 | or a 96 | jr nz,- 97 | pop af 98 | ret 99 | -------------------------------------------------------------------------------- /default_rom/blarrg/mem_timing/source/common/printing.s: -------------------------------------------------------------------------------- 1 | ; Main printing routine that checksums and 2 | ; prints to output device 3 | 4 | ; Character that does equivalent of print_newline 5 | .define newline 10 6 | 7 | ; Prints char without updating checksum 8 | ; Preserved: BC, DE, HL 9 | .define print_char_nocrc bss 10 | .redefine bss bss+3 11 | 12 | 13 | ; Initializes printing. HL = print routine 14 | init_printing: 15 | ld a,l 16 | ld (print_char_nocrc+1),a 17 | ld a,h 18 | ld (print_char_nocrc+2),a 19 | jr show_printing 20 | 21 | 22 | ; Hides/shows further printing 23 | ; Preserved: BC, DE, HL 24 | hide_printing: 25 | ld a,$C9 ; RET 26 | jr + 27 | show_printing: 28 | ld a,$C3 ; JP (nn) 29 | + ld (print_char_nocrc),a 30 | ret 31 | 32 | 33 | ; Prints character and updates checksum UNLESS 34 | ; it's a newline. 35 | ; Preserved: AF, BC, DE, HL 36 | print_char: 37 | push af 38 | cp newline 39 | call nz,update_crc 40 | call print_char_nocrc 41 | pop af 42 | ret 43 | 44 | 45 | ; Prints space. Does NOT update checksum. 46 | ; Preserved: AF, BC, DE, HL 47 | print_space: 48 | push af 49 | ld a,' ' 50 | call print_char_nocrc 51 | pop af 52 | ret 53 | 54 | 55 | ; Advances to next line. Does NOT update checksum. 56 | ; Preserved: AF, BC, DE, HL 57 | print_newline: 58 | push af 59 | ld a,newline 60 | call print_char_nocrc 61 | pop af 62 | ret 63 | 64 | 65 | ; Prints immediate string 66 | ; Preserved: AF, BC, DE, HL 67 | .macro print_str ; string,string2 68 | push hl 69 | call print_str_ 70 | .byte \1 71 | .if NARGS > 1 72 | .byte \2 73 | .endif 74 | .if NARGS > 2 75 | .byte \3 76 | .endif 77 | .byte 0 78 | pop hl 79 | .endm 80 | 81 | print_str_: 82 | pop hl 83 | call print_str_hl 84 | jp hl 85 | 86 | 87 | ; Prints zero-terminated string pointed to by HL. 88 | ; On return, HL points to byte AFTER zero terminator. 89 | ; Preserved: AF, BC, DE 90 | print_str_hl: 91 | push af 92 | jr + 93 | - call print_char 94 | + ldi a,(hl) 95 | or a 96 | jr nz,- 97 | pop af 98 | ret 99 | -------------------------------------------------------------------------------- /default_rom/blarrg/instr_timing/source/common/printing.s: -------------------------------------------------------------------------------- 1 | ; Main printing routine that checksums and 2 | ; prints to output device 3 | 4 | ; Character that does equivalent of print_newline 5 | .define newline 10 6 | 7 | ; Prints char without updating checksum 8 | ; Preserved: BC, DE, HL 9 | .define print_char_nocrc bss 10 | .redefine bss bss+3 11 | 12 | 13 | ; Initializes printing. HL = print routine 14 | init_printing: 15 | ld a,l 16 | ld (print_char_nocrc+1),a 17 | ld a,h 18 | ld (print_char_nocrc+2),a 19 | jr show_printing 20 | 21 | 22 | ; Hides/shows further printing 23 | ; Preserved: BC, DE, HL 24 | hide_printing: 25 | ld a,$C9 ; RET 26 | jr + 27 | show_printing: 28 | ld a,$C3 ; JP (nn) 29 | + ld (print_char_nocrc),a 30 | ret 31 | 32 | 33 | ; Prints character and updates checksum UNLESS 34 | ; it's a newline. 35 | ; Preserved: AF, BC, DE, HL 36 | print_char: 37 | push af 38 | cp newline 39 | call nz,update_crc 40 | call print_char_nocrc 41 | pop af 42 | ret 43 | 44 | 45 | ; Prints space. Does NOT update checksum. 46 | ; Preserved: AF, BC, DE, HL 47 | print_space: 48 | push af 49 | ld a,' ' 50 | call print_char_nocrc 51 | pop af 52 | ret 53 | 54 | 55 | ; Advances to next line. Does NOT update checksum. 56 | ; Preserved: AF, BC, DE, HL 57 | print_newline: 58 | push af 59 | ld a,newline 60 | call print_char_nocrc 61 | pop af 62 | ret 63 | 64 | 65 | ; Prints immediate string 66 | ; Preserved: AF, BC, DE, HL 67 | .macro print_str ; string,string2 68 | push hl 69 | call print_str_ 70 | .byte \1 71 | .if NARGS > 1 72 | .byte \2 73 | .endif 74 | .if NARGS > 2 75 | .byte \3 76 | .endif 77 | .byte 0 78 | pop hl 79 | .endm 80 | 81 | print_str_: 82 | pop hl 83 | call print_str_hl 84 | jp hl 85 | 86 | 87 | ; Prints zero-terminated string pointed to by HL. 88 | ; On return, HL points to byte AFTER zero terminator. 89 | ; Preserved: AF, BC, DE 90 | print_str_hl: 91 | push af 92 | jr + 93 | - call print_char 94 | + ldi a,(hl) 95 | or a 96 | jr nz,- 97 | pop af 98 | ret 99 | -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/boot_hwio-dmgABCmgb.sym: -------------------------------------------------------------------------------- 1 | ; this file was created with wlalink by ville helin . 2 | ; wla symbolic information for "/home/runner/work/mooneye-test-suite/mooneye-test-suite/build/acceptance/boot_hwio-dmgABCmgb.gb". 3 | 4 | [information] 5 | version 2 6 | 7 | [labels] 8 | 01:48e0 clear_vram 9 | 01:489f disable_ppu_safe 10 | 01:48a5 disable_ppu_safe@wait_ly_0 11 | 01:4910 is_ppu_broken 12 | 01:48ea is_serial_broken 13 | 01:48fe memcpy 14 | 01:4907 memset 15 | 01:48bd print_hex4 16 | 01:48f4 print_hex8 17 | 01:4916 print_inline_string 18 | 01:48c9 print_load_font 19 | 01:48d5 print_newline 20 | 01:488f print_string 21 | 01:4897 print_string@char 22 | 01:489a print_string@newline 23 | 01:47f0 quit 24 | 01:4806 quit@callback 25 | 01:480a quit@cb_return 26 | 01:4814 quit@wait_ly_1 27 | 01:481a quit@wait_ly_2 28 | 01:4820 quit@wait_ly_3 29 | 01:4826 quit@wait_ly_4 30 | 01:482c quit@report_result 31 | 01:4830 quit@success 32 | 01:483e quit@failure 33 | 01:4846 quit@serial_dump 34 | 01:484c quit@normal 35 | 01:4866 quit@fast 36 | 01:4878 quit@halt 37 | 01:4879 quit@halt_execution_0 38 | 01:487b reset_screen 39 | 01:48ae serial_send_byte 40 | 01:4000 font 41 | 00:0150 main 42 | 00:01d9 main@quit_inline_1 43 | 00:01ea mismatch 44 | 00:0200 mismatch@quit_inline_2 45 | 00:024f hwio_data 46 | 00:ff80 mismatch_addr 47 | 00:ff82 mismatch_data 48 | 00:ff83 mismatch_mem 49 | 00:ff80 RAM_USAGE_SLOT_4_BANK_0_START 50 | 00:ff83 RAM_USAGE_SLOT_4_BANK_0_END 51 | 52 | [definitions] 53 | 0000000a _sizeof_clear_vram 54 | 0000000f _sizeof_disable_ppu_safe 55 | 00000006 _sizeof_is_ppu_broken 56 | 0000000a _sizeof_is_serial_broken 57 | 00000009 _sizeof_memcpy 58 | 00000009 _sizeof_memset 59 | 0000000c _sizeof_print_hex4 60 | 0000000a _sizeof_print_hex8 61 | 00000006 _sizeof_print_inline_string 62 | 0000000c _sizeof_print_load_font 63 | 0000000b _sizeof_print_newline 64 | 00000010 _sizeof_print_string 65 | 0000008b _sizeof_quit 66 | 00000014 _sizeof_reset_screen 67 | 0000000f _sizeof_serial_send_byte 68 | 000007f0 _sizeof_font 69 | 00000002 _sizeof_mismatch_addr 70 | 00000001 _sizeof_mismatch_data 71 | 00000001 _sizeof_mismatch_mem 72 | 00000003 _sizeof_RAM_USAGE_SLOT_4_BANK_0_START 73 | 0000009a _sizeof_main 74 | 00000065 _sizeof_mismatch 75 | -------------------------------------------------------------------------------- /default_rom/blarrg/cpu_instrs/source/04-op r,imm.s: -------------------------------------------------------------------------------- 1 | ; Tests immediate instructions 2 | 3 | ;.define PRINT_CHECKSUMS 1 4 | .include "shell.inc" 5 | .include "instr_test.s" 6 | 7 | instrs: 8 | .byte $36,0,0 ; LD (HL),$00 9 | .byte $06,0,0 ; LD B,$00 10 | .byte $0E,0,0 ; LD C,$00 11 | .byte $16,0,0 ; LD D,$00 12 | .byte $1E,0,0 ; LD E,$00 13 | .byte $26,0,0 ; LD H,$00 14 | .byte $2E,0,0 ; LD L,$00 15 | .byte $3E,0,0 ; LD A,$00 16 | .byte $F6,0,0 ; OR $00 17 | .byte $FE,0,0 ; CP $00 18 | .byte $C6,0,0 ; ADD $00 19 | .byte $CE,0,0 ; ADC $00 20 | .byte $D6,0,0 ; SUB $00 21 | .byte $DE,0,0 ; SBC $00 22 | .byte $E6,0,0 ; AND $00 23 | .byte $EE,0,0 ; XOR $00 24 | instrs_end: 25 | 26 | test_instr: 27 | ld c,$00 28 | call test 29 | ld c,$10 30 | call test 31 | ld c,$E0 32 | call test 33 | ld c,$F0 34 | call test 35 | ret 36 | 37 | test: 38 | ; Go through each value for A 39 | ld hl,values 40 | a_loop: 41 | ld b,(hl) 42 | push hl 43 | 44 | ; Go through each value for immediate data 45 | ld hl,values 46 | values_loop: 47 | push bc 48 | push hl 49 | 50 | ; Set registers 51 | push bc 52 | ld a,(hl) 53 | ld (instr+1),a 54 | ld bc,$1234 55 | ld de,$5678 56 | ld hl,rp_temp 57 | pop af 58 | 59 | ; call print_regs 60 | jp instr 61 | instr_done: 62 | 63 | ; Checksum registers and (hl) 64 | call checksum_af_bc_de_hl 65 | ld a,(rp_temp) 66 | call update_crc_fast 67 | 68 | pop hl 69 | pop bc 70 | inc hl 71 | ld a,l 72 | cp . 2 | ; wla symbolic information for "/home/runner/work/mooneye-test-suite/mooneye-test-suite/build/acceptance/ret_timing.gb". 3 | 4 | [information] 5 | version 2 6 | 7 | [labels] 8 | 01:48d4 clear_vram 9 | 01:489f disable_ppu_safe 10 | 01:48a5 disable_ppu_safe@wait_ly_0 11 | 01:48fa is_ppu_broken 12 | 01:48de is_serial_broken 13 | 01:48e8 memcpy 14 | 01:48f1 memset 15 | 01:4900 print_inline_string 16 | 01:48bd print_load_font 17 | 01:48c9 print_newline 18 | 01:488f print_string 19 | 01:4897 print_string@char 20 | 01:489a print_string@newline 21 | 01:47f0 quit 22 | 01:4806 quit@callback 23 | 01:480a quit@cb_return 24 | 01:4814 quit@wait_ly_1 25 | 01:481a quit@wait_ly_2 26 | 01:4820 quit@wait_ly_3 27 | 01:4826 quit@wait_ly_4 28 | 01:482c quit@report_result 29 | 01:4830 quit@success 30 | 01:483e quit@failure 31 | 01:4846 quit@serial_dump 32 | 01:484c quit@normal 33 | 01:4866 quit@fast 34 | 01:4878 quit@halt 35 | 01:4879 quit@halt_execution_0 36 | 01:487b reset_screen 37 | 01:48ae serial_send_byte 38 | 01:4000 font 39 | 00:0150 main 40 | 00:015c test_round1 41 | 00:015c test_round1@wait_ly_5 42 | 00:0162 test_round1@wait_ly_6 43 | 00:017c test_round1@wait_ly_7 44 | 00:0182 test_round1@wait_ly_8 45 | 00:0193 finish_round1 46 | 00:019d finish_round1@quit_inline_1 47 | 00:01b4 test_round2 48 | 00:01b4 test_round2@wait_ly_9 49 | 00:01ba test_round2@wait_ly_10 50 | 00:01ce test_round2@wait_ly_11 51 | 00:01d4 test_round2@wait_ly_12 52 | 00:01e6 finish_round2 53 | 00:01f0 finish_round2@quit_inline_2 54 | 00:0207 test_success 55 | 00:020e test_success@quit_inline_3 56 | 00:021f hiram_cb 57 | 58 | [definitions] 59 | 0000000a _sizeof_clear_vram 60 | 0000000f _sizeof_disable_ppu_safe 61 | 00000006 _sizeof_is_ppu_broken 62 | 0000000a _sizeof_is_serial_broken 63 | 00000009 _sizeof_memcpy 64 | 00000009 _sizeof_memset 65 | 00000006 _sizeof_print_inline_string 66 | 0000000c _sizeof_print_load_font 67 | 0000000b _sizeof_print_newline 68 | 00000010 _sizeof_print_string 69 | 0000008b _sizeof_quit 70 | 00000014 _sizeof_reset_screen 71 | 0000000f _sizeof_serial_send_byte 72 | 000007f0 _sizeof_font 73 | 0000000c _sizeof_main 74 | 00000037 _sizeof_test_round1 75 | 00000021 _sizeof_finish_round1 76 | 00000032 _sizeof_test_round2 77 | 00000021 _sizeof_finish_round2 78 | 00000018 _sizeof_test_success 79 | -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/reti_timing.sym: -------------------------------------------------------------------------------- 1 | ; this file was created with wlalink by ville helin . 2 | ; wla symbolic information for "/home/runner/work/mooneye-test-suite/mooneye-test-suite/build/acceptance/reti_timing.gb". 3 | 4 | [information] 5 | version 2 6 | 7 | [labels] 8 | 01:48d4 clear_vram 9 | 01:489f disable_ppu_safe 10 | 01:48a5 disable_ppu_safe@wait_ly_0 11 | 01:48fa is_ppu_broken 12 | 01:48de is_serial_broken 13 | 01:48e8 memcpy 14 | 01:48f1 memset 15 | 01:4900 print_inline_string 16 | 01:48bd print_load_font 17 | 01:48c9 print_newline 18 | 01:488f print_string 19 | 01:4897 print_string@char 20 | 01:489a print_string@newline 21 | 01:47f0 quit 22 | 01:4806 quit@callback 23 | 01:480a quit@cb_return 24 | 01:4814 quit@wait_ly_1 25 | 01:481a quit@wait_ly_2 26 | 01:4820 quit@wait_ly_3 27 | 01:4826 quit@wait_ly_4 28 | 01:482c quit@report_result 29 | 01:4830 quit@success 30 | 01:483e quit@failure 31 | 01:4846 quit@serial_dump 32 | 01:484c quit@normal 33 | 01:4866 quit@fast 34 | 01:4878 quit@halt 35 | 01:4879 quit@halt_execution_0 36 | 01:487b reset_screen 37 | 01:48ae serial_send_byte 38 | 01:4000 font 39 | 00:0150 main 40 | 00:015c test_round1 41 | 00:015c test_round1@wait_ly_5 42 | 00:0162 test_round1@wait_ly_6 43 | 00:017c test_round1@wait_ly_7 44 | 00:0182 test_round1@wait_ly_8 45 | 00:0193 finish_round1 46 | 00:019d finish_round1@quit_inline_1 47 | 00:01b4 test_round2 48 | 00:01b4 test_round2@wait_ly_9 49 | 00:01ba test_round2@wait_ly_10 50 | 00:01ce test_round2@wait_ly_11 51 | 00:01d4 test_round2@wait_ly_12 52 | 00:01e6 finish_round2 53 | 00:01f0 finish_round2@quit_inline_2 54 | 00:0207 test_success 55 | 00:020e test_success@quit_inline_3 56 | 00:021f hiram_cb 57 | 58 | [definitions] 59 | 0000000a _sizeof_clear_vram 60 | 0000000f _sizeof_disable_ppu_safe 61 | 00000006 _sizeof_is_ppu_broken 62 | 0000000a _sizeof_is_serial_broken 63 | 00000009 _sizeof_memcpy 64 | 00000009 _sizeof_memset 65 | 00000006 _sizeof_print_inline_string 66 | 0000000c _sizeof_print_load_font 67 | 0000000b _sizeof_print_newline 68 | 00000010 _sizeof_print_string 69 | 0000008b _sizeof_quit 70 | 00000014 _sizeof_reset_screen 71 | 0000000f _sizeof_serial_send_byte 72 | 000007f0 _sizeof_font 73 | 0000000c _sizeof_main 74 | 00000037 _sizeof_test_round1 75 | 00000021 _sizeof_finish_round1 76 | 00000032 _sizeof_test_round2 77 | 00000021 _sizeof_finish_round2 78 | 00000018 _sizeof_test_success 79 | -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/ret_cc_timing.sym: -------------------------------------------------------------------------------- 1 | ; this file was created with wlalink by ville helin . 2 | ; wla symbolic information for "/home/runner/work/mooneye-test-suite/mooneye-test-suite/build/acceptance/ret_cc_timing.gb". 3 | 4 | [information] 5 | version 2 6 | 7 | [labels] 8 | 01:48d4 clear_vram 9 | 01:489f disable_ppu_safe 10 | 01:48a5 disable_ppu_safe@wait_ly_0 11 | 01:48fa is_ppu_broken 12 | 01:48de is_serial_broken 13 | 01:48e8 memcpy 14 | 01:48f1 memset 15 | 01:4900 print_inline_string 16 | 01:48bd print_load_font 17 | 01:48c9 print_newline 18 | 01:488f print_string 19 | 01:4897 print_string@char 20 | 01:489a print_string@newline 21 | 01:47f0 quit 22 | 01:4806 quit@callback 23 | 01:480a quit@cb_return 24 | 01:4814 quit@wait_ly_1 25 | 01:481a quit@wait_ly_2 26 | 01:4820 quit@wait_ly_3 27 | 01:4826 quit@wait_ly_4 28 | 01:482c quit@report_result 29 | 01:4830 quit@success 30 | 01:483e quit@failure 31 | 01:4846 quit@serial_dump 32 | 01:484c quit@normal 33 | 01:4866 quit@fast 34 | 01:4878 quit@halt 35 | 01:4879 quit@halt_execution_0 36 | 01:487b reset_screen 37 | 01:48ae serial_send_byte 38 | 01:4000 font 39 | 00:0150 main 40 | 00:015c test_round1 41 | 00:015c test_round1@wait_ly_5 42 | 00:0162 test_round1@wait_ly_6 43 | 00:017c test_round1@wait_ly_7 44 | 00:0182 test_round1@wait_ly_8 45 | 00:0192 finish_round1 46 | 00:019c finish_round1@quit_inline_1 47 | 00:01b3 test_round2 48 | 00:01b3 test_round2@wait_ly_9 49 | 00:01b9 test_round2@wait_ly_10 50 | 00:01cd test_round2@wait_ly_11 51 | 00:01d3 test_round2@wait_ly_12 52 | 00:01e4 finish_round2 53 | 00:01ee finish_round2@quit_inline_2 54 | 00:0205 test_success 55 | 00:020c test_success@quit_inline_3 56 | 00:021d hiram_cb 57 | 58 | [definitions] 59 | 0000000a _sizeof_clear_vram 60 | 0000000f _sizeof_disable_ppu_safe 61 | 00000006 _sizeof_is_ppu_broken 62 | 0000000a _sizeof_is_serial_broken 63 | 00000009 _sizeof_memcpy 64 | 00000009 _sizeof_memset 65 | 00000006 _sizeof_print_inline_string 66 | 0000000c _sizeof_print_load_font 67 | 0000000b _sizeof_print_newline 68 | 00000010 _sizeof_print_string 69 | 0000008b _sizeof_quit 70 | 00000014 _sizeof_reset_screen 71 | 0000000f _sizeof_serial_send_byte 72 | 000007f0 _sizeof_font 73 | 0000000c _sizeof_main 74 | 00000036 _sizeof_test_round1 75 | 00000021 _sizeof_finish_round1 76 | 00000031 _sizeof_test_round2 77 | 00000021 _sizeof_finish_round2 78 | 00000018 _sizeof_test_success 79 | -------------------------------------------------------------------------------- /default_rom/blarrg/cpu_instrs/source/common/instr_test.s: -------------------------------------------------------------------------------- 1 | ; Framework for CPU instruction tests 2 | 3 | ; Calls test_instr with each instruction copied 4 | ; to instr, with a JP instr_done after it. 5 | ; Verifies checksum after testing instruction and 6 | ; prints opcode if it's wrong. 7 | 8 | .include "checksums.s" 9 | .include "cpu_speed.s" 10 | .include "apu.s" 11 | .include "crc_fast.s" 12 | 13 | .define instr $DEF8 14 | .define rp_temp (instr-4) 15 | 16 | .define temp bss 17 | 18 | ; Sets SP to word at addr 19 | ; Preserved: BC, DE 20 | .macro ldsp ; addr 21 | ld a,(\1) 22 | ld l,a 23 | ld a,((\1)+1) 24 | ld h,a 25 | ld sp,hl 26 | .endm 27 | 28 | main: 29 | call cpu_fast 30 | call init_crc_fast 31 | call checksums_init 32 | set_test 0 33 | 34 | ld hl,instrs 35 | - ; Copy instruction 36 | ld a,(hl+) 37 | ld (instr),a 38 | ld a,(hl+) 39 | ld (instr+1),a 40 | ld a,(hl+) 41 | ld (instr+2),a 42 | push hl 43 | 44 | ; Put JP instr_done after it 45 | ld a,$C3 46 | ld (instr+3),a 47 | ld a,instr_done 50 | ld (instr+5),a 51 | 52 | call reset_crc 53 | call test_instr 54 | 55 | call checksums_compare 56 | jr z,passed 57 | 58 | set_test 1 59 | ld a,(instr) 60 | call print_a 61 | cp $CB 62 | jr nz,+ 63 | ld a,(instr+1) 64 | call print_a 65 | + 66 | 67 | passed: 68 | ; Next instruction 69 | pop hl 70 | ld a,l 71 | cp instrs_end 75 | jr nz,- 76 | 77 | jp tests_done 78 | 79 | 80 | ; Updates checksum with AF, BC, DE, and HL 81 | checksum_af_bc_de_hl: 82 | push hl 83 | 84 | push af 85 | update_crc_fast 86 | pop hl 87 | ld a,l 88 | update_crc_fast 89 | 90 | ld a,b 91 | update_crc_fast 92 | ld a,c 93 | update_crc_fast 94 | 95 | ld a,d 96 | update_crc_fast 97 | ld a,e 98 | update_crc_fast 99 | 100 | pop de 101 | ld a,d 102 | update_crc_fast 103 | ld a,e 104 | update_crc_fast 105 | ret 106 | -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/call_timing.sym: -------------------------------------------------------------------------------- 1 | ; this file was created with wlalink by ville helin . 2 | ; wla symbolic information for "/home/runner/work/mooneye-test-suite/mooneye-test-suite/build/acceptance/call_timing.gb". 3 | 4 | [information] 5 | version 2 6 | 7 | [labels] 8 | 01:48d4 clear_vram 9 | 01:489f disable_ppu_safe 10 | 01:48a5 disable_ppu_safe@wait_ly_0 11 | 01:48fa is_ppu_broken 12 | 01:48de is_serial_broken 13 | 01:48e8 memcpy 14 | 01:48f1 memset 15 | 01:4900 print_inline_string 16 | 01:48bd print_load_font 17 | 01:48c9 print_newline 18 | 01:488f print_string 19 | 01:4897 print_string@char 20 | 01:489a print_string@newline 21 | 01:47f0 quit 22 | 01:4806 quit@callback 23 | 01:480a quit@cb_return 24 | 01:4814 quit@wait_ly_1 25 | 01:481a quit@wait_ly_2 26 | 01:4820 quit@wait_ly_3 27 | 01:4826 quit@wait_ly_4 28 | 01:482c quit@report_result 29 | 01:4830 quit@success 30 | 01:483e quit@failure 31 | 01:4846 quit@serial_dump 32 | 01:484c quit@normal 33 | 01:4866 quit@fast 34 | 01:4878 quit@halt 35 | 01:4879 quit@halt_execution_0 36 | 01:487b reset_screen 37 | 01:48ae serial_send_byte 38 | 01:4000 font 39 | 00:0150 main 40 | 00:0151 main@wait_ly_5 41 | 00:0157 main@wait_ly_6 42 | 00:0184 test_finish 43 | 00:018b test_finish@quit_inline_1 44 | 00:019c wram_test 45 | 00:019f fail_round1 46 | 00:01a6 fail_round1@quit_inline_2 47 | 00:01bd fail_round2 48 | 00:01c4 fail_round2@quit_inline_3 49 | 00:1f80 hiram_test 50 | 00:1f87 hiram_test@wait_ly_7 51 | 00:1f8d hiram_test@wait_ly_8 52 | 00:1fa1 test_round2 53 | 00:1fa8 test_round2@wait_ly_9 54 | 00:1fae test_round2@wait_ly_10 55 | 00:1fca finish_round1 56 | 00:1ada finish_round2 57 | 58 | [definitions] 59 | 0000000a _sizeof_clear_vram 60 | 0000000f _sizeof_disable_ppu_safe 61 | 00000006 _sizeof_is_ppu_broken 62 | 0000000a _sizeof_is_serial_broken 63 | 00000009 _sizeof_memcpy 64 | 00000009 _sizeof_memset 65 | 00000006 _sizeof_print_inline_string 66 | 0000000c _sizeof_print_load_font 67 | 0000000b _sizeof_print_newline 68 | 00000010 _sizeof_print_string 69 | 0000008b _sizeof_quit 70 | 00000014 _sizeof_reset_screen 71 | 0000000f _sizeof_serial_send_byte 72 | 000007f0 _sizeof_font 73 | 00000034 _sizeof_main 74 | 00000018 _sizeof_test_finish 75 | 00000003 _sizeof_wram_test 76 | 0000001e _sizeof_fail_round1 77 | 0000191d _sizeof_fail_round2 78 | 000004a6 _sizeof_finish_round2 79 | 00000021 _sizeof_hiram_test 80 | 00000029 _sizeof_test_round2 81 | -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/jp_timing.sym: -------------------------------------------------------------------------------- 1 | ; this file was created with wlalink by ville helin . 2 | ; wla symbolic information for "/home/runner/work/mooneye-test-suite/mooneye-test-suite/build/acceptance/jp_timing.gb". 3 | 4 | [information] 5 | version 2 6 | 7 | [labels] 8 | 01:48d4 clear_vram 9 | 01:489f disable_ppu_safe 10 | 01:48a5 disable_ppu_safe@wait_ly_0 11 | 01:48fa is_ppu_broken 12 | 01:48de is_serial_broken 13 | 01:48e8 memcpy 14 | 01:48f1 memset 15 | 01:4900 print_inline_string 16 | 01:48bd print_load_font 17 | 01:48c9 print_newline 18 | 01:488f print_string 19 | 01:4897 print_string@char 20 | 01:489a print_string@newline 21 | 01:47f0 quit 22 | 01:4806 quit@callback 23 | 01:480a quit@cb_return 24 | 01:4814 quit@wait_ly_1 25 | 01:481a quit@wait_ly_2 26 | 01:4820 quit@wait_ly_3 27 | 01:4826 quit@wait_ly_4 28 | 01:482c quit@report_result 29 | 01:4830 quit@success 30 | 01:483e quit@failure 31 | 01:4846 quit@serial_dump 32 | 01:484c quit@normal 33 | 01:4866 quit@fast 34 | 01:4878 quit@halt 35 | 01:4879 quit@halt_execution_0 36 | 01:487b reset_screen 37 | 01:48ae serial_send_byte 38 | 01:4000 font 39 | 00:0150 main 40 | 00:0151 main@wait_ly_5 41 | 00:0157 main@wait_ly_6 42 | 00:0184 test_finish 43 | 00:018b test_finish@quit_inline_1 44 | 00:019c wram_test 45 | 00:019f fail_round1 46 | 00:01a6 fail_round1@quit_inline_2 47 | 00:01bd fail_round2 48 | 00:01c4 fail_round2@quit_inline_3 49 | 00:1f80 hiram_test 50 | 00:1f87 hiram_test@wait_ly_7 51 | 00:1f8d hiram_test@wait_ly_8 52 | 00:1fa1 test_round2 53 | 00:1fa8 test_round2@wait_ly_9 54 | 00:1fae test_round2@wait_ly_10 55 | 00:1fca finish_round1 56 | 00:1ada finish_round2 57 | 58 | [definitions] 59 | 0000000a _sizeof_clear_vram 60 | 0000000f _sizeof_disable_ppu_safe 61 | 00000006 _sizeof_is_ppu_broken 62 | 0000000a _sizeof_is_serial_broken 63 | 00000009 _sizeof_memcpy 64 | 00000009 _sizeof_memset 65 | 00000006 _sizeof_print_inline_string 66 | 0000000c _sizeof_print_load_font 67 | 0000000b _sizeof_print_newline 68 | 00000010 _sizeof_print_string 69 | 0000008b _sizeof_quit 70 | 00000014 _sizeof_reset_screen 71 | 0000000f _sizeof_serial_send_byte 72 | 000007f0 _sizeof_font 73 | 00000034 _sizeof_main 74 | 00000018 _sizeof_test_finish 75 | 00000003 _sizeof_wram_test 76 | 0000001e _sizeof_fail_round1 77 | 0000191d _sizeof_fail_round2 78 | 000004a6 _sizeof_finish_round2 79 | 00000021 _sizeof_hiram_test 80 | 00000029 _sizeof_test_round2 81 | -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/jp_cc_timing.sym: -------------------------------------------------------------------------------- 1 | ; this file was created with wlalink by ville helin . 2 | ; wla symbolic information for "/home/runner/work/mooneye-test-suite/mooneye-test-suite/build/acceptance/jp_cc_timing.gb". 3 | 4 | [information] 5 | version 2 6 | 7 | [labels] 8 | 01:48d4 clear_vram 9 | 01:489f disable_ppu_safe 10 | 01:48a5 disable_ppu_safe@wait_ly_0 11 | 01:48fa is_ppu_broken 12 | 01:48de is_serial_broken 13 | 01:48e8 memcpy 14 | 01:48f1 memset 15 | 01:4900 print_inline_string 16 | 01:48bd print_load_font 17 | 01:48c9 print_newline 18 | 01:488f print_string 19 | 01:4897 print_string@char 20 | 01:489a print_string@newline 21 | 01:47f0 quit 22 | 01:4806 quit@callback 23 | 01:480a quit@cb_return 24 | 01:4814 quit@wait_ly_1 25 | 01:481a quit@wait_ly_2 26 | 01:4820 quit@wait_ly_3 27 | 01:4826 quit@wait_ly_4 28 | 01:482c quit@report_result 29 | 01:4830 quit@success 30 | 01:483e quit@failure 31 | 01:4846 quit@serial_dump 32 | 01:484c quit@normal 33 | 01:4866 quit@fast 34 | 01:4878 quit@halt 35 | 01:4879 quit@halt_execution_0 36 | 01:487b reset_screen 37 | 01:48ae serial_send_byte 38 | 01:4000 font 39 | 00:0150 main 40 | 00:0151 main@wait_ly_5 41 | 00:0157 main@wait_ly_6 42 | 00:0184 test_finish 43 | 00:018b test_finish@quit_inline_1 44 | 00:019c wram_test 45 | 00:019f fail_round1 46 | 00:01a6 fail_round1@quit_inline_2 47 | 00:01bd fail_round2 48 | 00:01c4 fail_round2@quit_inline_3 49 | 00:1f80 hiram_test 50 | 00:1f87 hiram_test@wait_ly_7 51 | 00:1f8d hiram_test@wait_ly_8 52 | 00:1fa1 test_round2 53 | 00:1fa8 test_round2@wait_ly_9 54 | 00:1fae test_round2@wait_ly_10 55 | 00:1fca finish_round1 56 | 00:1ada finish_round2 57 | 58 | [definitions] 59 | 0000000a _sizeof_clear_vram 60 | 0000000f _sizeof_disable_ppu_safe 61 | 00000006 _sizeof_is_ppu_broken 62 | 0000000a _sizeof_is_serial_broken 63 | 00000009 _sizeof_memcpy 64 | 00000009 _sizeof_memset 65 | 00000006 _sizeof_print_inline_string 66 | 0000000c _sizeof_print_load_font 67 | 0000000b _sizeof_print_newline 68 | 00000010 _sizeof_print_string 69 | 0000008b _sizeof_quit 70 | 00000014 _sizeof_reset_screen 71 | 0000000f _sizeof_serial_send_byte 72 | 000007f0 _sizeof_font 73 | 00000034 _sizeof_main 74 | 00000018 _sizeof_test_finish 75 | 00000003 _sizeof_wram_test 76 | 0000001e _sizeof_fail_round1 77 | 0000191d _sizeof_fail_round2 78 | 000004a6 _sizeof_finish_round2 79 | 00000021 _sizeof_hiram_test 80 | 00000029 _sizeof_test_round2 81 | -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/call_cc_timing.sym: -------------------------------------------------------------------------------- 1 | ; this file was created with wlalink by ville helin . 2 | ; wla symbolic information for "/home/runner/work/mooneye-test-suite/mooneye-test-suite/build/acceptance/call_cc_timing.gb". 3 | 4 | [information] 5 | version 2 6 | 7 | [labels] 8 | 01:48d4 clear_vram 9 | 01:489f disable_ppu_safe 10 | 01:48a5 disable_ppu_safe@wait_ly_0 11 | 01:48fa is_ppu_broken 12 | 01:48de is_serial_broken 13 | 01:48e8 memcpy 14 | 01:48f1 memset 15 | 01:4900 print_inline_string 16 | 01:48bd print_load_font 17 | 01:48c9 print_newline 18 | 01:488f print_string 19 | 01:4897 print_string@char 20 | 01:489a print_string@newline 21 | 01:47f0 quit 22 | 01:4806 quit@callback 23 | 01:480a quit@cb_return 24 | 01:4814 quit@wait_ly_1 25 | 01:481a quit@wait_ly_2 26 | 01:4820 quit@wait_ly_3 27 | 01:4826 quit@wait_ly_4 28 | 01:482c quit@report_result 29 | 01:4830 quit@success 30 | 01:483e quit@failure 31 | 01:4846 quit@serial_dump 32 | 01:484c quit@normal 33 | 01:4866 quit@fast 34 | 01:4878 quit@halt 35 | 01:4879 quit@halt_execution_0 36 | 01:487b reset_screen 37 | 01:48ae serial_send_byte 38 | 01:4000 font 39 | 00:0150 main 40 | 00:0151 main@wait_ly_5 41 | 00:0157 main@wait_ly_6 42 | 00:0184 test_finish 43 | 00:018b test_finish@quit_inline_1 44 | 00:019c wram_test 45 | 00:019f fail_round1 46 | 00:01a6 fail_round1@quit_inline_2 47 | 00:01bd fail_round2 48 | 00:01c4 fail_round2@quit_inline_3 49 | 00:1f80 hiram_test 50 | 00:1f87 hiram_test@wait_ly_7 51 | 00:1f8d hiram_test@wait_ly_8 52 | 00:1fa1 test_round2 53 | 00:1fa8 test_round2@wait_ly_9 54 | 00:1fae test_round2@wait_ly_10 55 | 00:1fca finish_round1 56 | 00:1ada finish_round2 57 | 58 | [definitions] 59 | 0000000a _sizeof_clear_vram 60 | 0000000f _sizeof_disable_ppu_safe 61 | 00000006 _sizeof_is_ppu_broken 62 | 0000000a _sizeof_is_serial_broken 63 | 00000009 _sizeof_memcpy 64 | 00000009 _sizeof_memset 65 | 00000006 _sizeof_print_inline_string 66 | 0000000c _sizeof_print_load_font 67 | 0000000b _sizeof_print_newline 68 | 00000010 _sizeof_print_string 69 | 0000008b _sizeof_quit 70 | 00000014 _sizeof_reset_screen 71 | 0000000f _sizeof_serial_send_byte 72 | 000007f0 _sizeof_font 73 | 00000034 _sizeof_main 74 | 00000018 _sizeof_test_finish 75 | 00000003 _sizeof_wram_test 76 | 0000001e _sizeof_fail_round1 77 | 0000191d _sizeof_fail_round2 78 | 000004a6 _sizeof_finish_round2 79 | 00000021 _sizeof_hiram_test 80 | 00000029 _sizeof_test_round2 81 | -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/oam_dma/basic.sym: -------------------------------------------------------------------------------- 1 | ; this file was created with wlalink by ville helin . 2 | ; wla symbolic information for "/home/runner/work/mooneye-test-suite/mooneye-test-suite/build/acceptance/oam_dma/basic.gb". 3 | 4 | [information] 5 | version 2 6 | 7 | [labels] 8 | 01:48ee clear_oam 9 | 01:48f8 clear_vram 10 | 01:489f disable_ppu_safe 11 | 01:48a5 disable_ppu_safe@wait_ly_0 12 | 01:4928 is_ppu_broken 13 | 01:4902 is_serial_broken 14 | 01:48bd memcmp 15 | 01:4916 memcpy 16 | 01:491f memset 17 | 01:48cb print_hex4 18 | 01:490c print_hex8 19 | 01:492e print_inline_string 20 | 01:48d7 print_load_font 21 | 01:48e3 print_newline 22 | 01:488f print_string 23 | 01:4897 print_string@char 24 | 01:489a print_string@newline 25 | 01:47f0 quit 26 | 01:4806 quit@callback 27 | 01:480a quit@cb_return 28 | 01:4814 quit@wait_ly_1 29 | 01:481a quit@wait_ly_2 30 | 01:4820 quit@wait_ly_3 31 | 01:4826 quit@wait_ly_4 32 | 01:482c quit@report_result 33 | 01:4830 quit@success 34 | 01:483e quit@failure 35 | 01:4846 quit@serial_dump 36 | 01:484c quit@normal 37 | 01:4866 quit@fast 38 | 01:4878 quit@halt 39 | 01:4879 quit@halt_execution_0 40 | 01:487b reset_screen 41 | 01:48ae serial_send_byte 42 | 01:4000 font 43 | 00:0150 main 44 | 00:0179 fail 45 | 00:0183 fail@quit_inline_1 46 | 00:0198 finish 47 | 00:019f finish@quit_inline_2 48 | 00:01b0 dma_proc 49 | 00:01b8 _end_dma_proc 50 | 00:1200 random_data 51 | 00:ff80 hram.dma_proc 52 | 00:ff90 fail_offset 53 | 00:ff80 RAM_USAGE_SLOT_4_BANK_0_START 54 | 00:ff90 RAM_USAGE_SLOT_4_BANK_0_END 55 | 56 | [definitions] 57 | 0000000a _sizeof_clear_oam 58 | 0000000a _sizeof_clear_vram 59 | 0000000f _sizeof_disable_ppu_safe 60 | 00000006 _sizeof_is_ppu_broken 61 | 0000000a _sizeof_is_serial_broken 62 | 0000000e _sizeof_memcmp 63 | 00000009 _sizeof_memcpy 64 | 00000009 _sizeof_memset 65 | 0000000c _sizeof_print_hex4 66 | 0000000a _sizeof_print_hex8 67 | 00000006 _sizeof_print_inline_string 68 | 0000000c _sizeof_print_load_font 69 | 0000000b _sizeof_print_newline 70 | 00000010 _sizeof_print_string 71 | 0000008b _sizeof_quit 72 | 00000014 _sizeof_reset_screen 73 | 0000000f _sizeof_serial_send_byte 74 | 000007f0 _sizeof_font 75 | 00000010 _sizeof_hram.dma_proc 76 | 00000001 _sizeof_fail_offset 77 | 00000010 _sizeof_RAM_USAGE_SLOT_4_BANK_0_START 78 | 00000029 _sizeof_main 79 | 0000001f _sizeof_fail 80 | 00000018 _sizeof_finish 81 | 00000008 _sizeof_dma_proc 82 | 00001048 _sizeof__end_dma_proc 83 | -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/di_timing-GS.sym: -------------------------------------------------------------------------------- 1 | ; this file was created with wlalink by ville helin . 2 | ; wla symbolic information for "/home/runner/work/mooneye-test-suite/mooneye-test-suite/build/acceptance/di_timing-GS.gb". 3 | 4 | [information] 5 | version 2 6 | 7 | [labels] 8 | 01:48d4 clear_vram 9 | 01:489f disable_ppu_safe 10 | 01:48a5 disable_ppu_safe@wait_ly_0 11 | 01:48fa is_ppu_broken 12 | 01:48de is_serial_broken 13 | 01:48e8 memcpy 14 | 01:48f1 memset 15 | 01:4900 print_inline_string 16 | 01:48bd print_load_font 17 | 01:48c9 print_newline 18 | 01:488f print_string 19 | 01:4897 print_string@char 20 | 01:489a print_string@newline 21 | 01:47f0 quit 22 | 01:4806 quit@callback 23 | 01:480a quit@cb_return 24 | 01:4814 quit@wait_ly_1 25 | 01:481a quit@wait_ly_2 26 | 01:4820 quit@wait_ly_3 27 | 01:4826 quit@wait_ly_4 28 | 01:482c quit@report_result 29 | 01:4830 quit@success 30 | 01:483e quit@failure 31 | 01:4846 quit@serial_dump 32 | 01:484c quit@normal 33 | 01:4866 quit@fast 34 | 01:4878 quit@halt 35 | 01:4879 quit@halt_execution_0 36 | 01:487b reset_screen 37 | 01:48ae serial_send_byte 38 | 01:4000 font 39 | 00:0150 main 40 | 00:0158 main@wait_ly_5 41 | 00:015e main@wait_ly_6 42 | 00:016d test_round1 43 | 00:0177 _delay_long_time_0 44 | 00:0186 finish_round1 45 | 00:0189 finish_round1@wait_ly_7 46 | 00:018f finish_round1@wait_ly_8 47 | 00:019e test_round2 48 | 00:01a8 _delay_long_time_1 49 | 00:01b4 test_finish 50 | 00:01bb test_finish@quit_inline_1 51 | 00:01cc fail_halt 52 | 00:01d3 fail_halt@quit_inline_2 53 | 00:01e7 fail_round1 54 | 00:01ee fail_round1@quit_inline_3 55 | 00:0205 fail_round2 56 | 00:020c fail_round2@quit_inline_4 57 | 58 | [definitions] 59 | 0000000a _sizeof_clear_vram 60 | 0000000f _sizeof_disable_ppu_safe 61 | 00000006 _sizeof_is_ppu_broken 62 | 0000000a _sizeof_is_serial_broken 63 | 00000009 _sizeof_memcpy 64 | 00000009 _sizeof_memset 65 | 00000006 _sizeof_print_inline_string 66 | 0000000c _sizeof_print_load_font 67 | 0000000b _sizeof_print_newline 68 | 00000010 _sizeof_print_string 69 | 0000008b _sizeof_quit 70 | 00000014 _sizeof_reset_screen 71 | 0000000f _sizeof_serial_send_byte 72 | 000007f0 _sizeof_font 73 | 0000001d _sizeof_main 74 | 0000000a _sizeof_test_round1 75 | 0000000f _sizeof__delay_long_time_0 76 | 00000018 _sizeof_finish_round1 77 | 0000000a _sizeof_test_round2 78 | 0000000c _sizeof__delay_long_time_1 79 | 00000018 _sizeof_test_finish 80 | 0000001b _sizeof_fail_halt 81 | 0000001e _sizeof_fail_round1 82 | -------------------------------------------------------------------------------- /default_rom/blarrg/cpu_instrs/source/03-op sp,hl.s: -------------------------------------------------------------------------------- 1 | ; Tests SP/HL instructions 2 | 3 | ;.define PRINT_CHECKSUMS 1 4 | .include "shell.inc" 5 | .include "instr_test.s" 6 | 7 | instrs: 8 | .byte $33,0,0 ; INC SP 9 | .byte $3B,0,0 ; DEC SP 10 | .byte $39,0,0 ; ADD HL,SP 11 | .byte $F9,0,0 ; LD SP,HL 12 | .byte $E8,$01,0 ; ADD SP,1 13 | .byte $E8,$FF,0 ; ADD SP,-1 14 | .byte $F8,$01,0 ; LD HL,SP+1 15 | .byte $F8,$FF,0 ; LD HL,SP-1 16 | instrs_end: 17 | 18 | test_instr: 19 | ; C = flags register 20 | ld c,$00 21 | call test 22 | ld c,$F0 23 | call test 24 | ret 25 | 26 | test: 27 | ; Go through each value for HL 28 | ld hl,values 29 | hl_loop: 30 | ld e,(hl) 31 | inc hl 32 | ld d,(hl) 33 | inc hl 34 | push hl 35 | 36 | ; Go through each value for SP 37 | ld hl,values 38 | values_loop: 39 | push bc 40 | push de 41 | push hl 42 | 43 | push bc 44 | pop af 45 | 46 | ; Switch stack 47 | ld (temp),sp 48 | ld a,(hl+) 49 | ld h,(hl) 50 | ld l,a 51 | ; call print_regs 52 | ld sp,hl 53 | 54 | ; Set registers 55 | ld h,d 56 | ld l,e 57 | ld a,$12 58 | ld bc,$5691 59 | ld de,$9ABC 60 | 61 | jp instr 62 | instr_done: 63 | ; Save new SP and switch to yet another stack 64 | ld (temp+2),sp 65 | ld sp,$DF70 66 | 67 | call checksum_af_bc_de_hl 68 | 69 | ; Checksum SP 70 | ld a,(temp+2) 71 | call update_crc_fast 72 | ld a,(temp+3) 73 | call update_crc_fast 74 | 75 | ldsp temp 76 | 77 | pop hl 78 | pop de 79 | pop bc 80 | inc hl 81 | inc hl 82 | ld a,l 83 | cp . 2 | ; wla symbolic information for "/home/runner/work/mooneye-test-suite/mooneye-test-suite/build/acceptance/instr/daa.gb". 3 | 4 | [information] 5 | version 2 6 | 7 | [labels] 8 | 01:6913 clear_vram 9 | 01:68d2 disable_ppu_safe 10 | 01:68d8 disable_ppu_safe@wait_ly_0 11 | 01:6943 is_ppu_broken 12 | 01:691d is_serial_broken 13 | 01:6931 memcpy 14 | 01:693a memset 15 | 01:687b print_bin4 16 | 01:68f0 print_hex4 17 | 01:6927 print_hex8 18 | 01:6949 print_inline_string 19 | 01:68fc print_load_font 20 | 01:6908 print_newline 21 | 01:68c2 print_string 22 | 01:68ca print_string@char 23 | 01:68cd print_string@newline 24 | 01:67f0 quit 25 | 01:6806 quit@callback 26 | 01:680a quit@cb_return 27 | 01:6814 quit@wait_ly_1 28 | 01:681a quit@wait_ly_2 29 | 01:6820 quit@wait_ly_3 30 | 01:6826 quit@wait_ly_4 31 | 01:682c quit@report_result 32 | 01:6830 quit@success 33 | 01:683e quit@failure 34 | 01:6846 quit@serial_dump 35 | 01:684c quit@normal 36 | 01:6866 quit@fast 37 | 01:6878 quit@halt 38 | 01:6879 quit@halt_execution_0 39 | 01:68ae reset_screen 40 | 01:68e1 serial_send_byte 41 | 01:6000 font 42 | 00:0150 main 43 | 00:0166 main@quit_inline_1 44 | 00:0177 run_tests 45 | 00:01ac fail 46 | 00:01b3 fail@quit_inline_2 47 | 00:0266 testcases1 48 | 01:4000 testcases2 49 | 00:ff80 hram.f 50 | 00:ff81 hram.a 51 | 00:ff82 hram.testcase_l 52 | 00:ff83 hram.testcase_h 53 | 00:ff84 hram.sp_save_l 54 | 00:ff85 hram.sp_save_h 55 | 00:ff80 RAM_USAGE_SLOT_4_BANK_0_START 56 | 00:ff85 RAM_USAGE_SLOT_4_BANK_0_END 57 | 58 | [definitions] 59 | 0000000a _sizeof_clear_vram 60 | 0000000f _sizeof_disable_ppu_safe 61 | 00000006 _sizeof_is_ppu_broken 62 | 0000000a _sizeof_is_serial_broken 63 | 00000009 _sizeof_memcpy 64 | 00000009 _sizeof_memset 65 | 00000033 _sizeof_print_bin4 66 | 0000000c _sizeof_print_hex4 67 | 0000000a _sizeof_print_hex8 68 | 00000006 _sizeof_print_inline_string 69 | 0000000c _sizeof_print_load_font 70 | 0000000b _sizeof_print_newline 71 | 00000010 _sizeof_print_string 72 | 0000008b _sizeof_quit 73 | 00000014 _sizeof_reset_screen 74 | 0000000f _sizeof_serial_send_byte 75 | 000007f0 _sizeof_font 76 | 00002000 _sizeof_testcases1 77 | 00002000 _sizeof_testcases2 78 | 00000001 _sizeof_hram.f 79 | 00000001 _sizeof_hram.a 80 | 00000001 _sizeof_hram.testcase_l 81 | 00000001 _sizeof_hram.testcase_h 82 | 00000001 _sizeof_hram.sp_save_l 83 | 00000001 _sizeof_hram.sp_save_h 84 | 00000005 _sizeof_RAM_USAGE_SLOT_4_BANK_0_START 85 | 00000027 _sizeof_main 86 | 00000035 _sizeof_run_tests 87 | -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/emulator-only/mbc2/bits_unused.sym: -------------------------------------------------------------------------------- 1 | ; this file was created with wlalink by ville helin . 2 | ; wla symbolic information for "/home/runner/work/mooneye-test-suite/mooneye-test-suite/build/emulator-only/mbc2/bits_unused.gb". 3 | 4 | [information] 5 | version 2 6 | 7 | [labels] 8 | 01:40fe clear_vram 9 | 01:40af disable_ppu_safe 10 | 01:40b5 disable_ppu_safe@wait_ly_0 11 | 01:412e is_ppu_broken 12 | 01:4108 is_serial_broken 13 | 01:40cd memcmp 14 | 01:411c memcpy 15 | 01:4125 memset 16 | 01:40db print_hex4 17 | 01:4112 print_hex8 18 | 01:4134 print_inline_string 19 | 01:40e7 print_load_font 20 | 01:40f3 print_newline 21 | 01:409f print_string 22 | 01:40a7 print_string@char 23 | 01:40aa print_string@newline 24 | 01:4000 quit 25 | 01:4016 quit@callback 26 | 01:401a quit@cb_return 27 | 01:4024 quit@wait_ly_1 28 | 01:402a quit@wait_ly_2 29 | 01:4030 quit@wait_ly_3 30 | 01:4036 quit@wait_ly_4 31 | 01:403c quit@report_result 32 | 01:4040 quit@success 33 | 01:404e quit@failure 34 | 01:4056 quit@serial_dump 35 | 01:405c quit@normal 36 | 01:4076 quit@fast 37 | 01:4088 quit@halt 38 | 01:4089 quit@halt_execution_0 39 | 01:408b reset_screen 40 | 01:40be serial_send_byte 41 | 01:4202 font 42 | 00:0150 main 43 | 00:0169 test_round1 44 | 00:018d test_round1@quit_inline_1 45 | 00:019e ram_test_pattern 46 | 00:01ae check_patterns 47 | 00:01c5 fail_round1 48 | 00:01cc fail_round1@quit_inline_2 49 | 01:41f2 rom_test_pattern 50 | 01:4202 _end_rom_test_pattern 51 | 00:ff80 hram.test_address 52 | 00:ff80 hram.test_address_l 53 | 00:ff81 hram.test_address_h 54 | 00:ff80 RAM_USAGE_SLOT_4_BANK_0_START 55 | 00:ff81 RAM_USAGE_SLOT_4_BANK_0_END 56 | 57 | [definitions] 58 | 0000000a _sizeof_clear_vram 59 | 0000000f _sizeof_disable_ppu_safe 60 | 00000006 _sizeof_is_ppu_broken 61 | 0000000a _sizeof_is_serial_broken 62 | 0000000e _sizeof_memcmp 63 | 00000009 _sizeof_memcpy 64 | 00000009 _sizeof_memset 65 | 0000000c _sizeof_print_hex4 66 | 0000000a _sizeof_print_hex8 67 | 00000006 _sizeof_print_inline_string 68 | 0000000c _sizeof_print_load_font 69 | 0000000b _sizeof_print_newline 70 | 00000010 _sizeof_print_string 71 | 0000008b _sizeof_quit 72 | 00000014 _sizeof_reset_screen 73 | 0000000f _sizeof_serial_send_byte 74 | 000007f0 _sizeof_font 75 | 00000002 _sizeof_hram.test_address 76 | 00000001 _sizeof_hram.test_address_l 77 | 00000001 _sizeof_hram.test_address_h 78 | 00000001 _sizeof_RAM_USAGE_SLOT_4_BANK_0_START 79 | 00000019 _sizeof_main 80 | 00000035 _sizeof_test_round1 81 | 00000010 _sizeof_ram_test_pattern 82 | 00000017 _sizeof_check_patterns 83 | 0000402d _sizeof_fail_round1 84 | 00000010 _sizeof_rom_test_pattern 85 | -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/emulator-only/mbc1/bits_bank1.sym: -------------------------------------------------------------------------------- 1 | ; this file was created with wlalink by ville helin . 2 | ; wla symbolic information for "/home/runner/work/mooneye-test-suite/mooneye-test-suite/build/emulator-only/mbc1/bits_bank1.gb". 3 | 4 | [information] 5 | version 2 6 | 7 | [labels] 8 | 01:48ee clear_vram 9 | 01:489f disable_ppu_safe 10 | 01:48a5 disable_ppu_safe@wait_ly_0 11 | 01:491e is_ppu_broken 12 | 01:48f8 is_serial_broken 13 | 01:48bd memcmp 14 | 01:490c memcpy 15 | 01:4915 memset 16 | 01:48cb print_hex4 17 | 01:4902 print_hex8 18 | 01:4924 print_inline_string 19 | 01:48d7 print_load_font 20 | 01:48e3 print_newline 21 | 01:488f print_string 22 | 01:4897 print_string@char 23 | 01:489a print_string@newline 24 | 01:47f0 quit 25 | 01:4806 quit@callback 26 | 01:480a quit@cb_return 27 | 01:4814 quit@wait_ly_1 28 | 01:481a quit@wait_ly_2 29 | 01:4820 quit@wait_ly_3 30 | 01:4826 quit@wait_ly_4 31 | 01:482c quit@report_result 32 | 01:4830 quit@success 33 | 01:483e quit@failure 34 | 01:4846 quit@serial_dump 35 | 01:484c quit@normal 36 | 01:4866 quit@fast 37 | 01:4878 quit@halt 38 | 01:4879 quit@halt_execution_0 39 | 01:487b reset_screen 40 | 01:48ae serial_send_byte 41 | 01:4000 font 42 | 00:0150 main 43 | 00:015f test_round1 44 | 00:0174 test_round1@quit_inline_1 45 | 00:018f test_round2 46 | 00:01bd test_round2@quit_inline_2 47 | 00:01ce bank1_pattern 48 | 00:01de bank3_pattern 49 | 00:01ee fail_round2 50 | 00:01f5 fail_round2@quit_inline_3 51 | 00:ff80 hram.test_address 52 | 00:ff80 hram.test_address_l 53 | 00:ff81 hram.test_address_h 54 | 00:ff82 hram.memcmp 55 | 00:ff80 RAM_USAGE_SLOT_4_BANK_0_START 56 | 00:ffa1 RAM_USAGE_SLOT_4_BANK_0_END 57 | 58 | [definitions] 59 | 0000000a _sizeof_clear_vram 60 | 0000000f _sizeof_disable_ppu_safe 61 | 00000006 _sizeof_is_ppu_broken 62 | 0000000a _sizeof_is_serial_broken 63 | 0000000e _sizeof_memcmp 64 | 00000009 _sizeof_memcpy 65 | 00000009 _sizeof_memset 66 | 0000000c _sizeof_print_hex4 67 | 0000000a _sizeof_print_hex8 68 | 00000006 _sizeof_print_inline_string 69 | 0000000c _sizeof_print_load_font 70 | 0000000b _sizeof_print_newline 71 | 00000010 _sizeof_print_string 72 | 0000008b _sizeof_quit 73 | 00000014 _sizeof_reset_screen 74 | 0000000f _sizeof_serial_send_byte 75 | 000007f0 _sizeof_font 76 | 00000002 _sizeof_hram.test_address 77 | 00000001 _sizeof_hram.test_address_l 78 | 00000001 _sizeof_hram.test_address_h 79 | 00000020 _sizeof_hram.memcmp 80 | 00000021 _sizeof_RAM_USAGE_SLOT_4_BANK_0_START 81 | 0000000f _sizeof_main 82 | 00000030 _sizeof_test_round1 83 | 0000003f _sizeof_test_round2 84 | 00000010 _sizeof_bank1_pattern 85 | 00000010 _sizeof_bank3_pattern 86 | -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/emulator-only/mbc2/bits_romb.sym: -------------------------------------------------------------------------------- 1 | ; this file was created with wlalink by ville helin . 2 | ; wla symbolic information for "/home/runner/work/mooneye-test-suite/mooneye-test-suite/build/emulator-only/mbc2/bits_romb.gb". 3 | 4 | [information] 5 | version 2 6 | 7 | [labels] 8 | 01:48ee clear_vram 9 | 01:489f disable_ppu_safe 10 | 01:48a5 disable_ppu_safe@wait_ly_0 11 | 01:491e is_ppu_broken 12 | 01:48f8 is_serial_broken 13 | 01:48bd memcmp 14 | 01:490c memcpy 15 | 01:4915 memset 16 | 01:48cb print_hex4 17 | 01:4902 print_hex8 18 | 01:4924 print_inline_string 19 | 01:48d7 print_load_font 20 | 01:48e3 print_newline 21 | 01:488f print_string 22 | 01:4897 print_string@char 23 | 01:489a print_string@newline 24 | 01:47f0 quit 25 | 01:4806 quit@callback 26 | 01:480a quit@cb_return 27 | 01:4814 quit@wait_ly_1 28 | 01:481a quit@wait_ly_2 29 | 01:4820 quit@wait_ly_3 30 | 01:4826 quit@wait_ly_4 31 | 01:482c quit@report_result 32 | 01:4830 quit@success 33 | 01:483e quit@failure 34 | 01:4846 quit@serial_dump 35 | 01:484c quit@normal 36 | 01:4866 quit@fast 37 | 01:4878 quit@halt 38 | 01:4879 quit@halt_execution_0 39 | 01:487b reset_screen 40 | 01:48ae serial_send_byte 41 | 01:4000 font 42 | 00:0150 main 43 | 00:015f test_round1 44 | 00:0174 test_round1@quit_inline_1 45 | 00:018e test_round2 46 | 00:01c0 test_round2@quit_inline_2 47 | 00:01d1 bank1_pattern 48 | 00:01e1 bank3_pattern 49 | 00:01f1 fail_round2 50 | 00:01f8 fail_round2@quit_inline_3 51 | 00:ff80 hram.test_address 52 | 00:ff80 hram.test_address_l 53 | 00:ff81 hram.test_address_h 54 | 00:ff82 hram.memcmp 55 | 00:ff80 RAM_USAGE_SLOT_4_BANK_0_START 56 | 00:ffa1 RAM_USAGE_SLOT_4_BANK_0_END 57 | 58 | [definitions] 59 | 0000000a _sizeof_clear_vram 60 | 0000000f _sizeof_disable_ppu_safe 61 | 00000006 _sizeof_is_ppu_broken 62 | 0000000a _sizeof_is_serial_broken 63 | 0000000e _sizeof_memcmp 64 | 00000009 _sizeof_memcpy 65 | 00000009 _sizeof_memset 66 | 0000000c _sizeof_print_hex4 67 | 0000000a _sizeof_print_hex8 68 | 00000006 _sizeof_print_inline_string 69 | 0000000c _sizeof_print_load_font 70 | 0000000b _sizeof_print_newline 71 | 00000010 _sizeof_print_string 72 | 0000008b _sizeof_quit 73 | 00000014 _sizeof_reset_screen 74 | 0000000f _sizeof_serial_send_byte 75 | 000007f0 _sizeof_font 76 | 00000002 _sizeof_hram.test_address 77 | 00000001 _sizeof_hram.test_address_l 78 | 00000001 _sizeof_hram.test_address_h 79 | 00000020 _sizeof_hram.memcmp 80 | 00000021 _sizeof_RAM_USAGE_SLOT_4_BANK_0_START 81 | 0000000f _sizeof_main 82 | 0000002f _sizeof_test_round1 83 | 00000043 _sizeof_test_round2 84 | 00000010 _sizeof_bank1_pattern 85 | 00000010 _sizeof_bank3_pattern 86 | -------------------------------------------------------------------------------- /default_rom/blarrg/cpu_instrs/source/common/build_gbs.s: -------------------------------------------------------------------------------- 1 | ; Build as GBS music file 2 | 3 | .memoryMap 4 | defaultSlot 0 5 | slot 0 $3000 size $1000 6 | slot 1 $C000 size $1000 7 | .endMe 8 | 9 | .romBankSize $1000 10 | .romBanks 2 11 | 12 | 13 | ;;;; GBS music file header 14 | 15 | .byte "GBS" 16 | .byte 1 ; vers 17 | .byte 1 ; songs 18 | .byte 1 ; first song 19 | .word load_addr 20 | .word reset 21 | .word gbs_play 22 | .word std_stack 23 | .byte 0,0 ; timer 24 | .ds $60,0 25 | load_addr: 26 | 27 | ; WLA assumes we're building ROM and messes 28 | ; with bytes at the beginning, so skip them. 29 | .ds $100,0 30 | 31 | 32 | ;;;; Shell 33 | 34 | .include "runtime.s" 35 | 36 | init_runtime: 37 | ld a,$01 ; Identify as DMG hardware 38 | ld (gb_id),a 39 | .ifdef TEST_NAME 40 | print_str TEST_NAME,newline,newline 41 | .endif 42 | ret 43 | 44 | std_print: 45 | sta SB 46 | wreg SC,$81 47 | delay 2304 48 | ret 49 | 50 | post_exit: 51 | call play_byte 52 | forever: 53 | wreg NR52,0 ; sound off 54 | - jp - 55 | 56 | .ifndef CUSTOM_RESET 57 | gbs_play: 58 | .endif 59 | console_flush: 60 | console_normal: 61 | console_inverse: 62 | console_set_mode: 63 | ret 64 | 65 | ; Reports A in binary as high and low tones, with 66 | ; leading low tone for reference. Omits leading 67 | ; zeroes. 68 | ; Preserved: AF, BC, DE, HL 69 | play_byte: 70 | push af 71 | push hl 72 | 73 | ; HL = (A << 1) | 1 74 | scf 75 | rla 76 | ld l,a 77 | ld h,0 78 | rl h 79 | 80 | ; Shift left until next-to-top bit is 1 81 | - add hl,hl 82 | bit 6,h 83 | jr z,- 84 | 85 | ; Reset sound 86 | delay_msec 400 87 | wreg NR52,0 ; sound off 88 | wreg NR52,$80 ; sound on 89 | wreg NR51,$FF ; mono 90 | wreg NR50,$77 ; volume 91 | 92 | - add hl,hl 93 | 94 | ; Low or high pitch based on bit shifted out 95 | ; of HL 96 | ld a,0 97 | jr nc,+ 98 | ld a,$FF 99 | + sta NR23 100 | 101 | ; Play short tone 102 | wreg NR21,$A0 103 | wreg NR22,$F0 104 | wreg NR24,$86 105 | delay_msec 75 106 | wreg NR22,0 107 | wreg NR23,$F8 108 | wreg NR24,$87 109 | delay_msec 200 110 | 111 | ; Loop until HL = $8000 112 | ld a,h 113 | xor $80 114 | or l 115 | jr nz,- 116 | 117 | pop hl 118 | pop af 119 | ret 120 | 121 | .ends 122 | -------------------------------------------------------------------------------- /default_rom/blarrg/instr_timing/source/common/build_gbs.s: -------------------------------------------------------------------------------- 1 | ; Build as GBS music file 2 | 3 | .memoryMap 4 | defaultSlot 0 5 | slot 0 $3000 size $1000 6 | slot 1 $C000 size $1000 7 | .endMe 8 | 9 | .romBankSize $1000 10 | .romBanks 2 11 | 12 | 13 | ;;;; GBS music file header 14 | 15 | .byte "GBS" 16 | .byte 1 ; vers 17 | .byte 1 ; songs 18 | .byte 1 ; first song 19 | .word load_addr 20 | .word reset 21 | .word gbs_play 22 | .word std_stack 23 | .byte 0,0 ; timer 24 | .ds $60,0 25 | load_addr: 26 | 27 | ; WLA assumes we're building ROM and messes 28 | ; with bytes at the beginning, so skip them. 29 | .ds $100,0 30 | 31 | 32 | ;;;; Shell 33 | 34 | .include "runtime.s" 35 | 36 | init_runtime: 37 | ld a,$01 ; Identify as DMG hardware 38 | ld (gb_id),a 39 | .ifdef TEST_NAME 40 | print_str TEST_NAME,newline,newline 41 | .endif 42 | ret 43 | 44 | std_print: 45 | sta SB 46 | wreg SC,$81 47 | delay 2304 48 | ret 49 | 50 | post_exit: 51 | call play_byte 52 | forever: 53 | wreg NR52,0 ; sound off 54 | - jp - 55 | 56 | .ifndef CUSTOM_RESET 57 | gbs_play: 58 | .endif 59 | console_flush: 60 | console_normal: 61 | console_inverse: 62 | console_set_mode: 63 | ret 64 | 65 | ; Reports A in binary as high and low tones, with 66 | ; leading low tone for reference. Omits leading 67 | ; zeroes. 68 | ; Preserved: AF, BC, DE, HL 69 | play_byte: 70 | push af 71 | push hl 72 | 73 | ; HL = (A << 1) | 1 74 | scf 75 | rla 76 | ld l,a 77 | ld h,0 78 | rl h 79 | 80 | ; Shift left until next-to-top bit is 1 81 | - add hl,hl 82 | bit 6,h 83 | jr z,- 84 | 85 | ; Reset sound 86 | delay_msec 400 87 | wreg NR52,0 ; sound off 88 | wreg NR52,$80 ; sound on 89 | wreg NR51,$FF ; mono 90 | wreg NR50,$77 ; volume 91 | 92 | - add hl,hl 93 | 94 | ; Low or high pitch based on bit shifted out 95 | ; of HL 96 | ld a,0 97 | jr nc,+ 98 | ld a,$FF 99 | + sta NR23 100 | 101 | ; Play short tone 102 | wreg NR21,$A0 103 | wreg NR22,$F0 104 | wreg NR24,$86 105 | delay_msec 75 106 | wreg NR22,0 107 | wreg NR23,$F8 108 | wreg NR24,$87 109 | delay_msec 200 110 | 111 | ; Loop until HL = $8000 112 | ld a,h 113 | xor $80 114 | or l 115 | jr nz,- 116 | 117 | pop hl 118 | pop af 119 | ret 120 | 121 | .ends 122 | -------------------------------------------------------------------------------- /default_rom/blarrg/mem_timing/source/common/build_gbs.s: -------------------------------------------------------------------------------- 1 | ; Build as GBS music file 2 | 3 | .memoryMap 4 | defaultSlot 0 5 | slot 0 $3000 size $1000 6 | slot 1 $C000 size $1000 7 | .endMe 8 | 9 | .romBankSize $1000 10 | .romBanks 2 11 | 12 | 13 | ;;;; GBS music file header 14 | 15 | .byte "GBS" 16 | .byte 1 ; vers 17 | .byte 1 ; songs 18 | .byte 1 ; first song 19 | .word load_addr 20 | .word reset 21 | .word gbs_play 22 | .word std_stack 23 | .byte 0,0 ; timer 24 | .ds $60,0 25 | load_addr: 26 | 27 | ; WLA assumes we're building ROM and messes 28 | ; with bytes at the beginning, so skip them. 29 | .ds $100,0 30 | 31 | 32 | ;;;; Shell 33 | 34 | .include "runtime.s" 35 | 36 | init_runtime: 37 | ld a,$01 ; Identify as DMG hardware 38 | ld (gb_id),a 39 | .ifdef TEST_NAME 40 | print_str TEST_NAME,newline,newline 41 | .endif 42 | ret 43 | 44 | std_print: 45 | sta SB 46 | wreg SC,$81 47 | delay 2304 48 | ret 49 | 50 | post_exit: 51 | call play_byte 52 | forever: 53 | wreg NR52,0 ; sound off 54 | - jp - 55 | 56 | .ifndef CUSTOM_RESET 57 | gbs_play: 58 | .endif 59 | console_flush: 60 | console_normal: 61 | console_inverse: 62 | console_set_mode: 63 | ret 64 | 65 | ; Reports A in binary as high and low tones, with 66 | ; leading low tone for reference. Omits leading 67 | ; zeroes. 68 | ; Preserved: AF, BC, DE, HL 69 | play_byte: 70 | push af 71 | push hl 72 | 73 | ; HL = (A << 1) | 1 74 | scf 75 | rla 76 | ld l,a 77 | ld h,0 78 | rl h 79 | 80 | ; Shift left until next-to-top bit is 1 81 | - add hl,hl 82 | bit 6,h 83 | jr z,- 84 | 85 | ; Reset sound 86 | delay_msec 400 87 | wreg NR52,0 ; sound off 88 | wreg NR52,$80 ; sound on 89 | wreg NR51,$FF ; mono 90 | wreg NR50,$77 ; volume 91 | 92 | - add hl,hl 93 | 94 | ; Low or high pitch based on bit shifted out 95 | ; of HL 96 | ld a,0 97 | jr nc,+ 98 | ld a,$FF 99 | + sta NR23 100 | 101 | ; Play short tone 102 | wreg NR21,$A0 103 | wreg NR22,$F0 104 | wreg NR24,$86 105 | delay_msec 75 106 | wreg NR22,0 107 | wreg NR23,$F8 108 | wreg NR24,$87 109 | delay_msec 200 110 | 111 | ; Loop until HL = $8000 112 | ld a,h 113 | xor $80 114 | or l 115 | jr nz,- 116 | 117 | pop hl 118 | pop af 119 | ret 120 | 121 | .ends 122 | -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/emulator-only/mbc1/bits_bank2.sym: -------------------------------------------------------------------------------- 1 | ; this file was created with wlalink by ville helin . 2 | ; wla symbolic information for "/home/runner/work/mooneye-test-suite/mooneye-test-suite/build/emulator-only/mbc1/bits_bank2.gb". 3 | 4 | [information] 5 | version 2 6 | 7 | [labels] 8 | 01:48ee clear_vram 9 | 01:489f disable_ppu_safe 10 | 01:48a5 disable_ppu_safe@wait_ly_0 11 | 01:491e is_ppu_broken 12 | 01:48f8 is_serial_broken 13 | 01:48bd memcmp 14 | 01:490c memcpy 15 | 01:4915 memset 16 | 01:48cb print_hex4 17 | 01:4902 print_hex8 18 | 01:4924 print_inline_string 19 | 01:48d7 print_load_font 20 | 01:48e3 print_newline 21 | 01:488f print_string 22 | 01:4897 print_string@char 23 | 01:489a print_string@newline 24 | 01:47f0 quit 25 | 01:4806 quit@callback 26 | 01:480a quit@cb_return 27 | 01:4814 quit@wait_ly_1 28 | 01:481a quit@wait_ly_2 29 | 01:4820 quit@wait_ly_3 30 | 01:4826 quit@wait_ly_4 31 | 01:482c quit@report_result 32 | 01:4830 quit@success 33 | 01:483e quit@failure 34 | 01:4846 quit@serial_dump 35 | 01:484c quit@normal 36 | 01:4866 quit@fast 37 | 01:4878 quit@halt 38 | 01:4879 quit@halt_execution_0 39 | 01:487b reset_screen 40 | 01:48ae serial_send_byte 41 | 01:4000 font 42 | 00:0150 main 43 | 00:0153 test_round1 44 | 00:01b5 test_round1@quit_inline_1 45 | 00:01d0 test_round2 46 | 00:01f9 test_round2@quit_inline_2 47 | 00:020a bank0_pattern 48 | 00:021a bank1_pattern 49 | 00:022a bank2_pattern 50 | 00:023a bank3_pattern 51 | 00:024a fail_round2 52 | 00:0254 fail_round2@quit_inline_3 53 | 00:027a clear_ram 54 | 00:ff80 hram.test_address 55 | 00:ff80 hram.test_address_l 56 | 00:ff81 hram.test_address_h 57 | 00:ff80 RAM_USAGE_SLOT_4_BANK_0_START 58 | 00:ff81 RAM_USAGE_SLOT_4_BANK_0_END 59 | 60 | [definitions] 61 | 0000000a _sizeof_clear_vram 62 | 0000000f _sizeof_disable_ppu_safe 63 | 00000006 _sizeof_is_ppu_broken 64 | 0000000a _sizeof_is_serial_broken 65 | 0000000e _sizeof_memcmp 66 | 00000009 _sizeof_memcpy 67 | 00000009 _sizeof_memset 68 | 0000000c _sizeof_print_hex4 69 | 0000000a _sizeof_print_hex8 70 | 00000006 _sizeof_print_inline_string 71 | 0000000c _sizeof_print_load_font 72 | 0000000b _sizeof_print_newline 73 | 00000010 _sizeof_print_string 74 | 0000008b _sizeof_quit 75 | 00000014 _sizeof_reset_screen 76 | 0000000f _sizeof_serial_send_byte 77 | 000007f0 _sizeof_font 78 | 00000002 _sizeof_hram.test_address 79 | 00000001 _sizeof_hram.test_address_l 80 | 00000001 _sizeof_hram.test_address_h 81 | 00000001 _sizeof_RAM_USAGE_SLOT_4_BANK_0_START 82 | 00000003 _sizeof_main 83 | 0000007d _sizeof_test_round1 84 | 0000003a _sizeof_test_round2 85 | 00000010 _sizeof_bank0_pattern 86 | 00000010 _sizeof_bank1_pattern 87 | 00000010 _sizeof_bank2_pattern 88 | 00000010 _sizeof_bank3_pattern 89 | 00000030 _sizeof_fail_round2 90 | -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/emulator-only/mbc1/bits_mode.sym: -------------------------------------------------------------------------------- 1 | ; this file was created with wlalink by ville helin . 2 | ; wla symbolic information for "/home/runner/work/mooneye-test-suite/mooneye-test-suite/build/emulator-only/mbc1/bits_mode.gb". 3 | 4 | [information] 5 | version 2 6 | 7 | [labels] 8 | 01:48ee clear_vram 9 | 01:489f disable_ppu_safe 10 | 01:48a5 disable_ppu_safe@wait_ly_0 11 | 01:491e is_ppu_broken 12 | 01:48f8 is_serial_broken 13 | 01:48bd memcmp 14 | 01:490c memcpy 15 | 01:4915 memset 16 | 01:48cb print_hex4 17 | 01:4902 print_hex8 18 | 01:4924 print_inline_string 19 | 01:48d7 print_load_font 20 | 01:48e3 print_newline 21 | 01:488f print_string 22 | 01:4897 print_string@char 23 | 01:489a print_string@newline 24 | 01:47f0 quit 25 | 01:4806 quit@callback 26 | 01:480a quit@cb_return 27 | 01:4814 quit@wait_ly_1 28 | 01:481a quit@wait_ly_2 29 | 01:4820 quit@wait_ly_3 30 | 01:4826 quit@wait_ly_4 31 | 01:482c quit@report_result 32 | 01:4830 quit@success 33 | 01:483e quit@failure 34 | 01:4846 quit@serial_dump 35 | 01:484c quit@normal 36 | 01:4866 quit@fast 37 | 01:4878 quit@halt 38 | 01:4879 quit@halt_execution_0 39 | 01:487b reset_screen 40 | 01:48ae serial_send_byte 41 | 01:4000 font 42 | 00:0150 main 43 | 00:0153 test_round1 44 | 00:0179 test_round1@quit_inline_1 45 | 00:0193 test_round2 46 | 00:01c8 test_round2@quit_inline_2 47 | 00:01d9 copy_patterns 48 | 00:021c bank0_pattern 49 | 00:022c bank1_pattern 50 | 00:023c bank2_pattern 51 | 00:024c bank3_pattern 52 | 00:025c fail_round2 53 | 00:0266 fail_round2@quit_inline_3 54 | 00:028c clear_ram 55 | 00:ff80 hram.test_address 56 | 00:ff80 hram.test_address_l 57 | 00:ff81 hram.test_address_h 58 | 00:ff80 RAM_USAGE_SLOT_4_BANK_0_START 59 | 00:ff81 RAM_USAGE_SLOT_4_BANK_0_END 60 | 61 | [definitions] 62 | 0000000a _sizeof_clear_vram 63 | 0000000f _sizeof_disable_ppu_safe 64 | 00000006 _sizeof_is_ppu_broken 65 | 0000000a _sizeof_is_serial_broken 66 | 0000000e _sizeof_memcmp 67 | 00000009 _sizeof_memcpy 68 | 00000009 _sizeof_memset 69 | 0000000c _sizeof_print_hex4 70 | 0000000a _sizeof_print_hex8 71 | 00000006 _sizeof_print_inline_string 72 | 0000000c _sizeof_print_load_font 73 | 0000000b _sizeof_print_newline 74 | 00000010 _sizeof_print_string 75 | 0000008b _sizeof_quit 76 | 00000014 _sizeof_reset_screen 77 | 0000000f _sizeof_serial_send_byte 78 | 000007f0 _sizeof_font 79 | 00000002 _sizeof_hram.test_address 80 | 00000001 _sizeof_hram.test_address_l 81 | 00000001 _sizeof_hram.test_address_h 82 | 00000001 _sizeof_RAM_USAGE_SLOT_4_BANK_0_START 83 | 00000003 _sizeof_main 84 | 00000040 _sizeof_test_round1 85 | 00000046 _sizeof_test_round2 86 | 00000043 _sizeof_copy_patterns 87 | 00000010 _sizeof_bank0_pattern 88 | 00000010 _sizeof_bank1_pattern 89 | 00000010 _sizeof_bank2_pattern 90 | 00000010 _sizeof_bank3_pattern 91 | 00000030 _sizeof_fail_round2 92 | -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/acceptance/ppu/stat_lyc_onoff.sym: -------------------------------------------------------------------------------- 1 | ; this file was created with wlalink by ville helin . 2 | ; wla symbolic information for "/home/runner/work/mooneye-test-suite/mooneye-test-suite/build/acceptance/ppu/stat_lyc_onoff.gb". 3 | 4 | [information] 5 | version 2 6 | 7 | [labels] 8 | 01:48d4 clear_vram 9 | 01:489f disable_ppu_safe 10 | 01:48a5 disable_ppu_safe@wait_ly_0 11 | 01:48fa is_ppu_broken 12 | 01:48de is_serial_broken 13 | 01:48e8 memcpy 14 | 01:48f1 memset 15 | 01:4900 print_inline_string 16 | 01:48bd print_load_font 17 | 01:48c9 print_newline 18 | 01:488f print_string 19 | 01:4897 print_string@char 20 | 01:489a print_string@newline 21 | 01:47f0 quit 22 | 01:4806 quit@callback 23 | 01:480a quit@cb_return 24 | 01:4814 quit@wait_ly_1 25 | 01:481a quit@wait_ly_2 26 | 01:4820 quit@wait_ly_3 27 | 01:4826 quit@wait_ly_4 28 | 01:482c quit@report_result 29 | 01:4830 quit@success 30 | 01:483e quit@failure 31 | 01:4846 quit@serial_dump 32 | 01:484c quit@normal 33 | 01:4866 quit@fast 34 | 01:4878 quit@halt 35 | 01:4879 quit@halt_execution_0 36 | 01:487b reset_screen 37 | 01:48ae serial_send_byte 38 | 01:4000 font 39 | 00:0150 main 40 | 00:015b round1 41 | 00:015e round1@wait_ly_5 42 | 00:0164 round1@wait_ly_6 43 | 00:0182 round1@quit_inline_1 44 | 00:01ac round1@quit_inline_2 45 | 00:01d6 round1@quit_inline_3 46 | 00:01ef round2 47 | 00:01f3 round2@wait_ly_7 48 | 00:01f9 round2@wait_ly_8 49 | 00:0217 round2@quit_inline_4 50 | 00:0241 round2@quit_inline_5 51 | 00:026b round2@quit_inline_6 52 | 00:0284 round3 53 | 00:0288 round3@wait_ly_9 54 | 00:028e round3@wait_ly_10 55 | 00:02aa round3@quit_inline_7 56 | 00:02d4 round3@quit_inline_8 57 | 00:02fe round3@quit_inline_9 58 | 00:0317 round4 59 | 00:0318 round4@wait_ly_11 60 | 00:031e round4@wait_ly_12 61 | 00:033a round4@quit_inline_10 62 | 00:0360 round4@quit_inline_11 63 | 00:037a finish 64 | 00:0381 finish@quit_inline_12 65 | 00:0392 fail_intr_round1 66 | 00:0399 fail_intr_round1@quit_inline_13 67 | 00:03b0 fail_intr_round2 68 | 00:03b7 fail_intr_round2@quit_inline_14 69 | 00:03ce fail_intr_round3 70 | 00:03d5 fail_intr_round3@quit_inline_15 71 | 72 | [definitions] 73 | 0000000a _sizeof_clear_vram 74 | 0000000f _sizeof_disable_ppu_safe 75 | 00000006 _sizeof_is_ppu_broken 76 | 0000000a _sizeof_is_serial_broken 77 | 00000009 _sizeof_memcpy 78 | 00000009 _sizeof_memset 79 | 00000006 _sizeof_print_inline_string 80 | 0000000c _sizeof_print_load_font 81 | 0000000b _sizeof_print_newline 82 | 00000010 _sizeof_print_string 83 | 0000008b _sizeof_quit 84 | 00000014 _sizeof_reset_screen 85 | 0000000f _sizeof_serial_send_byte 86 | 000007f0 _sizeof_font 87 | 0000000b _sizeof_main 88 | 00000094 _sizeof_round1 89 | 00000095 _sizeof_round2 90 | 00000093 _sizeof_round3 91 | 00000063 _sizeof_round4 92 | 00000018 _sizeof_finish 93 | 0000001e _sizeof_fail_intr_round1 94 | 0000001e _sizeof_fail_intr_round2 95 | -------------------------------------------------------------------------------- /default_rom/blarrg/mem_timing/source/02-write_timing.s: -------------------------------------------------------------------------------- 1 | ; Tests timing of accesses made by 2 | ; memory write instructions 3 | 4 | .include "shell.inc" 5 | .include "tima_64.s" 6 | 7 | instructions: 8 | ; last value is time of write 9 | .byte $36,$FF,$00,3 ; LD (HL),n 10 | .byte $70,$00,$00,2 ; LD (HL),B 11 | .byte $71,$00,$00,2 ; LD (HL),C 12 | .byte $72,$00,$00,2 ; LD (HL),D 13 | .byte $73,$00,$00,2 ; LD (HL),E 14 | .byte $74,$00,$00,2 ; LD (HL),H 15 | .byte $75,$00,$00,2 ; LD (HL),L 16 | .byte $77,$00,$00,2 ; LD (HL),A 17 | .byte $02,$00,$00,2 ; LD (BC),A 18 | .byte $12,$00,$00,2 ; LD (DE),A 19 | .byte $22,$00,$00,2 ; LD (HL+),A 20 | .byte $32,$00,$00,2 ; LD (HL-),A 21 | .byte $E2,$00,$00,2 ; LDH (C),A 22 | .byte $E0,tima_64,4 ; LD (nn),A 24 | instructions_end: 25 | 26 | main: 27 | call init_tima_64 28 | set_test 0 29 | 30 | ; Test instructions 31 | ld hl,instructions 32 | - call @test_instr 33 | cp (hl) 34 | call nz,@print_failed 35 | inc hl 36 | ld a,l 37 | cp 3-byte instruction 64 | ; HL <- HL + 3 65 | @test_instr: 66 | ; Copy instr 67 | ld a,(hl+) 68 | ld (instr+0),a 69 | ld a,(hl+) 70 | ld (instr+1),a 71 | ld a,(hl+) 72 | ld (instr+2),a 73 | push hl 74 | 75 | ; Test for writes on each cycle 76 | ld b,0 77 | - push bc 78 | call @time_write 79 | pop bc 80 | cp tima_64 83 | jr z,@no_write 84 | jr @found 85 | @no_write: 86 | inc b 87 | ld a,b 88 | cp 10 89 | jr nz,- 90 | ld b,0 91 | 92 | @found: 93 | ld a,b 94 | pop hl 95 | ret 96 | 97 | ; Tests for write 98 | ; B -> which cycle to test 99 | ; A <- timer value after test 100 | @time_write: 101 | call sync_tima_64 102 | ld a,13 103 | sub b 104 | call delay_a_20_cycles 105 | ld hl,tima_64 106 | ld bc,tima_64 107 | ld de,tima_64 108 | ld a,tima_64,4 ; LD (nn),A 24 | instructions_end: 25 | 26 | main: 27 | call init_tima_64 28 | set_test 0 29 | 30 | ; Test instructions 31 | ld hl,instructions 32 | - call @test_instr 33 | cp (hl) 34 | call nz,@print_failed 35 | inc hl 36 | ld a,l 37 | cp 3-byte instruction 64 | ; HL <- HL + 3 65 | @test_instr: 66 | ; Copy instr 67 | ld a,(hl+) 68 | ld (instr+0),a 69 | ld a,(hl+) 70 | ld (instr+1),a 71 | ld a,(hl+) 72 | ld (instr+2),a 73 | push hl 74 | 75 | ; Test for writes on each cycle 76 | ld b,0 77 | - push bc 78 | call @time_write 79 | pop bc 80 | cp tima_64 83 | jr z,@no_write 84 | jr @found 85 | @no_write: 86 | inc b 87 | ld a,b 88 | cp 10 89 | jr nz,- 90 | ld b,0 91 | 92 | @found: 93 | ld a,b 94 | pop hl 95 | ret 96 | 97 | ; Tests for write 98 | ; B -> which cycle to test 99 | ; A <- timer value after test 100 | @time_write: 101 | call sync_tima_64 102 | ld a,13 103 | sub b 104 | call delay_a_20_cycles 105 | ld hl,tima_64 106 | ld bc,tima_64 107 | ld de,tima_64 108 | ld a,". 38 | 39 | The default is to build a ROM. Defining BUILD_GBS will build as an GBS. 40 | The other build types aren't supported due to their complexity. I load 41 | the code into RAM at $C000 since my devcart requires it, and I don't 42 | want the normal ROM to differ in any way from what I've tested. This 43 | also allows easy self-modifying code. 44 | 45 | Several routines are available to print values and text to the console. 46 | Most update a running CRC-32 checksum which can be checked with 47 | check_crc, allowing ALL the output to be checked very easily. If the 48 | checksum doesn't match, it is printed, so you can run the code on a GB 49 | and paste the correct checksum into your code. 50 | 51 | 52 | Macros 53 | ------ 54 | Some macros are used to make common operations more convenient. The left 55 | is equivalent to the right: 56 | 57 | Macro Equivalent 58 | ------------------------------------- 59 | lda addr ldh a,(addr-$FF00) 60 | 61 | sta addr ldh (addr-$FF00),a 62 | 63 | wreg addr,data ld a,data 64 | ldh (addr-$FF00),a 65 | 66 | setb ld a,data 67 | ld (addr),a 68 | 69 | setw setb addr+0,data 71 | 72 | for_loop routine,begin,end,step 73 | calls routine with A set to successive values 74 | 75 | loop_n_times routine,count 76 | calls routine with A from 0 to count-1 77 | 78 | print_str "str" prints string 79 | 80 | 81 | -- 82 | Shay Green 83 | -------------------------------------------------------------------------------- /default_rom/blarrg/cpu_instrs/source/08-misc instrs.s: -------------------------------------------------------------------------------- 1 | ; Tests miscellaneous instructions 2 | 3 | ;.define PRINT_CHECKSUMS 1 4 | .include "shell.inc" 5 | .include "instr_test.s" 6 | 7 | instrs: 8 | .byte $F0,$91,0 ; LDH A,($91) 9 | .byte $E0,$91,0 ; LDH ($91),A 10 | .byte $F2,$00,0 ; LDH A,(C) 11 | .byte $E2,$00,0 ; LDH (C),A 12 | .byte $FA,$91,$FF ; LD A,($FF91) 13 | .byte $EA,$91,$FF ; LD ($FF91),A 14 | .byte $08,$91,$FF ; LD ($FF91),SP 15 | .byte $01,$23,$01 ; LD BC,$0123 16 | .byte $11,$23,$01 ; LD DE,$0123 17 | .byte $21,$23,$01 ; LD HL,$0123 18 | .byte $31,$23,$01 ; LD SP,$0123 19 | .byte $F5,0,0 ; PUSH AF 20 | .byte $C5,0,0 ; PUSH BC 21 | .byte $D5,0,0 ; PUSH DE 22 | .byte $E5,0,0 ; PUSH HL 23 | .byte $F1,0,0 ; POP AF 24 | .byte $C1,0,0 ; POP BC 25 | .byte $D1,0,0 ; POP DE 26 | .byte $E1,0,0 ; POP HL 27 | instrs_end: 28 | 29 | test_instr: 30 | ; C = flags register 31 | ld c,$00 32 | call test 33 | ld c,$10 34 | call test 35 | ld c,$E0 36 | call test 37 | ld c,$F0 38 | call test 39 | ret 40 | 41 | test: 42 | ; Fill RAM 43 | ld a,$FE 44 | ld ($FF90),a 45 | ld a,$DC 46 | ld ($FF91),a 47 | ld a,$BA 48 | ld ($FF92),a 49 | 50 | ; Fill stack 51 | ld a,$13 52 | ld ($DF80),a 53 | ld a,$57 54 | ld ($DF80-1),a 55 | ld a,$9B 56 | ld ($DF80-2),a 57 | ld a,$DF 58 | ld ($DF80-3),a 59 | 60 | ; Set registers 61 | ld b,$12 62 | push bc 63 | ld bc,$5691 64 | ld de,$9ABC 65 | ld hl,$DEF0 66 | pop af 67 | 68 | ; Switch stack 69 | ld (temp),sp 70 | ld sp,$DF80-2 71 | 72 | jp instr 73 | instr_done: 74 | ; Save new SP and switch to another stack 75 | ld (temp+2),sp 76 | ld sp,$DF70 77 | 78 | call checksum_af_bc_de_hl 79 | 80 | ; Checksum SP 81 | ld a,(temp+2) 82 | call update_crc_fast 83 | ld a,(temp+3) 84 | call update_crc_fast 85 | 86 | ; Checksum RAM 87 | ld a,($FF90) 88 | call update_crc_fast 89 | ld a,($FF91) 90 | call update_crc_fast 91 | ld a,($FF92) 92 | call update_crc_fast 93 | 94 | ; Checksum stack 95 | ld a,($DF80) 96 | call update_crc_fast 97 | ld a,($DF80-1) 98 | call update_crc_fast 99 | ld a,($DF80-2) 100 | call update_crc_fast 101 | ld a,($DF80-3) 102 | call update_crc_fast 103 | 104 | ; Restore SP 105 | ldsp temp 106 | 107 | ret 108 | 109 | checksums: 110 | .byte $4D,$FF,$15,$97,$6D,$A7,$35,$65,$4D,$FF,$15,$97,$6D,$A7,$35,$65,$4D,$FF,$15,$97,$6D,$A7,$35,$65,$AD,$FA,$5E,$41,$D0,$78,$79,$C1,$AF,$66,$99,$34,$0D,$E1,$97,$99,$6F,$D0,$6F,$5D,$C3,$1F,$A3,$8A,$C2,$F1,$9C,$F3,$C1,$C3,$DC,$78,$C0,$2D,$E3,$01,$8F,$C4,$0F,$44,$95,$22,$6A,$39,$61,$C5,$AB,$55,$FB,$DF,$2C,$52, 111 | -------------------------------------------------------------------------------- /internal/windows/windows.go: -------------------------------------------------------------------------------- 1 | package windows 2 | 3 | import ( 4 | "fmt" 5 | "sort" 6 | "strconv" 7 | "strings" 8 | 9 | pixelgl "github.com/gopxl/pixel/v2/backends/opengl" 10 | "github.com/urfave/cli/v2" 11 | ) 12 | 13 | type Window interface { 14 | Draw() // draw the window 15 | Update() error // returns error if window should be closed 16 | SetUp() // Setup the window 17 | Win() *pixelgl.Window // returns the pixelgl window 18 | Finalize() // Finalize the window 19 | 20 | } 21 | 22 | func parseRangeBreakpoints(breakpoints string) []uint16 { 23 | // logger.Debug(breakpoints) 24 | var parsed []uint16 25 | start, err := strconv.ParseUint(strings.Split(breakpoints, ":")[0], 16, 16) 26 | if err != nil { 27 | errmsg := fmt.Sprintf("Invalid breakpoint format: %s", breakpoints) 28 | cli.Exit(errmsg, 1) 29 | } 30 | end, err := strconv.ParseUint(strings.Split(breakpoints, ":")[1], 16, 16) 31 | if err != nil { 32 | errmsg := fmt.Sprintf("Invalid breakpoint format: %s", breakpoints) 33 | cli.Exit(errmsg, 1) 34 | } 35 | 36 | for i := start; i <= end; i++ { 37 | parsed = append(parsed, uint16(i)) 38 | } 39 | return parsed 40 | } 41 | 42 | func parseSingleBreakpoint(breakpoints string) uint16 { 43 | 44 | // logger.Debug(breakpoints) 45 | 46 | // single breakpoint 47 | addr, err := strconv.ParseUint(breakpoints, 16, 16) 48 | if addr > 0xffff { 49 | errmsg := fmt.Sprintf("Addr out of range: %s", breakpoints) 50 | cli.Exit(errmsg, 1) 51 | } 52 | if err != nil { 53 | errmsg := fmt.Sprintf("Invalid breakpoint format: %s", breakpoints) 54 | cli.Exit(errmsg, 1) 55 | } 56 | 57 | return uint16(addr) 58 | } 59 | 60 | func ParseBreakpoints(breakpoints string) []uint16 { 61 | var a []uint16 62 | 63 | split := strings.Split(breakpoints, ",") 64 | // logger.Debug(split) 65 | 66 | if len(split) == 1 { 67 | if split[0] == "" { 68 | return a 69 | } 70 | // check if single element is a range 71 | is_range := strings.Split(split[0], ":") 72 | if len(is_range) == 2 { 73 | a = append(a, parseRangeBreakpoints(split[0])...) 74 | } else { 75 | // not a range so parse as single breakpoint 76 | a = append(a, parseSingleBreakpoint(split[0])) 77 | } 78 | } 79 | if len(split) > 1 { 80 | for _, b := range split { 81 | if b == "" { 82 | continue 83 | } 84 | // check if single element is a range 85 | is_range := strings.Split(b, ":") 86 | if len(is_range) == 2 { 87 | a = append(a, parseRangeBreakpoints(b)...) 88 | } else { 89 | // not a range so parse as single breakpoint 90 | a = append(a, parseSingleBreakpoint(b)) 91 | } 92 | } 93 | } 94 | 95 | // now sort and remove duplicates 96 | sort.Slice(a, func(i, j int) bool { return a[i] < a[j] }) 97 | 98 | // Remove duplicates 99 | return removeDuplicates(a) 100 | 101 | } 102 | 103 | func removeDuplicates(a []uint16) []uint16 { 104 | j := 0 105 | for i := 1; i < len(a); i++ { 106 | if a[j] != a[i] { 107 | j++ 108 | a[j] = a[i] 109 | } 110 | } 111 | result := a[:j+1] 112 | return result 113 | } 114 | -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/emulator-only/mbc1/ram_64kb.sym: -------------------------------------------------------------------------------- 1 | ; this file was created with wlalink by ville helin . 2 | ; wla symbolic information for "/home/runner/work/mooneye-test-suite/mooneye-test-suite/build/emulator-only/mbc1/ram_64kb.gb". 3 | 4 | [information] 5 | version 2 6 | 7 | [labels] 8 | 01:48e2 clear_vram 9 | 01:489f disable_ppu_safe 10 | 01:48a5 disable_ppu_safe@wait_ly_0 11 | 01:4908 is_ppu_broken 12 | 01:48ec is_serial_broken 13 | 01:48bd memcmp 14 | 01:48f6 memcpy 15 | 01:48ff memset 16 | 01:490e print_inline_string 17 | 01:48cb print_load_font 18 | 01:48d7 print_newline 19 | 01:488f print_string 20 | 01:4897 print_string@char 21 | 01:489a print_string@newline 22 | 01:47f0 quit 23 | 01:4806 quit@callback 24 | 01:480a quit@cb_return 25 | 01:4814 quit@wait_ly_1 26 | 01:481a quit@wait_ly_2 27 | 01:4820 quit@wait_ly_3 28 | 01:4826 quit@wait_ly_4 29 | 01:482c quit@report_result 30 | 01:4830 quit@success 31 | 01:483e quit@failure 32 | 01:4846 quit@serial_dump 33 | 01:484c quit@normal 34 | 01:4866 quit@fast 35 | 01:4878 quit@halt 36 | 01:4879 quit@halt_execution_0 37 | 01:487b reset_screen 38 | 01:48ae serial_send_byte 39 | 01:4000 font 40 | 00:0150 main 41 | 00:015f test_round1 42 | 00:017d test_round2 43 | 00:01d1 test_round3 44 | 00:01da test_round4 45 | 00:020a test_round5 46 | 00:023b test_finish 47 | 00:0245 test_finish@quit_inline_1 48 | 00:0256 copy_bank_data 49 | 00:026e check_bank_data 50 | 00:0287 all_ff 51 | 00:0297 all_00 52 | 00:1000 bank_data 53 | 00:1010 clear_ram 54 | 00:1032 fail_round1 55 | 00:103c fail_round1@quit_inline_2 56 | 00:1053 fail_round2 57 | 00:105d fail_round2@quit_inline_3 58 | 00:1074 fail_round3 59 | 00:107e fail_round3@quit_inline_4 60 | 00:1095 fail_round4 61 | 00:109f fail_round4@quit_inline_5 62 | 00:10b6 fail_round5 63 | 00:10c0 fail_round5@quit_inline_6 64 | 00:ff80 memcmp_hram 65 | 00:ff80 RAM_USAGE_SLOT_4_BANK_0_START 66 | 00:ff9f RAM_USAGE_SLOT_4_BANK_0_END 67 | 68 | [definitions] 69 | 0000000a _sizeof_clear_vram 70 | 0000000f _sizeof_disable_ppu_safe 71 | 00000006 _sizeof_is_ppu_broken 72 | 0000000a _sizeof_is_serial_broken 73 | 0000000e _sizeof_memcmp 74 | 00000009 _sizeof_memcpy 75 | 00000009 _sizeof_memset 76 | 00000006 _sizeof_print_inline_string 77 | 0000000c _sizeof_print_load_font 78 | 0000000b _sizeof_print_newline 79 | 00000010 _sizeof_print_string 80 | 0000008b _sizeof_quit 81 | 00000014 _sizeof_reset_screen 82 | 0000000f _sizeof_serial_send_byte 83 | 000007f0 _sizeof_font 84 | 00000020 _sizeof_memcmp_hram 85 | 0000001f _sizeof_RAM_USAGE_SLOT_4_BANK_0_START 86 | 0000000f _sizeof_main 87 | 0000001e _sizeof_test_round1 88 | 00000054 _sizeof_test_round2 89 | 00000009 _sizeof_test_round3 90 | 00000030 _sizeof_test_round4 91 | 00000031 _sizeof_test_round5 92 | 0000001b _sizeof_test_finish 93 | 00000018 _sizeof_copy_bank_data 94 | 00000019 _sizeof_check_bank_data 95 | 00000010 _sizeof_all_ff 96 | 00000d69 _sizeof_all_00 97 | 00000010 _sizeof_bank_data 98 | 00000022 _sizeof_clear_ram 99 | 00000021 _sizeof_fail_round1 100 | 00000021 _sizeof_fail_round2 101 | 00000021 _sizeof_fail_round3 102 | 00000021 _sizeof_fail_round4 103 | -------------------------------------------------------------------------------- /internal/cartridge/mbc5.go: -------------------------------------------------------------------------------- 1 | package cartridge 2 | 3 | import ( 4 | "bytes" 5 | "encoding/binary" 6 | ) 7 | 8 | type Mbc5Cartridge struct { 9 | parent *Cartridge 10 | hasBattery bool 11 | hasRumble bool 12 | romBankLow uint8 13 | romBankHi uint8 14 | } 15 | 16 | func (c *Mbc5Cartridge) Init() { 17 | c.hasBattery = true 18 | c.hasRumble = false 19 | c.romBankLow = 1 20 | c.romBankHi = 0 21 | logger.Debugf("Initializing MBC5, with ROM bank %d", c.GetRomBank()) 22 | } 23 | 24 | func (c *Mbc5Cartridge) Serialize() *bytes.Buffer { 25 | buf := new(bytes.Buffer) 26 | binary.Write(buf, binary.LittleEndian, c.hasBattery) // Has Battery 27 | binary.Write(buf, binary.LittleEndian, c.hasRumble) // Has Rumble 28 | binary.Write(buf, binary.LittleEndian, c.romBankLow) // ROM Bank Low 29 | binary.Write(buf, binary.LittleEndian, c.romBankHi) // ROM Bank Hi 30 | return buf 31 | 32 | } 33 | 34 | func (c *Mbc5Cartridge) Deserialize(data *bytes.Buffer) error { 35 | if err := binary.Read(data, binary.LittleEndian, &c.hasBattery); err != nil { 36 | return err 37 | } 38 | 39 | if err := binary.Read(data, binary.LittleEndian, &c.hasRumble); err != nil { 40 | return err 41 | } 42 | 43 | if err := binary.Read(data, binary.LittleEndian, &c.romBankLow); err != nil { 44 | return err 45 | } 46 | 47 | if err := binary.Read(data, binary.LittleEndian, &c.romBankHi); err != nil { 48 | return err 49 | } 50 | 51 | return nil 52 | } 53 | 54 | func (c *Mbc5Cartridge) GetRomBank() uint16 { 55 | return (uint16(c.romBankHi) << 8) | uint16(c.romBankLow) 56 | } 57 | 58 | func (c *Mbc5Cartridge) SetItem(addr uint16, value uint8) { 59 | 60 | switch { 61 | case addr < 0x2000: 62 | // RAM Enable 63 | c.parent.RamBankEnabled = (value & 0x0f) == 0x0a 64 | 65 | case 0x2000 <= addr && addr < 0x3000: 66 | // ROM Bank Number (lower 8 bits) 67 | c.romBankLow = value 68 | 69 | case 0x3000 <= addr && addr < 0x4000: 70 | // ROM Bank Number (upper 1 bit) 71 | c.romBankHi = value & 0x01 72 | 73 | case 0x4000 <= addr && addr < 0x6000: 74 | // RAM Bank Number 4bits 75 | c.parent.RamBankSelected = uint16(value & 0x0f) 76 | case 0xA000 <= addr && addr < 0xC000: 77 | // External RAM 78 | if c.parent.RamBankEnabled { 79 | ramBank := c.parent.RamBankSelected & c.parent.RamBankCount 80 | c.parent.RamBanks[ramBank][addr-0xA000] = value 81 | } 82 | } 83 | 84 | } 85 | 86 | func (c *Mbc5Cartridge) GetItem(addr uint16) uint8 { 87 | switch { 88 | case addr < 0x4000: 89 | // ROM Bank 0 90 | return c.parent.RomBanks[0][addr] 91 | case 0x4000 <= addr && addr < 0x8000: 92 | // Switchable ROM Bank 93 | romBank := c.GetRomBank() & (c.parent.RomBanksCount - 1) 94 | // logger.Debugf("Reading from ROM bank %d", bank) 95 | 96 | return c.parent.RomBanks[romBank][addr-0x4000] 97 | 98 | case 0xA000 <= addr && addr < 0xC000: 99 | // External RAM 100 | if c.parent.RamBankEnabled { 101 | ramBank := c.parent.RamBankSelected & c.parent.RamBankCount 102 | 103 | return c.parent.RamBanks[ramBank][addr-0xA000] 104 | } 105 | return 0xFF 106 | } 107 | 108 | return 0xFF 109 | } 110 | -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/emulator-only/mbc2/rom_1Mb.sym: -------------------------------------------------------------------------------- 1 | ; this file was created with wlalink by ville helin . 2 | ; wla symbolic information for "/home/runner/work/mooneye-test-suite/mooneye-test-suite/build/emulator-only/mbc2/rom_1Mb.gb". 3 | 4 | [information] 5 | version 2 6 | 7 | [labels] 8 | 01:48e1 clear_vram 9 | 01:48a0 disable_ppu_safe 10 | 01:48a6 disable_ppu_safe@wait_ly_0 11 | 01:4911 is_ppu_broken 12 | 01:48eb is_serial_broken 13 | 01:48ff memcpy 14 | 01:4908 memset 15 | 01:48be print_hex4 16 | 01:48f5 print_hex8 17 | 01:4917 print_inline_string 18 | 01:48ca print_load_font 19 | 01:48d6 print_newline 20 | 01:4890 print_string 21 | 01:4898 print_string@char 22 | 01:489b print_string@newline 23 | 01:47f1 quit 24 | 01:4807 quit@callback 25 | 01:480b quit@cb_return 26 | 01:4815 quit@wait_ly_1 27 | 01:481b quit@wait_ly_2 28 | 01:4821 quit@wait_ly_3 29 | 01:4827 quit@wait_ly_4 30 | 01:482d quit@report_result 31 | 01:4831 quit@success 32 | 01:483f quit@failure 33 | 01:4847 quit@serial_dump 34 | 01:484d quit@normal 35 | 01:4867 quit@fast 36 | 01:4879 quit@halt 37 | 01:487a quit@halt_execution_0 38 | 01:487c reset_screen 39 | 01:48af serial_send_byte 40 | 01:4001 font 41 | 00:0150 main 42 | 00:016e fail 43 | 00:0175 fail@quit_inline_1 44 | 00:01fa wram_functions_start 45 | 00:01fa run_test_suite 46 | 00:0207 run_test_suite@quit_inline_2 47 | 00:0218 run_tests 48 | 00:0226 test_case 49 | 00:0257 restore_mbc2 50 | 00:025c switch_bank 51 | 00:0262 fetch_expected_value 52 | 00:026b wram_functions_end 53 | 00:c200 wram.expected_banks 54 | 00:c000 wram._functions 55 | 00:ff80 hram.bank_number 56 | 00:ff81 hram.actual_value 57 | 00:ff82 hram.expected_value 58 | 00:ff83 hram.lower_upper 59 | 00:0001 expected_banks 60 | 00:c000 RAM_USAGE_SLOT_2_BANK_0_START 61 | 00:c20f RAM_USAGE_SLOT_2_BANK_0_END 62 | 00:ff80 RAM_USAGE_SLOT_4_BANK_0_START 63 | 00:ff83 RAM_USAGE_SLOT_4_BANK_0_END 64 | 65 | [definitions] 66 | 0000000a _sizeof_clear_vram 67 | 0000000f _sizeof_disable_ppu_safe 68 | 00000006 _sizeof_is_ppu_broken 69 | 0000000a _sizeof_is_serial_broken 70 | 00000009 _sizeof_memcpy 71 | 00000009 _sizeof_memset 72 | 0000000c _sizeof_print_hex4 73 | 0000000a _sizeof_print_hex8 74 | 00000006 _sizeof_print_inline_string 75 | 0000000c _sizeof_print_load_font 76 | 0000000b _sizeof_print_newline 77 | 00000010 _sizeof_print_string 78 | 0000008b _sizeof_quit 79 | 00000014 _sizeof_reset_screen 80 | 0000000f _sizeof_serial_send_byte 81 | 000007f0 _sizeof_font 82 | 00000010 _sizeof_wram.expected_banks 83 | 00000200 _sizeof_wram._functions 84 | 00000001 _sizeof_hram.bank_number 85 | 00000001 _sizeof_hram.actual_value 86 | 00000001 _sizeof_hram.expected_value 87 | 00000001 _sizeof_hram.lower_upper 88 | 00000010 _sizeof_expected_banks 89 | 0000020f _sizeof_RAM_USAGE_SLOT_2_BANK_0_START 90 | 00003d71 _sizeof_RAM_USAGE_SLOT_2_BANK_0_END 91 | 00000003 _sizeof_RAM_USAGE_SLOT_4_BANK_0_START 92 | 0000001e _sizeof_main 93 | 0000008c _sizeof_fail 94 | 00000000 _sizeof_wram_functions_start 95 | 0000001e _sizeof_run_test_suite 96 | 0000000e _sizeof_run_tests 97 | 00000031 _sizeof_test_case 98 | 00000005 _sizeof_restore_mbc2 99 | 00000006 _sizeof_switch_bank 100 | 00000009 _sizeof_fetch_expected_value 101 | -------------------------------------------------------------------------------- /default_rom/mooneye_test_suite/emulator-only/mbc2/rom_2Mb.sym: -------------------------------------------------------------------------------- 1 | ; this file was created with wlalink by ville helin . 2 | ; wla symbolic information for "/home/runner/work/mooneye-test-suite/mooneye-test-suite/build/emulator-only/mbc2/rom_2Mb.gb". 3 | 4 | [information] 5 | version 2 6 | 7 | [labels] 8 | 01:48e1 clear_vram 9 | 01:48a0 disable_ppu_safe 10 | 01:48a6 disable_ppu_safe@wait_ly_0 11 | 01:4911 is_ppu_broken 12 | 01:48eb is_serial_broken 13 | 01:48ff memcpy 14 | 01:4908 memset 15 | 01:48be print_hex4 16 | 01:48f5 print_hex8 17 | 01:4917 print_inline_string 18 | 01:48ca print_load_font 19 | 01:48d6 print_newline 20 | 01:4890 print_string 21 | 01:4898 print_string@char 22 | 01:489b print_string@newline 23 | 01:47f1 quit 24 | 01:4807 quit@callback 25 | 01:480b quit@cb_return 26 | 01:4815 quit@wait_ly_1 27 | 01:481b quit@wait_ly_2 28 | 01:4821 quit@wait_ly_3 29 | 01:4827 quit@wait_ly_4 30 | 01:482d quit@report_result 31 | 01:4831 quit@success 32 | 01:483f quit@failure 33 | 01:4847 quit@serial_dump 34 | 01:484d quit@normal 35 | 01:4867 quit@fast 36 | 01:4879 quit@halt 37 | 01:487a quit@halt_execution_0 38 | 01:487c reset_screen 39 | 01:48af serial_send_byte 40 | 01:4001 font 41 | 00:0150 main 42 | 00:016e fail 43 | 00:0175 fail@quit_inline_1 44 | 00:01fa wram_functions_start 45 | 00:01fa run_test_suite 46 | 00:0207 run_test_suite@quit_inline_2 47 | 00:0218 run_tests 48 | 00:0226 test_case 49 | 00:0257 restore_mbc2 50 | 00:025c switch_bank 51 | 00:0262 fetch_expected_value 52 | 00:026b wram_functions_end 53 | 00:c200 wram.expected_banks 54 | 00:c000 wram._functions 55 | 00:ff80 hram.bank_number 56 | 00:ff81 hram.actual_value 57 | 00:ff82 hram.expected_value 58 | 00:ff83 hram.lower_upper 59 | 00:0001 expected_banks 60 | 00:c000 RAM_USAGE_SLOT_2_BANK_0_START 61 | 00:c20f RAM_USAGE_SLOT_2_BANK_0_END 62 | 00:ff80 RAM_USAGE_SLOT_4_BANK_0_START 63 | 00:ff83 RAM_USAGE_SLOT_4_BANK_0_END 64 | 65 | [definitions] 66 | 0000000a _sizeof_clear_vram 67 | 0000000f _sizeof_disable_ppu_safe 68 | 00000006 _sizeof_is_ppu_broken 69 | 0000000a _sizeof_is_serial_broken 70 | 00000009 _sizeof_memcpy 71 | 00000009 _sizeof_memset 72 | 0000000c _sizeof_print_hex4 73 | 0000000a _sizeof_print_hex8 74 | 00000006 _sizeof_print_inline_string 75 | 0000000c _sizeof_print_load_font 76 | 0000000b _sizeof_print_newline 77 | 00000010 _sizeof_print_string 78 | 0000008b _sizeof_quit 79 | 00000014 _sizeof_reset_screen 80 | 0000000f _sizeof_serial_send_byte 81 | 000007f0 _sizeof_font 82 | 00000010 _sizeof_wram.expected_banks 83 | 00000200 _sizeof_wram._functions 84 | 00000001 _sizeof_hram.bank_number 85 | 00000001 _sizeof_hram.actual_value 86 | 00000001 _sizeof_hram.expected_value 87 | 00000001 _sizeof_hram.lower_upper 88 | 00000010 _sizeof_expected_banks 89 | 0000020f _sizeof_RAM_USAGE_SLOT_2_BANK_0_START 90 | 00003d71 _sizeof_RAM_USAGE_SLOT_2_BANK_0_END 91 | 00000003 _sizeof_RAM_USAGE_SLOT_4_BANK_0_START 92 | 0000001e _sizeof_main 93 | 0000008c _sizeof_fail 94 | 00000000 _sizeof_wram_functions_start 95 | 0000001e _sizeof_run_test_suite 96 | 0000000e _sizeof_run_tests 97 | 00000031 _sizeof_test_case 98 | 00000005 _sizeof_restore_mbc2 99 | 00000006 _sizeof_switch_bank 100 | 00000009 _sizeof_fetch_expected_value 101 | --------------------------------------------------------------------------------