Commit Graph
23 Commits
Author SHA1 Message Date
icex2 e61dfb3977 refactor: Move all hook and IO libraries to use btools log and thread api
Remove usages of AVS threads and logging functions from the bemanitools backend. Use the bemanitools 6 API instead
which propagates interfaces to call thread and log APIs.

Prior design decisions for using these were:
- have a single log stream through the AVS logging system for “neatness”, log output redirection options in launcher, and theoretically logging to an xrpc endpoint
- IIDX 19 to IIDX 24 crash the AVS logging engine in libavs due to IO hook code running in a non AVS thread (threads in ezusb library) causing a stackoverflow when trying to acquire a mutex (see dev journal 2018-02-10-logging-breakdown-avs.md for details)

With a flexible log sink architecture in the core of bemanitools, and a separate writer function that is hooked up as a log writer to AVS, log streams are still unified on a sink level. This takes care of having all log messaged sinked to the same targets no matter how many logging engines are using them.

This avoids going through the AVS logging engine with the IO related hooking code in iidx, which just uses the bemanitools logging engine instead.

Furthermore, this removes any needs to having to switch thread and logging implementations once AVS is booted which significantly simplifies the runtime orchestration during bootstrapping.

The log-server, which was specifically implemented for iidx to solve the threading issue, can also be removed now. Unfortunately, this also caused performance issues such as stuttering due to it’s rather simplistic implementation.
2024-08-15 11:34:31 +02:00
icex2 57e68f928a feat: bemanitools 6 initial refactoring drop, alpha 1
**THIS IS A HIGHLY WORK/DEVELOPMENT IN PROGRESS VERSION**

**THINGS ARE BROKEN AND EVERYTHING IS SUBJECT TO CHANGE**

First cut after massive refactoring with most critical and fundamental changes implemented.
We need to start somewhere, and this might be as good as anything else, so we can get started
with testing, bug fixing and iterating for the next releases.

The following list is non-exhaustive, does not guarantee anything does work, yet, and is supposed
to give a high level idea of what all of this is about. Updated documentation will reflect all of
this at some later point in time in more detail.

* A common "core" now abstracts logging, thread, property and configuration infrastructure and
  provides a common interface. This is used by bemanitools internally as well as all tools, hooks
  and APIs provided and don't depend on the game, version of the game or AVS version available
  anymore
* New bemanitools (public) API
  * Versioned API allowing for handling incremental API changes as well as breaking changes by
    providing a new/different version when necessary
  * Unified interfaces for bemanitools core API, i.e. logging, threads, configuration
  * SDK with examples (TBD)
  * Dogfooding approach: Bemanitools uses its own (public) API to implement and provide fundamental
    features like configurable keyboard implementations for IO or hooks for different games and
    versions
* All bemanitools hooks and IO libraries have been or are about to be re-worked to use the new APIs
* New hook API allows for more fine grained runtime control when stages of the hook are to be
  executed, i.e. pre AVS, before main game, iat hooking instead of relying purely on DllMain
  (which is still a compatible option though)
* launcher as a replacement for bootstrap: Bring it significantly closer to the original bootstrap
  by supporting completely vanilla data and bootstrap.xml configurations to run the games. Note
  that bemanitools does not include any code or means to run DRM'd data, only decrypted
* inject is also being reworked to use as much of the same "infrastructure" as launcher to provide
  a more seamless bootstrapping process for games that keeps pre-eapki data as vanilla as possible
Summary:

Test Plan:
Summary:

Test Plan:
Summary:

Test Plan:
Summary:

Test Plan:
2024-08-15 11:34:31 +02:00
icex2 93e0a090bc 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-08-14 17:53:51 +02:00
Will Xyen 48668837a8 camhook: fix camhook for new style camera detection 2024-05-21 22:29:11 -07:00
icex2 031836ef0e chore: Apply code formatting on entire codebase for consistent style 2023-04-06 15:39:53 +02:00
Will Xyen 537b1fa384 sdvxhook2: fix crash when using sdvxhook2 on certain OS versions 2022-05-27 23:26:17 +00:00
Will Xyen 0ff6134b79 sdvxhook: address comments 2022-03-15 16:50:03 -07:00
Will Xyen 3cf3d44945 sdvxhook2: add nvapi and power hooks 2022-03-15 00:38:46 -07:00
Will Xyen e737d60893 Actually implement the coin mech in BIO2 based games
Properly fixes #45
2020-11-10 18:08:16 -08:00
Will Xyen 3d4df4cd64 [memfile] Add support for faking files in memory 2020-10-18 14:46:34 -07:00
Will Xyen 2d1c09d4e6 sdvxhook: code-format 2020-09-13 19:46:16 -07:00
icex2 f9c0733af3 Adapt everything in BT5 to new capnhook API
This includes:
- Renaming of functions (iohook_invoke_next)
- Slight interface changes (com_proxy_wrap, iohook_push_handler)
- De-duplicate stuff from utils (iobuf, hr)
2020-09-02 19:35:15 +00:00
Will Xyen 9246e7f9e0 sdvx: Allow setting digital amp level from sdvxio
For SDVX 1-4: passes amp values through as-is

For SDVX5: ignores the amp volume control (as the game uses windows volume controls, which will work without any hooks)
2020-08-14 04:38:38 -07:00
Will Xyen 86517bd001 bio2: bio2_bi2a_state -> bi2a_sdvx_state 2020-08-02 23:16:28 -07:00
Will Xyen c7137659bc bio2emu: refactor BIO2 emulation 2020-08-02 23:02:13 -07:00
Will Xyen ad5fbc1f5b sdvxhook2: Add option to force headphone detection on 2020-04-27 10:19:29 -07:00
Will Xyen 2d07bd6f5a d3d9exhook/sdvxhook2: add option to force monitor orientation
also adds adapter hook into sdvxhook2
2020-01-28 04:23:19 -05:00
Will Xyen 3659494c18 misc: touchup some comments 2020-01-13 21:21:43 -05:00
Will Xyen b1329d10bf camhook: Fix cameras not being auto-detected sometimes on older machines
MFStartup needs to be called before any MF functions are used (such as for auto detect)
2019-12-10 15:24:46 -05:00
Will Xyen 74ddd96d32 sdvxhook2: fix usage info naming wrong port 2019-12-01 12:38:22 -05:00
Will Xyen ddd7853810 d3d9exhook: refactor d3d9ex hook from sdvxhook2 to shared library 2019-11-30 10:05:14 -05:00
Will Xyen 51a697659b sdvxhook: remove pci override for gfx hooks and general cleanup 2019-11-30 09:12:08 -05:00
Will Xyen 1d247d44d5 sdvxhook2: Add sdvxhook2 2019-11-26 15:59:57 -05:00