Error 800200D9 when try to start a user app converted...

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

Moderators: cheriff, TyRaNiD

Post Reply
darkness
Posts: 121
Joined: Sun Jun 15, 2008 8:42 pm

Error 800200D9 when try to start a user app converted...

Post by darkness »

Hi,
I've try to port my hb in kernel mode, and using PSP_MAIN_THREAD_ATTR(PSP_THREAD_ATTR_USER);
set the main thread to user mode...
But when I launch the hb I've error 800200D9!
(failed to allocate memory block)
Why?
I think makefile is useful:

Code: Select all

TARGET = explorer
OBJS = main.o osk.o framebuffer.o graphics.o general.o

BUILD_PRX = 1
PSP_FW_VERISION = 380

CFLAGS = -O2 -G0 -Wall -g
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)

LIBS =  -lpspgum -lpspgu -lpng -lz -lm -lpspumd -lpspusb -lpspusbstor -lpsppower -lpsprtc -lpspusbdevice -lpspsystemctrl_user
LDFLAGS =

EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = dfsdaadfsdfadfafdasfd

include $(PSPSDK)/lib/build.mak
Pirata Nervo
Posts: 409
Joined: Tue Oct 09, 2007 4:22 am

Post by Pirata Nervo »

you do not have your psp 1.50 kernel enabled or you are putting your homebrew in the wrong folder (if you have 1.50 kernel plugin installed)
Image
Upgrade your PSP
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

When you have BUILD_PRX = 1 in the makefile, you need to specify the heap size or you're stuck with 64K.

I use

Code: Select all

PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER);
PSP_HEAP_SIZE_KB(-1024);
Note that the negative heap size tells how much memory to leave to the PSP, not how much to allocate to the app, and requires a very new toolchain, so if you haven't updated in a while, do so.
User avatar
Wally
Posts: 663
Joined: Mon Sep 26, 2005 11:25 am

Post by Wally »

is there any reason why that this cant be a preset in the SDK but then we can override it if we need to?
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

The current code in newlib specifically sets PRXs to 64KB unless some value is set. I think that was for people doing plugins and libs, but now with 3.xx user-mode, apps are now PRXs too, so maybe the default needs to change.
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

No it doesn't because something like that would be a serious breaking change.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

TyRaNiD wrote:No it doesn't because something like that would be a serious breaking change.
True, plus since the author clearly has to make changes to make an app run as 3.xx user prx, it SHOULD be no trouble for them to add a heapsize to the app at the same time. So I guess leaving it as is would be the best thing.
Post Reply