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

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



> >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.  ;-)

This is easily answered. MagiC ignores the bits as it should, so a good way
to check this is to query for the presence of the MiNT *or* the MagX cookie
(in case MagX learns about memory protection later).