 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
carvalhotk
Joined: 22 Oct 2009 Posts: 4
|
Posted: Fri Oct 23, 2009 12:15 am Post subject: |
|
|
Cool, man. Looking at the repository I can see that you are realy working on that.
I'm trying to build Ruby here and embed it in a C++ game in order to "just script in ruby" and develop the game stuff in C++. I don't know if I'm in the right way trying this and also don't know how to do it. I think that your code will help me very much.
By now, I'm getting linking erros with libruby (undefined reference to _fork, _execv and __ctype_ptr__). I'll try to update my psptoolchain and see if the situation changes. |
|
| Back to top |
|
 |
Mon Ouïe
Joined: 05 Jul 2009 Posts: 36
|
Posted: Fri Oct 23, 2009 1:13 am Post subject: |
|
|
I've never had linkings errors for Ruby. Perhaps is -lc (after -lruby ) needed and missing ?
Youu can effectively use Ruby's script for your game this way. You'll just have to use another way in order to run your scripts.
Check that too if you haven't done it yet :) |
|
| Back to top |
|
 |
Cid89highwind
Joined: 24 Nov 2009 Posts: 3
|
Posted: Tue Nov 24, 2009 8:47 pm Post subject: |
|
|
That's strange, I tried Joyau but it has lots of problems with my psp.
If I type a simple "puts "Hello World!" " it works fine, but if I try something a bit more complex the psp freezes. :( That's a shame, 'cause I'm very interested in this project (i love Ruby, since it's simple and elegant).
Also crashes with | Code: | for i in 1..10
puts i
end | . You see, really BASIC things :S
The psp freezes also if I use your samples.
My PSP is phat, 5.50 GEN-D2.
Keep on working on it, this project is great |
|
| Back to top |
|
 |
Mon Ouïe
Joined: 05 Jul 2009 Posts: 36
|
Posted: Wed Nov 25, 2009 2:03 am Post subject: |
|
|
I tried your with the EBOOT ( I use rather the PRX, inside psplink ).
Your simple should put the text in stdout, which cannot be read from the PSP. I tried some samples, they all worked fine.
Are you sure you put all the files in the correct folder ? Did you put the site_ruby ? Because many samples require joyau/old.
( You have to put samples/anything/* in ms0:/PSP/GAME/Whatever/, but ruby/* is either in ms0:/ruby/ or in ms0:/PSP/GAME/Whatever/ruby/. But in that case, an error message should be shown. )
( I ran it on 5.00 M33, and on 5.50 Gen-B2, but your firmware shouldn't matter ) |
|
| Back to top |
|
 |
Cid89highwind
Joined: 24 Nov 2009 Posts: 3
|
Posted: Thu Nov 26, 2009 5:45 am Post subject: |
|
|
| Mon Ouïe wrote: | I tried your with the EBOOT ( I use rather the PRX, inside psplink ).
Your simple should put the text in stdout, which cannot be read from the PSP. I tried some samples, they all worked fine.
Are you sure you put all the files in the correct folder ? Did you put the site_ruby ? Because many samples require joyau/old.
( You have to put samples/anything/* in ms0:/PSP/GAME/Whatever/, but ruby/* is either in ms0:/ruby/ or in ms0:/PSP/GAME/Whatever/ruby/. But in that case, an error message should be shown. )
( I ran it on 5.00 M33, and on 5.50 Gen-B2, but your firmware shouldn't matter ) | thank you for your answer, I'll try as soon as I can and I'll share info with you all.
Thank you again ;)
Edit: I tried a sample, now it works, thank you.
That's what I did:
1) copied all files in the folder of a sample (i tried "menu"), and pasted them in the same folder of the eboot
2) copied the "Joyau" folder from the site:ruby, and pasted it in the same folder of the eboot.
It works fine.
So, i don't have to copy any file in the psp, but only the file i have to "require".
Have I misunderstood? |
|
| Back to top |
|
 |
Mon Ouïe
Joined: 05 Jul 2009 Posts: 36
|
Posted: Fri Nov 27, 2009 1:54 am Post subject: |
|
|
No, you're right :) But don't forget internal dependencies, like joyau/inherited required in other files (e.g. joyau/viewport ).
Notice that Joyau adds the following directory to the include path :
- ./ruby/1.8/
- ./ruby/site_ruby/
- ./ruby/site_ruby/1.8/
- ms0:/ruby/1.8/
- ms0:/ruby/site_ruby/
- ms0:/ruby/site_ruby/1.8/
But of course, "." can be used, like you did ;) |
|
| Back to top |
|
 |
Cid89highwind
Joined: 24 Nov 2009 Posts: 3
|
Posted: Fri Nov 27, 2009 2:29 am Post subject: |
|
|
| Mon Ouïe wrote: | No, you're right :) But don't forget internal dependencies, like joyau/inherited required in other files (e.g. joyau/viewport ).
Notice that Joyau adds the following directory to the include path :
- ./ruby/1.8/
- ./ruby/site_ruby/
- ./ruby/site_ruby/1.8/
- ms0:/ruby/1.8/
- ms0:/ruby/site_ruby/
- ms0:/ruby/site_ruby/1.8/
But of course, "." can be used, like you did ;) | Understood, thank you so much. =) So, I can simpy put the "ruby" folder in the root of the memory stick, and i'll have no dependencies problems.
I tried to work with Joyau (simple things, just experimenting): this is awesome, no joke! |
|
| Back to top |
|
 |
Mon Ouïe
Joined: 05 Jul 2009 Posts: 36
|
Posted: Fri Nov 27, 2009 4:43 am Post subject: |
|
|
Yeah, but remove the 1.9 folder from it though. It'll never be used ;)
| Quote: | | I tried to work with Joyau (simple things, just experimenting): this is awesome, no joke! |
Thanks :) |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|