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
//! The console's own I/O: the controller ports and OAM DMA.
//!
//! Everything on the NES motherboard that is neither the CPU, the PPU, the APU
//! nor the cartridge. It is a short list, because there is very little else:
//!
//! | Module | Class | Decodes |
//! | --- | --- | --- |
//! | [`input`] | `nes.ports` | `$4016`/`$4017` โ the two controller ports |
//! | [`dma`] | `nes.oamdma` | `$4014` โ the sprite DMA unit |
//!
//! Both sit inside the RP2A03 package alongside the CPU and the APU, but
//! neither is part of either: `$4016` is a latch and two shift registers driven
//! straight off the connector pins, and `$4014` is a small state machine that
//! borrows the bus. Modelling them as their own devices is what lets a machine
//! description map exactly the bytes each one decodes โ see
//! [`crate::dev::apu::WINDOWS`], which leaves precisely those holes.
//!
//! Source: the NESdev wiki, [Standard
//! controller](https://www.nesdev.org/wiki/Standard_controller),
//! [Controller port registers](https://www.nesdev.org/wiki/Controller_port_registers),
//! [Input devices](https://www.nesdev.org/wiki/Input_devices) and
//! [DMA](https://www.nesdev.org/wiki/DMA). Clean-room throughout: no emulator
//! source was consulted for either.
//!
//! # `no_std`
//!
//! `no_std + alloc`, no dependencies, no `unsafe`.
pub use ;
pub use ;
use crateResult;
/// Add every class in this module to a registry.
///
/// Registration is explicit per feature rather than link-time magic
/// (`ROADMAP.md` ยง4.4); one call per module keeps
/// [`catalog`](crate::machine::catalog) to a line.
///
/// # Errors
///
/// [`crate::Error::Config`] if a class name is already taken.
/// Bind every class in this module into the machine graph.
///
/// # Errors
///
/// [`crate::Error::Config`] if a class name is already bound.
/// What the validator should know about this module's classes.