[stella] NTSC - PAL porting guide

Subject: [stella] NTSC - PAL porting guide
From: Eckhard_Stolberg@xxxxxxxxxxxxxxxxxxxxx (Eckhard Stolberg)
Date: Sat, 8 Mar 1997 19:51:43 +0100
Hello there,

I would like to play all your new NTSC games also on my PAL system.
Therefore I have decided to write a little conversion guide.


Things to keep in mind when writing 2600 games: 

1. Do a Vsync in every frame. This way NTSC games will atleast display a
   stable picture on PAL systems. Early games only did the Vsync once and
   then went on counting 262 lines for each frame. While this works on NTSC
   systems and saves 3 lines for game logic, it only produces rolling
   pictures on PAL VCSs.

2. Have the Overall Lines/Vblank lines ratio right. NTSC normally has a
   ratio of 262/37 while PAL has 312/45 (plus 3 lines of Vsync for both).
   It is possible to reduce the number of overall lines, if you don't want
   to use them for game logic or display and therefore you can have a smaller
   number of Vblank lines. But if you get the ratio just a little bit wrong,
   there is the risk of loosing the colour signal. Because of this, I think,
   it is best use the normal number of lines for both TV systems. If you use
   a Tim64T timer loop for Vblank and overscan, converting between both
   systems should be as easy as just changing the timer value.

3. When converting from PAL to NTSC, you should take into account, that NTSC
   systems can only display a smaller number of lines. Therefore you should
   limit yourself to 192 lines of displayed graphics in PAL mode too. Or you
   should create your graphics in a way that allows you to remove enough
   lines to fit on a NTSC screen.

   Also the number of lines that can be used for gamelogic is smaller on
   NTSC systems. That is why you should do cycle counting for the worst case,
   if you are using any timeconsuming calculation loops.

4. NTSC systems operate at 60hz while PAL systems use 50hz. Because of this
   you have to redo all frame based timing. For example: if you are moving
   your spaceship in NTSC 5 pixel in every frame you need to move it 6 pixel
   per frame on a PAL machine. Or if you are doing anything every 6th frame
   on NTSC, you have to do it on every 5th frame on PAL to get the same speed.

5. This is not in the programmer's guide. PAL systems use a different form
   of colour encoding than NTSC ones do. The TIA chip seems to be the same
   on both systems, which leads to two totally different palettes. Based
   on Ed's SoundX source code for NTSC and on my own observation for PAL
   they are:

   NTSC                 PAL

   grey                 grey
   gold                 grey
   orange               gold
   red orange           yellow green
   pink                 orange brown
   purple               green
   blue purple          pink - red
   blue                 blue green
   blue2                purple
   light blue           turquoise
   turquoise            lilac 
   green blue           light blue
   green                purple blue  
   yellow green         blue
   orange green         grey
   light orange         grey

   I am not very good at discribing colours with words, so it would be nice,
   if someone else with a PAL system can verify or correct this.


I hope to see a PAL Okie Dokie or a PAL EdTris soon. :-)


Thanks, Eckhard Stolberg



--
To unsubscribe, send the word UNSUBSCRIBE in the body of a message to
stella-request@xxxxxxxxxxx

Current Thread