3D on the PSP

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
chp
Posts: 313
Joined: Wed Jun 23, 2004 7:16 am

3D on the PSP

Post by chp »

Ok, I've started digging into sceGu a bit, to see how easy it would be to get something useful, and from the look of it this library is very lowlevel and nice. :)

So, as I'm doing this I'm curious if anyone else is doing this, and perhaps that we should collaborate our efforts? Getting a true 3D-library on the PSP would be a great gain, and as it won't in itself allow anyone to crack games, I'm all for doing some work on it.

From what I've discovered the PSP-graphicscircuit executes lists of commands, much like the GS on PS2 does. The command-format is (command << 24)|(argument), which gives us 24 bits to play with. Floats are also passed this way, using a small wrapper:

Code: Select all

void sendCommandf&#40;u8 cmd, float argument&#41;
&#123;
	sendCommandi&#40;cmd,&#40;*&#40;&#40;u32*&#41;&argument&#41;&#41; >> 8&#41;;
&#125;
So finally a PlayStation has float-precision. :)

The wrapper-library is as I said very lowlevel and most of it maps 1:1 to the underlying hardware. Example:

Code: Select all

void sceGuAmbientColor&#40;u32 color&#41;
&#123;
	sendCommandi&#40;85,color & 0xffffff&#41;;
	sendCommandi&#40;88,color >> 24&#41;;
&#125;
and sendCommandi() only does this:

Code: Select all

void sendCommandi&#40;u8 cmd, u32 argument&#41;
&#123;
	u32* gu_struct = *&#40;&#40;u32*&#41;0x527a78&#41;; // base context?
	u32* current = *&#40;gu_struct+1&#41;; // get current list pointer

	*&#40;current++&#41; = &#40;cmd << 24&#41; | &#40;argument & 0xffffff&#41;;
	*&#40;gu_struct+1&#41; = current; // store back
&#125;
This is later on kicked through sceGuSendList() to the hardware (which calls sceGeListEnQueue() in the kernel), so we won't have to deal with any lowlevel DMAC this time around. Thank you Sony. :)

I've rewritten 20 functions in C so far, and when I get closer to usability I'll submit to the repository.
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Nice work so far, I just have a question...
void sendCommandf(u8 cmd, float argument)
{
sendCommandi(cmd,(*((u32*)&argument)) >> 8);
}
Wouldn't that munge the float data?
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Also, sendCommandi() seems to be just a list/packet building function. Is the gu_struct supplied by the program, or is it a memory-mapped part of the GU? It looks like sceGeListEnQueue() is just a fancy function that does dma for you by sending your freshly created list to whatever is the local GIF-equivalent.
chp
Posts: 313
Joined: Wed Jun 23, 2004 7:16 am

Post by chp »

ooPo wrote:Nice work so far, I just have a question...
void sendCommandf(u8 cmd, float argument)
{
sendCommandi(cmd,(*((u32*)&argument)) >> 8);
}
Wouldn't that munge the float data?
It would cut down the mantissa from 23 to 15 bits, but the float would still be valid from the hardware POV, as it eats 24-bit floats. You'll only loose some precision doing this.

A normal float has: s eeeeeeee mmmmmmmmmmmmmmmmmmmmmmm
While the floats here are: s eeeeeeee mmmmmmmmmmmmmmm

And you compute the float as: (+/-) 1.mantissa * pow(2,exponent) so you're only losing the least significant bits.
chp
Posts: 313
Joined: Wed Jun 23, 2004 7:16 am

Post by chp »

ooPo wrote:Also, sendCommandi() seems to be just a list/packet building function. Is the gu_struct supplied by the program, or is it a memory-mapped part of the GU? It looks like sceGeListEnQueue() is just a fancy function that does dma for you by sending your freshly created list to whatever is the local GIF-equivalent.
Most probably, yes, it should probably be called gu_struct or something. :) The PSP probably shares a lot of logic with the PS2, but this time around you(the developer) doesn't have to get your hands dirty with dma-controllers just to display some fancy graphics.
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

A normal float has: s eeeeeeee mmmmmmmmmmmmmmmmmmmmmmm
While the floats here are: s eeeeeeee mmmmmmmmmmmmmmm
I wasn't sure of the actual bit structure of a float... it is totally clear now.

And dma is fun, dammit! :)
chp
Posts: 313
Joined: Wed Jun 23, 2004 7:16 am

Post by chp »

ooPo wrote:And dma is fun, dammit! :)
Yep, and it IS simple, but when you get into trouble with the DMA it can be a nasty fellow that some people just can't cope with. Wusses :)
chp
Posts: 313
Joined: Wed Jun 23, 2004 7:16 am

Post by chp »

PSP GE COMMAND LIST
-------------------

Every GE command consists of two parts: The command and the argument. They are assembled like this:
(cmd << 24)|(argument)
The command is 8 bits, and the argument 24-bits.

The GE accepts 24-bit floats. To convert from a standard float, do this:
u32 ge_float = (*((u32*)&normal_float)) >> 8;

This list is very incomplete and might also be incorrect, but I'm working on it.

Code: Select all

    DEC HEX Description
    --- --- -----------

    1   01  Vertex list&#40;???&#41;

    2   02  Index list&#40;???&#41;

    7   07  Index count

    16  10  This register seems to be used in a lot of places as HI-bits for pointers...

    18  12  Primitive type
            Bits 0-23&#58; Type
            If the GE inherits from the GS, these should be the primitive types&#58;
            0&#58; Points
            1&#58; Lines
            2&#58; Linestrip
            3&#58; Triangles
            4&#58; Tristrip
            5&#58; Trifan
            6&#58; Sprite
            This must be verified!!!

    42  2A  Bone Matrix Offset
            Bits 0-23&#58; Bone Matrix offset &#40;index * &#40;4*3&#41;&#41; &#40;4*3 matrix&#41;

    43  2B  Bone Matrix Value
            Bits 0-23&#58; Bone Matrix Value &#40;float&#41;
            Written 4*3 times to upload one matrix

    44  2C  Morph Weight 0
    ...
    45+ 2D+ Morph Weight N... &#40;Don't know how many there can be&#41; &#40;Maximum of 10&#41;
            Bits 0-23&#58; Morph Weight &#40;float&#41;

    54  36  Patch Divide
            Bits 0-7&#58; a0
            Bits 8-15&#58; a1

    55  37  Patch Prim
            Bits 0-1&#58; a0 == 0 &#58; 2; a0 == 2&#58; 1; a0 == 4&#58; 0

    56  38  Patch Front Face
            Bits 0-23&#58; Value

    58  3A  Unknown matrix strobe?
            Bits&#58; 0-23&#58; Float &#40;strobe???&#41; &#40;write 0.0f before uploading&#41;

    59  3B  Unknown matrix upload?
            Bits&#58; 0-23&#58; Float &#40;write 3*4 values to upload complete matrix&#41; &#40;last column of 4*4 ignored&#41;

    60  3C  View Matrix strobe?
            Bits&#58; 0-23&#58; Float &#40;strobe???&#41; &#40;write 0.0f before uploading&#41;

    61  3D  View Matrix upload?
            Bits&#58; 0-23&#58; Float &#40;write 3*4 values to upload complete matrix&#41; &#40;last column of 4*4 ignored&#41;

    62  3E  Projection matrix strobe?
            Bits 0-23&#58; Float &#40;strobe???&#41; &#40;write 0.0f before uploading&#41;

    63  3F  Projection Matrix upload?
            Bits 0-23&#58; Float &#40;write 4*4 values to upload complete matrix&#41;

    64  40  Unknown matrix strobe?
            Bits 0-23&#58; Float &#40;strobe???&#41; &#40;write 0.0f before uploading&#41;

    65  41  Unknown matrix upload?
            Bits&#58; 0-23&#58; Float &#40;write 3*4 values to upload complete matrix&#41; &#40;last column of 4*4 ignored&#41;

    66  42  Viewport
            Bits&#58; 0-23&#58; Float &#40;Width/Height? X? Y?&#41;

    67  43  Viewport
            Bits&#58; 0-23&#58; Float &#40;Width/Height? X? Y?&#41;

    69  45  Viewport
            Bits&#58; 0-23&#58; Float &#40;Width/Height? X? Y?&#41;

    70  46  Viewport
            Bits&#58; 0-23&#58; Float &#40;Width/Height? X? Y?&#41;

    72  48  Texture Scale U
            Bits 0-23&#58; U Scale &#40;float&#41;

    73  49  Texture Scale V
            Bits 0-23&#58; V Scale &#40;float&#41;

    74  50  Texture Offset U
            Bits 0-23&#58; U Offset &#40;float&#41;

    75  51  Texture Offset V
            Bits 0-23&#58; V Offset &#40;float&#41;

    76  4C  Viewport offset &#40;X&#41;
            Bits 0-23&#58; X-Offset << 4

    77  4D  Viewport offset &#40;Y&#41;
            Bits 0-23&#58; Y-Offset << 4

    80  50  Shading
            Bit 0&#58; 0/1 Flat/Gouraud&#40;???&#41;

    83  53  Color Material
            Bits 0-23&#58; Color Material &#40;RGB?&#41;

    84  54  Related to Model Color
            Bits 0-23&#58; a0 &#40;sceGuModelColor&#40;&#41;&#41;

    85  55  Related to Model Color / Used in sceGuAmbientColor&#40;&#41;
            Bits 0-23&#58; a1 &#40;sceGuModelColor&#40;&#41;&#41;
            Bits 0-23&#58; Ambient Color RGB &#40;sceGuAmbientColor&#40;&#41;&#41;

    86  56  Related to Model Color
            Bits 0-23&#58; a2 &#40;sceGuModelColor&#40;&#41;&#41;

    87  57  Related to Model Color
            Bits 0-23&#58; a3 &#40;sceGuModelColor&#40;&#41;&#41;

    88  58  Ambient Color Alpha
            Bits 0-7&#58; Ambient Color Alpha

    91  5B  Specular Power
            Bits 0-23&#58; Specular power &#40;float&#41;

    92  5C  Ambient RGB &#40;BGR?&#41;
            Bits&#58; 0-23&#58; Color

    93  5D  Ambient Alpha
            Bits 0-7&#58; Alpha

    155 9B  Front Face
            Bit 0&#58; 0/1 &#40;Front face???&#41;

    160 A0  Texture Base Pointer &#40;Mipmap level 0&#41;
    ...
    167 A7  Texture Base Pointer &#40;Mipmap level 6&#41;
            Bits 0-23&#58; Texture Pointer &#40;Local to vram???&#41;

    168 A8  Texture Buffer Width &#40;Mipmap level 0&#41;
    ...
    175 AF  Texture Buffer Width &#40;Mipmap level 6&#41;
            Bits 0-23&#58; Buffer Width &#40;???&#41;

    176 B0  CLUT Pointer
            Bits 0-23&#58; Clut Address

    177 B1  CLUT Pointer &#40;HI&#41;
            Bits 16-20&#58; Clut Address &#40;Bits 24-27&#41;

    178 B2  Texture Buffer Pointer &#40;Source? Dest?&#41; &#40;sceGuCopyImage&#40;&#41;&#41;
            Bits 0-23&#58; Pointer

    179 B3  HI Pointer bits + ??? &#40;t1&#41;
            Bits 16-23&#58; HI Pointer bits for Texture Buffer Pointer
            Bits 0-15&#40;7?&#41;&#58; t1

    180 B4  Texture Buffer Pointer 2 &#40;Source? Dest?&#41; &#40;sceGuCopyImage&#40;&#41;&#41;
            Bits 0-23&#58; Pointer

    181 B5  HI Pointer bits + ??? &#40;stack1&#41;
            Bits 16-23&#58; HI Pointer bits for Texture Buffer Pointer 2
            Bits 0-15&#40;7?&#41;&#58; t2

    184 B8  Texture Size &#40;Mipmap level 0&#41;
    ...
    191 BF  Texture Size &#40;Mipmap level 6&#41;
            Bits 0-7&#58; Log2&#40;Width&#41;
            Bits 8-15&#58; Log2&#40;Height&#41;

    192 C0  Texture Projection Map Mode + Texture Map Mode
            Bits 0-1&#58; Texture Map Mode
            Bits 8-11&#58; Texture Projection Map Mode

    193 C1  Texture Map Mode &#40;continued&#41;
            Bits 0-1&#58; a1
            Bits 8-15&#40;23?&#41;&#58; a2

    194 C2  Texture Mode
            Bits 0-8&#58; a3
            Bits 8-15&#58; a2
            Bits 16-23&#58; a1

    195 C3  Texture Mode &#40;continued&#41;
            Bits 0-23&#58; a0

    196 C4  Related to CLUT &#40;Number of colors???&#41;
            Bits 0-23&#58; ???

    197 C5  Clut Mode
            Bits 0-1&#58; a0
            Bits 2-7&#40;?&#41;&#58; a1
            Bits 8-15&#58; a2
            Bits 16-23&#58; a3

    198 C6  Texture Filter
            Bits 0-7&#58; a0 &#40;min/mag?&#41;
            Bits 8-15&#58; a1 &#40;min/mag?&#41;

    199 C7  Texture Wrap
            Bits 0-7&#58; U Wrap
            Bits 8-15&#58; V Wrap

    200 C8  Texture Level Mode &#40;L/K???&#41;
            Bits 0-15&#58; a0
            Bits 16-23&#58; -128 - 128 &#40;Mip map bias?&#41;

    201 C9  Texture Function
            Bits 0-7&#58; a0
            Bits 8-15&#58; a1
            Bits 16-23&#58; ???

    202 CA  Texture Env Color
            Bits 0-23&#58; Color &#40;RGB&#41;

    203 CB  Texture Flush
            Bits 0-23&#58; Strobe? &#40;float&#41; &#40;Just write zero&#41;

    204 CC  Texture Sync
            Bits 0-23&#58; Strobe? &#40;Just write zero&#41;

    208 D0  Texture Slope
            Bits 0-23&#58; Texture Slope &#40;float&#41;

    212 D4  Scissor X/Y Start
            Bits 0-9&#58; X Start
            Bits 10-19&#58; Y Start

    213 D5  Scissor X/Y End
            Bits 0-9&#58; X End &#40;&#40;Width + X Start&#41;-1&#41;
            Bits 10-19&#58; Y End &#40;&#40;Height + Y Start&#41;-1&#41;

    216 D8  Color Function
            Bits 0-1&#58; Function

    217 D9  Color for Color Function
            Bits 0-23&#58; RGB

    218 DA  Color for Color function &#40;???&#41;
            Bits 0-23&#58; RGB

    219 DB  Alpha Func
            Bits 0-7&#58; a0
            Bits 8-15&#58; a1
            Bits 16-23&#58; a2

    220 DC  Stencil Function
            Bits 0-7&#58; a0
            Bits 8-15&#58; a1
            Bits 16-23&#58; a2

    221 DD  Stencil Op
            Bits 0-7&#58; a0
            Bits 8-15&#58; a1
            Bits 16-23&#58; a2

    222 DE  Depth Function
            Bits 0-23&#40;?&#41;&#58; Depth test function?

    223 DF  Blend function
            Bits 0-3&#58; a1
            Bits 4-7&#58; a2
            Bits 8-11&#58; a3

    224 E0  Related to blend function
            Bits 0-23&#58; Value &#40;fix?&#41;

    225 E1  Related to blend function
            Bits 0-23&#58; Value &#40;fix?&#41;

    226 E2  Dither Matrix, Row 0
    ...
    229 E5  Dither Matrix, Row 3
            Bits 0-3&#58; Column 0
            Bits 4-7&#58; Column 1
            Bits 8-11&#58; Column 2
            Bits 12-15&#58; Column 3

    230 E6  Logical Op
            Bits 0-3&#58; Logical Op

    231 E7  Depth Mask
            Bits 0-23&#58; Depth Mask

    232 E8  Pixel Mask &#40;RGB&#41;
            Bits 0-23&#58; Pixel Mask &#40;RGB&#41;

    233 E9  Pixel Mask &#40;Alpha&#41;
            Bits 0-7&#58; Pixel Mask &#40;Alpha&#41;

    234 EA  Texture Transfer Mode???
            Bit 0&#58; 1/0 &#40;???&#41;

    235 EB  X/Y Offset for Image copy? &#40;Source/Dest?&#41;
            Bits 0-9&#58; X Offset?
            Bits 10-19&#58; Y Offset?

    236 EC  X/Y Offset for Image copy? &#40;Source/Dest?&#41; &#40;2&#41;
            Bits 0-9&#58; X Offset?
            Bits 10-19&#58; Y Offset?

    238 EE  Width/Height for texture transfer?
            Bits 0-9&#58; Width? &#40;Width-1&#41;
            Bits 10-19&#58; Height? &#40;Height-1&#41;
Edit #1 (2005-06-19): Added more registers to the list and corrected some errors.
Warren
Posts: 175
Joined: Sat Jan 24, 2004 8:26 am
Location: San Diego, CA

Post by Warren »

List has been moved to the wiki at http://wiki.ps2dev.org/psp:ge_register_list
chp
Posts: 313
Joined: Wed Jun 23, 2004 7:16 am

Post by chp »

Warren wrote:List has been moved to the wiki at http://wiki.ps2dev.org/psp:ge_register_list
Damn, you beat me to updating my own post. :P
Neu
Posts: 3
Joined: Thu Jun 16, 2005 9:57 am

Post by Neu »

Hi, Chp. I've been working on this too!

I'm wondering how far you got as to using the Enqueue function?

I've been looking through the PuzzleBobble code to see how it uses the gpu as well and made a lot of discoveries.

In the beginning code you can see it send a draw list located at 0x306a4, which is clearly initializing the gpu. The end codes for the list appear to be 0x0F 000000, 0x0C 000000.

I can send this same list to the gpu as well. On the new PSP-Tool Chain, when I call list Enqueue, nothing seems to happen. I verified this by sending random commands. However on the ps2-tool chain sending random commands crashes the psp. (To Check that List is actually being used)

I get a nice zero returned from DrawSync() and ListSync(), and ListEnQueue returns some kind of ID value.

I was just wondering what your startup.s looks like because if I use the stub info from the online api docs its:

STUB_START "sceGe_driver",0x40010000,0x00150005
STUB_FUNC 0xab49e76a,sceGeListEnQueue
STUB_FUNC 0x1c0d95a6,sceGeListEnQueueHead
STUB_END


which is different than: (posted on here originally)

STUB_START "sceGe_user",0x40010000,0x000A0005
STUB_FUNC 0xAB49E76A,sceGeListEnQueue
STUB_FUNC 0x1C0D95A6,sceGeListEnQueueHead
STUB_END

I really dont know much about how the stubbing works, so if this is a stupid question please forgive me.
Treat
Posts: 16
Joined: Sun Sep 26, 2004 10:17 pm

Post by Treat »

i think the high word of the second number should correspond to the number of stub functions i.e

STUB_START "sceGe_driver",0x40010000,0x00020005
STUB_FUNC 0xab49e76a,sceGeListEnQueue
STUB_FUNC 0x1c0d95a6,sceGeListEnQueueHead
STUB_END

don't know if that makes any difference
chp
Posts: 313
Joined: Wed Jun 23, 2004 7:16 am

Post by chp »

Neu wrote:Hi, Chp. I've been working on this too!

I'm wondering how far you got as to using the Enqueue function?
I've figured out how to use the sceGeListEnQueue(), but I've been more focused on getting a complete picture on how the hardware works with a full reverse of all involved code before I start to experiment how to use it. This way I won't have to second-guess what I'm doing. I'll probably give it a proper go this weekend.

I'll get back with some results soon (and with full sources of course :) ).

To give some help on the road:

int sceGeListEnQueue(void* start, void* stall, int id, int unknown);

start is which list that is to be enqueued for a transfer.

stall is where the transfer should stall (so that you can enqueue a list and then keep updating the stall-address using sceGuUpdateStallAddr()). Passing 0 to this address executes the list. If you look at the rest of the code for sceGu, you'll see that the address is updated in several locations, as long as the first context is active.

id is the kernel callback id previously registered. (look at sceGuInit())

I've not yet looked at the last unknown, as it hasn't beeen used except in sceGuSendList(). What is passed in there seems to be some kind of array (2 dwords, first one a size and then some data-pointer that I haven't looked at yet)

The value returned is the id for the enqueued list. You use this id when referring to it in other sceGe-functions.
Neu
Posts: 3
Joined: Thu Jun 16, 2005 9:57 am

Post by Neu »

Hey thanks for the help.

I've been looking at the disasm a lot, one question I have is:

If sceGu is supposed to be a static linked lib, then why does it access memory at 0x52XXXX ? It seems like a lot of the puzzle bubble globals are stored in that address range, but the gpu code makes access to that memory all the time.

Have any of you guys started making a memory map for it? I think this would help a lot. I started, but a lot of things I'm not sure of. All the addresses are offsets from 0x520000:

Ex:
globalMem -> 0x52000;
globalMem[31376] = [FrameBufferFormat]
globalMem[31380] = [DrawBuffer Width]
globalMem[31384] = [DrawBufferPtr BaseOffset] = 0x00 (Set to Zero in ResetStatics)

Is my code still gonna work if I don't use these addresses? At first I thought it was just some global vars, because I thought memory mapped addresses need to be a lot higher? But then again they are set explicitly in the sceGu code.

Oh, and does it matter where in memory you store the DrawingList ?
u32* gu_struct = *((u32*)0x527a78); // base context?
ector
Posts: 195
Joined: Thu May 12, 2005 10:22 pm

Post by ector »

Puzzle Bobble (and the other commercial games) are not prerelocated so all those references are wrong.
That said, i'm having strange issues with variables in the 0x0e000000 and 0x00600000 ranges in my emulator but i suspect it's mostly my relocations that are b0rked :P
chp
Posts: 313
Joined: Wed Jun 23, 2004 7:16 am

Post by chp »

Neu wrote:Hey thanks for the help.

I've been looking at the disasm a lot, one question I have is:

If sceGu is supposed to be a static linked lib, then why does it access memory at 0x52XXXX ? It seems like a lot of the puzzle bubble globals are stored in that address range, but the gpu code makes access to that memory all the time.

Have any of you guys started making a memory map for it?
Sure. This is my current one, a few left to resolve:

Code: Select all

/* 0x527A34 0x52 31284 */
typedef struct
&#123;
	void* callbacks&#91;2&#93;; /* 0x527A34, 0x527A38 31284, 31288 */
	int unknown2; /* 30292 */
	int unknown3; /* 30296 */
	int unknown4; /* 31300 */
	int unknown5; /* 31304 */
	int unknown6; /* 31308 */
	int unknown7; /* 31312 */
	int unknown8; /* 31316 */
	int unknown9; /* 31320 */
	int unknown_send_list; /* 0x527A5C 31324 */ /* current list index enqueued??? */
	int kernel_event_flag; /* 0x527A60 31328 */
	int ge_callback_id; /* 0x527A64 31332 */
	/* ... */
&#125; GuSettings;

typedef struct
&#123;
	unsigned int* start;
	unsigned int* current;
	int parent_context;
&#125; gu_display_list;

/* 0x527914 0x52 30996 */
typedef struct
&#123;
	gu_display_list list; // 0 4 8
	int unknown3; // 12
	int scissor_start&#91;2&#93;; // 16 20
	int scissor_end&#91;2&#93;; // 24 28
	int near_plane; // 32
	int far_plane; // 36
	int depth_offset; // 40
	int unknown11; // 44 used in combination with texture_function
	int texture_function; // 48
	int texture_proj_map_mode; // 52
	int texture_map_mode; // 56
	int sprite_mode&#91;4&#93;; // 60 64 68 72
	unsigned int clear_color; // 76
	unsigned int clear_stencil; // 80
	unsigned int clear_depth; // 84
	int texture_mode; // 88
&#125; GuContext; // 92 bytes

typedef struct
&#123;
	int pixel_size; // 0 0
	int frame_width; // 1 4
	void* frame_buffer; // 2 8
	void* disp_buffer; // 3 12
	void* depth_buffer; // 4 16
	int depth_width; // 5 20
	int width; // 6 24
	int height; // 7 28
&#125; GuDrawBuffer;

typedef struct
&#123;
	unsigned char row0&#91;4&#93;;
	unsigned char row1&#91;4&#93;;
	unsigned char row2&#91;4&#93;;
	unsigned char row3&#91;4&#93;;
&#125; GuLightSettings;

extern unsigned int gu_unknown1; /* 0x527910 30992 */
extern GuContext* gu_contexts; /* 0x527914 30996 */
extern int ge_list_executed&#91;2&#93;; /* 0x527A28 31272, 31276 */
extern void* ge_edram_address; /* 0x527A30 31280 */
extern GuSettings gu_settings; /* 0x527A34 31284 */
extern gu_display_list* gu_list; /* 0x527A78 31352 */
extern int gu_curr_context;	/* 0x527A7C 31356 */
extern int gu_init; /* 0x527A80 31360 */
extern int gu_display_on; /* 0x527A84 31364 */
extern int gu_call_mode; /* 0x527A88 31368 */
extern int gu_states; /* 0x527A8C 31372 */
extern GuDrawBuffer gu_draw_buffer; /* 0x527A90 31376, 31380, 31384, 31388, 31392, 31396, 31400 */
/* 31404 */
extern unsigned int** gu_object_stack; /* 0x527AB0 31408 */
extern int gu_object_stack_depth; /* 0x527B30 31536 */

extern GuLightSettings light_settings&#91;4&#93;; /* 0x30A78 2680 */
Darkcreator
Posts: 7
Joined: Sat Apr 30, 2005 3:47 am
Location: Florida

Post by Darkcreator »

thanks alot chp I was gona work on that thxs for doing it for me
whats up ?
ReJ
Posts: 25
Joined: Sun Apr 04, 2004 12:32 am
Location: Lithuania, Vilnius
Contact:

Post by ReJ »

234 EA Texture Transfer Mode???
Bit 0: 1/0 (???)
Actually, it seems to be a size of the pixel ( a0 ^ 0x03 )
0 - 16 bit
1 - 32 bit

( GE_TPSM_5650 | GE_TPSM_5551 | GE_TPSM_4444 ) ^ 0x03 == 0
( GE_TPSM_8888 ) ^ 0x03 == 1

Description of other registers used in sceGuCopyImage() seems to be right (178 source, 179 src_bpw, 235 src_x_y, 238 src_width_height, 180 dest, 181 dest_bpw, 236 dest_x_y ).
yarik
Posts: 2
Joined: Fri Sep 26, 2008 11:42 pm

Post by yarik »

[solved]
Pirata Nervo
Posts: 409
Joined: Tue Oct 09, 2007 4:22 am

Post by Pirata Nervo »

lol?
Image
Upgrade your PSP
hlide
Posts: 739
Joined: Sun Sep 10, 2006 2:31 am

Post by hlide »

too shameful that you prefer to delete your question ?
yarik
Posts: 2
Joined: Fri Sep 26, 2008 11:42 pm

Post by yarik »

>too shameful that you prefer to delete your question ?

yeah
Post Reply