GithubHelp home page GithubHelp logo

pieviero / th06 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from happyhavoc/th06

0.0 0.0 0.0 1.36 MB

Decompilation of 東方紅魔郷 ~ the Embodiment of Scarlet Devil (1.02h)

License: Creative Commons Zero v1.0 Universal

Shell 0.14% C++ 82.68% Python 12.97% Java 1.72% Smarty 2.36% Batchfile 0.13%

th06's Introduction

東方紅魔郷 ~ the Embodiment of Scarlet Devil

Decomp Progress

Discord

This project aims to perfectly reconstruct the source code of Touhou Koumakyou ~ the Embodiment of Scarlet Devil 1.02h by Team Shanghai Alice.

This project is still highly work in progress and in its early stages.

Installation

Executable

This project requires the original 東方紅魔郷.exe version 1.02h (9f76483c46256804792399296619c1274363c31cd8f1775fafb55106fb852245)

Copy 東方紅魔郷.exe to resources/game.exe.

Dependencies

The build system has the following package requirements:

  • python3 >= 3.4
  • msiextract (On linux/macos only)
  • wine (on linux/macos only, prefer CrossOver on macOS to avoid possible CL.EXE heap issues)
  • aria2c (optional, allows for torrent downloads, will automatically install on Windows if selected.)

The rest of the build system is constructed out of Visual Studio 2002 and DirectX 8.0 from the Web Archive.

Configure devenv

Run the following script:

# NOTE: On macOS if you use CrossOver.
# export WINE=<CrossOverPath>/wine
./scripts/create_th06_prefix

Building

Run the following script:

python3 ./scripts/build.py

This will automatically generate a ninja build script build.ninja, and run ninja on it.

Contributing

Reverse Engineering

You can find an XML export of our Ghidra RE in the companion repository th06-re, in the xml branch. This repo is updated nightly through [scripts/export_ghidra_database.py], and its history matches the checkin history from our team's Ghidra Server.

If you wish to help us in our Reverse Engineering effort, please contact @roblabla on discord so we can give you an account on the Ghidra Server.

Reimplementation

The easiest way to work on the reimplementation is through the use of objdiff. Here's how to get started:

  1. First, follow the instruction above to get a devenv setup.
  2. Copy the original 東方紅魔郷.exe file (version 1.02h) to the resources/game.exe folder. This will be used as the source to compare the reimplementations against.
  3. Download the latest version of objdiff.
  4. Run python3 scripts/export_ghidra_objs.py --import-xml. This will extract from resources/game.exe the object files that objdiff can compare against.
  5. Finally, run objdiff and open the th06 project.

Choosing a function to decompile

The easiest is to look at the config/stubbed.csv files. Those are all functions that are automatically stubbed out. You should pick one of them, open the associated object file in objdiff, and click on the function of interest.

Then, open the correct cpp file, copy/paste the declaration, and start hacking! It may be useful to take the ghidra decompiler output as a base. You can find this output in the th06-re repository.

Credits

We would like to extend our thanks to the following individuals for their invaluable contributions:

th06's People

Contributors

roblabla avatar renzo904 avatar pieviero avatar pre-commit-ci[bot] avatar marysaka avatar 0x32767 avatar github-actions[bot] avatar wearrrrr 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.