Oric-1 and Atmos: emulator, assembler and debugger
An Oric Atmos or Oric-1 (16K or 48K) in your browser — the ULA's 40×28 text and 240×200 HIRES with serial attributes, the 6522 VIA, the AY-3-8912, the keyboard matrix, and .TAP tapes loaded and saved at once through ROM traps. Write 6502 assembly and debug it with breakpoints, stepping, registers, memory and chip views. Load your own BASIC ROM; without it a stub monitor written for this site runs.
Added
How to use it
Press Power on, or just press Assemble & run in the Assembly tab — the Oric starts by itself. Click the screen to give it the keyboard (on a phone, use the on-screen keyboard under the screen). The page has four tabs: Run (the machine, the ROM, tapes, typing, save states), Assembly, Debugger and References.
How to use it
-
Assembly: pick an example — hello world in screen memory, a page of serial attributes, HIRES with a fan of Bresenham lines, a tune on the AY, the keyboard matrix drawn live, a VIA timer stopwatch, a loop that ends in
BRK— or write your own, then Assemble & run (Ctrl+Enter). The Oric is reset, the page waits for BASIC’sReady(and typesCALLfor you) or for the stub’s monitor, puts the code in memory and calls it;RTSreturns. Code goes at$8000unless the source says otherwise ($1000on the 16K Oric-1). Download .TAP saves it as a tape thatCLOAD""loads and runs on a real Oric or another emulator. -
Run: choose the Oric Atmos (BASIC 1.1) or the Oric-1 with 48 KB or 16 KB. Drop a
.TAPfile on the screen or the tape box: with your ROM, the page typesCLOAD""and the file loads at once;CSAVErecords to a tape you can download. Type into the Oric types a listing key by key, faster than real time; the BASIC examples there showHIRES,CIRCLE,DRAW,SOUND,MUSIC,PLAY, serial attributes fromPRINTandPOKE, and machine code poked into page 4 and run withCALL. -
The stub monitor understands
8000(show a byte),8000.801F(dump),8000: A9 01 60(store bytes) and8000G(run). -
Save states keep the whole machine — RAM, CPU, VIA, AY, video mode — in this browser (Quick save) or as a JSON file.
The keyboard: Enter is RETURN, Backspace is DEL, Alt is FUNCT, Ctrl is CTRL (Ctrl+C stops a BASIC program), and F12 is the reset button under the Oric — it is wired to the CPU’s NMI, so BASIC restarts and keeps the program. Power cycle is a cold start.
Presenting
⛶ Present (or F) shows just the Oric screen, filling the window — for a talk or a classroom. The keyboard keeps working; Esc closes it. With Link options → Open in presentation mode and Start automatically, a share link opens full screen and runs the program in the editor.
The hardware, as emulated
-
ULA video: each raster line starts white on black with the standard character set; a screen byte with bits 6 and 5 clear is a serial attribute — ink (
$00–$07), character set ($08–$0F: alternate set, double height, blink), paper ($10–$17) or video mode ($18–$1F: HIRES, 50/60 Hz) — that takes up a cell (shown as paper) and holds to the end of the line. Bit 7 shows any cell inverted. Text is 40×28 at$BB80with the character sets at$B400and$B800; HIRES is 240×200 at$A000with three text lines below and the sets moved to$9800. Lines are drawn as the beam reaches them, so changes mid-frame show. 50 Hz is 312 lines of 64 µs, 60 Hz 264. -
6522 VIA at
$0300: the same VIA as this site’s BBC Micro tool. Timer 1 gives the ROM its 100 Hz interrupt; port A is the AY’s data bus; port B selects the keyboard row (bits 0–2), reads the key-sense line (bit 3) and drives the tape motor; CA2 and CB2, set through the PCR, are the AY’s BC1 and BDIR pins. -
AY-3-8912 at 1 MHz: three tone channels, noise and the envelope, mixed to mono. Its port A drives the keyboard’s columns, so register 7 bit 6 must stay set or the keyboard goes dead.
-
Memory: 48 KB of RAM (16 KB on the small Oric-1, where every address wraps round 16 KB), the 16 KB ROM at
$C000.
The Debugger tab shows registers, the stack, the disassembly with breakpoints, memory and watches, and five chip views: the ULA (mode, beam position, every attribute on the screen), the VIA (ports, timers, PCR decoded as the AY’s bus control, interrupt flags), the AY (periods in Hz, volumes, envelope, mixer), the keyboard matrix (keys held, the selected row, the columns being driven) and the tape. Keys: F5 continue, F6 pause, F11 step, F10 step over, Shift+F11 step out, Ctrl+F10 run to the cursor line.
Tapes
A .TAP file is the bytes the ROM writes, back to back: sync bytes ($16), $24, a header
(type, autorun, end and start addresses), the name, then the data. Like Oricutron, the page
doesn’t play the tape as sound: when BASIC’s tape routines run, the emulator answers them from
the file — the sync search returns at the next $16, read a byte returns the next byte — so
CLOAD is instant, and CSAVE (and STORE on the Atmos) is caught at put a byte and
recorded. The ROM addresses are the ones Oricutron’s patch files give for BASIC 1.0 and 1.1;
the traps check there is an RTS where they expect one, and stay off for a ROM they don’t
know. With the stub firmware, machine-code files on a tape are copied straight into memory and
the first one marked autorun starts.
The ROM
The Oric’s ROMs — BASIC 1.0 for the Oric-1, 1.1 for the Atmos — are copyrighted by Tangerine Computer Systems and Oric Products International (1983–84). Oric passed to Edenspring Investments in 1983, went into receivership in February 1985, was bought by the French company Eureka, and went into receivership for the last time in December 1987. I found no statement from anyone holding those rights allowing the ROMs to be shared (some emulators bundle them anyway; others, like pico-oric, leave them out for this reason). So none are included. Instead this page builds its own firmware with the site’s 6502 assembler (the source is on the References tab, MIT licence): it sets up the VIA’s 100 Hz timer, the AY and both character sets as the ROM does, scans the keyboard matrix from the interrupt, prints with scrolling, and runs a hex monitor. The font is the public-domain X11 misc-fixed 5×8; the alternate set is drawn as 2×3 blocks. Without BASIC the BASIC examples can’t run, but every assembly example does — they talk to the hardware directly, so they run the same with the real ROM.
If you own an Oric, Load my ROM file… takes a 16 KB dump (basic11b.rom, basic10.rom). It
is kept in this browser’s IndexedDB and never leaves it.
Limits
-
The CPU runs instruction by instruction with the documented cycle counts, and the VIA and the beam advance after each instruction, not cycle by cycle.
-
Tapes load only through the ROM traps: there is no real-speed loading from the tape signal, so turbo loaders and protected tapes that bypass the ROM won’t load.
.TAPonly (no.ORTor.WAV). No Microdisc or Jasmin disk drives, printer or joystick interfaces. -
Save states are this page’s own format; Oricutron’s
.snasnapshots aren’t read. -
The AY is mixed to mono, and its envelope uses 32 steps (as a YM2149 does) rather than 16.
-
I have tested the stub firmware and the hardware in detail, but not a real BASIC ROM: there isn’t one I can use. The tests boot it to
Ready, run a program andCLOADa tape whenORIC_ROMSpoints at a folder with the dumps.
Linking to an example
Links can be written by hand. Settings not in the link keep their defaults.
| Parameter | Meaning | Example |
|---|---|---|
|
Tab: |
|
|
Example program: |
|
|
|
|
|
Open the screen full-window and run the program |
|
For example: ?mode=asm&example=hires&autostart=1
(HIRES lines), ?mode=asm&example=attrs (serial
attributes), ?mode=asm&example=sound. Share links
never carry tapes or ROMs.
Feedback is a gift. Something to improve, a feature to add, or a bug? Tell me.
Runs entirely in your browser; nothing you type leaves this page.