Skip to content

Conversation

@Fierelier
Copy link
Contributor

@Fierelier Fierelier commented Sep 19, 2025

I've been wanting to use the lowres 240p mode on PS2 as I like to do software rendering, and the CPU is somewhat weak. These changes allow for that.

Description

This adds the special hints: SDL_HINT_PS2_GS_WIDTH, SDL_HINT_PS2_GS_HEIGHT, SDL_HINT_PS2_GS_PROGRESSIVE, SDL_HINT_PS2_GS_MODE

They allow for the framebuffer width and height to be set, progressive to be turned on/off and to decide which regional format to use for the signal (PAL/NTSC). Furthermore, the region is no longer overridden by default, so the console will use its native region, instead of NTSC.

Existing Issue(s)

ps2dev/ps2sdk-ports#183
#13969

Fierelier added 3 commits September 19, 2025 20:01
Allows for switching between NTSC/PAL, progressive/interlaced, etc
@Fierelier Fierelier changed the title [PS2] Framebuffer resolution + 240p/480p + PAL support [SDL3] [PS2] Framebuffer resolution + 240p/480p + PAL support Sep 19, 2025
Copy link
Collaborator

@slouken slouken left a comment

Choose a reason for hiding this comment

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

This generally looks good. I made some SDL-style changes, can you check and see if they look good to you?

@slouken slouken added this to the 3.4.0 milestone Sep 20, 2025
Co-authored-by: Sam Lantinga <slouken@libsdl.org>
@Fierelier Fierelier requested a review from slouken September 21, 2025 08:09
@Fierelier
Copy link
Contributor Author

Looks good to me.

@slouken slouken merged commit 3fd0b46 into libsdl-org:main Sep 21, 2025
42 checks passed
@slouken
Copy link
Collaborator

slouken commented Sep 21, 2025

Merged, thanks!

In general we are just making changes like this in SDL3. Is there a reason you can't use that for your project and need the SDL2 PR?

pionere pushed a commit to pionere/SDL that referenced this pull request Sep 23, 2025
…-org#13993)

* Do not override NTSC/PAL

* Fix PS2 build instructions

* Add PS2 GS hints
Allows for switching between NTSC/PAL, progressive/interlaced, etc
@Fierelier
Copy link
Contributor Author

Fierelier commented Sep 26, 2025

@slouken
I've yet to explore and implement SDL3 in my abstraction layer, which will likely only happen once I'm completely satisfied with the layer, since I already maintain both SDL1 and SDL2 compatibility.

This isn't a breaking change, unless you expect a PAL PS2 to output an NTSC signal, which it won't even do in OSDSYS (the browser). -- By default, the framebuffer assumes the resolution of the smaller NTSC signal (448px), regardless of region, just as before. It is simply centered on a PAL console. Pre-existing games should work absolutely fine.

slouken pushed a commit that referenced this pull request Sep 26, 2025
* Do not override NTSC/PAL

* Fix PS2 build instructions

* Add PS2 GS hints
Allows for switching between NTSC/PAL, progressive/interlaced, etc

(cherry picked from commit 3fd0b46)
slouken pushed a commit that referenced this pull request Sep 26, 2025
* Do not override NTSC/PAL

* Fix PS2 build instructions

* Add PS2 GS hints
Allows for switching between NTSC/PAL, progressive/interlaced, etc

(cherry picked from commit 3fd0b46)
(cherry picked from commit 7b28fb2)
@slouken
Copy link
Collaborator

slouken commented Sep 26, 2025

Okay, I've cherry-picked the changes for the next SDL2 release.

pionere pushed a commit to pionere/SDL that referenced this pull request Sep 26, 2025
…-org#13993)

* Do not override NTSC/PAL

* Fix PS2 build instructions

* Add PS2 GS hints
Allows for switching between NTSC/PAL, progressive/interlaced, etc
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