Skip to content

v0.20.1 — Profiler: Stack Tracking + Memory Snapshots

Choose a tag to compare

@oisee oisee released this 04 Mar 23:31
· 1484 commits to main since this release

What's New in v0.20.1

Profiler: Stack Push/Pop Heatmaps

  • Per-byte stack tracking via SP-delta detection after each instruction
  • stack_push / stack_pop counters show exactly which addresses are used as stack
  • stack_depth meta field: lowest SP seen (deepest stack usage)
  • Signed int16 delta handles uint16 wraparound; ignores LD SP,nn re-initialization

Profiler: Memory Snapshot at Export

  • Captures full 64KB memory state when profile is exported
  • mem_snapshot field: byte values at all hot addresses (exec/read/write/stack)
  • Correlate "most-read address" with "what's actually there" in one JSON

Example profile output

{
  "meta": {"total_instrs": 33, "stack_depth": "FFFE"},
  "exec": {"0100": 1, "0103": 1, ...},
  "read": {"0100": 5, "FFFE": 2, ...},
  "stack_push": {"FFFE": 1, "FFFF": 1},
  "stack_pop": {"FFFE": 1, "FFFF": 1},
  "mem_snapshot": {"0100": "3E", "FFFE": "00", ...}
}

Changes

  • Both MZE and MZX profilers updated
  • Memory() accessor on RemogattoZ80 for snapshot capture
  • MZX: stack tracking in both RunFrame() and RunFrameFast() paths

Full diff: v0.20.0...v0.20.1