All Projects → aarant → luvdis

aarant / luvdis

Licence: MIT license
Pure-Python Game Boy Advance Disassembler

Programming Languages

python
139335 projects - #7 most used programming language
assembly
5116 projects

Projects that are alternatives of or similar to luvdis

PokemonRNGGuides
A repository of Pokemon RNG abuse guides
Stars: ✭ 62 (+129.63%)
Mutual labels:  gba
gba-pong
Classic pong game on the GameBoy Advance.
Stars: ✭ 23 (-14.81%)
Mutual labels:  gba
gba-mus-ripper
(Not actively maintained) A fork of Bregalad's "GBA Mus Riper" program
Stars: ✭ 50 (+85.19%)
Mutual labels:  gba
HeartLib
Comprehensive API for Nintendo GBA inspired by HAMLib and HELlib.
Stars: ✭ 23 (-14.81%)
Mutual labels:  gba
trick
Library for GBA/NDS image conversion, and more!
Stars: ✭ 23 (-14.81%)
Mutual labels:  gba
awesome-emu-resources
A curated list of emulator development resources
Stars: ✭ 26 (-3.7%)
Mutual labels:  gba
AdvanceOS
Tiny Operating System to emulate GBA on Raspberry Pi
Stars: ✭ 46 (+70.37%)
Mutual labels:  gba
Herebedragons
A basic 3D scene implemented with various engines, frameworks or APIs.
Stars: ✭ 1,616 (+5885.19%)
Mutual labels:  gba
Emblem-Magic
An all-purpose ROMhacking tool for the GBA Fire Emblem games
Stars: ✭ 15 (-44.44%)
Mutual labels:  gba
Emuloader
Emuloader is an application that allows easy management of game backups locally or on the cloud and one-click installs of emulator enivronments
Stars: ✭ 55 (+103.7%)
Mutual labels:  gba
gba-sprite-engine
An object-oriented Game Boy Advance sprite engine concept
Stars: ✭ 68 (+151.85%)
Mutual labels:  gba
GBAATM-Rebirth
From the original source code a new rebirth, to add a Trainer in your GBA roms!
Stars: ✭ 26 (-3.7%)
Mutual labels:  gba
Hades
🔥 A Nintendo Game Boy Advance emulator
Stars: ✭ 44 (+62.96%)
Mutual labels:  gba
eggvance
A Game Boy Advance emulator.
Stars: ✭ 59 (+118.52%)
Mutual labels:  gba
pimpmobile
Pimpmobile - music playback for the Nintendo Game Boy Advance
Stars: ✭ 20 (-25.93%)
Mutual labels:  gba
minishmaker
Level editing suite for The Legend of Zelda: The Minish Cap
Stars: ✭ 58 (+114.81%)
Mutual labels:  gba
switch-gba
Browser based Nintendo Switch GBA Emulator
Stars: ✭ 75 (+177.78%)
Mutual labels:  gba
Mgba
mGBA Game Boy Advance Emulator
Stars: ✭ 3,355 (+12325.93%)
Mutual labels:  gba
gba-modern
An attempt to create a Game Boy Advance game using Modern C++
Stars: ✭ 59 (+118.52%)
Mutual labels:  gba
save-file-converter
Converter for retro console save files found around the Internet. All common formats for NES/SNES/GBA/N64/TG16/SMS/Genesis/Neo Geo/PS1 supported. Decrypts PSP saves. Converts to and from Retron 5 and MiSTer
Stars: ✭ 56 (+107.41%)
Mutual labels:  gba

Luvdis

PyPI - Python Version PyPI GitHub GitHub Workflow Status

A smart Pure-Python GBA (Game Boy Advance) disassembler.

Luvdis is a tool for disassembling GBA ROMs, mostly for the purpose of creating buildable, matching disassemblies.

Features include:

  • Configurable output: Disassemble to stdout, a single file, or separate output into modules based on configuration.
  • Platform accuracy: Other disassembly engines like Capstone recognize instructions that are not legal in ARMv4 on the GBA's processor. Luvdis' custom decoder & disassembler solves this problem by attempting to replicate hardware behavior as closely as possible and only supporting ARMv4.
  • Function discovery: Detect likely THUMB functions and differentiate between code and data.
  • Matching output: Even if something goes wrong and a label overlaps with data, etc, Luvdis' disassembled output should assemble identically to the original ROM.
  • ROM detection: Unsure if you have a good copy of a ROM? Luvdis can let you know with luvdis info!

Contents

Installation

From PyPI

Luvdis requires Python 3.6 or later.

$ python3 -m pip install luvdis --user

From Releases

Arbitrary stable releases can be downloaded from GitHub and installed:

$ python3 -m pip install <path-to-zip> --user

For Windows users, prebuilt binaries are also available.

From latest source

$ python3 -m pip install git+git://https://github.com/arantonitis/luvdis#egg=luvdis

Usage

The simplest way to use Luvdis is to simply give it a ROM and output file:

$ luvdis <path-to-rom> -o rom.s

To assist in function discovery/labeling, a list of functions can be provided:

$ luvdis -c functions.cfg rom.gba -o rom.s

This list should have the following structure:

# '#' starts a comment line.
# Function names are not mandatory; unknown funcs are named sub_<ADDRESS> when output.
arm_func 0x80000D0
thumb_func 0x800024C AgbMain
# If 'thumb_func' or 'arm_func' is omitted, the type is assumed to be 'thumb_func'.
# A module path may also be provided. Each time a new module is encountered, output switches to that path.
# Omitting the module will continue outputting to the same path.
0x80003b0 main.s CallCallbacks

To disassemble only part of a ROM, say, up to the start of read-only data, provide start and stop addresses:

$ luvdis rom.gba --start 0x0800024C --stop 0x0x81b32b4 -o rom.s

FAQ

How can I get rid of large blocks of raw bytes in the disassembly?

By default, Luvdis treats areas of a ROM that it can't determine are executable as byte data. You can change this behavior with the default_mode option:

$ luvdis rom.gba --default_mode THUMB -o rom.s

Options

Usage: luvdis disasm [OPTIONS] ROM

  Analyze and disassemble a GBA ROM.

Options:
  --version                   Show the version and exit.
  -o, --output FILE           Disassembly output path. If configuration
                              contains module information, this is only the
                              initial output path.
  -c, --config FILE           Function configuration file.

  -co, --config-out FILE      Output configuration. If any functions are
                              'guessed' by Luvdis, they will appear here.
  -D, --debug                 Turn on/off debugging behavior.
  --start INTEGER             Starting address to disassemble. Defaults to
                              0x8000000 (the start of the ROM).
  --stop INTEGER              Stop disassembly at this address. Defaults to
                              0x9FFFFFF (maximum ROM address).
  --macros FILE               Assembler macro file to '.include' in
                              disassembly. If not specified, default macros
                              are embedded.
  --guess / --no-guess        Turn on/off function guessing & discovery.
                              Default is to perform guessing.
  --min-calls INTEGER RANGE   Minimum number of calls to a function required
                              in order to 'guess' it. Must be at least 1,
                              defaults to 2.
  --min-length INTEGER RANGE  Minimum valid instruction length required in
                              order to 'guess' a function. Must be at least 1,
                              defaults to 3.
  --default-mode [THUMB|BYTE|WORD]
                              Default disassembly mode when the nature of
                              an address is unknown. Defaults to 'BYTE'.
  --help                      Show this message and exit.

ROM Detection

To display information about a ROM and check if its hash is in the database:

$ luvdis info unknown_rom.gba
ROM detected: 'Pocket Monsters - Ruby (Japan)' ✔
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].