64kramsystem / 64kramsystem/ghidra-vice-connector
Autostart PRG in VICE via BMP (0xdd)
- Lenguaje dominante
- Python
- Estrellas
- 1
- Forks
- 0
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
## Summary
Use the VICE BMP `Autostart` command (0xdd) to load and run a PRG file directly from Ghidra. Unlike the tracked issue #3 (raw memory injection), autostart uses VICE's native load mechanism which handles the BASIC header, SYS calls, and proper KERNAL initialization — matching how a real C64 would load the program.
---
## BMP protocol details
**Command:** `CMD_AUTOSTART = 0xDD`
**Request payload:**
```
run (1) — 1 = autostart and run, 0 = load only (LOAD equivalent)
file_index (2 LE) — index within a disk image (0 for first file, or for PRG files directly)
filename_len (2 LE)
filename (filename_len bytes, ASCII, path accessible to the VICE process)
```
**Response:** standard ACK. VICE will reset and load the file; a `RESP_STOPPED` event will follow when the program breaks or reaches the autostart entry point.
---
## Relationship to issue #3
Issue #3 ("Auto-load PRG files into VICE memory") likely refers to injecting raw bytes via `CMD_MEMORY_SET`. That bypasses BASIC/KERNAL setup and is better for already-running programs. This issue is for the workflow entry point: "I have a PRG, start VICE running it cleanly."
---
## Implementation plan
### 1. `util.py`
```python
CMD_AUTOSTART = 0xDD
def autostart(self, path: str, run: bool = True, file_index: int = 0):
"""
Load (and optionally run) a PRG or disk image file via VICE's autostart.
`path` must be accessible to the VICE process filesystem.
"""
enc = path.encode('ascii')
payload = struct.pack('
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.