Skip to content
Phosphoricwiki
Contents

Phosphoric

An emulator of the Oric-1 and the Atmos, Tangerine's 8-bit computers (1983). It is written in C11 and cycle-stepped: a master clock moves the whole machine forward one microsecond at a time. Its 6502 core is exact to the cycle, checked on 2,440,000 cases. It runs on Linux, Windows and macOS, and in the browser.

  • 100%exact bus sequences for the 6502, on the 2,440,000 cases of the 65x02 oracle
  • 1 cycleper call of the master clock: CPU, peripherals and ULA move together
  • 70 suitesof tests, 1,362 checks, all green
  • 3%of a 20 ms frame budget: the cost of going cycle by cycle
Screen full of colour diagonals: 16 colours on 320 × 224 pixels, rendered by Phosphoric's ULA-NG
The ULA-NG, Phosphoric’s “next generation” ULA, in chunky mode: 320 × 224 pixels in 16 colours. Screenshot taken by the emulator itself, with no display.
The machine Phosphoric emulates, and what surrounds itA MOS 6502 processor at 1 MHz and 64 KB of memory (48 KB of RAM, 16 KB of BASIC ROM) share a bus. On this bus: the VIA 6522 (keyboard, tape, printer, interrupts), the ULA (the picture), the AY-3-8912 PSG (sound, and part of the keyboard) and page 3, where expansion cards plug in. On the right, the host: SDL2 window, browser, or no display. At the bottom, the master clock moves the whole machine one cycle at a time.6502MOS 6502 NMOS · 1 MHz64 KB memory48 KB RAM · 16 KB ROMaddress and data busVIA 6522ports and timerskeyboard (8 × 8 matrix)tape, printerinterruptsULAHCS 10017 · the picture40 × 28 text240 × 200 HIRES8 colours, PALPSGAY-3-8912 · sound3 voices and noise16 envelopesport A: keyboardPage 3$0300-$03FFMicrodisc, Jasmin, LOCIACIA, DTL 2000, MIDIspeech, ULA-NGHostSDL2: picture, sound,keyboard, gamepadWebAssemblyno displayscreenshots, AVI, WAVHTTP API, --controlGDB serverMaster clock: emu_cycle() moves the whole machine one cycle (CPU, then φ2, then ULA)
The emulated machine: a 6502, 64 KB of memory, the VIA, the ULA, the PSG and page 3 for expansion cards. Everything moves to the beat of a single clock.

Where to start

Downloads, source code and the project’s articles are on the main site: tachibana.eu/en/phosphoric.