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 > $d011 stretching
2006-12-05 08:16
Radiant

Registered: Sep 2004
Posts: 639
$d011 stretching

As far as I've understood, you can stretch the last line of a char by altering $d011, again brought to my attention by the discussion about opening the sideborder while having many sprites on a graphics screen. I've checked the VIC Article and some other sources, but haven't found anything on how or why this works. Doing a simple FLD causes the VIC-II to just do idle reads from $3fff instead of repeating the last line, right? Has it got anything to do with the linecrunching technique, i.e. aborting the badline and then repeatedly doing FLD after that?
 
... 7 posts hidden. Click here to view all posts....
 
2006-12-07 12:07
Graham
Account closed

Registered: Dec 2002
Posts: 990
Just incrementing $D011 so it never reaches a badline will cause FLD and not repeating of charlines.
2006-12-07 14:23
Cruzer

Registered: Dec 2001
Posts: 1048
@Graham: Doesn't that depend on where you start, as well as the number of cycles used per line or something? I usually just trial'n'error my way until it produces the result I need. I haven't really studied any VIC article or cycle tables very thoroughly, but maybe it would be a good idea.

As far as I know, all of the following tricks are possible with the same technique - incrementing $d011's y-scroll bits every line to avoid badlines:

- FLD: Pushes the gfx down, and replaces it with ghost byte on the affected area.
- Bitmap stretching
- Color stretching, which doesn't affect the bitmap gfx
- Line crunching, which makes the updating of bitmap gfx jump 8 lines down for each rasterline
2006-12-07 15:28
Oswald

Registered: Apr 2002
Posts: 5094
color stretching = fli ?
2006-12-07 15:41
JackAsser

Registered: Jun 2002
Posts: 2014
Quote: color stretching = fli ?

nono... color stretching as cruzer said avoids badlines, hence no new fetches hence same colors all the way down the bitmap.
2006-12-08 07:20
Graham
Account closed

Registered: Dec 2002
Posts: 990
@Cruzer:

If the VIC never reaches a badline, it will simply start to display the ghostbyte. Everything else requires a badline condition at different cycles of the rasterline.
2006-12-08 09:11
Radiant

Registered: Sep 2004
Posts: 639
I also can't see how what Cruzer and JackAsser are proposing would work. I've never been able to repeat char rows without badlines nor seen anything about it, but perhaps it's possible?
2006-12-08 09:27
HCL

Registered: Feb 2003
Posts: 728
The "color-stretch" effect is commonly used in lots of demos. Don't know if you're really avoiding the badline, but you definitely avoid wasting any cycles on it :). Plus you don't get any new colors (in bitmap mode) or chars (in char mode).

My memory is weak today, but i know i used it in "Smart girls.." in the greetings-logo-zoomer, but that's just one way of using it..
2006-12-08 09:28
Graham
Account closed

Registered: Dec 2002
Posts: 990
If you use simple FLI timing and delay the DMA so much that 0 DMA cycles are left, you can repeat one charline without any badline. Now you can simply switch the charset for different graphics. This way you can display 4 color gfx without badlines and you only need 2 $D011 accesses per charline.
2006-12-08 09:29
HCL

Registered: Feb 2003
Posts: 728
Yeah, *burp* exactlywhatiwasgoingtosay.. ;)
2006-12-08 09:47
JackAsser

Registered: Jun 2002
Posts: 2014
So now RadiantX, go home and play with that $d011! and deliver a fantastic demo to us! :D
Previous - 1 | 2 - 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
psenough
Felidae/Reflex
The Syndrom/TIA/Pret..
Fred/Channel 4
wacek/arise
Sillicon/Unreal
Guests online: 121
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 X-Mas Demo 2024  (9.5)
7 Dawnfall V1.1  (9.5)
8 Rainbow Connection  (9.5)
9 Onscreen 5k  (9.5)
10 Morph  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Fullscreen Graphicians
1 Joe  (9.7)
2 Sulevi  (9.6)
3 The Sarge  (9.6)
4 Veto  (9.6)
5 Facet  (9.6)

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