How To Create .Code For HANS?

Discussion in '3DS - Homebrew Development and Emulators' started by NintendoGamer28, Jun 2, 2017.

  1. NintendoGamer28
    OP

    NintendoGamer28 GBAtemp Regular

    Member
    108
    25
    Jan 15, 2017
    I been wondering for a while, how do you make .code (rom hacks) for games with HANS, I've created a few plugins (by hand) and need helping making .code for friends, no one has to give me a tutorial on making .code cause this could lead to killing the 3ds game hacking scene. But how do I make them, what do I need to know?
     
  2. evandixon

    evandixon PMD Researcher

    Member
    1,686
    808
    May 29, 2009
    United States
    It's just the code.bin from the ExeFS
     
  3. NintendoGamer28
    OP

    NintendoGamer28 GBAtemp Regular

    Member
    108
    25
    Jan 15, 2017
    So how would I convert codes to code.bin?
     
  4. Ryccardo

    Ryccardo WiiUaboo

    Member
    3,371
    1,621
    Feb 13, 2015
    Italy
    Imola
    ".code.bin" is the decompressed code.bin from the exefs:
    3dstool -uvf code.bin --compress-type blz --compress-out .code.bin

    (Luma's overlay also wants a decompressed .code.bin, despite calling it "code.bin" without the conventional dot)
    (Exefs support was broken in Hans, last time I checked over a year ago)
     
  5. NintendoGamer28
    OP

    NintendoGamer28 GBAtemp Regular

    Member
    108
    25
    Jan 15, 2017
    The reason why I'm asking this question is because Fishguy6564 made an item hack for hans, Is there a guide I could follow for help (not a guide to making .code)
     
  6. Ryccardo

    Ryccardo WiiUaboo

    Member
    3,371
    1,621
    Feb 13, 2015
    Italy
    Imola
    The command I posted is the one for converting code.bin to .code.bin

    Any patches you may apply to the extracted .code.bin are inherently app specific, and require some disassembling/reverse engineering skill (ideally an accurate emulator with breakpoints, which I don't think exists outside of 2000 dollar dev boxes; manual hunting through the code plus trial and error is possible but not necessarily practical)
     
  7. NintendoGamer28
    OP

    NintendoGamer28 GBAtemp Regular

    Member
    108
    25
    Jan 15, 2017
    ok so what do I do with the gateshark code?

    sorry for annoying you with questions 'U_U
     
  8. blujay

    blujay GBATemp's Official Warthog

    Member
    GBAtemp Patron
    blujay is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    2,206
    2,053
    Nov 2, 2015
    United States
    Gilbert, Arizona
    You must be confused. You are thinking cheat codes. We are talking executable code. The difference is one modifies RAM/Saves and the other modifies the game itself. I'm not sure how to help, but i am pretty sure there is a Gateshark -> NTR converter for use with Non-Gateway systems
     
    Ryccardo likes this.
  9. Ryccardo

    Ryccardo WiiUaboo

    Member
    3,371
    1,621
    Feb 13, 2015
    Italy
    Imola
    I don't know, since I don't use cheats; but they're probably (button checks and) memory writes, so you would need to translate the code to assembly and stick it somewhere in the game's executable (exactly this .code.bin) inside of a function that gets called continuously...

    Finding one such function, writing code equivalent to the cheats you want, and especially placing it in a way that doesn't move around other code... is an exercise for the reader.....
     
  10. NintendoGamer28
    OP

    NintendoGamer28 GBAtemp Regular

    Member
    108
    25
    Jan 15, 2017
    I make NTR Plugins (online ones) lol, I just want to make a .code for a friend via HANS

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

    That'll be hard I don't understand how to shorten codes (ASM) lol but I'll ask a friend if they know

    thanks for the help