Integrating a hans hack into a .cia

Discussion in '3DS - ROM Hacking, Translations and Utilities' started by Red46, Aug 7, 2016.

  1. Red46
    OP

    Red46 Member

    Newcomer
    23
    5
    Mar 17, 2016
    Italy
    I've got a hack that is meant to run with hans for pokemon ruby and, I would like instead ot integrate it directly into the .cia to avoid having to go through the HB menu every time.

    So far, I have decrypted the .cia with decrypt9 and extracted it using the Packhack 5.3 by Asia81.
    I can't find though, how to integrate the 2 files that hans uses into the extracted roms file.

    The files that I drop in the hans folder to get the hack to run are called 0011c400.code and 0011c400.romsf I thought it was as simple as dragging and dropping them in one of the extracted folders but obviously it is not. My guess is that those 2 files have to be extracted as well but I could be wrong.

    I didn't manage to find a tutorial for achieving this, could anyone point me out to one if it exists or, I am trying to do something impossible?
     
  2. Omegadrien

    Omegadrien GBAtemp Advanced Maniac

    Member
    1,707
    528
    Nov 4, 2015
    France
    Pokéland
    I think the "0011c400.code" file is the code.bin, and you have to extract the "0011c400.romfs" file (try to use the romfs extractor), to find the files that HANS patches, and replace them in the romfs of the cia you have just decrypted with decrypt9.
    Maybe https://gbatemp.net/threads/3ds-romfs-bin-extraction.399611/ ?!
     
    Last edited by Omegadrien, Aug 7, 2016
    Subtle Demise likes this.
  3. MarcusCarter

    MarcusCarter Goodra the Great

    Member
    437
    104
    Jan 7, 2012
    United States
    Indianapolis, IN
    Do you get 'ExtractedExeFS' and 'ExtractedRomFS' Folders when you use the 'D' command in the PackHack? If so, rename '0011C400.code' to 'code.bin', and replace the code.bin in the ExtractedExeFS folder with it. Then rename '0011C400.romfs' to 'RomFS.bin', and replace the RomFS.bin in the ExtractedRomFS folder with it. After that, rebuild it as .cia with the PackHack. Finally, re-encrypt the .cia with Decrypt9.

    Edit: I forgot that RomFS.bin will be extracted when using the 'D' command, so you'll need to rename the 0011C400.romfs file, then run the 'RFSB' command in the PackHack on the RomFS.bin file.
     
    Last edited by MarcusCarter, Aug 7, 2016
    Omegadrien likes this.
  4. WillTheLion

    WillTheLion GBAtemp Regular

    Member
    178
    347
    Jun 8, 2014
    United States
    For curiousity's sake, are you trying to pack Star Sapphire/Rutile Ruby? I'm curious if it's possible to pack the 697 version of that plus the updated update data into 1 cia to have functional online and no need of hans.