Chris Collins

Tools · retro

Jupiter Ace emulator and Forth workbench

The Jupiter Ace — the 1982 home computer that booted into Forth — in your browser on its own ROM: type Forth through its line editor, watch the dictionary grow, call Z80 code from Forth with a debugger, and load and save .TAP tapes and .ACE snapshots.

Added

How to use it

The Jupiter Ace was built in 1982 by Jupiter Cantab, the company Richard Altwasser and Steven Vickers set up after working on the ZX Spectrum. It looks like a white ZX81, but where every other home computer started in BASIC, the Ace started in Forth, from an 8K ROM. This page runs that ROM on an emulated Ace: a Z80 at 3.25 MHz, the 32×24 character screen drawn from video RAM through a character set you can redefine, the beeper, and 3K, 19K or 51K of memory.

Press Power on (or run anything) and the Ace boots to its cursor on the bottom line. Click the screen to give it the keyboard, and type 2 2 + . and Enter.

How to use it

Forth tab. Pick an example — words and loops, redefined-character graphics, BEEP music, a small game (Dodge), floating point, PLOT — and press Type into the Ace. The page presses the Ace’s keys for you, one line at a time, through the ROM’s own line editor, and waits for each line to finish. If the Ace rejects a line (an ERROR n, or a word it doesn’t know, which it leaves on the input line marked with ?), typing stops there and the editor jumps to that line. Then type the example’s word (the Run button does it). You can also paste text onto the screen.

Dictionary. The panel beside the screen walks the Ace’s dictionary in memory, newest word first: each word’s name, code-field address and length, and whether it’s IMMEDIATE. Click a word of yours to LIST it (the Ace decompiles it back to source), EDIT it, run it, look at it in memory, or FORGET it. The Forth data stack is shown underneath.

Z80 code & debug. Write Z80 assembly, and Assemble & run puts it in memory and types 24576 CALL (or the call you give) into Forth. A routine returns to Forth with JP (IY); RST $08 prints the character in A, RST $10 pushes DE onto the Forth stack and RST $18 pops it. Breakpoints, step, step over, step out, registers, the Z80 and Forth stacks, disassembly and a memory editor work as on the ZX Spectrum page, whose assembler this is. Build .TAP makes a bytes file to load on an Ace with 0 0 BLOAD CODE.

Tape & snapshots. Open a .TAP (the Ace format used by xAce and EightyOne: a header block and a data block per file) and the page types LOAD name for you. SAVE name and addr len BSAVE name are captured and can be downloaded as a .TAP. Save .ACE writes a snapshot of the whole machine in the .ACE format that EightyOne, xAce and MAME read, and opening an .ACE file restores one (switching to the RAM size it was saved on).

Ace Forth tab. What’s unusual about the Ace’s Forth: words that keep their source (LIST, EDIT, REDEFINE), comments only inside definitions, SAVE writing your dictionary rather than memory, floating point, true being 1, DEFINER and COMPILER, and the memory map.

Keys: Shift is SHIFT, Ctrl or Alt is SYMBOL SHIFT, Backspace is DELETE, the arrow keys move the cursor, Esc is BREAK, and Caps Lock is the Ace’s CAPS LOCK (which the page turns on at power-on, since Forth words are capitals). On a phone, use the On-screen keyboard.

The share button copies a link with your Forth and assembly text and the memory size; ?example=dodge opens an example and ?ram=3 the unexpanded Ace.

How it works

The machine follows MAME’s jupace driver, xAce, and the circuit study in the pico-jupiter-ace project, checked against the ROM itself in the tests: 208 T-states a line, 312 lines a frame (50.08 Hz), the interrupt held for eight lines, the picture 64 lines after it. The 1K screen and 1K character set appear twice in memory: at $2000/$2800 the CPU gets in at once, at $2400/$2C00 (the copies the ROM uses) it waits while the video circuit is reading, and the emulator models that wait. The character set can’t be read back by the CPU. Any even port is the keyboard (eight half-rows on A8–A15) and the speaker: an IN moves the speaker one way and an OUT the other, which is how BEEP makes its square wave. Tape loading and saving are traps on the ROM’s two block routines ($18A7 and $1820), so files load instantly; there is no cassette signal.

The Z80 core is the site’s own, checked against the FUSE emulator’s test suite.

Browser support

Any current browser. Sound starts after you click the page (browsers don’t play audio before that).

Privacy

Everything runs in your browser; nothing you type, assemble or load leaves it. The ROM is downloaded from this site the first time. Files you open are read locally; a ROM file of your own is kept in this browser’s storage. The Software tab’s "Open URL" box fetches only the link you give it.

ROM

The Ace’s 8K ROM (Forth, © 1982 Jupiter Cantab) is still copyright. It is shipped here, as with every Ace emulator that includes it (xAce, CanAce, EightyOne), on the strength of a 1998 note from Boldfield Computing — which took over Jupiter Cantab’s remaining stock and assets — to the author of xAce: "I am sure nobody is going to get upset about the emulator". The details and the ROM’s checksums are in NOTICE.txt. If you would rather use your own ROM file, the Tape & snapshots tab takes one. The emulator, the examples and the assembler are this site’s own code (MIT).

Runs entirely in your browser; nothing you type leaves this page.