Git Product home page Git Product logo

lemon's Introduction

logo SceneGate

Stable version   GitHub commits since latest release (by SemVer)   Build and release   MIT License  

Work-in-progress tool for reverse engineering, file format analysis, modding and localization.

  • 📁 Navigate the virtual file system from Yarhl.
  • 🔁 Convert files with Yarhl converters via plugins.
  • 🔎 View the content of files
    • .NET objects as property grid or YAML/JSON
    • PO viewer and editor

Demo PO format view

Demo object view

Supported plugins

  • 🔧 Generic:
  • 🕹️ Platforms:
  • 🎩 Games:
    • Texim.Games: images from some DS games
    • LayTea: Professor Layton games (London Life only for now)
    • AmbitionConquest: Pokémon Conquest DS

Installation

The project ships the application as a portable ZIP file that does not require any installation. Just unzip and run!

Documentation

Feel free to ask any question in the project Discussion site!

Check our on-line documentation for more information about the file formats and how to use the tools.

Build

The project requires to build .NET 8.0 SDK.

To build, test and generate artifacts run:

# Build and run tests
dotnet run --project build/orchestrator

# (Optional) Create bundles (nuget, zips, docs)
dotnet run --project build/orchestrator -- --target=Bundle

License

The software is licensed under the terms of the MIT license.

The information and software provided by this repository is only for educational and research purpose. Please support the original game developers by buying their games.

lemon's People

Contributors

pleonex avatar worstaquaplayer avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

Forkers

worstaquaplayer

lemon's Issues

Move `NcchHeader` into a child node

Is the feature request related to a problem?
To be able to easily access to the NCCH header from generic tools (like SceneGate), it would be better if it's a node as part of the NCCH NodeContainerFormat, instead of just a property.

Describe the solution you'd like
Similar to NitroRom for NDS, put the format of NcchHeader as a node of the NodeContainerFormat generated by Binary2Ncch.

Describe alternatives you've considered
None.

Additional context
None.

Implement TMD generation when packing a CIA.

Is your feature request related to a problem? Please describe.
As mentioned in #12, generating a new CIA binary with modified content will not work properly. (Maybe it works in emulator by luck, but not on a real console).

Describe the solution you'd like
When using NodeContainer2BinaryCia, it should create a new TMD by reading the original file to get information like the content info and content chunks and use it to create a new TMD.

Proposed plan of implementation (same or different PRs):

  • Create two new properties in the TitleMetadata class and read them when using Binary2TitleMetadata, the sign type and the sign size.
  • When using NodeContainer2BinaryCia, instead of writing the binary of the "title" child, it would create and write a new one by using the TitleMetadata properties and by reading some information from the original binary (content info records).

Describe alternatives you've considered
I thought of making more properties to the TitleMetadata class, but that would be hard to make since some relies on hashes and the content info records are long.

Additional context
I have some working code that goes with my proposed plan of implementation. If this is okay, then I'll make a pull request.

Implement TitleMetadata to binary converter

Is your feature request related to a problem? Please describe.
In order to generate a valid CIA, we need to update the TMD and write it back [#13].

Describe the solution you'd like

  • Implement a converter to write into binary format the TMD (TitleMetadata): TitleMetadata2Binary. Skip the work related to signatures.
  • Add integration tests so the generation works: it should skip checking the bytes related to signatures.

Describe alternatives you've considered
Implement it inside the CIA converter but for maintainability and future, a new converter we can re-use would be better.

Implement NCCH packing

Description
Implement a converter to pack/write nodes into the binary format NCCH.

Describe the solution you'd like
Create a new class Ncch2Binary that implements IConverter<NodeContainerFormat, BinaryFormat>. The input NodeContainerFormat should have a specific folder hierarchy, like a node with the format NcchHeader.

Proposed plan of implementation (same or different PRs):

  • Read the remaining of the NCHH header in Binary2Ncch (the TODOs).
  • Implement integration test.
  • Implement Ncch2Binary converter.

Describe alternatives you've considered
The current approach of having the header as part of the property class instead of as a specific node. However, it would be harder for generic tools to display the header and being a separate node can simplify potential future converters into yaml or binary.

Additional context
Tests should be implemented in NcchConverterTests and they should verify that we generate back and forward the exactly same binary. We would need to add one new test that does something like this:

using var nodes = containerConverter.Convert(original);
using var actualBinary = binaryConverter.Convert(nodes);
Assert.That(original.Stream.Compare(actualBinary.Stream), Is.True, "Streams are not identical");

Validate container RSA signatures

Validate the different signatures avaiable in the NCCH and other containers. The public key should be provided via a class in a external file.

Documentation explaining how to get the public key should be available.

This should make possible to validate original dumps.

Implement NCCH decryption and encryption

Implement the NCCH encryption and decryption (AES).

The list of keys should come from a new class (key database). It should not be in the repository. The user must always provide these keys.

Documentation explaining how to obtain the keys from your own 3DS should be available.

This would make possible to read direct dumps from original games.

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.