Re: [cc65] TGI API deficit / proposal

From: Karri Kaksonen <karri1sipo.fi>
Date: 2009-10-26 07:01:41
Oliver Schmidt wrote:
> I did so and the tgi_clear() affects on the drawpage. So after all the
> only thing to do (beside maybe the Lynx driver) might be to somewhat
> improve the tgi_clear() description.
>
> I was in fact quite impressed how easy it was to turn 3dmaze into a
> duble buffering program. I just extended the source code
>
>     tgi_clear ();
>     Draw3d (Direction, x, y);
>
> to
>
>     tgi_setdrawpage (Page);
>     tgi_clear ();
>     Draw3d (Direction, x, y);
>     tgi_setviewpage (Page);
>     Page = Page ? 0 : 1;
>
> that's all - it worked instantly as expected :-)
>   

The Lynx driver always draw on the draw page (also tgi_clear).

The Lynx hardware has built-in support for three 8160 byte screens. The 
view page, the draw page and the collision buffer. So I just need to 
write the address of the screen buffer to a register for doing the 
tgi_setdrawpage or tgi_setviewpage command.

In this driver the buffers are pre-allocated to:
C038 page 0
E018 page 1

The Lynx is also a bit special in that the graphics pages are 
overlapping the register banks and the boot rom. This is possible 
because the special graphics chip Suzy sees this area as RAM always 
while the CPU sees it as registers or as RAM depending on register settings.

So there is no "software" support for this in the lynx driver. It is all 
in hardware.

--
Karri

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Mon Oct 26 07:01:54 2009

This archive was generated by hypermail 2.1.8 : 2009-10-26 07:01:56 CET