BIOS - Basic Integrated Operating System
Provides APIs to get information about the peripherals, and their methods, are the direct or indirect.
Also gives info about LIKO-12's version, and previous version when updated from an old one (only the first boot with the new version). Starting with LIKO-12 0.9.0, It also gives the .love of LIKO-12.
- Version: v1.18.3
- Available since: LIKO-12 v0.6.0
- Last updated in: LIKO-12 v1.0.0
Methods:
BIOS.HandledAPIS
Returns the handled peripherals APIS, that can be used directly.
- Available since: BIOS: v1.15.2, LIKO-12: v0.7.0
- Last updated in: BIOS: v1.15.2, LIKO-12: v0.7.0
The HandledAPIS table is passed to the operating system's
boot.lua
as an argument:
--In C:/boot.lua local HandledAPIS = ...
HandledAPIS = BIOS.HandledAPIS()
Returns:
- HandledAPIS (table): The peripherals handled APIS.
Note:
The peripherals handled APIS is a table where the keys and values are:
- Keys: The mount name.
- Values: The peripheral methods (functions).
BIOS.PeripheralFunctions
Returns the list of available peripheral functions, and their type (Direct,Yield).
- Available since: BIOS: v1.15.2, LIKO-12: v0.7.0
- Last updated in: BIOS: v1.15.2, LIKO-12: v0.7.0
It's good to know if a method/function is a yield or direct one:
- Direct Methods are called directly, fast.
- Yielding Methods requires a coroutine yield, slow.
functions = BIOS.PeripheralFunctions(mountName)
Arguments:
- <mountName> (string): The peripheral mount name.
Returns:
- functions (table): The peripheral functions list.
Note:
The peripheral functions list is a table where the keys and values are:
- Keys: The function/method name.
- Values: The function/method type (
"Direct"
or"Yield"
).
BIOS.Peripherals
Returns a list of mounted peripherals and their types.
- Available since: BIOS: v1.15.2, LIKO-12: v0.7.0
- Last updated in: BIOS: v1.15.2, LIKO-12: v0.7.0
peripherals = BIOS.Peripherals()
Returns:
- peripherals (table): The peripherals list.
Note:
The peripherals list is a table where the keys and values are:
- Keys: The mount name.
- Values: The peripheral type.
BIOS.getSRC
Returns LIKO-12_Source.love
data.
- Available since: BIOS: v1.18.2, LIKO-12: v1.0.0
- Last updated in: BIOS: v1.18.2, LIKO-12: v1.0.0
LIKO-12_Source.love
is created at the first boot whenever a different LIKO-12 version is used, with the messageGenerating internal file...
shown.
LIKO_SRC, err = BIOS.getSRC()
Returns:
- LIKO_SRC (string, boolean): The file data of LIKO-12's source code .love file.
- err (string, nil): The failure reason if
LIKO_SRC
wasfalse
.
BIOS.getVersion
Returns LIKO-12's Version.
- Available since: BIOS: v1.15.2, LIKO-12: v0.7.0
- Last updated in: BIOS: v1.15.2, LIKO-12: v0.7.0
The
LIKO_Old
value is only provided when LIKO-12 boots for the first time with the new version.
LIKO_Version, LIKO_Old = BIOS.getVersion()
Returns:
- LIKO_Version (string): Current LIKO-12's version string (ex:
1.0.0_DEV
). - LIKO_Old (string, nil): The previous installed LIKO-12's version string (ex:
0.8.0_PRE
).
BIOS.isFirstBoot
Tells if this is the first boot of LIKO-12 ever.
- Available since: BIOS: v1.18.3, LIKO-12: v1.0.0
- Last updated in: BIOS: v1.18.3, LIKO-12: v1.0.0
FirstBoot = BIOS.isFirstBoot()
Returns:
- FirstBoot (boolean): True when this is the first boot of LIKO-12 ever.