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 > Screen with no Badlines
2004-06-14 08:49
Oswald

Registered: Apr 2002
Posts: 5026
Screen with no Badlines

Hello there!

I know it's possible to have a screenmode with no bad lines at all, graphics are not displayable, but sprites are visible in this one. Once I've coded it but now I totally forgot how it was done.. some d011 fiddling at the start of the bottom border.

Can anyone tell me how to achive this ? Whats the theory ?
2004-06-14 10:37
Krill

Registered: Apr 2002
Posts: 2854
put $00 to $d011 at line $f8, then put $08 there some lines later. effectively, this does what a plain open y-border does, except you simply don't enable the screen-enabled-flag (bit 4).

imho, this works because the internal yborder flipflop is manipulated and so, the yborder opened. the disabled screen normally sets some flag to draw the border (overscan) onto the whole area, yet this can't be achieved because of the already disabled yborder. so effectively, the vic draws the background and the sideborders, plus the sprites which are only overlapped by undisabled sideborder lines.
this theory is just my assumption, i'm not into the vic's internal workings that much.

once you got that badline-less screen working, be sure to do the $00/$08-thingy each frame, as the screen gets completely disabled with the border colour everywhere if you miss to do it. then, the screen can only be enabled again with a bad line somewhere, i.e., an enabled screen with at least the first bad line for at least a frame.
2004-06-15 10:33
WVL

Registered: Mar 2002
Posts: 886
yeah, just do like krill explained. Turn off the screen, but make sure you open the upper+lower border each frame. DONT MISS A SINGLE FRAME, or bye-bye screen ;)

very good way if your effect is sprite-only.

does get a bit messy on some routines, check out Royal Arte with the greyscale sprite-fpp in upper+lower+side borders on side 2, how HCL worked around it.
2004-06-16 09:18
Krill

Registered: Apr 2002
Posts: 2854
the routines wvl mentioned are those where the effect area covers the area where one needs to clear bit 3 in $d011, i.e., lines $f7-$fa, afair. then you need to find free cycles in your effect speed code or loop to put in these at least 4 cycles of code. sometimes gets really tricky when you need every cycle of each line to actually run the effect. ;)
2004-06-21 21:55
JackAsser

Registered: Jun 2002
Posts: 1990
Hehe... didn't know you can disable the badlines this way. =) In all my fullscreen sprite-only effects I keep changing y-scroll each scan line to make sure the badline never occur, like fld. Well, each day one can learn something new about the c64. This would save me quite a lot of cycles.

/JackAsser
2004-06-22 12:53
WVL

Registered: Mar 2002
Posts: 886
Jackasser : it's a quite common trick. The big advantage is that it saves you a lot of cycles each line.

the BIG disadvantage is that you can only use sprites on the screen, and cannot turn on chars at some places on the screen..

also the need for opening the lower border can be quite hard sometimes..
2004-06-23 15:03
bOOZElEE

Registered: Dec 2002
Posts: 35
the only gfx beside sprites which can be displayed is only (in case you use bank0) the byte $3fff, makes not much sense on a stock 64, but in combination with a scpu you can put 4 sprites in the sideborders (2 left/2 right of course) ;) and can produce a nice 408 x 284 (not exactly as some pixels arent in the visible area) hires scren NON interlaced. i did it in 1998 and called it EGMOS (extended graphic mode overscan - any similarity to good old escos is purely coincidental)
some of you may ask why only 408? easy to explain normal screen 40 chars, but i need the last cycle to open the sideborder and hence it is not 24x2 + 320 + 24x2, but 24x2 + 312 + 24x2
best regards
gotta code sumtime again bzl
2004-06-23 18:07
SIDWAVE
Account closed

Registered: Apr 2002
Posts: 2238
Interresting stuff!

I'd sure like to see that EGMOS thing
2004-07-07 17:17
Barfly

Registered: Jan 2002
Posts: 4
Actually you can do this trick even without opening the upper/lower borders...

.Barfly
2004-07-09 11:12
bOOZElEE

Registered: Dec 2002
Posts: 35
@ rambones: scpu owner?
2004-07-09 12:11
WVL

Registered: Mar 2002
Posts: 886
Quote: Actually you can do this trick even without opening the upper/lower borders...

.Barfly


how? you have to avoid the VIC starting drawing the border, else the whole screen will flush!
2004-07-09 13:00
Krill

Registered: Apr 2002
Posts: 2854
yeah. maybe barfly meant just a full-screen fld to scroll out all badlines =) but that would mean d011 writes at least every 6 lines.
2004-07-10 11:57
VIC

Registered: Aug 2003
Posts: 73
Quote: how? you have to avoid the VIC starting drawing the border, else the whole screen will flush!


*draw, draw, draw*
2004-07-11 18:11
Ninja

Registered: Jan 2002
Posts: 407
I hope I am not spoiling Barfly's fun, but sharing knowledge rules ;)

Badlines can just occur if "Display Enable" was set in line $30 for at least one cycle. So, make sure that it is cleared during line $30, and the it is set before $33, so that the border-flip-flops will behave like having a "normal" screen.
2004-07-11 18:23
Ninja

Registered: Jan 2002
Posts: 407
Example code:

SEI
loop3:
LDA #$2F
loop1:
CMP $D012
BNE loop1
BIT $D011
BMI loop1
LDA #$0B
STA $D011
LDA #$31
loop2:
CMP $D012
BNE loop2
LDA #$1B
STA $D011
BNE loop3
2004-07-13 11:49
WVL

Registered: Mar 2002
Posts: 886
hmmm..... okay, this should work too :) but basically the problem is the same. Whether you enable the screen before line $33 or open the border around $fa, it does not matter...

timing-wise they are both equally simple [or hard if you want a flexible irq over it], plus you get a free open upper+lower border :)
2004-07-13 15:44
Ninja

Registered: Jan 2002
Posts: 407
Of course, they are pretty similar. It was just the answer to the question "how?" :)
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
taper/ΤRIΛD
da Blondie/Resource
Mythus/Delysid
tlr
Acidchild/Padua
LightSide
void256
grip
Guests online: 134
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 Crackers
1 Mr. Z  (9.9)
2 Antitrack  (9.8)
3 OTD  (9.8)
4 S!R  (9.7)
5 Faayd  (9.7)

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