Event Assembler

#1
 _____                 _   _   _            _____                   _   _         
|   __|_ _ ___ ___ _ _| |_| |_|_|___ ___   |  _  |___ ___ ___ _____| |_| |___ ___ 
|   __| | | -_|  _| | |  _|   | |   | . |  |     |_ -|_ -| -_|     | . | | -_|  _|
|_____|\_/|___|_| |_  |_| |_|_|_|_|_|_  |  |__|__|___|___|___|_|_|_|___|_|___|_|  
                  |___|             |___| 

Latest Version Download: Event Assembler V11.1.3

Thanks to @StanH


Event Assembler originally by Nintenlord!
SF Thread
Future Planned Features

Since I’m editing EA and incorporating new changes, as well as USING the new features, I thought I’d make a thread specifically dedicated to its maintenance and download. This is that thread.
This is the EA maintenance/update thread. It seems odd that I made one on SF and not here, since similarly, EA is just collected in NIntenlord’s tool with my updates as a reply. I also want to keep this thread updated with plenty of sneak-peeks on future features/things being worked on.


Latest Changes

Changelog:
V11.1.3

  • Fixed broken GiveMoney macro in FE8; added _GIVEITEMTOMAIN in Backward Compatibility.

V11.1.2

  • Fixed broken VillageEventMoney in FE8; added GIVEITEMTO2 to Backward Compatibility.

README2.txt:

V 11.1.1
-Changed some EAStdlib definitions in FE7/FE8 to be compatable with ColorzCore. This is a breaking change.
 - 5000G -> _5000G and other similar edits.

V 11.1
- Added `-symOutput:<filename>` Core option, which outputs global labels to `<filename>` following the format `<name>=$<offset(hex)><newline>`
- "Added" symbol Assignment logic (`<symName> = <value>`) ("Added" because most of the logic was already present, I basically just made it parse)
- Tools invoked through directives (`#incext`, `#inctevent` & `#runext`) can now report errors via stderr (before they needed to print "ERROR: <err string>" to stdout)
- `#runext` passes Tool's stdout to EA's
- Added warning when redefining a symbol/label (within the same scope)
- Various Fixes:
 - Fixed `#inctext`/`#inctevent` not handling parameters with spaces properly
 - Fixed IsDefined macro not working
 - Fixed curly brackets crashing EA when directly after a label/statement
 - Fixed repeatable codes without parameters crashing EA
 - Fixed various crashes related to the expression/parameter parser

(Also some minor additions to raws & the stdlib (See [th](https://github.com/FireEmblemUniverse/Event-Assembler/commit/dd8f4b54a298a33da59147f84069caa207593c8d)[ese](https://github.com/FireEmblemUniverse/Event-Assembler/commit/f7fb5e68b1becfdefb5c5a4a4350c39c2473d8c3) github commits for details))

This may or may not be the last (feature) release before Colorz's rewrite is complete.

Please do notify us about any bug you may find, either through here or the [Discord](http://feuniverse.us/t/feu-discord-server/1480?u=stanh).

V 11.0
-Changed #inctext to #inctevent. I recommnend the use of this name in the future because it's more intuitive.
-Fixed bug where Core would hang if it got an invalid input file.
-Added PROTECT (start) (end) to make a region write-protected.
-Made Event assembler.exe look for .event files by default (over .txt)
-Changed lexing/parsing. 
 -String literals now work (with MESSAGE and such)
 -Labels/Definitions come into scope for parameters properly.
 -Added ability for use of definitions in preprocessor calls.
-Made disassembly work again; changed auto-adding of _0x codes to not mess up disassembly.
-Changed disassemblies to use ASSERT for stronger protection over just MESSAGE-ing the currentOffset.
-Changed scripts to take/output .event files by default.

V11.0.1
-Aliased #inctevent as #inctext for backwards compatability with V10.1.1

EAstdlib.event:

V3.3
-FE6,FE7: Added old definitions (spears, etc) through BACKWARDS_COMPATIBILITY.

Previous Version Downloads And Short Description

Event Assembler V11.1.1

Event Assembler V11.1

Event Assembler V11.0.1

  • Aliased inctevent as inctext.

Event Assembler V11.0

  • Added inctevent requested by @circleseverywhere and his tools.
  • Added ASSERT num (issues error if its parameter evaluates to a negative) and PROTECT start end (once passed the specified range will become read only).
  • Fixed disassembly (for good).
  • Definitions/Labels now work correctly as parameters.

Event Assembler V10.1

  • incext bugfix
  • runext, \-escaping in parsing
  • MNTS in FE8, fixed Fe8Code assembling.
  • Tools definitions improvements.

Event Assembler V10.0

  • PUSH/POP allows you to repoint something without having to reallocate to free space.
  • Tools folder/#incext

Event Assembler V9.12

  • Added backwards support for CODE, and by extension, #incbin.
  • Added the Extensions folder, packing the first extensions of Hack Installation.txt and AI Assembly.txt.
  • Changed several old event codes’ names to be more sensible. For old definitions, #include BACKWARDS_COMPATIBILITY.

Event Assembler V9.11

  • Added lots of FE8 support.
  • Added new form for AI ([AI1, AI2] AI3 AI4). For old form/definitions, #define OLD_AI before you include EAstdlib.event. To see what AI is available, read this thread and EA Standard library/AI Helpers.txt

Event Assembler V9.10

  • Nintenlord’s last release.
10 Likes
[FE8] Gaiden-style Magic Menu
FE_Builder_GBA
FEBuilder Patching Event Assembler keeps giving me error
[GUIDE/DOC] ASM Hacking in C (with EA)
FE_Builder_GBA
FE5 Portrait Insertion Tutorial
I Need Help Creating a GBA ROM Hack!
[GUIDE/DOC] ASM Hacking in C (with EA)
#2

For now, I’m able to run Linux and Mac versions of EA while mono is installed. I may consider creating a statically linked version in the future, but with the next EA released, at least the option will be there if you have mono installed.

3 Likes
#3

The link for 9.12 doesn’t seem to work. Watch it just be my PC being a shit

9.11’s link does work tho so…

The 9.12 link works on Serenes, so I’m just confused.

#4

This is a small quality of life thing: is it possible to edit something to make EA default to FE_ definitions instead of always FE7, or can you make EA remember which definitions were last used?

#5

You can use Scripts/Assemble Fe6/7/8 ROM to assemble the appropriate rom (it assumes your buildfile is called ROM Buildfile.txt but you can edit it in any text editor) then just drag your rom onto it.

#6

I made an error in editing. Dropped the h at the start of the url.

#7

Version 10.0 Released!

#9

incext is buggy; please stand by as Circles and I debug it.

#10

Reloeased 10.1, notably, fixing incext.

#11

10.1.1 released - only raws/macros/tools have been changed, not the EA core

#12

I tried updating the hack installation file to add a macro for B and have more versions of the callHack macro.
I made it so that the callHack macros should be able to work in FE7/FE6 now as well.

Updated Hack Installation.txt ``` #ifndef HACK_INSTALLATION #define HACK_INSTALLATION

#define B(pointer) “SHORT ((((pointer - CURRENTOFFSET - 4) >> 1)&0x7ff)|0xE000)”
#define BLRange(pointer) “(pointer - CURRENTOFFSET - 4)>>1”
#define BL(pointer) “SHORT (((BLRange(pointer)>>11)&0x7ff)|0xf000) ((BLRange(pointer)&0x7ff)|0xf800);”

//#define AlignWithNop “MESSAGE attempting alignwithnop; Switch((currentOffset>>1)&0x1+1, “BYTE 0x00 0x00”)”

//These all must be 4-aligned
//New names
//Takes 0x14 bytes
#define replaceWithHack(offset) “BYTE 0x10 0xB5 0x03 0x4C 0x00 0xF0 0x03 0xF8 0x10 0xBC 0x02 0xBC 0x08 0x47 0x20 0x47; POIN (offset|0x1)”

//Takes 0xC bytes
#ifdef FE8
#define callHack_r0(offset) “SHORT 0x4801; BL(0xD18C0); SHORT 0xE001; POIN (offset|0x1)”
#define callHack_r1(offset) “SHORT 0x4901; BL(0xD18C4); SHORT 0xE001; POIN (offset|0x1)”
#define callHack_r2(offset) “SHORT 0x4A01; BL(0xD18C8); SHORT 0xE001; POIN (offset|0x1)”
#define callHack_r3(offset) “SHORT 0x4B01; BL(0xD18CC); SHORT 0xE001; POIN (offset|0x1)”
#define callHack_r4(offset) “SHORT 0x4C01; BL(0xD18D0); SHORT 0xE001; POIN (offset|0x1)”
#define callHack_r5(offset) “SHORT 0x4D01; BL(0xD18D4); SHORT 0xE001; POIN (offset|0x1)”
#define callHack_r6(offset) “SHORT 0x4E01; BL(0xD18D8); SHORT 0xE001; POIN (offset|0x1)”
#define callHack_r7(offset) “SHORT 0x4F01; BL(0xD18DC); SHORT 0xE001; POIN (offset|0x1)”
#endif

#ifdef FE7
#define callHack_r0(offset) “SHORT 0x4801; BL(0xBFC4C); SHORT 0xE001; POIN (offset|0x1)”
#define callHack_r1(offset) “SHORT 0x4901; BL(0xBFC50); SHORT 0xE001; POIN (offset|0x1)”
#define callHack_r2(offset) “SHORT 0x4A01; BL(0xBFC54); SHORT 0xE001; POIN (offset|0x1)”
#define callHack_r3(offset) “SHORT 0x4B01; BL(0xBFC58); SHORT 0xE001; POIN (offset|0x1)”
#define callHack_r4(offset) “SHORT 0x4C01; BL(0xBFC5C); SHORT 0xE001; POIN (offset|0x1)”
#define callHack_r5(offset) “SHORT 0x4D01; BL(0xBFC60); SHORT 0xE001; POIN (offset|0x1)”
#define callHack_r6(offset) “SHORT 0x4E01; BL(0xBFC64); SHORT 0xE001; POIN (offset|0x1)”
#define callHack_r7(offset) “SHORT 0x4F01; BL(0xBFC68); SHORT 0xE001; POIN (offset|0x1)”
#endif

#ifdef FE6
#define callHack_r0(offset) “SHORT 0x4801; BL(0x9DF10); SHORT 0xE001; POIN (offset|0x1)”
#define callHack_r1(offset) “SHORT 0x4901; BL(0x9DF14); SHORT 0xE001; POIN (offset|0x1)”
#define callHack_r2(offset) “SHORT 0x4A01; BL(0x9DF18); SHORT 0xE001; POIN (offset|0x1)”
#define callHack_r3(offset) “SHORT 0x4B01; BL(0x9DF1C); SHORT 0xE001; POIN (offset|0x1)”
#define callHack_r4(offset) “SHORT 0x4C01; BL(0x9DF20); SHORT 0xE001; POIN (offset|0x1)”
#define callHack_r5(offset) “SHORT 0x4D01; BL(0x9DF24); SHORT 0xE001; POIN (offset|0x1)”
#define callHack_r6(offset) “SHORT 0x4E01; BL(0x9DF28); SHORT 0xE001; POIN (offset|0x1)”
#define callHack_r7(offset) “SHORT 0x4F01; BL(0x9DF2C); SHORT 0xE001; POIN (offset|0x1)”
#endif

//Takes 0x8 bytes
#define jumpToHack(offset) “BYTE 0x00 0x4B 0x18 0x47; POIN (offset|0x1)”

//Old names
#define gotoHack(offset) “replaceWithHack(offset)”
#define gotoHackWithR3(offset) “callHack_r3(offset)”

#define setTableByte(tableOffset, entrySize, entryNumber, entryOffset, byte) “ORG (tableOffset+entrySizeentryNumber+entryOffset); BYTE byte"
#define setTableShort(tableOffset, entrySize, entryNumber, entryOffset, short) "ORG (tableOffset+entrySize
entryNumber+entryOffset); SHORT short”
#define setTableWord(tableOffset, entrySize, entryNumber, entryOffset, word) “ORG (tableOffset+entrySizeentryNumber+entryOffset); WORD word"
#define setTablePointer(tableOffset, entrySize, entryNumber, entryOffset, poin) "ORG (tableOffset+entrySize
entryNumber+entryOffset); POIN poin”

#define setPointerTableEntry(tableOffset, entryNumber, poin) “setTablePointer(tableOffset, 0x4, entryNumber, 0x0, poin)”

#endif

</details>
2 Likes
#13

:tada: EA v11 hype :tada:

ORG to labels is best feature

2 Likes
#14

Up next is a doc of the language and its built in codes (e.g. ORG/MESSAGE/PUSH etc), I guess, lol.

1 Like
#15

I’m getting a 404 error while trying to download v11. Anyone else?

#16

It got taken down because of critical issues
(and colorz forgot to / didn’t have time to properly update the topic)

1 Like
#17

And we’re back. I tested it by fully building FE Destiny this time so it shooould be good. lmk if any installers are broken, the way it parses quotes (") is a biiiit hacked together and I may have missed some corner behavior, if you are using it.

#18

Quick fix (V11.0.1) aliasing inctevent as inctext for reverse compatibility with V10.1.1

#19

Stuff is happening.
@StanH is doing stuff to continue modernizing EA as we have here, and I’m working on rewriting Core to iron out some corner-case behaviors in EA to allow for greater extensibility.

1 Like
#20

Event Assembler 11.1

Changelog:

  • Added -symOutput:<filename> Core option, which outputs global labels to <filename> following the format <name>=$<offset(hex)><newline>
  • “Added” symbol Assignment logic (<symName> = <value>) (“Added” because most of the logic was already present, I basically just made it parse)
  • Tools invoked through directives (#incext, #inctevent & #runext) can now report errors via stderr (before they needed to print "ERROR: " to stdout)
  • #runext passes Tool’s stdout to EA’s
  • Added warning when redefining a symbol/label (within the same scope)
  • Various Fixes:
  • Fixed #inctext/#inctevent not handling parameters with spaces properly
  • Fixed IsDefined macro not working
  • Fixed curly brackets crashing EA when directly after a label/statement
  • Fixed repeatable codes without parameters crashing EA
  • Fixed various crashes related to the expression/parameter parser

(Also some minor additions to raws & the stdlib (See these github commits for details))

This may or may not be the last (feature) release before Colorz’s rewrite is complete.

Please do notify us about any bug you may find, either through here or the Discord.

:wave:

3 Likes
#21

Why isn’t this post pinned for new hackers to download/hackers to update their versions?

1 Like