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

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

Moderators: cheriff, TyRaNiD

Post Reply
ADePSP
Posts: 58
Joined: Thu Jul 13, 2006 9:07 pm

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

Post by ADePSP »

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
adrahil
Posts: 274
Joined: Thu Mar 16, 2006 1:55 am

Post by adrahil »

-_-''
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...
ADePSP
Posts: 58
Joined: Thu Jul 13, 2006 9:07 pm

Post by ADePSP »

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...
adrahil
Posts: 274
Joined: Thu Mar 16, 2006 1:55 am

Post by adrahil »

:)
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 ^^
ADePSP
Posts: 58
Joined: Thu Jul 13, 2006 9:07 pm

Post by ADePSP »

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...?
adrahil
Posts: 274
Joined: Thu Mar 16, 2006 1:55 am

Post by adrahil »

ADePSP
Posts: 58
Joined: Thu Jul 13, 2006 9:07 pm

Post by ADePSP »

Great... Thanks again mate... Very much appreciated...
ADePSP
Posts: 58
Joined: Thu Jul 13, 2006 9:07 pm

Post by ADePSP »

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: Select all

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

PSP_MODULE_INFO&#40;"PRX Test", 0x1000, 1, 0&#41;;
PSP_MAIN_THREAD_ATTR&#40;0&#41;;

int MainThread &#40;SceSize args, void *argp&#41; &#123;

  SceCtrlData pad;
  int i;
  FILE* fp;

  while &#40;1&#41; &#123;

     sceCtrlPeekBufferPositive&#40;&pad, 1&#41;;

     if &#40;pad.Buttons & PSP_CTRL_CROSS&#41; &#123;

        fp = fopen&#40;"ms0&#58;/test.txt","w+"&#41;;
        if &#40;fp&#41; &#123;
           fprintf&#40;fp,"Pressed X"&#41;;
        &#125;
        fclose&#40;fp&#41;;

     &#125;

     for &#40;i=0; i<5; i++&#41; &#123;
        sceDisplayWaitVblankStart&#40;&#41;;
     &#125;

  &#125;

  return 0;

&#125;

int module_start&#40;SceSize args, void *argp&#41; &#123;

  SceUID thid;

  thid = sceKernelCreateThread&#40;"PRX_Test", MainThread, 0x18, 0x1000, 0, NULL&#41;;
  if &#40;thid >= 0&#41; sceKernelStartThread&#40;thid, args, argp&#41;;

  return 0;

&#125;

int module_stop&#40;void&#41; &#123;

  return 0;

&#125;
Here's the makefile,

Code: Select all

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 = $&#40;CFLAGS&#41; -fno-exceptions -fno-rtti
ASFLAGS = $&#40;CFLAGS&#41;

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

PSPSDK=$&#40;shell psp-config --pspsdk-path&#41;
include $&#40;PSPSDK&#41;/lib/build.mak
and here's the exports.exp,

Code: Select all

# Define the exports for the prx

PSP_BEGIN_EXPORTS

# These four lines are mandatory &#40;although you can add other functions like module_stop&#41;
# syslib is a psynonym for the single mandatory export.

PSP_EXPORT_START&#40;syslib, 0, 0x8000&#41;

PSP_EXPORT_FUNC&#40;module_start&#41;
PSP_EXPORT_VAR&#40;module_info&#41;
PSP_EXPORT_FUNC&#40;module_stop&#41;

PSP_EXPORT_END

PSP_END_EXPORTS
adrahil
Posts: 274
Joined: Thu Mar 16, 2006 1:55 am

Post by adrahil »

Answered in other thread :)
Post Reply