+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  Need help with translating texts in arm9.bin (NDS)
Pages: 1 [2]
Author Topic: Need help with translating texts in arm9.bin (NDS)  (Read 2 times)
psycoblaster
Guest
« Reply #15 on: July 16, 2008, 04:28:21 am »

Ok. Thanks KC. (just recognized you were working on a perfect translation with the other person on TOI)
Now i've understood what you meant by overlay.
So i've located some texts at the end of overlay_0002.bin
So how would I have to calculate this?
KC
Guest
« Reply #16 on: July 16, 2008, 04:33:02 am »

Legendary? Not that I know... just working on Innocence.

Well, to quote the ever so useful gbatek:
Quote
ARM9 and ARM7 Overlay Tables (OVT) (base/size defined in cart header)
Somehow related to Nintendo's compiler, allows to assign compiler Overlay IDs to filesystem File IDs, and to define additional information such like load addresses.

  Addr Size Expl.
  00h  4    Overlay ID
  04h  4    RAM Address ;Point at which to load
  08h  4    RAM Size    ;Amount to load
  0Ch  4    BSS Size    ;Size of BSS data region
  10h  4    Static initialiser start address
  14h  4    Static initialiser end address
  18h  4    File ID  (0000h..EFFFh)
  1Ch  4    Reserved (zero)

Most programs call them y7.bin and y9.bin.
Just add/subtract the ram address to/from your text offset.
psycoblaster
Guest
« Reply #17 on: July 16, 2008, 04:44:02 am »

I just looked at y9.bin. So the RAM Address is 600E1202?
I think I did something wrong..
KC
Guest
« Reply #18 on: July 16, 2008, 04:50:00 am »

Like most systems out there, the NDS uses little endian to save its data. That means that the least significant byte is stored first, and the most significant last. Basically, you just have to reverse the bytes.

2120E60.

That only applies to data of word (4 bytes) and halfword (2 bytes) size, though. Raw binary data is stored in the "normal" order.
psycoblaster
Guest
« Reply #19 on: July 16, 2008, 05:02:54 am »

So I have to subtract 2120E60 to...Huh
Only the offsets of the texts in the overlay file?
KC
Guest
« Reply #20 on: July 16, 2008, 05:41:05 am »

Take a string (for example, 85760h for Summary), and add the ram address to it. That results in 21A65C0. Then search for that in little endian (so C0 65 1A 02). There you find the pointer.
psycoblaster
Guest
« Reply #21 on: July 16, 2008, 05:50:48 am »

for the strings on both overlay 0002 and the arm9.bin?
Pages: 1 [2]  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC