Skip to content

ps2: Add port#405

Draft
asiekierka wants to merge 3 commits intoAliceLR:masterfrom
asiekierka:port-ps2
Draft

ps2: Add port#405
asiekierka wants to merge 3 commits intoAliceLR:masterfrom
asiekierka:port-ps2

Conversation

@asiekierka
Copy link
Copy Markdown
Contributor

@asiekierka asiekierka commented Dec 25, 2023

Almost too easy, though it did need a fix in the PS2 SDL2 port.

USB keyboards are unfortunately not supported by the SDL2 port, at least not yet :(

Comment thread arch/ps2/Makefile.in
LIBPNG_CFLAGS =
LIBPNG_LDFLAGS = -lpng16

MIKMOD_CFLAGS =
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left this in as the default installation of ps2sdk includes MikMod; this allows supporting MikMod builds.

@asiekierka asiekierka marked this pull request as draft January 2, 2024 08:36
@asiekierka asiekierka changed the title PS2 port ps2: Add port Jan 20, 2024
Comment thread config.sh
Comment on lines +948 to +956
if [ "$PLATFORM" = "ps2" ]; then
echo "Enabling PS2-specific hacks."
echo "#define CONFIG_PS2" >> src/config.h
echo "BUILD_PS2=1" >> platform.inc

echo "Force-disabling stack protector on PS2."
STACK_PROTECTOR="false"
fi

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding some notes here since this part of config.sh (finally) got cleaned up a little bit.

This is a case statement now; drop the leading comment (I removed these from the other platforms too), replace if [ "$PLATFORM" = "ps2" ]; then with "ps2"), replace fi with ;;, use PSP as a template for copying the new force-disablements, and you should be good to go here.

Comment thread config.sh
Comment on lines +1051 to +1054
# Force-disable OpenGL and overlay renderers on PS2, PSP, GP2X, 3DS, NDS and Wii
#
if [ "$PLATFORM" = "psp" ] ||
if [ "$PLATFORM" = "ps2" ] ||
[ "$PLATFORM" = "psp" ] ||
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if chain removed.

Comment thread config.sh
[ "$PLATFORM" = "switch" ] ||
[ "$PLATFORM" = "android" ] ||
[ "$PLATFORM" = "emscripten" ] ||
[ "$PLATFORM" = "ps2" ] ||
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if chain removed.

Comment thread config.sh
[ "$PLATFORM" = "darwin-devel" ] ||
[ "$PLATFORM" = "darwin-dist" ] ||
[ "$PLATFORM" = "gp2x" ] ||
[ "$PLATFORM" = "ps2" ] ||
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if chain removed.

Comment thread arch/ps2/CONFIG.PS2
Comment on lines +3 to +5
[[ -z $PS2DEV ]] && { echo "\$PS2DEV is unset. Aborting"; exit 1; }

./config.sh --platform ps2 --prefix $PS2DEV/ps2sdk/ee --optimize-size \
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Also, would recommend wrapping $PS2DEV in quotes in both instances here and in the Makefile fragment, just in case.)

@AliceLR
Copy link
Copy Markdown
Owner

AliceLR commented Apr 18, 2026

I'm not sure if it's relevant to the PS2, but linking it anyway: reading volume lists is now generalized as of #586.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants