forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

prx "hello world" for cash (Help us for christ sak

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
ADePSP



Joined: 13 Jul 2006
Posts: 58

PostPosted: Wed Sep 20, 2006 10:08 am    Post subject: prx "hello world" for cash (Help us for christ sak Reply with quote

Right, i'm sick of it... I want a downloadable prx module that works with Devhook (with FULL instructions about the intergration) that just says "hello world" on the screen when you press the "note" button or whatever...

You guys are normally too busy messing about to help but i'll give you £10 (paypal only) just for a simple "Hello World" prx...

Interested...?

Look what it's come too dam it, just to do somthing so many of you know immediatly how to do...? Share it for god sake...

Is that too much to ask because if it is, that's annoying isn't it...?

Anyway, £10 to the first person who gives me a working example of a prx module that says "hello world" and works with DevHook...

ADePSP
Back to top
View user's profile Send private message
adrahil



Joined: 16 Mar 2006
Posts: 277

PostPosted: Wed Sep 20, 2006 3:34 pm    Post subject: Reply with quote

-_-''
Just get the DH sdk, and get the example module from there.... (screenshot, no?) Creating a devhook module is trivial and getting paid for it is an insult...
Back to top
View user's profile Send private message
ADePSP



Joined: 13 Jul 2006
Posts: 58

PostPosted: Thu Sep 21, 2006 1:25 am    Post subject: Reply with quote

adrahil wrote:
-_-''
Just get the DH sdk, and get the example module from there.... (screenshot, no?) Creating a devhook module is trivial and getting paid for it is an insult...


Thanks for the info... It can be so frustrating when you are learning and nobody will answer your simple questions...
Back to top
View user's profile Send private message
adrahil



Joined: 16 Mar 2006
Posts: 277

PostPosted: Thu Sep 21, 2006 1:54 am    Post subject: Reply with quote

:)
Well, in fact, creating a simple devhook module is easy... It is actually ANY module. For example take the simple prx example in the sdk, and edit it so that in main() you have a thread which starts your leet_module_main_func() and main() returns 0. This has to be done, as the loading of the firmware will not continue until the function has returned. Then, your module's main function can do pretty much what it wants, but keep in mind that writing on screen is hazardous, as the Vsh does things on its own ^^
Back to top
View user's profile Send private message
ADePSP



Joined: 13 Jul 2006
Posts: 58

PostPosted: Thu Sep 21, 2006 2:08 am    Post subject: Reply with quote

Thanks again and sorry to be a pain but I just download devhook v0.46 which includes the SDK and can't find the screenshot example anywhere...? :(

Was it distributed in an earlier version or something...?
Back to top
View user's profile Send private message
adrahil



Joined: 16 Mar 2006
Posts: 277

PostPosted: Thu Sep 21, 2006 4:54 am    Post subject: Reply with quote

http://pspdev1.com/wp-content/uploads/2006/07/screenshot.zip
Back to top
View user's profile Send private message
ADePSP



Joined: 13 Jul 2006
Posts: 58

PostPosted: Thu Sep 21, 2006 9:10 am    Post subject: Reply with quote

adrahil wrote:
http://pspdev1.com/wp-content/uploads/2006/07/screenshot.zip


Great... Thanks again mate... Very much appreciated...
Back to top
View user's profile Send private message
ADePSP



Joined: 13 Jul 2006
Posts: 58

PostPosted: Thu Sep 21, 2006 11:21 pm    Post subject: Reply with quote

I've been trying to make a simple prx that just writes to a file when you press X but when I load it with DevHook it crashes the PSP when the Playstation animation comes up...

I copied my test.prx file to the root of the memstick ms0:/test.prx and then added that line to the following DevHook files (after the /kd/isofs.prx line),

ms0://dh/260/flash0/kd/pspbtcnf.txt
ms0://dh/260/flash0/kd/pspbtcnf_game.txt

My prx did nothing before I added this to the top of the source and after I did that it started crashing...

PSP_MODULE_INFO("PRX Test", 0x1000, 1, 0);
PSP_MAIN_THREAD_ATTR(0);

Can anyone see what i'm doing wrong here... Here's the main.c file,

Code:
#include <pspctrl.h>
#include <pspkernel.h>
#include <stdio.h>

PSP_MODULE_INFO("PRX Test", 0x1000, 1, 0);
PSP_MAIN_THREAD_ATTR(0);

int MainThread (SceSize args, void *argp) {

  SceCtrlData pad;
  int i;
  FILE* fp;

  while (1) {

     sceCtrlPeekBufferPositive(&pad, 1);

     if (pad.Buttons & PSP_CTRL_CROSS) {

        fp = fopen("ms0:/test.txt","w+");
        if (fp) {
           fprintf(fp,"Pressed X");
        }
        fclose(fp);

     }

     for (i=0; i<5; i++) {
        sceDisplayWaitVblankStart();
     }

  }

  return 0;

}

int module_start(SceSize args, void *argp) {

  SceUID thid;

  thid = sceKernelCreateThread("PRX_Test", MainThread, 0x18, 0x1000, 0, NULL);
  if (thid >= 0) sceKernelStartThread(thid, args, argp);

  return 0;

}

int module_stop(void) {

  return 0;

}


Here's the makefile,

Code:
TARGET = test
OBJS = main.o

BUILD_PRX=1

USE_PSPSDK_LIBC=1
USE_PSPSDK_LIBS=1
#USE_KERNEL_LIBC=1
#USE_KERNEL_LIBS=1

PRX_EXPORTS=exports.exp

INCDIR =
CFLAGS = -Os -G0 -Wall -fno-strict-aliasing -fno-builtin-printf
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)

LIBDIR =
LDFLAGS = -mno-crt0 -nostartfiles
LIBS =

PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak


and here's the exports.exp,

Code:
# Define the exports for the prx

PSP_BEGIN_EXPORTS

# These four lines are mandatory (although you can add other functions like module_stop)
# syslib is a psynonym for the single mandatory export.

PSP_EXPORT_START(syslib, 0, 0x8000)

PSP_EXPORT_FUNC(module_start)
PSP_EXPORT_VAR(module_info)
PSP_EXPORT_FUNC(module_stop)

PSP_EXPORT_END

PSP_END_EXPORTS
Back to top
View user's profile Send private message
adrahil



Joined: 16 Mar 2006
Posts: 277

PostPosted: Fri Sep 22, 2006 4:00 am    Post subject: Reply with quote

Answered in other thread :)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group