How do you port to a console
Moderator: Coders of Rage
- Falco Girgis
- Elysian Shadows Team
- Posts: 10294
- Joined: Thu May 20, 2004 2:04 pm
- Current Project: Elysian Shadows
- Favorite Gaming Platforms: Dreamcast, SNES, NES
- Programming Language of Choice: C/++
- Location: Studio Vorbis, AL
- Contact:
Re: How do you port to a console
Because in all honesty, the Dreamcast API that we use is nothing like OGL.
- M_D_K
- Chaos Rift Demigod
- Posts: 1087
- Joined: Tue Oct 28, 2008 10:33 am
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C/++
- Location: UK
Re: How do you port to a console
You don't really need to mess with the kernel on a PSP do make games. Really the only times you do this is when you need to...lets say hook the home button, there are more things but nothing you really need to do.
Also the PSP's graphics stuff is GL based(on the openGL standard) so it works in a similar fashion to OpenGL. there is a library called PSPGL(if I remember correctly) that wraps the internal PSP graphics call stuff and you use OpenGL calls but its not complete. SDL is also ported to the PSP, but I wouldn't recommend using it since its a bit resource heavy.
And you do need to know hardware and how it all works. Cause chances are you're going to be using a load of textures and you'll need to know how to hotswap to and from VRAM.
One last thing the PSP 1.5 phat is your best choice when devving on a PSP. If it runs smooth on a phat you know it will run on pretty much any PSP except the 3000 its still in the early stages of being hacked.
EDIT:
You also need to know assembly to use the PSP vector processors(for the math) which can only be accessed with assembly(shit like this)
Also the PSP's graphics stuff is GL based(on the openGL standard) so it works in a similar fashion to OpenGL. there is a library called PSPGL(if I remember correctly) that wraps the internal PSP graphics call stuff and you use OpenGL calls but its not complete. SDL is also ported to the PSP, but I wouldn't recommend using it since its a bit resource heavy.
And you do need to know hardware and how it all works. Cause chances are you're going to be using a load of textures and you'll need to know how to hotswap to and from VRAM.
One last thing the PSP 1.5 phat is your best choice when devving on a PSP. If it runs smooth on a phat you know it will run on pretty much any PSP except the 3000 its still in the early stages of being hacked.
EDIT:
You also need to know assembly to use the PSP vector processors(for the math) which can only be accessed with assembly(shit like this)
Code: Select all
Vector ret;
__asm__ __volatile__
(
".set push\n"
".set noreorder\n"
"lv.s S100, 0 + %1\n"
"lv.s S101, 4 + %1\n"
"lv.s S102, 8 + %1\n"
"vzero.s S103\n"
"ulv.q C000, 0 + %2\n"
"ulv.q C010, 16 + %2\n"
"ulv.q C020, 32 + %2\n"
"ulv.q C030, 48 + %2\n"
"vtfm4.q C200, E000, C100\n"
"sv.s S200, 0 + %0\n"
"sv.s S201, 4 + %0\n"
"sv.s S202, 8 + %0\n"
".set pop \n"
: "=m"(ret)
: "m"(vector), "m"(matrix)
);
return ret;
Gyro Sheen wrote:you pour their inventory onto my life
IRC wrote: <sparda> The routine had a stack overflow, sorry.
<sparda> Apparently the stack was full of shit.
Re: How do you port to a console
Yay!!! Low Level!!!M_D_K wrote:Code: Select all
Vector ret; __asm__ __volatile__ ( ".set push\n" ".set noreorder\n" "lv.s S100, 0 + %1\n" "lv.s S101, 4 + %1\n" "lv.s S102, 8 + %1\n" "vzero.s S103\n" "ulv.q C000, 0 + %2\n" "ulv.q C010, 16 + %2\n" "ulv.q C020, 32 + %2\n" "ulv.q C030, 48 + %2\n" "vtfm4.q C200, E000, C100\n" "sv.s S200, 0 + %0\n" "sv.s S201, 4 + %0\n" "sv.s S202, 8 + %0\n" ".set pop \n" : "=m"(ret) : "m"(vector), "m"(matrix) ); return ret;
Re: How do you port to a console
I never used PSPGL much, but when I looked at some of its underlying code, it was more of a wrapper for the native PSP GU functions, that were still very GL-looking in style anyways. PSPGL was clearly written for people who want the most portable GL code without rewriting many function definitions.
An average OpenGL user could probably figure out what the following code does:
I've never used assembly, but for PSP it's not needed in most cases except for speed critical applications like emulators. As M_D_K said earlier, just keep the system's memory in check when loading information. I believe the PSP has 24mb of system ram that is readily available for use. Need to make a program that is larger than that and you would have to know file streaming
An average OpenGL user could probably figure out what the following code does:
Code: Select all
sceGuPushMatrix();
{
ScePspFVector3 rot1 = { -90.0f, 0.0f, 0.0f };
ScePspFVector3 rot2 = { 0.0f, 0.0f, -90.0f };
sceGuRotateXYZ(&rot1);
sceGuRotateXYZ(&rot2);
}
sceGuPopMatrix();
Re: How do you port to a console
If you have the "Internet Channel" for wii (basically a simplified version of the Opera web browser) and you know how to use flash/actionscript 2.0 you could make simple games that work with wii with very little effort. I guess that's not technically a port, but it is a hell of a lot easier to do.