Skip to main content
← PSoXide SDK guides and examples · SDK f2fec1c301f1 · All Cargo features enabled; check feature gates before use.

Crate psx_io

Crate psx_io 

Source
Expand description

Volatile MMIO primitives.

The lowest layer of the SDK. Wraps core::ptr::read_volatile / write_volatile in zero-overhead helpers that each peripheral module builds on. Keeping these centralised means we can audit every MMIO touchpoint in one file.

All functions here are #[inline(always)] and unsafe – they accept arbitrary addresses and widths. Higher-level SDK crates present safe APIs on top of these.

Modules§

cd
CD-ROM drive: commands, responses, sector polling, CD-DA playback in audio, XA-ADPCM music in xa and polled data-sector reads in reader.
cdda
Renamed to crate::cd::audio.
cdrom
Renamed to crate::cd.
controller_port
The controller and memory-card port: one serial transport shared by every driver on it.
disc_base
Where this program’s data sits on the disc it was booted from.
dma
DMA controller.
gpu
GPU MMIO: GP0, GP1, GPUREAD, GPUSTAT.
irq
Interrupt controller: pending and enabled sources.
periph
Zero-size ownership tokens for peripherals with shared state.
timers
Root counter (timer) MMIO. Three 16-bit counters, each with counter / mode / target registers. Mode bits select the clock source and IRQ behaviour. Register addresses and the mode bits live in [psx_hw::timers].

Functions§

read8⚠Deprecated
Renamed to read_u8.
read_u8⚠
Read an 8-bit byte from addr.
read_u16⚠
Read a 16-bit half-word from addr.
read_u32⚠
Read a 32-bit word from addr. Caller must guarantee addr is valid MMIO for a 32-bit read.
write8⚠Deprecated
Renamed to write_u8.
write_u8⚠
Write an 8-bit byte to addr.
write_u16⚠
Write a 16-bit half-word to addr.
write_u32⚠
Write a 32-bit word to addr.