RE: [cc65] Atari Library dosdetect.s

From: Shawn Jefferson <sjefferson1shaw.ca>
Date: 2007-03-29 05:45:59
Christian said:

>Yes, that's not really nice. But what is the exact problem if ATARIDOS is 
>detected?

I want to exit differently based on whether or not NODOS has been detected.
I actually thought it was working, but then had to look at the source code
after realizing my if(_dos_type == NODOS) code was never reached.  For
instance, in situations where no DOS was loaded, you cannot rts from your
program and you need to make other arrangements, such as jmp $E477.

>I've just tried with SpartaDOS 3.3a and AtariDOS 3, and both don't have 
>$07 at $703. We need a better detection mechanism.

SpartaDOS should be detected by the 'S' at $700, and no one uses AtariDOS 3
anyway, do they?  I'm willing to bet money that more Atari users are running
their programs from MyPicoDOS or the various flashcarts than from DOS 3. :)
Unless you are specifically trying to detect AtariDOS 3 over one of the
other DOSes, the runtime will behave the same (noargs, default drive D1:)
anyway.

>Once again, what is the problem if the runtime behaves as if ATARIDOS is 
>present?

I think there are situations where detecting if you are running with NODOS
is useful.  Ideally, I'd like to see the runtime dosdetect.s function,
detect NODOS, SPARTADOS, MYDOS and all others can come under ATARIDOS (OSA
is already detected separately of course.)  Probably 99% of Atari users use
one of AtariDOS, SpartaDOS, or MyDOS nowadays.

If you don't think these changes are useful, then I can always look at $703
myself, rather than looking at _dos_type.  If that's the case, maybe the
NODOS define can be removed from atari.h too.  I realize that since this
code is in the runtime and always linked to an Atari project, you may not
want to introduce more code than is strictly necessary.

Perhaps a larger function, not part of the runtime, is needed to correctly
detect all the various versions of DOS and people can then link that in if
they want to detect those.  I've got a fairly large list of the contents of
$700-70E from various DOSes that might help in that regard.

-- 
Shawn Jefferson


----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Thu Mar 29 05:46:12 2007

This archive was generated by hypermail 2.1.8 : 2007-03-29 05:46:15 CEST