I'm just wondering is there is a (small) bug in psploadcore.h / sceModule definition.
Here is an extract of my code
Code: Select all
SceUID ids[512];
memset(ids, 0, 512 * sizeof(SceUID));
result = sceKernelGetModuleIdList(ids, 512 * sizeof(SceUID), &count);
if(result < 0) return result;
for(p = 0; p < count; p++)
{
SceModule* mod = sceKernelFindModuleByUID(ids[p]);
if(mod)
{
pspDebugScreenSetTextColor(0x000000FF);
fdprintf(log_fd, "sceModule #%3d , @ %p, %s\n", p, mod, mod->modname);
pspDebugScreenSetTextColor(0x0000FF00);
fdprintf(log_fd, "\tnext : %p\n", mod->next);
fdprintf(log_fd, "\tattribute : %04X\n", mod->attribute);
fdprintf(log_fd, "\tversion %02X/%02X\n", mod->version[0], mod->version[1]);
fdprintf(log_fd, "\tmodname : %s\n", mod->modname);
fdprintf(log_fd, "\tterminal %2X\n", mod->terminal);
fdprintf(log_fd, "\tmodid : %#010X\n", mod->modid);
fdprintf(log_fd, "\tent_top : %p\n", mod->ent_top);
fdprintf(log_fd, "\tent_size : %d\n", mod->ent_size);
fdprintf(log_fd, "\tstub_top : %p\n", mod->stub_top);
fdprintf(log_fd, "\tstub_size : %d\n", mod->stub_size);
fdprintf(log_fd, "\tentry_addr : %#010X\n", mod->entry_addr);
fdprintf(log_fd, "\tgp_value : %#010X\n", mod->gp_value);
fdprintf(log_fd, "\ttext_addr : %#010X\n", mod->text_addr);
fdprintf(log_fd, "\ttext_size : %#010X\n", mod->text_size);
fdprintf(log_fd, "\tdata_size : %#010X\n", mod->data_size);
fdprintf(log_fd, "\tbss_size : %#010X\n", mod->bss_size);
fdprintf(log_fd, "\tnsegment : %#010X\n", mod->nsegment);
...
- sceModule # 0 , @ 88011794, sceSystemMemoryManager
next : 8801169c
attribute : 1007
version 02/01
modname : sceSystemMemoryManager
terminal 0
modid : 0X0022EF33
ent_top : 8800d474
ent_size : 112
stub_top : 8800d4ec
stub_size : 0
entry_addr : 0XFFFFFFFF
gp_value : 0X8800B6A8
text_addr : 0X88017860
text_size : 0X88000000
data_size : 0X0000F338
bss_size : 0X0000052C
nsegment : 0X000005A8
segmentaddr[0] : 0X00000002
segmentsize[0] : 0000000000
segmentaddr[1] : 0X88000000
segmentsize[1] : 0X0000F340
segmentaddr[2] : 0X8800F340
segmentsize[2] : 0X0000052C
segmentaddr[3] : 0000000000
segmentsize[3] : 0000000000
segmentaddr[4] : 0000000000
segmentsize[4] : 0000000000
Code: Select all
/** Describes a module. This structure could change in future firmware revisions. */
typedef struct SceModule {
struct SceModule *next;
unsigned short attribute;
unsigned char version[2];
char modname[27];
char terminal;
unsigned int unknown1;
unsigned int unknown2;
SceUID modid;
unsigned int unknown3[4];
void * ent_top;
unsigned int ent_size;
void * stub_top;
unsigned int stub_size;
unsigned int unknown4[4];
unsigned int entry_addr;
unsigned int gp_value;
unsigned int text_addr;
unsigned int text_size;
unsigned int data_size;
unsigned int bss_size;
unsigned int nsegment;
unsigned int segmentaddr[4];
unsigned int segmentsize[4];
} SceModule;
- sceModule # 0 , @ 88011794, sceSystemMemoryManager
next : 8801169c
attribute : 1007
version 02/01
modname : sceSystemMemoryManager
terminal 0
modid : 0X0022EF33
ent_top : 8800d474
ent_size : 112
stub_top : 8800d4ec
stub_size : 0
entry_addr : 0X8800B6A8
gp_value : 0X88017860
text_addr : 0X88000000
text_size : 0X0000F338
data_size : 0X0000052C
bss_size : 0X000005A8
nsegment : 0X00000002
segmentaddr[0] : 0X88000000
segmentsize[0] : 0X0000F340
segmentaddr[1] : 0X8800F340
segmentsize[1] : 0X0000052C
Thanks
LEROY