<feed xmlns='http://www.w3.org/2005/Atom'>
<title>jetpac.nes/src/bullets.s, branch main</title>
<subtitle>Port to the NES/Famicom of "Jetpac" from Ashby Computers and Graphics Limited.
</subtitle>
<id>https://git.mssola.com/nes/jetpac.nes/atom?h=main</id>
<link rel='self' href='https://git.mssola.com/nes/jetpac.nes/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/jetpac.nes/'/>
<updated>2026-04-13T14:34:11Z</updated>
<entry>
<title>Add sound effects</title>
<updated>2026-04-13T14:34:11Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-04-13T14:34:11Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/jetpac.nes/commit/?id=aef156ac6216ed157b06a2872ba051af43317e93'/>
<id>urn:sha1:aef156ac6216ed157b06a2872ba051af43317e93</id>
<content type='text'>
Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>Fix overwrite issues when adding scores</title>
<updated>2026-03-27T23:27:09Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-03-27T23:27:09Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/jetpac.nes/commit/?id=a2411d86a504adbc027a93c8bddb1ba0e0f447fd'/>
<id>urn:sha1:a2411d86a504adbc027a93c8bddb1ba0e0f447fd</id>
<content type='text'>
The add_to_player() function relied on parameters to be passed on the
'Globals::zp_tmpX' variables, but that's just plain stupid. First,
because these memory addresses are not meant for arguments; but most
importantly, because callers actually needed some of these values before
calling this function. Hence, everything went into chaos and sprites
began to act wrongly in all sorts of random ways.

Moreover, some of the callers also needed a guarantee on either the 'x'
or the 'y' registers. Since this wasn't always feasible, we needed to
store/load these registers' values case by case.

All in all, now add_to_player() accepts only one argument via the 'y'
register (which callers already knew it was going to be messed
with). The value on 'y' has to be set via some helper constants.

As a cherry on top, this not only fixes a nasty bug, but it also makes
things more performant and with less code.

Fixes: 63ef73de3bdd ("Update scores on screen")
Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>Update scores on screen</title>
<updated>2026-03-25T21:40:48Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-03-25T21:40:48Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/jetpac.nes/commit/?id=63ef73de3bdd698ab250407354e24a6de7c9ef20'/>
<id>urn:sha1:63ef73de3bdd698ab250407354e24a6de7c9ef20</id>
<content type='text'>
Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>Support reading from the second controller</title>
<updated>2026-03-08T21:14:15Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-03-08T21:09:31Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/jetpac.nes/commit/?id=f1d1d0efee9faa3067f7b0fc8b9a2aebb17f1ccd'/>
<id>urn:sha1:f1d1d0efee9faa3067f7b0fc8b9a2aebb17f1ccd</id>
<content type='text'>
Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>Make bullet transitions in relation to HZ</title>
<updated>2026-03-06T23:29:07Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-03-06T23:29:07Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/jetpac.nes/commit/?id=7ce50c89c93326bcd4029a2a4fbf488a41db3369'/>
<id>urn:sha1:7ce50c89c93326bcd4029a2a4fbf488a41db3369</id>
<content type='text'>
Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>Convert enemy vs bullet collision into a loop</title>
<updated>2026-03-06T22:40:02Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-03-06T22:40:02Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/jetpac.nes/commit/?id=e602dd3707f2b6ad3198a62497ca6ee311997485'/>
<id>urn:sha1:e602dd3707f2b6ad3198a62497ca6ee311997485</id>
<content type='text'>
The fact that unrolling the loop was easier or faster was a plain lie
from my lazyness. Convert it into a proper loop just so we can
experiment with adding more enemies in one screen.

Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>Rename scoped variables without being redundant</title>
<updated>2026-03-06T20:38:32Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-03-06T20:38:32Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/jetpac.nes/commit/?id=270d60d58d3ef206a11057d399e360976546e439'/>
<id>urn:sha1:270d60d58d3ef206a11057d399e360976546e439</id>
<content type='text'>
Some variables had the same name of the scope in their names as
well. Remove this redundancy everywhere.

Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>Let enemies die whenever they touch a bullet</title>
<updated>2026-03-03T22:19:53Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-03-03T22:19:53Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/jetpac.nes/commit/?id=196f2ac744fa8e0b6ce2da555e01178d04bfb322'/>
<id>urn:sha1:196f2ac744fa8e0b6ce2da555e01178d04bfb322</id>
<content type='text'>
Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>Wrap around the saving of the last allocated bullet</title>
<updated>2026-03-02T21:43:57Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-03-02T21:43:57Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/jetpac.nes/commit/?id=b7c41567892a7b3bd3782128926c6a223658a034'/>
<id>urn:sha1:b7c41567892a7b3bd3782128926c6a223658a034</id>
<content type='text'>
If we don't do this, then it's possible to incur into a buffer overflow
as the last allocated index is set to the next (out of buffer)
position. Whenever we start over on this function, then it will compare
for a good bullet on this position, and if it's not exactly $FF, then it
will allocate it without problems.

Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>Small optimization on bullet initialization</title>
<updated>2026-03-02T21:34:27Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-03-02T21:34:27Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/jetpac.nes/commit/?id=8ffad74ae370c0125c62b56ba23d8d74d48a4b3d'/>
<id>urn:sha1:8ffad74ae370c0125c62b56ba23d8d74d48a4b3d</id>
<content type='text'>
Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
</feed>
