Giter Club home page Giter Club logo

Comments (4)

8051Enthusiast avatar 8051Enthusiast commented on June 24, 2024 1

yeah that's possible, it should also be possible to use the generalized version where 0x1003f is made into a parameter (which would also include djb2), while still being able to recover it efficiently with delsum reverse. i can't say i'll get to it soon though.

are there other algorithms you had in mind?

from delsum.

8051Enthusiast avatar 8051Enthusiast commented on June 24, 2024 1

some good news about Add, WAdd and DWAdd: i think you should be able to get them already as modsum width=8, modsum width=16 wordsize=16 and modsum width=32 wordsize=32, and adding in_endian=big would make them use big-endian values (not setting the module parameter lets it default to 0, which is the same as no modulus at all).

haven't thought about the sign stuff, so i will definitely implement that when i get around to that.

from delsum.

bucanero avatar bucanero commented on June 24, 2024

for sure, a generic alternative that can cover other variations (sdbm, djb2) would be great.

Regarding other algorithms, I usually dig around save-game checksums for save-game editing, and there are a bunch of simple checksums that could be added too.

There's the "add" family, generally referenced as ADD, WADD, DWADD (8-bit, 16-bit, 32-bit), these are super simple, just a sum of bytes, like:

Add:

    while (len--)
        add += (uint8_t) *data++;

WAdd:

    len = len/2;
    while (len--) {
        wadd += (uint16_t) *data;
        data += 2;
    }

DWAdd:

    len = len/4;
    while (len--) {
        dwadd += (uint32_t) *data;
        data += 4;
    }

Note: some variations use signed int8, int16, int32 instead of unsigned, or read values as big-endian, and some other variations are all substractions instead of sums, like while (len--) { sub -= (uint8_t) *data++; }.

I understand if you don't have time right now, but it would be great to have such nice reversing tool when working with save-game data. 😄

from delsum.

bucanero avatar bucanero commented on June 24, 2024

thanks for the feedback!

from delsum.

Related Issues (7)

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.