Page 1 of 1

Quick question about NTSC and PAL timing

Posted: February 20th, 2013, 11:01 am
by DEBRO
Hi there,

Coming from the Atari2600 world of homebrewing we had to manipulate our sprite movements to accommodate the difference in NTSC (~60 FPS) and PAL (~50 FPS). Do you have to do this for the PlayStation when you have code that is dependent on FPS or does the machine handle it automatically? I hope I'm making sense.

Re: Quick question about NTSC and PAL timing

Posted: February 21st, 2013, 12:50 am
by Xavi92
AFAIK, the PlayStation does NOT handle this automatically, so you should have a header file somewhere in your source code as a reference. :shrug

Re: Quick question about NTSC and PAL timing

Posted: February 21st, 2013, 12:19 pm
by t0rxe
You can make two versions of the game that are PAL and NTSC and control it that way. This is how Sony wanted everyone to do it. A better way though, is to just control it all automatically in your code. Read the 'PlayStation Developers Guide' PDF which is in the Psy-Q DOCS folder.

Re: Quick question about NTSC and PAL timing

Posted: February 23rd, 2013, 3:01 pm
by DEBRO
Hi there,
torxe wrote:You can make two versions of the game that are PAL and NTSC and control it that way. This is how Sony wanted everyone to do it. A better way though, is to just control it all automatically in your code. Read the 'PlayStation Developers Guide' PDF which is in the Psy-Q DOCS folder.
Thank you. I read the "Guidelines for PlayStation PAL Titles" and this answered most of my questions.

I couldn't download the PSY-Q SDK because the bandwidth has been exceeded. Is there somewhere else I can download this?

Re: Quick question about NTSC and PAL timing

Posted: February 23rd, 2013, 4:22 pm
by Shadow
Links fixed. Thank you DEBRO :)

Re: Quick question about NTSC and PAL timing

Posted: February 24th, 2013, 9:44 am
by DEBRO
Hi there,
Shad0w wrote:Links fixed. Thank you DEBRO :)
Thank you for fixing the link. I have it now.
torxe wrote:You can make two versions of the game that are PAL and NTSC and control it that way. This is how Sony wanted everyone to do it. A better way though, is to just control it all automatically in your code. Read the 'PlayStation Developers Guide' PDF which is in the Psy-Q DOCS folder.
I looked in this document and just about every Psy-Q doc (they have some great information) but I couldn't find this. I must have overlooked it.

I do see that Bladelib auto detects a PAL system by looking for an "E" at location 0xbfc7ff52. Is this what your document suggests too?

Re: Quick question about NTSC and PAL timing

Posted: February 24th, 2013, 10:37 am
by t0rxe
"...\psyq\docs\technote\scee_dev.pdf"
Page 45 (4.4: General Implementation Tips)

3 Use VSync to lock the frame rate:
VSync(0), when the frame rate is 50 (60 for NTSC) frame/sec.
VSync(2), when the frame rate is 25 (30 for NTSC)frame/sec.
VSync(3), when the frame rate is 20 .. for NTSC frame/sec.
VSync(4), when the frame rate is 15 .. for NTSC frame/sec.

This should help you:

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());
}

Re: Quick question about NTSC and PAL timing

Posted: February 24th, 2013, 1:55 pm
by DEBRO
Hi there,
torxe wrote:"...\psyq\docs\technote\scee_dev.pdf"
Page 45 (4.4: General Implementation Tips)

3 Use VSync to lock the frame rate:
VSync(0), when the frame rate is 50 (60 for NTSC) frame/sec.
VSync(2), when the frame rate is 25 (30 for NTSC)frame/sec.
VSync(3), when the frame rate is 20 .. for NTSC frame/sec.
VSync(4), when the frame rate is 15 .. for NTSC frame/sec.

This should help you:

Code: Select all

// automatic video mode control
if (*(char *)0xbfc7ff52=='E')  // SCEE string address
.
.
.
Excellent...thank you!!

Re: Quick question about NTSC and PAL timing

Posted: May 8th, 2013, 10:47 am
by inc^lightforce
i always use "autodetect code".
if you need the source, i can send you the Lines.

cheers