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

[API][BIOS][Programs] Matchlighter's Programs: Fire BIOS, PVars

Started by Matchlighter, 31 March 2012 - 09:32 PM
Matchlighter #1
Posted 31 March 2012 - 11:32 PM
Matchlighter's Programs


Finally got a centralized content management setup here.
I think I failed the 1.43 update, but 0.7/1.46 is now ready (and tested)


-Fire BIOS and Bootloader-
SpoilerYup that's right! A custom BIOS and Bootloader! I have actually rewritten the bios.lua file to come up with this. With this system, you can choose from a variety of OSes. The CraftOS has been moved to a separate file (in the OS folder of the rom). The API loading and other functions that you would expect to be in the OS, but not the bios, have been moved there. For instance, os.sleep() is now bios.sleep(), but os.loadAPI() is still the same. However, because of the way CraftOS is now launched, it uses setmetatable(os, {__index=bios}) to maintain maximum compatibility. The same method can be used for already existing user OS's, like Redworks.

Features:
  • Specific OS's for each computer through the boot/OSList file
  • Add OS's to all computers through the rom/OS/OSListAll file
  • Add OS's to rom/OS/OSList to set OS's to automatically setup on new computers
  • Check Floppy drives for OSList files (Each OS states where it is located)
  • Check Floppies and system for boot/boot files which load instead of the bootloader
  • Turtle support
  • Multiple pages
  • "Compatibility Layer" that can boot older OS's with minimal modifications. CraftOS is already ported and instructions for modding Redworks are included! (see rom/OS/OSList to set default boot list or boot/OSList to set per-computer boot list) Note: rom/OS/OSList is only copied to boot/OSList when boot/OSList does not exist
Images:
Spoiler

Downloads:
Spoilerhttps://www.cubby.co...bc88d18/CC_BIOS

Changes:
v0.5
  • Updated to CC 1.43
  • boot files now hidden. You will need to rename your boot folders to ".boot". This is a little tricky on Windows. I suggest you update, let the computers generate the folders, and then copy the files.
  • BootLoader changes
9/26/12: Updated to CC 1.42/MC1.3.2
v0.31 : 7/27/12: Updated for CC 1.4
v0.31 : 6/8/12: Small update to fix crash when opening config screen and better organization of rom files.

Reporting Bugs:
SpoilerTo report a bug please post on this forum with the following information:
  • Transcription or screenshot of the error message displayed on screen
  • What you were doing at the time

How to add other user made OS's:
SpoilerTake a look at rom/OS/OSList and rom/OS/redworks for an example.
Step 1: Create the OS start file. It sould look something like this:

os.run({}, "rom/programs/shell", "OptionsToPass") --Include comments about needed modifications
Step 2: Create the OSList entry. It should look something like this:

{"NameToDisplayInBootloader", "rom/OS/CompatibilityLayer", "PathToOSFileYouCreated"}
Step 3: Share it!

Todo:
  • Bootloader config screen that allows you to: check for OS's on floppies, set boot-timeout and more
  • Awsome-looking boot animation
  • Any other ideas I receive or come up with
  • Add program to create a recovery disk (which restores CraftOS to the boot list)

-PVars-
SpoilerPVars is my own rendition of persistent variables. While it is the same as the several others out there in that it saves and loads variables, mine has a few different features that make it better and easier to use. For instance, instead of code that looks something like this:

local pvar=pvars.load("VarName")
pvar.value=20
pvar:save()
Mine makes things easier and reduces the typing required:

local pvar=pvars.new("varName")
pvar:read() --This will re-read the variable from the file. It is not normal to need to call this
pvar+20 --This is how you would change and save the value. The new value is 20.
local normalVar=-pvar --This is how you read the variable. (Notice the '-' in the front)
local normalVar=pvar() --You can also read it like this.
pvar(20) --You can also set and save it like this.

As you can see, my rendition reduces the amount of typing required to use persistent variables. Also, unlike most, my persistent variables API has the ability to save multi-dimensional tables.

Downloads:
Dropbox

Installation:
To install, simply and the file to you rom/apis folder.
Ludburghmdm #2
Posted 31 March 2012 - 11:34 PM
Cool! I've always wanted to multi-boot my computers!
sabian8 #3
Posted 01 April 2012 - 08:41 AM
This is brilliant! When is it going to be released?
Wolvan #4
Posted 01 April 2012 - 04:03 PM
Would be epic
Ludburghmdm #5
Posted 02 April 2012 - 12:59 AM
Matchlighter, are you from ROBLOX!? Because your avatar looks like a place in ROBLOX.
Matchlighter #6
Posted 02 April 2012 - 04:32 AM
Matchlighter, are you from ROBLOX!? Because your avatar looks like a place in ROBLOX.
Yes. It is from one of the projects I am working on.
Matchlighter #7
Posted 02 April 2012 - 06:44 AM
I am almost ready with the first release! The only required features left to complete are the config screen and the recovery disk creator!
Wolvan #8
Posted 02 April 2012 - 09:53 AM
I would like to help with for example the config file
Mads #9
Posted 02 April 2012 - 12:11 PM
This looks pretty cool. I'm currently writing my own BIOS(Completely from scratch) for my new project, Mad-OS. It is not gonna be like any other "OS", It's a complete re-write of the Lua part of CC. It will replace almost the whole mods/Computercraft/lua folder. All I will leave is the inbuilt APIs, and the ones having something to do with Java.

Could I possibly steal the concept of this BIOS(For different versions though) ?
-mad1231999
Zer0t3ch #10
Posted 02 April 2012 - 04:55 PM
Looks awesome! +1 Rep for you!
Matchlighter #11
Posted 03 April 2012 - 12:58 AM
This looks pretty cool. I'm currently writing my own BIOS(Completely from scratch) for my new project, Mad-OS. It is not gonna be like any other "OS", It's a complete re-write of the Lua part of CC. It will replace almost the whole mods/Computercraft/lua folder. All I will leave is the inbuilt APIs, and the ones having something to do with Java.

Could I possibly steal the concept of this BIOS(For different versions though) ?
-mad1231999

I suppose. I was kind of hoping to make this one a common 'universal' one. It is designed to be pretty versatile as well since I was planning to take FireOS in a similar direction to your Mad-OS. If you wouldn't mind using my actual BIOS, I wouldn't mind sharing the code and making needed adaptations to work with Mad-OS. :)/>/>
Matchlighter #12
Posted 03 April 2012 - 01:00 AM
I would like to help with for example the config file

What do you mean by an example?
Wolvan #13
Posted 03 April 2012 - 02:22 PM
I would like to help with for example the config file

What do you mean by an example?
Sry I meant I could help you in for example making a configuration program or in something else
Mads #14
Posted 03 April 2012 - 05:35 PM
This looks pretty cool. I'm currently writing my own BIOS(Completely from scratch) for my new project, Mad-OS. It is not gonna be like any other "OS", It's a complete re-write of the Lua part of CC. It will replace almost the whole mods/Computercraft/lua folder. All I will leave is the inbuilt APIs, and the ones having something to do with Java.

Could I possibly steal the concept of this BIOS(For different versions though) ?
-mad1231999

I suppose. I was kind of hoping to make this one a common 'universal' one. It is designed to be pretty versatile as well since I was planning to take FireOS in a similar direction to your Mad-OS. If you wouldn't mind using my actual BIOS, I wouldn't mind sharing the code and making needed adaptations to work with Mad-OS. :)/>/>

It would not be the same BIOS, as I am adding alot of features to mine. I paused the project for a while, but I will probably start it again in a couple of weeks or so:D
djblocksaway #15
Posted 04 April 2012 - 03:10 PM
this looks epic can we have a sneak peak of fire OS (pictures maybe!)
Keep up the good work :)/>/>
Matchlighter #16
Posted 13 April 2012 - 03:58 AM
It is finally here! Check out the downloads tab to download and install!
Matchlighter #17
Posted 15 April 2012 - 08:25 AM
this looks epic can we have a sneak peak of fire OS (pictures maybe!)
Keep up the good work :)/>/>

Right now, it is mostly just an idea. But I will keep you updated once I have more.
Matchlighter #18
Posted 26 September 2012 - 09:26 AM
Updated to CC 1.42!
Matchlighter #19
Posted 08 October 2012 - 08:17 AM
Now updated to 0.5 and CC 1.43!