-
Notifications
You must be signed in to change notification settings - Fork 2
Custom ROM for computers
CCTweaks adds the ability to boot computers using a custom ROM.
To do this, you should first create a new disk with a bios.lua
file in the root directory. This disk can then be crafted with a computer (or turtle or pocket computer), giving a computer which will use this disk as the rom
folder instead. There are a couple of things to note here:
- Nothing is defined: anything you see in the default
bios.lua
orrom/startup
hasn't been run: you are truly stuck with a bare bones system. This means even simple functions likeprint
aren't defined: you'll have to add them yourself. -
rom
is missing. Your disk is the newrom
, meaning none of the files you're used to (likerom/programs/shell
) exist: you'll have to write them yourself, or copy them over.
If you're not happy with the ROM, you can always craft the computer on its own to get the disk back, or craft it with a different disk to swap out the old disk for the new one.
Custom ROMs are configured within the Computer.CustomRom
section:
-
enabled=true
: If custom ROM support is enabled. If this is false, all computers will use the default ROM. -
crafting=true
: If crafting computers with custom ROM is enabled. This may be useful if you don't want players to be able to create computers with custom ROMs.
It is worth noting that computers actually boot off a "pre-bios" first: this applies some sandboxing to the environment and launches the main bios.lua
file. You can modify this file using the Computer.preBiosPath
config option. It is worth noting that the specified file is looked for on the class path: and so must be bundled up into a jar.