CraftOS-PC Accelerated v2.2.1
Pre-releaseCraftOS-PC Accelerated has been updated with the latest features in CraftOS-PC v2.2. This version is the same as CraftOS-PC v2.2.1, but it uses the LuaJIT compiler instead of the standard Lua interpreter. Also, the following features have been added to the ROM:
- Added MOTD functionality
- Feature parity with CC: Tweaked 1.86.0
Note about "too long without yielding" errors and speed loss
A bug exists in LuaJIT that impacts the ability for CraftOS-PC Accelerated to detect when a script runs too long without yielding. From the LuaJIT FAQ:
Q: Sometimes Ctrl-C fails to stop my Lua program. Why?
The interrupt signal handler sets a Lua debug hook. But this is currently ignored by compiled code (this will eventually be fixed). If your program is running in a tight loop and never falls back to the interpreter, the debug hook never runs and can't throw the "interrupted!" error.
In the meantime you have to press Ctrl-C twice to get stop your program. That's similar to when it's stuck running inside a C function under the Lua interpreter.
CraftOS-PC Accelerated works around this bug by setting the hook count to 1, which ends up causing the hook that watches the run time to use up almost 75% of the CPU time used by CraftOS-PC. If your program needs that speed back, you can call os.setHaltOnLongRunMode(false)
to disable the hook and regain the speed previously lost. You can call the same function with true
to re-enable the hook and restore standard behavior.