Super Mario Bros for Amstrad CPC464

When i was a little kid I remember that i really wanted to create a Super Mario Bros game for the amstrad cpc 464. Now that I am 33 and I work as a software engineer I asked myself: why don't you make your old dream come true? :) Finally I found the time to create a demo with the famous first Level 1-1 of Super Mario Bro:

The horizontal hardware scrolling needs a double buffer in order to get an accuracy of 4 pixels. The demo runs on original Amstrad CPC 464 speed emulated by Caprice. It is pretty fast and can loop horizzontally for a limit of 512 16x16 tiles meanwhile the level 1-1 takes only 212 tiles. I readjusted the original smb graphics to fit a 256x192 Mode 1 with 4 colors. I really like the effect of the gray scale map mixed with the blue sky, like in the original NES game. This demo has been programmed with SDCC in C and Z80 assembly.

The next challenge is to make a playable demo. For now i'm trying to produce a game for the Amstrad CPC 464 with only 64 KB of memory, trying to store the entire game into the available memory to make it portable for the old cassette system. I'm using pucrunch for z80 with zrle algorithm to save a huge amount of memory. The compressed tileset is about 3.5 KB, the chars 5 KB, a single level 500 bytes. A single level uses only a subset of the available graphics, so i can make assumptions to save memory during the decompression. I estimated about 9 KB for compressed data with a single level and 10 KB for the decompressed ones. At this rate, i can make only 4 levels playable but maybe it's good for a first version of the game. I don't know if i can implement more optimizations to store the remaining 28 levels or if i have to switch to disk loading or just use 128 KB, I'm still evaluating. Another challenge is to program 1 pixel precision blitting algoritm to move the characters. Unfortunately, I'm pretty busy with my job so i have very little time to dedicate to my projects, so it will proceed slowly, but it's good to know that i will post updates on this website as soon as they will available for the public.

Warning: I created this project only to improve my programming skills and not for commercial purpose. The original design, concept and graphics of Super Mario Bros are owned by Nintendo and not by me.