Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
573840a
feat: Add core module
Aug 14, 2024
1702771
feat: Add helper to set avs implementations
Aug 14, 2024
82d1a2d
refactor(api): Thread and log API
Aug 14, 2024
93e0a09
refactor: Entire code base, thread and log usage
Aug 14, 2024
1b38c3d
chore: Delete old log and thread modules in util
Aug 14, 2024
947050d
refactor(inject): Use new core thread and log modules
Aug 14, 2024
35ca49f
refactor(launcher): Major re-work of launcher
Aug 14, 2024
8fde17d
refactor(dist): Config and .bat files
Aug 14, 2024
4b38f50
fix(mingw): Version upgrade caused this to error
Aug 14, 2024
4b352ed
feat(inject): Use new exception handler with stacktraces
Aug 14, 2024
1b8bf7b
feat(util): Separate debug module with proper stacktrace printing
Aug 14, 2024
aaef2d9
feat(launcher): Improve error output when missing vcredist deps
Aug 14, 2024
b087050
fix(make): Include dwarf symbols and remove stripping
Aug 14, 2024
fd9f455
feat(procmon): Library to hook and monitor selected system calls
Aug 14, 2024
106b908
feat(launcher): Integrate procmon as optional dependency
Aug 14, 2024
57e68f9
feat: bemanitools 6 initial refactoring drop, alpha 1
Aug 15, 2024
e61dfb3
refactor: Move all hook and IO libraries to use btools log and thread…
Aug 15, 2024
3987ef9
fix: Mutex the std logging sink on colored messages
Aug 15, 2024
71e6b1e
fix: bootstrapping with logger on extiotest
Aug 15, 2024
87fb71d
feat: Add missing macro to check for errors
Aug 15, 2024
9540e9e
feat: Use async logger in launcher
Aug 15, 2024
903bddd
refactor(config): Use helper to setup logging
Aug 15, 2024
c3d95b0
feat(core): Expose message size on logger as parameter
Aug 15, 2024
a970884
feat(core): Async log sink
Aug 15, 2024
3f4dab5
feat: Add helpers to easily setup the async logging sink
Aug 15, 2024
8bb8c33
sqash with removal of log server
Aug 15, 2024
27e9f8d
feat(inject): Use async log sink for logging
Aug 15, 2024
a79c40b
doc(inject): Remark regarding performance impact logging
Aug 15, 2024
8d98a38
doc: Update changelog, alpha 2
Aug 15, 2024
ee8f2a0
refactor: property_node attribute handling
Aug 15, 2024
45d7a29
feat: Add mxml
Aug 15, 2024
14f534b
fix: Log fatal force flush
Aug 15, 2024
f990d83
chore: Remove property (node) log from API, make ext(ension) function
Aug 15, 2024
dbd1a4c
feat: Turn into macros to log line numbers correctly
Aug 15, 2024
d3b3951
fix: Typo
Aug 15, 2024
b9819c9
fix: Expose typedef in header
Aug 15, 2024
b188b93
chore: Add missing log module define
Aug 15, 2024
690d3b1
fix: Default print to stderr and not stdout
Aug 15, 2024
57da040
fix: "Atomic" output log messages on minimial boot env, debug
Aug 15, 2024
9a87281
chore: Decrease log message level on debug messsage
Aug 15, 2024
d73ded1
chore: Add more debug logging
Aug 15, 2024
7a6c3af
feat: Add log-ext, handle win last errors
Aug 15, 2024
e3c9780
feat: Property (node) API impl with mxml
Aug 15, 2024
c965011
feat: Add config-ext
Aug 15, 2024
73da986
refactor: Inject
Aug 15, 2024
833fa2f
feat: Add sdk-hook
Aug 15, 2024
5531726
feat(iidxhook1): Use sdk-hook and support config api
Aug 15, 2024
c383511
chore: Improve log output, include config path
Aug 15, 2024
9c538cc
fix: Add property node printing for float and double types
Aug 15, 2024
b031d40
feat: Add helper to setup logger with null sink
Aug 15, 2024
20e7cda
fix: Setup config API on minimial boot env
Aug 15, 2024
fa1d358
doc: Update changelog, alpha 3
Aug 15, 2024
0be5f8d
chore: Bump version to alpha 4
Aug 15, 2024
f5ed7f5
feat(iidxhook1): Switch iidx versions 10-12 to new xml config
Aug 15, 2024
51f3b07
feat: Add missing cleanup functions various iidx hook modules
Aug 15, 2024
206e92a
chore(iidxhook1): Cleanup unused headers, fix naming
Aug 15, 2024
4e6385e
feat(iidxhook1): Implement hook cleanup
Aug 15, 2024
95e167c
refact(iidxhook2): Use sdk-hook and support new config api
Aug 15, 2024
f3deadd
refact(iidxhook3): Use sdk-hook and support new config api
Aug 15, 2024
617550b
refact(iidxhook4): Use sdk-hook and support new config api
Aug 15, 2024
4f97282
React(iidxhook4-cn): Use sdk-hook and support new config api
Aug 17, 2024
baf3e5f
refact(iidxhook5): Use sdk-hook and support new config api
Aug 17, 2024
a6202f4
refact(iidxhook5-cn): Use sdk-hook and support new config api
Aug 17, 2024
b4bccfb
refact(iidxhook6): Use sdk-hook and support new config api
Aug 17, 2024
f7d4b03
refact(iidxhook7): Use sdk-hook and support new config api
Aug 17, 2024
c5b54d4
refact(iidxhook8): Use sdk-hook and support new config api
Aug 17, 2024
d578feb
chore: Remove broken test
Aug 17, 2024
8b6cd4a
refact(iidxhook9): Use sdk-hook and support new config api
Aug 17, 2024
a1d103f
feat(config-ext): Methods for handling optionals
Aug 17, 2024
4a751a1
feat(core/config-ext): Support reading of security id and mcode
Aug 17, 2024
d4ad25f
feat(ddrhook1): Use sdk-hook and support new config api
Aug 17, 2024
620ca84
fix(iface-iidxio): Add missing implementation checks for init and fine
Aug 17, 2024
d237b42
feat(bt-module): Add optional “configurable” interface to bt io modules
Aug 17, 2024
51582f2
refact(ddrio-p3io): Support new config api
Aug 17, 2024
979b6e0
refact(vigem-ddrio): Use new config api
Aug 17, 2024
507f161
chore: Cleanup cconfig remains from iidxhooks
Aug 17, 2024
6c0820a
refact(eamio-icca): Use new config api
Aug 17, 2024
d1c3465
refact(iidxio-bio2): Use new config api
Aug 17, 2024
ee85ad4
refact(sdvxhook2) Use new config api
Aug 17, 2024
ac302b7
refact(sdvxhook2-cn): Use new config api
Aug 17, 2024
d14f7e2
refact(sdvxio-bio2): Use new config api
Aug 17, 2024
4c9175c
chore: Remove now obselete tests for cconfig
Aug 17, 2024
c03f5d3
refact(vigem-iidxio): Use new config api
Aug 17, 2024
f9f9301
feat(jbhook1): Use sdk-hook and new config api
Aug 17, 2024
3008a14
feat(jbio-h44b): Use new config api
Aug 17, 2024
8a68e56
feat(popnhook1): Use sdk-hook and new config api
Aug 17, 2024
d983117
feat(sdvxio-kfca): Use new config api
Aug 17, 2024
04603a9
feat(vigem-sdvxio): Use new config api
Aug 17, 2024
7840864
chore: Remove cconfig
Aug 17, 2024
541683d
>>> wip todo list, wip, Wip todo list, Wip, Temporary Commit at 15/08…
Aug 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
111 changes: 111 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,117 @@
Note for CI/CD: Ensure the version formatting in the sections is kept identical to the versions
given in tags. The pipeline will pick this up and cuts out the relevant section for release notes.

## 6.0.0-alpha.3

**THIS IS A HIGHLY WORK/DEVELOPMENT IN PROGRESS VERSION**

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

Goals of this version:

* property (node) API implementation without AVS -> [mxml](https://github.com/michaelrsweet/mxml)
* inject refactoring similar to launcher
* Re-structure modules
* Use bemanitools config API backed by property (node) API with mxml (because no AVS2)
* SDK foundation for hook libraries bootstrapping with DllMain
* iidxhook1 refactoring to use new SDK hook foundation and bemanitools config API

This brings inject and launcher closer together regarding common functionality. inject is also
using a "bootstrap.xml" style approach with a XML configuration file. That configuration file
can also include further inlined or referenced configuration for any hooks to be loaded.

With a new module that will serve as a piece of a public SDK in the future, any library that just
bootstraps with DllMain can implement the Bemanitools 6 hook API transparently. This solution
isn't ideal, but it works with a bit of duct-tape fairly well. A future improve would be to have
improved hooking in inject to have a pre- and post-main function hook. However, that is a lot more
work as it requires our own PE loader to bootstrap the entire executable to get more fine grained
control.

Remarks regarding what's known to be broken: Inject command line args + overrides

## 6.0.0-alpha.2

**THIS IS A HIGHLY WORK/DEVELOPMENT IN PROGRESS VERSION**

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

Goal of this version: Fix blocking logging which results in performance impact on many games using
both launcher and inject. The impact typically materialized as the game stuttering, briefly slowing
down, music de-syncing or occasional laggy input.

This was a fundamental issue to the previous logging architecture in bemanitools. With the pre-work
of having a more modular logging API that can be shared and used across internal components as well
as public APIs including hooks, unified logging can be applied throughout the bemanitools stack.

With this, all logging is channeled to a single logger, the bemanitools logger, where we have full
control over how we log any log output (but also full control of messing it up =)).

With this, we can also move away from the band aid of the log-server that's been used in iidx
versions 19 to 24 because non AVS threads logging through the AVS logging system were crashing (see
[this document](doc/dev/journal/2018-02-10-logging-breakdown-avs.md) for details).

A new async log sink takes care of de-coupling the non blocking producing/posting of messages to
a configurable queue by any number of threads concurrently, with a single producer thread consuming
these messages from the queue and forwarding them to a configured target sink, e.g. file, terminal.

With this, we ensure that threads with log messages don't have to wait for synchronization on
expensive and slow IO.

These changes have been applied to to launcher and inject. The log-server module has been removed
entirely from any (iidx) games using it.

## 6.0.0-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

### What works

* inject: Basic functionality, launches games iidx 09 to 17 with iidxhook1 to iidxhook4
* launcher: Basic functionality, launches games iidx 09 to 17 with iidxhook5 to iidxhook7
* iidxhook1: Boots, reaching in-game with keyboard inputs working
* iidxhook2: Boots, reaching in-game with keyboard inputs working
* iidxhook3: Boots, reaching in-game with keyboard inputs working
* iidxhook4: Boots, reaching in-game with keyboard inputs working
* iidxhook5: Boots, reaching in-game with keyboard inputs working
* iidxhook6: Boots, reaching in-game with keyboard inputs working
* iidxhook7: Boots, reaching in-game with keyboard inputs working

### What's broken

Since everything else is untested, consider it (very) broken

## 5.49

### Features
Expand Down
12 changes: 7 additions & 5 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ toolchain_64 := x86_64-w64-mingw32-

gitrev := $(shell git rev-parse HEAD)
cppflags := -I src -I src/main -I src/test -DGITREV=$(gitrev)
cflags := -O2 -pipe -ffunction-sections -fdata-sections \
cflags := -g -O2 -pipe -ffunction-sections -fdata-sections \
-Wall -std=c99 -DPSAPI_VERSION=1
cflags_release := -Werror
ldflags := -Wl,--gc-sections -static-libgcc
Expand Down Expand Up @@ -139,13 +139,14 @@ libs :=

avsdlls :=
avsexes :=
avslibs :=

testdlls :=
testexes :=

include Module.mk

modules := $(dlls) $(exes) $(libs) $(avsdlls) $(avsexes) $(testdlls) $(testexes)
modules := $(dlls) $(exes) $(libs) $(avsdlls) $(avsexes) $(avslibs) $(testdlls) $(testexes)

#
# $1: Bitness
Expand Down Expand Up @@ -200,6 +201,7 @@ $$(bindir_$1_$2):
$$(eval $$(foreach imp,$(imps),$$(call t_import,$1,$2,$$(imp))))
$$(eval $$(foreach dll,$(avsdlls),$$(call t_linkdll,$1,$2,$$(dll))))
$$(eval $$(foreach exe,$(avsexes),$$(call t_linkexe,$1,$2,$$(exe))))
$$(eval $$(foreach lib,$(avslibs),$$(call t_archive,$1,$2,$$(lib))))

endef

Expand All @@ -209,6 +211,7 @@ define t_compile

depdir_$1_$2_$3 := $(depdir)/$$(subdir_$1_$2)/$3
abslib_$1_$2_$3 := $$(libs_$3:%=$$(bindir_$1_indep)/lib%.a)
avslib_$1_$2_$3 := $$(avslibs_$3:%=$$(bindir_$1_$2)/lib%.a)
absdpl_$1_$2_$3 := $$(deplibs_$3:%=$$(bindir_$1_$2)/lib%.a)
objdir_$1_$2_$3 := $(objdir)/$$(subdir_$1_$2)/$3
obj_$1_$2_$3 := $$(src_$3:%.c=$$(objdir_$1_$2_$3)/%.o) \
Expand Down Expand Up @@ -260,13 +263,13 @@ dll_$1_$2_$3 := $$(bindir_$1_$2)/$3.dll
implib_$1_$2_$3 := $$(bindir_$1_$2)/lib$3.a

$$(dll_$1_$2_$3) $$(implib_$1_$2_$3): $$(obj_$1_$2_$3) $$(abslib_$1_$2_$3) \
$$(avslib_$1_$2_$3) \
$$(absdpl_$1_$2_$3) \
$$(srcdir_$3)/$3.def | $$(bindir_$1_$2)
$(V)echo ... $$(dll_$1_$2_$3)
$(V)$$(toolchain_$1)gcc -shared \
-o $$(dll_$1_$2_$3) -Wl,--out-implib,$$(implib_$1_$2_$3) \
-Wl,--start-group $$^ -Wl,--end-group $$(ldflags_$3)
$(V)$$(toolchain_$1)strip $$(dll_$1_$2_$3)
$(V)$$(toolchain_$1)ranlib $$(implib_$1_$2_$3)

endef
Expand All @@ -279,11 +282,10 @@ $(t_compile)

exe_$1_$2_$3 := $$(bindir_$1_$2)/$3.exe

$$(exe_$1_$2_$3): $$(obj_$1_$2_$3) $$(abslib_$1_$2_$3) $$(absdpl_$1_$2_$3) \
$$(exe_$1_$2_$3): $$(obj_$1_$2_$3) $$(abslib_$1_$2_$3) $$(avslib_$1_$2_$3) $$(absdpl_$1_$2_$3) \
| $$(bindir_$1_$2)
$(V)echo ... $$@
$(V)$$(toolchain_$1)gcc -o $$@ $$^ $$(ldflags_$3)
$(V)$$(toolchain_$1)strip $$@

endef

Expand Down
Loading