[Project]Joyau: Programming in Ruby for PSP

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

carvalhotk
Posts: 4
Joined: Thu Oct 22, 2009 11:29 pm

Post by carvalhotk »

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.
Mon Ouïe
Posts: 36
Joined: Sun Jul 05, 2009 10:22 pm

Post by Mon Ouïe »

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 :)
Cid89highwind
Posts: 3
Joined: Tue Nov 24, 2009 8:34 pm

Post by Cid89highwind »

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: Select all

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
Mon Ouïe
Posts: 36
Joined: Sun Jul 05, 2009 10:22 pm

Post by Mon Ouïe »

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 )
Cid89highwind
Posts: 3
Joined: Tue Nov 24, 2009 8:34 pm

Post by Cid89highwind »

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?
Mon Ouïe
Posts: 36
Joined: Sun Jul 05, 2009 10:22 pm

Post by Mon Ouïe »

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 ;)
Cid89highwind
Posts: 3
Joined: Tue Nov 24, 2009 8:34 pm

Post by Cid89highwind »

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!
Mon Ouïe
Posts: 36
Joined: Sun Jul 05, 2009 10:22 pm

Post by Mon Ouïe »

Yeah, but remove the 1.9 folder from it though. It'll never be used ;)
I tried to work with Joyau (simple things, just experimenting): this is awesome, no joke!
Thanks :)
Post Reply