Backing up Python 2 games - 987123879113/pcsx2 GitHub Wiki

The data on the HDD is DNAS encrypted and is tied directly to the original HDD and the PS2 itself. You can't write an unmodified image to a different HDD and have it boot on real hardware as normal. You can't swap out the PS2 itself with another stock PS2 and have it work as normal. All of the parts must match for the DNAS decryption process to work. This also means that if your real Python 2 hardware (the PS2 itself or the HDD itself) were to ever break you're out of luck.

You must provide your own dumps for use with this fork. The bare minimum required is a full raw HDD image of the HDD, a dump of the HDD ID from the exact HDD that the image was created for, and an ILINK ID dump from the exact PS2 that the HDD is tied to (can be dumped as a separate file or pulled from an NVRAM dump). An NVRAM dump is nice to have if possible but not required. If you somehow don't have an ILINK_ID.bin dump but do have an NVRAM/NVM dump, you can extract the ILINK_ID.bin data from the NVM file by copying 8 bytes from 0x1e0 into a new file named ILINK_ID.bin.

(2022/08/29 update) It is possible, and for future proofing is recommended, to use the NVRAM dump in place of the ILINK ID because it contains a lot more information about the original hardware that may be useful in the future. It is possible to specify the NVRAM dump file in place of the ILINK ID in the IlinkIdPath path. The emulator will be able to detect that it's an NVRAM dump and parse it accordingly.

HDD imaging

For dumping the HDD image, you can use a tool such as dd (most standard Linux distributions include or have an easy way to install dd). For Windows I recommend HDD Raw Copy Tool (https://hddguru.com/software/HDD-Raw-Copy-Tool/). Anything that is able to make complete raw HDD dumps should work. If your HDD is giving sector errors when dumping then it is worth trying to dump the HDD using settings to ignore bad sectors, especially if the errors are in the latter half of the HDD which may not even corrupt the game data at all. The files on the HDD can later be verified using the hashes stored in the allfiles.lst that exists for all installed partitions.

BIOS/ILINK/NVRAM dumping

The following tools must be run on the PS2 directly using an exploit. You can use a standard FreeMcBoot memory card to boot these, or put the tools on a USB thumb stick and launch them using the FreeMcBoot memory card.

HDD ID dumping

There are two methods for dumping the HDD ID required for decrypting the contents of the HDD. The first is to run the id dumper tool with the HDD inserted into a PS2 that is not the original PS2, or optionally by switching out the network adapter using the original arcade PS2. This is required to stop the PS2 from priority booting from the HDD before it can launch the dumper tools. This requires extra hardware that may not be on hand. Some people have reported being able to boot from a memory card while the HDD is still inserted but I personally have not been able to reproduce that.

The easier and safer method requires either connecting the HDD directly to a PC using a physical IDE connection (without a USB adapter), or an IDE to USB adapter that has a supported chipset that can be used for ATA passthrough to issue raw ATA commands.

The following commands use sg_raw, which is part of sg3_utils. You can download a Win32 build from the developer's website: https://sg.danny.cz/sg/p/sg3_utils-1.42exe.zip

NOTE: You must run the following sg_scan and sg_raw with Administrator privileges or it won't work!!!

To find the target hard drive, use sg_scan.

>sg_scan -b
PD0     [F]     <Sata >  Drive1
PD1     [F]     <Sata >  Drive2
PD2     [F]     <Sata >  Drive3
...

The PD0/PD1/PD2/etc here (/dev/sda or similar on Linux) is the target drive name you should use for the following sg_raw commands in place of where it says /dev/sda.

For connecting directly to the PC through IDE, you can use the following command:

sg_raw -o HDD_ID.bin -b -r 512 /dev/sda 85 09 0d 00 ec 00 00 00 00 00 00 00 00 00 8e 00

SAT12 version of the same command (depends on chip in USB adapter):

sg_raw -o HDD_ID.bin -b -r 512 /dev/sda a1 09 0d ec 00 00 00 00 00 8e 00 00

JMicron-specific version of the same command (requires a JMicron chip in USB adapter):

sg_raw -o HDD_ID.bin -b -r 512 /dev/sda df 10 00 02 00 ec 00 00 00 00 00 8e

(All sg_raw commands thanks to @dev_console)

I personally have had success using the JMicron command with a very cheap adapter (non-affiliate link): https://www.amazon.com/Warmstor-Adapter-Computer-Connector-Converter/dp/B076WZ1N4K/

The above linked set includes a power brick. The exact same adapter is also sold for cheaper but the USB adapter itself does not provide power, so be sure to have a power solution prepared before attempting dumping the hard drive.

⚠️ **GitHub.com Fallback** ⚠️