Skip to content

Conversation

Fierelier
Copy link
Contributor

@Fierelier Fierelier commented Sep 16, 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
#13993

Fierelier added 2 commits September 16, 2025 18:22
This keeps the native screen mode of the console intact. Works fine even with 448px height, as the height seems to be virtual (the image is centered, on a PAL CRT)
This sets the GS resolution to the most recently created window. Should the resolution be 320x240 or below, progressive mode is activated.
@Fierelier Fierelier changed the title PS2 GS window resolution + 240p + PAL support [PS2] GS window resolution + 240p + PAL support Sep 16, 2025
Fierelier added 3 commits September 16, 2025 20:05
@Fierelier Fierelier changed the title [PS2] GS window resolution + 240p + PAL support [PS2] Framebuffer resolution + 240p/480p + PAL support Sep 16, 2025
@slouken slouken added this to the 2.x milestone Sep 17, 2025
@ccawley2011
Copy link
Contributor

I'd recommend implementing GetDisplayModes and SetDisplayMode in the PS2 video driver and having the render driver get the required information from that where possible rather than using hints.

@Fierelier
Copy link
Contributor Author

Fierelier commented Sep 18, 2025

@ccawley2011 You're right, NTSC/PAL could be set from the refresh rate being 60/50 this way. SDL even allows setting the refresh rate to 0 for auto.

Though I'm not sure if I can muster implementing it any time soon. Changing the resolution on an existing window may be a challenge too.

@slouken
Copy link
Collaborator

slouken commented Sep 19, 2025

Also, can you please rebase this PR on main? I don't mind two PRs, but changes like this should go into main first.

@Fierelier
Copy link
Contributor Author

@slouken Okay, I'll make that happen over the weekend I hope

@Fierelier Fierelier changed the title [PS2] Framebuffer resolution + 240p/480p + PAL support [SDL2] [PS2] Framebuffer resolution + 240p/480p + PAL support Sep 19, 2025
@slouken
Copy link
Collaborator

slouken commented Sep 26, 2025

This has been cherry-picked to SDL2 in 7b28fb2

@slouken slouken closed this Sep 26, 2025
@Fierelier
Copy link
Contributor Author

I was not aware SDL_atoi and SDL_strcasecmp were available in SDL2. Thank you for merging.

@slouken
Copy link
Collaborator

slouken commented Sep 26, 2025

You're welcome!

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.

3 participants