Nirvada

C.E CwCheat conversion to PPSSPP offset

Mar 25th, 2025
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. -- Base pointer address
  2. local basePointer = "EEmem"
  3.  
  4. -- List of offsets (example values provided, replace with actual offsets)
  5. local offsets = {
  6. "010377A4",
  7. }
  8.  
  9. -- Offset addition (0x08800000 in decimal)
  10. local additionalOffset = 0x08800000
  11.  
  12. -- Iterate through each offset and create a memory record
  13. for i, offset in ipairs(offsets) do
  14. local memrec = getAddressList().createMemoryRecord()
  15. memrec.Description = "Offset " .. i
  16.  
  17. -- Set the base address
  18. memrec.Address = basePointer
  19.  
  20. -- Mark as pointer
  21. memrec.IsPointer = true
  22.  
  23. -- Set the number of offsets
  24. memrec.OffsetCount = 1 -- Assuming one offset per memory record
  25.  
  26. -- Convert the offset from hex to decimal and add additionalOffset
  27. local decimalOffset = tonumber(offset, 16)
  28. if decimalOffset == nil then
  29. print("Error converting offset: " .. offset)
  30. else
  31. -- Add additionalOffset
  32. decimalOffset = decimalOffset + additionalOffset
  33.  
  34. print("Hex Offset: " .. offset .. " | Final Hex: " .. string.format("%X", decimalOffset))
  35. memrec.Offset[0] = decimalOffset -- Set the offset value
  36. end
  37.  
  38. -- Set the value type (e.g., vtDword)
  39. memrec.Type = vtDword -- vtByte = 00 | vtWord = 0000 | vtDword = 00000000 | vtQword = 0000000000000000
  40.  
  41. -- Display address in hexadecimal format or switch to false for Decimal
  42. memrec.ShowAsHex = true
  43. end
Advertisement
Add Comment
Please, Sign In to add comment