64kramsystem / 64kramsystem/ghidra-vice-connector

Autostart PRG in VICE via BMP (0xdd)

オープン
#26 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
priority: medium
主要言語
Python
スター
1
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

説明

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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。