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

Re: [MiNT] Shutdown() discussion



on 12/9/03 5:26 PM, Petr Stehlik at joy@sophics.cz wrote:

>> I fail to see the connection between ct60 and the comment about aranym.
> 
> The kernel already started taking on code specifical for machines other
> than your TT. The code just sucks up more ram and does not work for you.
> 
> Do you get my comment now?

I knew that, it has to be that way, as the machines have hardware
differences.  Aranym however is not real hardware, it's virtual
as you like to word it.  Some people still view that as very different.
 
> Anyway.
> 
>> clearification of what was meant by your suggestion.  I am not the first
>> person with such a question actually.  I was however brave enough to ask.
> 
> I will gladly answer this. FreeMiNT can (and should) be extended so that
> the halt or shutdown calls really shut the machine down - just like it's
> possible with ATX PSU. That has been implemented for CT60 already
> (IIRC). ARAnyM (as a virtual machine) can also be shut down and I think
> it makes sense if FreeMiNT's halt did shut it down, just like it shuts
> down the CT60 now (and possibly Milan, I don't know).
> 
> As for the actual implementation, the code would look as follows:
> 
> if (hasNF) {
>   long shutdown_id = NFID("NF_SHUTDOWN");
>   if (shutdown_id) {
>       NFCall(shutdown_id);
>   }
> }
> 
> The NFID and NFCall are compiled to a single 'jsr' (they are macros).
> It would be almost 50 bytes of RAM wasted on this feature.
> Of course compile time option would solve that.

Thanks for explaining it.  Why can't aranym intercept a pre-existing call?
In my mind the emulator

-- 
Lonny Pursell

is the part that needs to adhere to the
kernel, not the other way around.  What you are proposing is straddling the
kernel with more unusable bits of code, and for a virtual machine at that.
On the other hand 50 bytes ain't much, however I would still vote for a
compile time switch if that is not to much to ask.

-- 
Lonny Pursell    http://www.bright.net/~gfabasic/