| |
Fungus
Registered: Sep 2002 Posts: 697 |
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
|
|
... 4 posts hidden. Click here to view all posts.... |
| |
chatGPZ
Registered: Dec 2001 Posts: 11433 |
beware of broken emulators :) |
| |
Krill
Registered: Apr 2002 Posts: 2997 |
Quoting chatGPZbeware of broken emulators :) The other way around. Broken eumlators, beware! =) |
| |
chatGPZ
Registered: Dec 2001 Posts: 11433 |
you make Ian cry :( |
| |
Oswald
Registered: Apr 2002 Posts: 5103 |
btw never occured to me until now, but wtf is half variance |
| |
chatGPZ
Registered: Dec 2001 Posts: 11433 |
each "step" in the above code halves the jitter (variance), until it gone |
| |
mankeli
Registered: Oct 2010 Posts: 146 |
Fixed link to Quiss+Copyfault's ingenious 8-byte sync method |
| |
Fungus
Registered: Sep 2002 Posts: 697 |
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
|
| |
Oswald
Registered: Apr 2002 Posts: 5103 |
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. |
| |
JackAsser
Registered: Jun 2002 Posts: 2020 |
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. |
| |
Krill
Registered: Apr 2002 Posts: 2997 |
Quoting JackAsserIf 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 |