Aqua – Hackster.io
Aqua turns the underpowered Mattel Aquarius into a respectable computer by adding 32KB of RAM and SD card mass storage.
The Mattel Aquarius home computer was released in June 1983 and had already been discontinued in October of the same year. The short lifespan of this machine is not a big surprise since it is equipped with 4 KB of RAM, which reduces to 1.7 KB of free RAM after taking into account reserved video memory and system variables. . It also has a terrible rubber chiclet keyboard that isn’t big enough for adult hands. But despite these flaws (and many more!), beyond reason, I still love this computer, so I wanted to give mine a little help. Adding an additional 32KB of memory makes it much more usable, and the SD card reader allows me to write software on a modern machine and then easily load it onto the Aquarius, meaning I don’t have not trying to type long programs. on its ugly keyboard (or use the cassette port, which is slow and fails more than it succeeds).How it works
The Aqua circuit board (KiCad files here) is designed to plug into the cartridge port of the Aquarius. It has a 32K SRAM chip and logic chips to map it into 32K addresses above on-board memory ($4,000 – BFFF). It also features a pin header that allows easy access to the cartridge port connectors. These are very useful because the computer offers virtually no other expansion options, and the cartridge port provides direct, unbuffered access to the address and data bus, and virtually all other signals on the Z80.
Aqua brings the Aquarius closer to being in the same league as other contemporary computers, but there’s still no decent way to load programs onto it – and using the computer keyboard to type them is a terrible experience . So I built AquaWrite, which connects to Aqua’s pin header, to load programs/data into memory on the Aquarius from an SD card. Using AquaWrite, it is possible to write and assemble programs on a modern computer, and then write the machine code, as a newline-delimited sequence of bytes, to a text file. This map can be inserted into AquaWrite and loaded into memory in seconds.
AquaWrite (KiCad files here) uses an Arduino Mega 2560 (Arduino code here) to manage access to the SD card and the writing of this data to a dual-port 1 KB SRAM chip. This SRAM chip is mapped to addresses $FC00-$FFFF and is used to transfer programs from any which size to lower memory addresses in 1KB pages. The Arduino first writes a small program (20 bytes) in machine code to SRAM and then the next 1004 bytes to transfer. When ready, the user is prompted to run a
USR call that executes machine code and transfers bytes to a lower memory address. This method is used because the Aquarius prevents access to addresses in the range of this SRAM from BASIC. If the data to be transferred exceeds 1004 bytes, the user presses a button on AquaWrite to load each additional segment, then executes again
USR to move the data to the next set of memory addresses. Any size program (up to the memory limits of the Aquarius) can be loaded this way.
It’s a little more complicated because the Aquarius uses an early form of copy protection for external devices (anything not onboard the stock computer). A PLA sits between the Z80 and the address bus which XOR addresses with a software lock code (initialized to a random value on startup), which would scramble all values loaded via SD. Thus, before using AquaWrite for the first time after startup, a sequence of commands must be executed to disable this software lock:
10 print 1
This (temporarily) moves the stack and other system variables to onboard memory (before the lock code is changed and they get scrambled), then runs a simple program that writes a
0 to the I/O port at $FF which stores the software lock code. Since the data is encoded/decoded by XORing with the lock code, setting this code to
0 effectively turns it off – the result is still the same as the initial value.
The Aqua board, which adds 32 KB of SRAM and breaks out the cartridge port connectors to a pin connector for easy access:
AquaWrite, which allows data to be loaded from an SD card into Aquarius RAM:Nomenclature
- Aquatic PCB (KiCad files here)
- 1 x 32 KB SRAM chip
- 1x 74LS00
- 1x 74LS86
- 1x 74LS04
- 4 x 0.1uF ceramic capacitors
- 1 x 1000uF electrolytic capacitor
- 2 x 10mm M3 spacers
- 2 x 15mm M3 spacers
- 44 male pin connectors
- 1 x CY7C130-55PC 1KB Dual Port SRAM
- 1x 74LS682
- 1x 74LS32
- 1 x Arduino Mega 2560
- 1 x SD Card Breakout Board
- 1 x 0.1uF ceramic capacitor
- 1 x 47uF electrolytic capacitor
- 1 resistor of 10K ohms
- 1x push button