This is a ZX81 emulator written in perl. It consists of 4 main components.
- 1 Z80.pm The Z80 CPU emulator.
-
This module emulates the Z80 CPU. It contains variables for the Z80 registers and executes operations based on the received input.
The
run()
subroutine is continuously called by an external driver.The supplied
tick()
subroutine is called on each cpu cycle. - 2 TV.pm The display module.
-
This module is responsible for emulating the display. It uses OpenGL to render the screen. An external controller calls the
vert()
,horiz()
, anddata()
methods to simulate a television. - 3 Keyboard.pm The keyboard module.
-
This module is responsible for listening for keyboard input. The
next_key()
method returns a structure that reflects the keystroke. - 4 ZX81.pm The ZX81 emulator.
-
This module is the main ZX81 controller. It contains the RAM and ROM.