<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tools.nes/scripts/test-e2e.sh, branch main</title>
<subtitle>Tools for NES/Famicom development.
</subtitle>
<id>https://git.mssola.com/nes/tools.nes/atom?h=main</id>
<link rel='self' href='https://git.mssola.com/nes/tools.nes/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/'/>
<updated>2026-08-18T14:39:37Z</updated>
<entry>
<title>Add global labels</title>
<updated>2026-08-18T14:39:37Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-08-18T14:39:37Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=fcd4c9a267b407e653ed6b21ae87f219f3e4c4af'/>
<id>urn:sha1:fcd4c9a267b407e653ed6b21ae87f219f3e4c4af</id>
<content type='text'>
These are labels that are declared by prefixing a '#' symbol to the
name, and it allows the label to be declared at the global scope instead
of the current one.

This is a feature which is not to be abused so to not make scopes
pointless, but it can be quite handy with some optimizations while not
abandoning scopes completely.

Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>Add the runrom crate and the vnf library</title>
<updated>2026-08-17T21:06:23Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-08-17T14:03:21Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=df1041d40431251e22e03ec5c4df7fc5767e1543'/>
<id>urn:sha1:df1041d40431251e22e03ec5c4df7fc5767e1543</id>
<content type='text'>
The vnf library supports the runrom crate and they both combined enable
users to "run" a ROM file. This is basically an emulator, but with two
key differences:

1. It is to be run programatically. That is, you are not expected to
   play games with this, but to run code by steps, start at a given
   address, run a function, etc.
2. It is headless: there are no graphics displayed on screen, nor sound
   being delivered.

Thus, the target for both these things are developers, not players. This
way developers can validate code paths without needing a full blown
emulator. You can write tests with this and be able to run some checks
as part of your testing infrastructure.

Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>scripts: ensure bash is running them</title>
<updated>2026-07-23T10:07:51Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-07-23T10:07:51Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=27cea17cf7f4f9b706d0f3da4dc558b8e7b5d764'/>
<id>urn:sha1:27cea17cf7f4f9b706d0f3da4dc558b8e7b5d764</id>
<content type='text'>
Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>readrom: implement the -d/--disassemble option</title>
<updated>2026-07-15T20:11:50Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-07-15T20:11:50Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=9d790bb4acddae689c5dda667f9d160041bdd4b8'/>
<id>urn:sha1:9d790bb4acddae689c5dda667f9d160041bdd4b8</id>
<content type='text'>
This option can also be coupled with -n/--nasm-directory, and you can
then get a human-readable disassembling of any proc or label you might
be thinking on.

Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>Add support for the asan:fixed-segments comment</title>
<updated>2026-07-09T20:14:22Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-07-09T20:07:47Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=6f58e4ab8d90166cac4e4da269a77c5134f12f1e'/>
<id>urn:sha1:6f58e4ab8d90166cac4e4da269a77c5134f12f1e</id>
<content type='text'>
This magic comment allows for the definition of segments that are fixed
and for which references are always safe. This goes in tandem with the
asan:safe comment, which can then be used more sporadically.

Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>Add a warning for unknown cross-mapping references</title>
<updated>2026-07-08T19:27:49Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-07-08T19:13:00Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=0664f0bad653ca750d320e513f685ab0c852f359'/>
<id>urn:sha1:0664f0bad653ca750d320e513f685ab0c852f359</id>
<content type='text'>
Some segments, like the 'vectors' one, will reference code that is
outside of its mapping. But in some other configurations, segments
cannot make these cross-mapping references so happily. Imagine:

    .segment "SWAPPABLE"

    .proc foo
        rts
    .endproc

    .segment "FIXED"

    jsr foo

Here the assembler will properly detect the address of 'foo' in the
context of the 'SWAPPABLE' segment. But what this assembler doesn't know
is that this segment is swappable (e.g. UNROM chip). Hence, if the bank
being mapped right now is not the one containing the 'SWAPPABLE'
segment, then the address computed for 'foo' and used in that 'jsr'
instruction will point to something else entirely. This would be similar
to a use-after-free bug.

This is something that can only be inspected at runtime, and so the
assembler cannot be of much help here. Hence, this commit adds a warning
so the programmer can understand the potentially dangerous operation.

All of that being said, this commit also adds support for "asan:safe" or
"check:safe", which is a magic comment that the programmer can write to
re-assure the assembler that this operation is fine (e.g. there is a
guarantee that the mapped bank is that one we are expecting). Hence, the
code above could now be written like so:

    jsr foo      ; check:safe

Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>Let arguments be able to reference their macro</title>
<updated>2026-07-07T21:51:17Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-07-07T21:51:17Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=5fca76b56034554d965b77d1485f92685d79bc84'/>
<id>urn:sha1:5fca76b56034554d965b77d1485f92685d79bc84</id>
<content type='text'>
The enum type for macro arguments has been adjusted so it accepts a
String. This is then used to store the name of the macro for this
argument.

This is a bit of a circlejerk, but in the end it stems from the fact
that macro arguments were sort of a hack defined ad-hoc each time they
were needed. That being said, if we want to report macro arguments being
unused, we need to reference the actual macro definition, not the macro
call.

Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>Preserve the 'accessed' member on macro arguments</title>
<updated>2026-07-07T21:15:00Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-07-07T21:15:00Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=6b43fd7c0773bd97c4bd80145a17d67062afd4ea'/>
<id>urn:sha1:6b43fd7c0773bd97c4bd80145a17d67062afd4ea</id>
<content type='text'>
Macro arguments get tampered with every time a new call has to be
bundled. Deep down this is done by cloning the underlying object, but
this resets any increase on the 'accessed' member, giving always the
impression that macro arguments are never accessed. Fix this by at least
preserving this member when cloning a macro argument.

Note that this is neither the most elegant solution, and probably not
the most correct. As in, it will probably get into a non-precise count
after some calls. But at least it will be a non-zero value, which is
more than enough to what this is actually used for.

Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>Refer to the original file for unused objects</title>
<updated>2026-06-05T21:32:39Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-06-05T21:32:39Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=85a68dbdcd0200a711bacda9c7170129350813c8'/>
<id>urn:sha1:85a68dbdcd0200a711bacda9c7170129350813c8</id>
<content type='text'>
When warning users on unused objects (e.g. variables, proc's), we have
to pick up the source of origin for this warning. In places where the
original PNode is not available, then we go with the last source we have
at hand, as that's the usual way to go (i.e. the error occurred at the
current source/context).

That being said, for unused objects that's not desirable, because we
might otherwise claim the error to happen on the file we first
targetted, but it's way more useful to understand where the object was
defined.

Hence, when defining a variable, address or proc, let's actually store
the PNode associated with it as well. This way the checker can hopefully
get the source from this PNode and be more clear to the user.

Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>tests: check on the existence of jetpac.nes</title>
<updated>2026-04-30T20:47:54Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-04-30T20:47:54Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=db18a7445780956223d5509402023a25cf0b2121'/>
<id>urn:sha1:db18a7445780956223d5509402023a25cf0b2121</id>
<content type='text'>
Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
</feed>
