Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
  You are not logged in - nap
Timercompare NTSC vs. PAL   [2020]

Timercompare NTSC vs. PAL Released by :
The Solution

Release Date :
5 November 2020

Type :
C64 Misc.

User rating:awaiting 8 votes (8 left)

Credits :
Code .... Copyfault of Dienstagstreff, The Obsessed Maniacs, The Solution

Download :

Look for downloads on external sites:
 Pokefinder.org


Summary
Submitted by Copyfault on 5 November 2020
Added a colfix-version that initialises $d8xx to avoid "hidden" chars on older machines.
Since init takes longer now, the values at $0cf0 have changed accordingly (line $075, timerval=$22 on PAL; line $072, timerval=$3d on NTSC).
Summary
Submitted by Copyfault on 5 November 2020
This is yet another test program I created for examining how cycles are distributed over a rasterline, with special focus on comparing NTSC- with PAL-VIC-chips.

On init, the VIC-type is detected and a timer is configured accordingly (continuous mode cycle count, $3e on PAL/$40 on NTSC). After init, a RASTER IRQ is fired every frame on line $2f.

The IRQ-routine is structured as follows:
(dejittering)          // stable @cyc#43, line $2f
STX $D020              // mark the stable pos with colour X=$e
(delay(0..127 cycles)) // delay value is increased every frame and wraps after 127
NOP
LDA timer
LDY #$00
STY $D020
...
The read timer value now reveals at which cycle the last R-cycle of the [LDA timer] happend.


While the values I "measured" this way were on par with what I expected on PAL, it gave me a surprising insight in the distribution of VIC-cycles on NTSC-machines.

Explanation of the screen output:
$0cf0..$0cf2:
raster- and cycle position after init; should be the same every time the test is run (rasterline=$00c, timer-value=$1d(PAL)|$29(NTSC))
$0cf3:
"alive counter" for main thread (with opcodes chosen to stress the dejitter routine)
$0d00..$0d7f:
timer values read with different delays in the IRQ
Basically delay = lo-byte of $0dxx, so $0d00 shows the value for delay=0, $0d01 the value for delay=1, etc.

The numbers on the upper part of the screen give the char-position and are added just for orientation; same holds for the raster beam above the first charline. Mind that the colour is reset 6 cycles after the timer value is fetched, so the end of the raster beam does not coincide with the timer-value fetch.

All sprites are enabled as default. You can alter the constant ACTIVESPRITEMASK in the source-code to play around with other sprite settings.

As a final note, it should be mentioned that the test program only works for PAL and new NTSC-versions (those with 65cycles/rasline). 64-cycle-NTSC-chips or Drean-machines will f**k up the timer for sure!
Search CSDb
Advanced
Navigate
Prev - Random - Next
Detailed Info
· Summaries (2)
· User Comments
· Production Notes
Fun Stuff
· Goofs
· Hidden Parts
· Trivia
Forum
· Discuss this release
Support CSDb
Help keep CSDb running:



Funding status:




About this site:
CSDb (Commodore 64 Scene Database) is a website which goal is to gather as much information and material about the scene around the commodore 64 computer - the worlds most popular home computer throughout time. Here you can find almost anything which was ever made for the commodore 64, and more is being added every day. As this website is scene related, you can mostly find demos, music and graphics made by the people who made the scene (the sceners), but you can also find a lot of the old classic games here. Try out the search box in the top right corner, or check out the CSDb main page for the latest additions.
Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.082 sec.