Search found 125 matches

by PeterM
Fri Jan 26, 2007 8:24 am
Forum: PSP Development
Topic: Calling operator new freezes psp!
Replies: 1
Views: 1437

Is it a class which allocates a lot of memory in its constructor? (Or one which contains a large array?)

More debugging needed unfortunately...
by PeterM
Wed Jan 17, 2007 5:55 am
Forum: PSP Development
Topic: streaming mp3 :)
Replies: 25
Views: 7548

Ahh! It sounds like you know what you're talking about then. Sorry about that - I assumed you were new and out of your depth. Guess I made an ass out of myself there. Sorry again. If I understand you correctly, you're having problems with function pointers, is that right? They're indeed one of the d...
by PeterM
Wed Jan 17, 2007 4:37 am
Forum: PSP Development
Topic: streaming mp3 :)
Replies: 25
Views: 7548

I'm sorry but i just don't get it :( i have this: static void fillOutputBuffer(void* buffer, unsigned int samplesToWrite, void* userData) { // Where are we writing to? Sample* destination = (Sample*)buffer; if (pausesong == 1) { //co...
by PeterM
Tue Jan 16, 2007 10:43 pm
Forum: PSP Development
Topic: streaming mp3 :)
Replies: 25
Views: 7548

For pausing, you should probably leave the decode() function as it is, and concentrate on the fillOutputBuffer() function.

You want to fill the output buffer with zeroes if the music is paused, instead of the whole mp3 decoding while loop.
by PeterM
Mon Jan 15, 2007 6:51 am
Forum: PSP Development
Topic: streaming mp3 :)
Replies: 25
Views: 7548

You probably don't want to stop the callback as such, but look into passing messages from your main thread to the callback thread. Note that multi threaded programming is perhaps not for the uninitiated. BTW, since the buffer will play continuously, you should fill it with zeroes if the player is pa...
by PeterM
Sun Jan 14, 2007 5:01 am
Forum: PSP Development
Topic: streaming mp3 :)
Replies: 25
Views: 7548

Woops, shows how often I check this board :-)

If you need any more info about how the MP3 code works just reply. I've subscribed to this thread so I'll get an email.
by PeterM
Tue Aug 22, 2006 7:39 pm
Forum: PSP Development
Topic: dynamic memory allocation with realloc
Replies: 3
Views: 1407

Why not use a std::vector of pointers?
http://www.sgi.com/tech/stl/Vector.html
by PeterM
Mon Aug 14, 2006 8:05 am
Forum: PSP Development
Topic: Optimizing the GU (how to get best performances)
Replies: 12
Views: 7130

Yep, I couldn't remember the exact function names, sorry.
by PeterM
Mon Aug 14, 2006 3:24 am
Forum: PSP Development
Topic: Optimizing the GU (how to get best performances)
Replies: 12
Views: 7130

There are also two nearly identical functions to get the controller state - but one waits for the vblank.

sceCtrlPeekPadData() vs sceCtrlReadPadData() or something like it.
by PeterM
Mon Aug 07, 2006 1:03 am
Forum: PSP Development
Topic: sceGuDrawArray Emulation
Replies: 2
Views: 1404

Hello, I don't know what isn't working, but here are some suggestions: * You may need to convert the vertices to a format supported by OpenGL (whatever is represented by vtype -> GL_FLOAT). 2D vertices will be difficult. * Make sure the primitive type is converted to one which GL recognises. Have fu...
by PeterM
Tue Jul 25, 2006 6:33 pm
Forum: PSP Lua Player Development
Topic: table instances
Replies: 10
Views: 5390

Take this with a huge rock of salt since I'm not a Lua programmer.

Does lua handle non-POD (Plain Old Data) types by reference? If so...

Code: Select all

Row[1] = block1
Row[2] = block1
...would make both rows share the same block1. So you'd have to make a copy somehow.
by PeterM
Sun Jul 16, 2006 8:22 pm
Forum: PSP Development
Topic: some trouble with libmad [resolved]
Replies: 4
Views: 1302

It's to do with how the linker sorts out dependencies.

libpspaudiolib depends on libpspaudio, so it needs to go first. Which is a bit silly, but hey...
by PeterM
Sun Jul 16, 2006 6:24 pm
Forum: PSP Development
Topic: some trouble with libmad [resolved]
Replies: 4
Views: 1302

Try specifying your libraries in a different order when linking - try putting -lpspaudiolib before -lpspaudio?

Hopefully it'll work...
by PeterM
Thu Jun 15, 2006 11:46 pm
Forum: PSP Development
Topic: Crash When Calling Accessor
Replies: 17
Views: 4060

Not if it's just returning a reference, but yes if you dereference that reference.
by PeterM
Thu Jun 15, 2006 11:03 pm
Forum: PSP Development
Topic: Crash When Calling Accessor
Replies: 17
Views: 4060

Hmm weird one. Is the 'this' pointer null?
by PeterM
Mon Jun 05, 2006 10:25 am
Forum: PSP Development
Topic: More efficient: pointer to structures data types or dynamic
Replies: 6
Views: 1850

Neat.
by PeterM
Mon Jun 05, 2006 8:15 am
Forum: PSP Development
Topic: More efficient: pointer to structures data types or dynamic
Replies: 6
Views: 1850

That's if the screen pointer is already in a register though, right?
by PeterM
Mon Jun 05, 2006 2:00 am
Forum: PSP Development
Topic: More efficient: pointer to structures data types or dynamic
Replies: 6
Views: 1850

screen->x will be slower than screen.x due to the pointer indirection.

HOWEVER, you probably don't want to pass large structures around by value as function arguments just so you can skip some indirection in the function.
by PeterM
Sat May 27, 2006 4:11 am
Forum: PSP Development
Topic: Undiluted Platinum: World's first PSP Modchip!
Replies: 2
Views: 2807

Good news, if it works and is affordable.

Hopefully it's not possible to use it for pirating purposes, just for hobby coding.
by PeterM
Sun May 14, 2006 5:57 am
Forum: PSP Development
Topic: Shocking Speeds!
Replies: 3
Views: 1547

Also try sceCtrlPeekBufferPositive instead of sceCtrlReadBufferPositive.

(Note, I'm not at my own PC right now, so hopefully those function names are correct).
by PeterM
Wed May 10, 2006 7:32 pm
Forum: PSP Development
Topic: FRONTIER 1337 - a port of FRONTIER: Elite II for PSP
Replies: 53
Views: 26941

-O3 provided a visible speed-up over -O2 and -Os in Quake, but I accept that it doesn't guarantee better performance for other projects.

So Quake is definitely one of the "very best of cases" ;-)
by PeterM
Sat May 06, 2006 6:57 pm
Forum: PSP Development
Topic: FRONTIER 1337 - a port of FRONTIER: Elite II for PSP
Replies: 53
Views: 26941

Have you tried compiling with -Os, -O2 or -O3 if that doesn't break it?

Also, is 8MB the stripped exe?
by PeterM
Mon May 01, 2006 6:20 pm
Forum: PSP Development
Topic: FRONTIER 1337 - a port of FRONTIER: Elite II for PSP
Replies: 53
Views: 26941

Could be trying to free a null pointer?
by PeterM
Sun Apr 30, 2006 5:05 am
Forum: PSP Development
Topic: Platform 2d for PSP
Replies: 7
Views: 2320

Scrolling's not so bad, you just offset your blits by the camera position.

Collision can be a paint though, especially if you support slopes.

Check out a relevant tutorial here:
http://jnrdev.72dpiarmy.com/
by PeterM
Sun Apr 30, 2006 1:17 am
Forum: PSP Development
Topic: Platform 2d for PSP
Replies: 7
Views: 2320

Excellent, sounds like you're experienced enough. Sorry, there are so many newbie posts nowadays... I did not mean to offend. I would go for a top-down approach, then you should find that what you need to do becomes apparent as you need it. Start off with the high level logic flow - initialisation, ...
by PeterM
Sat Apr 29, 2006 11:47 pm
Forum: PSP Development
Topic: c++ question
Replies: 4
Views: 1384

You really need to learn programming on a PC before going for the PSP. Otherwise you're letting yourself in for lots of pain and late nights.

Try googling for "C++ FAQ Lite", "Thinking in C++" to learn C++.
by PeterM
Sat Apr 29, 2006 11:44 pm
Forum: PSP Development
Topic: Platform 2d for PSP
Replies: 7
Views: 2320

Sounds like you're in over your head.

Do you know how to program?
Do you know how to program games for a PC?
Do you know how to program for the PSP?

I would solve these problems in that order.
by PeterM
Fri Apr 28, 2006 11:49 pm
Forum: PSP Development
Topic: FRONTIER 1337 - a port of FRONTIER: Elite II for PSP
Replies: 53
Views: 26941

I care, I care! I would recommend replacing the missing functions with appropriate (usually empty) stubs just to get it compiling. By the sounds of it, you've got a lot of code there. With the PSP being as tricky to code for as it is, and you being as new to this as you are, you need to get a simple...
by PeterM
Mon Apr 24, 2006 6:01 pm
Forum: PSP Development
Topic: Boost libraries
Replies: 5
Views: 2354

I've never used them on PSP, but I would be interested on hearing how you get on. From my experience of Boost, much of it should be able to be used isntantly. That is, the parts which don't require building. Shared pointers, and so on. Things like Serialisation, Threads, however will require buildin...
by PeterM
Tue Apr 18, 2006 11:35 pm
Forum: PSP Development
Topic: Current working dir?
Replies: 6
Views: 2979

You can get the current dir using the getcwd function. I think it lives in unistd.h, but I'm not sure.