• Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
Welcome to OpenComputers

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more!

This message will be removed once you have signed in.

Magik6k

ComputerCraft emulator

8 posts in this topic

So you can now run ComputerCraft programs on OC.

  • Install MPT (OPPM way)
    • Insert oppm floppy
    • install
    • oppm install mpt
  • Install MPT (wget way)
    • wget http://mpt.magik6k.net/api/file/mpt/usr/bin/mpt.lua /tmp/mpt.lua
    • /tmp/mpt -S mpt
    • rm /tmp/mpt.lua
  • mpt -S cc-installer
  • craftos install
  • craftos
  • You know what to do next

 

B.. B.. But how?

 

It's a full compatibility layer emulating CC apis and even some Lua 5.1 functionality(like setfenv).

It may contain bugs, some functions may not be accurate, some components may not be mapped to peripherals and so on, but it runs many programs just fine.

 

Most APIs are implemented, only lacking part is peripheral drivers(for now only modem, OpenGlasses <-> openperipheral glasses and computronics components are supported)

 

fbe325a7-a74b-4956-81cb-087e02e5070a.png

ef6dc80b-b517-454f-9788-07f7ca15f0c9.png

 

I'd like you to report any bugs here, also if you have some cool program you want to run or want peripheral driver you can request it here too. Have fun!

 

With help of asiekierka and others.

Because we can.

Share this post


Link to post
Share on other sites

any specific reason why you couldn't emulate peripheral api correctly? most of it is pretty similar except for the names, peripheral.wrap(side) would not work, but peripheral.find would.

Share this post


Link to post
Share on other sites

We do emulate it just fine, but we require 'drivers' for specific peripherals as many methods have different names, even form the same mods. If you want some peripheral you can ask for it here or write one yourself, examples:

 

http://mpt.magik6k.net/file/cc-drivers/etc/cc.d/30_modem.lua

http://mpt.magik6k.net/file/cc-drivers/etc/cc.d/31_computronics.lua

http://mpt.magik6k.net/file/cc-drivers/etc/cc.d/31_openglasses.lua

Share this post


Link to post
Share on other sites

I'm having trouble installing this. Whenever I try running "craftos install", there's a script error with /usr/lib/cc/unzip.lua which causes the rom to not be installed.

 

Error in question
/usr/lib/cc/unzip.lua:62: attempt to index a nil value (global 'bit32'):
stack traceback:
/usr/lib/cc/unzip.lua:62: in main chunk
[C]: in function 'xpcall'
/lib/process.lua:78: in function
stack traceback:
[C]: in function 'error'
/lib/process.lua:92: in function

 

The system I'm running is a tier 2 running openos 1.6, if that helps.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now