Editing SPU Isolated Modules Reverse Engineering

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

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=<syntaxhighlight lang="bash">./anergistic spu_elf_name.elf</syntaxhighlight>}}
{{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=<syntaxhighlight lang="bash">./anergistic -g1234 spu_elf_name.elf</syntaxhighlight>}}
{{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=<syntaxhighlight lang="bash">
{{keyboard|content=spu-gdb spu_elf_name.elf  
spu-gdb spu_elf_name.elf  
(gdb)target remote :1234}}
(gdb)target remote :1234
</syntaxhighlight>}}


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); //sys_isolated_spu_create
   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);    //sys_iso_spu_start
   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 / sys_isolated_spu_read_puint_mb ?
   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()
   }
   }
Please note that all contributions to PS3 Developer wiki are considered to be released under the GNU Free Documentation License 1.2 (see PS3 Developer wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following hCaptcha:

Cancel Editing help (opens in new window)