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

Author Topic: NES Text Editing?  (Read 4724 times)

SuperMuppet

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
NES Text Editing?
« on: January 23, 2015, 09:05:51 pm »
I've been trying to find out a way to edit text in NES ROMs for the past few days, but have found nothing but tutorials that mention outdated stuff like the NESticle emulator and HEXPOSE. Does anyone know a way to edit text by using a different hex editing program?
ew this account has old disgusting posts

USC

  • Submission Reviewer
  • Sr. Member
  • *****
  • Posts: 270
  • Obviously Outdated
    • View Profile
Re: NES Text Editing?
« Reply #1 on: January 23, 2015, 09:31:24 pm »
Which ROM(s) are you trying to edit? The principles should be similar for most NES emulators and any hex editors. If it's in English, open the .NES file in a hex editor and try to do a direct search of the string (like 'YES'). If that doesn't work, try a relative search. Once you have the pattern, you can come up with a table (81 = 'B', 82 = 'C', etc) and edit to your heart's content. :)

SuperMuppet

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: NES Text Editing?
« Reply #2 on: January 24, 2015, 12:00:59 pm »
I've been trying to edit Mike Tyson's Punch-Out, but after searching for strings in Translhextion like "GLASS", "TYSON", or "MAC", I've found nothing.
What do table numbers even mean exactly? :-[
ew this account has old disgusting posts

SunGodPortal

  • Hero Member
  • *****
  • Posts: 2917
  • 2 + 2 = 5
    • View Profile
Re: NES Text Editing?
« Reply #3 on: January 24, 2015, 03:23:52 pm »
The numbers in a table file tell you what numbers represent the letters of the alphabet when you open a particular ROM up in a hex editor. Every bit of information in the game is stored as stuff like "DF 00 49 31 0A" regardless of what it pertains to. But in the right context some of that nonsense will represent the letters of the alphabet and since the alphabet is in a specific order it should be a set pattern. Once you figure out part of the pattern the rest should come easily.

The patterns represented in a table file are game specific. For example: some games may have 00 represent A (in the right context because remember, everywhere else in the ROM 00 would mean something completely different). If that IS the case you can pretty much bet that B will be 01, C will be 02, etc. In another ROM the alphabet may start at 3F = A and then continue on to 40 = B, 41 = C, etc. These are just random examples off the top of my head.

EDIT: I'm not an expert but I think this is right for Mike Tyson's Punch-Out.
37=0
38=1
39=2
3A=3
3B=4
3C=5
3D=6
3E=7
3F=8
40=9
41=A
42=B
43=C
44=D
45=E
46=F
47=G
48=H
49=I
4A=J
4B=K
4C=L
4D=M
4E=N
4F=O
50=P
51=Q
52=R
53=S
54=T
55=U
56=V
57=W
58=X
59=Y
5A=Z
5B=.
5C='
5D=!
5E=-
5F="
60="
61=,
62=:
63=#
64=
65=
66=?

Inside the ROM, 64 looks like a square and 65 looks like a circle. Wasn't sure what to put in those spots. Also, I don't know what they're called specifically but 5F is the mark that goes at the beginning of a quote and 60 is the type that goes at the end. I only had the second type on my keyboard so I didn't know how else to represent that.
« Last Edit: January 25, 2015, 12:02:16 am by SunGodPortal »
War is Peace. Freedom is Slavery. Ignorance is Strength.

SuperMuppet

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: NES Text Editing?
« Reply #4 on: January 26, 2015, 06:07:12 pm »
Even after inserting the .tbl file in Translhextion or FCEUX's built-in editor, I've found nothing but gibberish in there. No strings pop up in search, the only things related to letters I can find are random ones like "J" or "N"

There were however a few strings saying "NINTENDO"
« Last Edit: January 26, 2015, 06:13:33 pm by SuperMuppet »
ew this account has old disgusting posts

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 6975
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: NES Text Editing?
« Reply #5 on: January 26, 2015, 06:37:59 pm »
Often you can find tables in NES games just by clicking on Nametable viewer while the game is running. Point to the tile and it will tell you the tile ID.
Often the tile ID will be the hex value for the character.
(some games do mid-frame CHR-ROM swaps, so if the text doesn't appear correctly, try the option on the window to change the scanline FCEUX refreshes the window. (0=top of the screen, 239 = bottom. Pick something appropriately in between)

Also, games can and often do use different tables for different parts of the game.
"My watch says 30 chickens" Google, 2018

SunGodPortal

  • Hero Member
  • *****
  • Posts: 2917
  • 2 + 2 = 5
    • View Profile
Re: NES Text Editing?
« Reply #6 on: January 26, 2015, 08:02:35 pm »
Quote
Even after inserting the .tbl file in Translhextion or FCEUX's built-in editor, I've found nothing but gibberish in there. No strings pop up in search, the only things related to letters I can find are random ones like "J" or "N"

There were however a few strings saying "NINTENDO"

Bummer. Sounds like I found "a" table, just not the one you were looking for. I'm gonna assume that the order of all of those characters is correct because that's how they appear in the ROM. I guess all of the values need to be adjusted somehow. Maybe I'm wrong but I don't see any reason why they would appear in the ROM in one order and then have a different order in the "appropriate" table once it is discovered.  I'd try again but I'm just starting to get neck deep into a graphics hack. Seems like most of my energy is gonna go into sorting out palette issues...
War is Peace. Freedom is Slavery. Ignorance is Strength.

marioxb

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Re: NES Text Editing?
« Reply #7 on: January 26, 2015, 08:45:29 pm »
Here is the table file for Mike Tyson's Punch-Out!!

http://www.angelfire.com/mp/masterphred/nesdown.html

I think this is what I used on Punch-Out (non Tyson) to change it into the Virtual Console versions. I think the only change was Piston Honda's "Where is the NHK TV camera? Hello, Tokyo!" to "Where are my camera crew? Hello, Tokyo!". This change was not made to the version in GameCube's Animal Crossing.
« Last Edit: January 27, 2015, 12:23:14 am by marioxb »

SuperMuppet

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: Mike Tyson's Punch-Out Hack...Help!
« Reply #8 on: January 27, 2015, 01:58:16 pm »
I think I'm getting the hang of text editing. Ignore the blank text near the top of Doc's head, I fixed that after I took this screenshot.

The only things left I really have to learn in hex edits is to learn how to edit their number of KOs

and changing the palettes of the characters. For some reason in the NES palette editor I have, I can't spot and familiar palettes.
ew this account has old disgusting posts