| |
Oswald
Registered: Apr 2002 Posts: 5094 |
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 ? |
|
| |
Krill
Registered: Apr 2002 Posts: 2980 |
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. |
| |
WVL
Registered: Mar 2002 Posts: 902 |
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. |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
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. ;) |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
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 |
| |
WVL
Registered: Mar 2002 Posts: 902 |
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.. |
| |
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 |
| |
SIDWAVE Account closed
Registered: Apr 2002 Posts: 2238 |
Interresting stuff!
I'd sure like to see that EGMOS thing |
| |
Barfly
Registered: Jan 2002 Posts: 5 |
Actually you can do this trick even without opening the upper/lower borders...
.Barfly |
| |
bOOZElEE
Registered: Dec 2002 Posts: 35 |
@ rambones: scpu owner?
|
| |
WVL
Registered: Mar 2002 Posts: 902 |
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!
|
| |
Krill
Registered: Apr 2002 Posts: 2980 |
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. |
| |
VIC Account closed
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* |
| |
Ninja
Registered: Jan 2002 Posts: 411 |
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.
|
| |
Ninja
Registered: Jan 2002 Posts: 411 |
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
|
| |
WVL
Registered: Mar 2002 Posts: 902 |
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 :) |
| |
Ninja
Registered: Jan 2002 Posts: 411 |
Of course, they are pretty similar. It was just the answer to the question "how?" :) |