QJ.NET | Videos | Forums | iPhone | MMORPG | Nintendo DS | Wii | PlayStation 3 | PSP | Xbox 360 | PC | Downloads | Contact Us
Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact

QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides

Go Back   QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides > Developers Corner > PSP Development, Hacks, and Homebrew > PSP Development Forum
The above video goes away if you are a member and logged in, so log in now!

Ermwtf... Compiling 1.5 code for CFW?

This is a discussion on Ermwtf... Compiling 1.5 code for CFW? within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; OK so I want to compile RIN/GB for CFW natively. I've gotten MinPSPSDK installed and working, and I can compile, ...

Reply
 
LinkBack Thread Tools
Old 11-04-2009, 04:29 PM   #1
 
 
Join Date: Apr 2009
Real First Name: Morgan
Location: Around black mesa.
Just Played: SMB
Posts: 83
Trader Feedback: 0
Default Ermwtf... Compiling 1.5 code for CFW?

OK so I want to compile RIN/GB for CFW natively.

I've gotten MinPSPSDK installed and working, and I can compile, but when I launch it it tells me that the PRX type is invalid. This is classically caused by OFW homebrew being run on CFW... Which begs me to ask, is there a way to make PSP-GCC compile for CFW and not OFW if there's OFW (1.5) calls? I know its mostly a straight 1-1 mapping of changes, but I'd still like to know if there's a simple way to make life simple.

Nevermind the version, sorry. PSPSDK 0.9+ define "isatty" via newlib. adding an #if __Bad_Glibc_bad and an #endif solved the problem. Still cant run the damn thing.

Whats the simplest way to 'make work' a 1.5 designed homebew in a 5.00 context?

AAUAHG!

Last edited by indrora; 11-04-2009 at 05:11 PM..
indrora is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-04-2009, 05:25 PM   #2
Developer
 
Zack_PSP's Avatar
 
My Mood: Happy
Join Date: May 2009
Real First Name: wouldn't you like to know lol
Location: Ireland
Just Played: Nothing
Posts: 74
Trader Feedback: 0
Default

You have to define a heap-size in the code and also add a few lines to the makefile.

I can't post them now because i'm off to bed but its simple.
__________________

My Releases :



^-------------------------^

^-------------------------^

Zack_PSP is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-05-2009, 06:03 AM   #3
 
 
Join Date: Apr 2009
Real First Name: Morgan
Location: Around black mesa.
Just Played: SMB
Posts: 83
Trader Feedback: 0
Default

Well at this point I've slowly migrated the HORRIBLE EVIL MOJIBAKE INFESTED MAKEFILE to the standard PSPSDK makefile, and things are *starting* to move forward... kindof.

What I'm facing mostly is a major issue with the fact that many, MANY of the things that have been used within it rely on a magic file called "syscall.h" -- of which I've had to wrap many functions in the appropriate "IFDEF _FILE_H ENDIF" blocks.

But its starting to compile! Not exactly run, but Compile nonetheless.

I'm getting the following problems from make and gcc now:
Code:
main.c: In function 'power_callback':
main.c:100: warning: passing argument 2 of 'sceKernelCreateCallback' from incompatible pointer type
main.c: In function 'CallbackThread':
main.c:110: warning: passing argument 2 of 'sceKernelCreateCallback' from incompatible pointer type
main.c:112: warning: passing argument 2 of 'sceKernelCreateCallback' from incompatible pointer type
main.c: In function 'SetupCallbacks':
main.c:127: warning: passing argument 2 of 'sceKernelCreateThread' from incompatible pointer type
psp-gcc -I. -IC:/pspsdk/psp/sdk/include -G0 -Wall  -D_PSP_FW_VERSION=371   -c -o pg.o pg.c
pg.c: In function 'pgaInit':
pg.c:915: warning: passing argument 2 of 'sceKernelCreateThread' from incompatible pointer type
The referenced lines look perfectly valid according to SDK samples...
Code:
int SetupCallbacks(void)
{
	int thid = 0;
	
	// Set up the update thread (translated from mojibake)
	// PATCH: New Pspsdk uses a pointer. Set null!                                VVVV
	thid = sceKernelCreateThread("update_thread", CallbackThread, 0x11, 0xFA0, 0, NULL);
	if(thid >= 0)
		sceKernelStartThread(thid, 0, 0);
	
	return thid;
}

Last edited by indrora; 11-05-2009 at 07:05 AM..
indrora is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-05-2009, 09:27 AM   #4
 
 
Join Date: Apr 2009
Real First Name: Morgan
Location: Around black mesa.
Just Played: SMB
Posts: 83
Trader Feedback: 0
Default

righto so looking through the examples, I've found something:
it appears I need to reference pspthreadman.h?

edit!!!
It looks like I'm not casting the function to a Void* using:
Code:
thid = sceKernelCreateThread("update_thread", (void *) CallbackThread, 0x11, 0xFA0, 0, NULL);

Has anyone else patched the RIN for 3.00+ firmware?

Last edited by indrora; 11-05-2009 at 09:42 AM..
indrora is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
cfw , code , compiling , ermwtf , translation

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -8. The time now is 09:59 PM.



Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © 2009, QJ.NET. All Rights Reserved.
Contact Us