wnd's weblog

Game of Life in 6502/6510 assembler

28 Feb 2009 19:05:04 software

Bringing back old memories… Game of Life for Commodore 64 written in 6502/6510 assembler. Uses border-wrapped 38*23 board and currently renders 16.7 frames per second. One step closer to the sources.

How did this all begin? About a week ago when I was having a shower I suddenly started thinking of one particular VIC-20 game. I couldn’t remember the name, but I could tell it had something to do with juice, and that the game was in Finnish. Once out of the shower I asked the all mighty Internet about the game, and rather sooner than later I found out the game was called Mehulinja.

I tried the game with an emulator and started thinking if I should create a remake of the game for Maemo. I soon realised that while the game was nostalgic to me, it would hardly have replay value. Besides, my version of Puzzle Quest Galactrix was still unfinished – although already working and very difficult to beat. Instead, I started wondering how fast I could have Game of Life run on Commodore 64.

While I have written short utilities for Amiga 500 in 68000 assembler I don’t have history of assembler programming to speak of. Well, I did write partially working sidplayer for C64 in 6510 some years ago but that’s about it. Still, programming in assember has always fascinated me.

I started working on that spot, and ten hours later I had refreshed my memory about C64 and 6510 assembler quite a bit and finished first working version of Conway’s Game of Life for Commodore 64. Rendering border-wrapped 38*23 board at blazing 5 FPS I knew I couldn’t stop now. Exactly a week later I’m still working on it, but the framerate has gone up to 16.7 FPS. I know there’s still room for improvement.