Skip to content

Commit

Permalink
Add Turtle tests (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
c-sp authored Feb 17, 2024
2 parents 68b707f + ba4b04f commit 643a3b9
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
- mooneye-test-suite
- same-suite
- strikethrough
- turtle-tests
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

- add [MBC3 Tester:40065adab0](https://github.com/EricKirschenmann/MBC3-Tester-gb/tree/40065adab0)
*(2021-03-02)*
- add [TurtleTests:b341ff54ec](https://github.com/Powerlated/TurtleTests/tree/b341ff54ec)
*(2020-09-05)*

## [v6.0](https://github.com/c-sp/gameboy-test-roms/releases/tag/v6.0) *(2023-07-24)*

Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ It includes (in alphabetical order):
<sup>by [ax6](https://github.com/aaaaaa123456789) </sup>
* **[SameSuite](https://github.com/LIJI32/SameSuite)**
<sup>by [Lior Halphon](https://github.com/LIJI32) </sup>
* **[TurtleTests](https://github.com/Powerlated/TurtleTests)**
<sup>by [Brian Jia](https://github.com/Powerlated) </sup>

## Running test suites

Expand Down Expand Up @@ -92,6 +94,8 @@ Details on this can be found in a separate readme for each test suite:
(located at `<release-zip>/same-suite/`)
* [Strikethrough](https://github.com/c-sp/gameboy-test-roms/tree/master/src/howto/strikethrough.md)
(located at `<release-zip>/strikethrough/`)
* [TurtleTests](https://github.com/c-sp/gameboy-test-roms/tree/master/src/howto/turtle-tests.md)
(located at `<release-zip>/turtle-tests/`)

## Versioning

Expand Down
33 changes: 33 additions & 0 deletions src/assemble.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ print_usage_and_exit()
echo " $0 $CMD_GAMBATTE"
echo " $0 $CMD_GBMICROTEST"
echo " $0 $CMD_LITTLE_THINGS_GB"
echo " $0 $CMD_MBC3_TESTER"
echo " $0 $CMD_MEALYBUG_TEAROOM_TESTS"
echo " $0 $CMD_MOONEYE_TEST_SUITE"
echo " $0 $CMD_MOONEYE_TEST_SUITE_WILBERTPOL"
Expand All @@ -36,6 +37,7 @@ print_usage_and_exit()
echo " $0 $CMD_RTC3TEST"
echo " $0 $CMD_SAME_SUITE"
echo " $0 $CMD_STRIKETHROUGH"
echo " $0 $CMD_TURTLE_TESTS"
echo " $0 $CMD_WLA_DX"
exit 1
}
Expand Down Expand Up @@ -627,6 +629,35 @@ build_strikethrough()
}


build_turtle_tests()
{
print_cmd_title

chmod +x "$ARTIFACTS_DIR/rgbds/"*
PATH="$ARTIFACTS_DIR/rgbds:$PATH"

ARTIFACT_NAME=turtle-tests
ARTIFACT=$(mkdir_artifact $ARTIFACT_NAME)

REPO=$(mktemp -d)
cd "$REPO"
git clone https://github.com/Powerlated/TurtleTests.git .
git checkout b341ff54ec1e6a501d37dd309c556b6968a07eec

echo $(pwd)
make

cp README.md "$ARTIFACT"
cd src
rsync -am --include='*.gb' --include='*/' --exclude='*' ./ "$ARTIFACT"

cd "$SRC_DIR/turtle-tests-expected"
rsync -am ./ "$ARTIFACT"

cp "$SRC_DIR/howto/turtle-tests.md" "$ARTIFACT/game-boy-test-roms-howto.md"
}



build_wla_dx()
{
Expand Down Expand Up @@ -675,6 +706,7 @@ CMD_RGBDS=rgbds
CMD_RTC3TEST=rtc3test
CMD_SAME_SUITE=same-suite
CMD_STRIKETHROUGH=strikethrough
CMD_TURTLE_TESTS=turtle-tests
CMD_WLA_DX=wla-dx

# identify repository directories based on the path of this script
Expand Down Expand Up @@ -708,6 +740,7 @@ case ${CMD} in
"${CMD_RTC3TEST}") build_rtc3test "$@" ;;
"${CMD_SAME_SUITE}") build_same_suite "$@" ;;
"${CMD_STRIKETHROUGH}") build_strikethrough "$@" ;;
"${CMD_TURTLE_TESTS}") build_turtle_tests "$@" ;;
"${CMD_WLA_DX}") build_wla_dx "$@" ;;

*) print_usage_and_exit ;;
Expand Down
30 changes: 30 additions & 0 deletions src/howto/turtle-tests.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Turtle Tests

[Turtle Tests](https://github.com/Powerlated/TurtleTests)
are compiled with [RGBDS](https://github.com/gbdev/rgbds).

## Game Boy Devices & SoC Revisions

I could not find any information on Game Boy hardware compatibility for this test suite.
However,
no timing edge cases seem to be involved here,
so these tests will probably run on any DMG and CGB.

## Exit Condition

Running the test run for half a second emulated time or around 30 frames is sufficient.

## Test Success/Failure

Test success/failure can be determined by
[screenshot](https://github.com/c-sp/gameboy-test-roms/tree/master/src/turtle-tests/)
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`
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 643a3b9

Please sign in to comment.