Announcement

Collapse
No announcement yet.

Cheat Engine, PSX, Linux, Wine, AOB

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cheat Engine, PSX, Linux, Wine, AOB

    Took awhile to get various PS1 emulators running in my 32-bit Wine prefix (winehq-devel Ubuntu 17.04) and hook them with Cheat Engine 6.5.1 (other versions crashed).

    With a setting of MEM-MAPPED and CopyOnWrite I was able to do an "Array of Byte" scan (AOB) for:
    Code:
    03 00 00 00 80 0C 5A 27 08 00 40 03 00 00 00 00
    Worked in every emulator I tested which includes psxfin (pSX), pcsxr, epsxe, mednafen, xebra, no$psx, retroarch. Some games would alter the AOB after awhile but it normally works if searched for right away.

    Could inject a specially formatted cheat at psx offset +10. It's just a string search for NOWBEGIN
    Code:
    [CE NOWBEGIN +10]
    80000010 4F4E
    80000012 4257
    80000014 4745
    80000016 4E49
    Anyway, the AOB provides the hex address for offset 0 into PS1 memory where one would then add 200000 (hex) and those would be the Start and Stop addresses for the "Memory Scan Options".

    Using that I fiddled with a no random battle code for Grandia SCUS_94457. Found a couple for the Japanese version of the game that work without conversion but caused some odd behavior. I think they were better codes than mine, but definitely needed a trigger. My take was the three second invulnerability timer after an enemy encounter and this is the cheat I came up with:

    PCSXR
    Code:
    [No Rnd Enc Inverse Logic]
    E10AAA0E 0010
    E00AAA0E 0011
    300AAA50 000F
    Seems like the Game-shark Action Replay require inverse logic; if not 10 check for 11 and trigger. If the value is 10, the next line (test for 11) is skipped and the cheat of AAA50 0F is executed. Only works if the trigger address of AAA0E is 10 or 11 and those values only come up when the player is in the field of battle where an enemy encounter can occur. Anywhere else, the invulnerability timer counts out almost immediately. I brute forced it because I don't know ASM and, at my age, am unlikely to ever learn it.

    Works nicely in PCSXR/ePSXe. Mednafen, RetroArch and CEP prefer a value between approach which is not GS/AR compliant best I can tell.

    RetroArch
    Code:
    cheat20_desc = "No Rnd Enc Between"
    cheat20_code = "E30AAA0E+000F+E20AAA0E+0012+300AAA50+000F"
    cheat20_enable = false
    Mednafen
    Code:
    R I 1 L 0 000aaa50 0f No Rnd Enc Between
    1 L 0x000aaa0e > 0x0f, 1 L 0x000aaa0e < 0x12
    The explicit version works in all cases:
    Code:
    [No Rnd Enc Explicit]
    E00AAA0E 0010
    300AAA50 000F
    E00AAA0E 0011
    300AAA50 000F
    
    cheat18_desc = "No Rnd Enc Explicit"
    cheat18_code = "E00AAA0E+0010+300AAA50+000F+E00AAA0E+0011+300AAA50+000F"
    cheat18_enable = false
    
    R I 1 L 0 000aaa50 0f No Rnd Enc Explicit A
    1 L 0x000aaa0e == 0x10
    R I 1 L 0 000aaa50 0f No Rnd Enc Explicit B
    1 L 0x000aaa0e == 0x11
    Last edited by noabody; 11-19-2017, 10:13:22 AM.

  • #2
    Can someone confirm the proper handling of GS/AR comparison E/D type codes. According to this https://gamehacking.org/wiki/Code_Types_(Playstation) each test affects the next code. It doesn't say that each test affects the next line of code which isn't a test E/D.

    What I'm observing in some emulators is this behavior:

    If test is true, execute next test or non-test line of code
    If test is false, skip any further tests and the next non-test line of code

    Personally, I prefer this logic. It doesn't seem strictly GS/AR compliant and I'd like to use the format that is more universally acceptable.
    Last edited by noabody; 11-19-2017, 11:15:16 AM.

    Comment

    Working...
    X