Jump to content




CCEmuRedux - ComputerCraft Emulator Redux

java utility computer

  • You cannot reply to this topic
528 replies to this topic

#241 SquidDev

    Frickin' laser beams | Resident Necromancer

  • Members
  • 1,427 posts
  • LocationDoes anyone put something serious here?

Posted 16 January 2015 - 07:47 PM

View Posttomass1996, on 16 January 2015 - 11:59 AM, said:

-snip-

Thank you! I'd started writing an emulator this week for a bit of fun, and to solve some of these issues, however it looks like I won't have to now! I wrote a debug API patcher a long time ago for a mod that never reached release stage, you can have a read if it helps. Just a couple of questions:
  • Will the LuaJC compiler be optional? Obviously it is much faster, however it doesn't give a perfect representation of running it in ComputerCraft. Also, if you do end up porting it to use ASM as suggested in the thread, will you open source that file? (Or will you stick with BCEL)
  • I realise you are still using CC's ComputerThread instance. Is there a chance that you could make this local to each computer, so the Too long without yielding error duration could be increased? I understand this would require a lot of ASM hacking but I'm wondering if it is possible?
  • Is there a chance of a plugin API? This seems like a really odd question, but sometimes I want to write things in Java, the key element being a profiler as a Lua profiler would have to much overhead. I think writing a mod is overkill for this. All this would really need would be a way of registering a computerOn hook or something, so APIs could be loaded. This is clearly not a priority, I'm just wondering if there is a chance of it in the future?
Thank you so much for making CC development much less of a pain though. I can't remember the last time I launched Minecraft to write for ComputerCraft thanks to this.

#242 Xtansia

  • Members
  • 492 posts
  • LocationNew Zealand

Posted 16 January 2015 - 11:53 PM

View PostMike_Dillon, on 16 January 2015 - 05:14 PM, said:

Download Link is not working :(

Error code: DNS_PROBE_FINISHED_NXDOMAIN

Errr my DNS is probably being dumb :/
I'll fix the URL

#243 Xtansia

  • Members
  • 492 posts
  • LocationNew Zealand

Posted 17 January 2015 - 12:21 AM

View PostSquidDev, on 16 January 2015 - 07:47 PM, said:

View Posttomass1996, on 16 January 2015 - 11:59 AM, said:

-snip-

Thank you! I'd started writing an emulator this week for a bit of fun, and to solve some of these issues, however it looks like I won't have to now! I wrote a debug API patcher a long time ago for a mod that never reached release stage, you can have a read if it helps. Just a couple of questions:
  • Will the LuaJC compiler be optional? Obviously it is much faster, however it doesn't give a perfect representation of running it in ComputerCraft. Also, if you do end up porting it to use ASM as suggested in the thread, will you open source that file? (Or will you stick with BCEL)
  • I realise you are still using CC's ComputerThread instance. Is there a chance that you could make this local to each computer, so the Too long without yielding error duration could be increased? I understand this would require a lot of ASM hacking but I'm wondering if it is possible?
  • Is there a chance of a plugin API? This seems like a really odd question, but sometimes I want to write things in Java, the key element being a profiler as a Lua profiler would have to much overhead. I think writing a mod is overkill for this. All this would really need would be a way of registering a computerOn hook or something, so APIs could be loaded. This is clearly not a priority, I'm just wondering if there is a chance of it in the future?
Thank you so much for making CC development much less of a pain though. I can't remember the last time I launched Minecraft to write for ComputerCraft thanks to this.

Yeah both debug and LuaJC would be optional, and I don't see why not to release the ASM version if I manage to convert it
I can definitely look into making the timeout longer.
A plugin API is not an immediate concern right now, but it is definitely a possibility.

#244 tenshae

  • Members
  • 66 posts

Posted 21 January 2015 - 04:21 AM

It seems to just open and then close on Yosemite.

It has the exact same error message as the one given by this guy: https://bitbucket.or...-not-executable

Edited by ashnwill, 21 January 2015 - 04:23 AM.


#245 Xtansia

  • Members
  • 492 posts
  • LocationNew Zealand

Posted 24 January 2015 - 05:40 AM

Who ever posted the issue about crashing on Win7,
Can you please post the output when run from the command line, or the log file?

#246 hbomb79

  • Members
  • 352 posts
  • LocationOrewa, New Zealand

Posted 30 January 2015 - 01:13 AM

Does this not work on Mac OS X? It opens two windows, then closes both shortly afterwards

This is the exception in the log;

2015-01-30 14:14:42 [INFO] [CCEmuRedux Launcher] Emulator> Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /var/folders/2q/_blzn1056qb7_bt18gr9w69r0000gn/T/libgdxharryfelton/45614fc1/liblwjgl.dylib

I would love to use this, although if it doesn't work, does anyone have another emulator they know of? I can't find any 1.6 emulators

Edited by Hbomb_79, 31 January 2015 - 05:18 AM.


#247 ElvishJerricco

  • Members
  • 803 posts

Posted 13 February 2015 - 04:39 AM

View PostHbomb_79, on 30 January 2015 - 01:13 AM, said:

Does this not work on Mac OS X? It opens two windows, then closes both shortly afterwards

This is the exception in the log;

2015-01-30 14:14:42 [INFO] [CCEmuRedux Launcher] Emulator> Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /var/folders/2q/_blzn1056qb7_bt18gr9w69r0000gn/T/libgdxharryfelton/45614fc1/liblwjgl.dylib

I would love to use this, although if it doesn't work, does anyone have another emulator they know of? I can't find any 1.6 emulators

For some reason, the lwjgl lib that it's looking for is named liblwjgl.jnilib instead of liblwjgl.dylib. Just make a symbolic link for it.

cd /var/folders/2q/_blzn1056qb7_bt18gr9w69r0000gn/T/libgdxharryfelton/45614fc1/
ln -s liblwjgl.jnilib liblwjgl.dylib


#248 biggest yikes

  • Members
  • 573 posts

Posted 16 February 2015 - 12:47 AM

Please add an option for command computers, they were added in CC 1.7.
EDIT: Now that I think about it, how would you even do that?

Edited by minimite, 17 February 2015 - 01:26 PM.


#249 s0r00t

  • Members
  • 61 posts

Posted 16 February 2015 - 03:55 PM

Download link is not working for me, I'm getting a "PermanentRedirect" XML :
<Error><Code>PermanentRedirect</Code><Message>The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.</Message><Bucket>dl.xtansia.com</Bucket><Endpoint>dl.xtansia.com.s3.amazonaws.com</Endpoint><RequestId>88C8A5261A500E74</RequestId><HostId>XEvDxt+TM2L8bBxV8t/OIOgefR9DzWfAaE4381t2E1MUKuKaeyT872rKz16Lher1</HostId></Error>


#250 LDDestroier

  • Members
  • 1,095 posts
  • LocationACDC Town

Posted 21 February 2015 - 08:16 PM

Could you get this to run in the linux terminal rather than create a new GUI window? I want to be able to have my own CC computer, running arch linux and the CC emulator running on boot.

#251 utybo

  • Members
  • 7 posts
  • LocationOrlĂ©ans, France

Posted 22 February 2015 - 04:28 PM

This is an absolutely wonderful emulator! GJ!

#252 AndreWalia

  • Members
  • 294 posts
  • LocationSt.Louis, MO

Posted 24 February 2015 - 12:03 AM

I love it! IMO, you should be able to resize the computers. I dont mean change how many CC pixels they are, I mean the actual size on my screen.
Sort of like zooming in.

#253 comp500

  • Members
  • 66 posts

Posted 28 February 2015 - 07:46 AM

View PostLDDestroier, on 21 February 2015 - 08:16 PM, said:

Could you get this to run in the linux terminal rather than create a new GUI window? I want to be able to have my own CC computer, running arch linux and the CC emulator running on boot.
that gives me an idea...
a CC version of:
Posted Image
https://learn.adafru...mac-pi/overview

Edited by comp500, 28 February 2015 - 07:47 AM.


#254 Wojbie

  • Members
  • 631 posts
  • LocationKinda lost

Posted 28 February 2015 - 08:33 AM

View Postcomp500, on 28 February 2015 - 07:46 AM, said:

View PostLDDestroier, on 21 February 2015 - 08:16 PM, said:

Could you get this to run in the linux terminal rather than create a new GUI window? I want to be able to have my own CC computer, running arch linux and the CC emulator running on boot.
that gives me an idea...
a CC version of:
Posted Image
https://learn.adafru...mac-pi/overview
You could use stuff from:
http://www.shapeways...s/computercraft
and support development of ComputerCraft too while at it.

#255 comp500

  • Members
  • 66 posts

Posted 28 February 2015 - 08:41 AM

View Postwojbie, on 28 February 2015 - 08:33 AM, said:

-snip-
You could use stuff from:
http://www.shapeways...s/computercraft
and support development of ComputerCraft too while at it.
I would do that, but the pi is too big for dan200's 3d printed blocks

#256 Wojbie

  • Members
  • 631 posts
  • LocationKinda lost

Posted 28 February 2015 - 08:53 AM

Thats what i get for fast Google search and confusing metric and imperial measurements. Wonder if you could get super-sized block from shapeways. Probably not.

#257 comp500

  • Members
  • 66 posts

Posted 28 February 2015 - 10:15 AM

View Postwojbie, on 28 February 2015 - 08:53 AM, said:

Thats what i get for fast Google search and confusing metric and imperial measurements. Wonder if you could get super-sized block from shapeways. Probably not.
you'd also have to cut holes.anyway someone could probably make their own design for the pi. They could even give it to dan200, so he can sell it.

Edited by comp500, 28 February 2015 - 10:15 AM.


#258 Nio9345

  • Members
  • 14 posts

Posted 28 February 2015 - 04:31 PM

I would like to say that this program is very nice for someone who wants to use it in order to test his\her's programs. But i have a question, is there chance in the future to add virtual entities beside the computers ? Like, the option to create a virtual reactor from big reactors in order to control it. Just asking....

#259 Slash0mega

  • Members
  • 74 posts

Posted 03 March 2015 - 10:33 PM

bug here, whenever i run this program i was working on

--this is the path to the source file
local sourceFilePath = "/abc"
--this is the file handle for the source file
local sourceFile = "blank"
--this is the destonation file, it will be a normal text document
local endFilePath = "/xyz"
--this is the file handle for the source file
local endFile = "blank"
--this is the current byte, copied here because using read() will progress to teh next byte
local currentByte = true
--this is the ammount of commands done before sleep() is called, because otherwise the program will time out
local yeildLimit = 100000
--this is the ammont of commands performed so far, used with yeildLimit
local yeildCurrent = 0
--this is weather turning data to txt or txt to data, true is data to txt, false is txt to data
local conversionDirection = true

--this block opens the files in the right modes
if conversionDirection == true
then
  sourceFile = fs.open(sourceFilePath,"rb")
  endFile = fs.open(endFilePath,"w")
else
  sourceFile = fs.open(sourceFilePath,"r")
  endFile = fs.open(endFilePath,"wb")
end

while currentByte do
--copys the byte/text to current byte
if conversionDirection == true
  then
   currentByte = sourceFile.read()
  else
   currentByte = sourceFile.readLine()
end
--copys current byte to file
if conversionDirection == true
  then
   endFile.writeLine(currentByte)
  else
   endFile.write(tonumber(currentByte))
end
print(currentByte)
if yeildCurrent <= yeildLimit then
  yeildCurrent = yeildCurrent + 1
else
  yeildCurrent = 0
  sleep(0.01)
end
end
--this closes the files
sourceFile.close()
endFile.close()
--sourceFile = fs.open(sourceFilePath,"rb")
--print(sourceFile.read())
--print(sourceFile.read())
--print(sourceFile.read())
--print(sourceFile.read())

i get a "java exeption thrown" when it reaches the end of the file, i think it has somthing to do with it niling the "currentByte" variable but i am not sure

this program works in normal computercraft btw.

#260 LDDestroier

  • Members
  • 1,095 posts
  • LocationACDC Town

Posted 05 March 2015 - 01:46 PM

How exactly do I get an actual computercraft file to work as the 'computercraft.jar' file? It keeps redownloading the older version for me...





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users