64kramsystem / 64kramsystem/ghidra-vice-connector

Autostart PRG in VICE via BMP (0xdd)

Ouverte
#26 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
priority: medium
Langage dominant
Python
Étoiles
1
Forks
0
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

## 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('

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.