Sep 20, 2012 0
Yes, I still think in 6502 code.
I was looking at a video of the Atari 7800 game Ikari Warriors — a game that I worked on back in the 1980’s.
I was the one who suggested to Mike a way to build a board to install our own development system operating system on the Atari 7800 — which we then later turned into a NES development system (which made it about $10,000 cheaper than the official Nintendo developer system).
And I wrote the interrupt-driven code for the development system so that we could debug WHILE the game was playing on the system. The 7800 was connected to an IBM PC (compatible) (and probably running something super-powerful like a 8086 or maybe a 286). We wrote the code and compiled it on the PC and then transferred it over to RAM we had installed on the 7800 to simulate a ROM cartridge. The PC could issue commands to the development system which were processed on the interrupts so that we could debug in real time.
Big lesson learned — there’s no point in trying to save every last CPU cycle.
PHA TXA PHA
Winds up functioning very differently from
PHA TXA PHA TYA PHA
as the start of your interrupt code. Especially after a few months when you forget what you wrote and add in some feature that uses the Y register.
Oh so many bizarro errors that caused that were impossible to track.
I was very pleased with myself at how I had designed the game engine to make the bad guys move in zones, thus allowing sprites to be reused in multiple zones and thus allowing there to be a ton of objects moving on the screen at any time. No big deal now, but BIG DEAL back then.
I didn’t get to work on the final gameplay stuff since we then used our ability to make development systems to move on to doing Nintendo programming rather than finishing the game. It doesn’t look to me like it plays as smoothly as it had potential to.