Pretty or ugly, having labeled code that you can make a change to and reassemble with rom location references adjusting automatically is a huge leap forward for people being able to make long desired hacks to the game.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Pretty or ugly, having labeled code that you can make a change to and reassemble with rom location references adjusting automatically is a huge leap forward for people being able to make long desired hacks to the game.

Amazing!During that disaster of a Bruins game last night, I found the spots where it used single bytes for hard-coded address and fixed them so the code appears to be fully relocatable now.
Some care has to be taken in hacking to make sure the sprites don't cross a page boundary, as when ships sink or the missile changes size, only the low byte of the address gets updated, but that's easy.
So far, I've removed coinage, added free play, and restored the PRESS BUTTON display instead of having it auto-start on a coin.
For shits and giggles, I added OOF and POW to ZAP and WAM on mine explosions, but the "random number" it's using to select isn't very good.
Going to add a 3rd digit to the scores next, but I want to get the disassembly of the original code cleaned up and checked in before I start mangling it too much.

Rewrote some of the original code to make it smaller.
Moved some variables around.
Simplified coinage to add free play.
Modified self-test to do checksums in $400 blocks instead of $200 since the code didn't actually handle 2708s
Added a 3rd digit to player score and high scores, along with all of the necessary changes to extended time / score compare / mine count routines.
...and it fits in the original 4k with 57 bytes to spare.
That is a great idea!While I'm hacking on the game, I'm going to look into changing the mine behavior as well.
I don't like how the mines get drawn in all new locations when your torpedoes reload -- would make more sense to leave the existing ones in their original locations and only draw some new mines.
I'll also look into making different rows of mines move at different speeds or in different directions to add more of a challenge.
Fascinating stuff!Heh -- found one reason why they rewrite the sprite locations from scratch every reload.
It's not really noticeable during gameplay, but when the mines scroll off the right side of the screen and reappear on the left, they naturally move down one row since that's how the addressing works.
If I just let the mine positions keep updating whether they're visible or not, and just make them visible again on reload (original code only updates visible mines, hence the need to redraw), they slowly but surely fall off the bottom of the screen and mess up the text.
It'd be easy enough to check for the carry from +$1F to +$20 and subtract the line back off to keep everything in its original row, but that'd only work for the existing left-to-right scrolling mines and other speeds and/or directions would need to be special cased as well.
I'll have to play around and see what the best (and most code-efficient) way to do this is.
The way that you describe the process of what you are doing is interesting since at face value it sounded quite a simple thing. I t makes you wonder what the original program was like that was developed and then the compromises that occurred to be able to shoehorn it into the limited rom space and the odd compromises in coding that occurred because of it that made it more locked down and rigid. The thing is the technology looks cheap and common now but at the time was state of the art at the time and the costs were significant to the profitability to the company and the constraints of the hardware. Just think that at the time this program was written a cassette tape recorder was the commonly used to store computer programs unless you had some money to buy an expensive mini disk that stored 128k of program and data.

