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 blanking: "curtain" effect
2011-05-11 08:29
ready.

Registered: Feb 2003
Posts: 441
Screen blanking: "curtain" effect

Hello,
I am linking some parts for a demo and I want to exit from one part using a "curtain" effect (that's how I call it), by making the screen black raster line after raster line from top to bottom, moving slowly.
My first attempt was to use a CIA-timer-based IRQ counting O2 cylces from X to zero starting it at raster line $000. At every frame X is incremented by some value, so that the delay gets bigger every time, thus extending the black area slowly towards the bottom of the screen.

When IRQ triggers I set the VIC into an illegal mode (multicolor and extended color mode both on), so that VIC outputs just black color (setting to 1: $d016 bit 4 and $d011 bit 6, then $d020 to 0).

This works, but the switching point between black screen and the rest below is jittering. I don't want the switching point to happen in the middle of a raster line.

So I implemented a double IRQ to stabilize the raster, but I soon discovered that I still get some jittering. I think mostly because of badlines, which screw up the stabilizing routine.

I am wondering how to do this properly.
One chance would be to put a band of X-expanded sprites to cover the area of the jitter and move them down as the "curtain" is lowered. But I wanted to avoid using sprites, if possible.

Any suggestion is welcome!

thanx,
Ready.
2011-05-11 08:50
Oswald

Registered: Apr 2002
Posts: 5094
one approach is to code it properly for one character row (8 rasterlines including the badline) then you can extend that to work on all 25 lines.
2011-05-11 09:04
Testa
Account closed

Registered: Oct 2004
Posts: 197
hi Ready, what i always do to blanc out line for line is
set up at stable rasterirq. set up a big loop with a
delay table (as you would do with rasterbars),
but instead of using $d020 and $d021 use $d020 and $d011.
$d020 ofcourse for the sideborder and $d011 ($68 - $6f)
for blanc out the graphics.. simply do the vic writes
somewhere outside the visible area and the trick is
done. For the upper/lower border you can use only $d020

now it just a matter of putting the right values at
the right adress in your read value tables frame for
frame..

hope this is what you mean



2011-05-11 09:05
JackAsser

Registered: Jun 2002
Posts: 2014
Quote: Hello,
I am linking some parts for a demo and I want to exit from one part using a "curtain" effect (that's how I call it), by making the screen black raster line after raster line from top to bottom, moving slowly.
My first attempt was to use a CIA-timer-based IRQ counting O2 cylces from X to zero starting it at raster line $000. At every frame X is incremented by some value, so that the delay gets bigger every time, thus extending the black area slowly towards the bottom of the screen.

When IRQ triggers I set the VIC into an illegal mode (multicolor and extended color mode both on), so that VIC outputs just black color (setting to 1: $d016 bit 4 and $d011 bit 6, then $d020 to 0).

This works, but the switching point between black screen and the rest below is jittering. I don't want the switching point to happen in the middle of a raster line.

So I implemented a double IRQ to stabilize the raster, but I soon discovered that I still get some jittering. I think mostly because of badlines, which screw up the stabilizing routine.

I am wondering how to do this properly.
One chance would be to put a band of X-expanded sprites to cover the area of the jitter and move them down as the "curtain" is lowered. But I wanted to avoid using sprites, if possible.

Any suggestion is welcome!

thanx,
Ready.


I know you don't wanna use sprites... but that's the simple approach and enables you to fill with any color you like, and not just black. I did that in Mekanix. A more simple approach is to fill quickly with 8 lines per frame. :) I did that in The Super Larsson Bros.

If you really wanna do it without sprites etc, the listen to Oswald.

Otoh your initial timer method should work, just make sure the IRQ is triggered just at the beginning of the right border. This would give you time to handle the IRQ and set the mode properly before the bad line DMA kicks in (causing the jitter).
2011-05-11 10:10
ready.

Registered: Feb 2003
Posts: 441
@ Testa: I tried your trick, you are right: $d016 is not necessary to set VIC in illegal mode. But I think $68-$6f are not correct values, I can blank screen all the way (bit 4 of $d011 is zero), while it works with $78-$7f (bit 4 at 1).

2011-05-11 12:02
Testa
Account closed

Registered: Oct 2004
Posts: 197
hi Ready i probably made a type mistake.. but to be honest
, i dont know al the bitsettings whithout reading it
first in a manual, i should be ashamed of myself..

you can combinate Oswald and my methode together.
just do the loop every 8th line. then you have
enough rastertime left for other things..

have fun!
2011-05-11 12:45
Digger

Registered: Mar 2005
Posts: 437
There's a linker for that made by Toaster. He did it for Atlantic (exclusively) years ago so I suppose it can be now released. I will dig it out soon.
2011-05-11 13:43
ready.

Registered: Feb 2003
Posts: 441
thanks Diggger, looking forward to it.
I also realized that the sprite solution is not so easy either, since the sprites do not cover the border area (unless you have open left and right borders) and depending on what raster line you are on, the side border sometimes gets misaligned with the sprites.

2011-05-11 15:33
Testa
Account closed

Registered: Oct 2004
Posts: 197
the sprite solution is a good methode when you want to blanc out
lines in other colours dan black... just use
$d020 for the sideborder en use blanc spritepointers.
to make the sprites shorter or larger.

for example: when you have a bitmap picture and you
want to blanc it out line for line than set up
a loop as i mentioned before and use $d020 en $d018
to blanc out..

after each 8th line you increment the $d012 poll so the
rasterloop begins on the next 8 lines, add 8 lines to
the y pos of the sprites en fill the previous text
raw ($0400 and/or $d800) with the colour values you
want.

you need 2 screens with the same bitmap color data:
lets say $0400 and $0c00, at $07f8/$07ff,
you point to a filled sprite and at $0ff8/$0ffff you point to an empty sprite.
2011-05-11 16:59
Digger

Registered: Mar 2005
Posts: 437
Found and added it: Start Linker V3.0

Decompile to see how it was done. Each line can be switched on/off independently.
2011-05-11 19:22
Mace

Registered: May 2002
Posts: 1799
Funny... I was just working on something like this, though not entirely identical.

I made a double raster IRQ and timed the entire screen with NOPs and BITs so that every 'unit' I want to blank is stable and exactly of the desired height.
Works like a charm.
 
... 5 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
Scrap/Genesis Project
Jammer
MWR/Visdom
ΛΛdZ
Case/Padua
Mike
encore
WVL/Xenon
Guests online: 94
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 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (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 Original Suppliers
1 Derbyshire Ram  (9.7)
2 Fungus  (9.3)
3 Black Beard  (9.2)
4 Baracuda  (9.2)
5 hedning  (9.1)

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