Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- CameronOS Boot Screen
- -- Authentic Sun SPARC-5 style BIOS
- local function bootScreen()
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.gray)
- term.clear()
- term.setCursorPos(1, 1)
- -- Memory bank probing
- print("Probing Memory Bank #2 32 Megabytes")
- print("Probing Memory Bank #3 Nothing there")
- print("Probing Memory Bank #4 Nothing there")
- print("Probing Memory Bank #5 Nothing there")
- print("Probing Memory Bank #6 Nothing there")
- print("Probing Memory Bank #7 Nothing there")
- sleep(0.3)
- print("Probing CPU FMI,MB86904")
- sleep(0.2)
- print("Probing /iommu@0,10000000/sbus@0,10001000 at 5,0 espdma esp sd st SUNW,bpp ledm")
- print("a le")
- sleep(0.2)
- print("Probing /iommu@0,10000000/sbus@0,10001000 at 4,0 SUNW,CS4231 power-management")
- print("Probing /iommu@0,10000000/sbus@0,10001000 at 1,0 Nothing there")
- print("Probing /iommu@0,10000000/sbus@0,10001000 at 2,0 cgthree")
- print("Probing /iommu@0,10000000/sbus@0,10001000 at 3,0 Nothing there")
- print("Probing /iommu@0,10000000/sbus@0,10001000 at 0,0 Nothing there")
- sleep(0.5)
- print("")
- -- Sun logo and system info
- local logoStartY = 14
- term.setCursorPos(1, logoStartY)
- -- Draw Sun logo
- term.setTextColor(colors.gray)
- term.setBackgroundColor(colors.white)
- term.clear()
- local logo = {
- " /\\ ",
- " / \\ ",
- " /\\ \\ \\ ",
- " /\\ \\ \\ \\ ",
- " /\\ \\ \\ \\/\\ ",
- " / /\\ \\ \\/ /\\ ",
- " / / /\\ / / /\\",
- "/ / / \\/ / / \\",
- "\\ / / /\\ / / /",
- " \\/ / / \\/ / /",
- " \\/ /\\ \\ \\/ /",
- " \\/\\ \\ \\ \\/",
- " \\ \\ \\ \\/",
- " \\ \\ \\/",
- " \\ /",
- " \\/ "
- }
- for _, line in ipairs(logo) do
- sleep(0.02)
- print(line)
- end
- sleep(2)
- term.setTextColor(colors.gray)
- term.setCursorPos(1, logoStartY + 17)
- term.setTextColor(colors.gray)
- term.setCursorPos(1, logoStartY + 15)
- term.clear()
- term.setCursorPos(1,1)
- print("SPARCstation 5, Keyboard Present")
- --term.setCursorPos(1, logoStartY + 18)
- print("ROM Rev. 2.15, Some memory installed, Serial #921102.")
- --term.setCursorPos(1, logoStartY + 19)
- local computer = os.getComputerID()
- print("Rednet address unknown, Host ID: " .. computer)
- print("")
- sleep(0.5)
- sleep(1)
- -- Boot device info
- print("Boot device: /iommu/sbus/ledma@5,8400010/le@5,8c00000 File and args:")
- sleep(0.3)
- print("Checking for rednet modem...")
- sleep(1)
- local modem = peripheral.find("modem")
- print("")
- if modem then
- print("Modem would be: " .. tostring(modem))
- else
- print("Timeout waiting for REDNET packet")
- end
- sleep(1)
- print("Lost Carrier (transceiver cable problem?)")
- print("Cable problem or twisted pair hub link-test disabled.")
- print("Use the PROM command 'help rednet' for more information.")
- sleep(0.5)
- print("")
- print("")
- --print("Type help for more information")
- write("ok boot disk")
- -- Cursor simulation
- local cursorTimer = os.startTimer(0.5)
- local showCursor = true
- local waited = 0
- while waited < 2 do
- local event, param = os.pullEvent()
- if event == "timer" and param == cursorTimer then
- if showCursor then
- term.setBackgroundColor(colors.gray)
- write(" ")
- local x, y = term.getCursorPos()
- term.setCursorPos(x - 1, y)
- else
- write(" ")
- local x, y = term.getCursorPos()
- term.setCursorPos(x - 1, y)
- term.setBackgroundColor(colors.white)
- end
- showCursor = not showCursor
- cursorTimer = os.startTimer(0.5)
- waited = waited + 0.5
- elseif event == "key" then
- break
- end
- end
- print("")
- print("")
- sleep(0.3)
- -- Transition to kernel boot
- term.setBackgroundColor(colors.black)
- term.setTextColor(colors.white)
- term.clear()
- term.setCursorPos(1, 1)
- end
- -- Run boot screen
- bootScreen()
- print("SunOS Release 5.7 Version Generic [UNIX(R) System V Release 4.0]")
- print("Copyright (c) 1983-1999, Sun Microsystems, Inc.")
- print("")
- print("Booting kernel...")
- sleep(0.5)
- print("")
- --print("Boot sequence complete!")
- --print("Next: Add kernel initialization and shell...")
- term.setBackgroundColor(colors.black)
- term.setTextColor(colors.white)
- term.clear()
Advertisement
Add Comment
Please, Sign In to add comment