Close

Color Display and Input Ports

A project log for Samegame (VIC Dual)

A puzzle game which runs on VIC Dual hardware

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

Discussions