Game Boy emulator test ROMs
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
expected Add m3_window_timing, m3_window_timing_wx_0 and m3_lcdc_win_en_change… Sep 19, 2018
photos Add m3_window_timing, m3_window_timing_wx_0 and m3_lcdc_win_en_change… Sep 19, 2018
src Add m3_window_timing, m3_window_timing_wx_0 and m3_lcdc_win_en_change… Sep 19, 2018
.gitignore Add files Apr 26, 2018
LICENSE Add files Apr 26, 2018
Makefile Add source code breakpoints (ld b,b) to help automated testing Apr 26, 2018
README.md Update README.md Sep 19, 2018
mealybug-tearoom-tests.zip
the-comprehensive-game-boy-ppu-documentation.md Add more notes on TILE_SEL tile mixing behaviour Jan 2, 2019

README.md

Mealybug Tearoom Tests

Game Boy emulator test ROMs.

About

This project contains some test ROMs I wrote to verify the correctness of my Game Boy emulator - Beaten Dying Moon.

Currently the tests focus on changes made to the PPU registers during STAT mode 3. This allows you to verify correct timing of the background tile and sprite data fetches as each scanline is rendered.

These tests examine very specific PPU behaviour/timings, so will give different results on a DMG compared to a CGB. Currently there are only expected result screenshots for when running on a DMG.

These tests are written to be easily automated. See the usage section below for details.

Screenshots

Pictures are always interesting so here are screenshots showing the expected results:

m3_lcdc_bg_map_change m3_lcdc_tile_sel_change m3_lcdc_win_map_change m3_lcdc_win_en_change_multiple m3_lcdc_win_en_change_multiple_wx m3_window_timing m3_window_timing_wx_0 m3_lcdc_tile_sel_win_change m3_lcdc_obj_en_change m3_lcdc_obj_en_change_variant m3_lcdc_bg_en_change m3_lcdc_obj_size_change m3_lcdc_obj_size_change_scx m3_bgp_change m3_bgp_change_sprites m3_obp0_change m3_scx_low_3_bits m3_wx_4_change m3_wx_4_change_sprites m3_wx_5_change m3_wx_6_change

Requirements

  • RGBDS is required if you want to build the test ROMs yourself
  • A Game Boy emulator and/or real Game Boy and flash cart to test on

Usage

  • Clone or download the project and run make from the root directory. The test ROMs will be placed in the build directory. You can also download an archive of the ROMs.

  • Check the results. You can check in the expected directory for screenshots from my Game Boy emulator (which I believe to be correct), and the photos directory contains blurry photos of the ROMs running on real devices. My logic analyzer is in the post so I can try capturing screenshots from the real device :)

  • Automated testing can be achieved using the compare command from imagemagick to get the number of pixels that are different when comparing the expected image to a screenshot from an emulator. The screenshot from the emulator can be generated when the LD B,B software breakpoint is encountered. The screenshot from the emulator should use these colour values in greyscale images or in RGB components to ensure the images can be compared correctly: $00, $55, $AA, $FF

    An example imagemagick compare command is below. result will contain the number of pixels that differ between the two images, so 0 indicates success.

    result=$(compare -metric AE emulator-screenshot.png expected-result.png NULL: 2>&1)