FireEmblemUniverse / ColorzCore

A rewriting of Core.exe for EA.
GNU General Public License v3.0
7 stars 7 forks source link

Suggestion: support outputting label values as a no$gba (debugger) compatible SYM file #29

Closed StanHash closed 5 years ago

StanHash commented 5 years ago

The way I'd see it is you'd pass Core some option (--nocash-sym?) and it's generate a outputFile.sym mapping addresses to label names.

This could perhaps be achieved without special support from Core itself if NL!EA 11.1 -symOutput were to be supported here too (it would require an extra conversion step on the user's part but it would be feasible). However, because EA is already responsible for "automatically" mapping label values (file offsets) to addresses (which would be required for this feature), I feel like keeping this kind of computation within EA is the way to go.

Speaking of mapping file offsets to addresses, implementing something like this does conflict a bit with #6 (which tbh is a bit rubbish as it is), as it would consider every symbol as being a file offset which kind of defeats the purpose of being able to assign any value to a them. (I wish EA mapped labels automatically; It would have solved so many issues; but sadly changing that right now would probably break a lot of things... ).


Let's assume this event file:

ORG $1000

SomeData:
    BYTE 1 2 3 4
SomeOtherData:
    { POIN LocalData; LocalData: BYTE 1 2 3 4 }

Invoking Core like this:

ColorzCore A FE8 -input:Main.event -output:Out.bin --nocash-sym

Would generate Out.bin as expected; and also a Out.sym that looks like that:

08001000 SomeData
08001004 SomeOtherData

Here's doc on the no$ sym file format, for reference.