I also thought that DC would win psp but i cant believe that psp couldnt rotate the scene at an acceptable speed, so I was thinking...
the psp loses when it must scale or rotate the scene (multiplying matrix) and I started to think even more xD. How did u implement the rotations and scalations on the psp version of libgyro?
I think that the best way to implement it is to get the matrix from scegu, and then do the operation in asm. It would be something like this:
for the z axis:
Code: Select all
void vfpu_rotate_z_matrix(ScePspFMatrix4 *m, float rz) {
__asm__ volatile (
"mtv %1, S000\n"
"vcst.s S001, VFPU_2_PI\n"
"vmul.s S000, S000, S001\n"
"vmidt.q M100\n"
"vrot.q C100, S000, [ c, s, 0, 0]\n"
"vrot.q C110, S000, [-s, c, 0, 0]\n"
"sv.q C100, 0 + %0\n"
"sv.q C110, 16 + %0\n"
"sv.q C120, 24 + %0\n"
"sv.q C130, 32 + %0\n"
: "=m"(*m) : "r"(rz));
}
then you can do this:
Code: Select all
vfpu_rotate_z_matrix(&zmatrix, rz);
sceGuSetMatrix(GU_MODEL, &zmatrix);
that would be for rotate in z axis.
you can do that for the 3 axis.
you can see more info in this website:
http://mrmrice.fx-world.org/vfpu.html
that is the way I do rotations, what do you think?
PS:Im truly sorry about my bad english xD