Close

Gameplay Sketch

A project log for Samegame (VIC Dual)

A puzzle game which runs on VIC Dual hardware

louis-paulLouis 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:

Discussions