Hey guys! So, I want a little bit different of a coding experience, and I basically want to delete all the rom folder, and edit the bios to just do the bear minimum to get a computer working. It isnt important to be able to edit code in game for me so this would work fine. My question is: what should i change the bios code to?
Removing The Bios?
Started by sci4me, Sep 06 2013 07:19 AM
10 replies to this topic
#1
Posted 06 September 2013 - 07:19 AM
#2
Posted 06 September 2013 - 09:31 AM
1 thing:
DONT even THINK about deleting the "rom" folder!
Doing so will make all APIS unusable.. which means the "os" will crash upon loading (i've tried this... i had to reinstall CC)
I wont help you by doing this... you have to figure that out yourself... (or maybe another will answer)
Period
DONT even THINK about deleting the "rom" folder!
Doing so will make all APIS unusable.. which means the "os" will crash upon loading (i've tried this... i had to reinstall CC)
I wont help you by doing this... you have to figure that out yourself... (or maybe another will answer)
Period
#3
Posted 06 September 2013 - 09:48 AM
Mikk809h, on 06 September 2013 - 09:31 AM, said:
DONT even THINK about deleting the "rom" folder!
Doing so will make all APIS unusable.. which means the "os" will crash upon loading (i've tried this... i had to reinstall CC)
Doing so will make all APIS unusable.. which means the "os" will crash upon loading (i've tried this... i had to reinstall CC)
sci4me, on 06 September 2013 - 07:19 AM, said:
what should i change the bios code to?
--# print and write from bios.lua
--# read from bios.lua
--# os.shutdown and reboot niceties from bios.lua
--# os.run from the bios.lua (and any functions it may also use, like loadfile, setmetatable, also change the printErrors to work without the term API)
local ok, err = pcall(function()
end)
if not ok then
print("Error!\n"..err)
end
pcall( function()
term.native.setCursorBlink( false )
print("Press any key to continue")
os.pullEvent( "key" )
end )
os.shutdown()
Be aware though, there is a LOT of code that you're going to have to change in everything you program, and if you want to use a program or API someone else has used you may as well write it yourself because you'll be changing lots of their code just to work with your new environment.
#4
Posted 06 September 2013 - 03:14 PM
Yes, I am well aware of what can happen. Honestly, I didn't really need to ask this, but at the time I didn't realize how to do it. All I have to do is try to run a boot file and if its not there just wait for it... easy.
Thanks guys!
#5
Posted 06 September 2013 - 03:36 PM
theoriginalbit, on 06 September 2013 - 09:48 AM, said:
you'll have to interface with the terminal with term.native, and turtles with turtle.native (which returns an id and events) and you have to use http.request, there is nothing else, etc.
actually, term.native and turtle.native won't even exist; the lua term and turtle api's wrap up the native term and turtle apis, storing the originals as term.native and turtle.native in the new APIs.
So you would use term and turtle, but they would behave like, and be limited to the functions from, term.native and turtle.native.
http api is as you said.
sci4me: If it were me, I would make it run a lua prompt if there is no startup file, so that a blank computer without a floppy drive or startup disk isn't completely useless.
#6
Posted 06 September 2013 - 03:52 PM
Okay, a few questions:
1. I have to restart MC to get the bios changes?
2. But if I remove the term and turtle files, i use term.native? it isnt working ... explain more?
1. I have to restart MC to get the bios changes?
2. But if I remove the term and turtle files, i use term.native? it isnt working ... explain more?
#7
Posted 06 September 2013 - 04:09 PM
read my previous post again. term.native won't exist, the global term will just be what would normally have been term.native. Same with turtle.
the "native" term and turtle are defined in java, the normal lua apis in the bios wrap them and extend functionality, preserving the raw java (native) apis as term.native and turtle.native.
the "native" term and turtle are defined in java, the normal lua apis in the bios wrap them and extend functionality, preserving the raw java (native) apis as term.native and turtle.native.
#8
Posted 06 September 2013 - 04:21 PM
yeah, I got it now. thanks for the help! ill post again if i need more help but I think i got it!
thanks again!
#9
Posted 06 September 2013 - 04:44 PM
Hmm, I cant use the http api for some reason?
#10
Posted 06 September 2013 - 05:50 PM
Did you try using http.get or .post or did you try using http.request as Bit mentioned? http.get and http.post are defined in bios.lua, you have only http.request by default.
#11
Posted 06 September 2013 - 05:55 PM
I used .request... and it said im trying to use nil or whatever... and it is enabled in the config...
2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users











