1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
//! The Apple 1 (1976): a 6502, some RAM, one PIA, and a monitor ROM.
//!
//! The smallest complete machine rsemu can run, and the first one a person can
//! interact with. There is no video timing to model and no sound at all: the
//! whole of the machine's I/O is four registers of an MC6821, with a
//! keyboard on one port and a 40x24 character terminal on the other.
//!
//! | Module | Covers |
//! | --- | --- |
//! | [`pia`] | the MC6821 at `$D010-$D013`, keyboard and display |
//! | [`rom`] | the 256-byte monitor ROM socket at `$FF00` |
//! | [`monitor`] | RSMON, rsemu's own 256-byte monitor ROM |
//!
//! # The machine
//!
//! `machines/apple1.machine` puts it together; `docs/platforms/apple1.md` is
//! the guided tour. In short:
//!
//! ```text
//! $0000-$0FFF 4 KiB of RAM
//! $D010-$D01F the PIA, four registers repeated four times
//! $FF00-$FFFF the monitor ROM, vectors included
//! ```
//!
//! ```console
//! $ rsemu run apple1
//! RSMON
//! >FF00
//! FF00: D8 A2 FF 9A A9 7F 8D 12
//! >
//! ```
//!
//! # Provenance
//!
//! Everything here is written from hardware documentation — the MC6821 data
//! sheet and the Apple 1 hardware write-ups cited in [`pia`] — and the ROM in
//! [`monitor`] is rsemu's own. The Woz Monitor is *not* vendored: its copyright
//! status is unclear, so it is fetched, never committed, exactly like every
//! other conformance corpus (`CLAUDE.md`, and
//! `docs/testing/conformance-suites.md`).
// The machine-level tests need a 6502 to run on, so they come with
// `machine-apple1` rather than with the device alone.
pub use ;
pub use Pia;
pub use MonitorRom;
/// Add every Apple 1 class to a registry.
///
/// # Errors
///
/// [`Error::Config`](crate::core::Error::Config) if a name is already claimed.
/// Bind every Apple 1 class into the machine graph.
///
/// # Errors
///
/// As [`register`].
/// Every Apple 1 class's validator schema.