Swanium::Core::WonderSwanBus
Inherits Swanium::Core::MemoryBus < Reference < Object
Platform-neutral first hardware bus. It models the CPU-visible address map and cartridge bank registers while PPU/APU/DMA devices are added on top through the same I/O port file.
Constants
Constructors
Instance methods
Drains the voice writes collected during the preceding CPU instruction. This runs at every instruction boundary, so retain the backing storage instead of replacing it with a newly allocated Array each time.
Some hardware I/O operations synchronously stall the V30. A bus accumulates those costs while handling an instruction, and the CPU consumes them before reporting that instruction's total cycle count.
PPU access stays behind the bus boundary: the renderer receives the internal views it requires, while frontends never receive mutable RAM or port-file references.
Default open-bus I/O behavior keeps FlatMemory suitable for CPU specs.
The display controller updates this once per 256-cycle scanline.
The platform layer supplies a complete input snapshot. Only a newly pressed key raises the edge-triggered KeyPress source.
Snapshot methods intentionally return independent buffers. Hardware state must otherwise be mutated through the address or I/O maps so device-specific masks and side effects cannot be bypassed.