Peppies-Site Forums

Fun Games and General Chat.

:dj: when radio is on air you can tune in by clicking on the Peppies-Jukebox link on the top of the page (members only) and by leaving it open you can browse the site content and join in with stuff all at the same time or if you join us you can join us in the irc channel to see whats being played, make requests and join in with us there too. :dj: ADVERTS DISAPPEAR ON JOINING OUR SITE ITS FREE TO SIGN UP AND REGISTER SO DO YOURSELF A FAVOUR AND JOIN US RIGHT NOW!! HELP US TO BUILD A NICE LITTLE COMMUNITY WHERE FUN NEVER STOPS............

    How to inject roms into VC releases

    Share
    avatar
    Peppies™
    Site Owner
    Site Owner

    Posts : 442
    Join date : 2010-06-23
    Age : 55
    Location : Newcastle Upon Tyne

    How to inject roms into VC releases

    Post  Peppies™ on 18th January 2011, 18:30

    [You must be registered and logged in to see this image.]

    Since the release of wad packing tools, it has now become possible to inject roms into the virtual console releases. The process is currently a little long winded so I decided to make a tutorial for you to hopefully explain the process in more detail.

    The emulation of some games is not that great so be warned. My advise is to use Sin & Punishment for N64 games and Donkey Kong Country for SNES games as these releases contain probably the most up to date emulators.

    -------------------------------------------------------
    Required Tools & Files
    -------------------------------------------------------
    wadpacker-VERSION_0.00007
    bfgr_wadtools_v038
    Hex Workshop (or any hex editor)
    sha1

    Files you will need to find on your own:
    key.bin/common-key.bin
    A Virtual Console WAD file
    A copy of the rom contained in the virtual console wad file (any region should be fine)
    A rom file to insert into the wad file (You can only insert N64 games into N64 wads and SNES into SNES etc)
    -------------------------------------------------------

    Ok so let's get started, first you want to download all of the required tools I listed above. You will have to find the key.bin for yourself as it would be illegal for us to host it here.

    First of all you want to install Hex Workshop then reboot your PC if neccessary then we are ready to start the injection process.

    Start by making a folder on your pc where you will do your work. For this tutorial I will use the folder c:\packer for simplicity sake. Copy your downloaded wad packing tools to this folder end extract them. You should have something that looks like this now:

    [You must be registered and logged in to see this image.]

    Create a new folder in this folder called wad, here we will store the original wad file. Copy your selected wad file to this new folder C:\packer\bfgr_wadtools_v038\wad and rename it to title.wad if it is not called this already.

    Now it is time to extract the contents of the wad file. Open a DOS command prompt (Start >> Run >> type cmd then hit enter, a DOS box should now pop up). You then want to type the following commands pressing enter afterward each one (if you are using a different directory to which I suggested then I guess you are intelligent enough to know what to change these to):

    Code
    c:
    cd \
    cd packer/bfgr_wadtools_v038/
    wadunpacker.exe wad/title.wad

    Once you press enter after the last command, you will see alot of text scroll up the screen. Wait for it to finish until you can see the cursor flashing again. It should look like this:

    [You must be registered and logged in to see this image.]

    Once it has completed, leave the DOS window open, you're going to need it again very soon. Now go back to your C:\packer\bfgr_wadtools_v038\ folder and you should see a new folder starting with 00010. Enter this folder and you should see the .APP files along with a .cert, .tik, .tmd and .trailer file. Rename the .cert, .tik, .tmd and .trailer files to title.cert, title.tik, title.tmd and title.trailer. Take a copy of the title.tmd file and rename it to title_backup.tmd

    You may want to make a backup of all these files now to save you repeating the previous process should something go wrong.

    Your new folder should look like this:

    [You must be registered and logged in to see this image.]

    The rom file is actually contained in the 00000005.app file so we will start by opening this file with your Hex Editor software. At the same time, open your copy of the rom file that is included in the wad with the hex editor aswell. We are going to break the 00000005.app file down into 3 chunks. Let's do the first chunk.

    First you want to take a look at the rom file. What you are looking for is the start of the rom. Here you can see I have highlighted a small section of the hex which I am going to search the VC file for in a moment:

    [You must be registered and logged in to see this image.]

    Once you have made a note of the HEX code (look at the left hand side not the right for this), open your 00000005.app file and press Ctrl+F to initiate a search. You want to search for a hex value and you are searching for the details that you found in the copy of your rom. As you can see here the application done a good job and found the beginning of the rom:

    [You must be registered and logged in to see this image.]

    This is where we will make our first split. Cut everything that is before this section then create a new file and paste the information into that (you want to cut it rather than copy as we are aiming to leave just the rom information in the 00000005.app file). Save the new file as 00000005-part1.app in your C:\packer\bfgr_wadtools_v038\00010.... folder along with the app files and the title.tmd etc.

    Now go back to your hex editor and you want to study the rom file again. Scroll to the bottom of the file and take note of the offset (the number on the left) and also the format of the end of the file:

    [You must be registered and logged in to see this image.]

    Now you have the end of the file, go back to your 00000005.app file and scroll down to the same offset as you saw in the rom file:

    [You must be registered and logged in to see this image.]

    We're going to do pretty much the same as last time here except for this time, cut all of the information that comes after the string you were just searching for and paste it into a new file. Save this new file as 00000005-part3.app. Finally save your edited 00000005.app file as 00000005-part2.app. Your folder should now look like this:

    [You must be registered and logged in to see this image.]

    There are still a couple more things we need to do before we can make this back into a wad file and of course the first one is going to be making your rom file fit in the space provided.

    To do this, first open the rom file you want to inject with the hex editor and scroll to the bottom of the file. Check this against the end of your 00000005-part2.app file. If the ends match and finish at the same place then you are good to go. If not then you will need to insert some dummy data. This is as simple as clicking edit, then insert. You want to fill with the hex value FF until the rom is the same size as the 00000005-part2.app file.

    Here is my file before I inserted the dummy data:

    [You must be registered and logged in to see this image.]

    Here is my file after inserting the dummy data, as you can see it now ends at the same place as the 00000005-part2.app file:

    [You must be registered and logged in to see this image.]

    Once you have done this, again save your file to your folder with all your app files in it this time saving the file as 00000005-part2-rom.app

    Your folder should now look like this:

    [You must be registered and logged in to see this image.]

    It's not quite time to close your hex editor yet as we will be needing it once more but you can close all the files you had open in it if you like.

    Next you want to rename 00000005.app to 00000005-old.app then move all of the files you have in the C:\packer\bfgr_wadtools_v038\00010.... folder into the C:\packer\bfgr_wadtools_v038 folder.

    Your C:\packer\bfgr_wadtools_v038 folder should now look like this with the new files copied into it:

    [You must be registered and logged in to see this image.]

    Next we are going to piece the 3 parts of the 00000005.app back together into a new file. To do this is pretty simple to be honest. Hop back to your CMD prompt (assuming you still have it open of course) and type the following then press enter:

    Code
    copy /b 00000005-part1.app+00000005-part2-rom.app+00000005-part3.app 00000005.app


    This should give you this which tells you it created a new file called 00000005.app in your C:\packer\bfgr_wadtools_v038 folder:

    [You must be registered and logged in to see this image.]

    Think your ready to pack this up yet? Well not quite yet... still one more very important step to do and that is to update the title.tmd file with the information for your new 00000005.app file.

    Staying with DOS, type the following 2 commands pressing enter after each one:

    Code
    sha1 00000005-old.app
    sha1 00000005.app


    This should give you something like this:

    [You must be registered and logged in to see this image.]

    Go back to your hex editor and open the title.tmd file in your C:\packer\bfgr_wadtools_v038 folder. If you notice in the image above, I circled the 2 values that you need to work with. Don't worry, the title.tmd is nowhere near as long as the other files you have been working with previously so this step should be a walk in the park for you now.

    You need to search for the first line in the hex code of the file (ctrl+f, hex value). I usually type the first 8 characters which should find it. Then you need manually overtype it with the bottom value. Here's a picture of mine before and after. I used the values shown above so you can see what I done here:

    [You must be registered and logged in to see this image.]

    Once you have made these changes, save your title.tmd and finally you can close your Hex Editor.

    The final furlong here is to repack the game into an installable .wad file. Again this is going to be an easy step for you. Head back into DOS for one last time and punch in the following code as always followed by enter:

    Code
    wadpacker-VERSION_0.00007


    Once this is complete, if you done everything correctly you should see something like this:

    [You must be registered and logged in to see this image.]

    Then that is it my friend. Stick that wad on your SD card, head over to your Wii and load your favourite wad installer which should theoretically install fine. When you get back to your main menu you will see an icon for your fake VC channel. Click on it, keep your fingers crossed that you picked a combination that works and hope that the emulation is decent. If it is not up to scratch or doesn't work at all then you can try other VC releases to see if you have more luck.

    In this example I injected the Pilot Wings (E) rom into Sin & Punishment (E) (VC). Previously I tried with Super Mario 64 but unfortunately the emulation was awful. It was vastly improved when using Sin & Punishment which is why I recommend it.

    I havn't had much time to try SNES and Megadrive releases yet but I am sure after reading this you should be able to work those out for yourselves.

    Hope this was helpful


    _________________
    [You must be registered and logged in to see this image.]

    Peppies ™ [You must be registered and logged in to see this image.] [You must be registered and logged in to see this image.]

      Current date/time is 21st July 2017, 21:34