64kramsystem / 64kramsystem/ghidra-vice-connector
Save and restore VICE machine state snapshots (BMP 0x41/0x42)
- 主要语言
- Python
- 星标
- 1
- 派生
- 0
- PR 合并指标
- 30 天内没有已合并 PR
描述
## Summary
Save the full VICE machine state (RAM, registers, chip state, drive state) to a `.vsf` snapshot file from Ghidra, and restore it later. This enables fast iteration: save state at a specific game screen, freely experiment with breakpoints and memory edits, then restore to retry.
Source: RetroDebugger Timeline Save/Load; VICE BMP `Dump` (0x41) and `Undump` (0x42).
---
## BMP protocol details
**`CMD_DUMP = 0x41`** — save snapshot
Request payload:
```
save_roms (1) — 1 = include ROM contents in snapshot
save_disks (1) — 1 = include disk image contents
filename_len (2 LE)
filename (filename_len bytes, ASCII path accessible to VICE process)
```
Response: standard ACK (error byte = 0 on success).
**`CMD_UNDUMP = 0x42`** — restore snapshot
Request payload:
```
filename_len (2 LE)
filename (filename_len bytes)
```
Response body:
```
pc (2 LE) — PC value after restore
```
After `undump`, the trace state is stale — call `populate_initial_state()` or at minimum `on_stop()` to resync registers and memory.
---
## Implementation plan
### 1. `util.py`
```python
CMD_DUMP = 0x41
CMD_UNDUMP = 0x42
def dump(self, path: str, save_roms: bool = False, save_disks: bool = False):
enc = path.encode('ascii')
payload = struct.pack(' int:
enc = path.encode('ascii')
payload = struct.pack('
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。