Comments (7)
Is it possible to automate some part of step 3, maybe in a loop, run the game, grep first missing function, prompt to select from a few matching rules and append that rule to a file. Once done, we can then refine that file into the lua51 project and build it... I have no idea if what I am saying here is even feasible as I've never done stuff like that...
In fact I'm a not experienced in reverse engineering so I've no better approaches but do it with brute force. My interest is in rendering optimization but it cannot be done due to lack of source.
from dontstarveluajit.
Simple recompilation may not work, since machine code matching is compiler dependent and must be reworked for different platforms. I'm happy to see someone else could do it...
The key reason for lack of macOS version is that I have no mac devices. Also, as you know, they are so expensive for the people lived in China that nearly all players here are playing game on Windows.
from dontstarveluajit.
Yes, I can see most of your use base do not require macOS support, but Apple products are quite prevalent in some other countries. I am not well versed enough to do manual machine code matching myself but if you are willing to write up a detailed instructions for the steps required, I'd give it a try.
If it is any useful info., I am running Debian testing in an old MacBook Pro, and it works. So x86-64
platform and the compiler is what we need match up against? Here is the result of objdump -all-headers dontstarve_steam
: https://termbin.com/orqc though not sure if it contains anything useful.
from dontstarveluajit.
Yes, I can see most of your use base do not require macOS support, but Apple products are quite prevalent in some other countries. I am not well versed enough to do manual machine code matching myself but if you are willing to write up a detailed instructions for the steps required, I'd give it a try.
If it is any useful info., I am running Debian testing in an old MacBook Pro, and it works. So
x86-64
platform and the compiler is what we need match up against? Here is the result ofobjdump -all-headers dontstarve_steam
: https://termbin.com/orqc though not sure if it contains anything useful.
This is a hard and boring work. But you may try it with following steps (maybe interesting at the first time if you have never done it before):
- Compile linux version of the mod. Startup with linux build world saves much of your time.
- Run the game with the mod and it crashes. Capture the log that it prints out.
- Fix the function mismatch (marked by "Missing") one by one via assembly code comparison (totally almost 100+ functions starts with lua_ or luaL or luaopen) with:
a) modify comparsion algorithm.
b) do some modification on lua51 project so it can generate matching machine code.
As you know, the 3.b) step requires various experiences on compiler, you must use the same compiler as Klei and find out the modifications by Klei via disassembled machine code. After reimplementing theses changes to lua51 project, you can check the newly generated machine code by running game again. If it's matched, then move to next missing function and repeat the instructions.
from dontstarveluajit.
objdump
objdump shows that it exports no lua functions. Machine code matching is the only approach.
from dontstarveluajit.
Is it possible to automate some part of step 3, maybe in a loop, run the game, grep first missing function, prompt to select from a few matching rules and append that rule to a file. Once done, we can then refine that file into the lua51 project and build it... I have no idea if what I am saying here is even feasible as I've never done stuff like that...
from dontstarveluajit.
Is it possible to automate some part of step 3, maybe in a loop, run the game, grep first missing function, prompt to select from a few matching rules and append that rule to a file. Once done, we can then refine that file into the lua51 project and build it... I have no idea if what I am saying here is even feasible as I've never done stuff like that...
Unfortunetly it's impossible to select serveral candidates automatically. Once matching failed, it turns out that klei modified some functions, for example:
int _cdecl lua_XXXXX(lua_State* L) {
// luaC_checkGC(L); // One call to checkGC was removed
}
It would generate totally different machine code at first serveral bytes and invalidates all candidates you find out...
When I was developing windows version, I searched them by some reverse engineering techniques (such as tracing back from resolved ones) and finally get them all resolved.
from dontstarveluajit.
Related Issues (20)
- steam联机版进入服务器报错 HOT 4
- lib32readline6 dependency for Linux (both Dedicated Server and game) HOT 23
- 关于饥荒联机版不能识别luac编译出的字节码的问题 HOT 41
- debug.getinfo(stacklevel, "S").what returns "Lua" instead of "main" when kleloadlua is used to load files. HOT 5
- More than 65536 constants HOT 3
- 支持多线程吗? HOT 3
- 服务器自动存档时卡住 HOT 1
- Not Loading Costumes - Win10 HOT 5
- Beefalo and Scarecow costumes not displaying HOT 2
- 不好意思打搅了,有空的话能看看我哪里做错了吗? HOT 5
- win10系统,steam联机版luajit导致牛的皮肤无法正常显示
- 命中克劳斯后游戏报错弹出
- 2020.08版本用vscode_dlls替换后启动后进入房间报错
- 和神话书说mod有冲突。 HOT 2
- Linux版使用失败 HOT 7
- Support GPU Instancing
- Redirect io.* library to klei's implementation. HOT 1
- Linux服务器版装上周期性卡一下 HOT 10
- Linux dst 客户端使用失败 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dontstarveluajit.