Re: [stella] A timing question...

Subject: Re: [stella] A timing question...
From: Erik Mooney <erik@xxxxxxxxxx>
Date: Tue, 17 Jul 2001 01:18:27 -0400
On Sat, 07 Jul 2001 04:30:25 -0000, you wrote:

>Hey everybody,
>
>  I'm working on a little program for the 2600 and have a few questions 
>relating to timing and NTSC/PAL stuffs.
>
>How can I make a timer that lasts roughly 1 second in real time but is not 
>frame based in it's timing so that it functions independently of frame rate?

Can't really do that on the VCS.  The TIM1024T timer counts down every
1024 machine cycles, and can be initialized with a value up to 255.  So
the longest hardware timer you can get is only about 0.2 seconds.

>Is the internal timing of the machine cycles based on the television's 
>timing?  i.e. machine cycles last a different anmount of real-time on NTSC 
>vs PAL VCSs.  Anybody?

The timings are the same horizontally.  Vertical timings are different,
but on the VCS, the game software controls that timing; that is, it
decides when to end a frame and begin a new one, and how many times per
second to do that.

>I'm trying to make a little program to use as a header for a game I'm 
>working on that would automatically detect NTSC/PAL format and adjust within 
>software to suit the setup it's facing.

On the VCS, software cannot detect what format the television is.  The
best you can do is provide a difficulty or color/BW (most common method
for us homebrewers) switch for the user to tell the game whether to run in
NTSC or PAL.

>The problem is I'm not sure if the 
>TIM timers are based on the machine cycles which are based on the 
>television's speed or if the timers are independant of the television.  My 
>idea was to write a simple "frame" and loop it.  Then I set a timer for 

The chronological length of the "frame" is exactly as long as your
software makes it.

-
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/

Current Thread