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

Running CC on Linux?

Started by H4X0RZ, 24 February 2014 - 05:35 AM
H4X0RZ #1
Posted 24 February 2014 - 06:35 AM
Please don't understand the title wrong,
I got an old computer by my grandfather. I thought: "Let's install Linux!" :D/>
Now I'm asking if it's possible to "emulate" a CC computer on linux… Then I would have a real CC computer :)/>

Is that possible?
Thib0704 #2
Posted 24 February 2014 - 06:40 AM
Do you mean running a CC shell, native on a linux based kernel? cause that would be AWSOME!!
H4X0RZ #3
Posted 24 February 2014 - 07:32 AM
Do you mean running a CC shell, native on a linux based kernel? cause that would be AWSOME!!
Yep.
For now my first problem is that I can't find a CD to write a debian iso on D: then, the hardest part would be to port some cc libs to modify the screen.
But the good thing about it is: more colors and SMALLER pixels :D/>
Thib0704 #4
Posted 24 February 2014 - 07:55 AM
Now how would you make the screen….
Would you make it compatible with the 720/1080p :o/>
or just like a normal CC computer but scaled up?

EDIT: Btw if you have a USB stick, install debian on it, and then boot :P/>
Edited on 24 February 2014 - 06:59 AM
H4X0RZ #5
Posted 24 February 2014 - 08:03 AM
The computer's way to old to have USB xD
I can send you a pic of it if you want :D/>
Thib0704 #6
Posted 24 February 2014 - 08:13 AM
Sure lol :D/>
H4X0RZ #7
Posted 24 February 2014 - 08:31 AM
Yes, my room is messy D:

EDIT:
It's a Acrobat 486 DX2-66 Top-Tower
Edited on 24 February 2014 - 07:33 AM
Thib0704 #8
Posted 24 February 2014 - 12:25 PM
I'm guessing the best way to make a native CC OS, would be to make a fullscreen CC emulator.
Adding it to a small linux based OS (ex puppy)
Then building the OS with the emulator to run on startup.
And then VOILA.
6677 #9
Posted 24 February 2014 - 12:28 PM
CC is just JLua which can be installed on linux easily. Then you just need to write some wrapper API's instead. Hell, you get the term and os API's as is.

As for computercraft running bare metal. ELua. Again, just wrapper API's needed.
CherryPie #10
Posted 24 February 2014 - 12:33 PM
I have been thinking on this just for Raspberry PI which also runs Linux :D/>
Thib0704 #11
Posted 24 February 2014 - 12:38 PM
CC is just JLua which can be installed on linux easily. Then you just need to write some wrapper API's instead. Hell, you get the term and os API's as is.

As for computercraft running bare metal. ELua. Again, just wrapper API's needed.

Yeah but we want to run it in fullscreen…
gamax92 #12
Posted 24 February 2014 - 12:40 PM
Yeaaaaaaaah … no.

You're not gonna get any where decent speed if you go with a JVM, LWJGL, Original CC, and a wrapper to bring it all together. Considering the speed of that processor is 66MHz.

I personally have a 66MHz machine from my father, Mesa (which i think would be needed for lwjgl) is slow.

It's definetly possible though. I tried to do this (but lazyness got to me) and one of the ideas was to just setup a 80x25 terminal, center the virtual CC terminal in the center of it.
Reprogram the console VGA fonts to look more like CC.
Change the palette of the text console to have CC colors.

Btw, slight important to what your options are, which linux distro did you put on that machine?

Offtopic:
SpoilerIt's possible to get USB on that computer, You can use a USB Booter, PLoP's boot loader has one.
Edited on 24 February 2014 - 12:08 PM
6677 #13
Posted 24 February 2014 - 02:11 PM
CC is just JLua which can be installed on linux easily. Then you just need to write some wrapper API's instead. Hell, you get the term and os API's as is.

As for computercraft running bare metal. ELua. Again, just wrapper API's needed.

Yeah but we want to run it in fullscreen…
Don't see your point considering linux normally runs without a desktop environment, ie has a full screen shell….

Yeaaaaaaaah … no.

You're not gonna get any where decent speed if you go with a JVM, LWJGL, Original CC, and a wrapper to bring it all together. Considering the speed of that processor is 66MHz.

I personally have a 66MHz machine from my father, Mesa (which i think would be needed for lwjgl) is slow.

It's definetly possible though. I tried to do this (but lazyness got to me) and one of the ideas was to just setup a 80x25 terminal, center the virtual CC terminal in the center of it.
Reprogram the console VGA fonts to look more like CC.
Change the palette of the text console to have CC colors.

Btw, slight important to what your options are, which linux distro did you put on that machine?

Offtopic:
SpoilerIt's possible to get USB on that computer, You can use a USB Booter, PLoP's boot loader has one.
eLua on that machine would be absolutely fine though. I have used it on an 80MHz ARM board without issue.
But it possibly wouldnt be 100% compatible with computercraft.
H4X0RZ #14
Posted 25 February 2014 - 09:07 AM
Yeaaaaaaaah … no.

You're not gonna get any where decent speed if you go with a JVM, LWJGL, Original CC, and a wrapper to bring it all together. Considering the speed of that processor is 66MHz.

I personally have a 66MHz machine from my father, Mesa (which i think would be needed for lwjgl) is slow.

It's definetly possible though. I tried to do this (but lazyness got to me) and one of the ideas was to just setup a 80x25 terminal, center the virtual CC terminal in the center of it.
Reprogram the console VGA fonts to look more like CC.
Change the palette of the text console to have CC colors.

Btw, slight important to what your options are, which linux distro did you put on that machine?

Offtopic:
SpoilerIt's possible to get USB on that computer, You can use a USB Booter, PLoP's boot loader has one.
How should I get USB in a computer without a USB port?
gamax92 #15
Posted 25 February 2014 - 09:10 AM
PCI USB Card if it has PCI slots, got mine for $3.
Edited on 25 February 2014 - 08:14 AM
H4X0RZ #16
Posted 25 February 2014 - 10:44 AM
PCI USB Card if it has PCI slots, got mine for $3.
Ohhh, now I got what you mean :D/>

BTW, first I will test in a VM before I "kill" my real computer :D/>

EDIT:
BTW, is there a way to draw stuff with the standard lua5.1 program you can find in linux?

2nd EDIT:
Just found out that debian is a bastard… can't get lua running there… Now switching to puppy

3rd EDIT:
Tested Puppy, I don't like it either… Anyone knows a good lightweight linux distro?
Edited on 25 February 2014 - 10:39 AM
gamax92 #17
Posted 25 February 2014 - 11:55 AM
Standard lua? Ansi escape sequences. You can only get so far with the colors though, theres pink, magenta, and purple, and you only have magenta and bright-magenta to choose from. Blue will not have both colors used.

Ideally, you'd want to reprogram one of the colors to be different. could change bright-blue to be pink, then just use bright-blue in its place.

There's also the Graphical Buffer idea, you could use one of the Lua Graphical libraries and this would allow you to specify the exact colors you want and even have a good font. This would be slower than just using a text console, but not sure how much slower.
H4X0RZ #18
Posted 25 February 2014 - 12:12 PM
Standard lua? Ansi escape sequences. You can only get so far with the colors though, theres pink, magenta, and purple, and you only have magenta and bright-magenta to choose from. Blue will not have both colors used.

Ideally, you'd want to reprogram one of the colors to be different. could change bright-blue to be pink, then just use bright-blue in its place.

There's also the Graphical Buffer idea, you could use one of the Lua Graphical libraries and this would allow you to specify the exact colors you want and even have a good font. This would be slower than just using a text console, but not sure how much slower.

But how do I run lua on my machine? :D/> I "downloaded" lua5.1 and watched some "tutorials" where they said that I just have to download lua5.1 and do "lua <filepath>" to run the file as lua script. I'm feeling mad right now D:
6677 #19
Posted 25 February 2014 - 12:15 PM
just downloading lua wont do, you kinda need to install it….
gamax92 #20
Posted 25 February 2014 - 12:40 PM
Thats a lie, it doesn't need to be installed at all. What matters is that you have a binary and that it runs.

Again, Freack100, do you actually have linux on that machine? From the previous posts it seems like you don't. I'm sorry if I'm treating you like you're an idiot, but you do need an OS to run lua (Except ELua, but lets not get into that)
H4X0RZ #21
Posted 25 February 2014 - 02:12 PM
Thats a lie, it doesn't need to be installed at all. What matters is that you have a binary and that it runs.

Again, Freack100, do you actually have linux on that machine? From the previous posts it seems like you don't. I'm sorry if I'm treating you like you're an idiot, but you do need an OS to run lua (Except ELua, but lets not get into that)
No, I don't have it on the machine, I'm testing it on a virtual machine. I tested puppy Linux and debian there.
sziberov(KAYOver) #22
Posted 01 May 2014 - 04:31 PM
http://yadi.sk/d/MYBzG2SjMjdV6
Alice #23
Posted 18 May 2014 - 05:23 AM
^As an idea running off of that, why not just get Love2d for linux and run gamax92's CCLite? Would that work?
(speeding through old posts, this actually sounds kinda cool)
Monthkiller #24
Posted 22 August 2014 - 03:29 AM
You could use Wine from Ubuntu app store, but im on a laptop and it wont take much before it shoots itself with a pistol.
Edited on 22 August 2014 - 01:31 AM