Cycle states
This commit is contained in:
@@ -9,7 +9,7 @@ python h8536_decompiler.py ROM\M27C512@DIP28_1.BIN --out build\rom_decompiled.as
|
||||
If you are using the repo-local venv:
|
||||
|
||||
```powershell
|
||||
.\.venv\Scripts\python.exe h8536_decompiler.py --out build\rom_decompiled.asm --json build\rom_decompiled.json --callgraph-dot build\callgraph.dot
|
||||
.\.venv\Scripts\python.exe h8536_decompiler.py --out build\rom_decompiled.asm --json build\rom_decompiled.json --cycles --callgraph-dot build\callgraph.dot
|
||||
```
|
||||
|
||||
## What It Does
|
||||
@@ -25,6 +25,7 @@ If you are using the repo-local venv:
|
||||
- Parses the DTC vector table described by the manual.
|
||||
- Scans unreached ROM ranges for ASCII strings and pointer-table candidates.
|
||||
- Emits function summaries and a direct-call graph in JSON, with optional Graphviz DOT output.
|
||||
- Adds Appendix A cycle estimates to JSON and can append them to ASM comments.
|
||||
- Handles the E-clock transfer instructions `MOVFPE` and `MOVTPE`.
|
||||
|
||||
The generated listing is written to:
|
||||
@@ -50,6 +51,7 @@ python h8536_decompiler.py --help
|
||||
- `--linear`: linear-sweep the selected range instead of tracing from vectors.
|
||||
- `--start H'1000 --end H'D100`: constrain the decode range.
|
||||
- `--br H'FE`: resolve short absolute `@aa:8` operands through a known base-register value.
|
||||
- `--cycles`: append Appendix A cycle estimates to assembly comments.
|
||||
- `--callgraph-dot build\callgraph.dot`: write a Graphviz DOT call graph.
|
||||
|
||||
## Code Layout
|
||||
@@ -62,5 +64,6 @@ python h8536_decompiler.py --help
|
||||
- `h8536/analysis.py`: recursive tracing, linear sweep, labels, function grouping, and call graph analysis.
|
||||
- `h8536/data_analysis.py`: unreached string and pointer-table candidate scans.
|
||||
- `h8536/memory.py`: manual-derived memory-region tagging.
|
||||
- `h8536/cycles.py`: Appendix A cycle estimate tables.
|
||||
- `h8536/render.py`: assembly and JSON output.
|
||||
- `h8536/model.py`, `h8536/rom.py`, `h8536/formatting.py`: shared data structures and helpers.
|
||||
|
||||
Reference in New Issue
Block a user