diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 46bfe02fd..1525cdc3f 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -44,6 +44,14 @@ jobs: make --silent -j 4 mkdir -p ${{ env.LIBRETRO_CORES_DIR }} mv stella2014_libretro.so ${{ env.LIBRETRO_CORES_DIR }} + - name: 'Build "atari800" core' + if: steps.cache.outputs.cache-hit != 'true' + run: | + git clone https://github.com/libretro/libretro-atari800 + cd libretro-atari800/ + make --silent -j 4 + mkdir -p ${{ env.LIBRETRO_CORES_DIR }} + mv atari800_libretro.so ${{ env.LIBRETRO_CORES_DIR }} - name: Build Mesen-X core if: steps.cache.outputs.cache-hit != 'true' run: | diff --git a/CMakeLists.txt b/CMakeLists.txt index 7bfb3572a..dd8bd11eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,6 +52,12 @@ if(NOT CMAKE_CROSSCOMPILING) PATHS ENV EMUTEST_DIR) message(STATUS "Emutest test runner: ${EMUTEST_COMMAND}") + find_library(LIBRETRO_ATARI800_CORE + NAMES + atari800_libretro.so atari800_libretro.dylib atari800_libretro.dll + PATHS /lib64/libretro ENV LIBRETRO_CORES_DIR) + message(STATUS "Libretro Atari800 core: ${LIBRETRO_ATARI800_CORE}") + find_library(LIBRETRO_STELLA_CORE NAMES stella2014_libretro.so stella2014_libretro.dylib stella2014_libretro.dll diff --git a/README.md b/README.md index 548da0b57..4e6f4b1dd 100644 --- a/README.md +++ b/README.md @@ -306,14 +306,21 @@ Copy `test/mesen_settings.xml` to this folder. Install emutest (requires Go 1.21): ```console -$ go install https://github.com/kivutar/emutest +$ go install github.com/kivutar/emutest@latest ``` -Make sure `$GOBIN` (usually `~/go/bin`) is included in your PATH environment variable so that CMake can find the binary, or set the `EMUTEST_DIR` environment variable to point to this directory before running `cmake -G` for the first time. +Make sure `$GOBIN` (usually `~/go/bin`) is included in your `PATH` +environment variable so that CMake can find the binary, or set the +`EMUTEST_DIR` environment variable to point to this directory before +running `cmake -G` for the first time. + +You can verify emutest with `emutest -h < /dev/null` on the +command-line. Build Libretro cores for desired target(s): * Atari 2600 - https://github.com/libretro/stella2014-libretro +* Atari 800 - https://github.com/libretro/libretro-atari800 * NES - https://github.com/NovaSquirrel/Mesen-X Copy the output Libretro core library files (they have extensions .so | .dylib | .dll) to a shared directory, maybe `$HOME/libretro`. diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 05872ae69..329344381 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -16,6 +16,7 @@ function(add_test_target target) -DLLVM_MOS=${llvm_mos} -DMESEN_COMMAND=${MESEN_COMMAND} -DEMUTEST_COMMAND=${EMUTEST_COMMAND} + -DLIBRETRO_ATARI800_CORE=${LIBRETRO_ATARI800_CORE} -DLIBRETRO_STELLA_CORE=${LIBRETRO_STELLA_CORE} -DLIBRETRO_MESEN_CORE=${LIBRETRO_MESEN_CORE} -DCMAKE_C_FLAGS=${config_flag} @@ -41,3 +42,4 @@ add_test_target(nes-unrom) add_test_target(nes-unrom-512) add_test_target(atari2600-4k) add_test_target(atari2600-3e) +add_test_target(atari8-dos) diff --git a/test/atari8-dos/CMakeLists.txt b/test/atari8-dos/CMakeLists.txt new file mode 100644 index 000000000..a90f04aa5 --- /dev/null +++ b/test/atari8-dos/CMakeLists.txt @@ -0,0 +1,5 @@ +cmake_minimum_required(VERSION 3.18) + +project(test-atari8-dos LANGUAGES C) + +include(./test.cmake) diff --git a/test/atari8-dos/hw.c b/test/atari8-dos/hw.c new file mode 100644 index 000000000..1992c42c5 --- /dev/null +++ b/test/atari8-dos/hw.c @@ -0,0 +1,7 @@ + +#include + +int main(void) { + puts("atari says hello"); + for(;;); +} diff --git a/test/atari8-dos/test.cmake b/test/atari8-dos/test.cmake new file mode 100644 index 000000000..e898a0746 --- /dev/null +++ b/test/atari8-dos/test.cmake @@ -0,0 +1,9 @@ + +include(../test.cmake) + +#TODO; zp test +#TODO; .bss test +#TODO; .data test + +add_a8_test(hw ../atari8-dos) +set_property(TEST test-hw PROPERTY ENVIRONMENT EMUTEST_FB_CRC_PASS=000000000) diff --git a/test/test.cmake b/test/test.cmake index 9ed257528..f51b752be 100644 --- a/test/test.cmake +++ b/test/test.cmake @@ -31,6 +31,14 @@ function(add_no_compile_test target) set_property(TEST ${target}-no-compile PROPERTY WILL_FAIL YES) endfunction() +function(add_a8_test name) + set(source_dir ".") + if(ARGC GREATER 1) + set(source_dir ${ARGV1}) + endif() + add_emutest_test(${name} xex ${source_dir} LIBRETRO_ATARI800_CORE) +endfunction() + function(add_vcs_test name) set(source_dir ".") if(ARGC GREATER 1)