Giter Club home page Giter Club logo

Comments (18)

fearedbliss avatar fearedbliss commented on April 27, 2024 15

from devilution.

mewmew avatar mewmew commented on April 27, 2024 7

I don't know much about this but from efforts in the Linux community (Debian and maybe others) to produce byte identical executables, you will need to remove any type of code that may cause the compiler to generate output that is variable. Things like timestamps used in the compiler and other things will need to be taken into account

Indeed. Timestamps would have to be removed and other parts that are variable from build to build as well. Good thing is those are easily identified.

So one approach would be to simply extract the contents of the .text section and dump that, then compare between the binaries. Of course, initially the output will be very different, and thus hashes can only be used as a final measurement. But before then we can use something like Hamming distance to get a score for how many edits have been made.

We can also keep track of which offsets correspond to which function, and in this way check off one function at the time.

Note, relative offsets to addresses will be variable if the output binary rearranges where code and data is stored, and also depending on the size of these parts.

It most definitely won't be an easy challenge. But, at least to me, that's what makes it fun!

Also, this is not goal number one. That would be to fix crashes, improve stability, fix builds across the main platforms (Windows, Linux, Mac), etc. Rather, this can be thought of as an aspirational goal that Devilution may one day achieve, or perhaps more likely not. But I for one would definitely want to be part of making it happen!

Cheers,
/u

from devilution.

janisozaur avatar janisozaur commented on April 27, 2024 2

There are already projects like https://github.com/pret/pokeruby or https://github.com/MimicYou/pokeredbeta that build hash-perfect recreations of their originals.

from devilution.

mewmew avatar mewmew commented on April 27, 2024 1

Just make sure this stays as original as possible. I have seen The Hell mod and I thought it was grindingly unbalanced and a weird distortion of what Diablo is.

No worries, this is tracked by #11.

from devilution.

seritools avatar seritools commented on April 27, 2024 1

See this comment for a major update!

from devilution.

mewmew avatar mewmew commented on April 27, 2024 1

PS: If I should stop looking for these housekeeping tasks, please tell me ;)

It's great you are looking for housekeeping tasks :) Please continue.

As for this issue, it is similar but slightly different from #111. For instance, there are other issues to consider even when we have exactly the same compiler, such as time stamps being included in the binary. This issue mentions some of those aspects. However, I'd be fine with closing this issue as the primary work now is to get bin perfect assembly, which is tracked by #111 and the bin exact milestone. Later on when we want to figure out specific issues, such as how to handle time stamps, we can open new dedicated issues for those.

Closing for now. We can re-open at a later time, should we feel like.

from devilution.

 avatar commented on April 27, 2024

Oh that's great! I totally forgot about PEiD. So now we know for sure it was 5.10. Thankfully VC 5/6 are very similar and still run on modern systems. I went ahead and made a chart for all versions so we have an easy reference. I'll download 5.10 this next week and configure the project accordingly.
SDK Versions

from devilution.

fearedbliss avatar fearedbliss commented on April 27, 2024

from devilution.

 avatar commented on April 27, 2024

I personally don't a byte for byte copy is possible.

You would literally have the exact code any extra variables or optimizations or anything would completely throw it off.

Mewmew , I respect your energy )

from devilution.

mewmew avatar mewmew commented on April 27, 2024

There are already projects like https://github.com/pret/pokeruby or https://github.com/MimicYou/pokeredbeta that build hash-perfect recreations of their originals.

Wow, that is really cool! Thanks for pointing out these projects.

from devilution.

gp-alex avatar gp-alex commented on April 27, 2024

Hey, Diablo is already decompiled and refactored, the project is called The Hell and source code was hosted on Assembla at least in 2013

from devilution.

mewmew avatar mewmew commented on April 27, 2024

Hey, Diablo is already decompiled and refactored, the project is called The Hell and source code was hosted on Assembla at least in 2013

@gp-alex That's great! Do you know where this source code is hosted?

from devilution.

 avatar commented on April 27, 2024

You are correct, Hellfire was decompiled as early as 2006 IIRC, and The Hell released their sources a few years ago at the Khandurus network. However, it seems to have completely disappeared from the internet, same with The Dark/Khandurus.

The Hell 2 creator still has a copy. He reached out to me a few days ago and said he might pop in a make a contribution or two.

from devilution.

 avatar commented on April 27, 2024

Just make sure this stays as original as possible. I have seen The Hell mod and I thought it was grindingly unbalanced and a weird distortion of what Diablo is.

from devilution.

AJenbo avatar AJenbo commented on April 27, 2024

What compiler was used to generate the exe in the 0.2 release? I patch between it and Diablo.exe seams to indicate a 60% correlation.

from devilution.

 avatar commented on April 27, 2024

I used VC++ 5.10 for all release builds. The GNU makefiles currently don't properly add the Icon and resource files.

from devilution.

mewmew avatar mewmew commented on April 27, 2024

The GNU makefiles currently don't properly add the Icon and resource files.

Added an issue to track this #48.

from devilution.

ChaosMarc avatar ChaosMarc commented on April 27, 2024

I think this issue can be closed. It's topic should be exactly the same as #111 which is newer.

PS: If I should stop looking for these housekeeping tasks, please tell me ;)

from devilution.

Related Issues (20)

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.