# Altair 8800 模擬器

Photorealistic in-browser emulator of the 1975 MITS Altair 8800 front panel
and Intel 8080 CPU. Live site: https://altair8800-web.pages.dev/

## What is modelled

- Intel 8080 CPU (this project’s own compact core, not a third-party port)
- 64K RAM (typical later Altair complement; the first kits shipped with 256 bytes)
- Front-panel operations after the 1975 Operator’s Manual and the
  Display/Control board Theory of Operation:
  - EXAMINE, EXAMINE NEXT
  - DEPOSIT, DEPOSIT NEXT (increment, then write)
  - RUN, STOP, SINGLE STEP, RESET
  - PROTECT / UNPROTECT of the 4K page that holds the current address
  - ON/OFF (down is on; power-off clears memory; power-on fills RAM with
    random bytes)
  - Sense switches A15–A8, readable with `IN 377` (port 0xFF)
- Duty-cycled lamps while running, so programs such as *Kill the Bit* that
  “display” by leaving a value on the address bus are visible
- Built-in demos: *Kill the Bit* (Dean McDaniel, 15 May 1975) and a slower
  address-lamp chaser

No cassette, floppy, serial terminal, or 88-2SIO is included in this version.

## Credits

- Front-panel layout was checked against publicly licensed photographs of
  original 8800 units (Wikimedia Commons and museum collections). Those
  photographs are **not** used as artwork on the panel; the plate is drawn
  in CSS / SVG.
- Operator’s Manual, MITS, 1975; Altair 8800 Theory of Operation
  (Display/Control board: EXAMINE injects a JMP, EXAMINE NEXT a NOP,
  DEPOSIT NEXT is EXAMINE NEXT then DEPOSIT).
- *Kill the Bit* machine code as circulated from Dean McDaniel’s 1975 listing.
- Intel 8080 instruction timings and flag layout follow Intel’s documentation.
  The CPU core in `js/i8080.js` is original work, released as CC0.

## Known inaccuracies

- Machine cycles are approximated (correct official cycle counts and the
  right address/data/status on each access, but not a gate-level Display
  board). EXAMINE is modelled as “load PC from the switches”, not by
  literally injecting `JMP` onto the bus.
- The WO lamp follows the 8080 status bit (active-low write): it is lit
  on reads, which is how most surviving panels appear when stopped.
- CLR does not pulse I/O-device clear lines (there are no I/O devices).
- AUX switches are unwired, as on the basic 8800.
- Memory protect is per 4K page, which matches a typical RAM-card granularity
  rather than every possible board size.
- Single-step executes one instruction (the manual’s wording); some 8080
  cycles are longer than others.
- “SLOW” on the down side of SINGLE STEP appeared on later machines and
  clones, not on the original 8800 silkscreen, and is omitted.
- Clock is a nominal 2 MHz with a speed slider; it is not crystal-accurate
  and will not match every real-world interrupt or wait-state quirk.
- Power-on RAM is random, but not a model of any particular DRAM or static
  chip family.
