<feed xmlns='http://www.w3.org/2005/Atom'>
<title>jetpac.nes/src/background.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-03-23T23:34:26Z</updated>
<entry>
<title>Use the 'nmi_' prefix for NMI-only functions</title>
<updated>2026-03-23T23:34:26Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-03-23T23:34:26Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/jetpac.nes/commit/?id=b779e7dc3d44f7b9d90aeeee91ed36cf57d65e95'/>
<id>urn:sha1:b779e7dc3d44f7b9d90aeeee91ed36cf57d65e95</id>
<content type='text'>
Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>Implement the "take off" animation</title>
<updated>2026-03-23T22:59:26Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-03-23T22:59:26Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/jetpac.nes/commit/?id=0c9b0ad7938e2ba7e994574b4947e25c82440b8c'/>
<id>urn:sha1:0c9b0ad7938e2ba7e994574b4947e25c82440b8c</id>
<content type='text'>
This is the animation that is done after clearing a stage. Moreover, and
for the first time since I started development, now we can move into the
next level as intended from the game's design.

Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>Simplify the random_valid_y_coordinate function</title>
<updated>2026-02-10T21:45:20Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-02-10T21:45:20Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/jetpac.nes/commit/?id=1b46ddb0486276de0b0691e10277d206a0763300'/>
<id>urn:sha1:1b46ddb0486276de0b0691e10277d206a0763300</id>
<content type='text'>
This function relies on a pre-computed table to get the "random" numbers
from, but most of the times this is used, it needs to be between some
safe boundaries.

Before this commit, this was done inside of the function, correcting the
fetched value to be above or below these limits. But there was a bug on
the below the grounds limit, in which the 'sbc' instruction could
subtract too much from the fetched value and make enemies appear below
the sky.

Now, this is easy to correct, but since we are cheating with a
pre-computed table, I thought it would be vastly easier to just get a
random table with the "proper" values. That is, random but within the
required boundaries already. Plus, it makes the
'random_valid_y_coordinate' function much faster.

This commit adds a ruby script in bin/ which produces a pseudo-random
table when called, making sure all the requirements are met. We have to
make sure to call this script if we ever change the boundaries at some
point.

Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>Increase the upper Y limit for sprites</title>
<updated>2026-02-03T20:49:34Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-02-03T20:40:46Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/jetpac.nes/commit/?id=4ef68e136eb6276cd7dc39426720ce5d7e87d2d4'/>
<id>urn:sha1:4ef68e136eb6276cd7dc39426720ce5d7e87d2d4</id>
<content type='text'>
Some sprites like enemies and objects are meant to appear maximum at a
certain Y coordinate. Increase that as the former could mean sprites
going on about the scores, whereas that shouldn't be possible.

Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>Initialize enemies at a random Y coordinate</title>
<updated>2025-05-16T05:55:56Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2025-05-15T20:06:00Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/jetpac.nes/commit/?id=638dfdca6e773d4b1ec573606cac90bdb1778667'/>
<id>urn:sha1:638dfdca6e773d4b1ec573606cac90bdb1778667</id>
<content type='text'>
The randomness comes from a pre-computed table of "random" numbers. This
is of course the most simple technique you can come across a code base
for the NES/Famicom, but for the purposes of this game is good enough
and (most importantly) fast.

Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Don't touch zp_arg2 on background checks</title>
<updated>2025-05-14T17:38:30Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2025-05-14T14:04:47Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/jetpac.nes/commit/?id=c9a37d15e270ef28b0048eba7cdab15b73b20331'/>
<id>urn:sha1:c9a37d15e270ef28b0048eba7cdab15b73b20331</id>
<content type='text'>
This was a leftover from a previous implementation and is no longer
needed. Moreover, I have also added a comment clarifying that the 'y'
register is preserved.

Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>player: Implement background collision</title>
<updated>2025-04-01T19:21:27Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2025-03-21T14:02:49Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/jetpac.nes/commit/?id=bcece25da4af0d4f47dc279dd5e1a67cb553186f'/>
<id>urn:sha1:bcece25da4af0d4f47dc279dd5e1a67cb553186f</id>
<content type='text'>
This adds a first implementation of collision checks between the player
and the background.

Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Expanded ground collision to the other platforms</title>
<updated>2025-03-18T15:56:23Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2025-03-18T15:56:23Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/jetpac.nes/commit/?id=d38a958f446aac1a6faa79277c140ab8a0ff03f4'/>
<id>urn:sha1:d38a958f446aac1a6faa79277c140ab8a0ff03f4</id>
<content type='text'>
This comes with a more general approach to handle background collision.

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