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

Author Topic: Noob question  (Read 463 times)

facundoj

  • Jr. Member
  • **
  • Posts: 10
    • View Profile
Noob question
« on: February 19, 2019, 03:13:37 am »
I've started a few days ago reading guides about romhacking, because I want to translate a game. I've read some guides on the getting started section here, but I'm stuck with tables and relative search. I don't really understand them, and the three documents which explain them are very old, the programs they use don't open in windows 10. So, what hex editor should I use, and could you explain how to use tables (I know how to create them) and relative search? Thanks in advance

Jorpho

  • Hero Member
  • *****
  • Posts: 4036
  • The cat screams with the voice of a man.
    • View Profile
Re: Noob question
« Reply #1 on: February 19, 2019, 08:53:16 am »
I don't really understand them, and the three documents which explain them are very old
The documents may be old, but the concepts are still the same.  (After all, old console ROMs aren't changing.)  Can you write more about what you don't understand in particular?

Quote
the programs they use don't open in windows 10
DOSBox is useful for those rare cases when you still need an old program to run.

Anyway, if you do a search like https://www.google.com/search?q=site%3Aromhacking.net+%22relative+search%22 you will find alternatives like Monkey-Moore and useful old threads like https://www.romhacking.net/forum/index.php?topic=12374.0 .
This signature is an illusion and is a trap devised by Satan. Go ahead dauntlessly! Make rapid progres!

Psyklax

  • Hero Member
  • *****
  • Posts: 891
    • View Profile
    • Psyklax Translations
Re: Noob question
« Reply #2 on: February 19, 2019, 02:45:19 pm »
Okay, as Jorpho says, the concepts remain the same, but obviously times change and utilities get replaced by newer and better things. If you check out one of my translations, the readme will tell you everything I used to do it, so let's copy-paste from my template.

FCEUX (best NES emulator for debugging and hacking)
MEKA (the best Master System emulator for debugging)
Mednafen (very versatile debugging emulator)
Bizhawk (for certain debugging tasks)
HxD (general hex editing)
Tile Molester (graphics)
FDSExplorer (examining FDS file structure)
WindHex32 EX (checking/touching up text)
Pointer Tables (dumping/inserting text)
DTE-Opt (making DTE table)
GIMP (graphics drawing and editing)

This is the extent of the tools I've used for my releases. HxD is the smallest, simplest hex editor around which can do virtually everything you need when hacking files, aside from a lack of Japanese text support (which apparently the author is thinking of adding), but for that you have WindHex32 EX. I use Windows 10, so everything you see here works fine under that.

With HxD, WH32EX, Tile Molester, and a good emulator for your chosen platform, you can achieve great things. :) You still need to figure out how to hack, of course.

4l3j4ndr0

  • Jr. Member
  • **
  • Posts: 19
  • Gameboy Color Rules!
    • View Profile
Re: Noob question
« Reply #3 on: February 19, 2019, 06:38:06 pm »
Could you explain how to use tables and relative search? Thanks in advance

I'm noob too but i will try to explain.
A game is made up of various data, Pics,Audio,Text,Instruction...etc
when you open a game in hex his code is shown all compiled.
When loading tables, this code starts to make sense because you could already see the text of the game that you are going to edit.
Other data will be displayed with incomprehensible text because they are not text.

A relative search it's useful when we do not have tables.
Imagine that you want to search for the "CHARIZARD" text in a game.
What this search does is compute the distance between the characters and show it in the text.
imagine that the letter A is 00
so CHARIZARD it will be written as 02-07-00-11-08-19-00-11-03
following the sequence of A=00 B=01 C=02...18=Y 19=Z

C will always occupy the 3rd place in relation to A
so if the programmer chose the code 20=A the letter C will be 22
20=A
21=B
22=C...etc

TaBular is an easy program to create tables.
Texts include lowercase uppercase letters and signs.
If you watch the game with an image editor in some cases you will see the complete tables.










facundoj

  • Jr. Member
  • **
  • Posts: 10
    • View Profile
Re: Noob question
« Reply #4 on: February 19, 2019, 09:42:01 pm »
Thanks all for your help! I understand these concepts now, but still have some doubts:
1) I've found the fonts of a game on a tile editor, can I use them to find the hex values of letters?
2) I don't get why relative search doesn't work sometimes, I'm using monkey-moore to search for the word "routine" on a Secret of Mana 2 rom, but it doesn't find anything, even though it's one of the first words to appear if your character is Lise. Could it be because it's a patched rom? Or because the text is compressed? If not, why does it happen?
3) This isn't strictly related to romhacking, but when I try to open TaBuLar.exe I get this error message: "The code execution cannot proceed because MSVBVM50.DLL was not found. Reinstalling the program may fix this problem." I downloaded a portable version, should I get an installable or just download the .DLL?

Psyklax

  • Hero Member
  • *****
  • Posts: 891
    • View Profile
    • Psyklax Translations
Re: Noob question
« Reply #5 on: February 20, 2019, 01:06:02 am »
I wrote this before your response, so I'll just post it now and read afterwards.

-snip-

That's the basic idea behind tables, yes, and worth noting that if you use debug tools in emulators, it gets even easier.

Every system either has to load graphics into RAM, or access it directly off a ROM cartridge, so if an emulator (like FCEUX) shows you what the machine can see in terms of graphics, you can see the alphabet or kana, and build your table accordingly. I also use Tabular for that purpose, since it can do it in a couple of clicks.

Don't forget that this will work in most cases, but if the game uses compression, you will have a bit of trouble. Give it a try on some games and come back if you have problems. :)

EDIT: Regarding your questions:
1: it certainly helps if you find it in the ROM, but remember that what matters is how the game sees it, in RAM or in a particular part of ROM. For NES it usually doesn't matter.
2: probably compression, being an RPG. I know I'd use compression if I was making that game. Pick other games like NES or SNES games with small amounts of text.
3: yeah, just find the DLL online and stick it in the folder.
« Last Edit: February 20, 2019, 01:12:19 am by Psyklax »

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 6743
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Noob question
« Reply #6 on: February 20, 2019, 01:10:09 am »
Surely the SoM2 dialogue is compressed.
From what I hear, someone figuring out how to hack that game was something of a technical marvel in its day. (meaning the most skilled of the ROM hackers of its day)
So, hacking that game is probably not at your level yet if you are just starting to learn. :)

Because Tabular is a really old program so it is probably using really old MS files. Could be an issue if you care about possible security vulnerabilities on your computer.
Honestly making a table manually is pretty simple.
It's just a plain text file with something like
Code: [Select]
00=A
01=B
02=C
...
Of course replacing the numbers with the real values once you figure out what those are.
"My watch says 30 chickens" Google, 2018

facundoj

  • Jr. Member
  • **
  • Posts: 10
    • View Profile
Re: Noob question
« Reply #7 on: February 20, 2019, 07:39:17 pm »
Thanks for your answers! I've made TaBuLar work now. As you said, I'll avoid SoM2 for now, I'm trying with other games and everything works as intended!  :laugh: