• Gameplay Sketch

    Louis Paul • 13 hours ago • 0 comments

    In 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

    Louis Paul • 6 days ago • 0 comments

    So 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

    Louis Paul • 10/02/2026 at 23:57 • 0 comments

    Now 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.