View Single Post
Old 01 October 2011, 03:26   #9
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,633
With regards to the original question, it's really a decision whether you want/need to have the system on [all the time in the background] or not.

If you're doing a system-friendly utility or game, the answer is obviously yes. If you're doing a regular demo or game and need full CPU time to make sure it runs as smooth as possible, the answer's as obviously no.

If yes, then you're already there, nothing special needs to be done, just write the library code from scratch.

If no, then there are plenty of simple Startup Routines that you could use. You can use libraries while the system is on, and some parts even when the system is off.

System off really only means disabling some interrupts, not shutting it down completely and removing it from memory.

You can turn the system on and off for portions of your program, such as 'in-game' (off) and 'loading files' (on). You need to switch the system on and off wisely (ie. not while the OS finishes a write of file to disk) and correctly, but there's nothing stopping you from doing it anytime you like. If you catch my drift.

There's no real need for Forbid/Permit on original HW/OS [in order to manage system on/off], I never use it. But you WILL need to lock/alloc/own resources shared by the system, even if the system is off, if you plan to return to the OS that is. Ie. alloc memory, OwnBlit etc.

Last edited by Photon; 01 October 2011 at 16:36. Reason: added , if you plan to return to the OS that is
Photon is offline  
 
Page generated in 0.04384 seconds with 11 queries