mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-15 18:30:27 -04:00
Added backwards compatibility to OpenLoader
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
This commit is contained in:
parent
fb7c2af0d0
commit
d71c52136f
@ -1,9 +1,18 @@
|
||||
local version = "OpenLoader 0.2EE"
|
||||
|
||||
local eeprom = [[
|
||||
_G._OSVERSION = "OpenLoader 0.1EE"
|
||||
_G._OSVERSION = "]] .. version .. [["
|
||||
local component = component or require('component')
|
||||
local computer = computer or require('computer')
|
||||
local unicode = unicode or require('unicode')
|
||||
|
||||
local eeprom = component.list("eeprom")()
|
||||
computer.getBootAddress = function()
|
||||
return component.invoke(eeprom, "getData")
|
||||
end
|
||||
computer.setBootAddress = function(address)
|
||||
return component.invoke(eeprom, "setData", address)
|
||||
end
|
||||
|
||||
local gpu = component.list("gpu")()
|
||||
local w, h
|
||||
@ -147,7 +156,7 @@ say ("Do you really want to flash openloader to EEPROM("..tostring(#eeprom).." b
|
||||
if options.q or options.quiet or io.read():lower() == "y" then
|
||||
say("Flashing... Do not reboot now!")
|
||||
component.eeprom.set(eeprom)
|
||||
component.eeprom.setLabel((type(options.label) == "string" and options.label) or "OpenLoader")
|
||||
component.eeprom.setLabel((type(options.label) == "string" and options.label) or version)
|
||||
if options.r or options.reboot then
|
||||
computer.shutdown(true)
|
||||
else
|
||||
|
@ -1,8 +1,15 @@
|
||||
_G._OSVERSION = "OpenLoader 0.1"
|
||||
_G._OSVERSION = "OpenLoader 0.2"
|
||||
local component = component or require('component')
|
||||
local computer = computer or require('computer')
|
||||
local unicode = unicode or require('unicode')
|
||||
|
||||
local eeprom = component.list("eeprom")()
|
||||
computer.getBootAddress = function()
|
||||
return component.invoke(eeprom, "getData")
|
||||
end
|
||||
computer.setBootAddress = function(address)
|
||||
return component.invoke(eeprom, "setData", address)
|
||||
end
|
||||
|
||||
local gpu = component.list("gpu")()
|
||||
local w, h
|
||||
|
Loading…
x
Reference in New Issue
Block a user