Re: [cc65] wrong colors in conio

Date view Thread view Subject view

From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2002-12-09 12:20:24


On Mon, Dec 09, 2002 at 01:39:14AM +0100, Groepaz wrote:
> /me scratches head...makes note to UZ: "tgi has own colordefinitions?"

No. TGI has palettes and supports multiple machines, which makes color
definitions difficult. I would like to wait how it evolves before eventually
adding colors.

> nothing, just if the atari doesnt have colors for text, it shouldnt implement
> something unrelated through a well defined api :)

As I understand it, it's not really unrelated. Having a black background,
textcolor() will allow to set different shades of gray (up to white). This
would definitely make sense, provided that the function does only change the
color of new (and not extisting) text.

> imagine someone like me writes a tetris clone using the conio-api, and he uses
> colors. i cant test on atari (since i dont have one, nor found or even
> searched for an emu yet ;=)), so i test on a c64 and the various cbm-machines
> emulated by VICE. now if my program works alright with any of these
> (including the plus4 which has different colors than c64 aswell, and the pet
> which has no colors at all) i should be well able to rely on the fact the
> conio-api was designed for portability, and that it WILL work (unless the
> implementation is faulty - which it seems to be.)

If I understand that correctly, the Atari does not have real colors in text
mode, but allows different shades of the background color for each character
on the screen. This is different from the C64, and different from what the
monochrome CBMs have. Since there is no way to hide peculiarities of the
hardware, your program has to cope with it. Having textcolor() depend on the
last call to bgcolor is different from the CBM implementations, but this does
not mean it is necessarily bad. We cannot add an API that completely hides the
underlying hardware because of space and performance reasons, so we have to
live with differences like this. Any program can choose to handle the Atari as
a monochrome machine like the PETs, so there is no reason to get overexcited.

I admit that the color definitions in atari.h are confusing, because they look
like the atari would support colors (the conio.h header file is including
atari.h to get the color definitions), but this is not a serious problem.

If I'm wrong here, and the textcolor() function changes the color for all text
on the screen, then groepaz would be right and textcolor() should not do
anything.

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz_at_musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2002-12-09 12:21:30 CET