[A83] Re: something to talk about


[Prev][Next][Index][Thread]

[A83] Re: something to talk about




Patai Gergely writes:
> Okay, but what if you have sprites that move independently above the
> scrolling background? You can make a scrolling background in 20-30k
> cycles (I haven't counted it though). To maintain 15 fps, you have
> 400k
> cycles per frame. Subtracting the fastcopy time too, you still have
> 320k.
> Not bad.

Crashman's routine handles more than simple scrolling.  A simple shifting
routine will only work for single pixel horizontal scrolling.  His method
handles full eight way scrolling.  No matter how much you optimize a
conventional routine, you cannot get decent speed out of it.  Redrawing the
entire screen using shift tables is the only reasonable method (that anyone
has come up with).  Other nice features such as animated map tiles are
essentially "free".

With his method, you get sprites too.  The interleaved method is very
clever.  It does not work like you are thinking.  It does not render
directly to the display controller.  It renders to a buffer, as the non
interleaved version did, while it is updating the screen.  The render map
routine is called at the beginning or end of the frame.  After it returns,
the screen has been updated and the buffer has the new map drawn in it.
Thus sprites can be drawn on top of the map, ready for the map routine to be
called again.

> BTW I was thinking about putting the link communications into the
> fastcopy instead of the delays. I'm not sure though whether I really
> gain
> time by doing so (if I want to have a foolproof linking routine with
> proper error detection). It should be worked out properly.

Joshua Seagoe was working on something like that for the 86.  I think his
method was to do it all in the interrupt handler.  Though, that probably
wouldn't work here, since interrupts are disabled during the screen refresh.
Calling it at the beginning and end of the main loop (on either side of the
render routine) might be the best way.  Though, on the z80 calcs, linking is
really a lost cause.  Even ZTetris had reliability problems.  Good luck in
making it work.

--
David Phillips <david@acz.org>
http://david.acz.org/




References: