GBATemp ROM hacking documentation project (new 2016 edition out)

Discussion in 'NDS - ROM Hacking and Translations' started by FAST6191, Jan 28, 2008.

  1. Sp33der

    Sp33der GBAtemp Fan

    Member
    435
    1
    May 31, 2008
    Netherlands
    You also might want to look into the file formats of the ds: http://tahaxan.arcnor.com/index.php?option...7&Itemid=36 (also stated in the tutorial)
    And i noticed there are some good, short explanation about hacking stuff in some threads which can help

    FAST6191 do you still have that downloadable pdf of the tutorial?
     


  2. FAST6191
    OP

    FAST6191 Techromancer

    pip Reporter
    23,361
    9,153
    Nov 21, 2005
    Assembly on the DS. AP and you section is at the bottom of this post, it deals with a lot of assembly level techniques though.


    A fair bit of work has gone into assembly guides from other people. Among the best are
    http://crackerscrap.com/ Guides to lots of little things. Have a look at some of cracker's trainer guides as well (the older ones preferably).
    http://www.oopsilon.com/The-Smallest-NDS-File
    Also poke around a couple of the pokemon communities. http://www.pokecommunity.com/showthread.php?t=233661 being a nice example of threads.

    The following at present is just a handful of semi relevant information on cheating and aspects of GBA/DS assembly.


    I made another post which I thought I would copy and paste here as it may be of some use. Rest assured a proper cheating guide will appear but this should help a couple of people until it does. Most of the links here probably have already appeared in the thread already but hey:

    Basic cheating theory goes that RAM and to a lesser extent register values can be modified or you can change the games code (or what the device reads as the games code). The former is far more popular owing to it being far easier.
    Read more in my guide above and this site is good for cheats and theory in general (as well as some more on GBA and DS implementations):
    http://doc.kodewerx.org/index.html


    Guides to making GBA cheats:
    http://etk.scener.org/?op=tutorial
    and
    http://ezflash.sosuke.com/viewtopic.php?f=3&t=686

    As an aside it seems several of the good versions of VBA got bundled into one as well:
    http://gbatemp.net/index.php?showtopic=73424

    One of those tutorials is for converting to codebreaker format but to convert cheats cracker's GBACCC:
    http://min.midco.net/cracker/
    This site also has loads of cheating tools including the somewhat hard to find AR Crypt.rar and CBAcrypt.rar which are used for decoding action replay (AR) and codebreaker (CB/CBA) cheats to a more useable format (if they are not already in such a format).
    CCCGP.rar is for patching in Game Genie codes to roms although it is mainly for older systems as nobody really made any game genie cheats for the GBA.

    Anyhow do you want to cheat in an emulator or on a flashcard or using a real action replay on games?

    If it is the former those guides above both use VBA which is great for GBA roms.

    If you want a flashcard and your cart does do cheats well (most have fair support) then try and use that. I am afraid you will have to look up your own documentation (most are fairly simple though)

    On a cart without (decent) cheat support I suggest GABsharky:
    http://gathering.tweakers.net/forum/list_messages/942567/26 Click on Stevens Cheating guide and you will have a nice guide to from start to finish.

    You also have trainers for the GBA which are like patches to use cheats with most able to be activated at the start of the game or with in game commands:
    http://gba.dellicious.de/trainer.php?s=n&o=asc&d=
    http://bubbz.pocketheaven.com/?system=gba&section=patch

    As for the DS a lot of carts (mainly DS slot) support cheat codes and there is a application for cheat codes for real cards on the DS:
    http://chishm.drunkencoders.com/NitroHax/index.html
    There are also real action replays and the like.
    And you can hack your own games if you are good (I would say you probably have to understand those guides I already gave you)
    Cracker again has a guide to training DS games:
    http://ezflash.sosuke.com/viewtopic.php?f=8&t=3900

    Here is a nice writeup of commercial product DS cheats for the technically minded:
    http://nocash.emubase.de/gbatek.htm#dscart...tactionreplayds
    and the same for GBA:
    http://nocash.emubase.de/gbatek.htm#gbacheatdevices


    DS cheats can be made using emulators now there are good ones, cards (high powered cards like the iSMM and DSTwo can make cheats onboard) and actual hardware with things like the action replay

    See also several of the posts on
    http://cheats.gbatemp.net/forum/index.php?board=23.0


    ________________________________________

    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

    NEF is a file format apparently used by Nintendo but supported in the developers version of no$gba (a far more interesting prospect for hackers) and later in the line of things crystaltile2, in practice is acts like an external comments system ("the commands at a given address do X" sort of thing) mixed with a debug info (breakpoints and whatnot).

    The reason this sort of thing is interesting is because when you first disassemble a rom (the DS is quite nice as you have the filesystem- older consoles are not so lucky) you get several thousand lines of barely comprehensible instructions ( http://gbatemp.net/index.php?showtopic=39979&hl= is worth a scan through as it has a bit of info/provides a good example) and indeed owing to developers leaving/reading the game text/pictures/levels and the like from/in the binary and the fact the ARM processors in the DS having two differing instruction sets (ARM and THUMB: http://nocash.emubase.de/gbatek.htm#cpuoverview ) it may indeed be entirely useless (your basic disassembler is a very very crude tool- it is on a par with the ASCII readout of your hex editor in that any good it shows is luck, use of standards or you manually guiding/prodding it to show as such). Anything that cuts this down and makes it more manageable is welcomed, using the NEF files you can essentially comment "out" the things like setting the stack pointer, changing CPU modes and ultimately leave you looking at the juicy stuff like what instructions deal with your chosen interest for hacking or more broadly what deals with what. Similarly it can kind of cut down on the memory/register management side of things that most of ASM is concerned with and most high level languages seek to do away with)- I am loathe to use the word decompiler but they are in the same circles.

    Hopefully I am allowed to paste it here but here is the relevant section from the no$gba debug help (note the passage on SRL- you normally see that format in roms as the file sent over wireless for download play):
    no$gba help quote


    I would argue it is not that relevant to the hacker new to ASM, you would probably be better served reading up on the likes of http://crackerscrap.com/index.php?p=docs http://gbatemp.net/index.php?showtopic=444...t=0&start=0 and http://www.romhacking.net/?category=&P...itle=&desc= (pretty much all of the documents there but the ones on VFW, compression and VBA-SDL are the big three)

    desume (now a proper dev version exists) is also good enough for some ASM work (it plays well with later roms too unlike no$gba).





    AP and you

    For whatever reason developers of the newer DS games include methods to try and detect if their code is running on a flash cart or the real cart. Cart makers and other people will usually try to bypass this but if they are not quick enough for you then you could always try your hand at it yourself.
    Before going on this is an advanced technique and you will find yourself getting into assembly level coding, while it is not necessarily advised you can skate by with a level of knowledge on/appreciation for how DS roms work (covered in this thread), how to make cheats ( http://cheats.gbatemp.net/forum/general-hacking-discussion/ ) and how to hack roms ( http://gbatemp.net/t73394-gbatemp-rom-hack...ion-project-wip ).

    What a game does when it detects a flash cart varies- saves can get wiped, a "thanks for trying the demo" screen can be loaded, the game can lock up (either right at the start or further into the game), the game can move in circles (unbeatable level/boss or something) or something more subtle (phantasy star changed drop rates of certain items) so while you can see a working game do not assume all is well. This the author leaves to you to determine although usually a mix of user observations, your own observations and machine level checks (it locks at level 2 but you check for similar instructions/sections and see that it would also lock at level 7) are what is called for. You should always assume developers/AP makers are creative people in this regard when hacking a rom.
    This guide will not cover the more advanced things like making downloadable content work and fixing it for a given cart (saves and the like) but that should not bother too many people.


    There have been many different ways to try and detect if a game is running on a flash cart or not [this is where I am going to fall down a bit as I have not paid as much attention as I might like] but in general to do things like have saving, cheats and soft reset the developers will alter the game code (this is also part of the reason why clean mode/stealth mode can often run a game that has yet to be patched) and these alterations can be detected.
    The simplest way to check if a change has been made is to do a checksum of the binary (or section thereof) in memory,.
    A simple checksum might be to add the values of the binary up and a change should change this result- change detected. Some of the more modern games can have well over 100 of these checks (occasionally even to the point where it induces a bit of a slowdown in the game even). While checksums are a method there are other options (a nice example relayed a few weeks back concerns Houkago Shounen (a Japanese game from early 2008) that timed how long it took for a save to occur vs the same thing on an original.) while others make use of a peculiarity with DS flash carts reading below 8000 hex in the memory (indeed if you disassemble a game and see a read to below 8000h this is probably what is happening also the debug output of an emulator will often have this) compared to what happens on an original cart.

    The DS can receive code (and thus perform checks) via 4 methods
    ARM9 binary (this is the arm9.bin you will see if you pull a rom apart)
    ARM7 binary (this is the arm7.bin you will see if you pull a rom apart)
    ARM9 overlay (usually stashed in the overlay directory)
    ARM7 overlay (does not usually exist beyond 0k files).

    In commercial DS roms the ARM7 is usually very similar from game to game (to the point where you can swap them without issue for many games which is a quite a feat for a system like the DS) and ARM7 overlays are quite rare. As the ARM7 controls saving for many games this gave birth to the ARM7 swap fix but as the last few paragraphs should have shown just trying an ARM7 fix is probably not going to solve your problem.

    The ARM9 is what does the bulk of the work in commercial DS roms as far as calculating damage from an enemy, fiddling with text, shuffling things in memory and the like. While the translation process will usually involve editing the game data the binary is almost always changed as well (indeed it is not unknown for the text to be in the binary along the with the game code but from a more pragmatic stance the Japanese game might use a fixed width font while the US release will want a variable width one) and this is why swapping it with the already patched Japanese release or trying to use is also a bad/pointless idea. Most hacker translations will avoid changing the binary to the point of changing locations as it means everything after it is now wrong (why having a file system vs something like the GBA or SNES with everything piled into one big file is awesome for hackers) but as the commercial translations will have source code all bets are off here as far as assuming things will stay the same between regions (of course there are several examples of things remaining near enough the same but never assume it will).

    Overlays are blank patches of memory that a game can add a section of code to (overlay if you will) for temporary use for whatever reason and then overwrite it with another one later but still keeping the core of the game loaded- a crude somewhat outdated method of expanding the capabilities on limited memory but about the only one that is available to programmers of commercial DS games (they do not have a nice ?SD card to play with and pull data from/write data to). Checks can be in here as well (quite troublesome too as they may not be loaded for several hours after starting a new game).

    In addition to the two processors the DS versions of the ARM7 and 9 have an additional instruction set/mode called THUMB ( http://nocash.emubase.de/gbatek.htm#thumbinstructionset ) which broadly speaking is a 16 bit instruction set that can run on a 32 bit system (it gets a bit more complex that than but it makes for smaller code and helps if you are limited in bus size if used correctly). Developers will occasionally hide checksums in THUMB code- your disassembler is a dumb tool and will blindly disassemble everything you feed it in the manner you tell it (with the exception of some of the more automated functions of emulators) so in your haste you might skip over one buried in THUMB code.

    It should also be noted that the binaries as found in a DS rom might be compressed (or worse sections of them might be compressed). You can usually snatch these from the ram viewer of an emulator

    So you have read all this, understood it, ploughed into your rom and found an instruction you now know causes your headaches. Chances are if you have this is redundant but ultimately one thing happens at the end of a check and that is a branch depending on the outcome of the check, if you are feeling nice (or better a game runs slow courtesy of checks- always nice to know you not only made a rom work but work better) you can catch it before it ever checks but assuming you did not then the main course of action is to change the branch from well branching to a straight jump to the "good" outcome.

    Cheat bypasses- not so viable for the many hundreds of checks option but still possible for some games. Here rather than targeting the rom image you target the binary in memory with a cheat (the payload of the cheat being the opcode(s) to bypass the AP). Most of the same ideas regarding locations apply so simply trying Japanese cheats on a US release is not likely to work either (although it may well just be a shift so if you redirect some of the locations then you can fix the game sometimes).

    Tools of the trade vary from hacker to hacker but in general you will want
    A method of pulling DS roms apart- ndstool (frontend in DSbuff and DSlazy) will do but something like NDSTS (which also includes some choice info on the binaries/header as well) is well worth having around http://www.no-intro.org/tools.htm . Your standard rom hacking tools for this sort of thing are all that is really needed.

    A disassembler- even if it is only in the emulator the last thing you need to be messing with is raw machine code.
    Several exist including
    ndsdis2- the oldest one still in common circulation. Not favoured by some in the hacking community but works well enough most of the time.
    http://hp.vector.co.jp/authors/VA018359/ndsdis/
    crystaltile2- while the actual tool is a great general purpose hacking tool it does feature a simple editor
    http://gbatemp.net/t73394-gbatemp-rom-hack...t&p=2641950
    IDA pro- a commercial disassembler used by many top flight hackers of all systems. http://www.openrce.org/downloads/browse/IDA_Plugins has plugins.

    Both desmume and no$gba (developers version) feature a level of "live" disassembly which can be very useful. They are also the two chosen emulators for most ASM level hacking work.

    An assembler can be useful but more often than not you can boil it down to a single instruction which you can inject/modify by hand in a rom ( http://nocash.emubase.de/gbatek.htm#thumbinstructionset has the encodings for the ARM and THUMB instructions- it can be as simple as changing one bit in the entire rom but the trick is knowing how to get to that point). Still http://crackerscrap.com/ has some documentation you might want to read and in the tools section there is ARM ASM kit (originally made for cheats but works very well for things like this). Devkitarm has an assembler though.

    Hex editor- there are hundreds of these and most hackers will have several on standby.
    XVI32: http://www.chmaas.handshake.de/delphi/free...xvi32/xvi32.htm
    http://mh-nexus.de/en/hxd/
    naturally crystaltile2 has one.
    http://www.romhacking.net/ has many in the tools section.

    On the commercial side of things
    hex workshop: http://www.hexworkshop.com/
    winhex: http://www.x-ways.net/winhex/index-m.html


    If you fancy a few examples of patching try reverse engineering patches (say some of the rudolph's patches).
     
  3. Sp33der

    Sp33der GBAtemp Fan

    Member
    435
    1
    May 31, 2008
    Netherlands
  4. FAST6191
    OP

    FAST6191 Techromancer

    pip Reporter
    23,361
    9,153
    Nov 21, 2005
    My rom ripping thread from sosuke's backed up here. It is a bit old but I feel it still has some useful info and can help people see things that long time rom hackers take for granted.

    Introduction

    Seen as running commercial DS ROMs is what we all now seem to be doing it might be time for a basic guide on how to rip ROMs so as to shrink them. You can also use the techniques to enhance your ROMs fairly easily (later on I will detail some simple translations and you can also replace sound files with different regions ones to get rid bad dubs and such).

    Now on to the main section, due to the fact the DS is using a file system type method of holding/using data certain things like other languages, sound and intro movies can be removed and/or replaced from a DS ROM with relative ease thus shrinking them.
    As many of the files are given obvious names the filesystem means it is also fairly easy to get at ingame text (some even use plain ASCII) and level data on some ROMs, New Super Mario Brothers is a good example of this.
    Shrinking ROMs for the GBA and most other systems however is an incredibly hard task so you very rarely ever see it happen (you can remove certain things from NES ROMs but as they are tiny anyway it is generally pointless).

    While this is likely of interest to all flash cart owners this feature of the DS ROM setup is especially useful for those of us with one of the EZ1/2 series carts or another flash memory cart whom may be stuck with 512,256 or even 128mbit sized carts and with DS ROMs currently being up to 1024mbit in size that leaves little space for other games or even in the position of being unable to run them at all.
    EZ3 users this thread may also be of use to you as a lot of the 1gbit games will not fit on your cart after the saver space on the NAND is taken and you may not get away with simply trimming the 00/FF's off the ROM image, games such as resident evil and Feel the magic/The rub rabbits can be trimmed to fit.
    EZ4 users you will have to rename your tweaked ROM from ".nds" to something else to get it to work.

    All this being said some DS ROMs however come in a few large files e.g. Phoenix Wright games and Age of Empires which makes things hard if not impossible to shrink easily, some ROMs also come with big files contained within that are over 32mbytes in size which means they have to be trimmed/replaced to get them working on smaller carts: the problem comes however when things like the map data is in one large file e.g. Mario and Luigi partners in time. This is however fairly rare and there may well be ways around it but it will be more complex.

    As far as I am concerned there are two types of rip: lossless and lossy although my definition will differ from video/(zip/rar) compression definitions:
    lossless ones being like the Castlevania rip I will get onto and ones where other languages are deleted (simply put no (in)gameplay errors).
    lossy ones being like the Jump Superstars Saga (a few graphical glitches in menus albeit minor ones) and ones where in game sound files are replaced.

    Basics and list of tools

    As mentioned above you can delete and replace things like intro movies, cutscenes, soundfiles, wireless components as well as other languages and still end up with a ROM that works.
    Note however when ripping sound files (and some other files) from a rom you can often not delete or replace them with blank files and have the rom still work, usually you can use sound files from other games though or at least chop off the last part of the original soundfile with a hex editor.
    Provided you rename it (typically to sound_data.sdat, check the rom being ripped first though) Goldeneye rogue agent (all versions) has a 57kb one called Sound_spawn.sdat (which you could do worse than to keep as a seperate file along with the other basics).

    When replacing sound files keep it sensible though as this means the rom you produce will have the sounds of Goldeneye's weapons (or occasionally none at all) and if you replace a music based games sound files with Goldeneye's then it will be kind of pointless, not mention hearing Goldeneye's weapons when jumping/moving/changing menu sections gets damn annoying if you have the sound up.

    A few basic rules of thumb/things to note:

    1. ROMs frequently come with nice names for their files so you can make sensible/educated decisions as to what to delete e.g. if you have a rom with files called systemmaincomp1.bin and rare_secret_ending_99.dmd it is best to delete/replace the .dmd one.

    2.Files within a rom usually have similar extensions between ROMs for instance sound files are typically the .sdat ones (Tony Hawk's American skateland uses a .strm one however) so if you do this a lot the process may not become easier but you will certainly know where to look.

    3.Following on from above there are typical/obvious names for certain directories like wb or mb for wireless multiboot, chars or characters for the ingame characters (knowledge of the game here can help with finding hidden characters to delete too), levels or tracks for levels and tracks funnily enough (once again knowledge of the game can help delete hidden tracks/levels or enable you to make two ROMs with one half of the game on one the other half on the other).

    4.You do have to play this ripped rom so keep it sensible and do not replace sounds for music based games.

    5.Not all files need to be complete: you can frequently chop the end off the soundfile if you find you are a few bytes away from fitting the rom on your cart or getting the rip down to size.

    6. Look at other peoples rips: the techniques they use may give you clues to your own (this is especially useful when ripping a EU release where there is a J or U release with a rip already out there) or you may be able to improve on theirs, to this end SHARE your rip techniques too.

    One final thing, the DS soundfiles have been reverse engineered and should be relatively easy to edit:
    http://sosuke.com/ezflash/viewtopic.php?t=1221 I will put up a whole bunch of infomation as and when I have it.

    Intro to the techniques over: what you will need for this:

    NDStool: (The main tool you will likely be using for all this)

    I use an older version which works fine for me, newer versions do things differently and so will give different CRC32 values.
    To this end I put up the old version on my site:
    http://www.4shared.com/dir/514850/ef8a1bee/sharing.html

    Newer version:
    http://darkfader.net/ds/ (About halfway down the page under the header DS development tools)
    source:
    http://cvs.sourceforge.net/viewcvs.py/devk...ls/nds/ndstool/

    What this program actually does is allow you to seperate all the individual components of the rom and allow you to modify/delete them and then can be used to recompile all the components back again into a rom that hopefully works.

    NDSTool is a command prompt based program but a GUI called DSLazy is available, I find batch files easier however so this is just here for completion (note DSLazy also requires .net framework to run)
    http://l33t.spod.org/ratx/DS/dslazy/

    NDStool has a usage guide/command switches list if you just run it in a DOS prompt but as you will only probably be using it to deconstruct and recompile NDS roms (it does have quite a few other interesting features) you can use the following batch file suggestions.

    As was eluded to above NDStool is command prompt based, there is a GUI available (linked above) but NDSTS (see below) and the following batch files work best for me, on my PC I have made up two batch files which can be used to disassemble a rom and then reassemble it after tweaking it, I have these stored in a subdirectory of my NDS rom ripping folder so I can simply copy them out with NDSTool disassemble the rom, tweak and delete things and then put the rom together.

    My advice is to put these into a seperate batch file for each step, if you did not know how to make batch files a batch file is essentially a list of DOS prompt commands, to make a batch file open up notepad (or some other editor that can save a file as a .txt one) paste the following section in and save the file with a .bat extension, simple huh.

    For a nice list of DOS commands and a basic explanation either to refresh or learn for the first time here is a good place to look.

    (note: as MS in their infinite wisdom changed DOS commands with different versions of Windows the following batch files may not work for systems not running windows XP).

    Disassembly

    I have included a rename command so you can simply put the batch file, the uncompressed rom and ndstool in an empty folder and run the batch file to disassemble the rom, if you have the rebuilding batch file as well you can copy that across as it will not affect the process.

    CODErename *.nds x.nds
    ndstool -x x.nds -9 arm9.bin -7 arm7.bin -y9 y9.bin -y7 y7.bin -d data -y overlay -t banner.bin -h header.bin

    Now you just have to run this batch file (it is essentially a program so just double click it) and a DOS prompt will flash up wait 30 odd seconds (depending on rom size) and the DOS prompt will close and on your drive in the same directory as the batch file and ndstool some folders will appear (data, overlay...) and a bunch of files will appear, now you can edit the rom as you please although I suggest you stick to the data directory as the others contain fairly vital data which is rarely that big anyway.

    Rebuilding/compiling:

    CODEndstool -c xmod.nds -9 arm9.bin -7 arm7.bin -y9 y9.bin -y7 y7.bin -d data -y overlay -t banner.bin -h header.bin

    When you run this from the same directory as NDSTool and a previously disassembled (and now probably modified) rom it will make up a file called xmod.nds.
    You can leave the original x.nds file alone and if you are using it the disassembly batch file as well for this batch file will not cause ndstool to use anything else other than the files required to be included in the rom it makes up.

    You can also include a few more commands like "del *.bin" and "rd data /s /q" and "rd overlay /s /q" after the ndstool section to tidy up after rebuilding but you will likely be deleting files and hoping the file gets small enough so you do not really want to get rid the files that quickly, many find it nice however if they can be rid of "useless files" if you make a batch file to go with your rip guide.

    Now you can have three files (ndstool and the two batch files) which you can use to build and disassemble roms, I also keep a copy of goldeneyes small sound file to hand in the same directory as these three files are stored in for convenience.

    NDSTS (NDS top/tool system: a tool by coolhj of GBATA (GBA tool advance fame):
    grab both here:
    http://www.gbadat.altervista.org/gbata.htm
    project homepage:
    http://ndsts.handholder.net

    This program is windows based and has a user interface this time, it can be used to extract individual components from DS ROMs without having to disassemble them saving time if you are doing things like the Megaman re-Japanese voices tweak or you simply want small sound files from a rom such as Yoshi touch and Go or Goldeneye.

    NDSTS can also replace/import files although they have to be the same size as before which does not really do much for us when ripping ROMs, hopefully a later version will make life easier and enable different size file replacement.

    *While not essential for most of this a hex editor is very useful, the one I prefer is Hex Workshop which is not free, available here:
    http://www.bpsoft.com/
    A very good freeware hex editor:
    http://www.chmaas.handshake.de/delphi/free...xvi32/xvi32.htm

    Quite often you will be using a hex editor to trim down files, to this end Cracker made a program to cut files down in size.
    Grab it here: http://min.midco.net/cracker/filecutter.zip
    Usage filecutter file.in length file.out

    List of rips
    *My end CRC32 values may be different to yours due to the fact that I use(d) an older version of ndstool when making these (which you can grab from my site), in the future I may just include initial CRC's.

    As large batch code makes for a post that is not so easy to read I have made use of the hiding/spoiler features: you will require Javascript enabled for it to work (I use Firefox and in the options, content, advanced settings for Javascript I only have raise/lower windows enabled and it works fine for me).

    I am also considering making up a zip containing all the batch files and methods detailed here, updating would happen although it would be a pain to do. I could include windows 98 compatible versions (as it stands most of the rd commands can be replaced to use the deltree application). Peoples thoughts?

    The collection of rips available is getting to be quite nice but if you have/make any more they would be greatly appreciated and if used credited to you: obviously include your method, name of rom and region, initial rom CRC is helpful if ever a bad dump is found to have happened.
    The resulting ROM’s CRC is good to have, data about gameplay changes, if any, and I am sure many would appreciate an IPS or some other type of patch if it is small (my IPS patch for the Jump Superstars Saga was over 12 megabytes in size which is a bit large for distribution especially when the batch file is in the kilobytes range).


    Just to save any trouble later make sure you have a backup of the rom before you start messing around with it.


    EZ3 compatibility file
    Slade found that unpacking and repacking a DS rom with NDStool could make some roms work that did not before with the EZFlash carts, here is a batch file suggestion to make it quick and easy:

    To use make up a batch file with the code section and place the resulting batch file, the rom and NDSTool into an empty directory and run the batch file.
    Two roms will be generated xmod.nds (the rom you burn) and xoriginal.nds (your original rom), it will also clean up after itself so you will only be left with ndstool the two rom files and the batch file.

    This batch file might not work on non-XP systems.

    CODErename *.nds x.nds
    ndstool -x x.nds -9 arm9.bin -7 arm7.bin -y9 y9.bin -y7 y7.bin -d data -y overlay -t banner.bin -h header.bin
    ndstool -c xmod.nds -9 arm9.bin -7 arm7.bin -y9 y9.bin -y7 y7.bin -d data -y overlay -t banner.bin -h header.bin
    rename x.nds xoriginal.nds
    rd data /s /q
    rd overlay /s /q
    del *.bin

    Castlevania: Dawn of Sorrow 512MBit to 256Mbit (all versions)(also 128mbit rips)
    Thanks to bryehn over at GBATemp for making me stop being lazy and trying this out.

    Japanese Version:
    Called Akumajou Dracula - Aoitsuki no Juujika in Japan but it is the same game none the less, I do not know how many people will read this wanting a Japanese rip but what they hey it is simple enough:
    Initial CRC32: 0DF769EE
    256 rip End CRC32: A7EBE2CC
    128 rip End CRC32: 245A3646

    Disassemble with NDSTool
    Replace the movie named cvop.dmd in the "data\mv" directory with a 0k file of the same name (I right clicked and made a new paintfile (.bmp) and changed the name and extension to that of the movie file).
    Then delete the movie file if you have not already
    Recompile the rom. You do not have to worry about skipping the movie and the game will go straight to the start screen.

    I completed castlevania a while back but here is some untested batch code that should do the trick.

    Warning: Spoilers inside!


    128MBit Rip, 14.3MBytes
    You will need a small soundfile to replace the soundfile in this game, obviously you will lose the sounds so I only suggest using this for a 128mbit cart or if you always play without sound.

    I used the Sound_Spawn.sdat I grabbed with NDSTS from Goldeneye (all versions have the same file) and renamed to Sound_data.sdat
    Disassemble with NDSTool
    Replace the movie named cvop.dmd in the data\mv directory with a 0k file of the same name (I right clicked and made a new paintfile (.bmp) and changed the name and extension to that of the movie file).
    Then delete the movie file if you have not already
    Replace soundfile with small one
    Recompile the rom. You do not have to worry about skipping the movie as the game will go straight to the start screen.

    European Version
    Initial CRC32: 8E908CE7
    256Mbit Rip End CRC32: 5C719E89
    128Mbit Rip End CRC32: F3FB54CF

    Both methods same as Japanese one above although the 128Mbit rip will give a file 15.8Mbytes in size presumably because of the extra languages.


    USA Version
    Initial CRC32: 135737F6
    256Mbit Rip End CRC32: E9992536
    128Mbit Rip End CRC32: 029F2EA3

    Both methods same as Japanese one above and will give same sized files as the Japanese rip

    A little nicety, Venom released a trainer for the US version of Castlevania which even works with these rips (only the intro movie dropped version has been tested by me so far)
    see this thread for more information: http://www.sosuke.com/ezflash/viewtopic.php?t=924

    256mbit NDSPatcher rip Euro version

    I only done this for the Euro version but the technique should work regardless.

    I left this as a nod to the NDSPatcher, personally I think the method above is better (smaller file, simpler use of the rip).

    This is actually a very simple rip (I got it from the NDSpatcher download (most of you will still know but NDSpatcher was the first really viable method of getting DS roms to work on a normal GBA cart)) and is actually lossless with regards to gameplay: all you have to worry about is skipping the intro movie or it will crash (the above methods do not have this issue.

    Unfortunately GBATA's fix overdump feature does not allow for a trim to 256mbit so life gets a bit harder.
    You will need to get a hex editor and open the rom in it.
    What you are going to have to is cut the rom in half as all the last half of the rom contains is the intro movie which while nice the 32megabytes of space is either the difference between you being able to play the game or having another game, or two, on your cart.
    The rom is 512mbit in size so you are going to see the number 4000000 (67108864 decimal) as the last number in the file.
    To this end go to the point 2000000 (33554432 decimal) in the file and select the rest of the file and delete it.
    With hex workshop the is no select all after this point command so you after you use the goto command (ctrl+G) and type 2000000 or 33554432 decimal as you point of choice you will then have to use select block and type 3FFFFFF (one less than 4000000) or 67108863 decimal and delete the whole lot.
    I have tested this on an EZ2 256 and it works fine (you will have to not use the DS loader)
    When using flashme you may have to force flashme booting by holding down the a,b,x and y buttons to get it to boot from your EZ cart.

    Unfortunately my IPS patcher was playing up and did not want to create a working patch for this so I have none to give you. (Thinking about it, it might be possible to patch the last 256mbit to 00's or FF's and then use GBATA to shrink them.).

    Jump Superstars Saga.
    Initial rom CRC: 49EFB6B3
    End rom CRC: 7B50B1F6
    Some minor menu issues (nothing major at all and in-game play works fine)
    This is a great game that due to licensing issues will likely never see a release outside of Japan. It could also serve to answer the eternal questions like: in a fight between Dragon Ball Z's Goku and Naruto who would win?
    My poor attempt at humour involving shows I do not like aside this is a potentially slightly more complex rip than before as it involves deleting a few files and using a DOS prompt.
    To this end Rygar of the SCDev.org forums made a rip technique and assassda over at GBATemp made some batch code, following is a slightly modified version of it.

    Make up a batch file with the code section (copy and paste the "code" section into a text file editor and save with the extension ".bat")
    Run with ndstool called ndstool.exe and you Jump superstars saga rom unzipped in the same directory (name should not matter as long as it has a .nds extension)

    After a minute or so you will end up with a file called jssrip.nds which is just under 32mbytes, burn this to your cart.

    I tested this on an EZ2 256 with no loader and it worked fine. If I used flashme to boot I had to force flashme by holding down the a, b, x and y buttons.

    Oh and there is an English and an Italian translation in the works http://www.translationrl.it/ once it gets to a reasonable level I will test it out with the rip and if necessary alter the batch file.

    Warning: Spoilers inside!

    I made an IPS file which was over 12 megabytes in size which I am not going to distribute as it is too big especially with the batch file not even hitting 100kbytes. I might look at an XDelta patch

    Megaman Battle Network 5 rips and enhancements

    The European version is 512mbit in size but deleting the languages will get it below 256.

    European (English) 256 rip batch file from Slade:

    This removes all other languages other than English, should you want a rip that leaves another language then simply replace the language you want in the batch file with eng e.g. if you wanted a French language rip then you would replace the "rd data\data\rom_fra /s /q" line with "rd data\data\rom_usa /s /q".

    Warning: Spoilers inside!

    Enhancements
    An enhancement (at least a far as I am concerned) voice change to Japanese (requires the Japanese version of the rom called Rockman EXE 5 DS - Twin Leaders).

    US version (EU ripped and not ripped versions should work but I have not tried it).
    Initial CRC32: 16F03F13
    End CRC32: F38B19EB

    Having played the game one of the most annoying features/problems was the appalling voiceovers that occur at repeated intervals (jacking in, battle start etc) and inspired by a post on gbatemp I thought I would have a go and see if I could get it so I can listen to the Japanese voiceovers as opposed to the dub.

    What I did was disassemble the US rom using NDStool and there is a file called sound_data.sdat in data\data\rom\ds directory replace this with the Japanese ROMs version (in the same directory as the US version: either use NDSTS to extract it or NDStool to disassemble the rom) then rebuild the US/EU rom with the replaced sound_data.sdat file.

    You can use the batch code suggestions above if you wish to save time with NDStool.

    After all this you will then have rom with Japanese voiceovers and English text which for me is perfect (both the rom and the lack of poor voiceovers).

    An untested method but you could rip the Japanese soundfile pad it out (it is smaller) in a hex editor to match the size of the US one and import it via NDSTS.

    Sonic Rush (U) 512 to 256mbit (two sepearate files for the two characters).

    I made it up and tested it, works fine on a EZ2 256 and EZClients patching mechanisms, to use the Blaze rom complete act1 (beat the boss) with the Sonic rom grab the savefile and burn the Blaze rom with the Sonic act1 save file (EZClient named the roms the same so it should be simple enough). The sound is missing from some bonus levels and menus but it is a good rip otherwise, Link to original post:
    http://boards.pocketheaven.com/viewtopic.php?t=3027

    Animal Crossing 256mbit to 256mbit. (should work for all versions: E,U of J)
    No not a typo, the patching method used by EZClient adds some code to the start of this rom making it bigger and causing it not to be able to be burnt to a 256mbit cart (everyone else should be fine though).

    I made it work by deleting some code using a hex editor from the end of the soundfile and rebuilding the rom, my end result was a bit drastic giving a soundfile of 7.5 or so megabytes from 10.2, game works fine as far as I have tested it though.

    (if you follow this method delete less soundfile, others have and it worked fine), I used a hex editor but if you do not want to GBATA (linked with NDStool above) has a fix overdump feature which could be used to trim the soundfile (rename the sound file with a .gba extension and fix overdump to 64mbit (8megabytes), untested by me and a hex editor would be better but it should work, also this would be the perfect time to use crackers cutting tool (see tools section up top).

    Seiken Densetsu DS (Children of Mana) 512mbit to 256mbit
    Initial CRC: D6FBDCC0
    End CRC: (sorry not yet).

    Raeca posted this rip and I reverse engineered it (A fun few hours involving going over about 4000 crc32 values by hand)

    Make the following into a batch file (open notepad or some editor capable of writing a .txt file paste the following in and save it with the extension .bat) and run it.
    A rom called COMRIP.nds will appear (batch file may not work on non-XP systems):

    Warning: Spoilers inside!

    On my EZ2 I had to cut some of the soundfile to accommodate for EZClients patching mechanisms much like animal crossing, opening movies and in game cutscenes are not around anymore.

    Snowboard kids US 512mbit to 256mbit.
    Intital CRC32: 7AC43D00
    End CRC32: 2EB9BD31
    This one is easy (after getting rid of the 00's/FF's at the end of the rom is less than 2mbytes too big) simply disassemble the rom delete the wireless multiboot files (I left the directory intact), this will obviously make wireless multiboot no longer a possibility, then reassemble the rom. Works fine on EZ2 with new years patchDLL.dll file.

    If you have a burning desire for wireless multiboot you should be able to make the game work by deleting the hidden characters, other regions should be simple enough except perhaps Europe which due to the extra languages.

    If I get bored I will whip up a batch file but quite frankly it is only deleting a few files so it realistically does not need one.

    Nintendogs Euro (All versions): 512mbit to 256mbit by deleting unneeded languages:
    Initial CRC32's
    Nintendogs Labrador and friends: 7F9656C3
    Nintendogs Dachshund and friends: 8E7FAA00
    Nintendogs Chihuahua and friends: 78678FEF
    I have not tried the Dalmatian version yet.

    There 20 possible resultant versions (4 games: 5 languages each) so unless I get really bored (upon which I will likely do some more rips) do not expect any resultant CRC32 values soon, there will be even more if you consider leaving multiple languages remaining.

    This may not work with the kiosk demo version that was released as it is currently untested but in all truth why would you bother.

    You can get this game under 256mbit and not lose any game play aspects easily. I only tested out a French, English and Spanish version although German has been tested by others and there is no reason to suspect it will not work in Italian.
    What you need to do is delete all the files pertaining to the other languages on the rom and reassemble the rom having done this. If you are having particular trouble making up a batch file for your desired language post and I or someone else will help (if you are stuck with windows 9x the rd sections could be replaced to use the deltree application)

    The batch file following will need to be changed to omit the files for your particular language according to the following few lines i.e. if you want a Spanish language rip make sure there are no Spa sections (compare the French and English rips below if you are having particular trouble):
    Spa - Spanish
    Ger- German
    Fra - French (note the a at the end of the abbreviation)
    Ita - Italian
    Eng - English

    Anyhow on with the batch code that should even clean up after itself, I am almost certain this will not work on non-XP systems (you could use deltree in place of the rd commands and it should work).
    Place the Nintendogs rom of choice in a blank directory along with the batch file and ndstool, run the batch file and in about a minute maybe two you will have 2 ROMs appear one called NintendogsEU256rip.nds (guess which one you burn)

    It is necessary to set your DS to the language of the rip or you will be white screened.

    English 256 rip:

    Warning: Spoilers inside!

    becomes French 256 rip (note a rom called NintendogsFRA256rip.nds will appear in place of the NintendogsEU256rip.nds from the rip above).

    Warning: Spoilers inside!

    Meteos 256 Mbit rip (all versions)

    Initial CRC32's:
    European: 2ED041E2
    USA: E88BF82E
    Japanese: 138556D1
    Ripped versions CRC32's later

    A great puzzler that is 512MBit in size.

    Simple enough to do
    Disassemble the rom (the batch file suggestions above are there for a reason)
    You will then need to replace the sound_data.sdat with a small one (I used Goldeneye's Sound_Spawn,sdat renamed to sound_data.sdat)
    Delete the meteos_c.p256 file
    Rebuild

    You will obviously lose the sound and a movie but the game is perfectly playable otherwise.

    Naruto - Saikyou Ninja Daikesshuu 3 256mbit rip

    Thanks to Darkforce over on GBATemp for this

    Initial CRC32: 4D99B109
    End CRC32: 2EB9BD31
    Disassemble the rom (the batch file suggestions above are there for a reason)
    You will then need to replace the sound_data.sdat with a small one (I used Goldeneye's Sound_Spawn,sdat renamed to sound_data.sdat)
    Delete the following files from the "data\data\tra\" directory
    ending1.tra
    ending2.tra
    load.tra
    n64sho.tra

    Rebuild the file.

    You will lose sounds and the endings screens but should be good otherwise. If you wish you could also play around with having seperate ROMs for all the different levels kind of like the Sonic Rush rip above.

    Polarium size decreasing file.

    Polarium makes for a great "few megs left need something to put on my cart" type rom and this cuts down the size nicely, Thanks to Chuckstudios for the guide and batchfile.

    What you will need to do is delete all the language files you are not going to use, either do it by hand or use the following batch file, I may modify the batch file to make it smaller by including some "del FR_*.* /s" type commands sometime in the near future. Once again should you want a different language rip replace all the FR_ mentions with most likely an EN_ (I did not have the rom to hand when writing this) should you want a French version, FR,GE,IT,SP correspond to German,French, Italian and Spanish.

    Polarium.nds's size from 8.00 MB down to 5.64 MB.

    Warning: Spoilers inside!

    Osu! Tatakae! Ouendan 256 rip
    This one is a simple soundfile replacement. I am going to have a look at replacing the larger sections of the soundfile to get the rip more playable (it is a humour laden game and the lack of sound does not like it much).

    New Super Mario Brothers Hacks, translations and a 128mbit version
    This link is not a rip but a patch to get it working on falshcarts: http://ezflash.sosuke.com/viewtopic.php?t=1266 Credit is due to WRG for this I merely made a patch. This patch will unfortunately render you unable to use the following rips with the exception of the translation (do it before patching).

    After a build/rebuild with ndstool the rom is just over 19megs and a rip (either sound or levels split) is entirely possible, but given all the other things that have I have been doing with this rom means I have got around to this yet.
    In the data\script directory there exists three .bmg files that contain the menu data. It is all in plain ASCII seperated by 00's (Extended ASCII does not work and only gives ?'s).
    My initial translations have been made using NDSTS.
    French menu translation (it is currently very crude French: up there with zero wing for bad localisation)
    You will need XDelta although I have provided a more complex method using IPS patches:
    http://evanjones.ca/software/xdelta-win32.html

    Using xdelta, a patch and the following batch file you can also get a translation
    The patch: In the NSMB hacks directory
    The batch code:
    CODErename *.nds NSMB.nds
    xdelta patch TRANS.patch NSMB.nds NSMBfre.nds

    Have the patch, the batch file,xdelta and NSMB (psyfer release) in a blank directory. Run the batch file and in a few seconds you will have a file called NSMBfre.nds pop up. This is what you burn to your cart (after patching with your carts patcher if necessary).

    I tested it on an EZ4 and it works fine.

    See this thread for more information: http://www.sosuke.com/ezflash/viewtopic.php?p=6851

    All the files are named fairly nicely (maps, enemies etc) and are referred to in each other so you could theoretically create a hard mode hack (different enemy placement, more enemies, different enemies etc). I am going to focusing my efforts on this for the time being.


    *Rip guides I would like to see/am working on:

    Seen as I have an EZ4 now many more rips and tweaks will come to light over the next few weeks.

    Metroid Prime Hunters 512 to 256
    Had a look at the file but it looks like a split for multi and single player or levels split (single player by all accounts was not good anyway) as the language sound and video combined when removed do not make it small enough.

    Tony Hawk's American SK8land 512mbit to 256mbit.

    A release group (I forget which) actually made a 256mbit rip, it was left only with one song but they never released the method.
    Slade suggests deleting the contents of the ROM between 1AF1800 and 3CEF3D4 thus eliminating most of the soundtrack but getting the ROM small enough, I will test it soon.

    Owing to the reverse engineering of the DS soundfiles: http://sosuke.com/ezflash/viewtopic.php?t=1221 I may even have some methods to make custom soundtracks, curently I have no compatible codec (it is an unknown ADPCM variant) so replacing the soundfiles gives a just about recognisable sound that surpasses any death metal you will have ever heard.

    Biohazard/Resident Evil 1gig to 512mbit (2 seperate characters)
    Raeca had this rip but did not release the method, no worries it should be fairly simple, a 256mbit may also be possible if video and sound were dropped but this would spoil the fun.
    Slade made a rip contained later in this thread although only the main/intro video was deleted, only the Euro version (Japanese untested) works with EZFlash carts right now.
    Rip link:
    http://sosuke.com/ezflash/viewtopic.php?t=457&start=14

    I have also been looking at this and a 256rip may be possible.

    Mario Kart 256 to 128mbit
    Made as a nod to the few with a 128mbit cart, how you all are playing with DS commercial roms I do not know but anyway stick with it.

    You can rip tracks and other things out and compile separate ROMs, however I want to try and do it with all the new tracks and all the classic tracks on two seperate ROMs, I may also consider an online tracks version.
    Everyone else stick with the full rom.

    Marvel Nemesis 512 to 256mbit.
    I have a working copy but I feel I deleted and replaced too much for it to be worthwhile (I deleted characters which may also cause the game to crash as play goes on and Goldeneye’s sounds which I used to replace the original ones are no good).

    Super Monkey Ball 512 to 256mbit:
    Had a look at the rom and there are nicely named files for things like the golf minigames.

    Japanese Games 512 to 256mbit
    As usual the rest of the world are left out (at least for a while) on some of the good Japanese language games, but some of these are 512mbit in size.... can you see where this is heading (Tenchu is first up on my list right now I.E it is almost done).

    Warioware touched enhancements
    Some great games were included in the Japanese version such as a spot the difference game in 9volts section, some games were also altered when coming out of Japan. Ashley's song is also great in Japanese.
    A bit of renaming and copying should be able to achieve something good.
     
  5. eltrut

    eltrut GBAtemp Regular

    Member
    130
    0
    Jan 30, 2008
    Just downloaded the new Romhacking101 odf wanting to get into translations, so far it seems to cover nearly everything i need to know bar Japanese!

    Thanks FAST for being awesome
     
  6. Sp33der

    Sp33der GBAtemp Fan

    Member
    435
    1
    May 31, 2008
    Netherlands
    FAST, i was messgin around with the graphics of Kidou Senshi Gundam 00 DS,
    And i'm wondering how do you get the image so nicely "clean"(can't describe it very well) like this: http://gbatemp.net/pix/32303/gundam2.JPG

    i jsut get some garbled pixels :S, how do you find it the correct graphics/buttons/pictures?
     
  7. FAST6191
    OP

    FAST6191 Techromancer

    pip Reporter
    23,361
    9,153
    Nov 21, 2005
    I forget the file extension (the name should be the same/similar to the file that holds the images) but crystaltile2 supports the format that holds the layout of the images.

    Open the file viewer and right click, the option to load it should be there along with the palette and the image itself.
     
  8. psycoblaster

    psycoblaster Divine

    Member
    2,132
    2
    Jan 26, 2008
    Seoul.. (in Korea)
    load the map and the palette
     
  9. Sp33der

    Sp33der GBAtemp Fan

    Member
    435
    1
    May 31, 2008
    Netherlands
    w00t is worked thanks guys [​IMG], this does works for everything or just with this rom? Which uses narc files.
     
  10. Algester

    Algester Member

    Newcomer
    24
    0
    Sep 17, 2008
    just asking on is there a way to convert .VXDS extension to .MODS extension (both are video extensions) or vice versa im still willing to go on making a self made undub for rune factory 2
     
  11. fgghjjkll

    fgghjjkll GBATemp MegaMan

    Member
    GBAtemp Patron
    fgghjjkll is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    2,041
    42
    Jul 7, 2008
    can some one compile a S-JIS.tbl and Unicode[jpn].tbl for me?
    unfortunatly TaBuLar doesnt work on vista
     
  12. psycoblaster

    psycoblaster Divine

    Member
    2,132
    2
    Jan 26, 2008
    Seoul.. (in Korea)
    crystaltile2 has inbuilt code pages.
    SJIS.tbl can be found in google by typing in just "sjis.tbl"
     
  13. nIxx

    nIxx GBAtemp Advanced Maniac

    Member
    1,528
    78
    Sep 30, 2007
    Gambia, The
    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). [​IMG]
     
  14. Noitora

    Noitora ::

    Member
    3,765
    0
    Aug 9, 2007
    Greece
    Athens
    gbatek has everything you need.
     
  15. nIxx

    nIxx GBAtemp Advanced Maniac

    Member
    1,528
    78
    Sep 30, 2007
    Gambia, The
    Germany
  16. SCVgeo

    SCVgeo GBAtemp Regular

    Member
    115
    0
    Nov 5, 2008
    United States
    USA
    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)
     
  17. FAST6191
    OP

    FAST6191 Techromancer

    pip Reporter
    23,361
    9,153
    Nov 21, 2005
    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
     
  18. nIxx

    nIxx GBAtemp Advanced Maniac

    Member
    1,528
    78
    Sep 30, 2007
    Gambia, The
    Germany
    Oh thank you [​IMG]
    Looks like i have much to read for now.

    Sorry i have still a little question [​IMG] what are NEF files
     
  19. fgghjjkll

    fgghjjkll GBATemp MegaMan

    Member
    GBAtemp Patron
    fgghjjkll is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    2,041
    42
    Jul 7, 2008
    awesome thanks
     
  20. fgghjjkll

    fgghjjkll GBATemp MegaMan

    Member
    GBAtemp Patron
    fgghjjkll is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    2,041
    42
    Jul 7, 2008
    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?