This repository is archived now that it has been merged upstream into Ghidra. The SuperH SH-1/SH-2 processor module (and many bug fixes!) are included with the 9.1 release of Ghidra. File any bug reports with the Ghidra repository and I (VGKintsugi) will take a look.
A (WIP) Ghidra processor module for the Sega Saturn. The Sega Saturn uses dual SuperH SH-2 processors for games and a dedicated SuperH SH-1 to control the CD-ROM drive.
Currently:
- able to disassemble SH-1 and SH-2 after manually specifying the processor type. I used the instruction encodings available from Renesas SH Instruction Set Summary and related GitHub project shared-ptr/sh_insns.
- contains SLEIGH definitions for all instructions. Currently debugging through issues related to sign extensions, flags, and branches.
- able to decompile automatically. Output looks reasonable but likely to have issues due to errors in the SLEIGH definitions.
Todo:
- fix remaining errors in SLEIGH definitions
- create loader plugin (in a separate project)
Disassembly View (Decompiler working, still has some bugs)
I fixed a lot of the errors in the SLEIGH definitions but I anticipate there will be more bugs.
- Rename the root folder to SuperH and copy it to Ghidra/Processors/ and restart Ghidra
- shared-ptr/sh_insns - SH-1/SH-2 instruction definitions
- Yabause - Sega Saturn emulator I used to verify my disassembly and execution
- Sega Saturn Multiplayer Task Force - repo of homebrew Sega Saturn games with source code
- xyzz/ghidra-mep - example Ghidra processor module
- Thog/ghidra_falcon - example Ghidra processor module