Git Product home page Git Product logo

ghidra-segasaturn-loader's Introduction

Ghidra Sega Saturn Loader

A (WIP) Ghidra loader for the Sega Saturn. Currently supports:

  • ISO disc images
  • Mednafen Save States (MC)
  • Yabause Save States (YSS)

Grab from Releases or build from source.

Screenshots

Loader screenshot
Loader

Disassembly View w/Decompiler Disassembly View

How to Use

Sega Saturn ISOs

  • Select any Sega Saturn ISO file
  • At the "Container file detected" prompt, select "Single file"
  • The loader will create functions for main, initial program (the code that runs during the Sega logo), and security_check
  • Pros: Easy to use, useful for debugging game initialization, works great on Saturn homewbrew
  • Cons: Doesn't load any file after the first file on disc

Mednafen Save States (MC)

  • gunzip the Mednafen save state
  • Select the unzipped file in Ghidra
  • The loader will load backup cart memory, high work RAM, and low work RAM to the correct places
  • The loader will add labels for SH-2s PC, PR, and R15 registers

Yabause Save States (YSS)

  • Select any Yabause Save State (YSS)
  • The loader will load backup cart memory, high work RAM, and low work RAM to the correct places
  • The loader will add labels for SH-2s PC, PR, and R15 registers

Applying Sega Saturn Library Signatures

  • After loading in Ghidra, open "Script Manager" and execute ApplySig.py
  • Select the signature file to apply

Issues

  • Code quality needs serious improvement and refactoring
  • Memory map doesn't handle mirrored regions
  • Adding the onchip register region (0xffffffe00-0xffffffff) to the memory map made decompilation worse. So it's disabled.
  • It would be useful to label some globals to assist reversing
  • Mednafen memory cart data doesn't match Yabause's.

Building

  • gradle -PGHIDRA_INSTALL_DIR=<Absolute path to Ghidra>
  • The output zip file will be created within /dist

Installation

  • Ghidra 9.1 added SH-1/SH-2 support.
  • Copy the zip file to <Ghidra install directory>/Extensions/Ghidra.
  • Start Ghidra and use the "Install Extensions" dialog to finish the installation. (File -> Install Extensions...).
  • (Optional but recommended) Install the ApplySig script so you can use Sega Saturn library signatures. Copy to a ghidra_scripts directory.
  • (Optional but recommended) Download CyberWarriorX's Sega Saturn library signatures

Credits/References

ghidra-segasaturn-loader's People

Contributors

vgkintsugi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.