Super NES Injection Guide

Discussion in '3DS - Tutorials' started by cots, May 19, 2016.

May 19, 2016

Super NES Injection Guide by cots at 8:56 AM (16,623 Views / 7 Likes) 40 replies

  1. cots
    OP

    Member cots GBAtemp Fan

    Joined:
    Dec 29, 2014
    Messages:
    466
    Country:
    United States
    [​IMG]

    Super NES Injection Guide
    version 4.0 / 2016-05-22

    Update: I've written SNES Injection software that you can find here.

    Welcome to my first Nintendo 3DS related hacking guide which covers converting Super NES ROM images into a self contained Virtual Console game for flashcard/CFW New Nintendo 3DS portable video gaming console users. Nintendo released an official emulator which can be decompiled and repackaged with your game of choice with custom graphics and intro music. This emulator is far superior to any other in most aspects, but unfortunately doesn't support expansion chips like the Super FX. Anyway, using a few tools and a template you can convert SMC ROMs with a valid header to be played on your New Nintendo 3DS (the 'old' or original 3DS doesn't have the extra processing power to play them at full speed - sorry!).

    Requirements

    * New Nintendo 3DS
    * Flashcard or CFW Enabled System
    * Super NES ROM Image (SMC Format)
    * Graphic Editing Software (Like GIMP or Photoshop)
    * HEX Editing Software (This guide uses HexWorkshop)
    * Audio Editing Software (Audacity rings a bell)
    * Self Contained Software Package (SNES_Injection_Toolkit_v4.7z) - Get it < HERE >
    * 7-zip or WinRAR to extract the Software (Windows only folks)
    * Some Time & a Brain

    * slot0x25KeyX.bin - Acquire this file and place it in the 'PackHack' folder.

    * You will have to obtain the last requirement which is the actual Nintendo Super NES emulator from an already self contained CIA file which you can find on 'that ISO site'. Once you have it rename it 'PUBLICDOMAINROM.cia' and place in the 'PackHack' folder.

    Steps

    The first thing you'll want to do is to extract the contents of the SNES_Injection_Toolkit to 'C:\snes' on your hard drive. This entire guide is based off of the files being in that location. The guide also assumes you've placed your SNES ROM into 'C:\snes' . In Addition to the actual emulator you must also place the 'slot0x25KeyX.bin' into the 'C:\PackHack' folder.

    [​IMG]

    Once you've extracted the files navigate to 'C:\snes\PackHack' and run the 'HackingToolkit.exe' file. In that program it will bring up a text based menu with options. You're going to type in 'cia' and then press 'enter' which is the option to extract the contents of a cia file (which is a native Nintendo 3DS executable package).

    [​IMG]

    Follow this up by typing in the name with no extension of the cia we'll be extracting which is 'PUBLICDOMAINROM'. Type that in (without the quotes) and press 'enter'.

    [​IMG]

    When it asks to decompress the code.bin answer 'n' and hit 'enter' then type 'exit' and press 'enter'.

    [​IMG]

    Now you'll want to go back to C:\snes and run the 'snesROMUtil.exe' file. Once open select 'File' then 'Open' and select your SNES ROM. It will display some information about the ROM and you'll want to leave this program open and take note of the 'Size' field as it will display the Mbit size and if the ROM is HiROM or LoROM.

    [​IMG]

    Now run 'SNES INJECTOR.exe' and select 'File' -> 'Open' and browse to 'C:\snes\PackHack\ExtractedRomFS' and select 'data.bin'. This is the file we're going to inject the ROM image into.

    [​IMG]

    Next select 'Select ROM' and pick your SMC file then make sure to select HiROM or LoROM (based on what snesROMUtil.exe is telling you) and then also select the Megabit size from the drop-down menu. Once you've done that select 'Save' and save it over the 'C:\snes\PackHack\ExtractedRomFS\data.bin' file.

    [​IMG]

    Now we're going to pre-pare the images. So open up your Graphic Editing software then navigate to and open up the .png files in 'C:\snes\Image Templates'. Here is an explanation of which graphic is for.

    [​IMG]

    Bottom Icon 48x48.png - This is the bottom icon displayed in the Main Menu
    Box Rotated 23x44.png - This is a helper image used to get the game box sized and rotated correctly
    COMMON1 128x128.png - This is the larger image that is displayed on the television in the 3d template
    COMMON1_2 64x64.png - Same as above, but smaller
    COMMON1_3 32x32.png - Same as both above, but smallest
    USA_EN2 256x64.png - This is a grayscale graphic that displays the name of the game
    USA_EN3 256x256.png - This is the only part of the 3d SNES console you will be editing, paste the box art here

    [​IMG]

    Note that transparencies are kept intact. You should use an image of the box for USA_EN3 256x256.png and an image of the games title menu for the three COMMON1 files as this is what the template expects.

    Make sure to only cover the black areas in the COMMON* images as they require the transparencies for proper display on the miniature 3d television set that is in the template.

    Okay, let's prepare the 3 second or less audio file. The audio file is limited to being 3 seconds or less! I used Audacity for editing my WAV. Make sure it's a Stereo WAV, 44100Hz and 32-bit float. I'm not sure if lesser and greater specifications will work. If when you install the cia file the logo doesn't appear then it probably means your wav file was incompatible.

    [​IMG]

    Name your WAV 'audio.wav' and save it into 'C:\snes\bannertool'and then drop to a command prompt (press WINKEY+R, type in 'cmd', press 'enter' then type in 'cd\snes\bannertool' then 'enter'). Once in there type in 'bannertool makecwav -i audio.wav -o banner.bcwav' and press 'enter'. This will convert your audio file to one that is compatible with the template that we'll compile.

    [​IMG]

    Copy the 'banner.bcwav' over the one in the template (located in 'C:\snes\ba-GUI-nnertool\Projects\Banner\SNES').

    [​IMG]

    Now we'll convert the 48x48 icon into the template file that stores the name, description, author and icon for the game. So go to 'C:\snes\ba-GUI-nnertool' and run 'ba-GUI-nnertool.exe' and pick the second tab named 'SMDH'. Next load your 48x48 image using 'Browse' (under the small icon text) and make sure to tick 'Create Icon.icn'. Type in the name, description and publisher and then click on the 'Begin' button.

    [​IMG]

    This will compile your icon and data into a file named 'icon.icn' which you can locate in a folder created under 'C:\snes\ba-GUI-nnertool\Projects\SMDH\_output' .

    [​IMG]
    So navigate to that folder and then rename the 'icon.icn' file to 'icon.bin' and move it over the original one in the template located here -> 'C:\snes\PackHack\ExtractedExeFS'.

    [​IMG]

    Next go back to the bannertool gui and select the third tab which is 'Toolbox' and then select the icon next to the Ohana 3DS to launch Ohana 3DS. Ohana 3DS is a Nintendo 3DS graphic resource editor that we'll be using to insert the rest of the images we edited earlier into the template for the graphics that will be displayed when you select your installed cia package into your 3DS menu.

    [​IMG]

    Once Ohana 3DS is loaded and you've clicked once on the image that loads up (to display the menu) select 'Texture' from the left tabs and then click on 'Load' from the bottom menu. Navigate to 'C:\snes\ba-GUI-nnertool\Projects\Banner\SNES' and select 'banner0.bcmdl' and then highlight 'COMMON1' and pick 'Import' from the bottom menu. Next select the 'COMMON1 128x128.png'.

    Next highlight 'COMMON1_2' and import 'COMMON1_2 64x64.png ' .

    Next highlight 'COMMON1_3" and import 'COMMON1_3 32x32.png ' .

    [​IMG]

    Click on 'Save' and then load up 'banner10.bcmdl' and then import 'USA_EN2 256x64.png' into 'USA_EN2' and 'USA_EN3 256x256.png' into 'USA_EN3' then save the file. There, you're all done editing the template so now it's time to compile the banner you've just edited.

    [​IMG]

    You might have noticed the other banner*.bcmdl files in the template folder and they are used by other region Nintendo 3DS systems. The 'banner10.bcmdl' is English / USA so if you're in another region or if you want custom graphics for other regions you can see from the list below what other file(s) you'll need to edit.

    banner1.bcmdl = English / EUR_EN
    banner2.bcmdl = French / EUR_FR
    banner3.bcmdl = German / EUR_GE
    banner4.bcmdl = Italian / EUR_IT
    banner5.bcmdl = Spanish / EUR_SP
    banner6.bcmdl = Dutch / EUR_DU
    banner7.bcmdl = Portuguese / EUR_PO
    banner8.bcmdl = Russian / EUR_RU
    banner9.bcmdl = Japanese / JPN_JP
    banner10.bcmdl = English / USA_EN
    banner11.bcmdl = French / USA_FR
    banner12.bcmdl = Spanish / USA_SP
    banner13.bcmdl = Portuguese / USA_PO

    Back in 'ba-GUI-annertool' select the first tab which is 'Banner' and select the 'Browse' button next to Banner bcmdl/png:' and then select the 'banner0.bcmdl' file in the 'C:\snes\ba-GUI-nnertool\Projects\Banner\SNES' folder. Click the 'Begin' button then click on the Banner Folder Icon and navigate to 'C:\snes\ba-GUI-nnertool\Projects\Banner\_output' . Rename the 'banner.bnr' to 'banner.bin' and replace the existing on in the 'C:\snes\PackHack\ExtractedExeFS' folder with it.

    [​IMG]

    Okay, so you've got this far and it's time to edit the 'C:\snes\PackHack\DecryptedExHeader.bin' with your HEX editing software to change the Unique ID that will identify your game once installed into the Nintendo 3DS. You will need to have a different ID for different ROMs otherwise it will overright the original with the new one if you create more than one VC 3ds/cia.

    So load the 'DecryptedExHeader.bin' file into HexWorkshop and then make sure the program is displaying each starting offset in dominations of 10 (you can get this to happen by resizing the window horizontally until it displays 10, 20, 30, 40, etc ...).

    [​IMG]

    Now locate the three bytes from 000001C0. Notice that the third byte is a ZERO and it must stay this way, but you can change the other bytes to whatever you want. You will also want to change the bytes (and leave the last 0) in locations 00000200 and 00000230. You will notice in the picture the changes in red. Once you're done save the file.

    [​IMG]

    Next we're going to compile the template we've edited into a 3DS file. We will do this by first running 'C:\snes\3DS Builder.exe". You will notice a bunch of buttons and it might seem complicated at first, but it's pretty simple.

    Pick 'Open Romfs' and navigate to 'C:\snes\PackHack\ExtractedRomFS'

    Next pick 'Open Exefs' and navigate to 'C:\snes\PackHack\ExtractedExeFS'

    Follow that up by selecting 'Open Exheader' and select 'C:\snes\PackHack\DecryptedExHeader.bin'

    After that you will pick a name destination for the 3DS file you're about to create. You can name it anything (make sure to save it as a .3ds file by manually entering in the extension '3ds'), but you must place it in 'C:\snes\3DS Simple CIA Converter v4.30\roms' .

    Lastly, change the serial to anything you like.

    Once you've done all of this press 'Go'. There you've just created the 3DS file. If you're a flashcard user you can now use this to your liking, but if you're a CFW user there is one more step.

    [​IMG]

    If you are a CFW user open up 'C:\snes\3DS Simple CIA Converter v4.30\3ds_simple_cia.exe' , click 'Firmware Spoof' and then pick 'Convert 3DS ROM to CIA'. Next a window will pop-up and it should be in the 'C:\snes\3DS Simple CIA Converter v4.30\roms' folder. Pick 'Select Folder' and then it should say 'Finished'. Now you can locate the cia in 'C:\snes\3DS Simple CIA Converter v4.30\cia'.

    [​IMG]

    I hope you found this guide useful and I would appreciate any feedback.

    CREDITS

    I would like to thank Shiru for his awesome public domain Super NES game Classic Kong Complete that I used.

    I'd also like to thank Fugelmir for his original guides that I used for reference.

    Thanks to all of the authors of the programs used in the 7zip archive.

    Thanks to squee666 for helping with the COMMON image template specifications.

    [​IMG]
     
    Last edited by cots, Aug 5, 2016


  2. Platinum2183

    Member Platinum2183 GBAtemp Regular

    Joined:
    Feb 6, 2016
    Messages:
    102
    Country:
    United Kingdom
    Nice, thanks
     
  3. Nirmonculus

    Member Nirmonculus GBAtemp Advanced Fan

    Joined:
    Nov 4, 2014
    Messages:
    560
    Country:
    Philippines
    A bit similar to converting the gba roms. Hmm Shin Megami Tensei on my home menu, sounds great.
     
  4. cots
    OP

    Member cots GBAtemp Fan

    Joined:
    Dec 29, 2014
    Messages:
    466
    Country:
    United States
    Well, with the tools GBA is a 5 minute process.

    If anyone that reads this wants me to write a guide or documentation for an application please do contact me!
     
    Last edited by cots, May 19, 2016
    Nirmonculus likes this.
  5. Nirmonculus

    Member Nirmonculus GBAtemp Advanced Fan

    Joined:
    Nov 4, 2014
    Messages:
    560
    Country:
    Philippines
    Will try this out soon but will have to get my new 3ds tomorrow. :')
     
  6. Fugelmir

    Member Fugelmir GBAtemp Regular

    Joined:
    Mar 9, 2016
    Messages:
    138
    Country:
    Canada
    This looks awfully familiar. I could never get the sound to insert correctly. I want to try out your method :D

    It seems to be pretty picky about the filesize of either the bcwav or the banner itself.

    files of around 150kb seem to run perfectly.

    400kb+ don't seem to work.
     
    Last edited by Fugelmir, May 20, 2016
  7. cots
    OP

    Member cots GBAtemp Fan

    Joined:
    Dec 29, 2014
    Messages:
    466
    Country:
    United States
    Thanks for the additional information. I'll have to check it out.
     
  8. Azel

    Member Azel GBAtemp Fan

    Joined:
    Dec 16, 2014
    Messages:
    485
    Country:
    France
    cool guide !
    could you mention which special chips aren't supported by the n3dsVC? (you mentioned SuperFX1/2, will never be supported (SA-1 too) but DSP1, Cx (megaman X), SDD1 (street fighter zero 2 is out on jp eshop I think)) should work.
     
    Last edited by Azel, May 20, 2016
  9. dubbz82

    Member dubbz82 GBAtemp Maniac

    Joined:
    Feb 2, 2014
    Messages:
    1,405
    Country:
    United States
    cx chips will likely never work either, unless they are released officially as vc at some point (I have my doubts if the method of emulation n3ds uses to emulate this even has sufficient cpu power for emulating these chipsets) sdd1 might work via texture unpacking (they may have done this for street fighter zero 2, if you're indeed correct on that)
     
  10. derthomas

    Newcomer derthomas Advanced Member

    Joined:
    Mar 23, 2015
    Messages:
    79
    Country:
    Germany
    I tried to inject Another Treasure Island. It seems incompatible, or was I doing something wrong?
     
  11. caffVic

    Newcomer caffVic Member

    Joined:
    May 16, 2016
    Messages:
    28
    Country:
    Spain
    I'm trying to do this on Linux with all the WINEs and the MONOs, but when I finally launch the game, my 3ds craps out, pops an error and reboots.

    It is most likely that some tool is just not working right, but I would want to know if it could be because I tried to inject a PAL rom. Unirally to be precise.
     
  12. Mariosl10

    Member Mariosl10 GBAtemp Regular

    Joined:
    Dec 28, 2015
    Messages:
    144
    Country:
    United States
    Can you do this on a regular 3ds
     
  13. caffVic

    Newcomer caffVic Member

    Joined:
    May 16, 2016
    Messages:
    28
    Country:
    Spain
    So nope.
     
  14. dubbz82

    Member dubbz82 GBAtemp Maniac

    Joined:
    Feb 2, 2014
    Messages:
    1,405
    Country:
    United States
    Even if you COULD get the vc games up and running, they don't run at a usable speed with o3ds clock speeds (i've actually tried this before, you end up with speeds in the neighborhood of 15fps or so, and VERY choppy audio). The problem is, the method that nintendo uses for emulation of the vc games, it's significantly more cpu heavy than what other homebrew emulators use (blargSNES for example heavily uses and abuses gpu based emulation).
     
  15. squee666

    Member squee666 Advanced Tech Pleb

    Joined:
    Sep 17, 2010
    Messages:
    1,585
    Location:
    Belfast
    Country:
    United Kingdom
    Sorry to rain on your parade but here are a few things

    you pack cannot be linked here. PUBLICDOMAIN.CIA is for one contains a MegaMan7 Rom which is piracy
    Its also using the SuperMarioWorld.CIA as its Base which is piracy

    also you are the 3RD guide on SNES 3/3 so far that has gotten ICON injecting Wrong (which is probably why people make poor banners)

    Here are the examples of a real banner vs templates (and what everyone else has been using)

    [​IMG] [​IMG] [​IMG] [​IMG] [​IMG] [​IMG]
     
  16. cots
    OP

    Member cots GBAtemp Fan

    Joined:
    Dec 29, 2014
    Messages:
    466
    Country:
    United States
    Your example banners are exactly the same size as the ones in the guide and for the legality of the guides resource files they are not hosted on this site and I'm unaware of any copyright issues, but if a moderator asks I will remove the link.

    I just finished injecting this ROM and it worked fine. If the icon/banner are not appearing it may be an issue with the sound file so if that's your issue just try running the emulator and see if it works. Also, the injection tool asked me if I wanted to convert a PAL ROM to NTSC and I said 'yes'.
     
  17. squee666

    Member squee666 Advanced Tech Pleb

    Joined:
    Sep 17, 2010
    Messages:
    1,585
    Location:
    Belfast
    Country:
    United Kingdom
    if you Hex edit the Title ID too large it will crap out

    2 things your eyesight and your braincell amount must be linked.
    you are clearly blind and retarded

    1:
    [​IMG] [​IMG]

    These 2 files look completely different yes the resolution is the same but they are different you want to know why? Thats because it will clip the TV if it isnt the smaller size cutting off the banner

    As you can see (or not) they are not the same size, if you would stop copying a mixture of a broken Wololo guide, fonzd Guide and read the actual Snes inject thread you would know this.


    2: You are directly linking to illegal files sure you are not the host but you have already claimed on this thread its your pack and files which directly linking too is also against Temp Rules
     
    Last edited by squee666, May 21, 2016
  18. cots
    OP

    Member cots GBAtemp Fan

    Joined:
    Dec 29, 2014
    Messages:
    466
    Country:
    United States
    The banner appears larger in the screenshot then it actually is due to the way the image hosting site deals with web links. The images you speak of that are in the archive are exactly the same size of the pictures you linked to.
     
  19. squee666

    Member squee666 Advanced Tech Pleb

    Joined:
    Sep 17, 2010
    Messages:
    1,585
    Location:
    Belfast
    Country:
    United Kingdom
    Both images are 128x128
    are you that blind both these images are the Exact same resolution
    The mario image however has transparency
    thats because as much as it is the SAME YES SAME resolution as the donkey kong one the INTERNAL image is smaller
    Thats because if you do not make the image the size as it is Exampled your TV will clip and images will be off centered

    see an example

    [​IMG]
     
  20. Minox

    Supervisor Minox Spytech Employee

    Joined:
    Aug 27, 2007
    Messages:
    5,818
    Country:
    Sweden
    Please don't distribute copyrighted material on GBAtemp.
     

Share This Page