Jump to content

Question of Pokemon emerald ROM data


Recommended Posts

00.png.538e110e751497c922af387d16828882.png16.png.38b16ad7232c5dd9fdf2294ceb5fce24.png

01.png.19ff08954aaf328db4397870b64cbfdf.png13.png.9a3db4bb1d9514c9e651335d2dc0517f.png

 

Hello. I am doing an unofficial Korean translation of Pokemon Emerald.

I have a question. What is the role of the ROM file offset from 00000000 to 000000BD?

When I searched for the Pokemon emerald ROM map, I could not find a document that analyzed the role of the value. They just said it was Header.

I used to look into someone else's hacking ROM while working, However, the value of 000000BD is different for each ROM.

The English ROM was 72 and my hacking ROM was 6C.

Also, the value of 000000AB was 45, and other ROM was 4B. I want to know what this value role and what this difference means.

 

You can ask me, "how can you hack and translate ROM without knowing this?"

Yes. I don't know programming at all. so I work with someone's unfinished ROM as a very primitive tool: CrystalTile2.

It was very hard work, but I translated it to Slateport City. It's a very dramatic result.

In Korea, the Gen III Pockemon is not officially released, so it is not very popular. Also, there are very few communities and hacking GBA people.

This is why I ask here in poor English. Please help me.

Edited by BloodBird
Link to comment
Share on other sites

2 hours ago, BlackShark said:

Here's the technical documentation of the GBA header values http://problemkaputt.de/gbatek.htm#gbacartridgeheader (site is English even though the domain is German).

0BDh - Complement check, 1 Byte
Header checksum, cartridge won't work if incorrect. Calculate as such:
chk=0:for i=0A0h to 0BCh:chk=chk-:next:chk=(chk-19h) and 0FFh

What does this mean?

 

English ROM 0xBD was 72.

Hacking ROM 0xBD was 6C.

How is this calculated and why is the value different?

The description of this site is so professional that it is hard for me to understand. Can anyone explain it easily?

Edited by BloodBird
Link to comment
Share on other sites

3 hours ago, BloodBird said:

How is this calculated and why is the value different?

Any change in the header will result in a new complement value.

This is what you have to do for the calculation:

  • calculate the sum of all the bytes from 0xA0 - 0xB0
  • add 0x19 to the result
  • use the bitwise NOT operator on the result (which means basically replace every binary 1 with 0 and every 0 with 1)
  • add 1

The windows calculator has a programmers mode which can be used for these calculations.

 

Anyway I think it's easier to just use this tool to calculate the headers complement https://filetrip.net/gba-downloads/tools-utilities/download-gbata-gba-tool-advance-0-7a-f223.html

gbata.png.be50812663f2b05cea55295ed6f3cb87.png

The first value is the calculated complement while the second value is the current complement.

5 hours ago, BloodBird said:

Also, the value of 000000AB was 45, and other ROM was 4B. I want to know what this value role and what this difference means.

I think you meant 0xAF here?

0xA0 - 0xAB is the games title (shortened due to limited space). The following 4 values are the games serial which is BPEE for English Emerald. The last letter (offset 0xAF) of the serial is the region code, for US region they used E (0x45), for Korean region they would have used K (0x4B). The person who started the ROM hack has replaced the region code to match the Korean region. Since the header was changed the complement needed to be recalculated.

  • Like 1
Link to comment
Share on other sites

23 hours ago, BlackShark said:

Any change in the header will result in a new complement value.

This is what you have to do for the calculation:

  • calculate the sum of all the bytes from 0xA0 - 0xB0
  • add 0x19 to the result
  • use the bitwise NOT operator on the result (which means basically replace every binary 1 with 0 and every 0 with 1)
  • add 1

The windows calculator has a programmers mode which can be used for these calculations.

 

Anyway I think it's easier to just use this tool to calculate the headers complement https://filetrip.net/gba-downloads/tools-utilities/download-gbata-gba-tool-advance-0-7a-f223.html

gbata.png.be50812663f2b05cea55295ed6f3cb87.png

The first value is the calculated complement while the second value is the current complement.

I think you meant 0xAF here?

0xA0 - 0xAB is the games title (shortened due to limited space). The following 4 values are the games serial which is BPEE for English Emerald. The last letter (offset 0xAF) of the serial is the region code, for US region they used E (0x45), for Korean region they would have used K (0x4B). The person who started the ROM hack has replaced the region code to match the Korean region. Since the header was changed the complement needed to be recalculated.

I really appreciate your kind explanation. Now I understand everything!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...