Giter Site home page Giter Site logo

lhsazevedo / tokyo-bus-guide-decomp Goto Github PK

View Code? Open in Web Editor NEW
17.0 3.0 2.0 34.12 MB

Decompiling the Dreamcast game "Tokyo Bus Guide"

C 28.10% Shell 4.37% Python 1.01% Max 0.30% PHP 65.48% Dockerfile 0.16% Smarty 0.30% Assembly 0.28%
reverse-engineering dreamcast sega hacking decompilation

tokyo-bus-guide-decomp's Introduction

Tokyo Bus Guide Decompilation

Test Build Build Matching

Main function hero

Introduction

This project focuses on decompiling the Sega Dreamcast game Tokyo Bus Guide. It prioritizes achieving identical behavior between the original and decompiled code, rather than traditional methods targeting byte-level matching. Key objectives include functional equivalence, scalable decompilation methods, and community collaboration in Dreamcast reverse engineering.

To the best of the author's knowledge, this is the first public Dreamcast game decompilation project.

Approach

Unlike traditional byte-level matching, this project uses a custom SH4 object simulator and testing framework. This tool tests decompiled functions against their original counterparts, ensuring exact behavioral replication.

Project Status

This is an ongoing project, the decompilation process will be regularly updated. While under development, the project allows building the game using the available decompiled functions.

Current Achivements:

  • Rebuilding the game binary with decompiled functions alongside original code.
  • Custom logs from decompiled C files, written to the Dreamcast serial interface and on-screen debug text: watch video, view code.
  • CI workflows with matching builds, non-matching builds and unit tests checks.

How to Contribute

Contributions to this project are encouraged and welcomed! Your expertise in code, testing, or documentation can significantly advance this decompilation effort. Detailed contribution guidelines will be available shortly.

Requirements

  • Operating System: Linux Mint or similar Ubuntu-based distributions (additional steps may be required for other distributions).
  • Wine 32.
  • Dreamcast SDK (Sega Library) Ver.1.55J (Google is your friend)

Project Setup

  1. Ensure your SDK is organized as follows.

    „¥„Ÿ„Ÿ bin (From disc Vol.1 dc_sdk/bin)
    „    „¥„Ÿ„Ÿ binadj.exe
    „    „¤„Ÿ„Ÿ ...
    „¥„Ÿ„Ÿ shc (From disc Vol.2)
    „    „¥„Ÿ„Ÿ bin
    „    „¥„Ÿ„Ÿ include
    „    „¤„Ÿ„Ÿ lib
    „¤„Ÿ„Ÿ shinobi (From disc Vol.2)
       „¥„Ÿ„Ÿ driver
       „¥„Ÿ„Ÿ include
       „¥„Ÿ„Ÿ lib
       „¤„Ÿ„Ÿ sample
    
  2. The Hitachi compiler suite expects some environments variables to be set. Create a copy of set_kt.example.sh named set_kt.sh and update the DK_SDK environment variable with your SDK location.

  3. Source your set_kt.sh script to make the environment variables available in the current shell:

    $ source set_kt.sh
    
  4. Build the binary using the provided build.sh script.

    $ ./build.sh
    
    (...)
    
    LINKAGE EDITOR COMPLETED
    ELF2BIN: ELF -> binary converter Ver. 1.04
    Copyright (c) 1998, Hitachi, Ltd.  All rights reserved.
    Module  address: 8c008000 - 8c0fde20
    Convert address: 8c010000 - 8c0fde20  size: 000ede20 (974368)
    
    ================
    Project built :)
    ================
    

A successful build will display "Project built :)".

Docker Container Development

  1. Open run_container.sh with your favorite text editor and update the SDK_PATH variable with the absolute path location of the SDK Files mentioned in the Project Setup

  2. Run run_container.sh. you should be inside a bash shell inside /app (your current folder)

    $ ./run_container.sh
    
  3. Source your set_kt.docker.sh script to make the environment variables available in the current shell:

    $ source ./scripts/set_kt.docker.sh
    
  4. Build the binary using the provided build.sh script.

    $ ./scripts/build.sh
    
    (...)
    
    LINKAGE EDITOR COMPLETED
    ELF2BIN: ELF -> binary converter Ver. 1.04
    Copyright (c) 1998, Hitachi, Ltd.  All rights reserved.
    Module  address: 8c008000 - 8c0fde20
    Convert address: 8c010000 - 8c0fde20  size: 000ede20 (974368)
    
    ================
    Project built :)
    ================
    

A successful build will display "Project built :)".

  1. Install Composer sh4objtest

    $ composer global require lhsazevedo/sh4objtest:dev-main
    
  2. Run the tests

    $ ./scripts/run_tests.docker.sh
    

Acknowledgements

Acknowledgements and contributors will be listed soon.

Useful resources

tokyo-bus-guide-decomp's People

Contributors

estexnt avatar ez2torta avatar lhsazevedo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

estexnt ez2torta

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.