You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
asar cli should 1) have the ability to use separate filenames for input and output rom, and 2) have the ability to ignore any existing rom file and force a clean rebuild.
idk how i'd want to design this though.
could do ./asar patch.asm input.sfc output.sfc and add an option like --ignore-existing-rom which does the clean rebuild. but then there's asymmetry in that in the 3-argument form, arg 2 is used only for input, but with --ignore-existing-rom, it'd be only output.
the same, but make the 3-arg form ./asar patch.asm output.sfc input.sfc. but output being before input feels a bit odd.
could do ./asar patch.asm input.sfc output.sfc and allow specifying something like - or /dev/null as the input file to do a clean rebuild. but then we'd need to invent a name for it. (i'd rather use a custom name than tell people to use NUL on windows or /dev/null on linux. mostly because i don't want to acknowledge the existence of NUL.)
on second thought, output being before input also happens with other compilers (at least whenever i write makefiles by hand i seem to default to that), so maybe it's not that weird. i'm leaning towards 2 now.
Instead of --ignore-existing-rom i think something more like --erase-source-rom. This way it's clear the source rom will be erased and not used.
Another option:
--build-mode=[patch, compared, homebrew]
(Compare i would imagine as a simple Boolean representing if the output ROM would be changed or not, patch being the default)
This could give us future flexibility perhaps. Maybe they should be separate options though.
For the output rom:
Not heavily opinionate here. I already am sad the input comes after the asm so we can't allow
./asar input.sfc main.asm lib/*.asm
Etc.
But maybe that's not all that practical. But since the above doesn't work anyways either 3 args or a --output-rom flag.
Activity
p4plus2 commentedon Sep 21, 2025
Instead of --ignore-existing-rom i think something more like --erase-source-rom. This way it's clear the source rom will be erased and not used.
Another option:
--build-mode=[patch, compared, homebrew]
(Compare i would imagine as a simple Boolean representing if the output ROM would be changed or not, patch being the default)
This could give us future flexibility perhaps. Maybe they should be separate options though.
For the output rom:
Not heavily opinionate here. I already am sad the input comes after the asm so we can't allow
./asar input.sfc main.asm lib/*.asm
Etc.
But maybe that's not all that practical. But since the above doesn't work anyways either 3 args or a --output-rom flag.
Selicre commentedon Oct 31, 2025
I would use an
-oflag, like./asar patch.asm input.sfc -o output.sfc, such that if you want a clean build you just use./asar patch.asm -o output.sfc