num_pi 30 Опубликовано: 2 мая (изменено) Выкладываю столь смешной и интересный биос, на просторы этого форума. Основная моя цель состоит в том, что бы этот биос не пропал и не канул в лету в небытие... Наслаждайтесь! Для использования, загрузить комп с openos, написать cd /tmp, edit 1 и вставить содержимое ниже, потом сохранить файл через ctrl + s; и выйти ctrl + w, и прошить написав flash -q 1 P.S Оригинальный автор сего шедевра, это @BadCoder и был им написан как стёб биос на topBios от root master Скрытый текст local init do local component_invoke = component.invoke local function boot_invoke(address, method, ...) local result = table.pack(pcall(component_invoke, address, method, ...)) if not result[1] then return nil, result[2] else return table.unpack(result, 2, result.n) end end -- backwards compatibility, may remove later local eeprom = component.list("eeprom")() computer.getBootAddress = function() return boot_invoke(eeprom, "getData") end computer.setBootAddress = function(address) return boot_invoke(eeprom, "setData", address) end do local screen = component.list("screen")() local gpu = component.list("gpu")() if gpu and screen then boot_invoke(gpu, "bind", screen) end end do local gpu = component.list("gpu")() local static = { balls = { "⡠⠊⠉⠑⢄", "⢇ ⡸", "⢀⠕⠒⠪⡀", "⡇ ⢸", "⠈⠢⠤⠔⠁" }, meat = { " ", "⠉", " ", "⠤", " " }, konec = { " ", "⡝⠑⠒⠤⡀", "⡇ ⠐⡺", "⠵⠔⠒⠉", " " } } local screen_width, _ = boot_invoke(gpu, "getResolution") local length = screen_width - 10 local buffer = static["balls"] for i = 1, 5 do buffer[i] = buffer[i] .. static["meat"][i]:rep(length) .. static["konec"][i] boot_invoke(gpu, "set", 1, i, buffer[i]) end computer.pullSignal(1) local melody = { 554, 622, 622, 698, 831, -10, 740, 698, 622, 554, 622, -1, -20, 415, 415, -1 } local rhythm = { 6, 10, 6, 6, 1, -10, 1, 1, 1, 6, 10, 4, -20, 2, 10, 10 } for i = 1, 16 do if melody[i] > 0 then computer.beep(melody[i], rhythm[i] * 0.1) elseif melody[i] == -1 then computer.pullSignal(rhythm[i] * 0.1) elseif melody[i] == -10 then boot_invoke(gpu, "set", 7, 3, "PENIS BIOS") elseif melody[i] == -20 then boot_invoke(gpu, "set", 17, 3, "; FUCKING PEOPLE SINCE 1984") end end end local function tryLoadFrom(address) local handle, reason = boot_invoke(address, "open", "/init.lua") if not handle then return nil, reason end local buffer = "" repeat local data, reason = boot_invoke(address, "read", handle, math.huge) if not data and reason then return nil, reason end buffer = buffer .. (data or "") until not data boot_invoke(address, "close", handle) return load(buffer, "=init") end local reason if computer.getBootAddress() then init, reason = tryLoadFrom(computer.getBootAddress()) end if not init then computer.setBootAddress() for address in component.list("filesystem") do init, reason = tryLoadFrom(address) if init then computer.setBootAddress(address) break end end end if not init then error("no bootable medium found" .. (reason and (": " .. tostring(reason)) or ""), 0) end end return init() Изменено 2 мая пользователем num_pi Форматирование кода Цитата Поделиться сообщением Ссылка на сообщение Поделиться на других сайтах