1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Welcome to Chaos Gamez


    View the announcement post made by Webmaster to read what's new, and what's changed with 3dschaos & wiiuchaos.
  3. Problem Signing up?

    Please use the contact us link at the bottom of the site listing the problem with your email & ip addresses & the problem will be looked into by our admin team
  4. Temporary emails are not supported for signing up accounts on Chaos Gamez, this includes 10 minute emails. All will be detected by our system & the accounts will be deleted
  5. Shared accounts, multiple accounts & inappropriate usernames not allowed on our site

    Please use a legit email account from a reliable email provider, temporary email accounts are not allowed & will be rejected by our system
Dismiss Notice
DMCA Notice

No files are stored on our servers, all links are on external sites. If you have an issue with one of the posts/threads on our site or to make a DMCA report please use the "Contact Us" link at the bottom of the site

[TUTORIAL] - Convert NES ROMs to NES VC 3DS and CIA files

Cha0s Em3rald Oct 18, 2015

  1. Cha0s Em3rald

    Cha0s Em3rald is a Verified  MemberCha0s Em3rald Chaos Immortal Staff Member Administrator

    Joined:
    Oct 1, 2015
    Messages:
    4,020
    Likes Received:
    144,875
    Trophy Points:
    148
    [TUTORIAL] - Convert NES ROMs to NES VC 3DS and CIA files


    This guide was writen by davhuit of GBA Temp, credit & thanks go to him for allowing me to repost his guides on 3DS Chaos


    Hello.

    Someone asked me some tutorials in a private message and though there might be some on the web, I decided to write mines to help, and I'll share them here.

    So, how to convert a NES rom to a 3DS NES VC easily :

    /! NOTE : CONTRARY TO OTHERS INJECTORS WHICH RUN FINE ON A 32-BITS OPERATING SYSTEM, THE NES ONE REQUIRE A 64-BITS OPERATING SYSTEM TO WORK PROPERLY /!

    1) First, download this pack of tools that contains everything you need : Download 3DS NES Injector zip and extract it in a folder. You also need need Python Download python msi and Pillow Download Pillow win amd64 py2 exe installed on your computer to use the cia converter but you'll also need them for the banner/icons parts anyway.

    2) Download a NES Rom. This build use the SMB3 US Rom as it's base so it's not recommanded to use European roms (which run at 50fps, when USA/JPN ones run at 60 FPS, though some European games will still run fine). Note that this game offer the "download play" option but the support for this option is broken so you won't be able to use it. Now that the rom is downloaded, extract it in the same folder you extracted the tools.

    3) You need to create proper banner/icons. To know how, check this tutorial : http://3dschaos.com/3ds-tutorials/4...y-color-gamegear-genesis-post656.html#post656

    4) If you followed with success the tutorial in the step 3, you should now have two files. One called "banner.bin" and another one called "icon.bin" which are
    the banner and two icons required to create a custom NES VC game.

    5) Now, open the "RSF.rsf" in a text editor (Notepad is enough) and edit three lines :

    - Title : "Insert a name here"
    - ProductCode : "CTR-N-XXXX" (replace the XXXX with 4 letters)
    - UniqueId : 0x00XXXX (replace the XXXX with four digits)

    In my example, it give me this :

    - Title : "Super Mario Bros. (W)"
    - ProductCode : "CTR-N-SMB1"
    - UniqueId : 0x000170

    Note : You can't install two .cia files with the same UniqueId (seems normal) so be careful about the id you choose if you want to share it converted to a .cia file later. If you only use/share .3DS file, then the id is not really important and can always be the same, as you don't install .3DS file, just run them. I
    used 0000-0300 and 2000-3000 in my own VC Games/thread, and retail 3DS games converted to CIA (the ones I saw, at least) seems to use UniqueID from 0400 to 1900, that's why I used 0-300 + 2000-3000.

    If you want to be safe and stay compatible with mines, the best would be to use 6000+ UniqueID. If you only keep them for you, then the UniqueID is not really important, just use one that isn't already used by your 3DS (you can list the programs installed on your 3DS and their UniqueID/Serial with a cia installer like BigBlueMenu or other apps like that).

    Once the "RSF.rsf" is edited, of course, save the modifications.

    6) Take the "banner.bin" and "icon.bin" files you created in the step three, then copy-paste/move them to the "decrypted\exefs" subdirectory and overwrite the existing ones.

    7) Now, here's the tricky part with NES games. You'll have to edit your rom with an hexadecimal editor to modifiy the header. I won't really explain how
    hexadecimal editing is working here. If I really decide to explain it, it'll be done in another tutorial and then I'll add the link to this tutorial. Basically, I use "Hex Workshop" for that purpose. You just have to load the rom in it, then two columns are displayed. Left one are the bytes from the rom, and the right one is their equivalent in ASCII. Only the first 10 bytes (so a bit more than the half of the first line) need to be modified.

    How to modify it ? First, you need to run the "nesmapperprogram.exe" program, and load your rom in it. Don't forget to click on the "Analyze" button if you want the program to give you a result (and if you load several roms one after the other, remember to click on the "Analyze" button after each rom loaded if you want the results to be refreshed).

    Basically, we need six informations to modify the rom : Mapper, Program (PRG) size, Character (CHR) size, WRAM (backup battery), Mirroring type and VRAM.

    With "Super Mario Bros (W)", here's the results the program give me :

    NES Mapper : No Mapper [NROM]
    Mirroring : [Vertical Mirroring]
    Program Size (PRG) : 32kb
    Character Size (CHR) : 8kb

    (VRAM and Battery aren't important here, we'll check them with another thing, because they doesn't seem to be pretty accurate in this program, contrary to the other settings).

    Now, we need to find if the game is using WRAM (so games which use a backup battery) and VRAM (Video RAM). We'll use the "nes.xml.txt" file for that. Load the file in a text editor (the text file is pretty big so you better open use with a better text editor than Notepad or Wordpad. Notepad2 or Notepad++ will load it without any problem). Once the text file is loaded, use the search function to search for the game name. Here's the results for "Super Mario Bros. (World)" :

    Code:

    <software name="smb1" cloneof="smb">
    <description>Super Mario Bros. (World)</description>
    <year>1985</year>
    <publisher>Nintendo</publisher>
    <info name="serial" value="HVC-SM, NES-SM-USA, NES-SM-GBR"/>
    <info name="release" value="19850913 (JPN), 198510xx (USA), 1987? (Euro)"/>
    <info name="alt_title" value="????????????"/>
    <part name="cart" interface="nes_cart">
    <feature name="slot" value="nrom" />
    <feature name="pcb" value="HVC-NROM-256" /> <!-- also found with NES-NROM-256 pcb -->
    <feature name="mirroring" value="vertical" />
    <feature name="pcb_model" value="NES-NROM-256-03" />
    <feature name="u1" value="U1 PRG" />
    <feature name="u2" value="U2 CHR" />
    <feature name="u3" value="U3 CIC" />
    <feature name="cart_back_label" value="" />
    <dataarea name="prg" size="32768">
    <rom name="hvc-sm-0 prg.u1" size="32768" crc="5cf548d3" sha1="fefa1097449a3a11ebf8c6199e905996c5dc8fbd" offset="00000" />
    </dataarea>
    <dataarea name="chr" size="8192">
    <rom name="hvc-sm-0 chr.u2" size="8192" crc="867b51ad" sha1="394badaf0b0bdd0ea279a1bca89a9d9ddc00b1b5" offset="00000" />
    </dataarea>
    </part>
    </software>

    The game doesn't use any WRAM (backup battery) or VRAM as there is nothing which indicates it in this file. I'll show you an example with a game using both to let you see how it's looks in the file :

    Code:

    <software name="akagawa">
    <description>Akagawa Jirou no Yuurei Ressha (Jpn)</description>
    <year>1991</year>
    <publisher>King Records</publisher>
    <info name="serial" value="KIN-YU"/>
    <info name="release" value="19910208"/>
    <info name="alt_title" value="?????????"/>
    <part name="cart" interface="nes_cart">
    <feature name="slot" value="sxrom" />
    <feature name="pcb" value="HVC-SNROM" />
    <feature name="mmc1_type" value="MMC1B2" />
    <dataarea name="prg" size="262144">
    <rom name="kin-yu-0 prg" size="262144" crc="9d976153" sha1="05779cc072cafcecb91be5c7eeb8fd86519a4a6b" offset="00000" />
    </dataarea>
    <!-- 8k VRAM on cartridge -->
    <dataarea name="vram" size="8192">
    </dataarea>
    <!-- 8k WRAM on cartridge, battery backed up -->
    <dataarea name="bwram" size="8192">
    <rom value="0x00" size="8192" offset="0" loadflag="fill" />
    </dataarea>
    </part>
    </software>

    You can see, in this another example, the lines "<!-- 8k VRAM on cartridge -->" and "<!-- 8k WRAM on cartridge, battery backed up -->". We don't care about how much WRAM or VRAM are used, we just need to know if it use some or not.

    So let's back to our example, "Super Mario Bros. (World") ,and let's resume what we know :

    NES Mapper : No Mapper [NROM]
    Mirroring : [Vertical Mirroring]
    Program Size (PRG) : 32kb
    Character Size (CHR) : 8kb
    WRAM : No
    VRAM : No

    It's near over The emulator used for the injection require a 10 bytes header, which looks like that : ? ? ? ? ? ? ? ? ? ?

    First four bytes are always the same : 54 4E 45 53 (ASCII equivalent : TNES)

    Byte n°5 is the Mapper, byte n°6 is the PRG Size, byte n°7 is the CHR size, byte n°8 is the WRAM, byte n°9 is the Mirroring type and byte n°10 is the VRAM, so to summary : 54 4E 45 53 (Mapper) (PRG) (CHR) (WRAM) (Mirroring) (VRAM)

    How to convert the infos we know in hex values ? Well, you just need to follow this chart :

    * Byte n°5 : Mapper

    NROM => 00
    MMC1 => 01
    MMC2 => 02
    MMC3 => 03
    MMC4 => 04
    MMC5 => 05
    UNROM => 06
    CROM => 07 (also seem to work with 08)
    AROM => 09

    If you rom is using another mapper, then your only bet is to try random values, create several roms and test all of them :/ That's how I found the CROM value not so long ago, which was unknown before. I tried to convert a rom using the CROM mapper and created several conversions of it with several values and noticed the ROM was working fine with the 07 and 08 values.

    * Byte n°6 : PRG Size

    16k => 02
    32k => 04
    64k => 08
    128k => 10
    256k => 20
    512k => 40
    1024k => 80

    * Byte n°7 : CHR Size

    0 => 00
    8 => 01
    16 => 02
    32 => 04
    64 => 08
    128 => 10
    256 => 20
    512 => 40
    1024 => 80

    * Byte n°8 : WRAM

    No => 00
    Yes => 01

    * Byte n°9 : Mirroring

    None => 00
    Horizontal => 01
    Vertical => 02

    * Byte n°10 : VRAM

    No => 00
    Yes => 01

    So, let's back with the info we know for "Super Mario Bros. (World)" :

    NES Mapper : No Mapper [NROM]
    Mirroring : [Vertical Mirroring]
    Program Size (PRG) : 32kb
    Character Size (CHR) : 8kb
    WRAM : No
    VRAM : No


    So, byte n°5 will be 00 (NROM), byte n°6 will be 04 (32kb), byte n°7 will be 01 (8kb), byte n°8 will be 00 (No WRAM), byte n°9 will be 02 (Vertical mirroring)
    and byte n°10 will be 00 (No VRAM).

    So, the final header of the game will be : 54 4E 45 53 00 04 01 00 02 00

    You just need to replace the first 10 bytes of your rom, in a hexadecimal editor, with those new 10 bytes and then save your rom. I often rename them as
    "Nameoftherom-FIX.nes" to remember which one have the fixed header. In my example, I called it "SMB1-FIX.nes" Note that a rom with a fix header won't run anymore on a PC NES emulator but that's a normal behavior.

    Now that you have your NES roms with your fixed header, lets go back to the general explanation.

    8) You need to copy-paste/move your fixed rom (SMB1-FIX.nes for me) in the "decrypted/romfs/rom" subdirectory. You'll see a "NESUMA1A.055" in this directory, which is the rom used by the VC emulator. Delete it and rename your NES rom (SMB1-FIX.nes for me) with the same name. Once your rom is renamed "NESUMA1A.055", you are one step before the end

    9) The RSF file is ready (step 5), the banner/icons are also ready (step 6), as well as the rom (step 8), now you just need to run the "makerom.bat" file and wait a few seconds. Once it's done, press any key to close the command line window. You should now have a "romedited.3ds" in the injector directory, which is your NES rom injected in a .3DS file. If you want to convert several roms one after the other, remember to rename the .3DS files once created because the "makerom.bat" will overwrite any "romedited.3ds" files if they are any in it's directory. Here, I'll rename mine : "SMB1-NES.3ds". If you wanted a .3ds file, then the tutorial is over for you If you wanted a .cia file, go to step 10 and keep reading.

    10) Download this pack : Download 3DS CIA Converter NES rar and extract it to a folder. Then, put your 3DS NES file in the same directory. Now, run "3DS To CIA Converter.bat". It'll offer you several possibilities :

    * Type : 3 (Converters), then 5 (Start VC 3DS to CIA Converter).

    * Enter the rom name (in my example : "SMB1-NES.3ds").

    * Answer "n" to the message "Try Alternative Method if Previous Failed (note that the "n" should be a lowercase one for the choice, even if the message show uppercases letters).

    * Answer "n" to the message "Would You Like To Replace The NES/GB/GBC/GBA Rom (again, the "n" should be a lowercase one for the choice)

    * Just wait until the cia file is created. You'll briefly see a message saying the CIA file won't be encrypted. Don't worry, it's normal.

    * The message "CIA File Created Now Copy to 3DS Large SD Card And Install Through DevMenu" will be displayed, just press any key to continue.

    * To close the program, either hit enter in the first menu as written in the screen or just close it manually with the cross in the upper-right corner, either is
    fine.

    * The cia file is created. In my example, the cia file is called "SMB1-NES.cia", so the tutorial is over
     
    kapeas likes this.
  2. kapeas

    kapeas New Member

    Joined:
    Apr 20, 2016
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for this, great work putting it all together and focused on NES. I've had some trouble finding detailed information regarding injecting nes roms. Getting all the stuff right now. I will let you know if I find any trouble while following the tutorial.

    Edit: Link for step 3 is broken.
    Edit2: Step 3 link:
    Edit3: Super Spike V'Ball (US) working (skipped the custom pictures part, just to check the header modification was good). Thanks for the tutorial.
     
    Last edited: Jul 29, 2016
iHax Comunity/