Jump to content

Photo

PAL vs NTSC speed?


9 replies to this topic

#1 Coolcrab OFFLINE  

Coolcrab

    Chopper Commander

  • 185 posts
  • Location:Stockholm

Posted Mon Feb 26, 2018 4:21 AM

Is there a definitive number on what the speed difference is between PAL and NTSC games? 

I know that NES games have it, but I can't find a number for the 2600. But my PAL version game does seem slower. 



#2 DirtyHairy OFFLINE  

DirtyHairy

    Moonsweeper

  • 429 posts
  • Location:Germany

Posted Mon Feb 26, 2018 5:24 AM

The ratio between NTSC and PAL is 131 / 130 (262 scanlines * 60 Hz vs. 312 scanlines * 50 Hz). The CPU clock is derived from the pixel clock, so this directly translates into a speed difference :)


Edited by DirtyHairy, Mon Feb 26, 2018 5:25 AM.


#3 Coolcrab OFFLINE  

Coolcrab

    Chopper Commander

  • Topic Starter
  • 185 posts
  • Location:Stockholm

Posted Mon Feb 26, 2018 9:58 AM

Oh so its negligible? I might have imagined the difference then. 



#4 kdgarris OFFLINE  

kdgarris

    Moonsweeper

  • 333 posts

Posted Mon Feb 26, 2018 10:41 AM

Standard PAL is about 83% of the speed as NTSC, so it's a big enough difference to be noticed in some cases.  Also note that many people make "PAL60" versions of games with PAL colors and NTSC timing to avoid the discrepancy. 



#5 SpiceWare OFFLINE  

SpiceWare

    Draconian

  • 12,268 posts
  • Medieval Mayhem
  • Location:Planet Houston

Posted Mon Feb 26, 2018 11:06 AM

To keep the speed the same use fractional movement with different movement tables for NTSC and PAL, or PAL60.  I used fractional in Medieval Mayhem, snippet from the fireball speed table below, and PAL60 on everything since in part due to a couple Medieval Mayhem reviews that called out the game for not using the full screen on PAL TVs.  For progressive images, like what the Atari generates, PAL shows about 50 scanlines more detail than NTSC.  For interlaced images, like broadcast TV, PAL shows about 100 scanlines more which is very noticeable on an HDTV. 
 
 

IF COMPILE_VERSION = NTSC
 ...
        .byte #<  634; speed: 3.5 direction: 28
        .byte #<  742; speed: 3.5 direction: 29
        .byte #<  826; speed: 3.5 direction: 30
        .byte #<  878; speed: 3.5 direction: 31
 ELSE 
 ; PAL speed/direction tables 
 ...
        .byte #<  760; speed: 3.5 direction: 28
        .byte #<  890; speed: 3.5 direction: 29
        .byte #<  991; speed: 3.5 direction: 30
        .byte #< 1054; speed: 3.5 direction: 31
ENDIF  

 

The speeds are 2 byte values with the upper byte being the integer portion of the value.

NTSC = 634 * 60fps / 256 = 148.6 pixels per second
PAL = 760 * 50fps / 256 = 148.4 pixels per second

For comparison, if I didn't use a different speed table for PAL
PAL = 634 * 50fps / 256 = 123.8

the fireball would move 25 fewer pixels per second.



#6 Gemintronic OFFLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • 8,955 posts

Posted Mon Feb 26, 2018 1:00 PM

Did anyone figure out code to detect PAL or NTSC?

 

Would be great for batari BASIC games so we can adjust the colors and movement speed.  Even PAL60 is a hassle finding compromise settings.



#7 SpiceWare OFFLINE  

SpiceWare

    Draconian

  • 12,268 posts
  • Medieval Mayhem
  • Location:Planet Houston

Posted Mon Feb 26, 2018 1:24 PM

Did anyone figure out code to detect PAL or NTSC?

 
Draconian detects NTSC/PAL/SECAM by using a timer on the ARM in the Harmony/Melody. You can read about that in blog entries menu's back in place and Progress on game screen. My PAL conversion table uses SeaGtGruff's color values:

const unsigned char NTSCtoPAL[16] =
{
  // SeaGtGruff's conversion values from this post at AtariAge:
  // http://atariage.com/forums/topic/165424-modify-colour-palette/?p=2043124
  0x00, 0x20, 0x20, 0x40, 0x60, 0x80, 0xa0, 0xc0,
  0xd0, 0xb0, 0x90, 0x70, 0x50, 0x30, 0x30, 0x20
};

 

while my own values are used for SECAM:

const unsigned char NTSCtoSECAM[16] =
{
  0x0e,   // 0 = white            e = white
  0x0c,   // 1 = yellow           c = yellow
  0x0c,   // 2 = yellowish orange c = yellow
  0x04,   // 3 = reddish orange   4 = red
  0x04,   // 4 = red              4 = red
  0x06,   // 5 = reddish purple   6 = purple
  0x06,   // 6 = purple           6 = purple
  0x06,   // 7 = bluish purple    6 = purple
  0x02,   // 8 = blue             2 = blue
  0x02,   // 9 = blue             2 = blue
  0x0a,   // a = bluish cyan      a = cyan
  0x0a,   // b = cyan             a = cyan
  0x08,   // c = green            8 = green
  0x08,   // d = green            8 = green
  0x08,   // e = olive green      8 = green
  0x0c    // f = brown            c = yellow
};

 
For PAL the upper nybble (chroma) of the original NTSC color is converted, the lower nybble (luma) is left the same. For SECAM the upper nybble is converted, the lower value is discarded - however, if the original NTSC color is 0 or 1 then it converts to 0 (black) instead of using the table.

 

The DPC+ kernel for bB could probably be updated to support this. Spice C will have it built in. 



#8 DirtyHairy OFFLINE  

DirtyHairy

    Moonsweeper

  • 429 posts
  • Location:Germany

Posted Mon Feb 26, 2018 3:59 PM

Oh so its negligible? I might have imagined the difference then. 

 

 

Standard PAL is about 83% of the speed as NTSC, so it's a big enough difference to be noticed in some cases.  Also note that many people make "PAL60" versions of games with PAL colors and NTSC timing to avoid the discrepancy. 

 

 

The numbers I quote for the actual CPU speed are pretty much correct (the official numbers in the Stella programmers guide are slightly different, something like 1.009 vs. 1.008). The 83% difference refers to the frame rate. The effect on game speed depends on the algorithm that controls game state. The 83% difference will only apply if the game clock is advanced by the same fixed amount each frame on both PAL and NTSC ;)


Edited by DirtyHairy, Mon Feb 26, 2018 3:59 PM.


#9 kdgarris OFFLINE  

kdgarris

    Moonsweeper

  • 333 posts

Posted Tue Feb 27, 2018 5:39 AM

Yes - I should have been more clear that I was specifically talking about frame rate here.

#10 arcade_lights OFFLINE  

arcade_lights

    Space Invader

  • 36 posts

Posted Mon Mar 19, 2018 4:59 PM

Slightly off-topic, but if you're already discussing PAL vs NTSC, I was wondering does anyone here know for sure are there any PAL carts without the little "p" on the end label, or after CX number. I'm from PAL region and some guy in my proximity is selling some carts that don't have any PAL tags on them, so I figure they're probably NTSC, but I'm not sure. Could they be PAL by any chance? I could ask the guy my self but I don't really trust him cause he doesn't have a good feedback from customers.






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users