64kramsystem / 64kramsystem/ghidra-vice-connector
Query VICE machine configuration (PAL/NTSC, SID model) via BMP resource API
- Langage dominant
- Python
- Étoiles
- 1
- Forks
- 0
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
## Summary
Query VICE's resource API on connect to determine the machine configuration (PAL vs NTSC, SID model, REU presence) and display it in the trace. PAL/NTSC affects raster timing (312 vs 263 lines, 63 vs 65 cycles/line), which is critical context when analysing timing-sensitive game code.
---
## BMP protocol details
**`CMD_RESOURCE_GET = 0x51`**
Request payload:
```
name_len (2 LE)
name (name_len bytes, ASCII VICE resource name)
```
Response body:
```
type (1) — 0x00 = string, 0x01 = integer
value — if integer: 4 bytes LE; if string: length(2 LE) + chars
```
**`CMD_RESOURCE_SET = 0x52`** — same payload plus value; not needed for read-only config display.
---
## Key resources to query
| Resource name | Type | Meaning |
|--------------|------|---------|
| `MachineVideoStandard` | int | 0=PAL, 1=NTSC, 2=PAL-N, 3=NTSC-old, 4=PALN |
| `SidModel` | int | 0=6581, 1=8580, 2=8580+digiboost |
| `REUsize` | int | 0=off, 128/256/512/1024/2048/4096/8192/16384=KB |
| `GEORAMsize` | int | similar |
| `Drive8Type` | int | drive type for unit 8 |
| `MachinePower` | int | 64=C64, 128=C128, 20=VIC-20, etc. |
---
## Implementation plan
### 1. `util.py`
```python
CMD_RESOURCE_GET = 0x51
RESP_RESOURCE_GET = 0x51
RESOURCE_TYPE_STRING = 0x00
RESOURCE_TYPE_INTEGER = 0x01
def resource_get(self, name: str):
enc = name.encode('ascii')
payload = struct.pack('
```
```xml
```
---
## Files to change
- `src/main/py/src/vice/util.py` — add `CMD_RESOURCE_GET`, `RESP_RESOURCE_GET`, `resource_get()`
- `src/main/py/src/vice/commands.py` — add `populate_machine_config()`, call from `populate_initial_state()`
- `src/main/py/src/vice/schema.xml` — add `Config` / `MachineConfig` schema
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.