Area536 :: Rebooted

Mar 28, 2024 - 2 minute read - C64 gamedev

What happened to Larry on the C64?

Suddenly I realized that it’s been months that I wrote about my efforts to port Leisure Suit Larry to the Commodore 64. The good news here is that the project is still on my radar and far from abandoned. The reason why I’m not posting any progress is the fact that I’m upping my skills on the back of the other project I’m working on. The skills I need are in the area of Rust programming. Why would I need to program in Rust when creating a game for the C64? Hear me out.

I’m currently stuck with Larry at the point where input parsing becomes a necessity. After looking at AGI, it turns out that the memory load for this is comparatively huge on a C64 and it will be A LOT of code to do directly in Assembler. That’s why I’m currently looking at code generation, and that’s where Rust comes into this picture.

The input parser of the original game uses many hundreds of words in so-called word groups. As the player enters text, the engine scans the words to see if they fit into a known word group. If a word fits, the parser notes down the ID of the group and proceeds with the next word from the input. This results in a sequence of word group identifiers on which the game can base its decision on how to proceed.

Since Larry originally contains well over a thousand words, I’m not looking forward to hand-coding the necessary Assembler to parse each of them and to assign a word group number to them. I’m not even sure if the whole list of words and groups is going to fit in RAM or how to store it in cartridge ROM banks. In short, I need a lot of flexibility and an easy way to backpedal in case I make a wrong choice at some point.

So now I’m writing DOSContainer in Rust to learn the necessary skills in a powerful language that runs on a modern PC. Once I’m done with that, my next project will be a code generator that takes in a word list for Larry and spits out 6502 assembler code that helps me get from individual words on the command prompt to a sequence of word group ID’s to take the development of the game further.