loading an irx from ee memory
loading an irx from ee memory
EDIT: Problem Solved :)
Last edited by Ramja on Tue Dec 16, 2008 6:22 am, edited 1 time in total.
IOP module loading from EE memory is not supported in the BIOS modules by default, you need to use the sbv patches library in PS2SDK which enables it by patching the running modules.
You can check my mplus loader source as a reference on how to use sbv:
http://lukasz.dk/2008/04/22/datel-memory-plus-64-mb/
You can check my mplus loader source as a reference on how to use sbv:
http://lukasz.dk/2008/04/22/datel-memory-plus-64-mb/
hi thanks for the reply
the same thing still happens.
here is wat my files look like nw:
main.c
Makefile:
the same thing still happens.
here is wat my files look like nw:
main.c
Code: Select all
#include <tamtypes.h>
#include <debug.h>
#include <fileio.h>
#include <iopcontrol.h>
#include <kernel.h>
#include <loadfile.h>
#include <sbv_patches.h>
extern u32 ps2ips_irx;
extern u32 size_ps2ips_irx;
int main()
{
int ret;
init_scr();
SifLoadFileInit();
SifExecModuleBuffer(&ps2ips_irx, &size_ps2ips_irx, 0, NULL, &ret);
scr_printf("Module Loaded");
SleepThread();
}
Makefile:
Code: Select all
EE_BIN = test.elf
EE_OBJS = test.o ps2ips.o
EE_LDFLAGS = -s -Ttext 0x01800000 # Load ELF at 24 MB offset
EE_LIBS += -lps2ip -lc -ldebug -lpatches
EE_CFLAGS = -DRESETIOP #-DDEBUG
all: $(EE_BIN)
clean:
rm -f $(EE_BIN) ORG_$(EE_BIN) $(EE_OBJS) ps2ips.s
ps2ips.s:
bin2s ps2ips.irx ps2ips.s ps2ips_irx
$(EE_BIN) : $(EE_OBJS)
$(EE_CC) -mno-crt0 -T$(PS2SDK)/ee/startup/linkfile $(EE_LDFLAGS) \
-o ORG_$(EE_BIN) $(EE_OBJS) $(EE_LIBS)
ps2-packer-lite ORG_$(EE_BIN) $(EE_BIN)
include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal
You havn't called the patch function sbv_patch_enable_lmb
Check the header sbv header:
sbv_patches.h
Check the header sbv header:
sbv_patches.h
greetings lukasz,
we still have no luck.
Thanks agan
we still have no luck.
Thanks agan
Code: Select all
int main()
{
init_scr();
scr_printf(" Loading Modules...\n");
int ret;
SifLoadFileInit();
sbv_patch_enable_lmb();
SifExecModuleBuffer(&ps2ips_irx, &size_ps2ips_irx, 0, NULL, &ret);
scr_printf(" Loaded Modules...\n");
}
You need to load some modules before ps2ip.irx. SifExecModuleBuffer in your case probably returns -203, which is a dependency error.
As suggested in this thread, take a look at existing source code and go from there.
You need to research more on your own, look at existing source code etc. Instead of asking very basic questions you can easily find the answer for yourself, because eventually people will just stop caring and answering them :-)
As suggested in this thread, take a look at existing source code and go from there.
You need to research more on your own, look at existing source code etc. Instead of asking very basic questions you can easily find the answer for yourself, because eventually people will just stop caring and answering them :-)