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 > Bad Line Condition
2005-09-12 18:15
Devia

Registered: Oct 2004
Posts: 401
Bad Line Condition

I'm relatively new to C64 coding so bear with me if I sound like a complete n00b :)

..so I was going through Christian Bauer's VIC doc to learn some trix and I stumbled upon the following definition:

"A Bad Line Condition is given at any arbitrary clock cycle, if at the negative edge of ø0 at the beginning of the cycle RASTER >= $30 and RASTER <= $f7 and the lower three bits of RASTER are equal to YSCROLL and if the DEN bit was set during an arbitrary cycle of raster line $30."

Im my attempts to code some really fancy effect >8oD ..I needed to locate a Bad Line and referred to the above mentioned text. When the result was not what I expected, I did some tests:

Now.. the default value of $d011 is $1b. I put an uppercase 'A' at $0400 to verify that the top of the 'A' is adjacent with the top border. I then put a sprite at Y=$33 to verify that the first visible line is $32.

My question now is: How can Christian Bauer's definition be true if the first Bad Line is at $32 (low 3 bits of $d012=%010) when $d011=$1b (low 3 bits of $d011=%011)?

2005-09-12 19:32
Cybernator

Registered: Jun 2002
Posts: 154
Not sure if I understand your question correctly, but you seem to be confused by sprite positioning. Recall that sprites appear one rasterline lower than their actual Y coord. E.g. if you set $d001 to $33, the sprite will appear at rasterline $34. When $d011 is set to $1b, the first badline (and first "visible" line) indeed appears at rasterline $33.

If I misunderstood, sorry for boring to death. ;)
2005-09-12 19:53
Devia

Registered: Oct 2004
Posts: 401
You explanation makes PERFECT sense!!! Thank you!

Completely forgot about the sprite y-pos thing...

Suddently a lot of my routines weird behaviour is totally clear to me ;-)
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
apprentix
Guests online: 143
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 Webmasters
1 Slaygon  (9.6)
2 Perff  (9.6)
3 Sabbi  (9.5)
4 Morpheus  (9.4)
5 CreaMD  (9.1)

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