This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
nutcase84's profile picture

MC-Dos | A CraftOS emulator

Started by nutcase84, 21 May 2012 - 01:55 PM
nutcase84 #1
Posted 21 May 2012 - 03:55 PM
MC-Dos
A Dos Based OS That Runs Lua And All It's APIs!

___________________________________________________________________________________________________

I am working on a MS-Dos based os that runs computercraft programs!

Currently i have the planed bootorder:
1. Dos
2. Lua
3. Lua Loads APIs And Stuff
4. Lua Loads OS


More Info Comming Soon!



Sorry for the delay :P/>/>. I have been working on other stuff.
BigSHinyToys #2
Posted 21 May 2012 - 06:57 PM
and we need to know this why??
couldn't you have waited till you had actual code / program to post??
PixelToast #3
Posted 21 May 2012 - 07:07 PM
id love to see this when its done
nutcase84 #4
Posted 22 May 2012 - 04:08 PM
I thought it would be good to let people know that i am making this.

id love to see this when its done
thanks!
D3matt #5
Posted 23 May 2012 - 05:26 AM
So you're making an LUA OS?
ComputerCraftFan11 #6
Posted 23 May 2012 - 06:21 AM
Like this?

cls
echo CraftOs 1.3

Just kidding, would love to see the final product.
Xfel #7
Posted 23 May 2012 - 03:06 PM
Are you using the original computer core classes or did you write them yourself? I'm just interested in how close to the original it will be. And as there is a number of classes in the core package of CC which don't depend on any minecraft class (Except for the NBT one and some font helper), it would be cute to use them.
PixelToast #8
Posted 23 May 2012 - 07:04 PM
wait, is this going to be an external program? I would love to see that so I can test without having potential lag and threats to the code.
someone dosent know what dos is
anyways dan made it impossible to lag the server with lua programs

and you dont need to rewite classes you just need to inturpret each line one by one, and making the code for all the commands takes awhile
D3matt #9
Posted 24 May 2012 - 05:07 AM
anyways dan made it impossible to lag the server with lua programs
Source?
ComputerCraftFan11 #10
Posted 24 May 2012 - 05:52 AM
wait, is this going to be an external program? I would love to see that so I can test without having potential lag and threats to the code.
someone dosent know what dos is
anyways dan made it impossible to lag the server with lua programs

Impossible? Huh.

while true do
rs.setOutput("back", true)
rs.setOutput("back", false)
end
LIES!
Cloudy #11
Posted 24 May 2012 - 10:46 AM
Which will last for four seconds then stop - and it won't lag the server, merely the computer.

Please refrain from posting anything malicious on the forum. It is VERY difficult to affect the server as the Lua instance runs in a seperate thread.

However that issue is known and will be looked into.
PixelToast #12
Posted 25 May 2012 - 03:41 AM
wait, is this going to be an external program? I would love to see that so I can test without having potential lag and threats to the code.
someone dosent know what dos is
anyways dan made it impossible to lag the server with lua programs

Impossible? Huh.

while true do
rs.setOutput("back", true)
rs.setOutput("back", false)
end
LIES!
it will give a "too long without" or something error and if you put sleep(0) it wont go fast enough to lag at all
Noodle #13
Posted 25 May 2012 - 06:30 AM
Impossible? Huh.

while true do
rs.setOutput("back", true)
rs.setOutput("back", false)
end
LIES!

That crashes servers!
ComputerCraftFan11 #14
Posted 25 May 2012 - 08:13 AM
wait, is this going to be an external program? I would love to see that so I can test without having potential lag and threats to the code.
someone dosent know what dos is
anyways dan made it impossible to lag the server with lua programs

Impossible? Huh.

while true do
rs.setOutput("back", true)
rs.setOutput("back", false)
end
LIES!
it will give a "too long without" or something error and if you put sleep(0) it wont go fast enough to lag at all

Really? It goes too fast it will break before lagging. Read below
Impossible? Huh.

while true do
rs.setOutput("back", true)
rs.setOutput("back", false)
end
LIES!

That crashes servers!
Noodle #15
Posted 26 May 2012 - 12:22 AM
ikikik..
bbqroast #16
Posted 26 May 2012 - 06:51 AM
Which will last for four seconds then stop - and it won't lag the server, merely the computer.

Please refrain from posting anything malicious on the forum. It is VERY difficult to affect the server as the Lua instance runs in a seperate thread.

However that issue is known and will be looked into.
Meh, just make a call that yields every once in a while. And who made you a moderator? The general rule on forums is not to act like you have authority unless you have it. As for posting malicious code, if we don't then it will never be fixed. I see nothing wrong with making a point and using some code to back it up. Oh and as you may not understand especially in non dedicated/cheaper solutions the LUA thread could easily take resources from the MC thread (computers are designed to share resources between threads).
Cloudy #17
Posted 26 May 2012 - 10:56 AM
I know perfectly how threads work, thank you.

The reason I asked not to post malicious code is because it is against the rules - and people know that this issue is already known as there is a massive thread about it in the bugs section. Just posting it in a thread to show off brings more attention to it than is neccesary, and may inconvenience server owners with people using it.

Lastly, I know I am not a moderator - but I am a developer of ComputerCraft (albeit for small bug fixes and features) - and as such feel some responsibility to try and stop people if I can by politely asking.
PixelToast #18
Posted 31 May 2012 - 03:48 AM
have you tried creating a virtual bios and loading a dos ISO directly?
derp. that would require either setting specific pixels or modifying dos itself
Tiin57 #19
Posted 16 July 2012 - 04:45 PM
Any updates?
kazagistar #20
Posted 17 July 2012 - 07:51 AM
Doubt it, this smelled of vapor ware from the get go.
nutcase84 #21
Posted 27 September 2012 - 12:28 PM
have you tried creating a virtual bios and loading a dos ISO directly?
derp. that would require either setting specific pixels or modifying dos itself

Sorry for not updating :P/>/>
The system it is going to use is complicated.
So here is the boot order:
1: load dos
2: load C
3: load lua
4: load all the api stuff and those kind of things

I have to learn c to do it. thats why it's taking so long.
nutcase84 #22
Posted 27 September 2012 - 12:44 PM
Are you using the original computer core classes or did you write them yourself? I'm just interested in how close to the original it will be. And as there is a number of classes in the core package of CC which don't depend on any minecraft class (Except for the NBT one and some font helper), it would be cute to use them.

I am just running C off of Dos and then C runs lua and the APIs. I am going to have to edit the computercraft API to get rid of the Redstone and Peripheral stuff.
Orwell #23
Posted 27 September 2012 - 01:09 PM
Are you using the original computer core classes or did you write them yourself? I'm just interested in how close to the original it will be. And as there is a number of classes in the core package of CC which don't depend on any minecraft class (Except for the NBT one and some font helper), it would be cute to use them.

I am just running C off of Dos and then C runs lua and the APIs. I am going to have to edit the computercraft API to get rid of the Redstone and Peripheral stuff.

1. You know DOS is dead for quite some time now? Do you mean the command prompt?
2. How would you 'run' C of DOS? C is not a scripting language, so you can't really 'run' C code. You compile C code and then run the program? So I don't really get what you mean by 'loading C' and running it off of DOS?
nutcase84 #24
Posted 28 September 2012 - 12:33 PM
Are you using the original computer core classes or did you write them yourself? I'm just interested in how close to the original it will be. And as there is a number of classes in the core package of CC which don't depend on any minecraft class (Except for the NBT one and some font helper), it would be cute to use them.

I am just running C off of Dos and then C runs lua and the APIs. I am going to have to edit the computercraft API to get rid of the Redstone and Peripheral stuff.

1. You know DOS is dead for quite some time now? Do you mean the command prompt?
2. How would you 'run' C of DOS? C is not a scripting language, so you can't really 'run' C code. You compile C code and then run the program? So I don't really get what you mean by 'loading C' and running it off of DOS?

Is command prompt a standalone os? I don't think so.

And i just figured out that i can just make it a standalone dos program using a C for dos compiler. I have a EXTREMELY old book on C for dos, And i have a computer that runs dos.
Orwell #25
Posted 28 September 2012 - 01:02 PM
Ok, but then you'd just have to compile the lua runtime library for DOS. Then compile some additional libraries for the CC simulation. And then C has nothing to do with it anymore.
Also, creating this in DOS is quite limiting. Not many people will be able to use it without a lot of effort.

Are you using the original computer core classes or did you write them yourself? I'm just interested in how close to the original it will be. And as there is a number of classes in the core package of CC which don't depend on any minecraft class (Except for the NBT one and some font helper), it would be cute to use them.

I am just running C off of Dos and then C runs lua and the APIs. I am going to have to edit the computercraft API to get rid of the Redstone and Peripheral stuff.

1. You know DOS is dead for quite some time now? Do you mean the command prompt?
2. How would you 'run' C of DOS? C is not a scripting language, so you can't really 'run' C code. You compile C code and then run the program? So I don't really get what you mean by 'loading C' and running it off of DOS?

Is command prompt a standalone os? I don't think so.

And i just figured out that i can just make it a standalone dos program using a C for dos compiler. I have a EXTREMELY old book on C for dos, And i have a computer that runs dos.

Ok, but then you'd just have to compile the lua runtime library for DOS. Then compile some additional libraries for the CC simulation. And then C has nothing to do with it anymore.
Also, creating this in DOS is quite limiting. Not many people will be able to use it without a lot of effort.
KaoS #26
Posted 29 September 2012 - 08:04 AM
DOS limiting???? ok I'm going to politely disagree with that. DOS in amazing, I use it all the time for all sorts of things (well mainly hacking as the old files weren't very secure)

in my opinion CC is a little easier to use but anything you make in CC can eventually be coded in DOS as well (coroutines would be a nightmare I admit)
Cloudy #27
Posted 29 September 2012 - 09:07 AM
Sigh. DOS IS limiting - due to the hardware support, memory support etc
- unless you're talking about command prompt - which ISN'T DOS.

Exactly what would this achieve anyway? If you have to boot into DOS to run this then you mightaswell just start up Minecraft.
KaoS #28
Posted 29 September 2012 - 10:15 AM
I suppose the hardware support is irritating… I use the origional DOS files and carry them on a flash, because everyone perceives it to be dead I think they may not take it into account because a few permission properties etc have no effect on it
ardera #29
Posted 29 September 2012 - 11:09 AM
Here is a link for an Lua OS: http://luaos.net/
But I'm althought curious for the Dos.

Can you add features to set pixels and some other stuff like the mouse implementation and keystrokes?
nutcase84 #30
Posted 29 September 2012 - 12:25 PM
Here is a link for an Lua OS: http://luaos.net/
But I'm althought curious for the Dos.

Can you add features to set pixels and some other stuff like the mouse implementation and keystrokes?

I don't know. I am just trying to have craftos in dos. I don't think i am going to add stuff thats not in craftos.
Orwell #31
Posted 30 September 2012 - 01:36 AM
DOS limiting???? ok I'm going to politely disagree with that. DOS in amazing, I use it all the time for all sorts of things (well mainly hacking as the old files weren't very secure)

in my opinion CC is a little easier to use but anything you make in CC can eventually be coded in DOS as well (coroutines would be a nightmare I admit)
Sigh. DOS IS limiting - due to the hardware support, memory support etc
- unless you're talking about command prompt - which ISN'T DOS.

Exactly what would this achieve anyway? If you have to boot into DOS to run this then you mightaswell just start up Minecraft.

That's exactly what I meant with limiting. : ) If nutcase just wants to run this in the command prompt, then this is a whole different story of course. Above that, the nice thing about running ComputerCraft in Minecraft or ComputerCraft Emulator is that it's cross platform. Of course DOS isn't heavy to emulate on another OS (like FreeDOS), but still, it's less practical.
PixelToast #32
Posted 02 October 2012 - 04:19 AM
why not just get all the classes from CCemu and edit the rendering code, making it DOS compatible
Cloudy #33
Posted 02 October 2012 - 07:07 PM
why not just get all the classes from CCemu and edit the rendering code, making it DOS compatible

Yes, let's port Java to MS-DOS too!

</sarcasm>
max1220 #34
Posted 03 October 2012 - 07:17 PM
Porting a CCEmu on DOS will be EXTREEEEEME complex. More like impossible toyou.
Here are just some reasons:
  1. DOS is a single-user single-thread OS, so coroutine will be REALY hard, because you have to implement MT.
  2. DOS is mostly a real-mode OS(16-Bit). I don't think anyone ported a newer LUA to a real-mode machine –> You'll need to port it yourself.
  3. DOS don't gots any rendering classes. If you want to use the rendering-classes used in CC, you'll need to write a renderer. Nearly impossible for you…
  4. 16-Bit gots RAM limitations. If you want to port all that stuff, and want to run it, you'll need a way to adress more RAM.
  5. License? I think, forsome parts(Like the rendering driver) you'll need to use someone leses code.
  6. Also I think, you'll have to modifie DOS assembly, for thinks like multithreadering. Microsoft is ClosedSource(TM)(C)All rights registered :(/>/>
  7. Why not just use Linux?
  8. I think, you're bit to unadvanced in programming and such things to solve all these problems(This is not an insult, me to :D/>/>)

Use Linux, it's goddamming small too, LUA is ported to it, you can access every hardware as mutch as you want, Java works also on Linux, Linux got's MT…
Here are some really interesting thinks you might want to read about first:

Know-How(Read first!)If you still want to make a bootable CC-Emulator, here are some things, that will help you:


So please stop thinking(And posting) about DOS. It's was a great OS, but it is not for emulating CC, because of Java, Rendering, RAM, (More see @top of this post B)/>/>)
The most easy way would be to modify the CC emu, and build an own Linux, based on DSL, but with Java preinstalled, and the CC-Emu in the xstartup.
But this still needs a lot of know-how, will take all your freetime, and is kinda senseless..

I hope I could help, even just to understad why not trieng to do something like this…



G r e e t z, m a x 1 2 2 0
Cranium #35
Posted 03 October 2012 - 08:34 PM
—SNIP FOR LENGTH—

Dang, max…somebody did their homework O.O
Xtansia #36
Posted 04 October 2012 - 12:27 AM
@Everybody suggesting porting/modifying cc-emu etc.
To do that you would need these things:
-> My permission to modify/port and distribute cc-emu
-> Dan200's permission to use/distribute ComputerCraft
immibis #37
Posted 04 October 2012 - 01:34 AM
Lua (the C version) doesn't use OS threads for coroutines, and is designed for portability. The website claims it "compiles for all known platforms."
That said, using MS-DOS is a stupid idea. Even an OS written from scratch (which is actually easier than it first seems) would probably be easier, since you won't be constrained by real mode. If you want to do anything complex in DOS, you'd practically have to write your own OS anyway.
Or just use Linux as max1220 said.

And the most important question:
Why would this project be useful?
nutcase84 #38
Posted 29 January 2013 - 08:00 AM
I am discontinuing the project, as it is improbable. If anyone wants to make this, go ahead.
tesla1889 #39
Posted 29 January 2013 - 02:05 PM
ugh! why DOS of all operating systems? at least pick one that's reliable and cool, breh