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: 5018
color stretching = fli ?
2006-12-07 15:41
JackAsser

Registered: Jun 2002
Posts: 1989
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: 716
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: 716
Yeah, *burp* exactlywhatiwasgoingtosay.. ;)
2006-12-08 09:47
JackAsser

Registered: Jun 2002
Posts: 1989
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
Martin Piper
Didi/Laxity
Durandal
O'Dog
Guests online: 120
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Memento Mori  (9.6)
10 Bromance  (9.5)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Rainbow Connection  (9.5)
7 Wafer Demo  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Nostalgia  (9.3)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top NTSC-Fixers
1 Pudwerx  (10)
2 Booze  (9.7)
3 Stormbringer  (9.7)
4 Fungus  (9.6)
5 Grim Reaper  (9.3)

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