The Limitations of 1Mhz

The Commodore 64 used a 1 Megahertz 8 bit processor with 64 kb of 8 bit memory. To do 16 bit operations it had to do 2 reads of memory. In these days of 4ghz (4000 times faster), 64 bit buses (8 times more data for each read of memory),  and  typically 8GB of memory (125,000 times more), it seems unbelievably slow. Making the Commodore 64 sing and dance is a real challenge!

1984                       2016                          Multiple
1 MHz                    4000 MHz (4GHz)   4000
64 Kb                     8,000,000 Kb (8Gb) 125,000
8 Bit Memory        64 Bit Memory         8
1 CPU                     4 CPUs (Quad Core)  4

If I am correct, that makes a typical PC today 16 billion times more powerful than the Commodore 64!!! (4000*125,000*8*4). And that’s not taking  other efficiencies into account!

To get Sleepwalker into 64kb I am compressing the screen data. Each uncompressed screen needs approx 1.5kb, if I have 60 screens that’s approximately 90kb, which of course won’t fit into 64kb! I don’t want to be loading from disk, so I’m compressing the screens. That’s great, but there is so much compressed information that it is getting slow to decompress and there is a visible glitch as the game decompresses the data. I am rewriting the screen compressor (again) so that the information will decompress much faster. We are now compressing 18 screens into 4kb, and, once this rewrite is done, it may be even less.

I’m loving the retro challenges of a 1mhz processor!

Coming Together…..

Sleepwalker has moved from many hours of writing code to perform various tasks, (these tasks are the building blocks of a game), to being closer to a real product.

If you didn’t know, I had lost every piece of source code to every game I wrote in the 80s. I’ve had to write everything for Sleepwalker 2016 from scratch. However, we are at a place where we can start putting the different building blocks together and focus on the player experience. There are many bugs which need to be isolated and removed, but there is a game taking shape. Sleepwalker has moved from a good idea to the beginnings a tangible product! Many hours to go before we have a beta version which will need game testers, but I can see that point approaching!!