Saturday, May 28, 2011

Bullet Hell

Spider fighter has been giving me the finger when I've asked it where the X/Y positions of all the bullets are. I've been making sure I've got ALL the necessary info for each of these 2600 games before I move on to continue them to completion but while the enemy and your ship positions have been easy to find, the bullets have not, or at least not been as easy to decipher.

Turns out there are 2 sets of values for each set of bullets (enemy and yours) one is the good old 2600 horizontal move (fine movement) register and the other is (and this is what took me a while to suss) an index into a bunch of different routines at the start of the ROM which handle the timing of when to start displaying the bullets.

The 2600 has no actual X/Y registers for stuff. You start displaying sprites down the screen as the scanline hits it, but the X position is a mix of waiting CPU cycles till you're near where you want the sprite to appear then turning it on whilst also adjusting that very coarse position with the HMx registers. So the Spider Fighter code creates the 2nd list for the X pos as the actual offset into the timing routines...

Almost everything I need for Spider Fighter now :)

No comments:

Post a Comment