Quick question about NTSC and PAL timing

Graphic based area of development (Graphics Processing Unit), including the Geometry Transform Engine (GTE), TIM, STR (MDEC), etc.
Post Reply
DEBRO
Curious PSXDEV User
Curious PSXDEV User
Posts: 17
Joined: Feb 05, 2013

Quick question about NTSC and PAL timing

Post by DEBRO » February 20th, 2013, 11:01 am

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.

Xavi92
C Programming Expert
C Programming Expert
Posts: 161
Joined: Oct 06, 2012
PlayStation Model: SCPH-5502
Contact:

Post by Xavi92 » February 21st, 2013, 12:50 am

AFAIK, the PlayStation does NOT handle this automatically, so you should have a header file somewhere in your source code as a reference. :shrug

User avatar
t0rxe
C Programming Expert
C Programming Expert
Posts: 139
Joined: Dec 19, 2012
Motto: /\OX[]
PlayStation Model: SCPH-5502
Location: Australia

Post by t0rxe » February 21st, 2013, 12:19 pm

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.
"Nostalgia isn't a big enough word to describe the PlayStation from my eyes"

DEBRO
Curious PSXDEV User
Curious PSXDEV User
Posts: 17
Joined: Feb 05, 2013

Post by DEBRO » February 23rd, 2013, 3:01 pm

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?

User avatar
Shadow
Admin / PSXDEV
Admin / PSXDEV
Posts: 2670
Joined: Dec 31, 2012
PlayStation Model: H2000/5502
Discord: Shadow^PSXDEV

Post by Shadow » February 23rd, 2013, 4:22 pm

Links fixed. Thank you DEBRO :)
Development Console: SCPH-5502 with 8MB RAM, MM3 Modchip, PAL 60 Colour Modification (for NTSC), PSIO Switch Board, DB-9 breakout headers for both RGB and Serial output and an Xplorer with CAETLA 0.34.

PlayStation Development PC: Windows 98 SE, Pentium 3 at 400MHz, 128MB SDRAM, DTL-H2000, DTL-H2010, DTL-H201A, DTL-S2020 (with 4GB SCSI-2 HDD), 21" Sony G420, CD-R burner, 3.25" and 5.25" Floppy Diskette Drives, ZIP 100 Diskette Drive and an IBM Model M keyboard.

DEBRO
Curious PSXDEV User
Curious PSXDEV User
Posts: 17
Joined: Feb 05, 2013

Post by DEBRO » February 24th, 2013, 9:44 am

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?

User avatar
t0rxe
C Programming Expert
C Programming Expert
Posts: 139
Joined: Dec 19, 2012
Motto: /\OX[]
PlayStation Model: SCPH-5502
Location: Australia

Post by t0rxe » February 24th, 2013, 10:37 am

"...\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());
}
"Nostalgia isn't a big enough word to describe the PlayStation from my eyes"

DEBRO
Curious PSXDEV User
Curious PSXDEV User
Posts: 17
Joined: Feb 05, 2013

Post by DEBRO » February 24th, 2013, 1:55 pm

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!!

User avatar
inc^lightforce
Psy-Q Enthusiast
Psy-Q Enthusiast
Posts: 248
Joined: Mar 07, 2013
I am a: Programmer Windows+PS1, GFX Artist
PlayStation Model: Black
Location: Germany

Post by inc^lightforce » May 8th, 2013, 10:47 am

i always use "autodetect code".
if you need the source, i can send you the Lines.

cheers

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests