Advertisement
Guest User

Untitled

a guest
Nov 3rd, 2019
4,332
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.05 KB | None | 0 0
  1. If you've purchased one or both of these game collections on Steam, and want to know how to play the included games with whatever emulator you want, here's a guide on how to extract the ROMs.
  2.  
  3. [b]--------------------------------------- UPDATED INSTRUCTIONS ---------------------------------------[/b]
  4.  
  5. Revised instructions for extracting ROMs from Castlevania / Contra Anniversary collections
  6.  
  7. 1. Go to https://dotnet.microsoft.com/download and download the .NET Core SDK
  8.  
  9. 2. Go to https://gitlab.com/modmyclassic/sega-mega-drive-mini/marchive-batch-tool and either git clone the repo, or download a zip file of the source code
  10.  
  11. 3. With the .NET Core SDK installed, run the following command inside the marchive-batch-tool directory:
  12.  
  13. For Windows:
  14. [code]"C:\Program Files\dotnet\dotnet.exe" publish -c Release -r win7-x64 --self-contained true MArchiveBatchTool.sln[/code]
  15.  
  16. For Linux:
  17. [code]dotnet publish -c Release -r linux-x64 --self-contained true MArchiveBatchTool.sln[/code]
  18.  
  19. 4. Navigate to the "MArchiveBatchTool\bin\Release\netcoreapp2.2\win7-x64" directory, where the compiled program will be.
  20.  
  21. 5. Run the following command to extract the ROMs:
  22.  
  23. For Windows:
  24. [code]MArchiveBatchTool.exe fullunpack --keep "C:\Program Files (x86)\Steam\steamapps\common\Contra Anniversary Collection\windata\alldata.psb.m" zlib 25G/xpvTbsb+6 64[/code]
  25.  
  26. For Linux:
  27. [code]./MArchiveBatchTool fullunpack --keep ~/.local/share/Steam/steamapps/common/Castlevania\ Anniversary\ Collection/windata/alldata.psb.m zlib 25G/xpvTbsb+6 64[/code]
  28.  
  29. NOTE: If you changed the installation path from the default when installing Steam, be sure to change the path in the above command as well.
  30.  
  31. 6. ROMs will be output to the "alldata.psb.m_extracted\system\roms" directory inside your Contra Anniversary Collection installation. Enjoy!
  32.  
  33. [b]--------------------------------------- PREVIOUS INSTRUCTIONS ---------------------------------------[/b]
  34.  
  35. You'll need the following:
  36. [list]
  37. [*] The "alldata.bin" and "alldata.psb.m" files, located in the "windata" folder inside your Castlevania and/or Contra Anniversary Collection installations.
  38. [*] Access to some sort of Python 3 environment. The instructions below are for Linux, but in theory Python on any platform should work.
  39. [/list]
  40.  
  41. First, clone the repo containing the Python script we are going to use. (They're the same Python scripts currently in development for extracting files off of the Sega Genesis Mini, since it uses the same emulation framework.)
  42.  
  43. [code]git clone https://gitlab.com/modmyclassic/sega-mega-drive-mini/inject_gba[/code]
  44. [code]cd inject_gba[/code]
  45. [code]git checkout 4910c509[/code]
  46. (this last step isn't required, but might be in the future if the Python scripts change)
  47.  
  48. Next, install a few Python dependencies.
  49.  
  50. [code]sudo apt install python3-pip python3-setuptools[/code]
  51. [code]pip3 install zstandard[/code]
  52.  
  53. Now, install the scripts on your system.
  54.  
  55. [code]sudo python3 setup.py install[/code]
  56.  
  57. We now need to make a small modification to one of the files. We need to replace the decryption key used for the Sega Genesis Mini with the one for the Castlevania & Contra Anniversary Collections.
  58.  
  59. Inside the "inject_gba" folder, there will be another folder called "inject_gba". Inside this folder, open up the "psb.py" file with a text editor, and go to line 1144, where there is a statement that starts with "fixed_seed".
  60.  
  61. Replace the line
  62.  
  63. [code] fixed_seed = b'nY/RHn+XH8T77' # From m2engage.elf[/code]
  64.  
  65. with
  66.  
  67. [code] fixed_seed = b'25G/xpvTbsb+6' # From m2engage.elf[/code]
  68.  
  69. We now need to copy the "unpack-psb.py" file from the "tools" directory into the main "inject_gba" folder. This is the actual script we are about to run.
  70.  
  71. Now, copy "alldata.bin" and "alldata.psb.m" into the main "inject_gba" folder, then run the following command to extract the files:
  72.  
  73. [code]./unpack-psb.py -y -f -o output.psb.m alldata.psb.m[/code]
  74.  
  75. This will take a few minutes to extract the files. Once it's done, the ROMs will be located in the "output.files/system/roms/" directory. Enjoy!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement