minor fixes for startup beep, monochrome monitor; new mono monitor colour (amethyst)

Former-commit-id: 305989668765a7fb2c906b7538e51a7a6fb20fe9
Former-commit-id: 832a84bc30dfb3db86d29b65ea97b70b4e6e4fd0
This commit is contained in:
Song Minjae
2016-09-30 21:04:11 +09:00
parent 0859544bd6
commit 3f34286b3f
6 changed files with 90 additions and 26 deletions

View File

@@ -8,7 +8,7 @@
-- global functions
_G.runscript = function(s, src, ...)
if s:byte(1) == 27 then error("Bytecode execution is prohibited.") end
if s:byte(1) == 27 then error("Bytecode execution is prohibited.") end -- untested; it's Lua 5.1 code and we're 5.2
local code, reason = load(s, src)
@@ -53,7 +53,6 @@ if totalMemory() == 0 then
return
end
local hookInterval = 100
local deadline = math.huge
local hitDeadline = false
@@ -1005,7 +1004,6 @@ if not computer.loadedCLayer then computer.loadedCLayer = {} end -- list of load
-- if no bootloader is pre-defined via EFI, use default one
if not computer.bootloader then computer.bootloader = "/boot/bootloader" end
if not computer.OEM then computer.OEM = "" end
computer.beep = emittone
computer.totalMemory = _G.totalMemory
if not computer.bellpitch then computer.bellpitch = 1000 end
local getMemory = function()
@@ -1019,7 +1017,7 @@ computer.freeMemory = function() return totalMemory() - getMemory() end
require("ROMLIB")
-- POST passed, initialise beeper
beep "."
speaker.enqueue(80, 1000) -- term.bell sometimes get squelched
-- load bios, if any
if fs.exists(computer.bootloader) then shell.run(computer.bootloader) end