Skip to content

Commit

Permalink
add scribbltests (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
c-sp authored Feb 25, 2024
2 parents 643a3b9 + 724f940 commit 1cb7f7d
Show file tree
Hide file tree
Showing 13 changed files with 75 additions and 3 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@ jobs:
strategy:
fail-fast: false
matrix:
suite: [ blargg-roms, gambatte-roms, mooneye-test-suite-wilbertpol, rtc3test ]
suite:
- blargg-roms
- gambatte-roms
- mooneye-test-suite-wilbertpol
- rtc3test
- scribbltests
steps:
- uses: actions/checkout@v4
- run: |
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
*(2021-03-02)*
- add [TurtleTests:b341ff54ec](https://github.com/Powerlated/TurtleTests/tree/b341ff54ec)
*(2020-09-05)*
- add [Scribbltests:96dd2f14bc](https://github.com/Hacktix/scribbltests/commit/96dd2f14bc)
*(2020-12-25)*

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

Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ It includes (in alphabetical order):
<sup>by [me](https://github.com/c-sp) </sup>
* **[Blargg's test roms](https://github.com/retrio/gb-test-roms)**
<sup>by [Shay Green (a.k.a. Blargg)](http://www.slack.net/~ant/) </sup>
* **[Bully](https://github.com/Hacktix/BullyGB)**
* **[Bully](https://github.com/Hacktix/BullyGB)**,
**[Scribbltests](https://github.com/Hacktix/scribbltests)**
and **[Strikethrough](https://github.com/Hacktix/strikethrough.gb)**
<sup>by [Hacktix](https://github.com/Hacktix) </sup>
* **[cgb-acid-hell](https://github.com/mattcurrie/cgb-acid-hell)**,
Expand Down Expand Up @@ -92,6 +93,8 @@ Details on this can be found in a separate readme for each test suite:
(located at `<release-zip>/rtc3test/`)
* [SameSuite](https://github.com/c-sp/gameboy-test-roms/tree/master/src/howto/same-suite.md)
(located at `<release-zip>/same-suite/`)
* [Scribbltests](https://github.com/c-sp/gameboy-test-roms/tree/master/src/howto/scribbltests.md)
(located at `<release-zip>/scribbltests/`)
* [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)
Expand Down
2 changes: 2 additions & 0 deletions src/assemble-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ SCRIPT_DIR=$(dirname "$0")
"$SCRIPT_DIR/assemble.sh" mooneye-test-suite-wilbertpol
"$SCRIPT_DIR/assemble.sh" rtc3test
"$SCRIPT_DIR/assemble.sh" same-suite
"$SCRIPT_DIR/assemble.sh" scribbltests
"$SCRIPT_DIR/assemble.sh" strikethrough
"$SCRIPT_DIR/assemble.sh" turtle-tests

"$SCRIPT_DIR/assemble.sh" release-zip master.zip
28 changes: 27 additions & 1 deletion src/assemble.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ print_usage_and_exit()
echo " $0 $CMD_RGBDS"
echo " $0 $CMD_RTC3TEST"
echo " $0 $CMD_SAME_SUITE"
echo " $0 $CMD_SCRIBBLTESTS"
echo " $0 $CMD_STRIKETHROUGH"
echo " $0 $CMD_TURTLE_TESTS"
echo " $0 $CMD_WLA_DX"
Expand Down Expand Up @@ -604,6 +605,29 @@ build_same_suite()



build_scribbltests()
{
print_cmd_title

ARTIFACT_NAME=scribbltests
ARTIFACT=$(mkdir_artifact $ARTIFACT_NAME)

REPO=$(mktemp -d)
cd "$REPO"
git clone https://github.com/Hacktix/scribbltests.git .
git checkout 96dd2f14bc8cce1fd5df25427056e059a175e9f7

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

cd "$SRC_DIR/scribbltests-expected"
rsync -am ./ "$ARTIFACT"

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



build_strikethrough()
{
print_cmd_title
Expand All @@ -629,6 +653,7 @@ build_strikethrough()
}



build_turtle_tests()
{
print_cmd_title
Expand All @@ -644,7 +669,6 @@ build_turtle_tests()
git clone https://github.com/Powerlated/TurtleTests.git .
git checkout b341ff54ec1e6a501d37dd309c556b6968a07eec

echo $(pwd)
make

cp README.md "$ARTIFACT"
Expand Down Expand Up @@ -705,6 +729,7 @@ CMD_RELEASE_ZIP=release-zip
CMD_RGBDS=rgbds
CMD_RTC3TEST=rtc3test
CMD_SAME_SUITE=same-suite
CMD_SCRIBBLTESTS=scribbltests
CMD_STRIKETHROUGH=strikethrough
CMD_TURTLE_TESTS=turtle-tests
CMD_WLA_DX=wla-dx
Expand Down Expand Up @@ -739,6 +764,7 @@ case ${CMD} in
"${CMD_RGBDS}") build_rgbds "$@" ;;
"${CMD_RTC3TEST}") build_rtc3test "$@" ;;
"${CMD_SAME_SUITE}") build_same_suite "$@" ;;
"${CMD_SCRIBBLTESTS}") build_scribbltests "$@" ;;
"${CMD_STRIKETHROUGH}") build_strikethrough "$@" ;;
"${CMD_TURTLE_TESTS}") build_turtle_tests "$@" ;;
"${CMD_WLA_DX}") build_wla_dx "$@" ;;
Expand Down
34 changes: 34 additions & 0 deletions src/howto/scribbltests.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Scribbltests

[Scribbltests](https://github.com/Hacktix/scribbltests)
are actually compiled with [RGBDS](https://github.com/gbdev/rgbds).
However, as the binaries are already part of the repository,
we just use them.

## Game Boy Devices & SoC Revisions

All test roms have been verified on
[MGB 9638 D](https://gbhwdb.gekkio.fi/consoles/mgb) and
[CPU CGB D](https://gbhwdb.gekkio.fi/consoles/cgb) by their author.

## Exit Condition

Running for around 10 frames should be enough for most tests.
The only exception is `statcount_auto` which should be run for around 270 frames
or 4.5 seconds (emulated time).

## Test Success/Failure

Test success/failure can be determined by
[screenshot](https://github.com/c-sp/gameboy-test-roms/tree/master/src/scribbltests/)
comparison.
Note that there are no screenshots for `failrylake` and `winpos` at the moment.

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`
Binary file added src/scribbltests-expected/lycscx/lycscx-cgb-dmg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/scribbltests-expected/lycscy/lycscy-cgb-dmg.png
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/scribbltests-expected/scxly/scxly-cgb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/scribbltests-expected/scxly/scxly-dmg.png
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 1cb7f7d

Please sign in to comment.