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

[ROM Pack] GBios - Pure Post-BIOS Execution

Started by thecrimulo, 11 December 2016 - 09:56 PM
thecrimulo #1
Posted 11 December 2016 - 10:56 PM
KernlORG Galaxi presents
GBios v0.4

GBios is a ROM Pack that will let you customize your system at maximum, executing just after bios.lua, as it modifies /rom/programs/shell and /rom/programs/advanced/multishell to execute /vmgalaxi in the root directory. If you don't know yet, bios.lua is the minimum required for ComputerCraft programs to run, and this is what GBios does. You can put anything you want in /vmgalaxi. Why not /startup? Because that is executed later, in /rom/startup, that runs after the actual shell and multishell programs.


Update 0.3
I have added libgbios, that you can selectively load from /rom/apis/libgbios, that contains information about the current rom pack you're using, just by loading /rom/bios with dofile. Also, you can use libgbios.lsrom() to list everything recursively in the rom directory (as a treeview).
Also, a critical bug was fixed where it used shell.run in the actual shell script, now it's replaced by os.run.
And, a brand new feature! You can now automatically add files to the root directory, you can use compile.sh –autoroot that will create /rom/autogen, that will copy all files in /rom/root to / if /vmgalaxi doesn't exist.


NEW UPDATE! 0.4

On this update, shell and multishell will now check if /rom/autogen and /vmgalaxi exists, providing other fallback options and a rescue shell in case none of /vmgalaxi, /rom/vmgalaxi or /rom/root/vmgalaxi exists, it executes /rom/stock/vmgalaxi. /rom/stock is where default programs are put and that aren't meant to be executed in normal operation. Also, fixed a bug where compile.sh generated the zip wrong-way.

Grab it here!: https://github.com/daelvn/gbios
Edited on 13 December 2016 - 08:17 PM
H4X0RZ #2
Posted 12 December 2016 - 05:31 AM
Isn't it much easier to use a TLCO?
thecrimulo #3
Posted 12 December 2016 - 06:26 AM
It isn't possible in this pack because as the ROM can't be edited, you can't modify how many coroutimes will initially have or what files it will execute. The point of this pack os allowing normal operating with the less possible, that is bios.lua. If you want to start a TLCO, you can do it on /vmgalaxi (btw i also have to add file checking
H4X0RZ #4
Posted 12 December 2016 - 01:45 PM
It isn't possible in this pack because as the ROM can't be edited, you can't modify how many coroutimes will initially have or what files it will execute. The point of this pack os allowing normal operating with the less possible, that is bios.lua. If you want to start a TLCO, you can do it on /vmgalaxi (btw i also have to add file checking

But as long as the ROM hasn't been edited you know exactly what coroutines are spawned at the beginning. Just disable error handling and make the rednet coroutine crash. Et Voilà, you just got bios.lua level of execution.
thecrimulo #5
Posted 12 December 2016 - 02:44 PM
I thought you meant my own coroutines, not the default ones. Anyways, as it says pure post bios.lua, its not false, it already is. The coroutine starts in bios.lua, thats why I decided to leave it like this, because, it is bios.lua and this rom pack is made for normal operation, and rednet is in normal operation.
H4X0RZ #6
Posted 12 December 2016 - 05:38 PM
After looking at your code I'm not even sure if it works. shell.run is defined in the normal shell program which you completely replaced. The function shouldn't be available.
thecrimulo #7
Posted 12 December 2016 - 08:17 PM
You're right, I wanted to give all libraries possible to /vmgalaxi but I forgot the Shell API is actually in the program. I'll fix it ASAP

EDIT: You can fix it and build it yourself it you want to test it
Edited on 13 December 2016 - 01:38 PM