diff --git a/src/assemble-all.sh b/src/assemble-all.sh index d89f005..8e11952 100755 --- a/src/assemble-all.sh +++ b/src/assemble-all.sh @@ -15,6 +15,7 @@ SCRIPT_DIR=$(dirname "$0") "$SCRIPT_DIR/assemble.sh" gambatte-roms "$SCRIPT_DIR/assemble.sh" gbmicrotest "$SCRIPT_DIR/assemble.sh" little-things-gb +"$SCRIPT_DIR/assemble.sh" mbc3-tester "$SCRIPT_DIR/assemble.sh" mealybug-tearoom-tests "$SCRIPT_DIR/assemble.sh" mooneye-test-suite "$SCRIPT_DIR/assemble.sh" mooneye-test-suite-wilbertpol diff --git a/src/assemble.sh b/src/assemble.sh index e0a4f70..ef8c2a6 100755 --- a/src/assemble.sh +++ b/src/assemble.sh @@ -322,6 +322,34 @@ build_little_things_gb() } +build_mbc3_tester() +{ + print_cmd_title + + chmod +x "$ARTIFACTS_DIR/rgbds/"* + PATH="$ARTIFACTS_DIR/rgbds:$PATH" + + ARTIFACT_NAME=mbc3-tester + ARTIFACT=$(mkdir_artifact $ARTIFACT_NAME) + + REPO=$(mktemp -d) + cd "$REPO" + git clone https://github.com/EricKirschenmann/MBC3-Tester-gb.git . + git checkout 40065adab0e2a5597621bb7e7e4812d0e0f43da7 + + cd disassembly + make all + cd - + + cp disassembly/game.gb "$ARTIFACT/mbc3-tester.gb" + cp README.md "$ARTIFACT/mbc3-tester-readme.md" + + cd "$SRC_DIR" + cp mbc3-tester-expected/*.png "$ARTIFACT" + + cp "$SRC_DIR/howto/mbc3-tester.md" "$ARTIFACT/game-boy-test-roms-howto.md" +} + build_mealybug_tearoom_tests() { @@ -634,6 +662,7 @@ CMD_DMG_ACID2=dmg-acid2 CMD_GAMBATTE=gambatte-roms CMD_GBMICROTEST=gbmicrotest CMD_LITTLE_THINGS_GB=little-things-gb +CMD_MBC3_TESTER=mbc3-tester CMD_MEALYBUG_TEAROOM_TESTS=mealybug-tearoom-tests CMD_MOONEYE_TEST_SUITE=mooneye-test-suite CMD_MOONEYE_TEST_SUITE_WILBERTPOL=mooneye-test-suite-wilbertpol @@ -666,6 +695,7 @@ case ${CMD} in "${CMD_GAMBATTE}") build_gambatte_hwtests "$@" ;; "${CMD_GBMICROTEST}") build_gbmicrotest "$@" ;; "${CMD_LITTLE_THINGS_GB}") build_little_things_gb "$@" ;; + "${CMD_MBC3_TESTER}") build_mbc3_tester "$@" ;; "${CMD_MEALYBUG_TEAROOM_TESTS}") build_mealybug_tearoom_tests "$@" ;; "${CMD_MOONEYE_TEST_SUITE}") build_mooneye_test_suite "$@" ;; "${CMD_MOONEYE_TEST_SUITE_WILBERTPOL}") build_mooneye_test_suite_wilbertpol "$@" ;; diff --git a/src/howto/mbc3-tester.md b/src/howto/mbc3-tester.md new file mode 100644 index 0000000..22f4262 --- /dev/null +++ b/src/howto/mbc3-tester.md @@ -0,0 +1,27 @@ +# MBC3 Bank Tester + +The [MBC3 Bank Tester](https://github.com/EricKirschenmann/MBC3-Tester-gb) +is compiled with [RGBDS](https://github.com/gbdev/rgbds). + +## Game Boy Devices & SoC Revisions + +Untested on real hardware but it should work on all revisions since it tests a cartridge. + +## Exit Condition + +This tests loops indefinitely. The result can be checked after first 40 frames. + +## Test Success/Failure + +Test success/failure can be determined by +[a screenshot](https://github.com/c-sp/gameboy-test-roms/tree/master/src/mbc3-tester-expected/) +comparison. + +To create comparable screenshots, +your emulator should calculate colors as follows: + +- `#000000`, `#555555`, `#AAAAAA` and `#FFFFFF` are used for the four DMG LCD + shades +- LCD shades for CGB compatibility mode are: + - background: `#000000`, `#0063C6`, `#7BFF31` and `#FFFFFF` + - objects: `#000000`, `#943939`, `#FF8484` and `#FFFFFF` diff --git a/src/mbc3-tester-expected/mbc3-tester-cgb.jpg b/src/mbc3-tester-expected/mbc3-tester-cgb.jpg new file mode 100644 index 0000000..1c25c11 Binary files /dev/null and b/src/mbc3-tester-expected/mbc3-tester-cgb.jpg differ diff --git a/src/mbc3-tester-expected/mbc3-tester-dmg.png b/src/mbc3-tester-expected/mbc3-tester-dmg.png new file mode 100644 index 0000000..237e1f7 Binary files /dev/null and b/src/mbc3-tester-expected/mbc3-tester-dmg.png differ