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?
2006-12-05 08:50
JackAsser

Registered: Jun 2002
Posts: 1990
Do FLD, stretch the last line of the VIC, induce FLI are all the same trick on different cycles on the line actually. Just enable a stable raster and NOP to see the various effects.

Ofcourse with linecrunching and FLI you force a new badline each line, with FLD and stretching you postpone the badline. Check my part in Panta Rhei and my part in LCP Memories for the timing used to perform char stretching.
2006-12-05 09:06
Radiant

Registered: Sep 2004
Posts: 639
JackAsser: I'll check it out once I get home. How does stretching work technically; what makes the VIC repeat that one line, instead of just doing idle reads?
2006-12-05 11:32
yago

Registered: May 2002
Posts: 332
Please read the Vic-Article, if you want to know more about how $d011 fiddling works internally.

http://zimmers.net/cbmpics/cbm/c64/vic-ii.txt

2006-12-05 12:49
Oswald

Registered: Apr 2002
Posts: 5026
radiantx, $d011 stretching is dead easy, you dont even need a stable irq. unfortunately I cant tell you exactly how to do it, but if you start to experiment u'll find it in 15 minutes. The "basics" are that you can repeat a char row by setting the appropriate value into $d011. so you can do stuff like this:

(imagine this stuff verticale, each number is the raster line number within a char row)

112345678

1212345678

123412345678

etc. you can repeat rows unlimited times so u can do stuff like:

12312312312312345678

the only limit is that u can repeat a full row only once. u can repeat up to 7 rasterlines unlimitedly.

just play with $d011. (make sure u modify it somewhere at the left side)
2006-12-05 13:14
Radiant

Registered: Sep 2004
Posts: 639
yago: Already did, as stated in the first post. :-) I couldn't find info about how or why any $d011 tricks except FLD, FLI, VSP and Linecrunch work, though.

Oswald: I see, that was what I was doing when I was playing around yesterday, however it seemed to induce a badline every time the first row was repeated (as in FLI). The sideborder scroller in Bonanza for example hints that there is a way to do this kind of stretching without having those badlines, as there seems to be $d011 tweaking going on during those lines. Perhaps I did something wrong yesterday (like modifying it on the right side rather than left), I'll have another go at it.
2006-12-05 13:22
JackAsser

Registered: Jun 2002
Posts: 1990
@radiantx: yes, that includes a new bad line, i.e. you may switch $d018/$dd00 to get new graphics. You can however also stretch line 7 of a char, but ONLY that line without inducing new bad lines.

The char row repeat trick is basically FLI but done to early. With FLI you need very precise timing to make the counter move forward 40 bytes, if you perform the trick too early the counters won't move forward, and it will simply refetch from the same address.
2006-12-05 14:19
Cruzer

Registered: Dec 2001
Posts: 1048
I guess the sideborder scroller in Bonanza is done by incrementing $d011 so it never reaches a badline. That way the chars are repeated for each char line, but it's still possible to display normal bitmap, which just has the same colors on all char lines.
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: 5026
color stretching = fli ?
 
... 7 posts hidden. Click here to view all posts....
 
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
Exploding Fi../Techn..
DJ Gruby/TRiAD
Alakran_64
Guests online: 81
Top Demos
1 Next Level  (9.8)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.7)
5 Edge of Disgrace  (9.6)
6 Comaland 100%  (9.6)
7 Uncensored  (9.6)
8 No Bounds  (9.6)
9 Wonderland XIV  (9.6)
10 Bromance  (9.5)
Top onefile Demos
1 Layers  (9.7)
2 It's More Fun to Com..  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Rainbow Connection  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Booze Design  (9.3)
3 Censor Design  (9.3)
4 Crest  (9.3)
5 Performers  (9.3)
Top Coders
1 Axis  (9.8)
2 Graham  (9.8)
3 Lft  (9.8)
4 Crossbow  (9.8)
5 HCL  (9.8)

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