Guest User

Untitled

a guest
Jun 17th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. #define u32 unsigned int
  2. int (*sceIoOpen)(const char* file, int mode, int unknown);
  3. void (*sceIoClose)(int fd);
  4. int (*sceIoWrite)(int fd, void *data, int size);
  5.  
  6. void _start(u32 paf_addr)
  7. {
  8. //u32 vshmain_addr = _lw(paf_addr+0x1910B4)-0x111A0;
  9. sceIoOpen = (void*)(paf_addr+0x0015EE70);
  10. sceIoWrite = (void*)(paf_addr+0x0015EE40);
  11. sceIoClose = (void*)(paf_addr+0x0015EE60);
  12. int hFile;
  13. char greeting[] = "HelloWorld from TRFyuki's h.bin! -^_^-";
  14. hFile = sceIoOpen("ms0:/PSP/TRFyuki.txt", O_CREAT|O_WRONLY|O_APPEND, 0777);
  15. sceIoWrite(hFile, greeting, sizeof(greeting) );
  16. sceIoClose(hFile);
  17. main(paf_addr);
  18. return;
  19. }
  20.  
  21. int main(u32 paf_addr)
  22. {
  23. sceIoOpen = (void*)(paf_addr+0x0015EE70);
  24. sceIoWrite = (void*)(paf_addr+0x0015EE40);
  25. sceIoClose = (void*)(paf_addr+0x0015EE60);
  26. int hFile;
  27. char greeting[] = "GoodbyeWorld from TRFyuki's h.bin! -^_^-";
  28. hFile = sceIoOpen("ms0:/PSP/TRFyuki.txt", O_CREAT|O_WRONLY|O_APPEND, 0777);
  29. sceIoWrite(hFile, greeting, sizeof(greeting) );
  30. sceIoClose(hFile);
  31. return 0;
  32. }
Add Comment
Please, Sign In to add comment