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

CraftOS-PC: ComputerCraft "emulator" for desktop!

Started by JackMacWindows, 14 October 2018 - 08:29 AM
JackMacWindows #1
Posted 14 October 2018 - 10:29 AM
UPDATE: CraftOS-PC Classic has been succeeded by CraftOS-PC 2, which has been rewritten from the ground up in C++ to run much faster than CraftOS-PC Classic. It also supports CC: Tweaked APIs, running multiple computers, and even a full Lua debugger. You can see the full forum post here, or you can visit the official website at www.craftos-pc.cc.

The original forum post is listed in the spoiler box below.

Original postHello,
I have been working on a desktop front-end for CraftOS 1.8 for a while so I could write ComputerCraft programs without having to start up Minecraft every time. Today I am announcing it is officially complete!

This fully emulates an advanced computer (except for peripherals and networking) and works with both keyboard and mouse. It supports all APIs and any program written for ComputerCraft should work on CraftOS-PC. The source code and downloads can be found here. It runs fully on Java using most of the original ComputerCraft codebase (with some modifications to remove Minecraft references) and is cross-platform. The save files are stored at ~/.craftos/computer/0, so you can drop your files in there.
If you're just looking for the download link, you can get the JAR here.
Edited on 02 January 2020 - 11:20 PM
SquidDev #2
Posted 14 October 2018 - 01:26 PM
Always nice to see other emulators! Just a couple of comments:
  • It might be worth adding a margin to the terminal (I believe CC's is 2 pixels wide), so characters aren't quite so hard up against the edge of the window.
  • It should be possible to bundle the entire CC jar, and just be careful which bits you load. That's what other emulators like CCEmuX and CCEmuRedux do. This makes keeping up-to-date with the latest CC version a tad easier.
  • It might also be worth adding support for having multiple computers. Either through some GUI, or integrated into CraftOS.
JackMacWindows #3
Posted 24 February 2019 - 07:23 AM
A little preview of a feature I've been working on:



Live in the current commit on the repository.
LDDestroier #4
Posted 24 February 2019 - 09:53 PM
CraftOS-PC seems to load anything I throw at it fine, although some timing sensitive things like games run very fast and choppy.

And is that one of the CGA King's Quest games?
JackMacWindows #5
Posted 24 February 2019 - 11:34 PM
And is that one of the CGA King's Quest games?
Yes, it is; I was looking for an EGA image to test with and King's Quest looked the best out of what I found. I have a config setting called clockSpeed that you can adjust to change the speed of the emulator (default is 20). I'm not sure exactly what this changes except for the terminal refresh rate, but it may help a bit.
Edited on 20 April 2019 - 03:39 AM
JackMacWindows #6
Posted 26 February 2019 - 04:32 AM
Just released v1.2 beta 1 on GitHub, including the new graphics mode and some tools for graphics manipulation. Go check it out!
(Also, updated the image viewer to support custom palettes, so the King's Quest image looks almost as good as the original: )


EDIT: CraftOS-PC v1.2 (+v1.2.1) is officially released! You can get it at the link in the OP.
Edited on 20 April 2019 - 03:41 AM