ROM Buildfile.txt
and paste:Hello World.txt
. Go back to your ROM Buildfile.txt
and add this to the bottom:ROM Buildfile.txt
, take your clean ROM and make a copy of it. We'll edit this copy so that we always have a clean ROM available in case something goes wrong.ROM Buildfile.txt
. Set the ROM as the copy you made earlier. Make sure Game matches the one you're working on. When that's done, click Assemble!"No errors or warnings. Please continue being awesome."
1000000
as the offset, ensuring that the hex
option is selected.Hello World!
Congratulations, you inserted some data!#include "some/file.txt"
do? Basically, it inserts the entire contents of some/file.txt
in place.#include "Hello World.txt"
becomes String(Hello World!)
The file you #include can #include other files!
ROM Buildfile
again. What does ORG 0x1000000
mean? ORG stands for Origin meaning the starting offset of our data. In the previous example, we saw that our data was inserted to the offset 0x1000000.If we don't put an ORG at all, Event Assembler just starts at offset 0, or the very beginning of the ROM. This breaks the ROM horribly!
#include "Hello World.txt"
twice?Hello World!
twice at the end of the data. The "cursor" doesn't stay where you put the ORG, it moves forward as you insert data. After the first Hello World is inserted, the cursor is now at the end of that data, ready to add the second Hello World.Hellow Orld.txt
. Now #include
this in your buildfile between the two "Hello World.txt"
lines.
We'll want to start fresh for this, so delete the ROM you've beenassembling to and make another copy of the clean ROM.
Hello World!
at 0x1000000, and Hellow Orld!HelloWorld!
at 0x1000050. But what if we wanted the two Hello Worlds together?Hellow Orld.txt
and add PUSH
to the top, and POP
to the bottom. PUSH creates a "bookmark" that remembers your position, and POP jumps back to the last bookmark you created.
You can PUSH multiple times, and each POP will take you to the newest bookmark you placed.
Hello Worlds
together, and Hellow Orld
on its own at 0x1000050.#define
!#define
simply replaces one thing with another.offset
when you write the macro!TestMacro(0x10)
, you're telling EA that offset = 0x10. This expands out into:TestMacro(0x100)
, it would instead become:TestMacro(offset)
looks very similar to something we've seen before. Yep, String(text)
is also a macro!#define
. There is one more way to create a shortcut: Labels.
A Label is a shortcut for an offset.
Finished. Messages: Hellow Orld is inserted at 0x100000BNo errors or warnings. Please continue being awesome.
Enter MAKE HACK.cmd!
MAKE HACK.cmd
in Root.
In other words, you can now build an entire hack from scratch in one click.