Skip to content

Commit

Permalink
Build for PS2
Browse files Browse the repository at this point in the history
  • Loading branch information
AJenbo committed Aug 15, 2022
1 parent f6b1676 commit 2ee918d
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 3 deletions.
13 changes: 13 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,18 @@ jobs:
- run: PKG_CONFIG_PATH=/opt/m68k-amigaos/lib/pkgconfig/:/opt/m68k-amigaos/share/pkgconfig/ cmake -S. -Bbuild -DM68K_CPU=68040 -DM68K_FPU=hard -DM68K_COMMON="-s -ffast-math -O3 -noixemul -D__BIG_ENDIAN__ -D__AMIGA__ -fpermissive" ..
- 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@sha256:6b09f9324acabeee769008ef45fff2acf77ecc2062b1a92a74178214b9af877b
Expand All @@ -74,4 +86,5 @@ workflows:
- switch
- 3ds
- amigaos-m68k
- ps2
- vita
4 changes: 4 additions & 0 deletions CMake/Platforms.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ if(VITA)
include(platforms/vita)
endif()

if(PS2)
include(platforms/ps2)
endif()

if(PS4)
include(platforms/ps4)
endif()
Expand Down
18 changes: 18 additions & 0 deletions CMake/platforms/ps2.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
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(DEVILUTIONX_STATIC_LIBFMT ON)
set(PREFILL_PLAYER_NAME ON)
set(NOEXIT ON)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/threads-stub")

set(BUILD_ASSETS_MPQ OFF)

2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,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()

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ If you want to help test the latest state of the next version you can fetch the
[![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

Expand Down
2 changes: 1 addition & 1 deletion Source/options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,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
Expand Down

0 comments on commit 2ee918d

Please sign in to comment.