diff --git a/.circleci/config.yml b/.circleci/config.yml index cdffd01d3..2ba356b39 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -55,6 +55,18 @@ jobs: - run: cmake -S. -Bbuild -DM68K_CPU=68040 -DM68K_FPU=hard -DM68K_COMMON="-s -fbbb=- -ffast-math -O2" - run: cd build && make -j2 - store_artifacts: {path: ./build/devilutionx, destination: devilutionx_m68k} + ps2: + docker: + - image: ps2dev/ps2dev:latest + working_directory: ~/repo + steps: + - checkout + - run: apk --no-cache add git cmake make gmp mpc1 mpfr + - run: git clone https://github.com/fjtrujy/ps2_drivers + - run: cd ps2_drivers && make clean all install + - run: cmake -S. -Bbuild -DCMAKE_TOOLCHAIN_FILE=/usr/local/ps2dev/ps2sdk/ps2dev.cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo + - run: cmake --build build -j 2 + - store_artifacts: {path: ./build/devilutionx.elf, destination: devilutionx.elf} vita: docker: - image: vitasdk/vitasdk @@ -74,4 +86,5 @@ workflows: - switch - 3ds - amigaos-m68k + - ps2 - vita diff --git a/CMake/Platforms.cmake b/CMake/Platforms.cmake index 56e138f1b..4e85a68f4 100644 --- a/CMake/Platforms.cmake +++ b/CMake/Platforms.cmake @@ -52,6 +52,10 @@ if(VITA) include(platforms/vita) endif() +if(PS2) + include(platforms/ps2) +endif() + if(PS4) include(platforms/ps4) endif() diff --git a/CMake/platforms/ps2.cmake b/CMake/platforms/ps2.cmake new file mode 100644 index 000000000..51fc7b0e3 --- /dev/null +++ b/CMake/platforms/ps2.cmake @@ -0,0 +1,17 @@ +set(NONET ON) +set(NOSOUND ON) +set(DISABLE_DEMOMODE ON) +set(ASAN OFF) +set(UBSAN OFF) +set(BUILD_TESTING OFF) + +set(DEVILUTIONX_SYSTEM_SDL2 OFF) +set(DEVILUTIONX_SYSTEM_BZIP2 OFF) +set(DEVILUTIONX_SYSTEM_LIBFMT OFF) +set(PREFILL_PLAYER_NAME ON) +set(NOEXIT ON) + +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/threads-stub") + +set(BUILD_ASSETS_MPQ OFF) + diff --git a/CMakeLists.txt b/CMakeLists.txt index de8078db5..e591f65d0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -285,7 +285,7 @@ include(Dependencies) add_subdirectory(Source) set(BIN_TARGET devilutionx) -if(NINTENDO_3DS) +if(NINTENDO_3DS OR PS2) set(BIN_TARGET ${BIN_TARGET}.elf) endif() diff --git a/README.md b/README.md index a83f92f7b..41d3ca5a2 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ If you want to help test the latest development stage of the next version (make [![Original Xbox](https://github.com/diasurgical/devilutionX/actions/workflows/xbox_nxdk.yml/badge.svg)](https://github.com/diasurgical/devilutionX/actions/workflows/xbox_nxdk.yml?query=branch%3Amaster) [![Xbox One/Series](https://github.com/diasurgical/devilutionX/actions/workflows/xbox_one.yml/badge.svg)](https://github.com/diasurgical/devilutionX/actions/workflows/xbox_one.yml?query=branch%3Amaster) -Linux x86-64, Switch, Vita, 3DS, Amiga, [![CircleCI](https://circleci.com/gh/diasurgical/devilutionX.svg?style=shield)](https://app.circleci.com/pipelines/github/diasurgical/devilutionX?branch=master) +Linux x86-64, Switch, PS2, Vita, 3DS, Amiga, [![CircleCI](https://circleci.com/gh/diasurgical/devilutionX.svg?style=shield)](https://app.circleci.com/pipelines/github/diasurgical/devilutionX?branch=master) # Building from Source diff --git a/Source/options.cpp b/Source/options.cpp index 7dec540a0..d826fa4c7 100644 --- a/Source/options.cpp +++ b/Source/options.cpp @@ -900,7 +900,7 @@ GraphicsOptions::GraphicsOptions() #endif #ifndef USE_SDL1 , upscale("Upscale", OnlyIfNoImplicitRenderer | OptionEntryFlags::CantChangeInGame | OptionEntryFlags::RecreateUI, N_("Upscale"), N_("Enables image scaling from the game resolution to your monitor resolution. Prevents changing the monitor resolution and allows window resizing."), -#ifdef NXDK +#if defined(NXDK) || defined(PS2) false #else true