Fixing a 1987 ZX Spectrum game I didn't write


I saw this game being played on this YouTube video: Colin The Cleaner - bugs and all

I wanted to know why this game had such obvious issues, and so loaded it up into the FUSE emulator and broke into the code. It didn't take long to realize it was spending all its time in the ROM, and that it was most likely to be a BASIC program.

So I then used FUSE with auto load turned off, to manually MERGE "" the BASIC program into memory and take a look at it. There is some machine code used for sound effects, the character set and drawing the level parts - but most of the game is in good ol' Sinclair BASIC.

The first and most annoying bug, the non-completion issue where the exit doesn't appear, turned out to be related to when the player moves *up* from a block while *collecting* an object at the same time. There simply wasn't any code to handle that situation!

So, I added a subroutine to do this:

Yes, my hand drawn highlighting is awesome. Anyways...

Line 1005 is the code that moves the player up and to the left. There is an equivalent (line 2005) where I also added the GO SUB call, for moving up and right. Confusingly, this code uses 'x' for the y-coord and 'y' for the x-coord, so that's nice...
I then tested the game out, and couldn't reproduce that same issue anywhere. Great!

But then I reached the Natural History level while playing, and realized there was a new issue: if you approached the teleporter in the tail from the left and moved right, the game would "collect" the teleporter - which totally breaks that level and makes it unfinishable!

This is the reason the current SNApshot file I've uploaded is at v2 - I'd already uploaded the fix for the original problem before spotting this one.

Because this issue is caused by moving right onto an object with a white attribute (the code checks for collison with collectibles based on attribute colour!), it wasn't easy to do a proper check fix on this one without adding bitmap checking code - so instead, I decided to tweak the level code.

This is actually stored as raw data in memory, and the machine code line drawing routines are called on each 4-byte data groups per level to draw the platforms and objects. I had to move the fish tail left-hand parts one character left on the screen, and also move one of the collectibles, so that the player cannot walk into the teleporter and "collect" it!

Fixed level looks like this:
Fixed fish level!

I used the memory poker of FUSE to add the changes, which were as follows:

To fix the fish bits to prevent transporter "collection" (i.e move the fish tail's narrow piece left one character):

0xE55F - changed 0x15 to 0x14

0xE5FE - changed 0x15 to 0x14

0xE533 - changed 0x17 to 0x16

then to add an extra platform to fill the gap left by doing this:

0xE514 changed to 0x19 (from 0x18, which essentially adds one more platform to the total)

0xE575 changed to 03 (straight horizontal platform type)

0xE576 changed to 09 (y-coord)

0xE577 changed to 0x17 (x-coord start)

0xE578 changed to 0x18 (x-coord end)

This is the currently uploaded version. Hopefully, there won't be more bugs further into the game, but if I find them - or they get reported on here - then I will fix those too!

Files

ColinTheCleanerFIXEDv2.sna 48 kB
43 days ago

Get Colin The Cleaner - Bug FIXED - ZX Spectrum

Leave a comment

Log in with itch.io to leave a comment.