Hexadecimal: Your new best friend - (T_T)

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

Post Reply
Khyron
Posts: 21
Joined: Sun Mar 27, 2011 9:44 am

Hexadecimal: Your new best friend - (T_T)

Post by Khyron » Sun Mar 27, 2011 10:55 am

:evil:

Hello, I am new this forum as well as to hex editing. Years ago I tried hex editing with some effort I changed some colors and made some deformed characters. :shock:

So far I have read a Beginner's guide recently that was good. It was alot of help on the basics. http://www.nesplayer.com/database/info/ ... omdoc.html

Waiting for an Akira patch since the 90's and now Akira is the fire under my ass to learn how to edit text. I am having issues on understanding the part on making tables. Can anyone point me in a direction to understand more on building tables? I know I have to work on editing english text first and this is what I want to do.

I appreciate any help I can get in my efforts in learning Hex editing hopefully I can be of some use in the future.

:x :x :x :x :x AKIRAAAA!!!!!! :x :x :x :x

:cry:

unregistered
Posts: 1071
Joined: Thu Apr 23, 2009 11:21 pm
Location: cypress, texas

Post by unregistered » Sun Mar 27, 2011 4:49 pm

Well, after reading the first page of your Beginner's guide, there is something important, i think, that they didn't mention about hexadecimal.

Hexadecimal is a base 16 number system that works the same way our base 10 decimal number system works.

in base 10:
each digit increases in power from right to left. For instance:

1234

THe value of the spaces increaces, from right to left like this

Code: Select all

     1         2        3        4        
                                                
     10^3      10^2     10^1     10^0
Notice that
10^0 == 1
10^1 == 10
10^2 == 100
10^3 == 1000

so our number system is base 10.


in base 16:
each digit increases in power from right to left. For instance:

$1234

The value of the spaces increaces, from right to left like this

Code: Select all

$     1         2        3        4        
                                                
      16^3      16^2     16^1     16^0
Notice that
16^0 == 1
16^1 == 16
16^2 == 256
16^3 == 4096

so this number system is base 16.


-----------
one more point that is helpfull for me that they didn't mention, i think, is

Our base 10 number system requires 10 digits and we have 10 digits... 0 through 9.

So the base 16 number system requires 16 digits so we use our 10 digits... 0 to 9... and 6 other digits:

Code: Select all

A == 10
B == 11
C == 12
D == 13
E == 14
F == 15

yesyesyall
Posts: 28
Joined: Sat Mar 05, 2011 3:17 pm
Location: Houston, Texas

Post by yesyesyall » Sun Mar 27, 2011 5:35 pm

actually, it covers that pretty close to the top of the page

yours is more clear, though

Khyron
Posts: 21
Joined: Sun Mar 27, 2011 9:44 am

Post by Khyron » Sun Mar 27, 2011 7:44 pm

Thank you for the responses I am gonna chew on that and try to read up some more on all this...also any resouerces available on how to build tables? :?:
Last edited by Khyron on Mon Mar 28, 2011 12:04 am, edited 1 time in total.

yesyesyall
Posts: 28
Joined: Sat Mar 05, 2011 3:17 pm
Location: Houston, Texas

Post by yesyesyall » Sun Mar 27, 2011 8:57 pm

i started learning programming concepts at the same time i started learning asm (which is to say, totally from scratch) about a month and a week ago. because i have done it like this, i don't understand the terminology surrounding hex editing. what do you mean "building tables?" i can probably answer some questions about nametables that you may have.

are you asking how to draw the actual images and then save that data as something that can be used in a program? what i mean is, are you asking how to redraw the tiles and then replace the data to use the new tiles you have drawn?

unregistered
Posts: 1071
Joined: Thu Apr 23, 2009 11:21 pm
Location: cypress, texas

Post by unregistered » Sun Mar 27, 2011 9:13 pm

Khyron wrote:also any resouerces available on how to build tables? :?:
hi, sorry, i've never used the program Thingy before and i don't know anything about how to create those tables. :(

unregistered
Posts: 1071
Joined: Thu Apr 23, 2009 11:21 pm
Location: cypress, texas

Post by unregistered » Sun Mar 27, 2011 9:49 pm

yesyesyall wrote:actually, it covers that pretty close to the top of the page
Yes, whoops, I missed that; though i'm happy I missed it because it allows you to try out another base... like say a base 23...
using 0 to 9 and A through M......................... that was very useful to me to cement the hexadecimal in my head... hope doing something like that would be usefull for others. : )
yesyesyall wrote:yours is more clear, though
thanks :)[/u]

Khyron
Posts: 21
Joined: Sun Mar 27, 2011 9:44 am

Post by Khyron » Mon Mar 28, 2011 12:28 am

yesyesyall wrote:i started learning programming concepts at the same time i started learning asm (which is to say, totally from scratch) about a month and a week ago. because i have done it like this, i don't understand the terminology surrounding hex editing. what do you mean "building tables?" i can probably answer some questions about nametables that you may have.

are you asking how to draw the actual images and then save that data as something that can be used in a program? what i mean is, are you asking how to redraw the tiles and then replace the data to use the new tiles you have drawn?
Well that is definetly something I want to get good at later on but right now i am dialed in with altering text in roms. I am trying to get proficient with doing this so hopefully once i move on altering english text in games I can try to tackle japanse text in games.

The table file i am thinking of is something you can use with the program Thingy. I read that this file is so you can find the text in a rom quick without to much hassle.

Correct me if I am wrong but I believe what i gathered from that beginners guide i need to open a pattern table i will write out on the txt file the code of each letter and number and load this up with the rom in thingy. And thingy will help me find all these letters and numbers quickly. So i can edit the text?

Is this the most practical way to edit text and is there a good program i can use to do this because what is suggested in the beginners guide is to use nesticle but it doesnt work really with the famicom games.

I think if i get some test runs in on english and it works good with out gliches i would like to move on to famicom carts. One in paticular. I just hope akira doesnt kick my ass too.

Khyron
Posts: 21
Joined: Sun Mar 27, 2011 9:44 am

Post by Khyron » Mon Mar 28, 2011 12:31 am

unregistered wrote:
Khyron wrote:also any resouerces available on how to build tables? :?:
hi, sorry, i've never used the program Thingy before and i don't know anything about how to create those tables. :(
Thats ok, I apreciate all your responses so far. Your hexadecimal lesson was alot of extra help. Good to see things in more than one place. Helps me get a diffrent perspective at times.
Last edited by Khyron on Mon Mar 28, 2011 12:41 am, edited 1 time in total.

Hangin10
Posts: 37
Joined: Thu Jun 04, 2009 9:07 am

Post by Hangin10 » Mon Mar 28, 2011 12:36 am

Basically, games don't often represent their text as ASCII, but the alphabet is usually in order in the encoding used. What you need to do is find the text in the file, and build said table of what encoding the game uses for its text.

For example, ASCII's 0-9 are 0x30-0x39, while a game might use d5-d15.
But the distance from one character to the next will still hold. "025" would be 0x30, 0x32, 0x35 in ASCII, but the string in said hypothetical game would be d5, d7, d10.

Does Thingy provide a search option? (It's been ages since I did any ROM hacking. It's also 2:30 AM, I have to go to sleep at the moment rather than search out info on Thingy)

Hope this helps :)

Khyron
Posts: 21
Joined: Sun Mar 27, 2011 9:44 am

Post by Khyron » Mon Mar 28, 2011 1:03 am

Hangin10 wrote:Basically, games don't often represent their text as ASCII, but the alphabet is usually in order in the encoding used. What you need to do is find the text in the file, and build said table of what encoding the game uses for its text.

For example, ASCII's 0-9 are 0x30-0x39, while a game might use d5-d15.
But the distance from one character to the next will still hold. "025" would be 0x30, 0x32, 0x35 in ASCII, but the string in said hypothetical game would be d5, d7, d10.

Does Thingy provide a search option? (It's been ages since I did any ROM hacking. It's also 2:30 AM, I have to go to sleep at the moment rather than search out info on Thingy)

Hope this helps :)
Thank you this does help, and i think once you get the table done in thingy it might have a search option? I hope so I will try it out tommarow. If not i wonder what will i use next. haha....

Thanks Again Hangin10

Post Reply