Is memory handled differently in the 1.7.0 builds?
#1
I'm part of a modding community, and we have a massive spreadsheet containing hundreds of memory addresses for many important functions throughout the Sly Cooper games.  After downloading the latest 1.7.0 development build, suddenly none of our documented memory addresses pointed to anything anymore.  I went back to an older version again, and all of our documented memory addresses started working again.

It's taken us years to document what we've done so far, and it seems like we'll have to re-find everything because something in PCSX2 handles memory differently now.  For example, the amount of collected coins used to be stored at 0x20304A04 in memory, but in the latest 1.7.0 build it's stored at 0x30304A04.  This looks to be just 10000000 further which is an easy fix for our spreadsheet, but I don't think it's that simple.

What happened?  Why did memory change in this way?  Is this intentional?  We need details, I'm glad I realized this now and not when we actually needed to do something productive.
Reply

Sponsored links

#2
(08-26-2020, 01:35 AM)goody_fyre11 Wrote: I'm part of a modding community, and we have a massive spreadsheet containing hundreds of memory addresses for many important functions throughout the Sly Cooper games.  After downloading the latest 1.7.0 development build, suddenly none of our documented memory addresses pointed to anything anymore.  I went back to an older version again, and all of our documented memory addresses started working again.

It's taken us years to document what we've done so far, and it seems like we'll have to re-find everything because something in PCSX2 handles memory differently now.  For example, the amount of collected coins used to be stored at 0x20304A04 in memory, but in the latest 1.7.0 build it's stored at 0x30304A04.  This looks to be just 10000000 further which is an easy fix for our spreadsheet, but I don't think it's that simple.

What happened?  Why did memory change in this way?  Is this intentional?  We need details, I'm glad I realized this now and not when we actually needed to do something productive.

The recompilers got updated to 64-bit, this changed the addresses from 20000000~22000000 to 30000000~32000000.
AMD Ryzen 5 3600 @ 3.60~4.20 GHz | Corsair Vengeance LPX 32 GB (2x16GB) DDR4-3200
MSI GeForce GTX 1660 Super @ 6 GB | Samsung 980 1TB | Windows 10 Pro x64 (22H2)
Reply
#3
Just so you know, the new build puts the EE memory at an address relative to the spot PCSX2 itself is loaded, so while it's at 30000000 in the new 32-bit build, it'll probably be somewhere else in the 64-bit build and could change due to Windows updates or compiler changes.  PCSX2 should print the base address to the console on startup, or you can read the global variable HostMemoryMap::EEmem using a debugger

(The new address will always be at old address - 20000000 + HostMemoryMap::EEmem)

Once https://github.com/PCSX2/pcsx2/pull/3591 gets merged, you may want to consider using it to read EE memory instead of trying to pull it from the emulator's ram, as it will always be consistent
Reply
#4
(08-26-2020, 01:35 AM)goody_fyre11 Wrote: It's taken us years to document what we've done so far, and it seems like we'll have to re-find everything because something in PCSX2 handles memory differently now.  For example, the amount of collected coins used to be stored at 0x20304A04 in memory, but in the latest 1.7.0 build it's stored at 0x30304A04.  This looks to be just 10000000 further which is an easy fix for our spreadsheet, but I don't think it's that simple.

I'll make this post short and sweet. It 100% is that simple. The base address moved, so everything shifted.

it would be best to update the document to remove the base address and just use the raw addresses and then add the base address to them (or use the calculate function on excel to add the base address to the actual locations and display them like that)
Reply




Users browsing this thread: 1 Guest(s)