Search found 21 matches

by davidgf
Mon Mar 01, 2010 8:39 am
Forum: PSP Development
Topic: VFPU ulv.q on FAT PSPs
Replies: 0
Views: 5032

VFPU ulv.q on FAT PSPs

Hi! As there's lot of silence about this topic I want to reopen it a little. I've done some research and I noticed that ulv.q corrupts FPU registers (as we all know) in this way: ulv.q C000 --> $f0 ulv.q R000 --> $f0 ulv.q C010 --> $f1 ulv.q R001 --> $f1 ... I've tested to registers R500 so it seems...
by davidgf
Thu Feb 18, 2010 7:13 am
Forum: PSP Development
Topic: What fps could achieved at maximum ?
Replies: 30
Views: 37523

Just another quick tip, dont use sceCtrlReadBufferPositive, use sceCtrlPeekBufferPositive (prior caps thread to 60fps) also dont wait for a vblank, rather just setup another thread, or a timer callback that only renders at the desired framerate, that way you dont stall the cpu for stupid things suc...
by davidgf
Tue Feb 16, 2010 9:46 am
Forum: PSP Development
Topic: Z-Buffer precision - some artifacts
Replies: 9
Views: 19635

Of course! Every polygon gets clipped at the near and far plane. Have you realised that fog in some computer games? It's just to avoid the user to see the objects disappear or get sliced at the far plane. The near plane is not a problem, just maintain your camera away from objects. If you do shadowi...
by davidgf
Fri Feb 12, 2010 9:39 am
Forum: PSP Development
Topic: Libmsn porting: bus error exception
Replies: 2
Views: 8076

Just decompile using
psp-objdump -d youbinary.elf > decompiled.txt

And search for 0890B8F0 in your listing. Will see something like:

XXXXXXXX: jal <label>
XXXXXXXX: something
0890B8F0: something

label is the function which is failing, so check it

Hope it helps
by davidgf
Fri Feb 12, 2010 3:41 am
Forum: PSP Development
Topic: Z-Buffer precision - some artifacts
Replies: 9
Views: 19635

I use OpenGL, don't use GU, but there's one moment when you define your projection matrix (gluPerspective). So the near plane should be far enough and the far plane close enough. Pushing the near plane a little away should avoid Z fighting. You can paste your code if you want more info. Rendering tr...
by davidgf
Fri Feb 12, 2010 3:29 am
Forum: PSP Development
Topic: Error using VFPU matrix 3?
Replies: 19
Views: 21480

Sorry for reopening this post, but I can't find anything in google about this. Where did you exactly find out the register corruption? I'm interested in this. But if I don't use Matrix 0 shoul'd be any problem, isn't it? After some tests on a FAT PSP I notices some bugs related to some register corr...
by davidgf
Tue Feb 09, 2010 5:40 am
Forum: PSP Development
Topic: Vorbis streaming on ME processor
Replies: 3
Views: 3357

Don't know how I solved all my problems. I'll explain a little bit so if someone wants to implement something similar. Also I'll upload the game source when I finish it! I use stb_vorbis, which allows you to specify a buffer for all temp data. I allocate a temp buffer on the stack and I use it. The ...
by davidgf
Mon Feb 08, 2010 8:32 am
Forum: PSP Development
Topic: Vorbis streaming on ME processor
Replies: 3
Views: 3357

Thanks!!! This answers all my questions. I've decided to use stb_vorbis, which is a vorbis decoder implementation that you can choose to use malloc or it's own allocator in a custom buffer. Now I have a little problem. I have a temp buffer for reading raw files, this buffer is in the main memory and...
by davidgf
Sat Feb 06, 2010 6:31 am
Forum: PSP Development
Topic: Vorbis streaming on ME processor
Replies: 3
Views: 3357

Vorbis streaming on ME processor

Hi everybody! I'm trying to decode OGG vorbis on the ME processor using the mediaengine.prx that a great coder posted here. I'm facin some problems because of the malloc / free functions that ogg vorbis uses. I had some crashes at malloc_lock function I guess because malloc wasn't written to be shar...
by davidgf
Mon Feb 01, 2010 11:01 pm
Forum: PSP Development
Topic: GCC removes ASM code after return
Replies: 11
Views: 14306

I'll try the noreorder later, but I don't know for sure if I need to place nops after comparisions. I don't get at all what push and pop statements do, but anyway I'll give a try. The label problem I solved this way. My code has a lot of C comparisions with early out: if (dist> radius) return 0; I t...
by davidgf
Sun Jan 31, 2010 9:39 am
Forum: PSP Development
Topic: GCC removes ASM code after return
Replies: 11
Views: 14306

Already done, but dead code removal seems to apply even with no optimization. Another think that GCC does is: vcmp.s ... nop bvt 0, label nop gcc changes the above code to vcmp.s ... bvt 0, label nop nop This is weird, isn't it? And is it necesary to add nop before a vcmp or i can compare and branch...
by davidgf
Sun Jan 31, 2010 8:01 am
Forum: PSP Development
Topic: GCC removes ASM code after return
Replies: 11
Views: 14306

I didn't know that, none of my assembler teachers told me. The fact is that inline assembly is weird, it could be better to use pure assembly functions. Where can I find Gcc calling conventions for PSP MIPS? And how can I know the offset of each struct element? Because gcc optimizations can pack or ...
by davidgf
Sun Jan 31, 2010 5:54 am
Forum: PSP Development
Topic: GCC removes ASM code after return
Replies: 11
Views: 14306

Anything is welcome! But my problem is that Gcc doesn't do well with inline assembly. Now I have: int returnvalue = 0; asm code.... bvt 0, exit_block_ c code... returnvalue = 1; exit_block_&#58; return returnvalue; This should work, as it returns a zero when jumping with the assembly code and re...
by davidgf
Sun Jan 31, 2010 12:41 am
Forum: PSP Development
Topic: GCC removes ASM code after return
Replies: 11
Views: 14306

It removes too!
The problem are not the labels. The problems is that gcc removes absolutely everything after a return instruction, as it assumes I can't jump over a return.
It doesn't understand that the instruction bvt is a jump instruction!
by davidgf
Sun Jan 31, 2010 12:28 am
Forum: PSP Development
Topic: GCC removes ASM code after return
Replies: 11
Views: 14306

GCC removes ASM code after return

Hi! I've got a problem with gcc. My code block: __asm__ volatile &#40; "vcmp.s GT, S000, S200\n" "bvt 0, return_block_\n" "nop\n" &#41;; ...... return 1; __asm__ __volatile__ &#40;"return_block_&#58;\n"&#41;; return 0; &#125; GCC compla...
by davidgf
Tue Dec 01, 2009 5:01 am
Forum: PSP Development
Topic: PSP Hardware Profiler
Replies: 3
Views: 3752

Can I, instead of using psplink which gives me so much pain, create a prx module like exceptionHandler one with a wrapper for those functions?
Will this work?

Thanks for everything
David
by davidgf
Sun Nov 29, 2009 9:58 am
Forum: PSP Development
Topic: PSP Hardware Profiler
Replies: 3
Views: 3752

Can anyone point to some app source which makes use of this at least?

Thanks again
by davidgf
Sat Nov 21, 2009 9:07 am
Forum: PSP Development
Topic: PSP Hardware Profiler
Replies: 3
Views: 3752

PSP Hardware Profiler

Hi everybody! I'm having a problem with the psp hardware profiler. If I call any of these functions: pspDebugProfilerClear, pspDebugProfilerEnable, pspDebugProfilerDisable The PSP crashes with some load/store exception. I've put just a pspDebugProfilerClear which should'n give any problem (it just e...
by davidgf
Mon Sep 28, 2009 7:33 am
Forum: PSP Development
Topic: VFPU: problem with vtfm3.t
Replies: 4
Views: 5140

I think this has nothing to do with the error.
The error is within the tfm and dot functions. And it's almost impossible to avoid using ulv.q function, because aligning data in the stack is quite complicated!
by davidgf
Sun Sep 27, 2009 4:25 am
Forum: PSP Development
Topic: VFPU: problem with vtfm3.t
Replies: 4
Views: 5140

VFPU: problem with vtfm3.t

Hello I have a problem. I'm implementing some functions in VFPU hardware but this function: PURE_INLINE void dMULTIPLY0_331_ &#40;dReal* vout, const dReal* mat, const dReal* v&#41; &#123; __asm__ volatile &#40; "ulv.q R000, 0+ %1\n" "ulv.q R001, 16+ %1\n" "ul...
by davidgf
Mon Aug 31, 2009 10:07 pm
Forum: PSP Development
Topic: PSPGL
Replies: 1
Views: 1639

PSPGL

Hi all!
I've found some bugs in pspgl and solved. Do you know how to sumbit changes to svn? Who is the admin of the svn??

Thanks!