1
0
mirror of https://github.com/djhackersdev/bemanitools.git synced 2025-02-26 22:49:28 +01:00

649 Commits

Author SHA1 Message Date
icex2
d92987b229
Merge 5f9aaeddf93519573dea5f4374450c0879129298 into sapling-pr-archive-icex2 2025-02-07 12:59:34 +01:00
icex2
5f9aaeddf9 feat: nvgpu tool for tweaking nvidia gpu driver settings
An open source re-implementation of the “NvDisplayConfigLDJ"
tool with additional enhancements.

This can be used to tweak your nvidia GPU driver settings to
create custom display timings to address IIDX’s requirement
if expecting proper display timings. This can also be used for
any legacy IIDX versions that even expect very specific display
timings, e.g. 59.95 or 60.05 hz.

Furthermore, creating application profiles allows further tweaks
to important GPU settings such as the current performance mode
setting. This is crucial to ensure the GPU is not going into any
kind of power saving states which results in non-smooth
scrolling during gameplay and micro stuttering that cannot
be measured on application level.
Summary:

Test Plan:
2025-02-07 12:59:28 +01:00
icex2
4cbef617a8
Merge 218ffe72c1f3ea330053d5d64d7b67fa719a03a2 into sapling-pr-archive-icex2 2025-02-07 12:38:42 +01:00
icex2
2ca95ab6d8
Merge 61691f06a7806486bbaa9d5ef2a3e501c538f5cf into sapling-pr-archive-icex2 2025-02-07 12:38:30 +01:00
icex2
61691f06a7 feat: nvgpu tool for tweaking nvidia gpu driver settings
An open source re-implementation of the “NvDisplayConfigLDJ"
tool with additional enhancements.

This can be used to tweak your nvidia GPU driver settings to
create custom display timings to address IIDX’s requirement
if expecting proper display timings. This can also be used for
any legacy IIDX versions that even expect very specific display
timings, e.g. 59.95 or 60.05 hz.

Furthermore, creating application profiles allows further tweaks
to important GPU settings such as the current performance mode
setting. This is crucial to ensure the GPU is not going into any
kind of power saving states which results in non-smooth
scrolling during gameplay and micro stuttering that cannot
be measured on application level.
2025-02-07 12:33:16 +01:00
icex2
218ffe72c1 feat: Add iidxio-async implementation
A shim library implementing the same concept as the already
existing ddrio-async library. The iidxio implementation takes
another iidxio library and runs it asynchronously which may
improve performance for certain iidxio implementations,
e.g. if the send and receive functions are driving actual IO
calls synchrously and are expensive.

This is not a replacement for a well engineered and proper
implementation of a iidxio library for any specific use-case.
It does not fix bad performance of existing implementations,
i.e. if the poll rate is too low because actual IO is too slow.

Use with caution and know why and when you need to use
it.
2025-02-07 12:18:55 +01:00
icex2
8c5cf383b6
Merge 94aa0bdda34cd382c342458809ee16dd9bd0441b into sapling-pr-archive-icex2 2024-02-25 09:36:13 +01:00
icex2
075381481d merge commit for archive created by Sapling 2024-02-25 09:35:20 +01:00
icex2
94aa0bdda3 feat(avs-util): Add helper to translate property errors 2024-02-25 09:34:37 +01:00
icex2
70e8e2a965 fix(avs): Incorrect function signature
After getting doubts, I looked this one up again on the
assembly. The decompiled output confused me
and no actual value is being returned there.
2024-02-25 09:34:37 +01:00
icex2
d1db1d816f
Merge d3273bf1d8f4e9da6a7e8bd98e0d3c233d89ede8 into sapling-pr-archive-icex2 2024-02-25 09:33:50 +01:00
icex2
d3273bf1d8 fix(avs): Incorrect function signature
After getting doubts, I looked this one up again on the
assembly. The decompiled output confused me
and no actual value is being returned there.
2024-02-25 09:33:42 +01:00
icex2
f4f8e7d8e2
Merge c369412f70f42e7fece4a7a9c918a947044e15b9 into sapling-pr-archive-icex2 2024-02-25 09:32:24 +01:00
icex2
84ff799024
Merge e12cd63ba2ec72a3d6ee2cec431df9ff6800d7a7 into sapling-pr-archive-icex2 2024-02-25 09:31:08 +01:00
icex2
c369412f70 fix(mingw): Version upgrade caused this to error
HRESULT not defined fixed by including windows header
2024-02-25 09:30:53 +01:00
icex2
26d1da8660 refactor(dist): Config and .bat files
Move everything to new launcher.xml configuration
files. Adjust the bootstrapping of launcher in the
.bat files. Features such as copying the default
props/ files to nvram are now handled by launcher.

Using the PATH variable, bemanitools binaries can
live in their own dedicated bemanitools/ subfolder
next to props/ and modules/ now. All original
binaries are expected to be kept in a modules/
folder like on stock data.
2024-02-25 09:30:53 +01:00
icex2
04310f49fd refactor(launcher): Major re-work of launcher
Kudos to Shiz for providing the groundwork for this.

Fundamentally re-think how launcher operates and
bootstrapping the games is managed and configured.

This brings it significantly closer to how the original
bootstrap is doing the job: launcher now utilizes the
data (structures) provided by the bootstrap.xml configuration
file. This creates compatibility with vanilla data dumps
and original stock images. Note that bemanitools does not
include any code or means to run DRM'd data, only decrypted.

But, this allows users to keep decrypted dumps as stock as
possible which means:

* No copying around of property files anymore
* Keep the modules/ folder with the binaries
* Have bemanitools binaries separate in the data
* No need to edit/customize the original configuration files

A list of key features of the "new" launcher:

* Boostrap games by following the configuration provided by
  stock game's bootstrap.xml files
* Custom launcher.xml configuration file that adds further
  launcher configurable features, composability of
  bootstrap.xml configuration(s) as well as configuration
  overriding/stacking of selected types of configurations,
  e.g. eamuse config, avs-config. The latter eliminates
  the need for modifying stock config files in the prop/
  folder
* Unified logging system: launcher and AVS logging uses
  the same logger, all output can now be in a single file
* Original features such as various hook types still
  available

Due to the significant architectural changes, this also
breaks with any backwards compatibility to existing
launcher setups. Thus, users need to migrate by re-applying
the new configuration format and migrating their config
parameters accordingly.

Further migration instructions and updated documentation
will be provided upon release.

Co-authored-by: Shiz <hi@shiz.me>
2024-02-25 09:30:53 +01:00
icex2
d72996c5d9 refactor(inject): Use new core thread and log modules
Keep this a separate commit because this also removes
inject's own logging engine and replaces it with the
streamlined core API. The core API provides all the
features of inject's own logging engine which also
performed horribly. The entire logging operation
was locked which included expensive operations
that formatted the log messages and required
memory allocations and copying around data.

The core API's implementation at least only
synchronizes the actual IO operations
(though this can be improved further with an
actual async logging sink, TBD)
2024-02-25 09:30:53 +01:00
icex2
5ac858e15d chore: Delete old log and thread modules in util
The log API stopped scaling already a while ago and needs
considerable refactoring to consider the various use-cases
that emerged since it was first created on alpha versions
of bemanitools.
2024-02-25 09:30:53 +01:00
icex2
e4a221e15b refactor: Entire code base, thread and log usage
Boils down to:
- Include headers
- Reduce boiler plate with helpers
- Swap out explicit usages with core API layer
  and ensure the right API is configured beforehand
2024-02-25 09:30:53 +01:00
icex2
ea835b32ee refactor(api): Thread and log API
Split files and add name spacing.
2024-02-25 09:30:53 +01:00
icex2
fb1442b734 feat: Add helper to set avs implementations
Doesn't really reduce boiler plate but adds
clarity with a more meaningful function name
what the operation does.
2024-02-25 09:30:53 +01:00
icex2
87b7e53973 feat: Add core module
This module contains the "core" (API) of
bemanitools which includes an abstraction
layer for threads and logging at this time.

The threads API is very close to what
util/thread already was with some structural
enhancements which make it easier to understand
and work with the API, I hope. Some additional
helpers (*-ext module) support in doing common
tasks, e.g. setting up the thread API with other
modules.

The log(ging) part receives a major overhaul to
address known limitations and issues with the
util/log module:
- Cleaner API layer
- Separate sinks from actual logging engine
- Sinks are composable
- Improved and cleaner compatibility layer
  with AVS logging API

Additional "extensions" (*-ext modules) add
various helper functions for common tasks like
setting up the logging engine with a file and stdout
sink.

The sinks also improved significantly with the file
sink now supporting proper appending and log rotation.
Logging to stdout/stderr supports coloring of log
messages which works across logging engines.

Overall, this refactored foundation is expected to
support future developments and removes known
limitations at the current scale of bemanitools such as:
- Reducing boiler plate code across hooks
- Interop of bemanitools and AVS (and setting the foundation
  for addressing currently missing interop, e.g. for
  dealing with property structures without AVS)
- Addressing performance issues in the logging engine
  due to incorrect interop with AVS
2024-02-25 09:30:53 +01:00
icex2
2e45f095ba feat(avs-util): Add helper to translate property errors 2024-02-25 09:30:53 +01:00
icex2
e12cd63ba2 Fix(avs): Incorrect function signature
After getting doubts, I looked this one up again on the
assembly. The decompiled output confused me
and no actual value is being returned there.
2024-02-25 09:30:47 +01:00
icex2
a4b3f92935 feat(avs): Add property get and clear error functions
Use these to improve error handling by allowing
one to provide additional error information on
property related operations.
2024-02-25 09:23:02 +01:00
icex2
1126011d99
Merge 8804e667b34e0ce3efc9ba73819d7c7a0ae5d100 into sapling-pr-archive-icex2 2024-02-25 09:22:54 +01:00
icex2
6a98ce1f59 feat(dev): Add a separate docker dev container
Improve the development experience by providing
an additional docker container that can be started
and used as an interactive development environment.
It provides all the tools and a stable environment
for building (identical to the build container).
2024-02-25 09:14:59 +01:00
icex2
dc6e745533
Merge f5b8af3f2acc820597ecccc69d52675119d79cde into sapling-pr-archive-icex2 2024-02-25 09:14:52 +01:00
icex2
8804e667b3 feat(avs): Add property get and clear error functions
Use these to improve error handling by allowing
one to provide additional error information on
property related operations.
2024-02-25 09:14:42 +01:00
icex2
f5b8af3f2a feat(dev): Add a separate docker dev container
Improve the development experience by providing
an additional docker container that can be started
and used as an interactive development environment.
It provides all the tools and a stable environment
for building (identical to the build container).
2024-02-25 09:14:42 +01:00
icex2
5833197b03 fix(hook): Add missing hook_table_revert impl
Allow hooks to cleanup when they are shut down.
2024-02-25 09:09:12 +01:00
icex2
339bf0dfed merge commit for archive created by Sapling 2024-02-25 09:08:50 +01:00
icex2
6a320a38c0 fix(mingw): Version upgrade caused this to error
HRESULT not defined fixed by including windows header
2024-02-25 09:08:26 +01:00
icex2
d8a5619a51 refactor(dist): Config and .bat files
Move everything to new launcher.xml configuration
files. Adjust the bootstrapping of launcher in the
.bat files. Features such as copying the default
props/ files to nvram are now handled by launcher.

Using the PATH variable, bemanitools binaries can
live in their own dedicated bemanitools/ subfolder
next to props/ and modules/ now. All original
binaries are expected to be kept in a modules/
folder like on stock data.
2024-02-25 09:08:26 +01:00
icex2
ab6c3fc8bc fix(hook): Add missing hook_table_revert impl
Allow hooks to cleanup when they are shut down.
2024-02-25 09:07:54 +01:00
icex2
215a4bdb15 refactor(launcher): Major re-work of launcher
Kudos to Shiz for providing the groundwork for this.

Fundamentally re-think how launcher operates and
bootstrapping the games is managed and configured.

This brings it significantly closer to how the original
bootstrap is doing the job: launcher now utilizes the
data (structures) provided by the bootstrap.xml configuration
file. This creates compatibility with vanilla data dumps
and original stock images. Note that bemanitools does not
include any code or means to run DRM'd data, only decrypted.

But, this allows users to keep decrypted dumps as stock as
possible which means:

* No copying around of property files anymore
* Keep the modules/ folder with the binaries
* Have bemanitools binaries separate in the data
* No need to edit/customize the original configuration files

A list of key features of the "new" launcher:

* Boostrap games by following the configuration provided by
  stock game's bootstrap.xml files
* Custom launcher.xml configuration file that adds further
  launcher configurable features, composability of
  bootstrap.xml configuration(s) as well as configuration
  overriding/stacking of selected types of configurations,
  e.g. eamuse config, avs-config. The latter eliminates
  the need for modifying stock config files in the prop/
  folder
* Unified logging system: launcher and AVS logging uses
  the same logger, all output can now be in a single file
* Original features such as various hook types still
  available

Due to the significant architectural changes, this also
breaks with any backwards compatibility to existing
launcher setups. Thus, users need to migrate by re-applying
the new configuration format and migrating their config
parameters accordingly.

Further migration instructions and updated documentation
will be provided upon release.

Co-authored-by: Shiz <hi@shiz.me>
2024-02-25 09:07:54 +01:00
icex2
4ac1399923 refactor(inject): Use new core thread and log modules
Keep this a separate commit because this also removes
inject's own logging engine and replaces it with the
streamlined core API. The core API provides all the
features of inject's own logging engine which also
performed horribly. The entire logging operation
was locked which included expensive operations
that formatted the log messages and required
memory allocations and copying around data.

The core API's implementation at least only
synchronizes the actual IO operations
(though this can be improved further with an
actual async logging sink, TBD)
2024-02-25 09:07:54 +01:00
icex2
f688eead44 chore: Delete old log and thread modules in util
The log API stopped scaling already a while ago and needs
considerable refactoring to consider the various use-cases
that emerged since it was first created on alpha versions
of bemanitools.
2024-02-25 09:07:54 +01:00
icex2
e8221631f9 refactor: Entire code base, thread and log usage
Boils down to:
- Include headers
- Reduce boiler plate with helpers
- Swap out explicit usages with core API layer
  and ensure the right API is configured beforehand
2024-02-25 09:07:54 +01:00
icex2
0afca1da49 refactor(api): Thread and log API
Split files and add name spacing.
2024-02-25 09:07:54 +01:00
icex2
734c17a0a2 feat: Add helper to set avs implementations
Doesn't really reduce boiler plate but adds
clarity with a more meaningful function name
what the operation does.
2024-02-25 09:07:54 +01:00
icex2
6940a9de4b feat: Add core module
This module contains the "core" (API) of
bemanitools which includes an abstraction
layer for threads and logging at this time.

The threads API is very close to what
util/thread already was with some structural
enhancements which make it easier to understand
and work with the API, I hope. Some additional
helpers (*-ext module) support in doing common
tasks, e.g. setting up the thread API with other
modules.

The log(ging) part receives a major overhaul to
address known limitations and issues with the
util/log module:
- Cleaner API layer
- Separate sinks from actual logging engine
- Sinks are composable
- Improved and cleaner compatibility layer
  with AVS logging API

Additional "extensions" (*-ext modules) add
various helper functions for common tasks like
setting up the logging engine with a file and stdout
sink.

The sinks also improved significantly with the file
sink now supporting proper appending and log rotation.
Logging to stdout/stderr supports coloring of log
messages which works across logging engines.

Overall, this refactored foundation is expected to
support future developments and removes known
limitations at the current scale of bemanitools such as:
- Reducing boiler plate code across hooks
- Interop of bemanitools and AVS (and setting the foundation
  for addressing currently missing interop, e.g. for
  dealing with property structures without AVS)
- Addressing performance issues in the logging engine
  due to incorrect interop with AVS
2024-02-25 09:07:54 +01:00
icex2
1d489643d1 feat(avs-util): Add helper to translate property errors 2024-02-25 09:07:54 +01:00
icex2
33fee83aff feat(avs): Add property get and clear error functions
Use these to improve error handling by allowing
one to provide additional error information on
property related operations.
2024-02-25 09:07:54 +01:00
icex2
8b377f256a feat(dev): Add a separate docker dev cotainer
Improve the development experience by providing
an additional docker container that can be started
and used as an interactive development environment.
It provides all the tools and a stable environment
for building (identical to the build container).
2024-02-25 09:07:54 +01:00
icex2
64cc7084dc merge commit for archive created by Sapling 2024-02-25 09:02:50 +01:00
icex2
7a086ea60b fix(hook): Add missing hook_table_revert impl
Allow hooks to cleanup when they are shut down.
2024-02-25 09:02:35 +01:00
icex2
7ee9a2e219 fix(dist): Incorrect versioning for ddr distribution packages
Apparently forgotten to get updated to reflect the
currently supported versions correctly.
2024-02-25 08:52:00 +01:00
icex2
fa5a50167f
Merge 7a56fab96e5639de37700937b3107116b58dae8f into sapling-pr-archive-icex2 2024-02-25 08:51:32 +01:00