Advertisement
Guest User

Untitled

a guest
Apr 17th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. //------------------------------------------------
  2. //--- 010 Editor v7.0.2 Script File
  3. //
  4. // File: GoToFileRomAddress.1sc
  5. // Authors: Abystus
  6. // Version: 1.0
  7. // Purpose: Use game ROM address to go to file ROM address (RevX).
  8. // Category: Conversion
  9. // History:
  10. // 1.0 Initial Release.
  11. //------------------------------------------------
  12.  
  13. // Define local variables
  14. int32 convAddress;
  15. int32 p1;
  16. int32 p2;
  17.  
  18. // Get the game address to convert
  19. convAddress = InputNumber( "Go To File RevX ROM Address", "Game ROM Address","0x");
  20. p1 = 0x100000;
  21. p2 = 0xff800000;
  22.  
  23. if( convAddress == 0 )
  24. return -1;
  25.  
  26. if( convAddress >= p2 )
  27. {
  28. convAddress = (convAddress / 8) & 0xFFFFF;
  29. convAddress = convAddress + p1;
  30. else
  31. convAddress = (convAddress / 8) & 0xFFFFF;
  32. }
  33.  
  34. StatusMessage("%X", convAddress);
  35. SetCursorPos(convAddress);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement