This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
james222's profile picture

Help me understand operating systems

Started by james222, 21 September 2014 - 01:45 PM
james222 #1
Posted 21 September 2014 - 03:45 PM
Hi everyone. I'd like to create my own OS, but I'm not sure of 1 thing. I've looked over the OS sections, and I'm wondering if the operating systems are just programs, or they really are operating systems. Do they overwrite the startup file or is there a such thing as a startup file? If so, how can I overwrite it? Thanks
KingofGamesYami #2
Posted 21 September 2014 - 05:31 PM
They don't "overwrite" the startup file, they create it. CC computers automatically run the file "startup" when they boot up (if it exists). Also, you seem pretty new, so you may not want to try and make an OS yet.

Operating Systems are extremely complex and you will need a good knowledge of lua to create a decent one. An example of a complicated OS is OneOS. The source code for OneOS can be found here: https://github.com/oeed/OneOS
Edited on 21 September 2014 - 03:31 PM
MKlegoman357 #3
Posted 22 September 2014 - 03:22 PM
In CC, the OS section, there are a bunch of either desktop environments or graphical shells. Some are just a pre-set collection of programs or just an image on screen with 'shutdown' and 'reboot' buttons. None of these overwrite any BIOS files. Why? Well, first, there is no actual reason to overwrite BIOS files. Lua is flexible enough to be able to run in a top-level coroutine in CC, unload APIs, etc.. Second, it only makes it harder for the end-user. And third, if there would actually be someone who would make a real CC OS it would either be able to do almost the same as Craft OS with some programs or would have a completely different run-time environment (for user-created programs) which would only make everything more complicated.

A good example of how an OS should look and what features it should have is, like KingofGamesYami said, OneOS, as well as LyqydOS and CraftBang Desktop Environment. And please DO NOT make yet another useless image display program with a 'Shutdown' and 'Reboot' buttons. We have too much of them.