Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Ikarus mods support?#396

Unanswered
Elgcahlxukuth asked this question inQ&A
Discussion options

Hi!

What is your view on supporting mods that use Ikarus (and LeGo)?

Are you planning to support such mods? Do you think it is possible to just execute such mods, without adjusting them to be able to work with OpenGothic?

I could see in another topic you mentioned that you execute the game with Chronicles of Myrtana .ini file, so what exactly do you achieve by that? Are the mods already supported to some extent? I understand that OpenGothic parses Gothic .d scripts, so any changes made to the game via the scripts will automatically be applied. But since Ikarus framework hacks the Gothic .exe memory, is it possible to map all theinstructions to data/functions in OpenGothic, so that the mods work?

I don't fully understand how exactly does the Ikarus achieve its goals, so I can't judge the difficulty/feasibility of supporting Ikarus mods in any Zengine reimplementation (like OpenGothic). I would gladly hear about this from someone more experienced :)

Cheers,
Elg'

You must be logged in to vote

Replies: 1 comment

Comment options

Try
Jan 30, 2023
Maintainer

Hi,@Elgcahlxukuth !

I don't fully understand how exactly does the Ikarus achieve its goals

In original Zengine, there are many bugs and some of them can be leveraged. For instance[idx] in script implemented as*(obj_ptr + mem_offset +idx*sizeof(T)), with no range checks. This alone is enough for game mod to scout whole process memory and do stuff.
Ikarus uses more elegant way of memory hacking, yet principle stays the same. Common name for this volubility is DMA(direct memory access).
Script can useint, as 32-bit integer to represent memory pointers, since game run in 32bit mode.
On top of this Gothic.exe(and Gothic2.exe) that is shipped is debuggable executable. This allows to replace C++ vtbl with high level of reliability, with no worry forinline or other complications that optimization can bring to binary code.
Also debug symbols are useful for authors to build a map of game memory and leverage DMA with relative ease.

This may look like very ugly and fragile hack. And it is. Even, if someone (THQ) will use original C++ code to build new executable, all of this will break.

On OpenGothic side it impossible to have 100% support, but we may have some subset of features to allow for some content to run.

  1. Ikarus functions_^,_@ (operator*() andoperator&() in C++ terms) are intercepted and handled by engine, but only a few ZEngine classes are implemented.
    As states inSupport for Ikarus/LeGo #231 - only 10 of 136 items are working atm.
  2. Stuff like inline assembler and *.dll load - won't do. For security reasons I would like to make VM as fully closed sandbox

Chronicles of Myrtana .ini file, so what exactly do you achieve by that?

Not playable atm, using it for performance-profiling purposes and testing:
изображение
изображение
Not sure if noticeable, but sky and SSAO are quite broke, and shadows flickering, due to floating-point rounding.
Also ray-tracing crashes with device-lost (some bug in bindless code).
So, nice testing for me :)

You must be logged in to vote
0 replies
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
2 participants
@Elgcahlxukuth@Try

[8]ページ先頭

©2009-2025 Movatter.jp