My mistake. Thats a much better method than what I posted :pZitat:
Zitat von Archaemic
Printable View
My mistake. Thats a much better method than what I posted :pZitat:
Zitat von Archaemic
Argh, thats so simple... I was expecting something complex...Zitat:
Zitat von Archaemic
Well anyway, I was using strrchr when I was crashing, I guess I'll take another look at using it.
-Aura
Ok, I have my code sort of working, I can drop down a directory as long as its not to the root, when I try and go from, say, ms0:/PSP to ms0: I get error 80010016 because its trying to access ms0:^û?.
Sounds like you don't have a string properly terminated to me.
Back a while ago I wrote a simple memory stick file browser, its in the source code repository at psp-programming. It's not very well written or commented but maybe worth a look as it was capable of going up and down directories.Zitat:
Zitat von Auraomega
Yeah I agree, make sure the last character of the string is a null char.Zitat:
Sounds like you don't have a string properly terminated to me.
Sorry, I sorted that problem last night, but I've been having various problems with the net so I've not been able to change my post.
Thanks anyway :p
-Aura
How would I go about loading an EBOOT or a prx, when I have no idea what memory its going to be in. I've tried using sceKernelLoadModule and starting it, but at that point I crash. When using the SDK version, I can't choose between kernel and user, it has to be one or the other and I was wondering if there was a simple solution to get around that?
is it possible to write a function that when you set your psp in stand-by , it automaticly wake up after an hour or something?
Yes, not sure how though. Time Baby uses "Adrahils's alarm library", whatever that is.
no time baby doesnt wake up , just tested it
-= Double Post =-
was wrong , you are suposed to press select to activate it
You could do a psudo stand-by...Zitat:
Zitat von hallo007
Disable all the buttons, turn off the screen, underclock the PSP, turn off the volume etc etc, then using the time library, add 1 hour to that and tell it to undo everything, clock the PSP at 222mhz again or what ever.
If you want to be REALLY cleaver, I think you can also turn off the power LED, I'm not sure though as it always crashed when I attempted...
-Aura
or maybe he can ask where to find alarm library
I dont want to make a alarm , I just looking to get the psp out of standby
Well, the alarm is actually what wakes it up from standby and executes any piece of code you need straight after. My lib does not do the sound, but just calls TimeBaby's alarm function when the PSP wakes up at a given time.Zitat:
Zitat von hallo007
k , thnx
This code should let the psp load the registry files from ms0:/ but it doesn't work
any suggestions?Code:
PSP_MODULE_INFO("test", 0x1000, 1, 1);
int mainThread(SceSize argc, void* argv)
{
sceIoUnassign("flash1:");
sceIoAssign("flash1:","msstor0p1:","fatms0:",IOASSIGN_RDWR,NULL,0);
sceKernelSleepThread();
return 0;
}
int module_start(SceSize args, void *argp)
{
SceUID thid;
thid = sceKernelCreateThread("MainThread", mainThread, 0x18, 0x1000, 0, NULL);
if (thid >= 0) sceKernelStartThread(thid, args, argp);
return 0;
}
int module_stop(void)
{
return 0;
}
lol you thought it was for alarms only :)Zitat:
Zitat von hallo007
Alright, I need help (if you would, please)..
This is my code:
The first time I run the code, it will bring up one of the two menus if I put either 1 or 2 in.Code:cout << "What would you like to do?\n1: Make a teleport\n2: Make some text appear on screen\nSimply type in the number of the option you want and hit Enter!" << endl;
cin >> menu;
getchar();
Now, if I then bring up the menu, output a code, and then try to type 1 or 2 again to bring up the menu, it simply closes my window :S
Anyone help? (I'm running this on my PC, btw.)
1. Post the full code.
2. Learn how to use the debugger to source problems. The program may have crashed or there is a logic loop problem where an exit condition is given.
http://www.gamedev.net/reference/art...rticle2322.asp
Why post computer C++ code on a PSP coding forum? There are plenty of big coding forums out there.
Example:
http://www.cpplc.net/forum/index.php
Cus I <3 QJ. :P
And it isn't that much of a difference when talking about my problem.
I've just installed the PSPSDK and cygwin and successfully compiled a helloworld, but when i try to compile the PRX sample i get this error:
EDIT: NVM, fixed it.Zitat:
Zitat von Error
People will be willing to help if you show a bit of code, without it no one will know what you prob is.Zitat:
Zitat von Durka Durka Mahn
hallo007: It does not work because the flash devices are blacklisted from reassignment.
I decided to try learning how to hook functions today after putting it off for ages. I've been looking at the apiHook.c file from the PSPLink source, I'm no good at reading others source codes, and I don't think I understand any of it, or how any of it actually works.
Is there any simple peices of code out there, in which all it does is hook a single function? If not, can someone do a "Hook for dummies" sort set of instructions for me, because there seems very limited help from what I've found on internet.
Your perfect chance to treat me like a total moron and get thanked for it :ROFL:
-Aura
I need the argumetns for assign "disc0:/"
what's dev2 and dev3 for disc0:/???Code:/**
* Assigns one IO device to another (I guess)
* @param dev1 - The device name to assign.
* @param dev2 - The block device to assign from.
* @param dev3 - The filesystem device to mape the block device to dev1
* @param mode - Read/Write mode. One of IoAssignPerms.
* @param unk1 - Unknown, set to NULL.
* @param unk2 - Unknown, set to 0.
* @return < 0 on error.
*
* @par Example: Reassign flash0 in read/write mode.
* @code
* sceIoUnassign("flash0");
* sceIoAssign("flash0", "lflash0:0,0", "flashfat0:", IOASSIGN_RDWR, NULL, 0);
* @endcode
*
*/
int sceIoAssign(const char *dev1, const char *dev2, const char *dev3, int mode, void* unk1, long unk2);
Is it possible to blit images in the VSH?
I'm trying to use
but it won't work in the VSH, it just shows a white box :(Code:blitAlphaImageToScreen(0, 0, height, width, Image*, posX, posY);
Or is there some way i should do it with the GU?
Sorry if i sound nooby, i only started C a couple of days ago :(
use pspjunkie's DSX
that doesnt have function for image blitting
Vshblitter.
it has a function for blitting image DATA , hasnt it?
from read me:
"At the current point in time,
DSX has the ability to draw text to the screen and draw simple shapes."
then I was wrong
Yes you were :)Zitat:
Zitat von hallo007
nothing special :D
I didn't add images to dsxVsh because it is a waste of memory.
How exactly did you get to draw on the XMB in the first place? I'm still trying to work that out. I've taken a look at dsx, but all I've got is the library, and the header files, both of which I can't use to find this out. Just wondering if you would mind sending me something that might be helpful?Zitat:
Zitat von _dysfunctional
And can anyone tell me why this isn't working?
On PSPLink all I get is...Code:#define UMD "disc0:/PSP_GAME/SYSDIR/BOOT.BIN"
...
void load_UMD()
{
int disc, check;
SceUID module;
if(!sceUmdCheckMedium(0)) return;
check = sceUmdActivate(1, "disc0:");
printf("%d\n",check);
sceUmdWaitDriveStat(UMD_WAITFORINIT);
module = sceKernelLoadModule(UMD, 0, NULL);
printf("%x\n", module);
module = sceKernelStartModule(module, strlen(UMD)+1, UMD, NULL, NULL);
printf("%x\n", module);
}
0
800200d9 (SCE_KERNEL_ERROR_MEMBLOC K_ALLOC_FAILED)
8002012e (SCE_KERNEL_ERROR_UNKNOWN _MODULE)
Can someone explain why I might be getting the alloc error?
Thanks.
-Aura
Well, dsx was under GPL so if you found a download without the sources, I'd like to know where you downloaded it.
As for loading the UMD, it doesn't quite work like that. Look at psploadexec_kernel.h.
Hmm, I just downloaded dsx from QJ, and that has source code in it... I'm not sure where I got it originally.Zitat:
Zitat von _dysfunctional
As for the loading the UMD, I based it on the code from Moonlights Audio Recorder source, but I'll take a look at that.
Thanks.
-Aura
ok well i'm trying to learn c. and i know some but it's all very small not very important stuff, ok important but like not really useful for making something. so i've been looking at the source code of things to see if i can learn something. but i keep seeing stuff like 0x84930 or whatever ( i just made that up) what is it? like what purpose does that serve? i mainly see it in stuff that accesses the flash0 so i'm geussing it's some real advanced stuff.
Any literal in C or C++ that begins with 0x is a value in hex. These are usually used to represent a memory address.Zitat:
Zitat von COLINx86
oh ok thanksZitat:
Zitat von yaustar
And bitmasks.
Also, any literal in C or C++ (or Javascript, a fact that a lot of web developers seem to forget) that starts with a 0 is octal.