Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Fire Emblem Ultimate Tutorial.doc
Скачиваний:
1
Добавлен:
01.07.2025
Размер:
7.86 Mб
Скачать

Part 5: Finding asm Routines & Basics of Using a Debugger

First, no$GBA debugger is essential to this section. Find it, download it, and use it. The password is “veta” which it should say either on the download site or in the zip or something.

Now, this section will be much shorter than the others. Aside from my hand hurting a lot, I’m going to be vague and just give general tips for some things.

There are a few tricks to finding routines. First is looking at doc. Most ASM hackers have doc and will use offsets in them. Look at the offsets. For instance somewhere above I have a hack having to deal with the critical damage. You could look around that offset in a debugger to see what’s around it and what’s happening. That’s one way to find one. FYI, -I-found the offset by looking in Hextator’s doc, I believe. I already mentioned the doc earlier, so I’ll stop here.

Next is using some hex editor tricks. Certain pointers can often be found embedded in the ASM. This is nice because they’re things you can know/predict/find by other means. For example, you know the text shown in the support conversation room in the extras menu of FE7 says “Select whose conversation you want to read”, so you search part of that text as a string in FEditor Adv and find the text slot—0x0FC4. Fun. Now search 0xC4 0x0F 0x00 0x00, the text ID as a word in little endian. You’ll find a match at 0x9B9B0 in a hex editor (keep in mind this would be referenced in ASM etc. as “0x0809B9B0”). As it turns out, this is a somewhat simple case as no other instance of this string occurs in vanilla FE7 (though technically I searched on a hacked ROM but it was only slightly hacked so… DETAILS). If you look at this offset in a debugger, which I’ll explain how to do shortly, you can search for where exactly it loads that word, 0x0000FC4, and then look around for clues as to what’s what. It helps give you a general idea of where to look, at the very least.

Similarly, you can do such things with graphics offsets, palette offsets, and TSA offsets, which are often embedded in ASM if they aren’t in tables. If they ARE in tables, you can sure as heck go search up the tables, and the pointers for those will also be in the ASM. In general though, the less common something is, the easier it is to find the routine you’re looking for—if you’re looking to hack character abilities and go searching using the character table, you’ll probably have a harder search than normal because the character table is referenced several times throughout the ASM, being a major data table and all.

I used this to find some routines such as the ones that loaded certain palettes—then I expanded them so that they only loaded certain palettes in certain chapters. Thus is the idea behind my “custom palette for the post-game” hack which changes the general color scheme of the post-game to be purple and some slightly obscure shade of blue as opposed to blue and red.

Now you need to know how to actually figure out what’s happening in the routines and how to decipher them. Having practiced ASM as much as you have, you should have a good idea as to what most codes do, and should even be familiar with some memory offsets. It’s also nice to keep lists of hex values in store—if you’re trying to change the Nils portrait that appears in the support conversation room, which is hardcoded via ASM, you’ll want to know his portrait is 0x41, so that you can look for something like mov r1, #0x41, and then change that 41. (Just searching “41” in a hex editor probably won’t do you much good since there will be too many instances of that, FYI.)

As it turns out I explained this before to somebody on an instant messenger (*glances towards that one conversation I ACTUALLY dared to use in this tutorial*) so I have a poorly labeled image to help explain things:

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]