- •Downloads:
- •Update Log:
- •Table of Contents:
- •Prologue: Bare Basics
- •Chapter 1: Key Terminology & Abbreviations
- •7Zip Archive – Supposedly the best file archiver there is, but not used as much, and thus less convenient. Requires 7zip or winRar to use.
- •VisualBoyAdvance – most people’s emulator of choice, almost always referred to as “vba” for short.
- •Chapter 2: Using Nightmare Modules
- •I upload anything that I think might be useful to someone on that site. Just use the menus and search until you find it.
- •Chapter 3: File Management
- •In order to be a successful hacker you need to have a lot of good management.
- •Chapter 4: Pointer Tables
- •Chapter 5: Battle Animation Editor
- •Chapter 6: Character Editor
- •Chapter 7: Class Editor
- •Chapter 8: Item Editor
- •Item icon – obvious
- •Chapter 9: Spell Association Editor
- •Chapter 13: Movement Cost Editor
- •If the value next to a type of terrain is ‘255’ then it is uncrossable because a unit won’t have 255 movement points.
- •Chapter 16: Battle Palette Reference Editor
- •If you want to know how to actually edit battle palettes’ colors, you can find that in a later chapter that I will make.
- •Chapter 17: Arena Class Editor
- •It’s a bit of work, but making cGs is quite rewarding, and it’s easier than some stuff, that’s for sure! Good luck with your cg making!
- •Chapter 20: Lyn’s Ending Editor
- •Chapter 21: Tutorial Editing/Getting Rid of the Tutorial
- •Part 2: Downloading the Programs
- •Part 3: Preparing Your midi
- •If you still have more than 10 tracks, you should find another midi. Sorry but, there are limits in life.
- •Part 4: Applying Blazer’s Beta Music Insertion/Instrument Patch
- •Part 5: Converting Your midi
- •Part 6: Making Your midi Repeat and Transferring it to Your rom
- •If the b1 and bc are next to each other then I can almost guarantee you want to replace it, so hit “replace” and do that with every instance and once you’re finished you’re good to go.
- •Part 7: Track Pointers & Repointing
- •Part 8: Finale- Assembling Your Song & Profit
- •If you don’t have this module, you’ll have to use this outdated way of doing it. Do check to see if you have the latest Nightmare Modules in general, but otherwise… well, sorry I guess. Xp
- •Part 9: Possible Errors & Wrap-up
- •Part 10: Documentation and Stuff
- •Atrius’ Notes:
- •Charon’s Notes:
- •Part 11: The Music Hacking Run-Down (Shorter Version of Tutorial & Walls of Text)
- •Part 12: Credits & Thanks
- •Chapter 25: Music Editing with Zahlman’s Song Editor
- •If you actually do type in help and press ‘enter’ on your keyboard, it’ll give you a list of commands, and tell you some stuff. Here’s the important stuff:
- •It worked! Great! I know how to import a song!
- •Chapter 26: Exporting Music with gba2midi
- •Chapter 27: Battle Background Graphics
- •If it doesn’t, I suggest double-checking all your settings (everything should be compressed) and make sure your width is set to 30 and your height is set to 32.
- •Chapter 28: Music Array Module
- •Chapter 29: Sound Room Editing
- •Chapter 30: Chapter Unit Editing with Nightmare
- •Chapter 31: Death Quotes
- •Chapter 32: Event iDs
- •Chapter 33: Battle Conversations
- •Chapter 34: Triangle Attacks
- •Chapter 35-36: The Animation Modules & Repointing Tutorial
- •It should look like this:
- •Chapter 37: Support Editing
- •Chapter 38: Miscellaneous Nightmare Modules
- •In this chapter I’m going to quickly run through what some other nightmare modules do.
- •Vendor/Armory Editors – edits the contents of vendors and armories.
- •Vulnerary Editor – edits the amount of hp restored by a vulnerary. (Default: 10)
- •Vulnerary Editor – edits the amount of hp restored by a vulnerary.
- •Chapter 40: Text Editing with fEditor Adv
- •Chapter 41: Portrait Formatting & Preparation
- •Chapter 42: Portrait Insertion with fEditor Adv
- •I wouldn’t mess with the palette editor (the colorful boxes).
- •Chapter 43: Locating Palettes
- •Chapter 44: Editing Palettes
- •I don’t exactly have a color I want to use for this title screen background, so I’m just going to show you how to get the rgb of some random color on a portrait.
- •If something didn’t work right, make sure you:
- •Chapter 45: Working with gbage
- •Chapter 46: Chapter Data Editor
- •Vision Distance is for Fog of War (fow). If it’s ‘0’, it’s assumed there is no fog of war.
- •Hold it! (Unless you aren’t hacking fe7!)
- •Chapter 47: Map Creation
- •I’m tired of writing this tutorial. Honestly. So from now on, I’m going to stop making so many wasteful comments like the one I am typing right now.
- •Chapter 48: Map Insertion
- •If you’re looking to make a totally new chapter (instead of being limited to the old game’s exact same scenes with exact same events) then read on, because I’m going to hack events next!
- •Chapter 49: Event Assembler Basics
- •I would just always add end guards since it’s not something you need to worry about too much.
- •Chapter 50: Events – The Layout
- •Including the stlb
- •Chapter 51: Events – The Event Codes
- •Items is just a list of items with a max of 4 starting items. I prefer to use the 3rd method of writing them, with the brackets and all. Each item is separated by a comma.
- •Chapter 52: Event Construction
- •VillageGate: // name of tile data group
- •Chapter 54: Chapter Creation Finishing Touches
- •Chapter 55: Importing Tilesets
- •Part 2: The First Frame
- •Part 1b: Palette Preparing
- •Part 2: Testing the Foundation to Your Animation
- •If all goes well, your guy should be standing, kinda like this.
- •Part 3: Making the Rest of Your Frames
- •Chapter 58: Custom Battle Animations – Scripts
- •I just pulled a Xeld. Had to do that at least once in this tutorial.
- •If you don’t know what a sound sounds like, just test it out with your animation and find out. Experiment with the codes if you need to.
- •Chapter 59: Custom Spell Animations
- •0X85 command count for this spell: 10
- •It’s true! It did work! It’s still very much a work in progress, as you can see, but the point is we got he test frame working. The rest just takes time, patience, and the attitude that you can do it!
- •Chapter 60: Weapon Icons
- •If you did, you are successful. Despite the odd format of the icons, you have spotted them, and that is what is most important, in my honest opinion.
- •I have this show up:
- •Chapter 61: Map Sprites
- •Chapter 62: Proper Betatesting
- •Chapter 63: vba’s Tools
- •Chapter 64: Other vba Options
- •In this chapter I’m going to detail some of vba’s semi-obscure but not totally obscure options. Knowing how to use vba will help you test your game in various ways.
- •Chapter 65: Recording Videos & Sound
- •Chapter 66: Fixing the Desync with VirtualDubMod & Video Rendering
- •Chapter 67: ips Patching & General Patching Information
- •Chapter 68: ups Patching
- •I suggest you read the ips patching tutorial (at least the beginning) if you haven’t done so as I will not be as thorough with this chapter as I was the previous.
- •In an extremely similar manner you can apply patches. Take a look.
- •Chapter 69: jfp Patching
- •Chapter 70: xDelta Patching
- •Chapter 71: Nightmare Module Format
- •It is recommended (for reasons of readability by humans) that a newline
- •Is unused ("null") for editboxes.
- •Chapter 72: Miscellaneous Information Archive
- •Chapter 73: Useful Links & Websites
- •Chapter 74: Bonus – Assembly Hacking
- •Preparations:
- •Part 1: Background Info
- •Part 2: Inserting an Assembly Hack
- •Part 2: Breaking Down Your First asm Hack
- •I digressed a lot, but back to the point:
- •Part 3: Second Example – More Codes, More Fun
- •Read other people’s doc.
- •Part 4: More Examples – “Speed-Analyzing”
- •It’s thumb. Write to offset 0. Start with label “Initial”. Push 5 registers and the last register, then start a loop counter in r2 with starting value 0x00.
- •Ifat *Conditional id* *asm routine pointer*
- •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.
- •It’s not super long, but it’s got some new things we need to learn. Let’s get started.
- •Part 5: Finding asm Routines & Basics of Using a Debugger
- •Warning: terms may not be accurate. In fact, they almost definitely aren’t accurate, as you’ve probably figured out by now.
- •I don’t know what the flags do either, but they’re there, right next to the window. That’s g.
- •I hope to hear of your achievements in the near future!
- •Final Chapter: Credits, Thanks, and the Epilogue
Part 2: Breaking Down Your First asm Hack
Before breaking them down, make sure you can insert ASM hacks with little trouble. There are some ASM hacks on the Fire Emblem Shrine Forums and Serenes Forest Forums: look for them and try them out. Some might just ask you to edit hex directly, while others might ask you to use a patcher of some sort or copy some data. Whatever it is, be familiar with it: the more you know going into these things, the easier it’ll be, because you’ll have less new things to learn, if that makes sense.
So, ASM hacks are written in a .asm file, which is really just a text file with the extension .asm. Thus you can just right-click the Hector Hard Mode Hack.asm text file and edit it in Notepad++ and you’ll be off.
Oh gosh, what does THIS mean?
Don’t worry, I’ll teach you. But again, I’m not going to go over things constantly and repeat myself a ton, meaning once I teach what the .thumb code does, you’ll be expected to know it henceforth. If you need to look back on things I taught, by all means, look back—it’s not expected that you learn this all in one reading, on your first time.
To start, every code starts on a new line. There are two main types of codes here: a code that the assembler uses in terms of like, writing the program, which are codes that start with periods, and actual assembler codes, which will be inserted into the ROM—they’re usually indented and don’t start with dots. You don’t have to indent, but it’s nice for organization purposes to indent once or twice when you write an opcode and also to keep all the parameters on the same level as well. It makes scanning through code and the such easier. Good programming habits can go a long way.
Now, let’s begin:
.thumb sets it so that the instruction set use is THUMB. You’ll want this at the beginning of your files pretty much all the time, unless you’re using ARM, which I am NOT teaching here, because I am only teaching you what little I know about ASM hacking.
.org sets the offset. It’s just like the event assembler code, ORG—in fact, Nintenlord, the maker of the Event Assembler, knows ASM, and borrowed a lot of the ideas in his event assembler from knowing assembly and programming in general, I’m pretty sure. I’d go into making comparisons and such, but it’s not really relevant. For this example, we want the program to write to the offset 0x00, so we tell it that. 0x00 is the same as 0x0000000000, FYI. Also, this code is totally important, just like the .thumb code.
There is a blank line at the end. Well, several, in this case, but in general, you just need one. The assembler will complain if you don’t have one. Give it one. Don’t let it complain.
Okay, we’re done for now. Yeah, I totally just avoided the actual assembly there. Teehee. That’s next:
ldr: ldr is a very important code. It loads a word to a register. Oh man, what’s a register?! Looks like I need to take a break already so I can introduce registers:
Registers are like little slots where you can store values. They’re like boxes, each one with their own value, up to a word long. You can store information in them and load information from them, but they’re just temporary—they don’t really do anything. However, they’re also variables.
What are variables? Study up on’em, bud, the general idea is important—how it applies here is that when I say “r1”, I’m really talking about whatever is in r1. We don’t know exactly what it is because it depends, so we just reference it as a variable here. Instead of saying “move the specific value ____ in box r1”, we just say “move box r1”. It’s actually a lot simpler in practice than I’m explaining here, so let’s just continue on.
ldr: ldr is a very important code. It loads a word to a register. What the word is depends on what comes after the comma. In this hack we have the code:
ldr r1, =0x0202BC13
ldr tells us it’s loading a word, or 4 bytes, into a register—the register r1 (technically the 2nd register because there is an “r0” as well). The value we are loading is designated by what is after the “=”, 0x0202BC13. In the ldr code, the equal sign is needed so that it knows it’s loading that value. I don’t know the specifics, but just use it. XP
Okay, so before I continue introducing codes, I need to tell you something else. It’s a very good idea to keep track of what register holds what. On that note, you may want to keep a separate text file with notes (including what the heck that word “0x0202BC13” is might be helpful too :P) but you may also want to add comments.
To add comments, just add the @ sign, followed by a space (I’m actually not sure if the space after the “@” sign is necessary, but I do it anyway because I was never taught formally so I just copied what I saw, haha), followed by the comment. You can do this on a new line or append it to a line of code. So we could type in
ldr r1, =0x0202BC13 @ Loads the word 0x0202BC13 to r1
and it would have the same effect as before. The @ sign and everything after it are ultimately ignored.
Furthermore, you may want to keep track in general when you edit values in registers (which is pretty much all the time) so that you know what register holds what. Often times you have some intended operation you’re trying to do and when finding bugs/glitches, it’s good to know what EXACTLY are the numbers going through the system. Sometimes though, you’ll load a variable into the system, in which case you just have to put in some example value and run through the program in your head and test things to see how it turns out in various situations (you must always test multiple situations once we get onto conditional branching, which says “if this, do this, or else, do that”, a common theme in programming languages.
Oh boy, more rants and information for you to absorb. I told you it wouldn’t be easy. I’m not even giving lots of nice pictures to work with. Text, text, text, and more text.
By the way, it might seem silly to keep track of all of this in your head—that’s why eventually, I’ll teach you about using debuggers, which will let you run through the code systematically, using a program, and really help you keep track of what’s happening. It’ll also help with a lot of other things. But step-by-step—you’ve got a while to go before we get to that point.
mov r0, #0x03
The “mov” opcode does what you might think—it “moves” values around. In this case, we are “moving” the value 0x03 into register 0, r0. As for where we’re moving it FROM… don’t think too much about that, alright? Think of it as just saying “r0 = 0x03” in this case. We can also do something like mov r0, r1, which would say r0 = r1… which is slightly confusing, because you might wonder “so does r1 become r0 or does r0 become r1?” and the answer is “r1 becomes r0” because if mov r0, #0x03 makes r0 = 0x03, then mov r0, r1 makes r0 = whatever value is in r1.
By the way, the “#” sign next to 0x03 is key. It has to know it’s a numeric value. Don’t forget the # sign.
strb r0, [r1]
We’re making progress! This code sort of does the opposite of ldr—it stores values instead of loading them. However, this code actually stores a byte, not a word. How do we know? Because the opcode is “strb”, which stands for “store byte”, where the “b” is for “byte”. If there wasn’t a “b”, it would store a word. If there was an “h”, i.e. “strh”, it’d store a half-word, or 2 bytes. Of course, the load function has similar variations, though it also has two more variations. Let’s take a look at thumbref:
LDR (okay, they capitalize it, I don’t, big deal) loads a word into a register. We know this. Thumbref tells us this too—the first column is the name or “mnemonic” of the opcode. The second is a very short description of what it does. The third is a list of possible formats you can use the code in—essentially, you have a little bit of freedom as to how you use the code, i.e. what parameters you use. The fourth column specifies what the variables are and the such—right now, they don’t make too much sense, even to me, but thumbref DOES give definitions of the symbols.
Let’s break down Rd = [Rn + Rm], which is under every row in the fourth column of that image I showed.
Rd = destination register, according to this. In other words, it’s the register that is being effected.
Rn = a register. “n” here is generic. We can put whatever we want. It’s just saying that it’s some register we choose.
Rm = another register, this time just called “Rm”.
+ means plus/add, meaning we’re adding the register Rn and Rm together. I’m sure you guys can handle some addition.
[ ] are brackets that… it’s hard to explain, but it’s like instead of loading the value Rn + Rm, it loads the value at the ADDRESS Rn + Rm. Essentially, it treats whatever is in the bracket as an offset, instead of just some arbitrary value.
Anyhow, they’re important, and they’re there because the opcode format expects it. Similarly, be sure that you don’t forget it—thumbref is useful like this because you can always check the code format to make sure you’re using it right, or using the variant that you want to use. (The assembler will likely give an error if you use a code in a completely wrong format, since it won’t know what to do with it.)
Some of the other symbols we’ll get to later, and some of the others I still don’t really understand myself, so yeah…
…
