Pages

Monday, 1 February 2016

More on Pentagram

I've finished the first pass labeling the routines and formatting the data for Pentagram.

Some interesting observations. I would have to say that Pentagram was definitely based on the Alien 8 source code, but there is at least one routine that was lifted from Knight Lore rather than Alien 8. The routine in question has the same net effect - so no good reason for doing so, in fact the Alien 8 version was unrolled to (presumably) run faster - which suggests that perhaps Pentagram was started before Alien 8 was finished!?!

Seemingly for no good reason, the memory map of the game differs from the previous games. The former had variables, then font, game layout and graphic data, and then code, which included the sprite update jump table, strings etc. Pentagram starts with game layout and graphic data, followed by variables, sprite update jump table and then code. Inexplicably, the font data is right in the middle of the sprite data - I suspect the graphics data resided in multiple include files and no-one noticed the font data splitting the sprite data in two.

Knight Lore has a maximum of 40 objects at each location, Alien 8 has 56 (hence the slower rendering) and Pentagram 54. In what may be a bug in Pentagram, the list of objects to draw is only 48 bytes long (same as Knight Lore); not long enough if every object needs redrawing! Again, was that a bug fixed in Alien 8 after the source was forked for Pentagram?

I've seen no evidence (yet) that the filmation engine core itself has been enhanced. The 3D maths, including Z-ordering, all appear to be identical to the previous games.

I've yet to definitively identify the code responsible for the mechanics of re-spawning monsters and shooting, but I've got a pretty good idea of how it would be done. Rather than requiring an extension to the core per se, they should simply be implemented in the sprite update routines; at least, that's the way I would have done it. A testament to the quality and flexibility of the original design!

There are a number of routines called from the main game loop that manipulate objects that are new to Pentagram, which I would say comprise the main differences in the Pentagram source code. At this point I'm not sure what they do.

Based on the work I've done so far, I would say that producing a relocatable version and patching it for the TRS-80 wouldn't be out of the question in the near future.

No comments:

Post a Comment