<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tools.nes/crates/readrom/src, 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-24T12:16:42Z</updated>
<entry>
<title>Annotate the no-return from die()</title>
<updated>2026-08-24T12:16:42Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-08-24T12:16:42Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=ef5cacef65bed736ee0bdff7426684b3c1b5e35f'/>
<id>urn:sha1:ef5cacef65bed736ee0bdff7426684b3c1b5e35f</id>
<content type='text'>
In all crates we are using a die() function to print to stderr and quit
with a exit status &gt; 0. Apparently in Rust you can annotate the return
type with a bang just like the noreturn from the C family.

The added bonus is that some useless statements to make the compiler
happy without it can be removed altogether as now the compiler is able
to understand that it won't return so the returned type is not needed.

Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>readrom: read the ROM file right on start</title>
<updated>2026-07-23T10:45:59Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-07-19T20:50:07Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=f367d25f0d9d7f0e7580a47294f792143fbb6784'/>
<id>urn:sha1:f367d25f0d9d7f0e7580a47294f792143fbb6784</id>
<content type='text'>
This avoids exhausting the input in other scenarios (thus fixing commit
f5549b97bf85 ("readrom: only read the ROM file once")), and it makes
everything more cohesive.

Fixes: f5549b97bf85 ("readrom: only read the ROM file once")

Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>readrom: only read the ROM file once</title>
<updated>2026-07-16T14:52:52Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-07-16T14:52:52Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=f5549b97bf85c0b169093a3a8478d610ef7c9e2e'/>
<id>urn:sha1:f5549b97bf85c0b169093a3a8478d610ef7c9e2e</id>
<content type='text'>
Since the implementation grew from disassembling a single subroutine,
reading the ROM file from inside print_range() made sense. But since we
have disassembling of full segments and files now, this reading would be
triggered multiple times.

Commit d7b1a895de9e ("readrom: add an option to disassemble the full
file") avoided the exhaustion of the input by using seek(), but that's
just a hack and it's hiding the fact that we are constantly reading the
same thing over and over. Constantly reading ROM files isn't that much
of a performance issue given how small they are, but it's embarrasing
anyways.

Fix this by reading the full file once and passing the slice of bytes to
the same functions that used to require the file to be passed.

Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>readrom: add an option to disassemble the full file</title>
<updated>2026-07-16T14:43:58Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-07-16T14:43:58Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=d7b1a895de9e3b78dc4f303de6b5a692849b1cd1'/>
<id>urn:sha1:d7b1a895de9e3b78dc4f303de6b5a692849b1cd1</id>
<content type='text'>
Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>readrom: allow to disassemble a mapping</title>
<updated>2026-07-16T14:43:27Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-07-16T14:43:27Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=6fe543093aeab29deb67b1c835b618fce0595dfe'/>
<id>urn:sha1:6fe543093aeab29deb67b1c835b618fce0595dfe</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>readrom: print the usual PRG-RAM size if available</title>
<updated>2026-07-13T15:37:43Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-07-13T15:37:43Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=ef226a7e10fe665f025a0c4eed6e7dc0c613da4e'/>
<id>urn:sha1:ef226a7e10fe665f025a0c4eed6e7dc0c613da4e</id>
<content type='text'>
If 'has_persistent_memory' has been set on the ROM header, then we must
print it even if bytes 8/10 was never set by the header. In fact, the
vast majority of ROM files don't have these bytes set but they report a
true value for 'has_persistent_memory'. Hence, assume the usual PRG-RAM
size in these cases, which is (I hope) the correct one in all cases.

Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>Minor style fixes from an upgraded clippy</title>
<updated>2026-07-09T20:14:40Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-07-09T20:14:40Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=a012d260db4ad9a234a2ef29e8c0f7f6ef5f6a4e'/>
<id>urn:sha1:a012d260db4ad9a234a2ef29e8c0f7f6ef5f6a4e</id>
<content type='text'>
Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>readrom: Add detection of RAM, Timing and mirroring</title>
<updated>2025-09-12T19:55:20Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2025-09-12T19:18:34Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=ffaa5353031149ab2416bcf6d8b46e0a44a3bb39'/>
<id>urn:sha1:ffaa5353031149ab2416bcf6d8b46e0a44a3bb39</id>
<content type='text'>
Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Add -h and -v options on the help message</title>
<updated>2025-09-02T05:29:24Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2025-09-02T05:29:24Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=fb2d20e715dd04d27c4873c4989202133783f161'/>
<id>urn:sha1:fb2d20e715dd04d27c4873c4989202133783f161</id>
<content type='text'>
On all binaries there were these two options missing from the help
message.

Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
</feed>
