Articles

6502, 6522, hex keypad, joystick, and opening snapshot files all working

Progress on CPU and 6522 emulation, keypad and joystick input, snapshot files and experimental graphics.

Microtan 65 emulator showing the International Space Invaders game title screen

I got to the bottom of the PRINT ERROR: it thought that it had a serial port attached and tried to talk to it. I’ve currently set that so that it looks like the chip is missing, which has got rid of the error. I might do something with it later on.

I’ve redesigned a lot of the architecture. It now uses a table to define the hardware:

device_configuration_t system_devices[] =
{
   { keyboard_initialise, NULL,            slot_microtan, 0xbff0, 0x0000, "keyboard"     },
   { display_initialise,  NULL,            slot_microtan, 0x0200, 0xbff0, "main display" },
   { display_initialise,  NULL,            slot_0,        0x8000, 0x0000, "red"          },
   { display_initialise,  NULL,            slot_1,        0x8000, 0x0000, "green"        },
   { display_initialise,  NULL,            slot_2,        0x8000, 0x0000, "blue"         },
   { display_initialise,  NULL,            slot_3,        0x8000, 0x0000, "intensity"    },
   { via_6522_initialise, via_6522_reset,  slot_tanex,    0xbfc0, 0x0000, NULL           },
   { via_6522_initialise, via_6522_reset,  slot_tanex,    0xbfe0, 0x0000, NULL           },
   { serial_initialise,   serial_reset,    slot_tanex,    0xbfd0, 0xbfd3, NULL           },
   { eprom_initialise,    NULL,            slot_microtan, 0xc000, 0x0000, "microtan.rom" },
   { cpu_6502_initialise, cpu_6502_reset,  slot_microtan, 0x0000, 0x0000, NULL           },
   { NULL, NULL, 0, 0, 0, NULL }
};

I’ve mapped the cursor keys, left Shift, left Ctrl and Space to bits on the first 6522’s A port, which is where I used to plug in a joystick to play most games, and that works. I’ve done something similar with the hex keypad (Berzerk uses that). In hex-keypad mode, it maps those keys to buttons on the keypad in a similar arrangement.

I’ve got to do the AY-8910 next, but I got a bit sidetracked by working on a “GPU”. The hi-res graphics are very slow to use on the Microtan, so I’m working on fixing that with an extended hi-res graphics “card”.

Microtan 65 emulator showing International Space Invaders with a help panel and alien graphics
Computing Today/Everyday Electronics International Space Invaders game with basic help.