Bananasrawesome 0 Posted April 18, 2016 Share Posted April 18, 2016 I don't know how to program in Lua but I do know MS-DOS pretty well. I think an MS-DOS emulator in the game which installs the same way as open os and does the same thing would be easier for those who do not know Lua and might know Batch. Are their any add-ons that add this feature? If so, could someone provide a download link? The Minecraft version this is for is 1.7.10. Quote Link to post Share on other sites
dgelessus 26 Posted April 18, 2016 Share Posted April 18, 2016 Unless I'm mistaken the OpenOS command line has some aliases for DOS commands by default, such as dir for ls. I doubt proper command.com/cmd.exe emulation will ever be a thing though. MS-DOS/Windows Batch lacks a number of useful features - it doesn't have functions, if and for are very limited compared to the Unix shell, variable expansion and quoting behave oddly, pattern expansion is not done by the shell but by the commands. And Windows's backward compatibility features would need to be emulated too, like 8.3 file names, case insensitivity, \ instead of / in paths, / instead of - for command line switches, etc. If you want to write a cmd.exe emulator for OpenOS, go ahead. Though I assure you it will be much easier to learn Lua, which is for the most part a very nice and logical programming language with few surprising "pitfalls". Quote Link to post Share on other sites
Bananasrawesome 0 Posted April 21, 2016 Author Share Posted April 21, 2016 Well, i guess you're right. I'll get to learning Lua as soon as I'm done learning C++ but that may not happen soon, unless I lose interest in C++. Quote Link to post Share on other sites
Bananasrawesome 0 Posted April 21, 2016 Author Share Posted April 21, 2016 My computer is Windows. Is it possible for me to copy the cmd.exe file and use that? Also, how would i add that to the mod? Quote Link to post Share on other sites
dgelessus 26 Posted April 21, 2016 Share Posted April 21, 2016 OpenComputers doesn't emulate any real CPU architecture and it's also not a virtualization environment like VirtualBox, so you can't directly install any "normal" operating systems or run Windows exe files or Linux/OSX binaries. The lowest level you can get is writing a custom BIOS on an EEPROM chip, but even that uses Lua. It is theoretically possible to write add-ons that add additional languages to write your BIOSes in, and there have been attempts to write such add-ons for real CPU architectures like ARM, but those are all in their "alpha" stages. Besides, in a Minecraft mod you do not have enough resources to run a proper operating system. Quote Link to post Share on other sites
GreaseMonkey 7 Posted April 29, 2016 Share Posted April 29, 2016 Besides, in a Minecraft mod you do not have enough resources to run a proper operating system. MS-DOS is a proper operating system. Writing an x86 emu will be a pain in the arse, but there's enough resources to do it. Heck, I got pretty close to getting Linux to mount root w/ OCMIPS. I did have to modify the config to allow 8MB of RAM though, but allegedly you can *juuust* squeeze Linux into 4MB of RAM. For extra fun, I managed to get Lua 5.3.2 (~350KB) to boot off a T1 stick of RAM (192KB) using a virtual memory microkernel. I would argue that it's possible to emulate a C64 - probably not at full speed or accuracy - in Lua. The real thing has 64KB of RAM. Technically it's a proper operating system. those are all in their "alpha" stages. OCMIPS is complete enough in the emulator department. It just lacks software. Quote Link to post Share on other sites
dgelessus 26 Posted April 29, 2016 Share Posted April 29, 2016 MS-DOS is a proper operating system. By "proper" I meant "current", regarding the question whether cmd.exe could run under OC. Yes, MS-DOS is a functional operating system. Not really a good candidate to run on OC though, because it's not freely available - you'd need to actually own a copy of MS-DOS, and a real working floppy drive to read it. The newest you could use is MS-DOS 1 or 2 available in source and binary form from here. Quote Link to post Share on other sites
GreaseMonkey 7 Posted April 29, 2016 Share Posted April 29, 2016 By "proper" I meant "current" My Linux port attempt uses Linux 4.1.13 which is the same version I am using on this laptop to write this message. So it's very much current. Yes, MS-DOS is a functional operating system. Not really a good candidate to run on OC though, because it's not freely available Use FreeDOS. I have that on my 266MHz Celeron. Heck, if you want something else that's "current", consider something like RTEMS. Or are you going to use the "not a desktop OS" excuse for that? Quote Link to post Share on other sites
dgelessus 26 Posted April 29, 2016 Share Posted April 29, 2016 My Linux port attempt uses Linux 4.1.13 which is the same version I am using on this laptop to write this message. So it's very much current. As I said, I was referring to running cmd.exe under OC. That would require something Windows-like (I assume cmd.exe cannot run on MS-DOS or a variant). Other than that, yes, Linux is probably the most logical OS to try to run under OC. Maybe I should stop talking, I am kind of tired. If my posts make no sense or I sound rude, please don't take it personally. Quote Link to post Share on other sites
jhagrid77 4 Posted May 2, 2016 Share Posted May 2, 2016 Unless I'm mistaken the OpenOS command line has some aliases for DOS commands by default, such as dir for ls. I doubt proper command.com/cmd.exe emulation will ever be a thing though. MS-DOS/Windows Batch lacks a number of useful features - it doesn't have functions, if and for are very limited compared to the Unix shell, variable expansion and quoting behave oddly, pattern expansion is not done by the shell but by the commands. And Windows's backward compatibility features would need to be emulated too, like 8.3 file names, case insensitivity, \ instead of / in paths, / instead of - for command line switches, etc. If you want to write a cmd.exe emulator for OpenOS, go ahead. Though I assure you it will be much easier to learn Lua, which is for the most part a very nice and logical programming language with few surprising "pitfalls". I'm a bit late, but yes most are: http://ocdoc.cil.li/basic_commands Quote Link to post Share on other sites