Giter Club home page Giter Club logo

game-builder-garage-editor's Issues

Edited games cannot be uploaded

Edited game files load fine when opening them normally, however when trying to upload them to the online gallery, the game will tell you the data is corrupted. Copying or editing the file in the game (in an attempt to get it to fix the file itself) doesn't make a difference. This limits the usefulness of this save editor quite a lot.

I think this is likely due to a hash somewhere in the savedata not matching the game file after it's been edited. I've located what appears to be a file hash list, but need to figure out how these hashes are generated to be able to check if this is the culprit.

Reference save file (no levels here are edited):
savedata.zip

The relevant files are

  • LgcTpb.bin - Table of game files, this contains some kind of hash for each file
  • LgcTpbFile_MyGame[ ].bin - Game files, these don't contain a hash
  • Other files are unknown / likely irrelevant

LgcTpb.bin contains an array of hashes with the key 343f7f9b (mValueHashCache[].u32), which is an uint32 array containing an element for each game file.

The hashes in the reference save's LgcTpb.bin are:

0x3cc5177a, 0xf88aea9a, 0xcd8c72b1, 0xc4690251, 0xe76f4b06, 0xf35ee1b1, 0xdd6bdd3b, 0x1b893be3

Reverse engineering notes:

  • I've already tried checking if these are the crc32 of the file data -- they're not
  • Function at 71008cd050 handles parsing LgcTpb.bin
  • Function at 71008ce0c0 handles looping through all the mValueHashCache[].u32 array elements in LgcTpb.bin
  • Function at 71007a3080 seems to handle adding keys to the game file (or something else?) for upload, including a key called mValueHash

Game thumbnail gamma

Game thumbnails seem to appear darker here than they are in-game. Looking through the rom it looks like Nintendo is setting gamma correction to 1.5, so I think thumbnails need to be gamma-corrected to .66 to correct for this

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.