[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [MiNT] Correct way to detect MiNT kernal?



On Thu, 30 Dec 1999 22:41:26 +0100, Julian Reschke wrote:

>
>> From: owner-mint@fishpool.com [mailto:owner-mint@fishpool.com]On Behalf
>> Of Lonny Pursell
>> Sent: Thursday, December 30, 1999 5:30 PM
>> To: MiNT mailing-list
>> Subject: [MiNT] Correct way to detect MiNT kernal?
>>
>>
>> Quite a while back I asked Frank how to detect the MiNT kernal
>> whilst on IRC.  When I say detect I mean positively detect it
>> even if some other OS fakes the cookie entry.  At the time
>> I think Frank suggested making a call to Sconfig(opcode 290)
>> and if it fails (-32) then the MiNT kernal is not present.
>>
>> Is this proper way?  I've been over all the docs in the
>> lastest kernal archive and didn't find mention of this call.
>> Unless I missed it can someone point me in the correct doc?
>>
>> Reason I ask this:
>> I was talking with someone else today on IRC about the same thing
>> and they raised the question that if Sconfig() is a rather old
>> call wouldn't another OS also have this call?  They thought
>> maybe Ssystem() would be the call to use instead?
>
>I think this can only be answered if you explain where you need this
>information. It's always possible that someone writes something with similar
>functionality as MiNT, and if a call with the same opcode as in MiNT exists,
>it's certainly *supposed* to behave the same.
>
>So where do you need this information?

Note the typo I made "Sconfig" should be "Sysconf".

Anyway it is related to memory protection.  Back when I was told
my program did not function correctly I recoded it to correct this.
However, as it turns out the extra bits in the mxalloc() calls
caused serious problems on TOS 4.04 without the mint kernal present.
Ozk knows this to be true as well.  ;-)

So at the time I wanted a way to detect the mint kernal.  Since I
do not have MagiC and cannot conduct tests I figure it was best to only
use theses extra bits if MiNT was really present.  I assume MagiC
does not support MiNT's memory protetion scheme?  I do not mean to
start some debate.  What sorta worried me was TOS 4.04 running MagiC
so I figure better safe than sorry.  ;-)

__________________________________________________________________
Atari Computer User: Lonny Pursell        E-Mail: atari@bright.net
WWW: http://www.bright.net/~atari/       IRC: lp @ #Atari @ IRCnet