Re: [cc65] Atari "tgi" again :)

From: Christian Groessler <>
Date: 2005-07-24 02:25:42

On Fri, 22 Jul 2005, Fatih AygŁn wrote:

> It seems that tgi mode to file name mapping won't work
> in Atari platform.
> "tgi_mode_table" maps the graphics mode constants to
> driver file names. As far as I know (I looked at the
> library codes) Atari platform has no default path.

It's probably a bit hidden, but the standard Atari library has a
"default path". Look in ucase_fn.s. If there is no ":" at position 2 or 3
of the file to open, it will prepend a "Dx:" to the path. "x" is the
current drive (if started from SpartaDOS) or a compile time default for
other DOSes. The compile time default is changeable in the Atari library
makefile (libsrc/atari/makefile, search for DEFAULT_DEVICE).

> So
> the file name should begin with a disk drive
> specification. If we define for example
> <TGI_MODE_320_200_2="atari-hi.tgi">, it won't work. We
> have to make it "D1:atari-hi.tgi" or something
> similar. But then, we cannot load the driver form
> "D2:" or other device, even if the main program was
> loaded from "D2:" or other device. Most Ataris don't
> have a second disk drive but if you use a disk drive
> simulator, it IS a problem...

The DEFAULT_DEVICE should fix this for compile time adaptation. I don't
know how to detect the drive the program was loaded from (maybe it's
simple? someone knows?), therefore probably the user has to indicate which
drive to use to load the drivers. But there is currently no way for the
program to set the drive where the drivers are loaded from. I could think
of a _setdefdev function for the Atari (as counterpart to _getdefdev), but
this looks like a hack.

> I think that other platforms may have this problem
> too. If so, it is not a real problem :)

Maybe no one tried to load the program and the drivers from different
drives up to now?


To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sun Jul 24 02:26:02 2005

This archive was generated by hypermail 2.1.8 : 2005-07-24 02:26:05 CEST