Advertisement
KazoWAR

spider.h

Feb 16th, 2015
443
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.79 KB | None | 0 0
  1. #ifndef _SPIDER_H
  2. #define _SPIDER_H
  3.  
  4. #define START_SECTION __attribute__ ((section (".text.start"), naked))
  5.  
  6. // make sure code is PIE
  7. #ifndef __PIE__
  8. #error "Must compile with -fPIE"
  9. #endif
  10.  
  11. int(*GX_SetTextureCopy)(void *input_buffer, void *output_buffer, unsigned int size, int in_x, int in_y, int out_x, int out_y, int flags) = 0x0011DD48;
  12. int(*GSPGPU_FlushDataCache)(void *addr, unsigned int len) = 0x00191504;
  13. int(*svcSleepThread)(unsigned long long nanoseconds) = (void *)0x0023FFE8;
  14.  
  15. int uvl_entry();
  16. int uvl_exit(int status);
  17.  
  18. // TODO: move out into .c file
  19. int START_SECTION uvl_start() {
  20.     __asm__ volatile (".word 0xE1A00000");
  21.     uvl_entry();
  22.     __asm__ volatile ("bx lr");
  23. }
  24.  
  25. // TODO: move out into .c file
  26. int uvl_exit(int status) {
  27.     return 0;
  28. }
  29.  
  30.  
  31. #endif /* _SPIDER_H */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement