Editing SPU Isolated Modules Reverse Engineering
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 17: | Line 17: | ||
==== only emulate ==== | ==== only emulate ==== | ||
{{keyboard|content= | {{keyboard|content=./anergistic spu_elf_name.elf}} | ||
this mode runs an elf with all the parameters and actions defined on main.c, channel.c a | this mode runs an elf with all the parameters and actions defined on main.c, channel.c a | ||
Line 24: | Line 24: | ||
terminal 1 | terminal 1 | ||
{{keyboard|content= | {{keyboard|content=./anergistic -g1234 spu_elf_name.elf}} | ||
simulate debug server in the local host on port 1234 | simulate debug server in the local host on port 1234 | ||
terminal 2 | terminal 2 | ||
{{keyboard|content= | {{keyboard|content=spu-gdb spu_elf_name.elf | ||
spu-gdb spu_elf_name.elf | (gdb)target remote :1234}} | ||
(gdb)target remote :1234 | |||
connect to the local host on port 1234 | connect to the local host on port 1234 | ||
Line 79: | Line 77: | ||
<source lang="C"> | <source lang="C"> | ||
sys_spu_initialize(1,1); | sys_spu_initialize(1,1); | ||
syscall(230, sys_spu_t *id,img &iso_spuSCEself,void *arg,0,0,0); | syscall(230, sys_spu_t *id,img &iso_spuSCEself,void *arg,0,0,0); | ||
sys_ppu_thread_create(sys_ppu_thread_t *thread_id,void* iso_spu_handler,sys_spu_t *id, 0x64, 0x1000, 2,"iso_spu_handler"); | sys_ppu_thread_create(sys_ppu_thread_t *thread_id,void* iso_spu_handler,sys_spu_t *id, 0x64, 0x1000, 2,"iso_spu_handler"); | ||
syscall(233, sys_spu_t *id,2,0,sys_interrupt_tag_t intrtag); //sys_iso_spu_create_interrupt_tag | syscall(233, sys_spu_t *id,2,0,sys_interrupt_tag_t intrtag); //sys_iso_spu_create_interrupt_tag? | ||
sys_interrupt_thread_establish(sys_interrupt_thread_handle_t *ih,sys_interrupt_tag_t intrtag,sys_ppu_thread_t t_id, | sys_interrupt_thread_establish(sys_interrupt_thread_handle_t *ih,sys_interrupt_tag_t intrtag,sys_ppu_thread_t t_id, | ||
sys_spu_t id,0); | sys_spu_t id,0); | ||
syscall(234, sys_spu_t *id,2,7); //sys_iso_spu_set_int_mask | syscall(234, sys_spu_t *id,2,7); //sys_iso_spu_set_int_mask? | ||
syscall(232, sys_spu_t *id); // | syscall(232, sys_spu_t *id); //sys_iso_spu_destroy? | ||
... | ... | ||
iso_spu_handler(...) { | iso_spu_handler(...) { | ||
syscall(237, sys_spu_t id,2,void *out1); // sys_iso_spu_get_int_stat | syscall(237, sys_spu_t id,2,void *out1); // sys_iso_spu_get_int_stat? | ||
syscall(240, void *out2, out1); // sys_iso_spu_mmio_read | syscall(240, void *out2, out1); // sys_iso_spu_mmio_read ? | ||
syscall(236, sys_spu_t id,2, out1) // sys_iso_spu_set_int_stat | syscall(236, sys_spu_t id,2, out1) // sys_iso_spu_set_int_stat? | ||
sys_interrupt_thread_eoi() | sys_interrupt_thread_eoi() | ||
} | } |