| |
ChristopherJam
Registered: Aug 2004 Posts: 1408 |
Unexpected linecrunch
I'm sure in the past I've displayed full screen FLI just by writing a new value to $d011 every 23 cycles, and using some of the intervening time to update $d018 (ie, writing to $d011 on what vic artikel refers to as cycle 14).
However, if I have sprites zero to five enabled, and am only writing d011 every second line, it appears that I need to perform the first $d011 write for new char rows at least one cycle earlier, lest I get a linecrunch.
Any idea what's going on here?
(every two lines, I'm running something like this:
lda#efy0+ 71:sta $d007
lda#d18v0
ldx#$38+1
ldy#0
sta $d018
sty VM0+$3f8:iny
sty VM0+$3f9:iny
sty VM0+$3fa:iny
sty VM0+$3fb:iny
sty VM0+$3fc:iny
sty VM0+$3fd:nop
stx $d011
Also: not sure if it's relevant, but I stabilise the interrupt by forcing a DMA one and a half lines before the first such block of code is run, ie the first block is preceded by
sta $d011 ; trigger badline just before effct starts; this one's just to stabilise
nop:nop:nop:nop:nop:nop ;extra nops because there's no sprite DMA at the end of the above DMA
|
|
... 57 posts hidden. Click here to view all posts.... |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: digger, Jackasser did horizontal twisters with this, so to change column's twist phase you only update the char pointer on top. He says tho he only used 7 line high rows doubling method.
That was my bro and he used 8 lines. I used similar tricks in my rotozoomer (Andropolis) but 7 lines because I wanted a bad line but still be on 00-39 offsets. During the 7 lines I calculate the new chars and since I know the offset always is 00-39 the inner-loop becomes much faster (Krill's idea, my implementation). That's also why the effect isn't full width, I only had time for lik 35 chars or so. As I side effect I can scroll the whole screen sideways almost for free. |
| |
Oswald
Registered: Apr 2002 Posts: 5086 |
Jackie, you lost me big time.
"I wanted a bad line but still be on 00-39 offsets"
why do you need a bad line if it just reloads the very same offsets ?
"During the 7 lines I calculate the new chars "
7 lines is not enough to redraw 35 complete chars, but if you calc new char pointers, how if its a fixed 00-39 ?! :) |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: Jackie, you lost me big time.
"I wanted a bad line but still be on 00-39 offsets"
why do you need a bad line if it just reloads the very same offsets ?
"During the 7 lines I calculate the new chars "
7 lines is not enough to redraw 35 complete chars, but if you calc new char pointers, how if its a fixed 00-39 ?! :)
You can refetch the char pointers, I.e. Badline without moving forward (if u do it on < line 7). Indeed I update char pointers but always on offset 00-39 |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: You can refetch the char pointers, I.e. Badline without moving forward (if u do it on < line 7). Indeed I update char pointers but always on offset 00-39
It's called FLI... ;) or may be not, I dunno. :P |
| |
Oswald
Registered: Apr 2002 Posts: 5086 |
ah I get it, awesome trick. :) |
| |
ChristopherJam
Registered: Aug 2004 Posts: 1408 |
Quoting JackAsser During the 7 lines I calculate the new chars and since I know the offset always is 00-39 the inner-loop becomes much faster (Krill's idea, my implementation).
I did something similar with Jam Ball 2, but for different reasons. The decruncher spits out a new set of char indices every five rasters, always to the same 15 locations. Address calculation wasn't an issue as the decruncher was completely unrolled, but this way I could put all of the screen chars in zero page. Saved 15 cycles per row, and also saved 984 bytes of RAM.
(hmm, that unrolled loop would have taken a lot more ram.. Must.. resist.. revisiting..) |
| |
Cruzer
Registered: Dec 2001 Posts: 1048 |
Great thread! I should check the CSDB forums more often. 😊 |
| |
HCL
Registered: Feb 2003 Posts: 727 |
..back to the original topic for a moment. FLI-timing *is* strange, if you start to fiddle with it. The usual FLI (each line) somehow works well with a periodic (23 cycle) write to $d011 to trigger badline. ..but if you reduce it to every 2:nd line or every 4:th line i recall the timing doesn't work the same way. I always wondered why, and i'm sure all those charts and diagrams explain why, but i rather just hammer on until it works and then i forget it :). |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: ..back to the original topic for a moment. FLI-timing *is* strange, if you start to fiddle with it. The usual FLI (each line) somehow works well with a periodic (23 cycle) write to $d011 to trigger badline. ..but if you reduce it to every 2:nd line or every 4:th line i recall the timing doesn't work the same way. I always wondered why, and i'm sure all those charts and diagrams explain why, but i rather just hammer on until it works and then i forget it :).
Same here, the pragmatic approach. |
| |
Radiant
Registered: Sep 2004 Posts: 639 |
I like hammering until it works, then I figure out why, and then I forget everything until next time. Repeat. |
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 - Next |