| |
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.... |
| |
Oswald
Registered: Apr 2002 Posts: 5086 |
"64k ram system" doesnt gets pushed down, stays vertically in its place is this normal ? |
| |
HCL
Registered: Feb 2003 Posts: 727 |
http://codebase64.org/doku.php?id=base:repeating_char-lines
..and as a plus, you don't necessarily need a badline at the top of the screen.. You can reuse the last charline from previous frame. Crest made a demo about that.. Which one was it?!? hmm..
<edit>Ah.. here it is :) Just an Illusion </edit> |
| |
Frantic
Registered: Mar 2003 Posts: 1647 |
Hehe.. that was a nice one (from that codebase article):
ldx #0 ; Make raster unstable again :)
inc *-1
inx
bne *-1
|
| |
Oswald
Registered: Apr 2002 Posts: 5086 |
HCL, nice ! Timing seems to be the same as in my routine. Guess you cooked it up in 5 minutes, I needed an hour of "I have no idea what I'm doing" :) |
| |
Digger
Registered: Mar 2005 Posts: 427 |
So, doing it Crossbow's way, it would be possible to use charset for chars 0-4 (that would be otherwise used for 40 screen chars for that line). Once VIC reads it, it can be filled again with charset data.
Trying to think of what would be the practical use for that other than memory saving... Could do a huge 256x25 chars side mover that takes virtually no rastertime... Or hires 64x25 char with ECM... Any other ideas? |
| |
Oswald
Registered: Apr 2002 Posts: 5086 |
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. |
| |
ChristopherJam
Registered: Aug 2004 Posts: 1408 |
Quoting DiggerSo, doing it Crossbow's way, it would be possible to use charset for chars 0-4 (that would be otherwise used for 40 screen chars for that line). Once VIC reads it, it can be filled again with charset data.
Eh, if you use char indices 5-44 then definitions 0 to 4 are never used anyway :)
Quote:Trying to think of what would be the practical use for that other than memory saving... Could do a huge 256x25 chars side mover that takes virtually no rastertime... Or hires 64x25 char with ECM... Any other ideas?
It's also handy if you just don't have enough CPU cycles free to DMA the indices; Reutastic spends the first 3/4 of each raster updating the sprite colours for the free-colour graphic on the right; the colour attributes for the stretch effect on the left are only fetched once at the start of the screen (the stretch itself is just REU blatting, mind). |
| |
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 |
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 - Next |