Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

3DS:Virtual Console/Extraction: Difference between revisions

From Hacks Guide Wiki
(Somehow there's an o in dok3 in the GodMode9 URL instead of a 0...)
(inspired by https://glazedbelmont.github.io/vcextract/ - info on game gear is pending indefinitely)
(One intermediate revision by one other user not shown)
Line 1: Line 1:
Virtual Console games are usually identical to the original game, as Nintendo usually avoids modifying ROMs directly and instead layers patches on top. However, even when directly modified, easy methods have been found to revert them.
Virtual Console games are usually identical to the original game, as Nintendo tries to avoid modifying ROMs directly and instead uses patches. And even when modified, these modifications are usually somewhat easy to undo.
This means the original game can be extracted and used exactly the same as one dumped from a cartridge.
This means the original game can be extracted and used identically to one that came from a cartridge.


== Required Reading ==
== Required Reading ==
This tutorial currently supports NES, SNES, GB, GBC, GBA, and Game Gear VCs.
This tutorial works for NES, SNES, GB, GBC, GBA, and Game Gear (WIP) VCs.


Note that ROMs from three consoles are altered in VCs, as follows:  
Note that ROMs from three consoles are altered in VCs, as follows:  


NES VCs use a non-standard TNES header that only works in the Virtual Console, and must be converted back after dumping. This guide walks through how to convert the header.
NES VC ROMs use a non-standard TNES header that only works in the Virtual Console, and must be converted back after dumping. This guide walks through how to convert the header.


SNES VCs are altered for more efficient playback in the Virtual Console, and if not restored after dumping the audio will be unusuable in other emulators. This guide walks through how to restore the ROM.
SNES VC ROMs are altered for more efficient playback in the Virtual Console, and if not restored after dumping the audio will be unusuable in other emulators. This guide walks through how to restore the ROM.


Game Gear VCs are compressed into a unique archive type, and sometimes their ROMs are directly patched. This guide walks through how to decompress the archive (WIP), but as the patches are nondestructive it does not revert them.
Game Gear VC ROMs are compressed into a unique archive type, and may have patches directly added into the ROM itself. This guide will walk through how to decompress the archive once more info is collected, but as the patches are nondestructive it does not revert them.


==Instructions==
==Instructions==


===What You Need===
===What You Need===
<ul>
* The latest release of {{GitHub|dok3/GodMode9|GodMode9}} (the GodMode9 <code>.zip</code> file)
  <li>The latest release of {{GitHub|d0k3/GodMode9|GodMode9}} (the GodMode9 <code>.zip</code> file)</li>
* If extracting an NES game: [[Special:DownloadWithFilename/File:tnes2ines.txt/tnes2ines.gm9|tnes2ines.gm9]]
  <li>If extracting an NES game: [[Special:DownloadWithFilename/File:tnes2ines.txt/tnes2ines.gm9|tnes2ines.gm9]]</li>
* If extracting a SNES game:  
  <li>If extracting a SNES game:
** The source code of {{GitHub|Plombo/vcromclaim|vcromclaim}} (obtainable by the Download ZIP option in the <big><span style="background:#008000">Code</span></big> button)
    <ul>
** [[Special:DownloadWithFilename/File:snesvcsplit.txt/snesvcsplit.py|snesvcsplit.py]]
      <li>The source code of {{GitHub|Plombo/vcromclaim|vcromclaim}} (obtainable by the Download ZIP option within the <big><span style="background:#008000">Code</span></big> dropdown)</li>
** A version of [https://www.python.org/downloads/release/python-2718/ Python 2.7]
      <li>[[Special:DownloadWithFilename/File:snesvcsplit.txt/snesvcsplit.py|snesvcsplit.py]]</li>
* If extracting a Game Gear game: MArchiveBatchTool, obtained from {{GitHub|farmerbb/RED-Project/releases/latest|here}}
      <li>An installation of [https://www.python.org/downloads/release/python-2718/ Python 2.7]</li>
    </ul>
  </li>
  <li>If extracting a Game Gear game: The latest release of {{GitHub|farmerbb/RED-Project/releases/latest|MArchiveBatchTool}}</li>
</ul>


=== Section I - Prep Work ===
=== Section I - Prep Work ===
Line 33: Line 28:
In this section, you will set up the necessary files to extract a VC game.
In this section, you will set up the necessary files to extract a VC game.


<ol>
# Power off your console
  <li>Power off your console
# Insert your SD card into your computer
  <li>Insert your SD card into your computer
# Copy <code>GodMode9.firm</code> from the GodMode9 <code>.zip</code> to the <code>luma/payloads</code> folder on your SD card
  <li>Copy <code>GodMode9.firm</code> from the GodMode9 <code>.zip</code> to the <code>luma/payloads</code> folder on your SD card
# Copy the <code>gm9</code> folder from the GodMode9 <code>.zip</code> to the root of your SD card
  <li>Copy the <code>gm9</code> folder from the GodMode9 <code>.zip</code> to the root of your SD card
# If you are extracting an NES game, copy <code>tnes2ines.gm9</code> into the <code>gm9/scripts</code> folder on your SD card
  <li>If you are extracting an NES game, copy <code>tnes2ines.gm9</code> into the <code>gm9/scripts</code> folder on your SD card
# If you are extracting an SNES game, extract the vcromclaim <code>.zip</code> into a folder and place <code>snesvcsplit.py</code> into this folder
  <li>If you are extracting an SNES game, extract the vcromclaim <code>.zip</code> into a folder and place <code>snesvcsplit.py</code> into this folder
# If you are extracting a Game Gear game, extract the MArchiveBatchTool <code>.zip</code> into a folder
  <li>If you are extracting a Game Gear game, extract the MArchiveBatchTool <code>.zip</code> into a folder
# Reinsert your SD card into your console
  <li>Reinsert your SD card into your console
</ol>


=== Section II - Accessing the Game Files ===
=== Section II - Accessing the Game Files ===
Line 48: Line 41:
In this section, you will mount the VC game's internal files.
In this section, you will mount the VC game's internal files.


<ol>
# Hold the {{B|START}} button and power on to open GodMode9
  <li>Hold the {{B|START}} button and power on to open GodMode9
# Press the {{B|HOME}} button, then press {{B|A}} on the '''Title manager''' option
  <li>Press the {{B|HOME}} button, then press {{B|A}} on the '''Title manager''' option
# Press {{B|A}} on <code>[A:] SD CARD</code> and wait for the search to complete
  <li>Press {{B|A}} on <code>[A:] SD CARD</code> and wait for the search to complete
# Once it completes, all titles that you have installed will appear
  <li>Once it completes, all titles that you have installed will appear
# Find the VC that you wish to extract a ROM from and press {{B|A}} on that title, then choose to '''Open title folder'''
  <li>Find the VC that you wish to extract a ROM from and press {{B|A}} on that title, then choose to '''Open title folder'''
# Press {{B|A}} on the main game file - usually named <code>00000000.app</code> - then choose '''NCCH image options...''', then '''Mount image to drive''' and press {{B|A}} again to confirm
  <li>Press {{B|A}} on the main game file - usually named <code>00000000.app</code> - then choose '''NCCH image options...''', then '''Mount image to drive''' and press {{B|A}} again to confirm
# The internal files of the chosen game will appear
  <li>The internal files of the chosen game will appear
</ol>


=== Section III - Dumping the ROM ===
=== Section III - Dumping the ROM ===
Line 64: Line 55:
What console does the chosen game originally come from?
What console does the chosen game originally come from?
<tabber>
<tabber>
|-|NES=
|-|NES=
 
# Go into the folder <code>romfs/rom</code>
<ol>
# Press {{B|A}} to select the file that appears, then choose <code>Copy to 0:/gm9/out</code>
  <li>Go into the folder <code>romfs/rom</code></li>
# Press {{B|HOME}}, then go into <code>Scripts...</code> -> <code>tnes2ines</code>
  <li>Press {{B|A}} to select the file that appears, then choose <code>Copy to 0:/gm9/out</code></li>
# Select the copied file and choose a mirroring if it asks, then let the script run
  <li>Press {{B|HOME}}, then go into <code>Scripts...</code> -> <code>tnes2ines</code></li>
# Rename the ROM so its file extension is <code>.nes</code>
  <li>Select the copied file and choose a mirroring if it asks, then let the script run</li>
  <li>Rename the ROM so its file extension is <code>.nes</code></li>
</ol>
{{success|text=Your ROM is now extracted and can be used in an emulator.}}
{{success|text=Your ROM is now extracted and can be used in an emulator.}}


|-|SNES=
|-|SNES=
{{info|If you are on Linux, replace <code>py -2</code> with <code>python2</code> in the commands.}}
{{info|If you are on Linux, replace <code>py -2</code> with <code>python2</code> in the commands.}}
<ol>
# Go into the folder <code>romfs</code>
  <li>Go into the folder <code>romfs</code></li>
# Press {{B|A}} to select the file <code>data.bin</code>, then choose <code>Copy to 0:/gm9/out</code>
  <li>Press {{B|A}} to select the file <code>data.bin</code>, then choose <code>Copy to 0:/gm9/out</code></li>
# Press {{B|R}}+{{B|START}} to power off the console
  <li>Press {{B|R}}+{{B|START}} to power off the console</li>
# Take the SD card out of your 3DS and put it into your PC
  <li>Take the SD card out of your 3DS and put it into your PC</li>
# Copy <code>data.bin</code> into the vcromclaim folder
  <li>Copy <code>data.bin</code> into the vcromclaim folder</li>
# Right-click anywhere in the empty space inside this folder and click on the option that opens Command Prompt, PowerShell, or the terminal
  <li>Right-click anywhere in the empty space inside this folder and click on the option that opens Command Prompt, PowerShell, or the terminal
#* If no such option appears, open this window manually and use <code>cd</code> or similar commands to move the terminal into this folder
    <ul>
# Run the following two commands one at a time:
        <li>If no such option appears, open this window manually and use <code>cd</code> or similar commands to target it into the vcromclaim folder</li>
#* <code>py -2 snesvcsplit.py data.bin</code>
    </ul>
#* <code>py -2 snesrestore.py game.rom game.pcm output.smc</code>
  </li>
# If desired, change <code>output.smc</code>'s filename to a name of your choice
  <li>Run the following two commands one at a time:
    <ul>
      <li><code>py -2 snesvcsplit.py data.bin</code></li>
      <li><code>py -2 snesrestore.py game.rom game.pcm output.smc</code></li>
    </ul>
  </li>
  <li>If desired, change <code>output.smc</code>'s filename to a name of your choice</li>
</ol>
{{success|Your ROM is now extracted and can be used in an emulator.}}
{{success|Your ROM is now extracted and can be used in an emulator.}}




|-|GB/GBC=
|-|GB/GBC=
 
# Go into the folder <code>romfs/rom</code>
<ol>
# Press {{B|A}} to select the file that appears, then choose <code>Copy to 0:/gm9/out</code>
  <li>Go into the folder <code>romfs/rom</code></li>
# Press {{B|B}} until you return to the drive list, then go into <code>[0:] SDCARD/gm9/out</code>
  <li>Press {{B|A}} to select the file that appears, then choose <code>Copy to 0:/gm9/out</code></li>
# Place the cursor on the copied ROM, press {{B|R}}+{{B|X}}, and change the file extension to match the console it came from: <code>.gb</code> for Gameboy, <code>.gbc</code> for Gameboy Color
  <li>Press {{B|B}} until you return to the drive list, then go into <code>0:/gm9/out</code></li>
# If desired, also change the ROM's filename to a name of your choice
  <li>Place the cursor on the copied ROM, press {{B|R}}+{{B|X}}, and change the file extension to match the console it came from: <code>.gb</code> for Gameboy, or <code>.gbc</code> for Gameboy Color</li>
  <li>If desired, also change the ROM's filename to a name of your choice</li>
</ol>
 
{{success|Your ROM is now extracted and can be used in an emulator.}}
{{success|Your ROM is now extracted and can be used in an emulator.}}




|-|GBA=
|-|GBA=
<ol>
# Go into the folder <code>exefs</code>
  <li>Go into the folder <code>exefs</code></li>
# Press {{B|A}} to select the <code>.code</code> file, then choose <code>Copy to 0:/gm9/out</code>
  <li>Press {{B|A}} to select the <code>.code</code> file, then choose <code>Copy to 0:/gm9/out</code></li>
# Press {{B|B}} until you return to the drive list, then go into <code>[0:] SDCARD/gm9/out</code>
  <li>Press {{B|B}} until you return to the drive list, then go into <code>0:/gm9/out</code></li>
# Press {{B|A}} on the <code>.code</code> file, choose '''GBA image options...''', then choose '''Rename file''' and press {{B|A}} to confirm
  <li>Press {{B|A}} on the <code>.code</code> file, choose '''GBA image options...''', then choose '''Rename file''' and press {{B|A}} to confirm</li>
</ol>
 
{{success|Your ROM is now extracted and can be used in an emulator.}}
{{success|Your ROM is now extracted and can be used in an emulator.}}


|-|Game Gear=
|-|Game Gear=
{{warning|These ROMs can only be fully extracted on Windows or Linux. If you do not have access to a PC that runs either of these operating systems, stop after copying the ROM into <code>gm9/out</code> and wait until you have access.}}
{{warning|These ROMs can only be fully extracted on Windows or Linux. If you do not have access to a PC that runs either of these operating systems, stop after copying the ROM into <code>gm9/out</code> and wait until you have access.}}
{{Section WIP|notes=Need to figure out how to determine the seed and codec for every game. This section can't be finished without them.<br>}}
{{Section WIP|notes=Figure out how to determine the seed and codec for any given game. Can't give a specific command for extracting without that info.}}
# Go into the folder <code>romfs/system/roms</code>
# Press {{B|A}} to select the file that appears, then choose <code>Copy to 0:/gm9/out</code>
# Press {{B|R}}+{{B|START}} to power off the console
# Take the SD card out of your 3DS and put it into your PC
# Copy the ROM from <code>gm9/out</code> into the MArchiveBatchTool folder
# Right-click anywhere in the empty space inside this folder and click on the option that opens Command Prompt, PowerShell, or the terminal
#* If no such option appears, open this window manually and use <code>cd</code> or similar commands to move the terminal into this folder
# WIP


<ol>
  <li>Go into the folder <code>romfs/system/roms</code></li>
  <li>Press {{B|A}} to select the file that appears, then choose <code>Copy to 0:/gm9/out</code></li>
  <li>Press {{B|R}}+{{B|START}} to power off the console</li>
  <li>Take the SD card out of your 3DS and put it into your PC</li>
  <li>Copy the ROM from <code>sd:/gm9/out</code> into the MArchiveBatchTool folder</li>
  <li>Right-click anywhere in the empty space inside this folder and click on the option that opens Command Prompt, PowerShell, or the terminal
    <ul>
      <li>If no such option appears, open this window manually and use <code>cd</code> or similar commands to move the terminal into this folder</li>
    </ul>
  </li>
  <li>WIP</li>
</ol>


</tabber>
</tabber>

Revision as of 01:54, 5 July 2023

Virtual Console games are usually identical to the original game, as Nintendo tries to avoid modifying ROMs directly and instead uses patches. And even when modified, these modifications are usually somewhat easy to undo. This means the original game can be extracted and used identically to one that came from a cartridge.

Required Reading

This tutorial works for NES, SNES, GB, GBC, GBA, and Game Gear (WIP) VCs.

Note that ROMs from three consoles are altered in VCs, as follows:

NES VC ROMs use a non-standard TNES header that only works in the Virtual Console, and must be converted back after dumping. This guide walks through how to convert the header.

SNES VC ROMs are altered for more efficient playback in the Virtual Console, and if not restored after dumping the audio will be unusuable in other emulators. This guide walks through how to restore the ROM.

Game Gear VC ROMs are compressed into a unique archive type, and may have patches directly added into the ROM itself. This guide will walk through how to decompress the archive once more info is collected, but as the patches are nondestructive it does not revert them.

Instructions

What You Need

  • The latest release of GodMode9 (the GodMode9 .zip file)
  • If extracting an NES game: tnes2ines.gm9
  • If extracting a SNES game:
  • If extracting a Game Gear game: MArchiveBatchTool, obtained from here

Section I - Prep Work

In this section, you will set up the necessary files to extract a VC game.

  1. Power off your console
  2. Insert your SD card into your computer
  3. Copy GodMode9.firm from the GodMode9 .zip to the luma/payloads folder on your SD card
  4. Copy the gm9 folder from the GodMode9 .zip to the root of your SD card
  5. If you are extracting an NES game, copy tnes2ines.gm9 into the gm9/scripts folder on your SD card
  6. If you are extracting an SNES game, extract the vcromclaim .zip into a folder and place snesvcsplit.py into this folder
  7. If you are extracting a Game Gear game, extract the MArchiveBatchTool .zip into a folder
  8. Reinsert your SD card into your console

Section II - Accessing the Game Files

In this section, you will mount the VC game's internal files.

  1. Hold the START button and power on to open GodMode9
  2. Press the HOME button, then press A on the Title manager option
  3. Press A on [A:] SD CARD and wait for the search to complete
  4. Once it completes, all titles that you have installed will appear
  5. Find the VC that you wish to extract a ROM from and press A on that title, then choose to Open title folder
  6. Press A on the main game file - usually named 00000000.app - then choose NCCH image options..., then Mount image to drive and press A again to confirm
  7. The internal files of the chosen game will appear

Section III - Dumping the ROM

In this section, you will copy the ROM out of the VC, and fix its structure if it is an NES/SNES game.

What console does the chosen game originally come from?

  1. Go into the folder romfs/rom
  2. Press A to select the file that appears, then choose Copy to 0:/gm9/out
  3. Press HOME, then go into Scripts... -> tnes2ines
  4. Select the copied file and choose a mirroring if it asks, then let the script run
  5. Rename the ROM so its file extension is .nes
Success icon Your ROM is now extracted and can be used in an emulator.

Info icon If you are on Linux, replace py -2 with python2 in the commands.
  1. Go into the folder romfs
  2. Press A to select the file data.bin, then choose Copy to 0:/gm9/out
  3. Press R+START to power off the console
  4. Take the SD card out of your 3DS and put it into your PC
  5. Copy data.bin into the vcromclaim folder
  6. Right-click anywhere in the empty space inside this folder and click on the option that opens Command Prompt, PowerShell, or the terminal
    • If no such option appears, open this window manually and use cd or similar commands to move the terminal into this folder
  7. Run the following two commands one at a time:
    • py -2 snesvcsplit.py data.bin
    • py -2 snesrestore.py game.rom game.pcm output.smc
  8. If desired, change output.smc's filename to a name of your choice
Success icon Your ROM is now extracted and can be used in an emulator.

  1. Go into the folder romfs/rom
  2. Press A to select the file that appears, then choose Copy to 0:/gm9/out
  3. Press B until you return to the drive list, then go into [0:] SDCARD/gm9/out
  4. Place the cursor on the copied ROM, press R+X, and change the file extension to match the console it came from: .gb for Gameboy, .gbc for Gameboy Color
  5. If desired, also change the ROM's filename to a name of your choice
Success icon Your ROM is now extracted and can be used in an emulator.

  1. Go into the folder exefs
  2. Press A to select the .code file, then choose Copy to 0:/gm9/out
  3. Press B until you return to the drive list, then go into [0:] SDCARD/gm9/out
  4. Press A on the .code file, choose GBA image options..., then choose Rename file and press A to confirm
Success icon Your ROM is now extracted and can be used in an emulator.

Warning icon These ROMs can only be fully extracted on Windows or Linux. If you do not have access to a PC that runs either of these operating systems, stop after copying the ROM into gm9/out and wait until you have access.
  1. Go into the folder romfs/system/roms
  2. Press A to select the file that appears, then choose Copy to 0:/gm9/out
  3. Press R+START to power off the console
  4. Take the SD card out of your 3DS and put it into your PC
  5. Copy the ROM from gm9/out into the MArchiveBatchTool folder
  6. Right-click anywhere in the empty space inside this folder and click on the option that opens Command Prompt, PowerShell, or the terminal
    • If no such option appears, open this window manually and use cd or similar commands to move the terminal into this folder
  7. WIP