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 還沒有評估資料。