Jump to content
IGNORED

PAL vs NTSC speed?


Coolcrab

Recommended Posts

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.
  • Like 1
Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • 3 weeks later...

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...