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

Ifat *Conditional id* *asm routine pointer*

You can type in the offset of your ASM routine (don’t forget the +1 for thumb, lol) and whatever comes after is what happens if it’s true and whatever comes after the “else” is what happens if it’s false. Or something. I’m tired right now and can’t be bothered to check since this is one of those things I just use trial and error with until it works. Look, I seriously am NOT qualified to be teaching this, didn’t we establish this near the beginning? XD

https://dl.dropbox.com/u/8875056/hacking/asm/Tile%20Text%20Change%20Hack.zip – This hack changes the list of text names used for tiles in a certain map in TLP where you are in a “constellation” and so if the tile said “floor” it’d be awkward and yet I don’t know enough about tilesets (surprisingly enough) to really make my own proper tileset and stuff… so I came up with something that would just use an entirely different set of names for a specific chapter.

I may have mentioned this before, but finding where to hack routines is difficult. And I’m sure I mentioned that finding space for them is difficult.

One of the issues is that when you repoint, you can’t magically repoint to anywhere in the ROM. Basic branching codes use relative offsets, which to put simply, means they have like, one byte, and that one byte is a “pointer” to where to branch to. That’s a problem because if you’ve worked with pointers, you’ll know they’re usually 4 bytes. Yeah, well, in ASM, they save space by saying “this thing is X bytes ahead of or before me”. The thing is with only 1 byte for this value, it limits how far you can branch from one instruction to another.

Thus you have the bl command, which is better, but still not perfect. The bl command is an opcode that uses 4 bytes: it has… I believe 3 bytes (it might actually be like 20 bits, I don’t know and I don’t feel checking—thumref or GBATek could tell you exactly how it works but I’m more about the practicality of all) and can link to much farther locations, but still not anywhere in the ROM. So now the issue is getting a location close enough to the original routines, which are usually at the beginning of the ROM.

What I did is use the fact that weapon icons in FE7 start at about 0xC5EA4 or something (this is off the top of my head) and expanded them elsewhere. Because of that, I now had a bunch of free space from where the icons used to be. I could use this to put ASM codes. The issue is that for other people to use my codes, they would also have to expand their weapon icons, or else repoint the ASM on their own, both of which could be troubling since it isn’t exactly user-friendly, though you shouldn’t have too much of a problem with repointing weapon icons if you’re this far into my ASM tutorial. :P

So another thing with bl commands is that for it to work right, you have to pretend the file you are making uses the actual offsets the ROM would use. Actually, you could probably technically write directly to a ROM, and there are programs which make this process easier. However, I am uncultured and taught myself this, so I am going to teach you my barbaric ways of copying and pasting ASM codes from offsets (at least until I make a program that I like and can use to make this easier OR figure out some other method that already exists that I like).

With that, I will now post the ASM hack:

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