How to get “under the hood” of an old C64 game?

That’s not quite true but the environment where that is still done is robotics ea. selfcontained programmed workunits. They have small memory controllers that you want to squeeze everything out.

I had C64 way back when and there was a dedicated magazine published in England (I’m a finn) that I subscribed. It had program listings that one could key in and execute and get somthing nifty. Most were simple games and one was an adventure game. I was baffled why would anyone publish an adventure game to key in when in keying in you read all the text in the game and know exactly what you need to do. Btw. these were all in C64 Basic.

So I wrote an adveture game that only had this big array and and an interpretter. All the code and data of the game was in that huge array of numbers and the interpretter was very stripped down Forth-interpretter that executed that array. They published it and in the next number I got lists of asks to publish how to write the games for my interpretter and I complied and others start to publish their games using the same interpretter. Fun times.

In case anyone gets the bright idea of unrolling those loops:

Since the early processors were not pipelined, nor cached, unrolling those loops doesn’t help much. (saves a little time, but memory was sparse back then, so was seldom done.)

Isn’t Booth’s algorithm basically just the binary equivalent of the method grade schoolers are taught for multiplying with pencil and paper?

It’s a bit more complicated. It looks at two bits at a time and does one of four things during a step. But then it shifts only 1 bit for the next step.

It relies on properties of 2’s complement numbers.

Me, I prefer the Wallace tree multiplier. Much faster. You just need a lot of gates, but still sub quadratic.