Yosh

Auto-savepath loader

Jul 18th, 2012
497
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .set noat
  2. .set noreorder
  3.  
  4.  
  5. .data
  6.  
  7. path: .asciiz "ms0:/PSP/SAVEDATA/XXXXXXXXX/h.bin"
  8. umd: .asciiz "disc0:/UMD_DATA.BIN"
  9.  
  10.  
  11.  
  12. .text
  13.  
  14. start:
  15.         lui $s0, 0x0900
  16.         move    $s2, $ra    /* Assuming start code address is stored in $ra */
  17.        
  18.        
  19.     UmdPathFix:
  20.         addiu   $s3, $s2, path
  21.         addiu   $a0, $s2, umd
  22.         li  $a1, 1
  23.         jal sceIoOpen
  24.         li  $a2, 31
  25.         move    $s1, $v0
  26.         move    $a0, $v0
  27.         addiu $a1, $s3, 18  /* go to gameid beginning */
  28.         jal sceIoRead
  29.         li  $a2, 5          /* read 5 first char */
  30.         move    $a0, $s1
  31.         addiu $a1, $s3, 22  /* go to gameid nb */
  32.         jal sceIoRead
  33.         li  $a2, 5          /* read 5 nb char */
  34.         jal sceIoClose
  35.         move    $a0, $s1
  36.        
  37.        
  38.     Loader:
  39.         move    $a0, $s3
  40.         li  $a1, 1
  41.         jal sceIoOpen
  42.         li  $a2, 31
  43.         move    $s1, $v0
  44.         move    $a0, $v0
  45.         move    $a1, $s0
  46.         jal sceIoRead
  47.         lui $a2, 1
  48.         jal sceIoClose
  49.         move    $a0, $s1
  50.  
  51.         jal sceKernelDcacheWritebackInvalidateAll
  52.         nop
  53.  
  54.         jr  $s0
  55.         nop
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×