Search found 82 matches

by Smong
Sat Apr 18, 2009 9:34 am
Forum: PSP Development
Topic: Hook Execution Problem
Replies: 6
Views: 2329

You still need to take into account an integer is 4 bytes, not 1 byte. I have updated the code sample including the structs, these are almost certainly used again by other functions in the same library. struct sceNetIfhandleBase { int unk1[63]; int eventsemaid; int unk2&...
by Smong
Sat Apr 18, 2009 9:02 am
Forum: PSP Development
Topic: 800200D9
Replies: 6
Views: 2819

io.h: struct files { char *signature; char *name[16*1024*1024]; char *block[16*1024*1024]; char *hash[16*1024*1024]; int size[16*1024*1024]; int len[16*1024*1024]; int pos; }; io.c: #include "io.h&...
by Smong
Sat Apr 18, 2009 8:45 am
Forum: PSP Development
Topic: How do games draw 3D data to screen?
Replies: 4
Views: 2214

If you really want to inject GE commands I would try hooking sceGeListUpdateStallAddr. You would need to do some basic processing of the command list to handle the jump/call/ret commands, keep "dry executing" it until you find the "finish" instruction. Here you can start insertin...
by Smong
Sat Apr 18, 2009 8:28 am
Forum: PSP Development
Topic: Easy Hooking Example - User & Kernel
Replies: 8
Views: 6253

Are you still having trouble with this? You may want to try making your stack allocations a multiple of 16 bytes instead of just 4 bytes.
by Smong
Sun Mar 29, 2009 5:10 am
Forum: PSP Development
Topic: sceGumRotateX problem
Replies: 7
Views: 1864

You could have a look at the ortho sample included in pspsdk. It draws a triangle and rotates it.
by Smong
Sat Mar 28, 2009 8:19 am
Forum: PSP Development
Topic: [SOLVED] psp-fixup-imports problem...
Replies: 5
Views: 1657

Works here :)
Try running "psp-prxgen usermodule.elf usermodule.prx"
by Smong
Sat Mar 28, 2009 7:43 am
Forum: PSP Development
Topic: [SOLVED] psp-fixup-imports problem...
Replies: 5
Views: 1657

Since you're not importing any functions (such as using other sceXXX functions) there is no need for .lib.stub, just type make again and ignore that error.
by Smong
Sat Mar 28, 2009 7:42 am
Forum: PSP Development
Topic: sceGumRotateX problem
Replies: 7
Views: 1864

Have a look at samples/gu/common/geometry.h For 32BITF you want something like: struct Vertex { float u, v; float x, y, z; }; You said you don't use the color so just take GU_COLOR_8888 out of the sceGuDrawArray call. 32BITF means 32 bit float, so that's just a float, not a double....
by Smong
Fri Mar 27, 2009 7:51 am
Forum: PSP Development
Topic: A proper way to draw
Replies: 1
Views: 999

Here are some ideas: - Take sceKernelDcacheWritebackAll(); out of the mainloop - Don't call sceGuTexImage if the texture didn't change since the last draw call - Remove the color component from the vertex data, use sceGuColor or similar instead - Cut the textures to 32x32 or use swizzling on 64x64 -...
by Smong
Fri Mar 27, 2009 7:38 am
Forum: PSP Development
Topic: sceGumRotateX problem
Replies: 7
Views: 1864

You don't want to use GU_TEXTURE_16BIT and GU_VERTEX_16BIT in GU_TRANSFORM_3D mode unless you prescale your vertices. It would be a lot easier to use the 32BITF versions.
by Smong
Tue Jan 06, 2009 10:26 am
Forum: PSP Development
Topic: [RESOLVED] Threads and Modules
Replies: 11
Views: 3348

I think sceCtrlReadBufferPositive does allow other threads to run. While sceCtrlPeekBufferPositive does not. Nah, I use peekbuffer and it lets the other threads run fine. In that case I may have to double check it. I double checked by calling sceCtrlPeekBufferPositive 1mil times while a 2nd thread ...
by Smong
Mon Jan 05, 2009 5:50 pm
Forum: PSP Development
Topic: [RESOLVED] Threads and Modules
Replies: 11
Views: 3348

In that case I may have to double check it. Is that the only firmware function you are calling from your mainloop? Some other function may be allowing threads to get a chance at running.
by Smong
Mon Jan 05, 2009 6:41 am
Forum: PSP Development
Topic: [RESOLVED] Threads and Modules
Replies: 11
Views: 3348

I think sceCtrlReadBufferPositive does allow other threads to run. While sceCtrlPeekBufferPositive does not.
by Smong
Mon Dec 15, 2008 4:25 am
Forum: PSP Development
Topic: sceDisplayGetCurrentHcount, Something interesting... :O
Replies: 2
Views: 1637

What kind of results did you get?

Last time I tried this sceDisplayGetCurrentHcount and sceDisplayGetAccumulatedHcount didn't add up. For example add the return value of sceDisplayGetCurrentHcount each frame to some variable and see if it grows at the same rate as sceDisplayGetAccumulatedHcount.
by Smong
Mon Dec 15, 2008 4:10 am
Forum: PSP Development
Topic: how the gpu works
Replies: 4
Views: 1775

For the emulator you need to do two things: - Handle 156/157 GE instruction to set the current offscreen draw buffer. This is will GE will render to. - Handle sceDisplaySetFrameBuf to set the current display buffer. This is used in sceGuSwapBuffers. Apps using both pspDebugScreen and GU will be usin...
by Smong
Tue Nov 18, 2008 7:43 am
Forum: PSP Development
Topic: PSPlink printf problem
Replies: 3
Views: 1634

Use the 1.5 version of psplinkusb?
by Smong
Sun Aug 17, 2008 6:50 am
Forum: PSP Development
Topic: Is there any x86 cross assembler out there?
Replies: 1
Views: 967

GCC can do that fine.
by Smong
Tue Aug 05, 2008 10:35 pm
Forum: PSP Development
Topic: TCP Sockt OLD DATA in recv buf nevr clears [SLVD?]
Replies: 32
Views: 9751

While waiting for another solution you could tackle the stream problem by wrapping it in "packets". There are a few ways to do this: - Always send the same length data. - Add magic bytes, such as 0 or new line at the end of your data (you still didn't answer my question on whether you are ...
by Smong
Sun Aug 03, 2008 10:33 pm
Forum: PSP Development
Topic: TCP Sockt OLD DATA in recv buf nevr clears [SLVD?]
Replies: 32
Views: 9751

Thanks for the pointer tip. I just noticed "TCP" in the topic name (heh), so your answer seems likely. There's also the question of the string's terminating character, which I would expect after the trailing # of each hello. Maybe something to do with how they are being sent/echoed, for ex...
by Smong
Sun Aug 03, 2008 12:09 am
Forum: PSP Development
Topic: TCP Sockt OLD DATA in recv buf nevr clears [SLVD?]
Replies: 32
Views: 9751

KickinAezz wrote:I tried clearing the buffer before using recv; that does the same thing as memset?

char recvbuff[255];
Yes memset to 0 is the same as clearing the buffer.

&recvbuff is the not the same as recvbuff, unless you write it like &recvbuff[0]. Sounds like this was the problem.
by Smong
Sat Aug 02, 2008 11:01 pm
Forum: PSP Development
Topic: TCP Sockt OLD DATA in recv buf nevr clears [SLVD?]
Replies: 32
Views: 9751

What do you mean by stacking? Maybe the strings aren't always null terminated. You could try memset(&recvbuff, 0, 255); before a recv. Also it is interesting you are using &recvbuff and not recvbuff, how did you declare that variable?
by Smong
Fri Aug 01, 2008 9:46 pm
Forum: PSP Development
Topic: Documentation for GU ?
Replies: 2
Views: 1300

API docs: http://psp.jim.sh/pspsdk-doc/group__GU.html http://psp.jim.sh/pspsdk-doc/pspgum_8h.html Nehe's tutorials 1-11: http://www.psp-programming.com/code/doku.php?id=c:tutorials http://www.skistovel.com/index.php?page=tutorials-psp Links were from this thread: http://forums.ps2dev.org/viewtopic.p...
by Smong
Fri Jul 25, 2008 1:25 am
Forum: PSP Development
Topic: How do you write the color in drawLineScreen()?
Replies: 3
Views: 1325

I looked at graphics.h from luaplayer source and color is just an int like this: 0xAABBGGRR. There seem to be some macros available too, they work like this: Color color; color = A(0x00) | B(0xFF) | G(0xFF) | R(0xFF); drawLineScreen&...
by Smong
Thu Jul 24, 2008 9:13 am
Forum: PSP Development
Topic: [QUESTION] What is the max heap size of a user prx?
Replies: 27
Views: 11547

Sorry I didn't know that, I was just trying to help.
by Smong
Thu Jul 24, 2008 8:30 am
Forum: PSP Development
Topic: [QUESTION] What is the max heap size of a user prx?
Replies: 27
Views: 11547

I don't think so. Those "free" calls occur only if i < 64 everywhere I use it. What I want is to be sure to have my 3 MByte block to be allocated at the end of the main ram. "malloc" and "memalloc" try to allocate from the begining to the end of the heap, so I need to ...
by Smong
Wed Jul 23, 2008 11:26 pm
Forum: PSP Development
Topic: [QUESTION] What is the max heap size of a user prx?
Replies: 27
Views: 11547

s32 i = 64; u8 *blocks&#91;64&#93;; ... // try to allocate my 3MB block at the end of main ram while &#40;!&#40;block = &#40;u8 *&#41;memalloc&#40;1 MB, 3 MB&#41;&#41;&#41; &#123; if &#40;i < 64&#41; break; free&#40;blocks&#91;i++&#93;...
by Smong
Sun Jul 20, 2008 2:53 am
Forum: General Discussion
Topic: I want to work in Linux
Replies: 14
Views: 16836

LBGSHI wrote:tasumisra: I've found that the search function on these forums isn't quite as good as we could hope, so I made a Google search specifically for PS2Dev.org, here: http://www.google.com/coop/cse?cx=00382 ... -k31ipwaaa
Can you add http://psp.jim.sh/pspsdk-doc/ to it too?
by Smong
Sat Jul 19, 2008 10:23 pm
Forum: PSP Development
Topic: Load Go!Cam Modules from an EBOOT?
Replies: 10
Views: 3701

While this won't fix your link error I notice 2 things: Is the second parameter supposed to be a 1 there? PSP_MODULE_INFO&#40;"OpenOS", 1, 1, 1&#41;; psputility_usbmodules.h says: #define PSP_USB_MODULE_CAM 4 // Requires PSP_USB_MODULE_ACC loading first I don't see you loading PSP_...
by Smong
Sat Jul 19, 2008 9:37 pm
Forum: PSP Development
Topic: psp crash when I try to resize image with SDL
Replies: 7
Views: 2570

This probably isn't related to the error you are expeiencing, but you don't need to be calling SDL_Flip() so often. Try taking it out of Write() and DrawPic(), then call it after DrawPic like this: //first image show DrawPic&#40;1&#41;; SDL_Flip&#40;Screen&#41;; SDL_Delay&#40;200...
by Smong
Sat Jul 19, 2008 9:20 pm
Forum: PSP Development
Topic: MD2Lib troubles
Replies: 2
Views: 1496

Re: MD2Lib troubles

You didn't say where you were going wrong. This also doesn't look like a PSP specific question. I noticed this part has strange commenting: /* typedef struct MD2_ int Load_MD2&#40;char *target&#41;&#123; MD2_Header *header; if&#40;Load_MD2&#40;char *target&#41; &#123; pri...