Creating a drawing program for the Sinclair ZX80 or ZX81, two pioneering personal computers from the early 1980s, presents a unique set of challenges and limitations owing to their hardware specifications. Both machines were designed with very basic computing power and a limited graphical display capability. The ZX80 comes with a 1K of RAM, expandable to 16K, and a monochrome display, while the ZX81 originally came with 1K of RAM as well, but it was more commonly expanded up to 16K. Both machines feature a Z80 microprocessor.
Here is an outline of the features and capabilities you could expect from a basic drawing program tailored to these constraints:
Display and Graphics
- Monochrome Graphics: Both computers support a monochrome display. Any drawing program would therefore be limited to black and white graphics.
- Character-Based Graphics: The ZX81, in particular, uses a character-based display, which means graphics would be built from a set of predefined character glyphs - essentially making the drawing program a manipulation of these characters to create images.
- Pixel Manipulation (on the ZX81): Although primarily character-based, it's possible to manipulate individual pixels on the ZX81 by poking data directly into the video memory. This would allow for more precise drawing but at a cost of complexity and memory usage.
Memory Constraints
- Limited Storage for Drawings: Given the 1K (expandable to 16K) RAM limitation, any drawings would need to be very simple, and the program would have space for only a few drawings in memory at a time.
- Efficient Coding: The program itself would need to be extremely efficient, using as little memory as possible to leave room for user-created content.
Input
- ZX80 and ZX81 Keyboard: The flat, membrane keyboard would be used for input. You could implement a system where different keys correspond to different drawing functions or shapes.
- Simple Drawing Commands: The interface would likely be text-based commands for drawing shapes, lines, or setting/clearing pixels.
Drawing Features
- Line Drawing: Basic functionality would include drawing straight lines from one point to another.
- Shapes: Circles and rectangles could be provided as predefined shapes that the user can place on the screen.
- Freehand Drawing: Depending on memory and processing constraints, you could attempt a rudimentary freehand mode, essentially allowing plotting of pixels in sequences by moving a cursor around.
- Erasing/Editing: Functionality to remove or overwrite parts of the drawing.
Saving and Loading
- Cassette Tape Storage: Both machines typically used cassette tapes for external storage, so any save or load functionality would involve outputting or reading data with audio tones.
- Limited File Management: Users could save their creations to tape but would face very basic file management capabilities, likely limited to saving a single drawing or a predefined set of drawings due to the system's limitations.
Creating such a program would require a deep understanding of the ZX80's and ZX81's hardware, including how to control memory directly and manipulate the display at a low level. It would be a challenging but rewarding project for enthusiasts of retro computing.