|
Wondercard
v0.2.1
A fully virtual emulation of the protocol used by Memory Cards for the PlayStation.
|
A fully virtual emulation of the protocol used by Memory Cards for the PlayStation.
This is a application-layer emulation of the Memory Card protocol, therefore the miscellany of the SPI protocol used at the signal level to communicate between the PlayStation and Memory Card is not represented exactly.
Instead we limit our representation to a model where bytes are sent to and from the virtual memory card, and provide a basic representation of Z-state (high impedance) inputs/outputs on the MOSI/MISO lines and a way to represent a missing card (ACK line never brought low).
This project builds with CMake v3.15+ on recent versions of Linux, macOS and Windows. You need a compiler supporting some C++20 features to build it.
Everything lives in the com::saxbophone::wondercard namespace.
The current functionality comprises a virtual MemoryCard class which implements the logic found on memory cards, and a virtual MemoryCardSlot class for reading and writing the cards.
If the default constructor for MemoryCard is used, then the card is initialised with all-zero data.
Reading and writing cards is supported for the entire card, by Block (analogous to the save blocks used by the PlayStation card manager) and by Sector. A Card is divided into 16 Blocks, each of these being divided into 64 Sectors. Here is a table of Card, Block and Sector size conversions:
| Row per Column | Card | Block | Sector |
|---|---|---|---|
| Block | 16 | 1 | N/A |
| Sector | 1024 | 64 | 1 |
| Byte | 128KiB | 8192 | 128 |
The docs site is separated by minor version. You can access documentation for other versions of the project by changing the
v*.*part of the URL. Currently, only minor versions are intended to be compatible with eachother.