News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Hex Editors  (Read 795 times)

abishur

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Hex Editors
« on: September 24, 2020, 10:39:39 am »
Hello all!  I've been learning ROM hacking this week and have been messing around with Translextion to work on translating a Zoids NES game.  It's been working very well for me up to this moment when I went to overwrite my translated text string back into the file.

I carefully made my string all in hex, no spaces, copied it, did an overwrite paste into Translextion and out came garbage!  Translhextion actively changes the string I've pasted  >:( I can do a paste preview and see that the string is correct going in, but then it gets changed.  For the life of me I can't figure out how to get it to stop so I'm looking for a different hex editor.

I know there are TONS of options, but I'm specifically wondering if anyone knows of one that can:
  • View the same file in two different locations (That way I can work on the pointer table and the new text locations without a lot of jumping)
    Load a thingy table
    Paste a hex string (overwritting existing values)
and... actually I think that's everything I need This shouldn't be that difficult, but none of the ones I've looked at so far seem to allow me to do  all three, lol

Cyneprepou4uk

  • Hero Member
  • *****
  • Posts: 504
  • I am the baldest romhacker
    • View Profile
Re: Hex Editors
« Reply #1 on: September 24, 2020, 12:24:44 pm »
Hex editor in fceux emulator can load a thingly table and paste text/bytes. It can't split window though, however you can make some macroses with autoclicker or something to switch between locations.

Also I think one of the latest builds supports adding bookmarks to a ROM File tab, and you can easily goto different locations using hotkeys.
https://ci.appveyor.com/project/zeromus/fceux
iromhacker.ru - NES ROM hacking tutorials for beginners. Please use Google Translate browser extension

Dracula X

  • Full Member
  • ***
  • Posts: 128
    • View Profile
    • My YouTube Page for ROM hacking
Re: Hex Editors
« Reply #2 on: September 24, 2020, 11:14:37 pm »
There is a copy and paste bug in a Hex Editor on FCEUX on 32-bit & 64-bit current builds.
I might go back to Thunder Force II hacking again.

Jorpho

  • Hero Member
  • *****
  • Posts: 4574
  • The cat screams with the voice of a man.
    • View Profile
Re: Hex Editors
« Reply #3 on: September 24, 2020, 11:37:54 pm »
  • View the same file in two different locations (That way I can work on the pointer table and the new text locations without a lot of jumping)
Why not just open two separate instances of the hex editor?
This signature is an illusion and is a trap devised by Satan. Go ahead dauntlessly! Make rapid progres!

abishur

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Re: Hex Editors
« Reply #4 on: September 25, 2020, 12:38:38 am »
Why not just open two separate instances of the hex editor?
I'm doing some text translation, so I need one window editing the text and a second window editing the pointer table.  If I had the same file open twice I would just be overwriting the work back and forth.

Right now I'm using HxD to let me do massive hex pasting (Still not 100% certain why TranslHextion actively PREVENTS you from doing a regular paste, but whatever).  Save the work then open the file fresh in TranslHextion.  Then I do all my pointer table edits, save it, open it fresh in HxD and do the next batch.  It's functional, but not very elegant, lol.

MysticLord

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
Re: Hex Editors
« Reply #5 on: September 25, 2020, 01:37:11 am »
XVI32 has a reload feature you may find useful. I dunno about pasting.

I know I have a hex editor that lets you compare two files.

If on Windows 10, use Windows key + left/right arrow to split two apps on a single screen.

I think hexecute has useful features for extracting raw text and bytes and formatting them, if you need that as well.

I'll look at my hex editor collection tomorrow and get back to you.

Vehek

  • Full Member
  • ***
  • Posts: 198
    • View Profile
Re: Hex Editors
« Reply #6 on: September 25, 2020, 01:39:03 am »
In the long run, you should switch from manually editing with a hex editor to injecting text with a dedicated tool like Atlas or abcde.

abw

  • Hero Member
  • *****
  • Posts: 554
    • View Profile
Re: Hex Editors
« Reply #7 on: September 25, 2020, 05:26:31 pm »
It's functional, but not very elegant, lol.
You've just described the entire concept of ROM hacking via hex editor :P.

In the long run, you should switch from manually editing with a hex editor to injecting text with a dedicated tool like Atlas or abcde.
+1 for this. Working through the mechanics of achieving a functioning text change with a hex editor is useful for helping to make sure you understand what's going on, but it's generally not something you'll want to do more than once. Updating pointers manually is a task much better left to a tool! As an added benefit in the specific case of text editing, any tool you're likely to come across also lets you edit text using your favourite text editor instead of a hex editor.

abishur

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Re: Hex Editors
« Reply #8 on: September 25, 2020, 05:33:44 pm »
I'll have to check those out, one thing I was worried about was not having a lot of spare space in this ROM can the automated ones work with that or so they function primarily through rom expansion?

MysticLord

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
Re: Hex Editors
« Reply #9 on: September 25, 2020, 06:05:36 pm »
HxD has compare files functionality that isn't locked behind an freeware paid upgrade.

If you're investigating something, use a hex editor and tools you write; if you already know where everything is and how it's stored, and are ready to export/import it, don't use a hex editor.

abishur

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Re: Hex Editors
« Reply #10 on: September 25, 2020, 06:19:14 pm »
Any good tutorials for atlas or abcde i could check out or just trial by fire  >:D

MysticLord

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
Re: Hex Editors
« Reply #11 on: September 25, 2020, 09:10:03 pm »
That's a good question. I haven't used them.

I would start by looking for questions people have asked on this forum and others regarding their use. After that, I would look for translations that have released their production assets; then examine those assets and try to import/export their them using the tools.

Look up the tool's authors and browse their post histories. If they have github accounts or if the source code is present, peruse it.

abw

  • Hero Member
  • *****
  • Posts: 554
    • View Profile
Re: Hex Editors
« Reply #12 on: September 27, 2020, 11:21:53 pm »
I'll have to check those out, one thing I was worried about was not having a lot of spare space in this ROM can the automated ones work with that or so they function primarily through rom expansion?
I'm not aware of any general-purpose script insertion utility that will expand a ROM for you (and even if it did, making use of the new space typically requires other game-specific data and/or ASM changes), except maybe if you tell it to write beyond the end of the original file. It's not super-relevant in cases like translation where you're changing all of the game's text anyway, but depending on the utility and the game's text encoding, you can sometimes actually get a slightly better text compression ratio from using a utility than the original game's text achieved.

Any good tutorials for atlas or abcde i could check out or just trial by fire  >:D
The Atlas documentation is reasonably decent and contains several examples to get you started. For script extraction, you'll also want to look at Cartographer, which can output files that are pretty close to what Atlas wants for input, so they sort of work together. abcde tries to improve on Atlas/Cartographer (more features, better co-operation between extract and insert file formats, etc.), but its documentation is pitched at people who already know Atlas and Cartographer, so it's probably harder to start with.

After that, I would look for translations that have released their production assets; then examine those assets and try to import/export their them using the tools.
+1 for this too. If somebody else happens to have published any tools for your specific game, then yeah, definitely check those out to see if they'll work for you and do what you want them to.