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 > Picture without badlines.
2018-02-08 10:15
Golara
Account closed

Registered: Jan 2018
Posts: 212
Picture without badlines.

In the last part of Time Machine by Booze Design HCL says that the picture looks very colorful despite not having any badlines. How is that possible to have pictures without badlines ? Lack of badlines causes FLD effect, right ?
2018-02-08 12:07
Trash

Registered: Jan 2002
Posts: 122
In bitmapmode you can stretch the last badline read by the VIC without distorting the bitmap. This is done by doing a "fld" at the right cycle, the downside is that that cycle is used for reading sprite 0 resulting in that you can only have seven sprites in the border and two colors (or three + d021 in multicolor) per column on the bitmap.

There is an early example of this effect made by a swedish group (I think it was Triad or Horizon) containing a seven sprite scroller over the Tetris-image. someone else might remember what it is called.
2018-02-08 12:13
AmiDog

Registered: Mar 2003
Posts: 97
I was actually thinking about this myself a while ago for totally different reasons. I think one badline/frame is the minimum to show a bitmap. After the first badline, it should be possible to change the yscroll just as for FLI, but instead to make sure there never is a match and thus no more badlines, right? Would result in the same colors for the entire picture I guess. I wonder if that first badline could be avoided too somehow... (Not for the first frame since the color data needs to be fetched alteast once, but for the following frames.)
2018-02-08 12:28
Trash

Registered: Jan 2002
Posts: 122
Quote: I was actually thinking about this myself a while ago for totally different reasons. I think one badline/frame is the minimum to show a bitmap. After the first badline, it should be possible to change the yscroll just as for FLI, but instead to make sure there never is a match and thus no more badlines, right? Would result in the same colors for the entire picture I guess. I wonder if that first badline could be avoided too somehow... (Not for the first frame since the color data needs to be fetched alteast once, but for the following frames.)

Like this one: Just an Illusion
2018-02-08 12:39
Golara
Account closed

Registered: Jan 2018
Posts: 212
That's cool. I Guess then you can display fullscreen grayscale pics with lots of free cycles.
2018-02-08 12:56
Golara
Account closed

Registered: Jan 2018
Posts: 212
Semi related question... Let's say normal badline starts at line 1, then 9. If I cause a badline at line 4 doing FLI, will the next badline still happen at line 9, or does the counter restart and it will happen at 12 ?
2018-02-08 13:11
lft

Registered: Jul 2007
Posts: 369
There are two different things in play. There's a counter (called RC in the vic article) going from 0 to 7 during each character row. Then there's the current Y-position (in d012).

Badlines occur when YSCROLL (low bits of d011) matches d012.

RC is reset if there's a badline condition on cycle 14. When doing FLI, you change YSCROLL to create a badline condition just after that, so the counter doesn't reset. But if you then leave YSCROLL at the new value, it's gonna match d012 eight lines later, i.e. at line 12 in your example.



VIC timing chart
2018-02-08 14:29
Golara
Account closed

Registered: Jan 2018
Posts: 212
So if I cause badline at exactly cycle 14 (the last sta $d011 cycle is at cycle 14) then I'll cause a badline and reset RC at the same time, correct ? Will I read the next text line from pixel 0 or the same text line from 0 ?
2018-02-08 14:45
Oswald

Registered: Apr 2002
Posts: 5022
basicly you are repeating the first screen row.

similar topic:

https://csdb.dk/forums/index.php?roomid=11&topicid=119133&first..


also the bitmap is not restricted to 4 colors, only each char column is restricted to 4 colors, because of displaying the same row of color attributes in all rows.
2019-11-05 15:33
ready.

Registered: Feb 2003
Posts: 441
I tried to display a bitmap without badlines as described above: I have the following code running inside a stable IRQ, with $dc04 timer counting rasterline cycles from 62 to 0 (62 is in the leftmost positon, 0 on the right):
lda #$3a ;%010
sta $d020
ldx $dc04
;raster = $033 (%011), $d011 = $3b (%011), $dc04 = 5 --> 62-5 = 57--> means cycle of rasterline 57+1=58
sta $d011
lda $d012
cmp $d012
beq *-3
lda #$3b
sta $d011
sta $d020
following the above linked thread I understood that $d011 should be changed around cycle 57 of a badline so that least significant bits of $d011 do not match with $d012 same bits.
As first test I tried to get rid of one badline only, but all I get is a black line 8 pixels high right below raster $033. I expected it to be filled with previous colors fetched by preceeding badline, instead.
What I am doing wrong?
2019-11-05 16:14
Peacemaker

Registered: Sep 2004
Posts: 243
Quote: In bitmapmode you can stretch the last badline read by the VIC without distorting the bitmap. This is done by doing a "fld" at the right cycle, the downside is that that cycle is used for reading sprite 0 resulting in that you can only have seven sprites in the border and two colors (or three + d021 in multicolor) per column on the bitmap.

There is an early example of this effect made by a swedish group (I think it was Triad or Horizon) containing a seven sprite scroller over the Tetris-image. someone else might remember what it is called.


do you remember the demoname now? would be nice. thanks
 
... 39 posts hidden. Click here to view all posts....
 
Previous - 1 | 2 | 3 | 4 | 5 - 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
www.gb64.com
Apollyon/ALD
Scrap/Genesis Project
iceout/Avatar/HF
Guests online: 143
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 Dawnfall V1.1  (9.5)
8 Quadrants  (9.5)
9 Daah, Those Acid Pil..  (9.5)
10 Birth of a Flower  (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 Graphicians
1 Sulevi  (10)
2 Mirage  (9.8)
3 Lobo  (9.7)
4 Mikael  (9.7)
5 Archmage  (9.7)

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