Skip to content
Phosphoricwiki
Contents

Phosphoric for beginners

Never heard of the Oric, or of cycle-level emulation? Here, in a few minutes, is what Phosphoric does and why it bothers to count every microsecond.

On this page

1. A 1983 computer in a window

The Oric-1 (1983) and the Oric Atmos (1984) are 8-bit home computers from the British company Tangerine, very widespread in France. They plugged into the television; they started on a BASIC in ROM, and programs were loaded from an audio tape, then from a floppy disk.

An emulator is a program that pretends to be that machine. It reproduces each of its chips in software: the processor, the memory, the chip that draws the picture, the one that makes the sound. Give it the original ROMs, and the software of the time runs as on the real machine.

Atmos start-up screen: ORIC EXTENDED BASIC V1.1, © 1983 TANGERINE, 37631 BYTES FREE, Ready, black on a white background
The Atmos starting in Phosphoric: the original BASIC 1.1 ROM, as is.

2. Why count cycles

The Oric’s processor, a 6502, moves to the beat of a clock: one million cycles per second. On each cycle it does exactly one thing on its bus, read or write a byte. Meanwhile the other chips move too: the video chip reads the screen in memory, the timers count, the sound is made.

Many emulators simplify: they run a whole instruction at once, then catch up with the rest. That is fine for most programs. But some rely on the exact moment of an access: a demo that changes colour in the middle of a screen line, a game that plays a sampled sound, a serial port driver. For them, “roughly” is not enough.

Phosphoric is cycle-stepped: a single master clock moves the whole machine forward one cycle at a time, always in the same order.

One machine cycle, in orderEach call to emu_cycle() gives the whole machine one cycle of one microsecond, in a fixed order: first the 6502's single bus access, then the peripherals clocked by φ2 move one cycle forward, and finally the ULA reads the screen cell of that same cycle. A processor write at cycle c is therefore seen by cell c; until 2.0.1, the reverse order shifted every split one cell to the right.One cycle = 1 µs = one call to emu_cycle()start of the cyclenext cycle① 6502the cycle's singlebus access: read,write or dummy access② φ2 peripheralsVIA, FDC, ACIA, tape,cards: moved forwardby exactly one cycle③ ULAreads one 6-pixel cell(the cycle's column),then advances the scanA 6502 write at cycle c is seen by cell c, not c + 1.The order comes from oscilloscope measurements on a real machine, published in a ULA guide.Never an empty call: each call costs the processor exactly one cycle.
Within one cycle: the 6502 makes its access, the peripherals move one cycle forward, then the ULA reads that cycle’s screen cell.

3. Saying exactly what is true

Until September 2026, the project announced a cycle-level accuracy that it did not have in the strict sense: an audit showed it. Phosphoric then adopted a four-level accuracy scale, where each level is proved by a test that would make it fall, and rebuilt its core to reach it.

Today, what it claims:

  • the processor is exact to the cycle: 100% exact bus sequences on 2,440,000 test cases;
  • the machine is cycle-stepped: everything moves one cycle at a time, never in batches;
  • what remains approximate is stated, component by component. For example, the floppy controller waits for fixed delays instead of following the rotation of the disk.

The details are in Accuracy, word by word.

4. What you can do with it

  • Play and program: BASIC 1.0 (Oric-1) or 1.1 (Atmos), .tap tapes, .dsk floppies with Sedoric, joystick, printer, and a QWERTY or AZERTY keyboard.
  • Plug in period cards: the Microdisc and Jasmin floppy controllers, a Minitel modem, MIDI interfaces, speech synthesis.
  • Try new cards: the LOCI cartridge, and the ULA-NG, an extended video chip designed for a future FPGA circuit.
  • Debug a 6502 program: breakpoints, single-stepping, going back, and even gdb or VS Code attached to the emulated Oric.
  • Automate: with no display, Phosphoric loads a program, types on the keyboard, takes screenshots and records the sound. That is how the pictures in this wiki were made.

5. Where to find it

Phosphoric is free software (EUPL 1.2 licence). It builds on Linux, Windows and macOS, and there is a WebAssembly version that runs in a browser with nothing to install. Downloads and source code are on the main site.

In short

QuestionShort answer
What is it?An emulator of the Oric-1 and the Atmos, written in C11.
What is special about it?The whole machine moves one cycle at a time; the 6502 is exact to the cycle.
On what?Linux, Windows, macOS, and the browser (WebAssembly).
Are the ROMs included?No: put basic10.rom and basic11b.rom in roms/.
And next?See The emulated Oric and Where Phosphoric stands.

Technical words are explained in the glossary.

Sources in the repository : README.md, docs/ACCURACY.md, docs/articles/v2-cycle-stepped.md.