Re: [cc65] Atari TGI drivers, finally

From: Oliver Schmidt <ol.sc1web.de>
Date: 2009-10-24 18:34:34
Hi Fatih,

> #define COLOR_BACK    COLOR_BLACK
> #define COLOR_FORE    COLOR_WHITE
>
> ... and it uses COLOR_BACK and COLOR_FORE as palette indices,
> e.g. line 178:
>
>    tgi_setcolor (COLOR_FORE);

I must admit that this seems totally reasonable to me...

> For a 2-color driver the only valid values are 0 and 1. It was a very subtle
> error, and I had a hard time understanding what was going on :)

Maybe I'm wrong - and probably a discussion here will yield a final
result -  but my current opinion is:

If you have a two color driver with the valid values 0 and 1 then
there should be two macros with the values 0 and 1. Most probably
called COLOR_BLACK and COLOR_WHITE.

If you have different driver with different values for black and white
then you need different macros with the corresponding values. This is
at least what I did for the Apple2 (from include/apple2.h):

#define COLOR_BLACK     0x00
...
#define COLOR_WHITE     0x03

#define LORES_BLACK     0x00
...
#define LORES_WHITE     0x0F

Obviously there's only one driver you can use macros named COLOR_xxx
for. I'd suggest using using those macros for the "standard driver"
(used i.e. by the tgidemo program).

Just my two cents, Oliver
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sat Oct 24 18:34:41 2009

This archive was generated by hypermail 2.1.8 : 2009-10-24 18:34:43 CEST