# shendoxt/memcardrex architecture

> Architecture diagram of the GitHub repository shendoxt/memcardrex, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/shendoxt/memcardrex
- Repository: https://github.com/shendoxt/memcardrex

## Overview

MemcardRex is a cross-platform PlayStation 1 memory-card editor. Users open or create cards, manage and edit saves, then export cards or individual saves; they can also communicate with physical cards through supported hardware. The core card model handles card data and formats, while platform interfaces expose editing, save comparison, and card operations. README capabilities also include plugin editors and PocketStation operations. Some subsystem links are documented rather than verified in sampled source, so uncertain wiring is omitted.

Main entry points: [`MemcardRex.Windows/Windows/GUI/mainWindow.cs`](https://github.com/shendoxt/memcardrex/blob/master/MemcardRex.Windows/Windows/GUI/mainWindow.cs) (Windows UI), [`MemcardRex.Linux/GUI/MainWindow.cs`](https://github.com/shendoxt/memcardrex/blob/master/MemcardRex.Linux/GUI/MainWindow.cs) (Linux UI), [`MemcardRex.macOS/macOS/GUI/ViewController.cs`](https://github.com/shendoxt/memcardrex/blob/master/MemcardRex.macOS/macOS/GUI/ViewController.cs) (macOS UI), [`MemcardRex.Core/ps1card.cs`](https://github.com/shendoxt/memcardrex/blob/master/MemcardRex.Core/ps1card.cs) (Card model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["Platform interfaces"]
  node_windows["Windows UI<br/>[mainWindow.cs]"]
  node_linux["Linux UI<br/>[MainWindow.cs]"]
  node_macui["macOS UI<br/>[ViewController.cs]"]
end

subgraph group_card["Card and saves"]
  node_cardmodel["Card model<br/>[ps1card.cs]"]
  node_cardfiles["Card files<br/>[ps1card.cs]"]
  node_saveops["Save operations<br/>[ps1card.cs]"]
  node_saveedit["Save editing<br/>[ps1card.cs]"]
  node_history["Undo/redo<br/>[ps1card.cs]"]
end

subgraph group_hardware["Hardware communication"]
  node_hardwarecore["Hardware interface"]
  node_devices["Device drivers<br/>[Hardware]"]
  node_communication["Card communication"]
  node_pocket["PocketStation<br/>[Hardware]"]
end

subgraph group_extensions["Extensions and settings"]
  node_pluginmgr["Plugin system<br/>[rexPluginSystem.cs]"]
  node_settings["Application settings<br/>[ProgramSettings.cs]"]
end

node_user(("User"))
node_plugin["Save editor plugin<br/>[PluginInterface.cs]"]
node_storage[("Local files")]
node_device["Memory card device"]

node_user -->|"uses"| node_windows
node_user -->|"uses"| node_linux
node_user -->|"uses"| node_macui
node_windows -->|"manages cards"| node_cardmodel
node_linux -->|"manages cards"| node_cardmodel
node_macui -->|"manages cards"| node_cardmodel
node_cardmodel -->|"reads/writes formats"| node_cardfiles
node_windows -->|"manages saves"| node_saveops
node_linux -->|"manages saves"| node_saveops
node_macui -->|"imports/exports"| node_saveops
node_saveops -->|"reads/writes"| node_storage
node_windows -->|"edits saves"| node_saveedit
node_linux -->|"edits saves"| node_saveedit
node_macui -->|"edits saves"| node_saveedit
node_saveedit -->|"records changes"| node_history
node_windows -->|"loads plugins"| node_pluginmgr
node_linux -->|"loads plugins"| node_pluginmgr
node_pluginmgr -->|"discovers"| node_plugin
node_windows -->|"configures"| node_settings
node_linux -->|"configures"| node_settings
node_macui -->|"configures"| node_settings
node_macui -->|"selects interface"| node_hardwarecore
node_macui -->|"starts transfer"| node_communication
node_communication -->|"runs commands"| node_hardwarecore
node_hardwarecore -->|"dispatches to"| node_devices
node_devices -->|"transfers data"| node_device
node_windows -.->|"offers operations"| node_pocket
node_linux -.->|"offers operations"| node_pocket

click node_windows "https://github.com/shendoxt/memcardrex/blob/master/MemcardRex.Windows/Windows/GUI/mainWindow.cs"
click node_linux "https://github.com/shendoxt/memcardrex/blob/master/MemcardRex.Linux/GUI/MainWindow.cs"
click node_macui "https://github.com/shendoxt/memcardrex/blob/master/MemcardRex.macOS/macOS/GUI/ViewController.cs"
click node_cardmodel "https://github.com/shendoxt/memcardrex/blob/master/MemcardRex.Core/ps1card.cs"
click node_cardfiles "https://github.com/shendoxt/memcardrex/blob/master/MemcardRex.Core/ps1card.cs"
click node_saveops "https://github.com/shendoxt/memcardrex/blob/master/MemcardRex.Core/ps1card.cs"
click node_saveedit "https://github.com/shendoxt/memcardrex/blob/master/MemcardRex.Core/ps1card.cs"
click node_history "https://github.com/shendoxt/memcardrex/blob/master/MemcardRex.Core/ps1card.cs"
click node_hardwarecore "https://github.com/shendoxt/memcardrex/blob/master/MemcardRex.Core/Hardware/HardwareInterface.cs"
click node_devices "https://github.com/shendoxt/memcardrex/tree/master/MemcardRex.Core/Hardware"
click node_communication "https://github.com/shendoxt/memcardrex/blob/master/MemcardRex.macOS/macOS/GUI/HardwareDialogController.cs"
click node_pocket "https://github.com/shendoxt/memcardrex/tree/master/MemcardRex.Core/Hardware"
click node_pluginmgr "https://github.com/shendoxt/memcardrex/blob/master/MemcardRex.Core/Support/rexPluginSystem.cs"
click node_plugin "https://github.com/shendoxt/memcardrex/blob/master/MemcardRex.Plugins/CrashResign/PluginInterface.cs"
click node_settings "https://github.com/shendoxt/memcardrex/blob/master/MemcardRex.Core/Support/ProgramSettings.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_windows,node_linux,node_macui,node_user toneBlue
class node_cardmodel,node_cardfiles,node_saveops,node_saveedit,node_history,node_storage toneAmber
class node_hardwarecore,node_devices,node_communication,node_pocket toneMint
class node_pluginmgr,node_settings toneRose
class node_plugin toneTeal
class node_device toneIndigo
```

## Components

### Platform interfaces

- [Windows UI](https://github.com/shendoxt/memcardrex/blob/master/MemcardRex.Windows/Windows/GUI/mainWindow.cs): `MemcardRex.Windows/Windows/GUI/mainWindow.cs`
- [Linux UI](https://github.com/shendoxt/memcardrex/blob/master/MemcardRex.Linux/GUI/MainWindow.cs): `MemcardRex.Linux/GUI/MainWindow.cs`
- [macOS UI](https://github.com/shendoxt/memcardrex/blob/master/MemcardRex.macOS/macOS/GUI/ViewController.cs): `MemcardRex.macOS/macOS/GUI/ViewController.cs`

### Card and saves

- [Card model](https://github.com/shendoxt/memcardrex/blob/master/MemcardRex.Core/ps1card.cs): `MemcardRex.Core/ps1card.cs`
- [Card files](https://github.com/shendoxt/memcardrex/blob/master/MemcardRex.Core/ps1card.cs): `MemcardRex.Core/ps1card.cs`
- [Save operations](https://github.com/shendoxt/memcardrex/blob/master/MemcardRex.Core/ps1card.cs): `MemcardRex.Core/ps1card.cs`
- [Save editing](https://github.com/shendoxt/memcardrex/blob/master/MemcardRex.Core/ps1card.cs): `MemcardRex.Core/ps1card.cs`
- [Undo/redo](https://github.com/shendoxt/memcardrex/blob/master/MemcardRex.Core/ps1card.cs): `MemcardRex.Core/ps1card.cs`

### Hardware communication

- [Hardware interface](https://github.com/shendoxt/memcardrex/blob/master/MemcardRex.Core/Hardware/HardwareInterface.cs): `MemcardRex.Core/Hardware/HardwareInterface.cs`
- [Device drivers](https://github.com/shendoxt/memcardrex/tree/master/MemcardRex.Core/Hardware): `MemcardRex.Core/Hardware`
- [Card communication](https://github.com/shendoxt/memcardrex/blob/master/MemcardRex.macOS/macOS/GUI/HardwareDialogController.cs): `MemcardRex.macOS/macOS/GUI/HardwareDialogController.cs`
- [PocketStation](https://github.com/shendoxt/memcardrex/tree/master/MemcardRex.Core/Hardware): `MemcardRex.Core/Hardware`

### Extensions and settings

- [Plugin system](https://github.com/shendoxt/memcardrex/blob/master/MemcardRex.Core/Support/rexPluginSystem.cs): `MemcardRex.Core/Support/rexPluginSystem.cs`
- [Application settings](https://github.com/shendoxt/memcardrex/blob/master/MemcardRex.Core/Support/ProgramSettings.cs): `MemcardRex.Core/Support/ProgramSettings.cs`

### Other components

- **User**
- [Save editor plugin](https://github.com/shendoxt/memcardrex/blob/master/MemcardRex.Plugins/CrashResign/PluginInterface.cs): `MemcardRex.Plugins/CrashResign/PluginInterface.cs`
- **Local files**
- **Memory card device**

## Connections

- User → Windows UI: uses
- User → Linux UI: uses
- User → macOS UI: uses
- Windows UI → Card model: manages cards
- Linux UI → Card model: manages cards
- macOS UI → Card model: manages cards
- Card model → Card files: reads/writes formats
- Windows UI → Save operations: manages saves
- Linux UI → Save operations: manages saves
- macOS UI → Save operations: imports/exports
- Save operations → Local files: reads/writes
- Windows UI → Save editing: edits saves
- Linux UI → Save editing: edits saves
- macOS UI → Save editing: edits saves
- Save editing → Undo/redo: records changes
- Windows UI → Plugin system: loads plugins
- Linux UI → Plugin system: loads plugins
- Plugin system → Save editor plugin: discovers
- Windows UI → Application settings: configures
- Linux UI → Application settings: configures
- macOS UI → Application settings: configures
- macOS UI → Hardware interface: selects interface
- macOS UI → Card communication: starts transfer
- Card communication → Hardware interface: runs commands
- Hardware interface → Device drivers: dispatches to
- Device drivers → Memory card device: transfers data
- Windows UI → PocketStation: offers operations
- Linux UI → PocketStation: offers operations
