Skip to content
This repository has been archived by the owner on Jul 1, 2018. It is now read-only.

Custom ROM for computers

SquidDev edited this page Mar 2, 2017 · 1 revision

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 or rom/startup hasn't been run: you are truly stuck with a bare bones system. This means even simple functions like print aren't defined: you'll have to add them yourself.
  • rom is missing. Your disk is the new rom, meaning none of the files you're used to (like rom/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.

Configuration

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.

Clone this wiki locally