| |
Timercompare NTSC vs. PAL [2020] |
User rating: | awaiting 8 votes (8 left) |
Credits :
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 |
| Navigate | |
|
| Detailed Info | |
· Summaries (2)
· User Comments
· Production Notes
|
|
| Fun Stuff | |
· Goofs · Hidden Parts · Trivia
|
|
| Forum | |
|
| Support CSDb | |
|
| |
|