[GH-ISSUE #6305] Add Motorola 6809 raw-binary support to the Ghidra provider #3808

Open
opened 2026-10-31 00:44:17 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @peters59 on GitHub (Oct 22, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/6305

Please consider adding Motorola 6809 support to REA’s raw-binary import, including Windows.

Environment

  • REA: rea-agents 6.7.0
  • Windows x64
  • Ghidra 12.1.4
  • Temurin JDK 21

Current limitation

REA does not accept 6809 as a raw-binary architecture. The Ghidra language mapping lacks 6809:BE:16:default, and the Windows provider currently admits only raw 6502 images.

Working Ghidra example

I tested a WPC-95 ROM directly with Ghidra’s built-in 6809:BE:16:default processor:

  • Fixed ROM: file offsets 0xF8000–0xFFFFF, mapped to CPU addresses 0x8000–0xFFFF.
  • Reset vector: CPU 0xFFFE, pointing to 0x8DD4.
  • Ghidra produced pseudocode for 64 discovered functions in the fixed ROM region.

Some decoder warnings and unresolved indirect jumps remain, so this demonstrates basic decompiler functionality rather than complete reconstruction.

Suggested initial scope

  1. Accept 6809 in the shared CLI/MCP architecture schemas.
  2. Map it to 6809:BE:16:default, using the default compiler specification and a 16-bit address space.
  3. Add verified Windows support.
  4. Allow separate load and entry addresses: this example loads at 0x8000 but starts at 0x8DD4.
  5. Add a small source-owned 6809 fixture to verify import, disassembly, decompilation, byte mapping and cleanup.

Full WPC bank switching could be a separate follow-up. Basic support for the fixed ROM region would already be useful.

Is this within the planned scope of the Ghidra provider?

Originally created by @peters59 on GitHub (Oct 22, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/6305 Please consider adding Motorola 6809 support to REA’s raw-binary import, including Windows. ## Environment - REA: `rea-agents` 6.7.0 - Windows x64 - Ghidra 12.1.4 - Temurin JDK 21 ## Current limitation REA does not accept `6809` as a raw-binary architecture. The Ghidra language mapping lacks `6809:BE:16:default`, and the Windows provider currently admits only raw 6502 images. ## Working Ghidra example I tested a WPC-95 ROM directly with Ghidra’s built-in `6809:BE:16:default` processor: - Fixed ROM: file offsets `0xF8000–0xFFFFF`, mapped to CPU addresses `0x8000–0xFFFF`. - Reset vector: CPU `0xFFFE`, pointing to `0x8DD4`. - Ghidra produced pseudocode for 64 discovered functions in the fixed ROM region. Some decoder warnings and unresolved indirect jumps remain, so this demonstrates basic decompiler functionality rather than complete reconstruction. ## Suggested initial scope 1. Accept `6809` in the shared CLI/MCP architecture schemas. 2. Map it to `6809:BE:16:default`, using the default compiler specification and a 16-bit address space. 3. Add verified Windows support. 4. Allow separate load and entry addresses: this example loads at `0x8000` but starts at `0x8DD4`. 5. Add a small source-owned 6809 fixture to verify import, disassembly, decompilation, byte mapping and cleanup. Full WPC bank switching could be a separate follow-up. Basic support for the fixed ROM region would already be useful. Is this within the planned scope of the Ghidra provider?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#3808
No description provided.