FMA (famicom macro assembler) is a new multi platform cross assembler, mainly used for SNES development.
FMA speeds up development by adding lots of macro features, utilities and improved readability to your project. It allows you to write games in a ruby like syntax, but still keep full control over your application.
Note: For the old JavaScript version see release v1.0
-
Ruby like syntax for assembler projects
-
Manage code in modules, macros and classes
-
Auto generated locations for variables
-
Memory ranges can be reused for other variables
-
Automatically keeps track about size of A, X and Y registers
-
Pass numbers, strings or even registers to macros
-
Other assemblers can be implemented, even if they have totally different opcodes
-
Basic type hinting used to reference class instances
Simple example of macro usage:
module SNES
macro set_screen_brightness(brightness, enabled=true)
LDA #brightness | (enabled ? 0 : $80) unless brightness.A?
STA $2100
end
end
def main
SNES.set_screen_brightness enabled: false
do_initialize_stuff
LDA #0
loop:
SNES.set_screen_brightness A
do_something
INC A
CMP #16
BNE loop
do_something_else
end
Compile this project using the standard cmake routine:
mkdir build
cd build
cmake ..
make
This should find and build the dependencies and create a fma
directory
-
CSV reading
-
PNG reading
-
File reading
-
JSON reading
-
Memory management
-
65816 language support
-
SPC language support
FMA is licensed with the MIT license. Author: Benjamin Schulte
-
SFC Developer Wiki for the tutorials and references
-
Aria Fallah for the CSV parser