Re: [cc65] Atari tgi update

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2009-11-11 12:16:35
On Tue, Nov 10, 2009 at 11:59:39PM +0100, Christian Grössler wrote:
> I've integrated it into svn now. I've renamed the atari<modenum>.s files
> to atari-<modenum>.s files (adding a dash).

Thanks!

> There seem to be some problems, maybe I made a mistake when
> intergrating. Please check the version from svn (or take the
> next snapshot).
[...]

I'm working on the TGI interface and changing things in several places. This
may or may not be the cause of the problem.

> - in tgidemo.c the circles get painted once and cleared once
>   and after some time the x lines vanish.
[...]

In the current head version, circles (tgi_circle) are actually a special form
of ellipses (tgi_ellipse), which in turn are a special form of an elliptic arc
(tgi_arc), which is drawn by line segments using a sine/cosine function. The
line segments are clipped by a Cohen Sutherland line clipper. But ... all this
is only very roughly tested, otherwise I would have announced it here. Please
keep that in mind when checking the driver.

> I first thought adding Atari specific error codes to tgi-error.inc
> is a bad idea. But then I got TGI_ERR_NO_MEM when I first tried
> the tgidemo sample. That's because I forgot to set __RESERVED_MEMORY__
> when linking. Getting this error saved me felt (gefühlte) 2 hours
> of debugging time where I would have needed to dig into the code
> in order to find out why the driver doesn't load. So I think this
> error code makes pretty much sense and therefore I added it together
> with the other 2 Atari specific error codes you defined. Uz, please
> comment about how you feel about it.

TGI_ERR_NO_MEM is not an Atari specific error. I've refrained myself from
adding it, because I didn't want to bloat the error messages, but it does
definitely make sense. TGI_ERR_NO_IOCB is an Atari specific error code, and I
would highly prefer to map it to something else (maybe TGI_ERR_NO_MEM, because
that is probably what happens). Adding error codes needs also changes in
tgi_geterrormsg.s, which will not work as it currently is. My suggestion is to
remove TGI_ERR_NO_IOCB, add TGI_ERR_NO_MEM as a normal error (without Atari
specific comments) and fix tgi_geterrormsg.s to work with the new error codes.
  
Regarding the driver itself: I don't think it's a good idea to use .define -
it has similar problems as its CPP counterpart. Please check if .define can be
replaced by a simple constant definition using '=' or ':='.

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Wed Nov 11 12:16:41 2009

This archive was generated by hypermail 2.1.8 : 2009-11-11 12:16:45 CET