Commodore's Weirdest CPU vs. Space Invaders - Porting a PET game to the 6509

Commodore built the b-series CBM-II as a business machine, and in the process made it one of the most awkward 8-bit computers ever to write a game for. Its 6509 CPU can reach a full megabyte of RAM, but only by switching banks, and that single design decision turns a straightforward PET game port into a running battle with the hardware. In this video I start with the disassembly I did of Space Invaders from the Commodore PET and port the code to run on the CBM-II B-series. I talk about all the challenges the 6509's banked memory put in front of me: addressing across banks, writing to a screen that lives in another bank, surviving interrupts when the CPU can't even find its own handler, calling the KERNAL across the bank boundary, and turning the PET's 1-bit CB2 beeper into SID sound. Links mentioned in the video: How to Disassemble Space Invaders:    • Beginner's Guide to Disassembling 6502 Bin...   Source code and a d64 on GitHub: https://github.com/commodoreihs/binva... Space Chase by Christian Krenner: https://www.spacechase.de/ Huge thanks to Christian Krenner, who was enormously generous when I was first getting my head around the 6509. The initial bank-switching setup in my port is lifted straight from his game Space Chase.