Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user Night-Crawler ! (Registered 2025-07-13) You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > PAL/NTSC Half Variance Stable Raster
2024-03-20 09:00
Fungus

Registered: Sep 2002
Posts: 752
PAL/NTSC Half Variance Stable Raster

I needed such a routine, and this is based on JackAssers, which also looks very very similar to crossbows. So I whipped this up real quick.

Hope someone can add it to codebase.

		ldx #$38
		cpx $d012
		bne *-3

		ldy #$09
		dey
		bne *-1
		cmp #$ea		;ntsc with nop nop
		bit $ea
		nop
		inx
		cpx $d012
		beq branch1
		nop
		nop
branch1
		ldy #$09
		dey
		bne *-1
		cmp #$ea		;ntsc with nop nop
		bit $ea
		nop
		inx
		cpx $d012
		beq branch2
		bit $ea
branch2
		ldy #$09
		dey
		bne *-1
		cmp #$ea		;ntsc with nop nop
		nop
		nop
		inx
		cpx $d012
		bne branch3
branch3
 
... 10 posts hidden. Click here to view all posts....
 
2024-03-24 12:22
Fungus

Registered: Sep 2002
Posts: 752
Well apparently it was off by 1 cycle for each stage, thanks to Jedi for using it and fixing it.

		ldx #$38
		cpx $d012
		bne *-3

		ldy #$09
		dey
		bne *-1
fix1
		cmp #$ea		;ntsc with nop nop
		nop
		nop
		inx
		cpx $d012
		beq branch1
		nop
		nop
branch1
		ldy #$09
		dey
		bne *-1
fix2
		cmp #$ea		;ntsc with nop nop
		nop
		nop
		inx
		cpx $d012
		beq branch2
		bit $ea
branch2
		ldy #$0a
		dey
		bne *-1
fix3
		cmp #$ea		;ntsc with nop nop
		inx
		cpx $d012
		bne branch3
branch3
2024-03-25 08:30
Oswald

Registered: Apr 2002
Posts: 5127
Quote: each "step" in the above code halves the jitter (variance), until it gone

thanks, I didnt know that I thought only 1 cycle flicker can be eliminated per go.
2024-03-25 12:44
JackAsser

Registered: Jun 2002
Posts: 2038
Quote: thanks, I didnt know that I thought only 1 cycle flicker can be eliminated per go.

If you have X cycle of jitter and make sure the middle of this jitter is on a raster line boundary you effectively half the jitter.
2024-03-25 13:47
Krill

Registered: Apr 2002
Posts: 3099
Quoting JackAsser
If you have X cycle of jitter and make sure the middle of this jitter is on a raster line boundary you effectively half the jitter.
Sort of like a binary search of the original raster position, which you compensate for as you go along. =)
Previous - 1 | 2 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
E$G/HF ⭐ 7
Response/Darklite
Paladin/G★P
csabanw
Guests online: 1655
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Codeboys & Endians  (9.7)
4 Mojo  (9.7)
5 Coma Light 13  (9.6)
6 Edge of Disgrace  (9.6)
7 Signal Carnival  (9.6)
8 Wonderland XIV  (9.6)
9 Uncensored  (9.5)
10 Comaland 100%  (9.5)
Top onefile Demos
1 Nine  (9.8)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.5)
6 Scan and Spin  (9.5)
7 Onscreen 5k  (9.5)
8 Grey  (9.5)
9 Dawnfall V1.1  (9.5)
10 Rainbow Connection  (9.5)
Top Groups
1 Artline Designs  (9.3)
2 Booze Design  (9.3)
3 Performers  (9.3)
4 Oxyron  (9.3)
5 Censor Design  (9.3)
Top Cover Designers
1 Duce  (9.8)
2 Electric  (9.8)
3 Junkie  (9.6)
4 The Elegance  (9.5)
5 Mermaid  (9.3)

Home - Disclaimer
Copyright © No Name 2001-2025
Page generated in: 0.036 sec.