Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problems with split-screen vertical smooth scrolling

174 views
Skip to first unread message

Firebug

unread,
Mar 2, 2001, 2:55:10 AM3/2/01
to

I am attempting to write a (relatively) simple scrolling game for the C-64,
and I'm running into trouble with my raster interrupt routine. What I need is
to have the top 4 lines of the screen stationary, and the rest of them
scrolled vertically. What I did was set up a raster interrupt that is
triggered once at the bottom of the screen (raster line $FA), where it sets
the Y smooth scroll bits to %011 (which appears to be the default), and
increments the internal scroll register. (This is just a test, of course; in
actual operation, the scrolling will need to be more finely timed and coarse
scrolling will have to be performed every 8 pixels.) The raster is again
set off at raster line $52, where the Y smooth scroll bits are set to whatever
is in the program's internal scroll register. (It's probably worth noting that
I'm doing my testing on the CCS64 emulator; my actual machines are,
unfortunately, in storage.) In testing, the entire screen is filled with
screen code 219, which makes a nice test pattern that appears to be scrolling
even when it can only actually move 7 pixels before wrapping around.

There's nothing wrong with my raster code; it appears to work properly when I
have it switch background colors instead of altering the scroll register, and
it even works great with horizontal smooth scrolling. The problem is that on
vertical scrolling, there's several lines' worth of flicker at the split
point. Rather than blending smoothly into the non-scrolling rows, the
scrolling area appears to jump up and down on the first scrolling row. Does
anyone know why this is? (I'll post my code if anyone would like to take a
look at it.) Any suggestions on a good way to perform this type of screen
split on the C-64?

- Firebug

BlackJack

unread,
Mar 2, 2001, 3:31:08 PM3/2/01
to
On Fri, 02 Mar 2001 07:55:10 GMT, fir...@cfl.nospam.rr.com (Firebug)
wrote:

>There's nothing wrong with my raster code; it appears to work properly when I
>have it switch background colors instead of altering the scroll register, and
>it even works great with horizontal smooth scrolling. The problem is that on
>vertical scrolling, there's several lines' worth of flicker at the split
>point. Rather than blending smoothly into the non-scrolling rows, the
>scrolling area appears to jump up and down on the first scrolling row. Does
>anyone know why this is? (I'll post my code if anyone would like to take a
>look at it.) Any suggestions on a good way to perform this type of screen
>split on the C-64?

The value of the y scroll register can't be changed while within a
cursorline this way. Try to make the smooth scroll with the FLD effect
instead of the scroll register. Delay the start of a new line by x
rasterlines and make the screen black for 8-x lines with an illegal
gfx-mode.

Ciao,
Marc 'BlackJack' Rintsch

Pekka "Pihti" Takala

unread,
Mar 2, 2001, 3:37:20 PM3/2/01
to

If I were you, I would make the lowest row of the stationary text row
with sprites. They are able to hide the flicker, and they look quite
nice. Also you can use a non-documented mode for that.

One another way to do that is just have actually 5 stationary lines, but
have a binary scroll inside the 5th line. It might sound hard, but it is
able to do that.

--
*Pekka "Pihti" Takala *pekka....@pp.inet.fi
*asm sw developer *home: +358-6-8311341
*cellular: +358-40-5670465

Pekka "Pihti" Takala

unread,
Mar 2, 2001, 3:38:14 PM3/2/01
to

If I were you, I would make the lowest row of the stationary text row

Jason

unread,
Mar 2, 2001, 4:21:46 PM3/2/01
to
Firebug:

> There's nothing wrong with my raster code; it appears to work properly
> when I have it switch background colors instead of altering the
> scroll register, and it even works great with horizontal smooth
> scrolling. The problem is that on vertical scrolling, there's several
> lines' worth of flicker at the split point.

BlackJack:


> The value of the y scroll register can't be changed while within a
> cursorline this way.

That's not strictly true, it *can* be changed but the timing is more
than a little tricky...

> Try to make the smooth scroll with the FLD effect instead of the
> scroll register.

[Wonders if I should point out that FLD is *done* with the vertical
scroll register...? Nah. =-]

> Delay the start of a new line by x rasterlines and make the screen
> black for 8-x lines with an illegal gfx-mode.

What's actually happening is that the system generally hates splitting
$D011 - the flicker is caused by this inability on the VIC-II's part.
The way to mask it is, as Marc says, for the eight rasterlines where
you're doing the split to mask it off by setting an illegal mode -
turing on bitmap at the same time as extended colour mode works (set the
$20 and $40 bits of $D011).

The jumping up and down is being caused by the $D011 bug that produces
FLD, if you allow a badline to be delayed by moving it just before the
raster gets to it, you can make the remaining part of the screen jump
down a character. There are a few ways to counter this, either have a
series of different timing values for all eight possibilities during the
"mask" area (which has to allow for the badline moving up and down as
$D011 changes as well as the cycles used by any sprites passing over
that space) or modify the map copy routine to offset itself by a
character to counter the glitches (cheating, but it works).

Either that or scroll the *entire* screen and don't worry about it, but
that really *is* cheating. [Looks at own game Cyberwing and goes *very*
quiet... =-]
--
Jason =-)
_______________________________________________________________________
TMR / / / / / / / /\
/ /__/ / / /__/ / / / /__/ Email: t...@c64.org / /
/ /\_/ / /__ / / / / __// TMR_C0S on IRC / /
/ /__/ / / / / / / / / / http://www.tmr.cosine.org.uk / /
/_____/_____/_____/__/__/__/_____/_____________________________________/ /
\_____\_____\_____\__\__\__\_____\_____________________________________\/

0 new messages