top of page

Dethroned

About The Game

Assembly

Machine code

Team

Amstrad CPC

Contest

Dethroned is the first videogame we developed entirely in Z80 Assembly. It was created in just one month for the CPCRetroDev 2017 contest and for the Amstrad CPC computer.

​

It is a simple platformer where players must reach the top of each level to progress to the next one. To do this, there a some blue platforms placed around the levels, which allow players to jump higher and reach upper levels. Some stages can have turrets that fire bullets, which players must avoid or destroy the turrets to advance.

What I Did

Overview

  • Learned the basics of machine code : registers, assembly representation etc.

  • Learned how to program in Z80 assembly language.

  • Researched and understood the PC's hardware and architecture.

  • Code optimization to meet the 8-bit PC limitations.​

  • Delivered a fully playable game for the Amstrad CPC.

  • Focused in the implementation of character movement and enemies behaviour.​

Learning Z80 Assembly

One of the biggest challenges from this project was learning Z80 Assembly for the first time. For this, I began by studying machine code to properly understand how the instructions and registers work. 

​

During this process I used WinAPE, an Amstrad CPC emulator with a built-in debug mode that lets you pause the program and directly manipulate memory by inserting machine code. This tool also displays the conversion from machine code to Z80 Assembly, helping me visualize the transition between these two.

​

I ended up creating some simple drawings and animations on it, which allowed me to understand better how Z80 assembly works and, more importantly, letting me to properly understand how pointers work in higher-level languages like C++. You can take a look of some drawing examples below.

Reto 4.gif
Reto 1.gif

After this short introduction to machine code, I began working on the game for the contest alongside with my two other teammates. It was a very complicated task as we had to learn how to develop within the limitations of an old PC like the Amstrad CPC. This required us to write code as efficiently as possible and conserve memory wherever we could.

​

​​In the end, we created a very simple game that can be played from start to finish in an Amstrad CPC computer. It may not be the best game, but the most important thing from this project was all the knowledge we gained about machine code, assembly, code optimization and working on a limited memory system.​

​

This project was the reason I continued learning about assembly programming and why I ended up doing my research project focused on creating a game for the Sega Master System.

bottom of page