| |
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.... |
| |
Radiant
Registered: Sep 2004 Posts: 639 |
Idea: If you do linecrunch on the very first line of the screen and then retrigger the badline on cycle 54-57, what will happen? |
| |
Digger
Registered: Mar 2005 Posts: 427 |
...and even forcing VIC to display 26 charlines :) |
| |
Oswald
Registered: Apr 2002 Posts: 5086 |
It seems to be working top 3 row is the same row.
no stable raster, so I guess cycle 54-57 is not crucial. main is plotting the first char row in an endless loop, then I added some lda (),y lda (,x) shit to make sure it doesnt need stable.
$1a->d011:
4 cycles before the raster col changes on right side
$1b->d011:
in the next rasterline about on the same place (4cycles before raster col changes)
(sta d011 sta d020)
edit: stable is needed, I had jmp * instead of jmp main :P |
| |
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). |
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 - Next |