A C64 Game - Step 57

This is a technically more sophisticated step. We'll add the possibility of a borderless level, and also a second charset.

Especially the latter requires a thorough planning of where to put things in memory. Remember, the VIC (the C64s graphic chip) can only see a 16K range at once. This means, all visible characters, sprite and screen memory must reside inside one 16K bank.

The new memory layout looks like this:

;screen back color $BC00 to $BFFF;charset2 $C000 to $C800;screen back char $C800 to $CBFF;screen $CC00 to $CFFF;sprites $D000 to $F7FF;charset $F800 to $FFFF

Once that's down (and fits) the code changes are rather simple. A new byte is added per screen to allow for 8 flags. Bit 0 means no border, bit 1 means second charset.

Implementing borderless is easy, check the bit, and it set, skip the level border drawing: