GhostPatcher - Easily patch GBA VC .cias to remove ghosting and restore original colors

Discussion in '3DS - ROM Hacking, Translations and Utilities' started by Substance12, Jan 11, 2017.

  1. Substance12
    OP

    Substance12 GBAtemp Advanced Fan

    Member
    562
    420
    Aug 2, 2015
    Argentina
    This thread explains a method to fix ghosting and dark colours in GBA VC games:

    https://gbatemp.net/threads/restoring-original-colors-to-gba-vc.427642/

    Before vs After:
    [​IMG]
    [​IMG]

    The process is a bit lengthy though and requires hex editing, or generating a footer for GBA games. I made a script that should make the process a ton faster and easier, only requiring you to provide an unencrypted CIA.

    Requirements:
    • A Windows, Linux or OS X 64-bit installation. I might provide 32-bit support in the future.
    • A Python version 3 installation.
    • A decrypted CIA of the game you want to patch. If it's encrypted, you'll get an "Unknown file" error.
    To apply the patch, simply open a command prompt, cd to the folder where you put the script, and run it like this:

    Code:
    patch.py /path/to/your/game.cia
    Make sure you have the "bin" folder in the same folder than patch.py!

    You'll find the patched .cia in the output folder. Make sure to back up your GBA saves before installing the .cia, because if an unpatched version of the game was previously installed, it's saves will be lost.

    WARNING:
    • This was not tested on OS X! It should probably work without issues, though.
    • This patch may cause issues in some specific games. Make sure you always keep the original CIA just in case.

    Download!

    Credits:
    • profi2000 for ctrtool and makerom
    • dnasdw for 3dstool
    • SuperrSonic for the hex patch
    • AnalogMan for the Python script that patched code.bin
     
    Last edited by Substance12, Jan 11, 2017
    hippy dave, cearp, XRaTiX and 5 others like this.
  2. Darukeru

    Darukeru Advanced Member

    Newcomer
    66
    6
    Apr 30, 2016
    Mexico
    Umm... how do I know if it worked? Do I need the bin folder too? I run it but all I see is this message and it moves the CIA to a new 'tmp' folder .-.

    Image

    Edit: Forget it, the bin folder is necessary, it worked! :)
     
    Last edited by Darukeru, Jan 11, 2017
  3. Eastonator12

    Eastonator12 GBAtemp Fan

    Member
    433
    119
    Aug 16, 2016
    United States
    What version on Linux is that? I want to try it lmao
     
  4. Substance12
    OP

    Substance12 GBAtemp Advanced Fan

    Member
    562
    420
    Aug 2, 2015
    Argentina
    Great to hear! Maybe I should have mentioned that the bin folder is needed :lol:
     
    Darukeru likes this.
  5. Eastonator12

    Eastonator12 GBAtemp Fan

    Member
    433
    119
    Aug 16, 2016
    United States
    If you don't mind me asking, what version of Linux is that you're using? I'm interested in using it
     
  6. Substance12
    OP

    Substance12 GBAtemp Advanced Fan

    Member
    562
    420
    Aug 2, 2015
    Argentina
    That seems to be Linux Mint.
     
  7. Eastonator12

    Eastonator12 GBAtemp Fan

    Member
    433
    119
    Aug 16, 2016
    United States
    Ah, ok. Thanks!
     
  8. KiiWii

    KiiWii GBAtemp Psycho!

    Member
    3,923
    1,434
    Nov 17, 2008
    United Kingdom
    Can this sort of thing be done on Wii U for N64 injects etc?

    I wonder if Ninty nerfed the same things on all consoles to make them dark and drab?

    @the_randomizer ?
     
  9. Substance12
    OP

    Substance12 GBAtemp Advanced Fan

    Member
    562
    420
    Aug 2, 2015
    Argentina
    This uses 3DS-specific tools to edit CIAs, so you can't use this tool on these, but I'm sure something like that for Wii U could be done.
     
  10. KiiWii

    KiiWii GBAtemp Psycho!

    Member
    3,923
    1,434
    Nov 17, 2008
    United Kingdom
    Yeah cool that's what I means I mean just the thought process behind this could be applied and figured out for Wii U.
     
  11. Darukeru

    Darukeru Advanced Member

    Newcomer
    66
    6
    Apr 30, 2016
    Mexico
    No no, is Ubuntu 16 LTS, and this awesome theme https://itsfoss.com/install-numix-ubuntu/
     
    Last edited by Darukeru, Jan 11, 2017
  12. ShadowOne333

    ShadowOne333 GBAtemp Guru

    Member
    7,377
    4,798
    Jan 17, 2013
    Mexico
    Pretty neat patcher!
    I hope something like this gets made for the N64 VC for the Wii U :P
     
  13. KyleWest

    KyleWest Member

    Newcomer
    15
    1
    Jan 10, 2017
    United States
    Universe 10 Sacred World of the Kai
    Anyone willing to help a newbie who doesn't know how to use python :P
     
  14. The Real Jdbye

    The Real Jdbye Always Remember 30/07/08

    Member
    GBAtemp Patron
    The Real Jdbye is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    12,522
    5,474
    Mar 17, 2010
    Norway
    Alola
    If you're on Windows the easiest way is by putting the script in the Python directory where python.exe is located and opening a command prompt, using cd "C:\path\to\python" to get to the Python directory, then use the command described in the first post but add python.exe followed by a space in front of it so it becomes python.exe patch.py "c:\path\to\game.cia"
    Instead of typing the cia path manually you can drag and drop the file onto the command prompt window to autofill the path. This probably also works for the cd command by drag&dropping the Python directory.
    Make sure you use Python 3.x and not 2.x since this particular script needs it.
     
  15. KyleWest

    KyleWest Member

    Newcomer
    15
    1
    Jan 10, 2017
    United States
    Universe 10 Sacred World of the Kai
    Once I run the command, where do I find the new .cia file? Or is my current one supposed to be overwritten
     
  16. The Real Jdbye

    The Real Jdbye Always Remember 30/07/08

    Member
    GBAtemp Patron
    The Real Jdbye is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    12,522
    5,474
    Mar 17, 2010
    Norway
    Alola
    Read the first post again ;)
     
  17. KyleWest

    KyleWest Member

    Newcomer
    15
    1
    Jan 10, 2017
    United States
    Universe 10 Sacred World of the Kai
    I did but I couldn't find a folder named output anywhere, not in the python folder or the folder containing the .cia or anywhere else
     
  18. The Real Jdbye

    The Real Jdbye Always Remember 30/07/08

    Member
    GBAtemp Patron
    The Real Jdbye is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    12,522
    5,474
    Mar 17, 2010
    Norway
    Alola
    Then maybe the script failed, what does the output say?