Mattel Aquarius Micro-Expander


micro-expander rear view internal view
uexp circuit
uexp pcb
ay circuit ay pcb


This unit plugs into the Aquarius computer's cartridge port, providing all the functionality of the mini-expander and more! It consists of two main circuit boards. The lower board contains 32k RAM, 16k-64k ROM (16k banks selectable with jumpers) and a CH376 USB module. The upper board hosts the AY-3-8910 PSG and has connectors for joysticks, sound (3.5mm stereo plug), and USB.

Hardware
Firmware
AtariAge: [AQUARIUS] Micro-Expander: RAM, ROM, AY-8910 and more!


files for Download

Eagle PCB files
Source code
USB BASIC V1.0 ROM new
GAL equations and JEDEC file
Sample USB stick files



OSH Park PCBs

Aquarius micro-expander for LC Tech CH376
Aquarius micro-expander audio connector
Aquarius micro-expander AY-3-8910 board


Documentation

updated 2017-07-07

USB Disk Operation


USB memory sticks are accessed via the CH376 "File manage and control" module, which supports MSDOS disks in FAT12, FAT16 and FAT32 format up to 32GB. Operation on the Aquarius is similar to MSDOS, with a few differences.

Filenames follow the MSDOS standard 8+3 name plus extension format (eg. "filename.txt"). Long filenames are not supported. Directory levels are separated with '/' (slash) rather than backslash. Extensions ".BAS", ".CAQ", and ".BIN" are recognized file types. Files with any other extension are assumed to be raw binary.

The path is limited to 35 characters (minimum of 4 directory levels). Files can only be accessed in the current directory (ie. "path/filename" is not a valid filename). You can move between directory levels using CD, which accepts an entire path (eg. "subdir1/subdir2/subdir3"). If the path starts with a '/' then it starts from the root, otherwise it is relative to the current directory. ".." goes up one level. "." is the current directory.

MS Windows uses the '~' (tilde) character to create the short versions of long filenames. Unfortunately the Aquarius keyboard does not have this character, so two methods are provided to type it.When the enhanced line editor is active (blue cursor) typing CTRL-O  will produce '~'. In programs which use the standard line entry routine (black cursor) type '='. This will be translated to '~' before accessing the file.         



Boot Menu

1 = Load ROM
Load and run cartridge ROM file. The file is loaded into the upper 16k RAM, then remapped to cartridge ROM space and the computer rebooted. To clear the memory you must turn the computer off (hitting RESET will simply reboot the cartridge ROM).
A USB stick containing ROM files ("*.ROM") should be inserted before choosing this option.

2 = Debug

Invoke the Z80 debugger. Press '?' for help on debugger commands.

3 = PT3 player

Protracker 3 music player.
A USB stick containing music files ("*.PT3") should be inserted before choosing this option.

RTN = BASIC

Start Aquarius BASIC

CTRL-C = warm boot

Start Aquarious BASIC without clearing memory. NOTE: If memory is corrupted the computer may reboot or hang!

File Requester (used by Load ROM and PT3 Player)
Displays a list of directories and files on the USB stick. Press the number/letter of the file you want. Select a directory to enter it. Select ".." to go back to the previous directory level. Press RTN to exit the file requester.


Enhanced BASIC Command Line

Instead of a black square, the cursor is blue background color. It can be moved over previously typed text on the line with CTRL-P (cursor left) and CTRL-/ (cursor right). The character under the cursor can be deleted with CTRL-<BACKSPACE>.

When a line is entered it is saved in a buffer, which can then be recalled with CTRL-R (retype). This can be used to repeat a command (possibly with changes), or to duplicate a line in a BASIC program (EDIT the line, press RTN, type CTRL-R to recall the line, change the line number, press RTN to enter the new  line).




Extended BASIC commands

CLS

Clear the screen

LOCATE column, row

Move cursor to character location on screen

OUT port, data

Send byte to I/O Port

PSG register, value [, ... ]

Configure AY-3-8910 Programmable Sound Generator

RUN "filename"

Load and RUN a file from the USB disk. File extension is optional. If not provided the OS will first try to load a file with the exact name, then with ".BAS" added, then with ".BIN". eg. RUN "snake" will load and run the BASIC program "SNAKE.BAS" if it exists on the disk.

BASIC programs have the same file format as the CAQ tape files used by Virtual Aquarius. Executable machine code programs start with a 4 byte header which includes the load address. This header is also valid machine code, so the file can be loaded and subsequently executed with CALL <address> or X=USR(X) at the same address.

LOAD "filename" (,*var)

Load BASIC program, numeric array, or binary executable. BASIC programs are tokenized (not plain text) and should use the extension '.BAS' or '.CAQ'. Numeric Arrays use '.CAQ', and the array variable name is identified  with  a '*' (same as when loading from tape, but preceded by a comma). Binary executables should use extension '.BIN', and must have a 4 byte header which specifies the load address.     

LOAD "filename",<address>

Load raw binary file into specified memory location. <address> can be an integer or numeric expression. This will actually load any file, including the file's header if it has one. Use with caution. If the memory at <address> is in use or the file is too big to fit in free memory it may overwrite system variables and crash the computer!

SAVE "filename" (,*var)

Save BASIC program or array  to USB disk.Filename should end with ".BAS" or "CAQ".


SAVE "filename",<address>,<length>

Save raw binary data from specified memory location to disk


CAT


Catalog disk. Compact listing of files and directories on disk


DIR ("<wildcard>")

Detailed directory listing. "<wildcard>" is optional. MSDOS wildcard characters '?' and '*' are used to filter filenames, eg. DIR "*.BAS" shows only filenames ending with ".BAS".


CD "path"

Change directory. "path" is optional. If not provided the current directory is printed on-screen.
Examples:-
CD "/"  go to root directory
CD ".." go up one directory level
CD "." access current directory (use to check that directory is present on current disk)
CD print current path


KILL "filename"

Delete a file from the USB disk


EDIT <line_number>

Edit the specified line in a BASIC program.


CALL <address>

Call a machine code program at <address>


DEBUG

Invoke the machine code debugger


Functions

var = I N (port)

Read I/O Port


var = JOY(stick)

Read joystick. 0 = read both sticks, 1 = stick 1 only, 2 = stick 2 only.


var$ = HEX$(value)

Convert integer to hexadecimal string. String length adjusts to number of bytes. 0-255 = "nn", 256-65535 = "nnnn".


Screenshots

boot menu rom menu debug menu
trace PT3 file requester PT3 player
directory listing



Vintage Computers