Program a NES game in C

BNES Marioack in the mid 80s I was busy writing games for ZX Spectrum, MSX and CBM-64 and also porting games between 6502 and Z80. That was also when the original NES appeared.  That had a 6502 CPU but a lot less RAM than the CBM-64.

In those days the NES was programmed in assembly language. C was still too new for most things but now, it’s possible to program a NES game in C. Developer Douglas Fraker has produced a series of tutorials on how to create NES games in C using cc65, a C compiler/assembler that takes C code and outputs 6502 assembly language.

His tutorials cover the whole range of things including sprites, how palettes work, music, sound effects, even how to use the Zapper (a stand alone gun-like accessory) with all source code on GitHub.  You can run games on an emulator such as the one that comes with RetroPie.

Reading the page on 6502 ASM Basics brought it all back to me even though it’s 31 years since I last wrote 6502 code.

 

.

(Visited 2 times, 1 visits today)