Jump to content


  • Please log in to reply

GBATemp rom hacking documentation project (WIP)

, 0 to rom hacker in one quick guide.
fgghjjkll Post #31 Posted 06 March 2009 - 11:04 AM

    GBATemp MegaMan


  • Group: Members
  • Posts: 1,905
  • Member No.: 130,168
  • Joined: 07-July 08

  •  

can some one compile a S-JIS.tbl and Unicode[jpn].tbl for me?
unfortunatly TaBuLar doesnt work on vista



psycoblaster Post #32 Posted 06 March 2009 - 01:33 PM

    Divine


  • Group: Members
  • Posts: 2,132
  • Member No.: 112,307
  • Joined: 26-January 08
  • Location: Seoul.. (in Korea)

  •  

QUOTE(fgghjjkll @ Mar 6 2009, 08:04 PM) <{POST_SNAPBACK}>
can some one compile a S-JIS.tbl and Unicode[jpn].tbl for me?
unfortunatly TaBuLar doesnt work on vista

crystaltile2 has inbuilt code pages.
SJIS.tbl can be found in google by typing in just "sjis.tbl"



nIxx Post #33 Posted 07 March 2009 - 11:49 AM

    GBAtemp Maniac


  • Group: Members
  • Posts: 1,386
  • Member No.: 103,762
  • Joined: 30-September 07
  • Location: Germany

  •  

Hi
So basically i want to find the compression/encoding method for the text and i´m using iDeaS for debugging.
Now i´m trying to learn ASM to find how the text is encoded in NDS games.
But since i never really done something with ASM (only a bit MC programming) do you guys could lead me to a good documentation (if there is anyone). wink.gif

Edited by nIxx, 07 March 2009 - 12:22 PM.


Noitora Post #34 Posted 07 March 2009 - 03:15 PM

    ::


  • Group: Members
  • Posts: 3,768
  • Member No.: 94,544
  • Joined: 09-August 07
  • Location: Athens

  •  

QUOTE(nIxx @ Mar 7 2009, 01:49 PM) <{POST_SNAPBACK}>
Hi
So basically i want to find the compression/encoding method for the text and i´m using iDeaS for debugging.
Now i´m trying to learn ASM to find how the text is encoded in NDS games.
But since i never really done something with ASM (only a bit MC programming) do you guys could lead me to a good documentation (if there is anyone). wink.gif

gbatek has everything you need.


nIxx Post #35 Posted 07 March 2009 - 04:10 PM

    GBAtemp Maniac


  • Group: Members
  • Posts: 1,386
  • Member No.: 103,762
  • Joined: 30-September 07
  • Location: Germany

  •  

Thanks.
But how do i find where the ASM part for the text encoding starts ?
For example for Chrono Trigger DS:
http://gbatemp.net/index.php?act=findpost&pid=1809981



SCVgeo Post #36 Posted 07 March 2009 - 07:46 PM

    GBAtemp Regular

  • PipPipPip

  • Group: Members
  • Posts: 115
  • Member No.: 141,421
  • Joined: 05-November 08
  • Location: USA

  •  

QUOTE(nIxx @ Mar 7 2009, 07:10 AM) <{POST_SNAPBACK}>
Thanks.
But how do i find where the ASM part for the text encoding starts ?
For example for Chrono Trigger DS:
http://gbatemp.net/index.php?act=findpost&pid=1809981

Like Crosser said in your thread, you need a debugger. no$gba debugger is great but seems to be unavailable for now. So unless you bought a copy that you did not know how to use so have not touched, you probably won't get one. (I had mine for over a year before I learned how to use it).

You might try Desmume, it has a decent disassembler but I could not get Chrono Trigger to run there (sav issues)


FAST6191 Post #37 Posted 07 March 2009 - 11:29 PM

    Techromancer


  • Group: Reporters
  • Posts: 10,962
  • Member No.: 32,303
  • Joined: 21-November 05

  •  

Short intro to ASM on the GBA/DS. I have some other stuff in the new version of my rom hacking docs that I posted a few posts back (the odt format one).

It is assumed you know what assembly is, if you do not it is the name given to machine code (1s and 0s) that has been turned into a more human readable form. When talking about assembly from rom hacking we are almost invariably talking about disassembled code which lacks any comments from the developers and may also include stuff that is not assembly but has been disassembled none the less (text is often included in binaries).

Being machine code there are few niceties that more common languages have but that allows for far greater levels of control and far faster speeds if you know what you are doing.
In short you need to know the hardware, fortunately there is GBAtek for this:
http://nocash.emubase.de/gbatek.htm

It also helps to understand the basics behind the DS "format", "the smallest nds file" work from suits that task quite well:
http://imrannazar.com/The-Smallest-NDS-File

After you get past that though most assembly work is fairly similar across all platforms and assemblers. So ideally while there would be an intro to DS assembly there is none, the best we have is
http://quirkygba.blogspot.com/2008/12/thin...know-about.html

In this case we look to X86.
http://burks.brighton.ac.uk/burks/language...ut/asm1.htm#toc
The above also includes nicely worked examples of several simple and not so simple methods.
And another (probably better than above)
http://webster.cs.ucr.edu/AoA/index.html
http://www.drpaulcarter.com/pcasm/

Now for tools. The NO$GBA emulator is rightly considered a top flight tool and there are few things that come close, the assembly sections are paid software and the author is AWOL right now so you could not even get a copy if you wanted.

Still desmume has a decent debugging kit
http://www.desmume.com/
Crystaltile2 is probably the best assembly tool in place of NO$GBA
http://bg.tgb.net.cn/ there are some posts around here but it also supports NEF files so you can essentially make your own comments and convert a few structures to a more readable format.
A long standing disassembler for the DS:
http://hp.vector.co.jp/authors/VA018359/nds/ndshack.html

ARM assemblers:
http://common-lisp.net/project/armish/
http://labmaster.bios.net.nz/pyga/
http://www.romhacking.net/utils/343/ (ARM7 only)

See also LIARDS by the same author if you plan on doing DS homebrew using assembly although it has some use for the "inline style" assembly hacks:
http://common-lisp.net/project/liards/

IDA is a popular tool in disassembly circles, here is a plugin for the DS
http://www.openrce.org/downloads/details/56/NDSLDR

The GBA is a bit nicer. GBA roms are self contained unlike the DS which uses a file system. This allows tracing ( http://www.romhacking.net/docs/361/ and http://labmaster.bios.net.nz/vba-sdl-h/ ) and there is also a bit more in the way of tutorials:
http://www.coranac.com/tonc/text/asm.htm
http://patater.com/gbaguy/gbaasm.htm
http://gbadev.org/docs.php
http://nocash.emubase.de/gbatek.htm


nIxx Post #38 Posted 08 March 2009 - 01:59 AM

    GBAtemp Maniac


  • Group: Members
  • Posts: 1,386
  • Member No.: 103,762
  • Joined: 30-September 07
  • Location: Germany

  •  

Oh thank you wink.gif
Looks like i have much to read for now.

Sorry i have still a little question smile.gif what are NEF files

Edited by nIxx, 08 March 2009 - 02:19 AM.


fgghjjkll Post #39 Posted 08 March 2009 - 07:07 AM

    GBATemp MegaMan


  • Group: Members
  • Posts: 1,905
  • Member No.: 130,168
  • Joined: 07-July 08

  •  

QUOTE(psycoblaster @ Mar 6 2009, 11:33 PM) <{POST_SNAPBACK}>
QUOTE(fgghjjkll @ Mar 6 2009, 08:04 PM) <{POST_SNAPBACK}>
can some one compile a S-JIS.tbl and Unicode[jpn].tbl for me?
unfortunatly TaBuLar doesnt work on vista

crystaltile2 has inbuilt code pages.
SJIS.tbl can be found in google by typing in just "sjis.tbl"

awesome thanks



fgghjjkll Post #40 Posted 08 March 2009 - 08:08 AM

    GBATemp MegaMan


  • Group: Members
  • Posts: 1,905
  • Member No.: 130,168
  • Joined: 07-July 08

  •  

umm.....translhextion is now fucking up when i load sjis.tbl or euc.tbl and i dont like windhex's interface. someone reccomend me one?


Noitora Post #41 Posted 08 March 2009 - 09:18 AM

    ::


  • Group: Members
  • Posts: 3,768
  • Member No.: 94,544
  • Joined: 09-August 07
  • Location: Athens

  •  

QUOTE(fgghjjkll @ Mar 8 2009, 10:08 AM) <{POST_SNAPBACK}>
umm.....translhextion is now fucking up when i load sjis.tbl or euc.tbl and i dont like windhex's interface. someone reccomend me one?

Crystaltile 2


psycoblaster Post #42 Posted 08 March 2009 - 12:41 PM

    Divine


  • Group: Members
  • Posts: 2,132
  • Member No.: 112,307
  • Joined: 26-January 08
  • Location: Seoul.. (in Korea)

  •  

QUOTE(fgghjjkll @ Mar 8 2009, 05:08 PM) <{POST_SNAPBACK}>
umm.....translhextion is now fucking up when i load sjis.tbl or euc.tbl and i dont like windhex's interface. someone reccomend me one?

it's probably because of the encoding of the table file
open it up with something like notepad or emeditor in the correct encoding, and "save as" it with a unicode encoding (UTF-16LE)


Sp33der Post #43 Posted 10 March 2009 - 05:00 PM

    GBAtemp Fan

  • PipPipPipPip

  • Group: Members
  • Posts: 435
  • Member No.: 127,341
  • Joined: 31-May 08

  •  

How do you dump text with FileTrip Download Link Crystaltile2? I head it had CrystalScript built in or something like that but still can't find anything. frown.gif


psycoblaster Post #44 Posted 12 March 2009 - 11:10 AM

    Divine


  • Group: Members
  • Posts: 2,132
  • Member No.: 112,307
  • Joined: 26-January 08
  • Location: Seoul.. (in Korea)

  •  

QUOTE(Sp33der @ Mar 11 2009, 02:00 AM) <{POST_SNAPBACK}>
How do you dump text with Crystaltile2? I head it had CrystalScript built in or something like that but still can't find anything. frown.gif

http://bg.tgb.net.cn/CrystalScript.zip
However, I recommend learning the basics of programming and using a custom tool to dump text, as general text dumpers aren't always accurate.


Sp33der Post #45 Posted 12 March 2009 - 01:48 PM

    GBAtemp Fan

  • PipPipPipPip

  • Group: Members
  • Posts: 435
  • Member No.: 127,341
  • Joined: 31-May 08

  •  

QUOTE(psycoblaster @ Mar 12 2009, 11:10 AM) <{POST_SNAPBACK}>
QUOTE(Sp33der @ Mar 11 2009, 02:00 AM) <{POST_SNAPBACK}>
How do you dump text with Crystaltile2? I head it had CrystalScript built in or something like that but still can't find anything. frown.gif

http://bg.tgb.net.cn/CrystalScript.zip
However, I recommend learning the basics of programming and using a custom tool to dump text, as general text dumpers aren't always accurate.


Don't worry about programming languages lol, i already know Python(most used), C++ and Java. The thing is i never used those for romhacking so now looking for a small little guide








Users browsing this topic

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users