Module board

Module board 

Source
Expand description

The SuperGrafx: the base PC Engine board with a machine row, a VPC and a second VDC (board.py).

Nothing here is copied from pcengine-rust; this module only composes it through its sockets (the reference’s docs/start-here.md lists them):

  • socket 12 (instances) and the machine row: Machine::vdc_count = 2 makes the board build, run, sync and read a second Vdc and OR its IRQ1;
  • socket 3 (the decode): VideoPage claims $FF:0000-03FF over the VDC page;
  • socket 7 (pixel path): VideoPage::mix (the Vpc’s) is the board’s PixelPath;
  • the work RAM is the machine row’s 32 KiB, mirrored nowhere (banks $F8-$FB).

Differences forced by Rust:

  • The board owns the VPC and the CPU owns the board, so SuperGrafx cannot keep vpc, vdc1, vdc2 and page beside the board as the reference does. They are reached through the board: board.vdcs[0], board.vdcs[1], and video_page(&mut board) for the page and its vpc (the base board’s PixelPath::as_any_mut). build consumes the SuperGrafx and gives the System; afterwards the same things are reached with system.board_mut().
  • The constructor’s keyword arguments are SuperGrafxOptions: compat, vpc and the base board’s BoardOptions (the reference’s **board_kwargs), whose machine and pixel_path are the add-on’s to set.
  • _store_immediate is not here: the base board hands the opcode to the page with each access (vpc.rs). reset is Board::reset, which calls the page’s (vpc.rs).

Structs§

SuperGrafx
A base board configured as a SuperGrafx. board is the plain pcengine_rust::board::Board.
SuperGrafxOptions
The reference’s SuperGrafx(card, compat=..., vpc=..., **board_kwargs).

Functions§

set_compat
Move the back-panel switch of a running SuperGrafx (true: PC Engine position). false if the system is not a SuperGrafx.
video_page
The video page of a board built by SuperGrafx (None for any other board): after build, video_page(system.board_mut()).