| |
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. |
|
| |
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. |
| |
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
|
| |
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). |
| |
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).
|
| |
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!
|
| |
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. |
| |
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.
|
| |
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.
|
| |
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. |
| |
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 |