Advertising
Some help about HBL basics
Forum rules
This forum is for HBL Development discussions ONLY. For User support or HBL general discussions, go to viewforum.php?f=3 . Messages that are not development related will be deleted.
This forum is for HBL Development discussions ONLY. For User support or HBL general discussions, go to viewforum.php?f=3 . Messages that are not development related will be deleted.
Re: Some help about HBL basics
The reason I don't use the StaticLoader is that it requires to rebuild the Loader based on the ELF extracted stubs, and I didn't have the knowledge to change that into something I could use without the need of compilation every time.
Re: Some help about HBL basics
Nice job, Libre!
A bit of off-topic: In fact I think it shouldn't be too hard to write a static ELF to PRX converter. I already thought about it, but I don't have the mood or the time to code it...
EDIT: sections containing static pointers would be the hardest part in fact...
A bit of off-topic: In fact I think it shouldn't be too hard to write a static ELF to PRX converter. I already thought about it, but I don't have the mood or the time to code it...
EDIT: sections containing static pointers would be the hardest part in fact...
Advertising
I wanna lots of mov al,0xb
"just not into this RA stuffz"
"just not into this RA stuffz"
Re: Some help about HBL basics
It would be nice to have a working ELF to PRX converter.
My main goal was to add the support for ELFs to my hb encrypter, and that's the reason why I was looking for a way to use HBL as a built in loader, with every HBL dependencies along with the targeted hb stored in one single EBOOT.
By the way, in the process of cleaning my code, I encountered a weird issue in the launcher in main.c.
This code works fine :
This code crashes :
It's weird since thoses functions worked fine in the original main.c, and they do work fine in h.bin and hbl.bin.
The obvious reason is that I'm blind and can't see that I'm doing something wrong.
Edit : The dgblog says
Maybe my script exporting function addresses is buggy.
My main goal was to add the support for ELFs to my hb encrypter, and that's the reason why I was looking for a way to use HBL as a built in loader, with every HBL dependencies along with the targeted hb stored in one single EBOOT.
By the way, in the process of cleaning my code, I encountered a weird issue in the launcher in main.c.
This code works fine :
Code: Select all
u32 pos; // offset of the psar section
PSAR_LISTING listing; // a listing in the psar file
FILE *fp = fopen("EBOOT.PBP","rb");
if (fp == 0)
{
sceKernelExitGame();
return 0;
}
fseek(fp, 0x24, SEEK_SET); // go to EBOOT header containing PSAR offset
fread(&pos, sizeof(u32), 1, fp); // read the PSAR offset
fseek(fp, pos + sizeof(PSAR_HEADER), SEEK_SET); // go to the first listing offset after the header
fread(&listing, sizeof(PSAR_LISTING), 1, fp); // read the first listing (should be h.bin infos)
fseek(fp, pos + listing.offset, SEEK_SET); // go to h.bin offset in PSAR
fread((void *)0x09000000,listing.size, 1, fp); // copy h.bin to memory
fclose(fp);
Code: Select all
u32 pos; // offset of the psar section
PSAR_LISTING listing; // a listing in the psar file
SceUID file = sceIoOpen("EBOOT.PBP", PSP_O_RDONLY, 0777);
if (file < 0) // Error reading file
{
sceKernelExitGame();
return 0;
}
sceIoLseek(file, 0x24, PSP_SEEK_SET); // go to EBOOT header containing PSAR offset
sceIoRead(file, &pos, sizeof(u32)); // read the PSAR offset
sceIoLseek(file, pos + sizeof(PSAR_HEADER), PSP_SEEK_SET); // go to the first listing offset after the header
sceIoRead(file, &listing, sizeof(PSAR_LISTING)); // read the first listing (should be h.bin infos)
sceIoLseek(file, pos + listing.offset, PSP_SEEK_SET); // go to h.bin offset in PSAR
sceIoRead(file, (void *)0x09000000, listing.size); // copy h.bin to memory
sceIoClose(file); // close the file
The obvious reason is that I'm blind and can't see that I'm doing something wrong.
Edit : The dgblog says
Code: Select all
ERROR FILE CONTAINS MORE IMPORTS THAN BUFFER SIZE
Re: Some help about HBL basics
Maybe because sceIoLseek changed: viewtopic.php?p=28557#p28557
I wanna lots of mov al,0xb
"just not into this RA stuffz"
"just not into this RA stuffz"
Re: Some help about HBL basics
But they cannot change the user mode export because it would break any existing game. The additional parameter can only be relevant for kernel mode modules imho.m0skit0 wrote:Maybe because sceIoLseek changed: viewtopic.php?p=28557#p28557
Re: Some help about HBL basics
Nice work. I suggest you publish it on the "Homebrews" section
I wanna lots of mov al,0xb
"just not into this RA stuffz"
"just not into this RA stuffz"
Re: Some help about HBL basics
Oh man this is fantastic !