Page 1 of 1

new function in libogc GX

Posted: Sat Nov 29, 2008 12:26 am
by Molokai
This is for libogc, but I figured it was a suggestion, so here it is.

I was thinking it would be really nice to have a function in GX comparable to GX_SetDispCopyYScale to do it for the XScale instead (i.e., GX_SetDispCopyXScale). It can't be too much different from YScale, and so would be easy to implement (I would hope). I tried doing so myself, but in this line in the YScale function:

Code: Select all

GX_LOAD_BP_REG(0x4e000000|yScale);
I would have no idea what reg to put in place of the one there for YScale. Also, in these lines:

Code: Select all

ht = _SHIFTR(_gx[0xcc],12,10)+1;
return __GX_GetNumXfbLines(ht,yScale);
I have no idea what that even does, though I would guess they would need to be changed somehow...

Re: new function in libogc GX

Posted: Sun Dec 07, 2008 5:22 pm
by Samson
The GX functions are a very thin wrapper around the GameCube 3D hardware. So you'll have to look through the hardware documentation to see if you can do something before it can be added to the GX library.

Re: new function in libogc GX

Posted: Wed Dec 10, 2008 3:59 pm
by Eke
the GX hardware is only capable of doing vertical scaling during the copy, not horizontal scaling... and never will, no matter how you modify libogc

You have to understand that you just can not recreate functionnalities that does not exist, libogc writes that specific value in that specific register because it's how the hardware has been designed, registers are just the interface between software and hardware...