Expand description
A Rust PC Engine CD-ROM² / Super CD-ROM² / Arcade Card, transcribed from
pcenginecd-python at v0.1.0 (5fec99e) as
an add-on to pcengine-rust: the System Card in the HuCard
slot, the CD unit on the expansion port, through the base board’s socket traits and nothing
copied from it.
Each module is the transcription of the pcenginecd_python module of the same name, with
every named switch as a field with the reference’s default; where Rust forced a difference
the module header says so. disc is the one module designed for the browser: the sector
store is a trait and the cue sheet is parsed from text.
use pcenginecd_rust::board::{self, PcEngineCd};
use pcenginecd_rust::disc::Disc;
let system_card = vec![0xEAu8; 256 * 1024]; // the BIOS image (bring your own)
let disc = Disc::from_memory(vec![(true, vec![0u8; 2352 * 16])]).unwrap();
let mut machine = PcEngineCd::new(&system_card, Some(disc));
machine.arcade_card = true;
let mut system = machine.build().unwrap();
system.run_frame();
let _samples = system.board_mut().take_audio(); // PSG + CD audio + ADPCM, 44.1 kHz
let _backup: Vec<u8> = board::unit(system.board_mut()).unwrap().bram().to_vec();Re-exports§
pub use arcade::ArcadeCard;pub use board::PcEngineCd;pub use disc::Disc;pub use disc::Track;pub use syscard::SystemCard;pub use unit::CdUnit;pub use pcengine_rust;
Modules§
- adpcm
- The ADPCM unit: 64 KiB of RAM, its pointers, the MSM5205 decoder and the audio source
(
adpcm.py). - arcade
- The Arcade Card: 2 MiB of RAM behind four address ports, and a 32-bit shift/rotate unit
(
arcade.py). - board
- The CD-ROM² / Super CD-ROM² machine: the base board plus a System Card and a CD unit
(
board.py). - cdda
- CD-DA: the audio player behind
AUDIO START/END/PAUSE,READ SUBQ,$1805-$1806and the audio source the board mixes (cdda.py). - disc
- The disc: a track table and sectors (
disc.py). - scsi
- The drive’s SCSI-class controller: bus signals, phases, the REQ/ACK handshake, the commands
(
scsi.py). - seek
- Seek time between two sectors, from Dave Shadoff’s measurements on re-capped original
hardware (
seek.py; hisseektime.candmeasurements/, MIT: see NOTICE.md). Tier 3: measured by a person who published the method, not a manufacturer; resolution is one VSYNC (1/60 s). - syscard
- The System Card: a HuCard holding the BIOS, and on a Super System Card 192 KiB more RAM
(
syscard.py). - trace
- The lockstep gate’s side of this crate: how a traced CD machine is built from a command line, and a frame’s line.
- unit
- The CD unit: the expansion-port device that owns
$1800-$18FF, CD RAM and the backup RAM (unit.py).