-
Project Results After Extra Time
3 days ago • 0 commentsSince the RetroChallenge has finished two weeks earlier it's about time to write the project results, what I managed to achieve (and what I didn't), and what I learned with it.
In the last year I had experience writing 8080 Assembly code with the Zilog syntax, now this year I wrote Z80 Assembly code using the same assembler, I liked using the extra available opcodes in the code.
For the project results I finally managed to implement the flood fill algorithm to destroy a group of two adjacents blocks or more, for that the builtin stack pointer is used to avoid recursion, and I implemented scoring after destroying the blocks.
Unfortunately I didn't have time to implement level progression, the bonus time, and the win and lose conditions before the end of the RetroChallenge, perhaps in the future I could implement these features.
I had personal issues to solve in this month, so I'm launching this as a prototype, like an Atari 2600 prototype. Despite the problems I liked working on the color screen of the arcade system.
With that knowledge of working in the low-level programming with Assembly I could work as a low-level developer in an embedded system, even that the most probable is to work with the C language.
I'm posting the source code on GitHub (link here). Like previous years I hope that someday I add more features to the puzzle game and thus complete it.
-
Extra Time Work
11/03/2026 at 05:18 • 0 commentsYeah, the RC2026/10 has ended, but I still have work to be done on the puzzle game. I finally managed to apply the gravity after removing some blocks, and I still need to implement the flood fill algorithm, the score functionality and a win/loss condition.
For the gravity implementation, I created two subroutines, one to apply it downwards, and another to apply it leftwards, these subroutines are called after pressing the main button, it has a condition to check for empty space.
I forgot to say before that I've implemented the powerup switch using the 2 player button, you can switch between no powerup, horizontal line, vertical line and bomb powerup.
For this week I plan to implement the score functionality with a formula to calculate the points, a win condition where you clean all blocks, a loss condition where there's no available moves, the level progression where it adds a new type of block, and the flood fill algorithm itself.
In the end of the week I hope to write another project log with the project results, explaining what were my expectations about the project, and post the source code on Github and write the instructions of how to assemble the code and run it on MAME.
-
Implementing Input
10/25/2026 at 23:42 • 0 commentsIn the last days I was writing some Z80 Assembly code to implement the button inputs of the arcade machine. In addition of input reading I implemented a blinking cursor to indicate which block is currently selected.
The problem I've encountered is to implement the input and the blinking cursor together, I have a delay subroutine but it's synchronous, meaning the subroutine delays without reading input. The cursor needs the delay to have the blinking effect.
The solution was to create another delay subroutine which reads the button inputs and sets which button is pressed. Then I read the current button pressed outside the delay to determine the action.
I implemented the powerups actions first because it was easier than implemeting the flood fill algorithm in the grid. I added an arrow to indicate which current powerup is selected. And in addition I changed the time text to bonus text to be less confusing.
For this last week I need to apply gravity after destroying some blocks, implement the score and bonus functionality, and find a way to implement the flood fill algorithm. Here's some gameplay that I implemented so far:
Testing the powerups actions functionality
-
Gameplay Sketch
10/16/2026 at 04:44 • 0 commentsIn this project log I'll explain a bit about the VIC Dual hardware, the Z80 assembly and my idea of the gameplay. So here's the VIC Dual memory map for the Head On 2:
0000-1fff: 8K ROM c000-c3ff: Cell VRAM c400-c7ff: Free RAM c800-cfff: Tile VRAM
In theory the hardware supports up to 16K ROM (which the range would be 0000-3fff), but the Head On 2 ROMs only uses 8K ROM, plus a PROM of 32 bytes to define the palette. The cell VRAM determines the position where the bitmap is displayed, the tile VRAM determines the bitmap shape itself, and the free RAM is used to store the variables.
For the input ports, there is a joystick with 4 ways (up, down, left and right), a main button, 1 player and 2 player start, and a coin input. When you insert a coin the CPU is reset, so you have to assert the coin status and then read the coin input.
The arcade hardware uses the Z80 CPU, it offers multiple improvements compared to 8080 such as extra opcodes, IX and IY index registers, and shadow registers which can be used as an alternative for pushing and popping registers.
For storing the strings I'm using a length-prefixed format (like a Pascal string), which prefixes the string with a length, followed by the string itself, that's because I have more space in ROM and I'm using different colors for the letters.
My idea of the gameplay is to have a grid with a cursor to select the block, removing it and adjacent blocks if are the same type, using the flood fill algorithm. There would be a score, a time bonus which decrements each second, the current level number, and the powerups count.
So far here's the display of what I currently have, I need to find a way of how to implement the flood fill algorithm in Z80 assembly, a win/lose condition, the powerups functionality and other things:
![]()
-
Color Display and Input Ports
10/10/2026 at 23:56 • 0 commentsSo in the last few days I was implementing the text bitmap to show correctly on the landscape orientation, and figuring out how to read the coin port and input ports. For the color display, with a 256x224 resolution, I'm using a 8x8 basic font with no scrolling and no sprites, this means the text resolution is 32x28.
It was a hassle to read the coin port, I had to disassemble the Head On 2 ROMs to figure it out, when you input a coin the arcade system is reset but the memory isn't cleared, so basically it's a warm boot.
For the coin port first you need to check if the arcade system was cold or warm booted, then after a warm boot you need to assert the coin status, wait a set period, then read the coin port in 0x08 and mask the bit with AND 0b10000000.
For the arcade button ports it was easier, you just need to read the input port, mask the bit with the AND opcode and check the bit. For example, to read the 1 player button you read the button port in 0x01 and mask the bit with AND 0b00000001.
I have a Makefile to assemble the code, split the generated binary into eight files of 1024 bytes, rename the files to the correct names, and replacing the Head On 2 ROMs to run later on MAME.
Showing the color display and reading input ports
-
Another RetroChallenge in This Year
10/02/2026 at 23:57 • 0 commentsNow that the RetroChallenge has started I'll explain what I'll do in October, involving the Sega VIC Dual hardware, a puzzle game targetting it and the Z80 assembly code.
About the specifications, the VIC Dual system is a color arcade hardware, has a 256x224 display and the orientation can be landscape or portrait, and some color games which run on it are Carnival, Tranquillizer Gun, Borderline, Pulsar, Head On, Head On 2, and others.
One highlight I like to make is Head On, which has a "eat-the-dots" gameplay one year before Pac-Man. I'll use the Head On 2, a landscape color game to run my assembled output by replacing the ROM binaries.
![]()
Head On 2 game running on MAME
For the game that I'll develop later on, it's a puzzle game called SameGame, it was created by Kuniaki "Morisuke" Moribe under the name CHAIN SHOT in 1985, it's played on a rectangular field with blocks placed at random, and the goal is to remove as many blocks as possible by selecting a group of two or more. I'll base it on the Flash game version by Jussi Kari, which contains power-ups:
![]()
Samegame Flash version running on Ruffle
The Sega VIC Dual system uses the Zilog Z80 CPU, so I'll use the same zasm assembler which I used last year. I think the Z80 assembly is a great assembly to work on, with extra opcodes available compared to the 8080 assembly.
For running it I'll use the same strategy as last year, which is assembling the code, split it into eight files of 1024 bytes, and replace the Head On 2 ROMs with the custom ROMS, that means I have 8K ROM size to work on.
To start working on the hardware I executed two test ROMs on MAME from the 8bitworkshop website, one example tests the color display and another tests the VRAM tiles (the outputs are rotated because the test ROMs were designed for portrait output):
![]()
Testing the color display (Source)
![]()
Testing the VRAM tiles (Source)
So for the conclustion this project is kinda a follow up from the previous year which I worked too on an arcade hardware, the difference is that instead of a black & white display I'll work on a color display, and instead of 8080 assembly I'll work on Z80 assembly which means there's extra opcodes available.
PS: I couldn't upload the images directly with the image button when creating a project log, so a workaround was to upload the images as files and getting the link location.
Louis Paul



