Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Unexpected linecrunch
2016-09-06 08:58
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....
 
2016-09-07 20:12
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?
2016-09-08 19:41
Digger

Registered: Mar 2005
Posts: 427
...and even forcing VIC to display 26 charlines :)
2016-09-09 10:06
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
2016-09-09 11:21
Oswald

Registered: Apr 2002
Posts: 5086
"64k ram system" doesnt gets pushed down, stays vertically in its place is this normal ?
2016-09-09 13:30
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>
2016-09-09 16:23
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
2016-09-09 19:21
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" :)
2016-09-09 20:49
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?
2016-09-10 05:25
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.
2016-09-10 05:46
ChristopherJam

Registered: Aug 2004
Posts: 1408
Quoting Digger
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.


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
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
Didi/Laxity
GuyGavin/HF
Guests online: 82
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Mojo  (9.6)
6 The Demo Coder  (9.6)
7 What Is The Matrix 2  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 Party Elk 2  (9.6)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.6)
5 Libertongo  (9.5)
6 Rainbow Connection  (9.5)
7 Onscreen 5k  (9.5)
8 Morph  (9.5)
9 Dawnfall V1.1  (9.5)
10 It's More Fun to Com..  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Nostalgia  (9.3)
5 Triad  (9.2)
Top Crackers
1 Mr. Z  (9.9)
2 Antitrack  (9.8)
3 OTD  (9.8)
4 Fungus  (9.8)
5 S!R  (9.8)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.056 sec.