Setting PAL Or NTSC Video Mode Explictly Without LIBGS?
-
Verified
- Extreme PSXDEV User
- Posts: 221
- Joined: Oct 21, 2021
- I am a: Programmer, Gamer
- PlayStation Model: SCPH-1000
- Location: USA
- Contact:
Setting PAL Or NTSC Video Mode Explictly Without LIBGS?
Has anyone figured out a way to do the PAL/NTSC auto-detect without libgs entirely? The only examples I've seen seem to require it. LibGS adds some bloat and my project doesn't really need anything from it right now besides possibly the functions for the auto-detect code.
Last edited by alexfree on November 29th, 2022, 9:13 am, edited 1 time in total.
Well, yes, but it depends on what you want to detect.
To detect the mainboard/hardware region:
CDROM Test command 19h,22h (if supported)
BIOS Version string at BFC7FF32h (if present)
To detect the cdrom/game region:
Licence String on Sector 4
EXE Header
To detect the current state (assuming that the game or bootrom has already initialized the GPU):
GPUSTAT register bit20
To detect the mainboard/hardware region:
CDROM Test command 19h,22h (if supported)
BIOS Version string at BFC7FF32h (if present)
To detect the cdrom/game region:
Licence String on Sector 4
EXE Header
To detect the current state (assuming that the game or bootrom has already initialized the GPU):
GPUSTAT register bit20
- masterg0r0
- Active PSXDEV User
- Posts: 66
- Joined: Jul 18, 2021
- I am a: Programmer
- Motto: They see me rollin'
- PlayStation Model: 7502
Thanks nocash also, hope you're doing well.
Last edited by masterg0r0 on December 2nd, 2022, 1:31 pm, edited 1 time in total.
PSX Dev. Console: SCPH-7502 (PAL), MM3, Xplorer with Caetla 0.38.
-
Verified
- Extreme PSXDEV User
- Posts: 221
- Joined: Oct 21, 2021
- I am a: Programmer, Gamer
- PlayStation Model: SCPH-1000
- Location: USA
- Contact:
Perhaps I worded that poorly. I meant a way to specify PAL or NTSC video mode without LIBGS. I know how to figure out the hardware i've updated the title to reflect this.nocash wrote: ↑November 24th, 2022, 6:24 pm Well, yes, but it depends on what you want to detect.
To detect the mainboard/hardware region:
CDROM Test command 19h,22h (if supported)
BIOS Version string at BFC7FF32h (if present)
To detect the cdrom/game region:
Licence String on Sector 4
EXE Header
To detect the current state (assuming that the game or bootrom has already initialized the GPU):
GPUSTAT register bit20
There is some 'auto-detect' code that specifies what video mode to put the console in floating around, but it uses LIBGS. For example here: http://www.psxdev.net/forum/viewtopic.php?t=242#top
Code: Select all
// automatic video mode control
if (*(char *)0xbfc7ff52=='E') // SCEE string address
{
// PAL MODE
SCREEN_WIDTH = 320;
SCREEN_HEIGHT = 256;
if (DEBUG) printf("Setting the PlayStation Video Mode to (PAL %dx%d)\n",SCREEN_WIDTH,SCREEN_HEIGHT,")");
SetVideoMode(1);
SsSetTickMode(SS_TICK50); // sound tempo ticks at 50Hz
if (DEBUG_DISPLAY) printf("Video Mode is (%d)\n",GetVideoMode());
}
else
{
// NTSC MODE
SCREEN_WIDTH = 320;
SCREEN_HEIGHT = 240;
if (DEBUG) printf("Setting the PlayStation Video Mode to (NTSC %dx%d)\n",SCREEN_WIDTH,SCREEN_HEIGHT,")");
SetVideoMode(0);
SsSetTickMode(SS_TICK60); // sound tempo ticks at 60Hz
if (DEBUG_DISPLAY) printf("Video Mode is (%d)\n",GetVideoMode());
}
For setting the screen resolution, decide which screen resoltion you want to use, then initialize the GP1 registers accurdingly:
http://problemkaputt.de/psxspx-gpu-disp ... ds-gp1.htm
The PAL centering method is using "what looks best on your TV and don't care about anybody else".
In case of doubt, just keep using the same values that you are currently using (eg. as shown in no$psx I/O map window).
http://problemkaputt.de/psxspx-gpu-disp ... ds-gp1.htm
The PAL centering method is using "what looks best on your TV and don't care about anybody else".
In case of doubt, just keep using the same values that you are currently using (eg. as shown in no$psx I/O map window).
-
Verified
- Extreme PSXDEV User
- Posts: 221
- Joined: Oct 21, 2021
- I am a: Programmer, Gamer
- PlayStation Model: SCPH-1000
- Location: USA
- Contact:
Thanks a lot, that tells me how to do it. Solved.nocash wrote: ↑December 1st, 2022, 7:58 am For setting the screen resolution, decide which screen resoltion you want to use, then initialize the GP1 registers accurdingly:
http://problemkaputt.de/psxspx-gpu-disp ... ds-gp1.htm
The PAL centering method is using "what looks best on your TV and don't care about anybody else".
In case of doubt, just keep using the same values that you are currently using (eg. as shown in no$psx I/O map window).
Who is online
Users browsing this forum: Google [Bot] and 2 guests