Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've added a few new directives which should help when making hacks or patches:
Can now parse a header from an existing .nes file with
INCINES
, or import the .nes file (header and all) withINCNES
Can seek to any arbitrary location (e.g. within an already-included binary file) to edit with
SEEKABS x
,SEEKREL x
, andSKIPREL x
(the lattermost also updatesaddr
aka$
) This allows jumping to locations without filling the bytes in-between.The use case for these is that one might have an already-compiled .nes file that one wants to create a patch for, i.e. edit a particular part of the file (then use another program to generate a binary diff to create the patch like a .ips file. Perhaps in a future PR, .ips exporting can be done by asm6f directly?).
Since this is a new feature different from previous ones, I've updated the version number.
Bugfixes
Fixed some .nl addresses when $ is unset.
Fixed a couple bugs related to the ines/nes2 header. This was the biggest, located in the
output
function:Before:
After
the << 7 after nes2tv_num seems to be erroneous, so I removed that. On consulting the specifications, it seems that
nes2vs_num
should be there instead. (Previously,nes2vs_num
was not output anywhere.)Misc
output
function, breaking it down into a couple different functions (output
,output_file
(which generates the output file if needed on a new pass), andflush_output
(writes the current output buffer to the file))replace_ext
andfind_ext
.