[BigWIP][Tutorial] Universal Injection (VC / Mangas)

Discussion in '3DS - ROM Hacking, Translations and Utilities' started by Asia81, Mar 6, 2016.

  1. Asia81
    OP

    Asia81 In my Ecchi World <3

    Member
    4,877
    2,348
    Nov 15, 2014
    France
    Albi
    Universal Injection

    Hey, here is a big tutorial, and will allow you to inject some kinds of things.
    Virtual Console Games (GB, GBC, GBA, NES, SNES, GameGear & PC-Engine) and Mangas :wub:.

    So, let's begin.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​

    Summary

    - What you need
    - Prerequisites
    - Manga Injection
    - SNES Injection
    - GBA Injection
    - GB(C) Injection
    - NES Injection
    - GameGear Injection
    - PcEngine Injection

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    What you Need

    • A 2DS/O3DS/N3DS with SysNand Firmware between 4.1 and 10.7 (9.3+ is only for A9LH users)
    • A Rom of the game you want inject, or scans in jpg for Mangas
    • WinRAR, or another archive extractor
    • This PackHack: Click Here
    • The Injection Pack: NOT READY YET
    • Notepad++: Click Here
    • Optional: 3DS Simple CIA Converter: Click Here

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Prerequisites

    Install the new SetupUS.exe of HackingToolkit3DS as a common tool:


    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Mangas Injection

    Part 1: Icon Creation

    Go to the 3DS_Banner_Maker folder.
    Open AppData.txt.

    Edit what is strictly between quotes:
    Code:
    longtitle="Title"
    shortitle="Description"
    publisher="Asia81"
    Save the txt.
    For the icon, you'll need 2 PNG files.
    1 with a size of 48x48, another with 24x24 instead.

    Name them as follow:
    Code:
    PNG with size of 24x24 = icon1.png
    PNG with size of 48x48 = icon2.png
    Now that you have edited the txt, and have those 2 PNG needed, you can start Build.bat
    An icon.bin is generated.
    You can deleted the banner.bin generated since it's not what we want.

    Part 2: Banner Creation

    Now you need to extract the CIA.
    Once done, you'll see an ExtractedBanner folder, with inside all decrypted files of the banner.
    Open banner.cgfx with Ohana3DS, export and edit your PNG.
    Once done, re-import the PNG in the cgfx using Ohana3DS, save, and exit.
    Run HackingToolkit3DS -> banner -> 2
    A banner.bin will be generated.

    In the ExtracedExeFS folder, delete icon.bin and banner.bin, and replace them with what you obtained in Part 1 and 2.

    Part 3: Edit the amount of pages

    This part is the more easy to edit.
    You have just to delete/add the any number of pages you want.
    Pages should be JPG only and size 800x1200.
    You can't use double pages, you need to split them.
    And pages should be named like that :
    Code:
    1_page_area.jpg
    2_page_area.jpg
    3_page_area.jpg
    4_page_area.jpg
    ...
    Once you added/removed pages, now you need to edit these 3 files:
    - 3ds.opf
    - advanced.opf
    - standard.opf

    Open them with NotePad++.

    Scroll and remove/add those kind of lines:
    Code:
        <itemref idref="images/190_page_area.jpg" image_w="800" properties="page-spread-left"/>
        <itemref idref="images/191_page_area.jpg" image_w="800" properties="page-spread-right"/>
    Or
    Code:
      <item id="image190" href="images/190_page_area.jpeg" media-type="image/jpeg" />
      <item id="image191" href="images/191_page_area.jpeg" media-type="image/jpeg" />
    Or
    Code:
     <item id="image190" href="images/190_page_area.jpg" media-type="image/jpeg" />
    <item id="image191" href="images/191_page_area.jpg" media-type="image/jpeg" />
    Save and close opf files.

    Part 4: Edit the Synopsis

    [​IMG]

    Open QuickBMS.exe.
    1st Time: Open the Nisekoi.bms plugin
    2nd Time: Open sample.arc
    3rd Time: Select a place where to save decrypted files

    Now, open 00000006.lid with NotePad++.
    Synopsis is in PlainText.
    Be sure to don't write too long lines for the synopsis (Just use enter for a newline).

    Edit your text, edit also, in the 2nd line, all things like Publisher, etc...

    I don't know where are strings "Auteur", "Magazine", "Label". I will check it later.

    Save and close the file.

    Open ReImport.bat.
    1st Time: Open the Nisekoi.bms plugin
    2nd Time: Open the clean sample.arc from your RomFS
    3rd Time: Select the place where ARE your derypted files (so the files you edited)

    If you have any error, telling you that your file is too big, you need remove some text.
    You can't reimport the file if the size is biggest than the original.

    [​IMG]

    Part 5: Translate the UI

    XXX
    XXX





    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    SNES Injection

    Part 1: Icon Creation

    Go to the 3DS_Banner_Maker folder.
    Open AppData.txt.

    Edit what is strictly between quotes:
    Code:
    longtitle="Title"
    shortitle="Description"
    publisher="Asia81"
    Save the txt.
    For the icon, you'll need 2 PNG files.
    1 with a size of 48x48, another with 24x24 instead.

    Name them as follow:
    Code:
    PNG with size of 24x24 = icon1.png
    PNG with size of 48x48 = icon2.png
    Now that you have edited the txt, and have those 2 PNG needed, you can start Build.bat
    An icon.bin is generated.
    You can deleted the banner.bin generated since it's not what we want.

    Part 2: Banner Creation

    Open the Template folder, and choose the SNES Template.
    Now you need to complete it.
    Open Ohana3DS (Not Rebirth).
    Go in Textures Tab, and open banner.cgfx.

    Export as PNG:
    Code:
    COMMON1.png (FYI, the size is 128x128)
    COMMON1_2.png (FYI, the size is 64x64)
    COMMON1_3.png (FYI, the size is 32x32)
    Always in the Textures Tab, open 1 of the bcmdl files, choose XXX_YY2.png and XXX_YY3.png, then export them as PNG.

    Code:
    XXX is Region
    YY is Language
    Open Photoshop, or your favorite Photo Editor.
    Open COMMON1.png, replace what is in red by the TitleScreen of your game (Or what you want, but use the TitleScreen of your game is better ;)) and save.
    Do the same with COMMON1_X.png and save them.
    Open COMMON2.png, edit it and save it.
    You can write what you want, but the name + release date seems to be more professional ;)

    You can also use a sticker to your cartridge, you this PNG as a base for EUR:
    [​IMG]

    And this for USA:
    [​IMG]

    Once all is edited, open again your .cgfx + .bcmdl files, and do Import instead Export this time.
    Once you imported it in Ohana3DS, don't forget to Save it.

    Open HackingToolkit3DS.exe.
    In the same folder as the HackingToolkit3DS, create a new folder and name it ExtractedBanner.
    Inside, put all your files from the template folder (so the files you just edited for the banner).
    Run HackingToolkit3DS -> banner -> 2
    A banner.bin will be generated.

    Part 3: UniqueID Editing

    If you want change the UniqueID (for allow multiple CIA installations with the same base game), then do that.
    Open your DecryptedExHeader.bin in HxD, and check the Offsets on the left, you have the TitleID on the right (Be careful, it's reversed):
    [​IMG]
    In this picture, it's the TitleID for Pokémon Alpha Sapphire.

    Part 4: Rom Injection

    Open your SnesRom.sfc in Snes9x (it's a SNES emulator) and see what appears:
    [​IMG]

    Now open SnesInyector.
    [​IMG]

    Click File -> Open, and target the data.bin file (in your ExtractedRomFS folder).
    BTW, you should use a clean data.bin, not an already edited file.
    So if you want do another Snes injection, you need to re-extract the base rom.

    Now click Select Rom, and load your SnesRom.sfc.
    If your rom is a PAL/EUR version it will ask you if you want convert it to NTSC:
    [​IMG]

    You SHOULD click yes, if you don't do it, you will got an error th CIA boot.
    Why? Because Nintendo released JP and USA Snes rom only.
    I don't speak about the cia's region, but the rom itself.

    SnesInyector should also load all info needed from your SnesRom.sfc.
    Check if the rom type (LoRom / HiRom) and size are correct, if so, then click save and OVERWRITE the existing data.bin.
    This is why we opened our rom in Snes9x :)
    OVERWRITE is important, since it will not create a new full file, but edit your existing file.

    Close SnesInyector, and open your edited data.bin with HxD.
    Edit the serial at 0x28.
    For example, for Zelda ALTTP, I used ATTP (KTR-ATTP).
    Once edited with HxD, don't forget to delete the .bak file.

    Now the injection should be done.
    Open HackingToolkit3DS, write RFSB.
    RomFS Builder is now open.
    With it open your ExtractedRomFS folder (in PackHack)

    Before continue, don't forget to edit your icon.bin and your banner, and rebuild the banner in a banner.bin file. Once done, delete the old banner.bin / icon.bin in ExtractedExeFS, and put your custom files.

    Open HackingToolkit3DS, write 3DSB.
    3DS Builder is now open.

    Check Use a RomFS binary, and select the RomFS rebuild (the one with your edited data.bin).
    Uncheck Use a ExeFS binary, and select the ExtractedExeFS folder. Be patient, the compression shouldn't be very long.

    Click Open ExHeader, and select your DecryptedExHeader.bin file.

    Now edit the Serial Code again but in 3DS Builder this time.
    Don't forgot, for Snes roms, it's KTR and not CTR (KTR are exclusive N3DS title).

    Then you can click GO, it will generate a playable .3ds for your Gateway, or if you want a .cia, just convert this .3ds to .cia using 3DS Simple CIA Converter.

    Install the CIA.
    Try the rom.
    If working, enjoy.
    If not, post here and we will try to help you.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​

    GBA Injection

    Note: If you're using A9LH + Aureinand, you can skip the Part2!

    Part 1: Footer Creation

    Open FooterGenerator.exe.
    Click onto Load from Rom, and select any .gba rom.
    Click create, and save the file as footer.ftr.

    Part 2: AGB Firmware Patching

    You'll need to install a patched firmware to get your GBA CIA working.
    If you want to play the CIA on your EmuNand, you'll have to install the correct patch on only your EmuNand.
    But remember, it's only for the AGB_Firmware. If you want to play the CIA in your EmuNand, the GBA CIA need to be install in both NAND.

    Open the AGB_Firmware folder, take O3DS_AGB_Patched.cia or N3DS_AGB_Patched.cia and install it where you want (SysNand and/or EmuNand).

    Part 3: Rom Injection

    Open 3DS_Simple_GBA_Converter.exe.
    Choose a TitleID, or keep the given.
    Load all what is needed (Footer, PNG for banner, etc...)

    Once it's done, click Begin, wait and save your CIA.
    Try the rom.
    If working, enjoy.
    If not, post here and we will try to help you.

    Optionnal: You can now extract the CIA, edit your icon/banner (if you want a custom banner) and rebuild the CIA.

    More info here:
    https://gbatemp.net/threads/poc-tutorial-how-to-build-a-gba-in-cia-with-your-custom-banner.411211/

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    GB and GBC Injection

    Part 1: Icon Creation

    Go to the 3DS_Banner_Maker folder.
    Open AppData.txt.

    Edit what is strictly between quotes:
    Code:
    longtitle="Titre"
    shortitle="Description"
    publisher="Asia81"
    Save the txt.
    For the icon, you'll need 2 PNG files.
    1 with a size of 48x48, another with 24x24 instead.

    Name them as follow:
    Code:
    PNG with size of 24x24 = icon1.png
    PNG with size of 48x48 = icon2.png
    Now that you have edited the txt, and have those 2 PNG needed, you can start Build.bat
    An icon.bin is generated.
    You can deleted the banner.bin generated since it's not what we want.

    Part 2: Banner Creation

    Open the Template folder, and choose 1 template.
    Now you need to complete it.
    Open Ohana3DS (Not Rebirth).
    Go in Textures Tab, and open banner.cgfx.

    Export as PNG:
    Code:
    COMMON1.png (FYI, the size is 128x128)
    COMMON1_2.png (FYI, the size is 64x64)
    COMMON1_3.png (FYI, the size is 32x32)
    COMMON1_4.png (FYI, the size is 16x16)
    COMMON1_5.png (FYI, the size is 8x8)
    Always in the Textures Tab, open 1 of the bcmdl files, choose COMMON2.png and export it as PNG:
    [​IMG]

    Open Photoshop, or your favorite Photo Editor.
    Open COMMON1.png, replace what is in red by the TitleScreen of your game (Or what you want, but use the TitleScreen of your game is better ;)) and save.
    Do the same with COMMON1_X.png and save them.
    Open COMMON2.png, edit it and save it.
    You can write what you want, but the name + release date seems to be more professional ;)
    [​IMG]

    Once all is edited, open again your .cgfx + .bcmdl files, and do Import instead Export this time.
    Once you imported it in Ohana3DS, don't forget to Save it.

    Download HackingToolkit.exe.
    In the same folder as the HackingToolkit, create a new folder and name it ExtractedBanner.
    Inside, put all your files from the template folder (so the files you just edited for the banner).
    Run HackingToolkit -> banner -> 2
    A banner.bin will be generated.

    Part 3: Rom Injection

    Read Carefully!

    Drag'n'Drop the BlankFile.3ds onto prepare.exe.
    A tempfold folder is generated.
    Take a .gb or .gbc rom, and name it without spaces or any specials caracters.

    Drag'n'Drop the rom onto:
    If you want create a 3DS: Create3DS.exe
    If you want create a CIA: CreateCIA.exe

    Now you're asked for enter some informations:
    [​IMG]

    Once it's done, the tempfold folder will open itself.
    [​IMG]
    (Ignore the message with EveryFileExplorer).

    Delete banner.bin and icon.bin, and replace them by your own you got in Part 1 and Part 2.

    If you want your rom in FullScreen, open tempfold -> romfs -> config.ini and search for:
    Code:
    [CGB]
    Width = 267
    Height = 240
    Delete 267 and write 400 instead. Save and close.

    Your DOS windows always open, press enter for let the process continue.
    Try the rom.
    If working, enjoy.
    If not, post here and we will try to help you.

    Video Tutorial:
    SOON

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​


    NES Injection

    Working...
    I need help on this, please help me!
    I don't know how to inject NES roms!

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​

    GameGear Injection

    Working...
    I need help on this, please help me!
    I don't know how to inject GameGear roms!

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​

    PcEngine Injection

    Working...
    I need help on this, please help me!
    I don't know how to inject PcEngine roms!
     
    Last edited by Asia81, Jul 13, 2016


  2. Asia81
    OP

    Asia81 In my Ecchi World <3

    Member
    4,877
    2,348
    Nov 15, 2014
    France
    Albi
    I'm writing it, and hope it will be finished today or tommorow max.
    Sorry for the delay
     
    tiduscrying likes this.
  3. Asia81
    OP

    Asia81 In my Ecchi World <3

    Member
    4,877
    2,348
    Nov 15, 2014
    France
    Albi
    The gb(c) part should be finished.

    BTW, I don't know how to inject NES and PC-Engine game, so if someone have some infos about it, please share with me ;)
     
  4. duffmmann

    duffmmann GBAtemp Psycho!

    Member
    3,559
    1,426
    Mar 11, 2009
    United States
    You should consider adding the instructions for injecting Genesis/Mega Drive games into the 3D Sega classics titles, there are instructions for so on the iso site.
     
  5. Asia81
    OP

    Asia81 In my Ecchi World <3

    Member
    4,877
    2,348
    Nov 15, 2014
    France
    Albi
    Why not.
    I finish to write what I know, then after I will learn about megadrive / pcengine / nes, for now idk to inject them.
     
  6. Mistie

    Mistie Legit Furry Trash

    Member
    177
    159
    Jan 20, 2016
    Canada
    Hyrule
    Excited to see this tut come along! Keep up the good work bud! :3

    Is it possible you could banner images for specific consoles rather than just the "Custom Virtual Console"?

    Will this include troubleshooting why saves aren't working in specific injected games? IIRC games like Pokemon FireRed/Emerald can't properly save...
     
    Last edited by Mistie, Mar 6, 2016
  7. Asia81
    OP

    Asia81 In my Ecchi World <3

    Member
    4,877
    2,348
    Nov 15, 2014
    France
    Albi
    I don't understand what you mean :/ ?
     
  8. dudenator

    dudenator King of the Carts

    Member
    473
    52
    Mar 7, 2009
    Canada
    Alberta

    That little banner normally just says "Virtual Console". It doesn't mention the console at all.
     
  9. Mistie

    Mistie Legit Furry Trash

    Member
    177
    159
    Jan 20, 2016
    Canada
    Hyrule
    Never mind i'm stupid. I was talking about the bottom part of the banner that says "Custom Virtual Console" but I realized that it just says virtual console anyways. :P

    — Posts automatically merged - Please don't double post! —

    Ninja'd me calling myself an idiot :P
     
  10. Asia81
    OP

    Asia81 In my Ecchi World <3

    Member
    4,877
    2,348
    Nov 15, 2014
    France
    Albi
    gba injection should be done
     
  11. Asia81
    OP

    Asia81 In my Ecchi World <3

    Member
    4,877
    2,348
    Nov 15, 2014
    France
    Albi
    Please, help me for NES and PCEngine!
     
  12. Ev1l0rd

    Ev1l0rd ◥▷◁◤ Knight of Void

    Member
    963
    647
    Oct 26, 2015
    Netherlands
    Land of Darkness and Bounty
    Quick suggestion if you need to find a guide on the NES part, on that iso site there is a thread that deals with explaining the injection for all existing VC's (not too certain about SNES, but certain about NES, GBA, GB, GBC).
     
    Asia81 likes this.
  13. Rohul1997

    Rohul1997 GBAtemp Fan

    Member
    336
    309
    Dec 7, 2015
    Giant Chasm
    Thanks for this
     
  14. Arseface_TM

    Arseface_TM Board Game Dev

    Member
    324
    184
    Sep 16, 2015
    United States
    I'm dumb. These guides are saying to open folders and programs. Where do I get them?
     
  15. Asia81
    OP

    Asia81 In my Ecchi World <3

    Member
    4,877
    2,348
    Nov 15, 2014
    France
    Albi
    you wait
     
    Ev1l0rd, Mistie and Arseface_TM like this.
  16. Mudkip SSJ4

    Mudkip SSJ4 Advanced Member

    Newcomer
    67
    25
    Sep 12, 2009
    France
    Thanks for your efforts Asia81, you're really a nice guy!
     
  17. Asia81
    OP

    Asia81 In my Ecchi World <3

    Member
    4,877
    2,348
    Nov 15, 2014
    France
    Albi
    I will have to send my N3DS to repair, so I will also take a little break on the 3ds scene
     
  18. Logan Pockrus

    Logan Pockrus Knawledge is key.

    Member
    1,338
    1,020
    Jan 1, 2016
    United States
    Where exactly can I find the aforementioned "HackingToolkit.exe"?
     
  19. Ev1l0rd

    Ev1l0rd ◥▷◁◤ Knight of Void

    Member
    963
    647
    Oct 26, 2015
    Netherlands
    Land of Darkness and Bounty
    HackingToolkit.exe is a package made by @Asia81 that contains various decompiling/recompiling tools for romhackers. It's on one of their other tutorials.
     
  20. Logan Pockrus

    Logan Pockrus Knawledge is key.

    Member
    1,338
    1,020
    Jan 1, 2016
    United States
    Thanks!
    You just earned yourself another internet, by the way!
     
    Last edited by Logan Pockrus, Mar 9, 2016
    Ev1l0rd likes this.