Login
Search for:


Previous | Next

From: Richard Atkinson
Date: 2002-02-05
Subject: Re: Sprites
On Mon, 4 Feb 2002, Csabo wrote:

> I saw an early preview of XeO3. It used a simple soft-scroller, just by
> changing FF07. What is the DMA scroller you mention? I would be interested
> in the details.

This is documented better in Christian Bauer's VIC-Article. I'm not saying that it's been done before on plus/4, only that it might be possible.

Using DEN (display enable) or the Y-SCROLL register, the start of the display is delayed for a number of cycles (between 0 and 39). Then the register is changed as if to enable the screen on that line. The display starts and continues for the rest of that line, and then the rest of the screen. This means that the first line has between 40 and 1 characters,
and all the others have 40. However, the display counters always start at
0 and don't start incrementing until the display is turned on.

If you arrange for the first line to be blanked out and only display the actual screen data from the 2nd row onwards, you can scroll the rest of the screen horizontally by arbitrary amounts by changing how many cycles were in the DMA delay. Of course you still need to update the edges of the screen as new data is scrolled on and old data is scrolled off.

Mayhem actually uses two screen matrices, and switches between them every
40 columns, so that it's not necessary to move the entire 1000 bytes of screen memory after the 40th column has been reached. Basically, each new column that is scrolled onto the screen gets copied into two different screen matrices, in slightly different places, so that by the time the
40th column has been reached, a new screen matrix has been drawn starting from column 0 again and the VIC-II can simply be switched to that.

Richard

Copyright © Plus/4 World Team, 2001-2024