Cxbx-reloaded: Refactor HLE symbol detection

Created on 2 May 2018  路  6Comments  路  Source: Cxbx-Reloaded/Cxbx-Reloaded

Currently, there's lots of code in HLE intercept that resolves a number of symbols. This code has grown out of proportion and is difficult to maintain.

For this issue, de-duplicate similarly looking code by moving it towards functions that can handle all current situations.

This issue would become less cumbersome if OOVPA-based XREF lookup is done first - see https://github.com/Cxbx-Reloaded/Cxbx-Reloaded/issues/669

OOVPA enhancement request

Most helpful comment

I'm talking here about our own C(++) code, the code that uses the OOVPA to detect symbols.

Specifically, unwieldy code like the 400 lines onward from this : https://github.com/Cxbx-Reloaded/Cxbx-Reloaded/blob/master/src/CxbxKrnl/HLEIntercept.cpp#L460

For this issue it doesn't matter in which project this code lives - this issue merely requests a refactoring of the current code so it becomes better maintainable.

All 6 comments

I disagree for several reasons.

  • Reverse engineer non-API copyright material into a function to patch will put at risk for DMCA. IMHO is black area. APIs are only thing is a gray area.
  • Internal functions can change several times. (I personally had seen it happen with xbox's DirectSound library while working on getting HLEDatabase to be more complete version.)
  • Is not always in cdecl call method, it will be optimized in any way compiler which Microsoft can choose from over time. (I'm talking about what they used in the past such as upgraded their own compiler to optimize things better.)
  • We're moving HLEDatabase to Symbol Table Database library to separate from Cxbx-R project.

I'm talking here about our own C(++) code, the code that uses the OOVPA to detect symbols.

Specifically, unwieldy code like the 400 lines onward from this : https://github.com/Cxbx-Reloaded/Cxbx-Reloaded/blob/master/src/CxbxKrnl/HLEIntercept.cpp#L460

For this issue it doesn't matter in which project this code lives - this issue merely requests a refactoring of the current code so it becomes better maintainable.

Ooooooh okay, then I must have misread it. BIG thumbs up for this task. 馃憤

Does this issue should be move into XbSymbolDatabase repo?

Yes please

Moved to XbSymbolDatabase repo.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

childishbeat picture childishbeat  路  4Comments

PatrickvL picture PatrickvL  路  3Comments

PatrickvL picture PatrickvL  路  3Comments

LukeUsher picture LukeUsher  路  4Comments

Margen67 picture Margen67  路  3Comments