Library needed for sceGeEdramSetSize?

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

Moderators: cheriff, TyRaNiD

MDave
Posts: 82
Joined: Mon May 09, 2005 10:43 pm

Post by MDave »

It's what happens when you try to get cygwin working on multiple drives on multiple window OS's :P

I'm having problems figuring out why the psp crashes if I have a byte over 1.75MB, yet the same code works fine on the PC version. It's probably a very easy fix, since I think I'm getting blind from looking at the same bits of code all the time :P Unless its a psp specific problem. Crashes even on a slim psp with the extra ram, so I'm doubtful its a limited ram issue.

The code is here:

video_hardware_draw.cpp

and here is another piece related to it.

video_hardware_surface.cpp

I will be very grateful if anyone can see where the problem is! Thanks.
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

Just a random thought while glancing over the code...

Maybe the crash isn't because of the massive global array, but with how this array is indexed or used etc.

As a test I would suggest leaving the MAX_LIGHTMAPS as is as 28, and just declare the array something like...

Code: Select all

byte		lightmaps[1835008 + 10]; // If the total amount of bytes exceeds 1835008
If that works, then hard code whatever size it is that you require and try that too.

I have a sneaky feeling your crash has nothing to do with the size of your lightmaps variable, but with how it's used after that point.
MDave
Posts: 82
Joined: Mon May 09, 2005 10:43 pm

Post by MDave »

I think I might be wrong about the 1835008, it looks to be higher then that now if I set it manually. It seems to be more about 2622152 before I get a black screen. What I would ideally need is 4194304 to display all the lightmaps in a map.

Something perculier happens if I start using more then 1835008 though! Some sounds don't play anymore, and at 2622152, no sounds play.

I guess its overwriting some of the quake heap. And the more I use, it must start using up memory thats needed to run the game. Heap size is 40MB though. Any idea on how to solve that? :P Thanks for the help so far!
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

Try playing with the size you're setting for the heap, initially I would decrease it - then try increasing it.

See if that makes any difference.
MDave
Posts: 82
Joined: Mon May 09, 2005 10:43 pm

Post by MDave »

hmm, no difference, except it freezes during loading if I set the heap too high. (the quake heap, not the psp app heap).
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

I was unaware that there was a internal Quake heap.

How is it allocated?
MDave
Posts: 82
Joined: Mon May 09, 2005 10:43 pm

Post by MDave »

It'll be easier for me to explain if shown you this:

main.cpp
Post Reply