RSX PS3 << need help >>
small update
Hi.
I integrated glaurung kernel module into libps3rsx ( so theoretically you do not need to apply kernel patch ).
You only need to make fresh checkout of libp3rsx, run ./src/init/startup.sh and run examples.
Troll is animated now.
I integrated glaurung kernel module into libps3rsx ( so theoretically you do not need to apply kernel patch ).
You only need to make fresh checkout of libp3rsx, run ./src/init/startup.sh and run examples.
Troll is animated now.
@IronPeter, Great! Thanks a lot! I will give it a try. I will keep the standard kernel with the 2D acceleration .ko module, and see if I can see that troll! Thanks!
@chrisPrice, I think the kernel source I've found is the right one (I see drivers/ps3 and drivers/video/ps3fb.c (33900 bytes) inside it. However, I think it's better to try lastest version of IronPeter's library and see if we can avoid recompiling kernel.
I've updated the tutorial for noobs in fc7_rsx.zip, in order to add these interesting comments!
@chrisPrice, I think the kernel source I've found is the right one (I see drivers/ps3 and drivers/video/ps3fb.c (33900 bytes) inside it. However, I think it's better to try lastest version of IronPeter's library and see if we can avoid recompiling kernel.
I've updated the tutorial for noobs in fc7_rsx.zip, in order to add these interesting comments!
In practice, in text mode (don't do the insmod command, startup.sh will do it) :
cd libps3rsx
cd src
cd init
./startup.sh
cd ..
cd ..
cd examples
cd simple_triangle
make
(I don't have g++, since I only did 'yum install gcc'. So I have to use gcc instead)
gcc -lm -o ps3gpu ../../src/fifo/utils.o ps3gpu.o
./ps3gpu (to test simple_triangle demo. btw display seems wrong in 1080i)
cd ..
cd simple_dxt
make
(I don't have g++, since I only did 'yum install gcc'. So I have to use gcc instead)
gcc -lm -o ...etc (note that -lm is missing in the g++ command)
./ps3gpu (Beautiful Troll rotating on screen! Perfect rendering even in 1080i!!!)
startx (no need to do insmod, server starts well with the module loaded by startup)
(btw, I tried double clicking simple_dxt under X11 server, but nothing happened)
So it's verified, no need to recompile kernel to test RSX accelerated 3D! Well done!
cd libps3rsx
cd src
cd init
./startup.sh
cd ..
cd ..
cd examples
cd simple_triangle
make
(I don't have g++, since I only did 'yum install gcc'. So I have to use gcc instead)
gcc -lm -o ps3gpu ../../src/fifo/utils.o ps3gpu.o
./ps3gpu (to test simple_triangle demo. btw display seems wrong in 1080i)
cd ..
cd simple_dxt
make
(I don't have g++, since I only did 'yum install gcc'. So I have to use gcc instead)
gcc -lm -o ...etc (note that -lm is missing in the g++ command)
./ps3gpu (Beautiful Troll rotating on screen! Perfect rendering even in 1080i!!!)
startx (no need to do insmod, server starts well with the module loaded by startup)
(btw, I tried double clicking simple_dxt under X11 server, but nothing happened)
So it's verified, no need to recompile kernel to test RSX accelerated 3D! Well done!
Last edited by ps2devman on Mon Jan 28, 2008 4:41 am, edited 1 time in total.
-
- Posts: 19
- Joined: Fri Jan 25, 2008 9:03 pm
I mentioned my display output mode using a HDFury
hdmi -> vga converter. I fully recommend it as it
gives you SXGA 1280 x 1024 resolution
choose mode 12 in kboot entry and -v 140 in ps3videomode
command.
This avoids the long 1920x1080 screen that I had to do my
monitor's horiz centering adjustments to see prompts and panels etc.
hdmi -> vga converter. I fully recommend it as it
gives you SXGA 1280 x 1024 resolution
choose mode 12 in kboot entry and -v 140 in ps3videomode
command.
This avoids the long 1920x1080 screen that I had to do my
monitor's horiz centering adjustments to see prompts and panels etc.
-
- Posts: 19
- Joined: Fri Jan 25, 2008 9:03 pm
Just a troll for linux kernel compile experience.
I swear I did get a bootable 2.6.23-20071219 kernel
made. But subsequent to that either a compile error in a mem.c
file (then on reload of the tar and re menuconfig it compiled??)
but now I have a readonly filesystem failure when the kernel
attempts to mkdir's and shambolic links.
I swear I did get a bootable 2.6.23-20071219 kernel
made. But subsequent to that either a compile error in a mem.c
file (then on reload of the tar and re menuconfig it compiled??)
but now I have a readonly filesystem failure when the kernel
attempts to mkdir's and shambolic links.
-
- Posts: 19
- Joined: Fri Jan 25, 2008 9:03 pm
Finally a rotating pot-bellied troll.
There is a scraggly line that scrolls down through the screen.
I have a fedora core 6 PS3 with hdmi outputting 1080p into a HDfury
vga convertor to a vga screen that fits on my computer desk.
Some installation notes
You need to compile the kernel as linux-2.6.16 (as on fc6) did not work.
Check what you have with uname -a
I got the linux-2.6.23-20071023.tar.bz2 from download.systemimager.org
after decompressing into /usr/src/kernel/linux-2.6.23-20071023
in that directory do the following makes:
make ps3_defconfig
make
make modules
make modules_install
make install
cp ./vmlinx /boot/vmlinux-2.6.23-20071023
Put in the /etc/kboot.conf lines that refer to the kernel and ramdisk.
my sxga (1280x1024 resolution) is:
fc1080p_rsx='/boot/vmlinux2.6.23-20071023 initrd=/boot/initrd-2.6.23-20071023.img root=/dev/ps3da1 video=ps3fb:mode:12'
Get the ps3ware from the svn repository of IronPeter.
Every time you reboot you have to run that startup.sh script.
Amongst other things it made the /dev/fb1 device file.
Notes:
Don't do 'make menuconfig' and attempt to change items. I did make a bootable kernel
but continuing fiddling could not boot, numerous crash conditions occurred.
The ps3_defconfig works. You can load the .config (a hidden file viewed with
ls -a or show hidden files in Nautilus directory viewer or equivalent) in
make menuconfig (open alternative config or does it read an existing .config??).
The 'make modules_install' places modules in /lib/modules/2.6.23 and sets up the
build and source links therein. If you get another kernel 2.6.23.xxxx
subversion this module directory may get confused. What happens when you choose
a previous kernel (same kernel 2.6.xx version, other extra sub version) at
kboot runtime it will load modules compiled in the other version?? Watch out.
Perhaps this was one of my crash causes.
Danger- you should put in specific kernel version and extra (date) for the
vmlinux and initrd.img. The 'make install' command copies vmlinux and
initrd-2.6.23.img into the /boot directory. Rename and refer to them in kboot.conf. Definitely don't
refer to just vmlinux in whatever booting setup you have.
The initrdxxxxxxx.img ramdisk is needed. If abscent in kboot I got a lot of
error messages, but it continued to boot.
Geoff has kboot executable images, but I did not try them.
The sxga (1280x1024 resolution) did not work in linux-2.6.16.
There is a scraggly line that scrolls down through the screen.
I have a fedora core 6 PS3 with hdmi outputting 1080p into a HDfury
vga convertor to a vga screen that fits on my computer desk.
Some installation notes
You need to compile the kernel as linux-2.6.16 (as on fc6) did not work.
Check what you have with uname -a
I got the linux-2.6.23-20071023.tar.bz2 from download.systemimager.org
after decompressing into /usr/src/kernel/linux-2.6.23-20071023
in that directory do the following makes:
make ps3_defconfig
make
make modules
make modules_install
make install
cp ./vmlinx /boot/vmlinux-2.6.23-20071023
Put in the /etc/kboot.conf lines that refer to the kernel and ramdisk.
my sxga (1280x1024 resolution) is:
fc1080p_rsx='/boot/vmlinux2.6.23-20071023 initrd=/boot/initrd-2.6.23-20071023.img root=/dev/ps3da1 video=ps3fb:mode:12'
Get the ps3ware from the svn repository of IronPeter.
Every time you reboot you have to run that startup.sh script.
Amongst other things it made the /dev/fb1 device file.
Notes:
Don't do 'make menuconfig' and attempt to change items. I did make a bootable kernel
but continuing fiddling could not boot, numerous crash conditions occurred.
The ps3_defconfig works. You can load the .config (a hidden file viewed with
ls -a or show hidden files in Nautilus directory viewer or equivalent) in
make menuconfig (open alternative config or does it read an existing .config??).
The 'make modules_install' places modules in /lib/modules/2.6.23 and sets up the
build and source links therein. If you get another kernel 2.6.23.xxxx
subversion this module directory may get confused. What happens when you choose
a previous kernel (same kernel 2.6.xx version, other extra sub version) at
kboot runtime it will load modules compiled in the other version?? Watch out.
Perhaps this was one of my crash causes.
Danger- you should put in specific kernel version and extra (date) for the
vmlinux and initrd.img. The 'make install' command copies vmlinux and
initrd-2.6.23.img into the /boot directory. Rename and refer to them in kboot.conf. Definitely don't
refer to just vmlinux in whatever booting setup you have.
The initrdxxxxxxx.img ramdisk is needed. If abscent in kboot I got a lot of
error messages, but it continued to boot.
Geoff has kboot executable images, but I did not try them.
The sxga (1280x1024 resolution) did not work in linux-2.6.16.
Last edited by chrisPrice on Sat Feb 02, 2008 6:23 am, edited 1 time in total.
-
- Posts: 19
- Joined: Fri Jan 25, 2008 9:03 pm
Thanks to all who have built this, IronPeter.
I now have cells and an RSX to play with.
I've waited since PS3 release to be in this position.
The current games on PS3 are too shoot em up.
Lets show em some cooperative development
artwork etc.
Now that I have a PS3 graphics pipeline I will
be writing the output to the file formats.
I have developed a perl SDK that interacts
with the animation product 'Animation Master'.
It has been quite a few years work. The aim is
programmatic creation of textured geometry
(3D artists are too expensive).
I will write a patch to polygon output script
to files that fit the geometry descriptors.
I now have cells and an RSX to play with.
I've waited since PS3 release to be in this position.
The current games on PS3 are too shoot em up.
Lets show em some cooperative development
artwork etc.
Now that I have a PS3 graphics pipeline I will
be writing the output to the file formats.
I have developed a perl SDK that interacts
with the animation product 'Animation Master'.
It has been quite a few years work. The aim is
programmatic creation of textured geometry
(3D artists are too expensive).
I will write a patch to polygon output script
to files that fit the geometry descriptors.
-
- Posts: 19
- Joined: Fri Jan 25, 2008 9:03 pm
-
- Posts: 19
- Joined: Fri Jan 25, 2008 9:03 pm
Hello IronPeter,
i'm trying to read/write to the vb vertex file in preparation
for throw 10,000 vertices at the rsx.
But I am stuck reading the 5 floats per vertex
3 floats for position 2 for texcoord as per model decsriptor.
I,m getting large values
using perl unpack
for (1..10) {
read($vbFh, $buffer, 20);
@values = unpack("s5", $buffer); # s is shorts
printf "20 bytes read : @values\n";
}
20 bytes read : 16575 24333 -22338 14966 -32193
20 bytes read : 24767 3158 27837 -26543 -30145
20 bytes read : 20927 5401 -24642 8313 17983
20 bytes read : 26047 -13349 701 3912 20799
20 bytes read : 17599 -6070 -32706 20260 -30657
20 bytes read : 19647 -20920 30782 -3187 21055
20 bytes read : -30018 -18430 -8386 -27596 -31937
20 bytes read : -19522 11673 -962 6045 19519
20 bytes read : 703 12472 -11970 7931 31551
20 bytes read : 3519 -26928 -8642 26082 20543
using "f5" 5 floats get
20 bytes read : 1.01783451645782e+19 0.00094092998187989 117707256 0.0142434230074286 -6.52002965052984e-24
20 bytes read : 1.65150737925416e-31 -2.70675156812314e-24 -1.23100302343435e+23 -0.0315802060067654 -9.82687912308582e-26
20 bytes read : 3.09625902332105e-26 2.11439746428348e-19 4.43412787209138e+28 6.18031747633355e+19 -6.52002965052984e-24
20 bytes read : -28756862 9.8612886890482e-30 -1.01282571062471e-20 1.64057984363482e+32 -9.82687912308582e-26
20 bytes read : -3.82074468454857e+24 2759867904 -6.48538160324097 -44132604 3.16576586012254e-32
20 bytes read : -4.55428993129114e-11 -2.24167681381813e+31 3.81297128424198e+25 8.79596185486885e+21 8.06963934774533e+28
20 bytes read : -3.11236290144734e-05 -9.13170438667475e-27 -2.91109679623851e-28 0.0142434230074286 1.69804323060567e+38
20 bytes read : 1.74739077374308e-11 1.02095620809629e-24 2.73519447251561e-41 6.18031747633355e+19 1.69804323060567e+38
20 bytes read : 1.33885424968838e-09 2.66621992605178e-20 6.67423706046553e+30 0.012413083575666 -1.67665529357801e-18
20 bytes read : -3.36128873897339e-25 1.33919308735467e+23 7.20148761956807e-07 3.11105453989957e+32 -6.06670842308829e+21
even worse????
which is wrong as uv's are fractions???
i'm trying to read/write to the vb vertex file in preparation
for throw 10,000 vertices at the rsx.
But I am stuck reading the 5 floats per vertex
3 floats for position 2 for texcoord as per model decsriptor.
I,m getting large values
using perl unpack
for (1..10) {
read($vbFh, $buffer, 20);
@values = unpack("s5", $buffer); # s is shorts
printf "20 bytes read : @values\n";
}
20 bytes read : 16575 24333 -22338 14966 -32193
20 bytes read : 24767 3158 27837 -26543 -30145
20 bytes read : 20927 5401 -24642 8313 17983
20 bytes read : 26047 -13349 701 3912 20799
20 bytes read : 17599 -6070 -32706 20260 -30657
20 bytes read : 19647 -20920 30782 -3187 21055
20 bytes read : -30018 -18430 -8386 -27596 -31937
20 bytes read : -19522 11673 -962 6045 19519
20 bytes read : 703 12472 -11970 7931 31551
20 bytes read : 3519 -26928 -8642 26082 20543
using "f5" 5 floats get
20 bytes read : 1.01783451645782e+19 0.00094092998187989 117707256 0.0142434230074286 -6.52002965052984e-24
20 bytes read : 1.65150737925416e-31 -2.70675156812314e-24 -1.23100302343435e+23 -0.0315802060067654 -9.82687912308582e-26
20 bytes read : 3.09625902332105e-26 2.11439746428348e-19 4.43412787209138e+28 6.18031747633355e+19 -6.52002965052984e-24
20 bytes read : -28756862 9.8612886890482e-30 -1.01282571062471e-20 1.64057984363482e+32 -9.82687912308582e-26
20 bytes read : -3.82074468454857e+24 2759867904 -6.48538160324097 -44132604 3.16576586012254e-32
20 bytes read : -4.55428993129114e-11 -2.24167681381813e+31 3.81297128424198e+25 8.79596185486885e+21 8.06963934774533e+28
20 bytes read : -3.11236290144734e-05 -9.13170438667475e-27 -2.91109679623851e-28 0.0142434230074286 1.69804323060567e+38
20 bytes read : 1.74739077374308e-11 1.02095620809629e-24 2.73519447251561e-41 6.18031747633355e+19 1.69804323060567e+38
20 bytes read : 1.33885424968838e-09 2.66621992605178e-20 6.67423706046553e+30 0.012413083575666 -1.67665529357801e-18
20 bytes read : -3.36128873897339e-25 1.33919308735467e+23 7.20148761956807e-07 3.11105453989957e+32 -6.06670842308829e+21
even worse????
which is wrong as uv's are fractions???
-
- Posts: 19
- Joined: Fri Jan 25, 2008 9:03 pm
I think I've cracked it.
read($vbFh, $buffer, 20);
@values = reverse unpack("f5", reverse $buffer);
produces values like
20 bytes read : -0.750204026699066 -0.329026997089386 1.02246999740601 0.864886999130249 0.734323024749756
20 bytes read : -0.876312971115112 -0.0576950013637543 1.08449995517731 0.851589024066925 0.804498016834259
20 bytes read : -0.816788971424103 -0.311470985412598 0.773672997951508 0.923192977905273 0.734323024749756
20 bytes read : -0.897885024547577 -0.0318070016801357 0.817376971244812 0.917990982532501 0.804498016834259
20 bytes read : -0.766767978668213 0.250277012586594 1.06884002685547 0.852185010910034 0.875549972057343
20 bytes read : -0.797984004020691 0.242728993296623 0.824163973331451 0.917699992656708 0.873084008693695
20 bytes read : -0.269551992416382 0.435948014259338 1.02907001972198 0.864886999130249 0.996086001396179
20 bytes read : -0.350778013467789 0.493386000394821 0.796875 0.923192977905273 0.996086001396179
20 bytes read : -0.510622978210449 0.410118997097015 0.983039021492004 0.876147985458374 0.933466017246246
read($vbFh, $buffer, 20);
@values = reverse unpack("f5", reverse $buffer);
produces values like
20 bytes read : -0.750204026699066 -0.329026997089386 1.02246999740601 0.864886999130249 0.734323024749756
20 bytes read : -0.876312971115112 -0.0576950013637543 1.08449995517731 0.851589024066925 0.804498016834259
20 bytes read : -0.816788971424103 -0.311470985412598 0.773672997951508 0.923192977905273 0.734323024749756
20 bytes read : -0.897885024547577 -0.0318070016801357 0.817376971244812 0.917990982532501 0.804498016834259
20 bytes read : -0.766767978668213 0.250277012586594 1.06884002685547 0.852185010910034 0.875549972057343
20 bytes read : -0.797984004020691 0.242728993296623 0.824163973331451 0.917699992656708 0.873084008693695
20 bytes read : -0.269551992416382 0.435948014259338 1.02907001972198 0.864886999130249 0.996086001396179
20 bytes read : -0.350778013467789 0.493386000394821 0.796875 0.923192977905273 0.996086001396179
20 bytes read : -0.510622978210449 0.410118997097015 0.983039021492004 0.876147985458374 0.933466017246246
You can refer this code ( tools/toolgeometry/colladatool.cpp ) about model packing.
http://www.everfall.com/paste/id.php?wlf5ol18m6fq
You can also setup vertex streams by hands with:
with typedef enum
{
EMPTY=0x0,
FLOAT=0x2,
UBYTE=0x4,
SHORT=0x5
}
geom_format_t;
typedef enum
{
POS0 = 0x0,
WGHT = 0x1,
NRML = 0x2,
COL0 = 0x3,
COL1 = 0x4,
FOGC = 0x5,
TEX0 = 0x8,
TEX1 = 0x9,
TEX2 = 0xA,
TEX3 = 0xB,
TEX4 = 0xC,
TEX5 = 0xD,
TEX6 = 0xE,
TEX7 = 0xF,
}
geom_type_t;
and set_geometry_source function.
If you want I could add normal and color components into model descriptor.
I also can support more formats ( for example float16 ) for vertex data.
http://www.everfall.com/paste/id.php?wlf5ol18m6fq
You can also setup vertex streams by hands with:
with typedef enum
{
EMPTY=0x0,
FLOAT=0x2,
UBYTE=0x4,
SHORT=0x5
}
geom_format_t;
typedef enum
{
POS0 = 0x0,
WGHT = 0x1,
NRML = 0x2,
COL0 = 0x3,
COL1 = 0x4,
FOGC = 0x5,
TEX0 = 0x8,
TEX1 = 0x9,
TEX2 = 0xA,
TEX3 = 0xB,
TEX4 = 0xC,
TEX5 = 0xD,
TEX6 = 0xE,
TEX7 = 0xF,
}
geom_type_t;
and set_geometry_source function.
If you want I could add normal and color components into model descriptor.
I also can support more formats ( for example float16 ) for vertex data.
libps3rsx update
I commited
1.) Blending support
2.) float16 support
3.) new FX demo.
This demo renders animated particles on SPU. All particle params ( position, size, color, orientation ) were exported from Maya DCC tool and saved as animation tracks.
Code is not very clean and needs to be refactored.
1.) Blending support
2.) float16 support
3.) new FX demo.
This demo renders animated particles on SPU. All particle params ( position, size, color, orientation ) were exported from Maya DCC tool and saved as animation tracks.
Code is not very clean and needs to be refactored.
-
- Posts: 19
- Joined: Fri Jan 25, 2008 9:03 pm