A parallel terminal based on Arduino is used for development purposes and will be replaced by an UART card.
#### Keyboard controller
Pat80 features a blue-switches mechanical matrix keyboard, seen by the system as a memory area in I/O space. The keyboard doesn't use interrupts and is polled by the OS.
#### Video controller
The monochrome 368x248 pixels video output is software-generated by an ATMega 1284 MCU. The timings are generated by the MCU's 16 bit internal timer and the vertical sync time is used to update the framebuffer.
## Software
The OS is a simple Memory Monitor. It can show memory content in hex and ascii with the typical hex editor tabular view.
Programs can be loaded from the keyboard, writing Z80 opcodes and data in hex. The program can be executed from any ram position and the Memory Monitor can be brought to screen in any moment issuing an INT signal (the Z80 INT pin should be connected to a button with pull-up resistor).
There is an experimental and unfinished quick load function using a python terminal to load a binary file directly to memory and execute it.
The pat80 memory monitor (the os) can be run in a z80 emulator. This repository contains an emulator as submodule, already set up to run the os.
To try it, head to `pat80-computer/software/z80-assembly/os/Makefile` and run `make run` to build the rom from assembly and start the emulator. You will see some windows showing the emulated computer's memory and register status and the pat80 memory monitor prompt.
- Arduino parallel terminal with its own Python companion script (or any UART terminal)
The only fully working configuration as now is the Core board with two devices hooked to its I/O bus: the Arduino Parallel Terminal (see `pat80-io-devices/parallel-terminal` and `pat80-computer/software/z80-assembly/os/drivers/arduino_terminal.asm`) and the SN76489 sound chip (see `pat80-computer/software/z80-assembly/os/drivers/hd44780.asm`)
### Partially working
The keyboard is only partially tested, as it's not completed.
The composite video card is partially working, but has some nasty bugs on text cursor positioning and the graphics mode is not yet implemented (the only way to output graphics ATM is to place the bitmap in the MCU flash and load it to VRAM manually).