Skip to content

v1.2.0

Latest

Choose a tag to compare

@mikolas mikolas released this 27 Oct 14:58
· 2 commits to master since this release
a4a5013

What's Changed in v1.2.0

Atomic CLI Analysis & Annotation Primitives (#6)

  • hunks search <query> [-s <seg>] [-n <limit>] [--dense] [-f text|json]: Search across mnemonics (m:), operands (o:, including live struct field aliases), strings (s:), comments (c:), labels (l:), hex byte patterns (b:), hardware/math clusters (cluster:3dmath|mul|div|trig|blitter|copper|paula|bitplane|sprite|cia|dma|irq, with --dense for $\ge 3$ hits within 24B), and self-modifying code (smc).
  • hunks data <target> [--len N] [--copper] [--struct <Name> [--count N]] [-f text|json] (alias inspect): Inspect non-code cells (dc.b/dc.w/dc.l/pointer/string), disassemble Amiga Copper MOVE/WAIT/SKIP lists (--copper), and format structured record arrays (--struct). Automatically invoked when hunks cg <target> is passed a non-function address/label.
  • hunks xref <target_or_range> [-f text|json] & .w (EAAbsShort) XREFs: Record sign-extended 24-bit .w (EAAbsShort, excluding pea), flat .l (EAAbsLong), and movea.l #imm,An memory references in xrefs across both low-RAM ($0000..$7FFF) and in-segment targets without altering .w operand emission parity. Supports single-address lookup and external range rollup ($1000..$1FFF, +3DDEE..+3EFFF).
  • Indirect Dispatch & Trampoline Resolution (cg --indirect, hint pointer --follow):
    • hunks hint pointer <addr> [count] [--follow] resolves target pointers, creates labels + DATA_ADDR xrefs, and seeds code targets into incremental analysis.
    • analyze --trace steps through low-RAM bounce trampolines ($\le 8$ steps outside image) and records re-entry targets on the originating jsr/jmp site.
    • propagateBaseRegs resolves static memory-slot function pointers (move.l #Target,$1034.w + jsr $1034.w / movea.l $1034.w,An; jsr (An)).
    • hunks cg --indirect [-f text|json] audits all resolved and [UNRESOLVED] indirect call/jump sites.
  • Structs, Scoped Register Aliases & Subroutine ABI (struct, alias, abi):
    • hunks struct add/list/remove (--size <bytes> and .b/.w/.l/.p field type hints) and hunks alias [a0..a6] [Struct] [--fn <func>] render symbolic Field(An) operands live across cg --code, search, emit, and TUI, and emit <Field> equ <offset> + <Struct>_SIZEOF equ <size> in assembly output.
    • hunks abi [func] [signature] [--verify] [--batch <file>] records subroutine ABI envelopes, computes static in:/mod:/saved: register liveness, verifies claimed inputs/clobbers against static ReadRegs/WriteRegs (--verify), and emits ; ABI: headers and [ABI: ...] call-site hints.
  • Validated Function-Relative Comments (hunks comment) & State Export (hunks dump):
    • cg --code prints dual +seg_off (+fn_off) offsets; hunks comment <fn>+<off> validates function bounds and instruction boundaries (reporting nearest valid offsets on mid-instruction targets) and supports --batch/--file.
    • hunks dump [-f text|json] [--section <sec>] exports entry_points, memory_regions, renames, user comments, structs, register_aliases, function_abis, and carves.
  • Emitter & Documentation:
    • Emits relative <intLbl> equ <CarveLabel>+$<off> definitions for interior labels inside carved incbin cells and external/BSS equates in EmitAllAmiga.
    • Added the Agent Reverse-Engineering Playbook to MANUAL.md.

Amiga Custom Register Bitfield Auto-Comments & Call-Graph Cycle Propagation (#5)

  • Custom Register Bitfield Auto-Comments: Automatically decodes immediate .w and paired .l writes to DMACON, INTENA, INTREQ, ADKCON, BPLCON0, BLTCON0, BLTCON1, and BLTSIZE into persistent auto_comment annotations in the TUI and emitted .asm files.
  • Call-Graph Inclusive Cycle Timing: Propagates Self (min-max cyc) and Inclusive (+callees) MC68000 cycle bounds (plus +loop and +ind markers) across hunks cg and the TUI ([incl: X-Y cyc] on v/V selection, [→X-Y cyc] on jsr/bsr rows, and cycle summaries in f Functions).

TUI Code Block & Subroutine Cycle Analysis (v / V) & ABI/Struct Sync (#4, #6)

  • Block (v) & Subroutine (V) Cycle Profiling: Displays byte span, instruction count, and aggregated MC68000 execution cycles + (R/W) bus words for any selected range (v) or enclosing subroutine (V).
  • TUI ABI & Live Struct Alias Support: Added A (ModalABI) to edit function ABIs interactively, ; ABI: function header banners, [ABI: ...] call-site hints, live ApplyStructAliasesToOpStr rendering, and automatic ABI/alias re-keying on rename (n) and undo (Ctrl-z).

Full Changelog: v1.1.0...v1.2.0