<feed xmlns='http://www.w3.org/2005/Atom'>
<title>jetpac.nes/src/enemies.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>Try to initialize enemies on unique Y coordinates</title>
<updated>2026-03-22T14:17:24Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-03-20T20:52:36Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/jetpac.nes/commit/?id=fb23cf51040f06bfcfbaf318d7b452d76ffbedfb'/>
<id>urn:sha1:fb23cf51040f06bfcfbaf318d7b452d76ffbedfb</id>
<content type='text'>
That is, our PRNG algorithm is so stupid that sometimes it cycles into
the same value multiple times. While play testing, sometimes we were so
unlucky that we got all enemies on the same Y screen coordinate.

As funny as these situations can be, this shouldn't happen, so I have
introduced an (awesomely named) function that makes a harder effort at
finding a unique random number.

Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>Rename init_x() to init_enemy_x()</title>
<updated>2026-03-11T22:41:08Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-03-11T22:41:08Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/jetpac.nes/commit/?id=58b0af791a8f6a704e4f066dfa187180ae1c8514'/>
<id>urn:sha1:58b0af791a8f6a704e4f066dfa187180ae1c8514</id>
<content type='text'>
This is just a minor fix for an overstep from commit
270d60d58d3e ("Rename scoped variables without being redundant").

Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>Apply a correction on enemy movement for PAL</title>
<updated>2026-03-11T22:36:48Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-03-11T22:36:48Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/jetpac.nes/commit/?id=bd97502a0c07428d9fed59f65556cad502769adb'/>
<id>urn:sha1:bd97502a0c07428d9fed59f65556cad502769adb</id>
<content type='text'>
We cannot just "inc"/"dec" for enemy movement, but we have to apply an
overstep on PAL every 5 frames in order to be equivalent to the NTSC
version. This has been abstracted away on a macro that just does
"inc"/"dec" on NTSC, but does this proper "adc"/"sbc" instructions with
a helper memory region which is updated every 5 frames.

Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>Move some variables into another memory region</title>
<updated>2026-03-06T23:44:28Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-03-06T23:44:28Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/jetpac.nes/commit/?id=60f21153e18ccf45cb120d50f6d5f5c860de78f2'/>
<id>urn:sha1:60f21153e18ccf45cb120d50f6d5f5c860de78f2</id>
<content type='text'>
The zp_player_tile_* variables fit perfectly with the space that is left
in the $0x memory region. This allows for a more contiguous
space (e.g. on $Cx) for other elements to come (e.g. items).

Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>Ramp up the revive counter for enemies</title>
<updated>2026-03-06T23:08:05Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-03-06T23:08:05Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/jetpac.nes/commit/?id=8e374ff6746dc44fd70691aae737236734164ef2'/>
<id>urn:sha1:8e374ff6746dc44fd70691aae737236734164ef2</id>
<content type='text'>
This way it feels more like a swarm of enemies and you don't have any
resting time.

Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>Fix documentation error on the 'chase' algorithm</title>
<updated>2026-03-06T23:04:37Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-03-06T23:04:37Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/jetpac.nes/commit/?id=9bb7715cf8e0a01ae7d43f6ff2fc126ea6388533'/>
<id>urn:sha1:9bb7715cf8e0a01ae7d43f6ff2fc126ea6388533</id>
<content type='text'>
Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>Bump up to 4 enemies per screen</title>
<updated>2026-03-06T22:51:57Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-03-06T22:51:57Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/jetpac.nes/commit/?id=f21e394e597e198d1e10bca7fd8a5e1103e95a6c'/>
<id>urn:sha1:f21e394e597e198d1e10bca7fd8a5e1103e95a6c</id>
<content type='text'>
This is more similar to the original game, and it's a bit more fun. In
order to do so some variables had to move into another memory page, but
that's fine as we have plenty.

Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>Make more things operate on SIZEOF_POOL_ITEM</title>
<updated>2026-03-06T22:43:26Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-03-06T22:43:26Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/jetpac.nes/commit/?id=37b22275726d8a702c2168751f8af5e833fcc46d'/>
<id>urn:sha1:37b22275726d8a702c2168751f8af5e833fcc46d</id>
<content type='text'>
Out of consistency, let's use it, and this way experimenting with the
amount of enemies per screen won't be as painful.

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>
</feed>
