Skip to content

Tool for converting binary files to Labeled EA Code or EA Definitions

Notifications You must be signed in to change notification settings

StanHash/bin2ea

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bin2ea

Tool for converting binary files to EA code, optionally wrapped around a label or a definition.

The purpose of this tool is not to be used with EA #inctext, since you can have the same effect with #incbin but better. Actually, for very large files, I think you can gain a lot of processing time by using an #incbin variant that outputs SHORTs or WORDs (instead of BYTÈs), since that would mean 2/4 times less integer literals to parse for EA (even if they would be longer, but it would still be better performance & memory-wise), and what do you know bin2ea can do that (#inctext bin2ea -word "Your File.bin").

I made this tool a while back to help me build MSG helper definitions directly from asm files (as opposed to manually having to write the short values in the definitions), and now I'm reviving it because I might find another need for it real soon.

Usage

bin2ea <input> [output/--to-stdout] [-byte/-short/-word] [-define <name>/-label <name>] [-before <before>] [-after <after>] [-no-newline]

Building

Requirements:

  • A C++ Compiler that supports C++11 and it's standard library (MinGW-w64 under Windows for example)
  • CMake

Goto the root folder of this repository (the one with CMakeFiles.txt), run something like the following:

mkdir build
cd build
cmake ..
make

(Or use cmake-gui or another tool/IDE that can do CMake for you)

See the CMake manual for more info.

About

Tool for converting binary files to Labeled EA Code or EA Definitions

Resources

Stars

Watchers

Forks

Packages

No packages published