Home /Modules/cpu/CIRCUIT.md

CIRCUIT.md

lib/cpu/6502/CIRCUIT.md · 62 line(s) · markdown

6502 Circuit Model

Scope

This document describes the architectural circuit blocks that SLeeLa can model reliably. It is not a transistor-for-transistor recreation.

Major blocks

  1. Register section
    • A accumulator
    • X and Y index registers
    • S stack pointer
    • PC high/low
    • status register
  1. ALU
    • arithmetic;
    • logic;
    • shifts/rotates;
    • flag generation.
  1. Address path
    • low/high address components;
    • address latches;
    • effective-address formation.
  1. Data path
    • data latch;
    • internal data movement;
    • external data bus buffer.
  1. Control
    • instruction register;
    • instruction decode;
    • PLA/control logic;
    • timing control;
    • interrupt logic.
  1. Clock
    • clock input;
    • phi1/phi2 phase sequencing.

Internal buses

The 6502 analysis literature identifies internal buses and latches such as:

SLeeLa represents these as couplers or internal timing channels only when needed by a specific simulation.

Accuracy boundary

Gate-level or transistor-level work should be added only from sufficiently reliable die analysis or a validated hardware recreation. The MAME 6502 implementation specifically targets exact bus-cycle behavior and has been compared against gate-level simulation, making it useful as a behavioral/timing reference.

Sources: