Hi guys, I finished a quick hack to ruby 1.8.5-p12 yesterday, and made the following script run on my PSP:
#some basic ruby
puts '------ some basic ruby -------'
puts
def say_goodnight(name)
"Good night, #{name}"
end
puts say_goodnight("PSP")
#array and hashes
puts
puts '------ array and hashes ------'
puts
a = %w{ ant bee cat dog elk}
a.each {|x| print x + ' '}
puts
inst_section = {
'cello' => 'string',
'clarinet' => 'woodwind',
'drum' => 'percussion',
'oboe' => 'woodwind',
'trumpet' => 'brass',
'violin' => 'string'
}
puts "inst_section['cello'] = #{inst_section['cello']}"
puts "inst_section['oboe'] = #{inst_section['oboe']}"
puts "inst_section['bassoon'] = #{inst_section['bassoon']}"
you could find the patch which I submitted here :
https://rubyforge.org/tracker/index.php ... &atid=1700
Ruby on PSP
keep it up
Great work, I'd like to see ruby on psp, keep it up.
I tried to compile your patch, but got followin errors:
psp-gcc -I../.. -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_
-c -o main.o main.c
psp-gcc -I../.. -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_ -
L../.. -L. -L/usr/local/pspdev/psp/sdk/lib main.o -lruby -lm -lpspdebug -lpspd
isplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lps
pnet_resolver -lpsputility -lpspuser -lpspkernel -o rubytest.elf
../../libruby.a(file.o): In function `chown_internal':
file.c:(.text+0x14b8): undefined reference to `chown'
../../libruby.a(file.o): In function `rb_file_truncate':
file.c:(.text+0x2190): undefined reference to `ftruncate'
Maybe they are missing in psp.c ?
I tried to compile your patch, but got followin errors:
psp-gcc -I../.. -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_
-c -o main.o main.c
psp-gcc -I../.. -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_ -
L../.. -L. -L/usr/local/pspdev/psp/sdk/lib main.o -lruby -lm -lpspdebug -lpspd
isplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lps
pnet_resolver -lpsputility -lpspuser -lpspkernel -o rubytest.elf
../../libruby.a(file.o): In function `chown_internal':
file.c:(.text+0x14b8): undefined reference to `chown'
../../libruby.a(file.o): In function `rb_file_truncate':
file.c:(.text+0x2190): undefined reference to `ftruncate'
Maybe they are missing in psp.c ?
sorry, I updated the wrong version yesterday. now you could find the correct one here
https://rubyforge.org/tracker/index.php ... &atid=1700
https://rubyforge.org/tracker/index.php ... &atid=1700