Now that the cartridge board work has died down while I wait for my first boards to come back, I decided to take some time today to implement scoring. I also shrank the board to 7 tiles wide, not only because there wasn't enough room on the screen, but also because there weren't enough Maria DMA cycles to show the score with the moving tiles going past it! (This is why you need to develop 7800 code on real hardware, not an emulator.)
As I had been planning all along, the score is one point per tile blown up by a bomb (for a max of 7 points if you drop it into a "pit"), and the triangle number (1, 3, 6, 10, 15, 21, etc.) of tiles blown up by making paths. Note that in tiles with two possible paths (the double-elbow and crossover), each path will count as a separate tile for scoring purposes. (It's not easy to tell whether the other path was found in the current path, or was already marked as found in a previous path when more than one path can be linked due to falling tiles, AND at the same time know how long the paths are.)
I also finally got around to making a really crappy Perl script to convert graphics from what was esentially ASCII-art into the hex codes needed for 320B mode. It was less work than manually converting the graphics for the score digits. This also means that if I come up with better looking digits, I can switch easily.
Oh yeah, you'll notice that the score is five digits. I'm sure someone will be bored enough to try to roll it over. Well, FWIW, it's a 2-byte number that gets converted to decimal, so it should roll after 65535. If that's a problem, it shouldn't be too much work to add another byte and digit to the score.
EDIT: Oh yeah, I made sure that the .A78 would run on MESS, and also added 50 lines of "safety" zone so that a PAL Maria wouldn't go nuts. (Proper PAL handling would need the lines broken up into 25 at top and 25 at bottom.)
Edited by Bruce Tomlin, Sun Aug 7, 2005 8:15 PM.