Compare commits

..

23 Commits
5.41 ... 5.43

Author SHA1 Message Date
icex2
f63c759ab2 Update changelog for 5.43 release 2022-10-19 00:49:46 +02:00
icex2
edd0bda3bb Update distribution files and naming to indicate support of iidx 29
No significant changes on the game's side. Tooling that works for
27 and 28 also works fine for 29
2022-10-19 00:46:47 +02:00
icex2
c49fc61f89 doc bugfix: Fix incorrect COM port ID
Must be 1 and not 0 for iidx. See also the api.md docs.
2022-10-19 00:44:07 +02:00
icex2
885bffd9eb doc: Update api doc regarding eamuse readers and usage 2022-10-19 00:43:43 +02:00
icex2
c310a41752 Add missing AVS module doc for DDR A20+ 64-bit 2022-09-19 20:05:28 +02:00
Will Xyen
2a7738dac8 ezusb-iidx-16seg-emu: add to makefile 2022-06-24 14:49:53 -07:00
Will Xyen
b4bf1f481d iidxhook: split off node-16seg to remove eamio dependency from iidxhook-cn
(so iidxhook-cn doesn't need to link against ezusb-iidx-emu)
2022-06-24 00:57:26 -07:00
Will Xyen
dc931faf86 ezusb: decouple some nodes from ezusb-iidx-emu
This fixes a build failure in newer gcc for popnhook.
Since node-16seg has a dependency on iidxio
2022-06-23 23:54:30 -07:00
Will Xyen
523c0ad3f2 iidxhook: fix builds in cn versions 2022-06-23 23:42:05 -07:00
icex2
3cba8db787 Add docs for ddr unicorntail 2022-06-19 12:51:49 +02:00
icex2
2139fce2ae Add docs for ddr A20+ data setup and folder structure 2022-06-19 12:51:33 +02:00
icex2
bb86aa65e5 Add download links key software dependencies 2022-06-18 19:09:34 +02:00
aa05679ca91b93e4ecbac7804aff38033811559a
f0dfc61128 Change reference of jubeat in popnhook documentation 2022-06-16 12:51:58 -04:00
icex2
61a343d59a Bump version to 5.43 for next development cycle 2022-06-16 00:20:56 +02:00
icex2
119272b5d2 Update changelog for 5.42 release 2022-06-16 00:19:59 +02:00
icex2
0cd85083f6 Fix compiler warning about conversion type in snprintf 2022-06-16 00:10:50 +02:00
icex2
485c4d0ad7 Documentation clarification 2022-06-16 00:02:49 +02:00
2d9f8a0741a7573b189035dcb819847ecb5d981d
4bd0ee5ef6 iidxhook: Fix diagonal tearing on textures on iidx18 and 19
Affects all games based on version 18 and 19 which includes
the chinese versions

This code is based on the toastertools implementation.
Credits to the original authors.
2022-06-16 00:02:47 +02:00
2d9f8a0741a7573b189035dcb819847ecb5d981d
8081793a5f iidxhook4-cn: Add support for IIDX Resort Anthem CN
* Exe based game
* No network functionality
* No card readers checked/used
2022-06-15 23:34:50 +02:00
2d9f8a0741a7573b189035dcb819847ecb5d981d
badd616add iidxhook 4, 5, 5-cn: enable nvidia fix
Was absent but actually fixes crashing on nvidia cards
on these versions as well.
2022-06-15 21:30:43 +00:00
2d9f8a0741a7573b189035dcb819847ecb5d981d
926e976c36 iidxhook5-cn: Fix log messages, Delete unnecessary code
The game doesn't have network nor uses card readers
2022-06-15 21:29:15 +00:00
95c6cd771e00602e3ec82fccba1b3741fdb7f7ca
5d2b46376d popn: add config.bat 2022-06-13 04:28:33 +09:00
icex2
8d5ef0bfb3 Bump version to 5.42 for next development cycle 2022-06-12 20:09:10 +02:00
92 changed files with 1478 additions and 204 deletions

View File

@@ -2,6 +2,18 @@
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.
## 5.43
* iidx29: (Officially) support IIDX CASTHOUR
* Code structure maintenance
* Various documentation improvements
## 5.42
* Bugfix: Fix diagonal texture tearing on IIDX 18 and 19 based games
* Feature: Add support for IIDX Resort Anthem CN using iidxhook4-cn
* Feature/bugfix: Enable "nvidia fix" for iidxhook4, 5 and 5-cn. Should fix crashing on some/all
nvidia cards
* Various minor fixes
## 5.41
* Feature: Support pop'n music 15-18 using popnhook1
* Feature: Support IIDX tricoro CN using iidxhook5-cn

View File

@@ -57,6 +57,7 @@
# beatmania IIDX 22 PENDUAL
# beatmania IIDX 23 copula
# beatmania IIDX 24 SINOBUZ
# Patch 3: DanceDanceRevoluion A20+ (64-bit)
# "Patch" 3: Silent Scope Bone Eater (compatible with p7)
# "Patch" 7: Steel Chronicle VicTroopers (not a Bemani, w/e)
#
@@ -110,6 +111,7 @@ include src/main/eamio-icca/Module.mk
include src/main/eamio/Module.mk
include src/main/eamiotest/Module.mk
include src/main/ezusb-emu/Module.mk
include src/main/ezusb-iidx-16seg-emu/Module.mk
include src/main/ezusb-iidx-emu/Module.mk
include src/main/ezusb-iidx-fpga-flash/Module.mk
include src/main/ezusb-iidx-sram-flash/Module.mk
@@ -136,6 +138,7 @@ include src/main/iidxhook1/Module.mk
include src/main/iidxhook2/Module.mk
include src/main/iidxhook3/Module.mk
include src/main/iidxhook4/Module.mk
include src/main/iidxhook4-cn/Module.mk
include src/main/iidxhook5/Module.mk
include src/main/iidxhook5-cn/Module.mk
include src/main/iidxhook6/Module.mk
@@ -312,6 +315,21 @@ $(zipdir)/iidx-18.zip: \
$(V)echo ... $@
$(V)zip -j $@ $^
$(zipdir)/iidx-18-cn.zip: \
build/bin/avs2_1101-32/iidxhook4-cn.dll \
build/bin/indep-32/config.exe \
build/bin/indep-32/geninput.dll \
build/bin/indep-32/iidxio.dll \
build/bin/indep-32/vefxio.dll \
build/bin/indep-32/inject.exe \
dist/iidx/config.bat \
dist/iidx/gamestart-18-cn.bat \
dist/iidx/iidxhook-18-cn.conf \
dist/iidx/vefx.txt \
| $(zipdir)/
$(V)echo ... $@
$(V)zip -j $@ $^
$(zipdir)/iidx-19.zip: \
build/bin/avs2_1304-32/iidxhook5.dll \
build/bin/avs2_1304-32/launcher.exe \
@@ -347,7 +365,6 @@ $(zipdir)/iidx-20.zip: \
$(zipdir)/iidx-20-cn.zip: \
build/bin/avs2_1304-32/iidxhook5-cn.dll \
build/bin/indep-32/config.exe \
build/bin/indep-32/eamio.dll \
build/bin/indep-32/geninput.dll \
build/bin/indep-32/iidxio.dll \
build/bin/indep-32/vefxio.dll \
@@ -400,7 +417,7 @@ $(zipdir)/iidx-25-to-26.zip: \
$(V)echo ... $@
$(V)zip -j $@ $^
$(zipdir)/iidx-27-to-28.zip: \
$(zipdir)/iidx-27-to-29.zip: \
build/bin/avs2_1700-64/iidxhook9.dll \
build/bin/avs2_1700-64/launcher.exe \
build/bin/indep-64/config.exe \
@@ -411,8 +428,10 @@ $(zipdir)/iidx-27-to-28.zip: \
dist/iidx/config.bat \
dist/iidx/gamestart-27.bat \
dist/iidx/gamestart-28.bat \
dist/iidx/gamestart-29.bat \
dist/iidx/iidxhook-27.conf \
dist/iidx/iidxhook-28.conf \
dist/iidx/iidxhook-29.conf \
dist/iidx/vefx.txt \
| $(zipdir)/
$(V)echo ... $@
@@ -722,6 +741,7 @@ $(zipdir)/popn-15-to-18.zip: \
build/bin/indep-32/eamio.dll \
build/bin/indep-32/popnio.dll \
build/bin/indep-32/ezusb2-popn-shim.dll \
dist/popn/config.bat \
dist/popn/gamestart-15.bat \
dist/popn/gamestart-16.bat \
dist/popn/gamestart-17.bat \
@@ -779,12 +799,13 @@ $(BUILDDIR)/bemanitools.zip: \
$(zipdir)/iidx-13.zip \
$(zipdir)/iidx-14-to-17.zip \
$(zipdir)/iidx-18.zip \
$(zipdir)/iidx-18-cn.zip \
$(zipdir)/iidx-19.zip \
$(zipdir)/iidx-20.zip \
$(zipdir)/iidx-20-cn.zip \
$(zipdir)/iidx-21-to-24.zip \
$(zipdir)/iidx-25-to-26.zip \
$(zipdir)/iidx-27-to-28.zip \
$(zipdir)/iidx-27-to-29.zip \
$(zipdir)/iidx-hwio-x86.zip \
$(zipdir)/iidx-hwio-x64.zip \
$(zipdir)/jb-01.zip \

View File

@@ -1,7 +1,7 @@
# Bemanitools 5
[![pipeline status](https://dev.s-ul.net/djhackers/bemanitools/badges/master/pipeline.svg)](https://dev.s-ul.net/djhackers/bemanitools/commits/master)
Version: 5.41
Version: 5.43
[Release history](CHANGELOG.md)
@@ -59,8 +59,9 @@ The following games are supported with their corresponding hook-libraries.
* Beatmania IIDX 24 SINOBUZ (`iidx-21-to-24.zip`): [iidxhook7](doc/iidxhook/iidxhook7.md)
* Beatmania IIDX 25 CANNON BALLERS (`iidx-25-to-26.zip`): [iidxhook8](doc/iidxhook/iidxhook8.md)
* Beatmania IIDX 26 Rootage (`iidx-25-to-26.zip`): [iidxhook8](doc/iidxhook/iidxhook8.md)
* Beatmania IIDX 27 Heroic Verse (`iidx-27-to-28.zip`): [iidxhook9](doc/iidxhook/iidxhook9.md)
* Beatmania IIDX 28 BISTROVER (`iidx-27-to-28.zip`): [iidxhook9](doc/iidxhook/iidxhook9.md)
* Beatmania IIDX 27 Heroic Verse (`iidx-27-to-29.zip`): [iidxhook9](doc/iidxhook/iidxhook9.md)
* Beatmania IIDX 28 BISTROVER (`iidx-27-to-29.zip`): [iidxhook9](doc/iidxhook/iidxhook9.md)
* Beatmania IIDX 29 CASTHOUR (`iidx-27-to-29.zip`): [iidxhook9](doc/iidxhook/iidxhook9.md)
* [jubeat](doc/jbhook/README.md)
* jubeat (`jb-01.zip`): [jbhook1](doc/jbhook/jbhook1.md)
* jubeat ripples (`jb-02.zip`): [jbhook1](doc/jbhook/jbhook1.md)
@@ -110,9 +111,16 @@ consumer version of Windows XP. Newer versions of Windows, e.g. Windows 7, 8 and
as well. Some hooks also include fixes required to run the games on a more recent version.
Depending on the game, you also need the following dependencies installed:
* DirectX 9 runtime
* Microsoft Visual C++ Redistributables 2010 **and** 2013: Depends on the game and age but both
should cover most if not all of the games so far
* The 32-bit (x86) version of
[Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package MFC Security Update](https://www.microsoft.com/en-sg/download/details.aspx?id=26999)
* The 32-bit (x86) and 64-bit (x64) versions of
[Microsoft Visual C++ Redistributable Packages for Visual Studio 2013](https://www.microsoft.com/en-sg/download/details.aspx?id=40784)
* The [DirectX 9 End-User Runtimes (June 2010)](https://www.microsoft.com/en-us/download/details.aspx?id=8109)
See also
[bemanitools-supplements](https://dev.s-ul.net/djhackers/bemanitools-supplement/-/blob/master/misc/win-runtime/README.md)
for files.
## Development
### Building

14
dist/iidx/gamestart-18-cn.bat vendored Normal file
View File

@@ -0,0 +1,14 @@
@echo off
cd /d %~dp0
if not exist d mkdir d
if not exist e mkdir e
if not exist f mkdir f
if not exist e\avs_conf mkdir e\avs_conf
if not exist e\avs_conf\CONF mkdir e\avs_conf\CONF
if not exist e\avs_conf\CONF\NVRAM mkdir e\avs_conf\CONF\NVRAM
if not exist e\avs_conf\CONF\RAW mkdir e\avs_conf\CONF\RAW
inject iidxhook4-cn.dll bm2dx.exe -D --config iidxhook-18-cn.conf %*

16
dist/iidx/gamestart-29.bat vendored Normal file
View File

@@ -0,0 +1,16 @@
@echo off
cd /d %~dp0
if not exist dev mkdir dev
if not exist dev\e mkdir dev\e
if not exist dev\g mkdir dev\g
if not exist dev\nvram mkdir dev\nvram
if not exist dev\raw mkdir dev\raw
if not exist dev\raw\log mkdir dev\raw\log
if not exist dev\raw\fscache mkdir dev\raw\fscache
for /R prop\defaults %%D in (*.*) do (
if not exist dev\nvram\%%~nxD copy /y prop\defaults\%%~nxD dev\nvram
)
launcher -H 134217728 -B iidxhook9.dll bm2dx.dll --config iidxhook-29.conf %*

50
dist/iidx/iidxhook-18-cn.conf vendored Normal file
View File

@@ -0,0 +1,50 @@
# PCBID
eamuse.pcbid=0101020304050607086F
# Fix stretched BG videos on newer GPUs. Might appear on Red and newer
gfx.bgvideo_uv_fix=false
# Run the game in a framed window (requires windowed option)
gfx.framed=false
# Software limit the frame rate of the rendering loop in hz, e.g. 60 or 59.95 (0.0 = no software limit)
gfx.frame_rate_limit=0.0
# Enable/disable software monitor check/auto timebase or set a pre-determined refresh value. -1 disables this feature. 0 enables auto detecting the current refresh rate on startup. Setting any positive value > 0 allows you to set a pre-determined refresh rate (e.g. retrieved from the monitor check on newer IIDX games). Either the auto detected value or pre-determined value is used to patch any chart files in-memory to fix song synchronization issues. Requires constant refresh rate!!!
gfx.monitor_check=-1.000000
# Patch the GPU device ID detection (leave empty to disable), format XXXX:YYYY, two 4 digit hex numbers (vid:pid). Examples: 1002:7146 (RV515, Radeon X1300), 1002:95C5 (RV620 LE, Radeon HD3450)
gfx.pci_id=1002:7146
# Run the game windowed
gfx.windowed=false
# Windowed width, 0 for default size
gfx.window_width=0
# Windowed height, 0 for default size
gfx.window_height=0
# Up-/downscale the back buffer's width. This does not change the game's rendering resolution but scales the final frame. Use this to target the native resolution of your monitor/TV, e.g. to avoid over-/underscan, bad image quality or latency caused by the monitors internal upscaler. 0 to disable this feature. Must be set in combination with the corresponding height parameter.
gfx.scale_back_buffer_width=0
# Up-/downscale the back buffer's height. This does not change the game's rendering resolution but scales the final frame. Use this to target the native resolution of your monitor/TV, e.g. to avoid over-/underscan, bad image quality or latency caused by the monitors internal upscaler. 0 to disable this feature. Must be set in combination with the corresponding width parameter.
gfx.scale_back_buffer_height=0
# Filter type to use for up-/downscaling the back buffer. Only used if scaling feature was enabled by setting the scaling width and height parameters. Available types: none, linear, point (refer to D3DTEXTUREFILTERTYPE for explanation).
gfx.scale_back_buffer_filter=none
# Forced refresh rate, -1 to not force any (try 59 or 60 if monitor check fails to lock on high refresh rate monitors)
gfx.forced_refresh_rate=-1
# D3D9 device adapter (monitor), -1 to use default, 0, 1, 2 etc. to use specified adapter
gfx.device_adapter=-1
# Fix diagonal tearing with video cards other than Radeon X1300 and HD3450
gfx.diagonal_tearing_fix=false
# Disable ezusb IO emulation and enable usage of real ezusb1/2 IO hardware
io.disable_io_emu=false
# Security black plug mcode id string (e.g. GQC02JAA).
sec.black_plug_mcode=GKJDZCAA

View File

@@ -37,6 +37,9 @@ gfx.forced_refresh_rate=-1
# D3D9 device adapter (monitor), -1 to use default, 0, 1, 2 etc. to use specified adapter
gfx.device_adapter=-1
# Fix diagonal tearing with video cards other than Radeon X1300 and HD3450
gfx.diagonal_tearing_fix=false
# Disable card reader emulation and enable usage of real card reader hardware on COM1 (for games supporting slotted/wavepass readers)
io.disable_card_reader_emu=false

View File

@@ -34,6 +34,9 @@ gfx.forced_refresh_rate=-1
# D3D9 device adapter (monitor), -1 to use default, 0, 1, 2 etc. to use specified adapter
gfx.device_adapter=-1
# Fix diagonal tearing with video cards other than Radeon X1300 and HD3450
gfx.diagonal_tearing_fix=false
# Disable card reader emulation and enable usage of real card reader hardware on COM1 (for games supporting slotted/wavepass readers)
io.disable_card_reader_emu=false

View File

@@ -37,6 +37,9 @@ gfx.forced_refresh_rate=-1
# D3D9 device adapter (monitor), -1 to use default, 0, 1, 2 etc. to use specified adapter
gfx.device_adapter=-1
# Fix diagonal tearing with video cards other than Radeon X1300 and HD3450
gfx.diagonal_tearing_fix=false
# Disable ezusb IO emulation and enable usage of real ezusb1/2 IO hardware
io.disable_io_emu=false

View File

@@ -43,7 +43,7 @@ cam.device_id1=
# Override camera device ID 2 detection (copy from device manager, do not escape)
cam.device_id2=
# Disable card reader emulation and enable usage of real card reader hardware on COM0 (for games supporting slotted readers)
# Disable card reader emulation and enable usage of real card reader hardware on COM1 (for games supporting slotted readers)
io.disable_card_reader_emu=false
# Disable BIO2 emulation and enable usage of real BIO2 hardware

View File

@@ -43,7 +43,7 @@ cam.device_id1=
# Override camera device ID 2 detection (copy from device manager, do not escape)
cam.device_id2=
# Disable card reader emulation and enable usage of real card reader hardware on COM0 (for games supporting slotted readers)
# Disable card reader emulation and enable usage of real card reader hardware on COM1 (for games supporting slotted readers)
io.disable_card_reader_emu=false
# Disable BIO2 emulation and enable usage of real BIO2 hardware

View File

@@ -1,4 +1,4 @@
# Disable card reader emulation and enable usage of real card reader hardware on COM0 (for games supporting slotted readers)
# Disable card reader emulation and enable usage of real card reader hardware on COM1 (for games supporting slotted readers)
io.disable_card_reader_emu=false
# Disable BIO2 emulation and enable usage of real BIO2 hardware

View File

@@ -1,4 +1,4 @@
# Disable card reader emulation and enable usage of real card reader hardware on COM0 (for games supporting slotted readers)
# Disable card reader emulation and enable usage of real card reader hardware on COM1 (for games supporting slotted readers)
io.disable_card_reader_emu=false
# Disable BIO2 emulation and enable usage of real BIO2 hardware

78
dist/iidx/iidxhook-29.conf vendored Normal file
View File

@@ -0,0 +1,78 @@
# Disable card reader emulation and enable usage of real card reader hardware on COM1 (for games supporting slotted readers)
io.disable_card_reader_emu=false
# Disable BIO2 emulation and enable usage of real BIO2 hardware
io.disable_bio2_emu=false
# Disables the poll limiter, warning very high CPU usage may arise
io.disable_poll_limiter=false
# Lightning cab mode (requires additional IO emulation)
io.lightning_mode=false
# Disable camera connection
io.disable_cams=true
# Disables the built in file hooks, requiring manual file creation
io.disable_file_hooks=false
# Turntable sensitivity multiplier (1.0 is default)
io.tt_multiplier=1.0
# Disables the camera emulation
cam.disable_emu=true
# Override camera device ID detection (copy from device manager, do not escape)
cam.device_id1=
# Override camera device ID detection (copy from device manager, do not escape)
cam.device_id2=
# Run the game in a framed window (requires windowed option)
gfx.framed=true
# Run the game windowed
gfx.windowed=false
# Confine mouse cursor to window
gfx.confined=false
# Windowed width, -1 for default size
gfx.window_width=-1
# Windowed height, -1 for default size
gfx.window_height=-1
# Windowed X, -1 for default X position
gfx.window_x=-1
# Windowed Y, -1 for default Y position
gfx.window_y=-1
# Forced refresh rate, -1 to not force any (try 59 or 60 if monitor check fails to lock on high refresh rate monitors)
gfx.forced_refresh_rate=-1
# D3D9ex device adapter (monitor), -1 to use default, 0, 1, 2 etc. to use specified adapter
gfx.device_adapter=-1
# Orientation to force monitor into, -1 to use default, 0, 1, 2, 3 to do 0, 90, 180, 270 degrees
gfx.force_orientation=-1
# Force a screen resolution (width), -1 to disable. Use this if the game does not auto detect your monitor's resolution properly, e.g. 1368x768 instead of 1280x720.
gfx.force_screen_res.width=-1
# Force a screen resolution (height), -1 to disable. Use this if the game does not auto detect your monitor's resolution properly, e.g. 1368x768 instead of 1280x720.
gfx.force_screen_res.height=-1
# IP of adapter to force override with
adapter.override_ip=
# Force ASIO audio mode/device (if applicable / TDJ default)
asio.force_asio=false
# Force WASAPI audio mode (if applicable / LDJ default)
asio.force_wasapi=true
# The ASIO device name to use
asio.device_name=XONAR SOUND CARD(64)

1
dist/popn/config.bat vendored Normal file
View File

@@ -0,0 +1 @@
@start config.exe pnm

View File

@@ -1,4 +1,5 @@
# Bemanitools API
Bemanitools introduces interfaces abstracting the IO hardware of many games. This is used to implement support for
non-intended IO devices from simple keyboard support, standard gamecontrollers to custom IO boards or using real
hardware with the games (e.g. support for real legacy hardware).
@@ -12,6 +13,9 @@ If you want to write an implementation for your own custom piece of hardware, ch
sub-folder) in the source code (src.zip).
## Implementations
### IO boards
The following implementations are already shipped with BT5.
* BeatStream
@@ -34,10 +38,33 @@ The following implementations are already shipped with BT5.
* [sdvxio-bio2.dll](sdvxhook/sdvxio-bio2.md): BIO2 driver
* [sdvxio-kfca.dll](sdvxhook/sdvxio-kfca.md): KFCA IO board driver
### Eamuse readers
Eamuse hardware support is implemented separately:
* eamio.dll (default): Keyboard and joystick input
* eamio-icca.dll: Slotted/wave pass readers, required for old games with magnetic stripe cards
#### ICCA readers for IIDX and port config in device manager
The COM port for the card readers needs to be configured correctly in device manager. Otherwise,
communication with the readers will fail if the settings do not align with how the game or
bemanitools wants to operate them.
Use built-in ports on your mainboard if available but an external USB to serial port dongle also
works.
* Assign `COM1` to the COM port the card readers are connected to.
* Ensure that the following settings for the COM port you are going to use are
set
* BAUD rate 57600
* Data bits 8
* Parity None
* Stop bits 1
* Flow control None.
## Development notes
A DEF file for geninput.dll is included. To convert the DEF into an import library suitable for use with Visual C++, run
```
lib /machine:i386 /def:geninput.def

View File

@@ -127,6 +127,15 @@ TODO go into some more detail about some differences in the hook modules, e.g. 1
* Font patching for Japanese chars
* Filesystem patches to detour E and F backup drives for settings
#### iidxhook4-cn (18 CN)
* Ezusb IO2 I/O emulation
* Setupapi emulation
* Full security emulation with SRAM and round plugs
* Full game essential I/O emulation
* d3d9 patching and extended features
* Font patching for Japanese chars
* Filesystem patches to detour E and F backup drives for settings
#### iidxhook5 (19)
* Ezusb IO2 I/O emulation
* Setupapi emulation
@@ -136,6 +145,15 @@ TODO go into some more detail about some differences in the hook modules, e.g. 1
* Font patching for Japanese chars
* Filesystem patches to detour E and F backup drives for settings
#### iidxhook5-cn (20 CN)
* Ezusb IO2 I/O emulation
* Setupapi emulation
* Full security emulation with SRAM and round plugs
* Full game essential I/O emulation
* d3d9 patching and extended features
* Font patching for Japanese chars
* Filesystem patches to detour E and F backup drives for settings
#### iidxhook6 (20)
* Ezusb IO2 I/O emulation
* Setupapi emulation

View File

@@ -47,3 +47,7 @@ IO hardware you want to use:
game controllers
* ddrio-mm: Support Minimaid custom interface
* [ddrio-smx](ddrhook/ddrio-smx.md): Support for StepManiaX dance platforms
## Unicorntail
[Instructions how to run on Chimera PCBs](unicorntail.md).

View File

@@ -17,6 +17,73 @@ different versions. See different distribution packages, e.g. `ddr-12.zip`,
Depending on the game version, earlier versions are bootstrapped using
[inject](../inject.md) while later versions require [launcher](../launcher.md).
## Setup A20+
### Data and folder structure
The following assumes you are using vanilla and unpacked/decrypted data. Copy/unpack the data
to a destination of your choice. Expect to have the following root folder structure:
```
arkdata
com
data
dev
modules
prop
```
* Copy the contents of `modules` to the root folder that the dll-files are next to the folders
`arkdata`, `com`, etc.
* Unpack the contents of `ddr-14-to-16.zip` to the root folder. `luncher.exe` should be located
next to `arkdata`, `com` and all the dll-files
#### Configuring eamuse settings
You need to create a `prop/ea3-config.xml` configuration file which provides properties for
connecting to a network of your choice (and allows the game to boot).
Take the `prop/eamuse.xml` as a base and make a copy of it called `prop/ea3-config.xml`.
Add the software identifier as a child to the `<ea3>` parent node:
```xml
<soft>
<model __type="str">MDX</model>
<dest __type="str">J</dest>
<spec __type="str">A</spec>
<rev __type="str">A</rev>
<ext __type="str">2022020200</ext>
</soft>
```
Replace the identifiers according to the version you are using.
Add your PCBID as a child to the `<ea3>` parent node:
```xml
<id>
<pcbid __type="str">00010203040506070809</pcbid>
<hardid __type="str">00010203040506070809</hardid>
</id>
```
Replace the values accordingly with your actual PCBID registered with your target network.
Add network settings (note this might already exist, replace existing or delete old one) as a child
to the `<ea3>` parent node:
```xml
<network>
<sz_xrpc_buf __type="u32">102400</sz_xrpc_buf>
<ssl __type="bool">0</ssl>
<services>http://eamuse.konami.fun/service/services/services/</services>
</network>
```
Replace the properties accordingly with the settings provided by your network provider, e.g. the
URL, further settings like ssl etc.
## Running
Run `gamestart-XX.bat`, where `XX` corresponds to the version of the game you
@@ -70,6 +137,9 @@ Run the following commands either from a command line (`cmd.exe`) or from
* Register `regsvr32 D:\MDX\contents\k-clvsd.dll`
* Register `regsvr32 D:\MDX\contents\xactengine2_10.dll`
The `gamestart-XX.bat` scripts should already take care of this by executing the listed commands
when launched.
Note: The one that comes with IIDX will hang DDR at startup. The opposite is not true:
IIDX works just fine with this CLVSD.

View File

@@ -0,0 +1,45 @@
# Unicorntail
Unicorntail is a hook library to run the DDR games on a hybrid type of hardware referred to as a
"Chimera" or "Unicorn". Compared to a "Dragon", which refers to the official stock hardware by
Konami, a Chimera mixes the P3IO board from a PCB used with GF&DM V4-V8, Jubeat, Jubeat Ripples or
Jubeat Knit with the motherboard from a GF&DM XG, XG2 or XG3 PCB, or a Reflec Beat PCB.
Actual build instructions for such hardware are out of scope here.
## Context
Dragon PCBs are hard to come by compared to finding the parts for a Chimera PCB.
A Chimera PCB however is different in many aspects to the Dragon PCB and requires the use of the
`unicorntail.dll` hook library.
The Dragon's P3IO has two serial ports that the regular P3IOs do not, and one of these serial ports
is used to communicate with the card readers. Note that these are actual serial ports driven
directly by the P3IO microcontroller, these are NOT just passed through to the motherboard like the
proprietary COM1 and COM2 connectors. Unicorn Tail intercepts serial port IO commands being sent to
the P3IO and redirects them to COM2 instead, since COM2 is unused on SD cabinets (on HD cabinets it
connects to a second ACIO bus which drives the extra lighting glitz like the light spikes and maybe
the LED strip).
## Drivers
You need the P3IO driver installed on your target system. These can be acquired from an actual stock
HDD or grabbed from
[bemanitools-supplements](https://dev.s-ul.net/djhackers/bemanitools-supplement/-/blob/master/gfdm/p3io/README.md).
## Setup and run
Edit the `gamestart.bat` file that you are using and append `unicorntail.dll` to the list of hooks,
e.g.:
```shell
launcher.exe -H 33554432 -K unicorntail.dll arkmdxp3.dll %*
```
If you want to use any ddrhook library in addition, you have to have the hooks in the right order
to make everything work correctly, e.g.:
```shell
launcher.exe -H 33554432 -K unicorntail.dll -K ddrhook2.dll arkmdxp3.dll %*
```

View File

@@ -17,6 +17,7 @@ games:
* [iidxhook2](iidxhook2.md): DistorteD
* [iidxhook3](iidxhook3.md): GOLD, DJ TROOPERS, EMPRESS, SIRIUS
* [iidxhook4](iidxhook4.md): Resort Anthem
* [iidxhook4-cn](iidxhook4-cn.md): Resort Anthem CN (狂热节拍 IIDX)
* [iidxhook5](iidxhook5.md): Lincle
* [iidxhook5-cn](iidxhook5-cn.md): tricoro CN (狂热节拍 IIDX 2)
* [iidxhook6](iidxhook6.md): Tricoro

View File

@@ -0,0 +1,13 @@
# Game list
The following games are compatible with this version of iidxhook:
* Resort Anthem CN (狂热节拍 IIDX)
The games must be bootstrapped using [inject.exe](../inject.md).
# Remarks
Resort Anthem CN (狂热节拍 IIDX):
* Does not have NETWORK function
* Game doesn't used card readers

View File

@@ -3,6 +3,7 @@
The following games are compatible with this version of iidxhook:
* Heroic Verse
* BISTROVER
* CASTHOUR
The games must be bootstrapped using [launcher](../launcher.md).

View File

@@ -1,6 +1,6 @@
# popnhook
popnhook is a collection of hook libraries for jubeat providing
popnhook is a collection of hook libraries for pop'n music providing
emulation and various patches to run these games on non BemaniPC hardware and
newer Windows versions.

View File

@@ -18,6 +18,7 @@ EXPORTS
property_destroy @247 NONAME
property_insert_read @255 NONAME
property_node_create @266 NONAME
property_node_datasize @267 NONAME
property_node_refer @278 NONAME
property_node_remove @279 NONAME
property_psmap_import @288 NONAME

View File

@@ -193,7 +193,7 @@ static HRESULT usbmem_write(struct irp *irp)
usbmem_response[2] = ~usbmem_response[1];
if (usbmem_state[target_device_id].buffer_frame == 0) {
snprintf(usbmem_response + 4, sizeof(usbmem_response) - 5, "%d ", usbmem_state[target_device_id].buffer_len);
snprintf(usbmem_response + 4, sizeof(usbmem_response) - 5, "%Iu ", usbmem_state[target_device_id].buffer_len);
} else {
size_t len = sizeof(usbmem_response) - 5;

View File

@@ -6,4 +6,12 @@ libs_ezusb-emu := \
src_ezusb-emu := \
desc.c \
device.c \
util.c
util.c \
node-coin.c \
node-eeprom.c \
node-none.c \
node-security-mem.c \
node-security-plug.c \
node-sram.c \
node-wdt.c \
nodes.c

View File

@@ -1,6 +1,6 @@
#define LOG_MODULE "ezusb-iidx-emu-node-coin"
#define LOG_MODULE "ezusb-emu-node-coin"
#include "ezusb-iidx-emu/node-coin.h"
#include "ezusb-emu/node-coin.h"
#include "ezusb-iidx/coin-cmd.h"

View File

@@ -1,7 +1,7 @@
#ifndef EZUSB_IIDX_EMU_NODE_COIN_H
#define EZUSB_IIDX_EMU_NODE_COIN_H
#include "ezusb-iidx-emu/node.h"
#include "ezusb-emu/node.h"
uint8_t ezusb_iidx_emu_node_coin_process_cmd(
uint8_t cmd_id, uint8_t cmd_data, uint8_t cmd_data2);

View File

@@ -1,8 +1,8 @@
#define LOG_MODULE "ezusb-iidx-emu-node-eeprom"
#define LOG_MODULE "ezusb-emu-node-eeprom"
#include <string.h>
#include "ezusb-iidx-emu/node-eeprom.h"
#include "ezusb-emu/node-eeprom.h"
#include "ezusb-iidx/eeprom-cmd.h"

View File

@@ -1,7 +1,7 @@
#ifndef EZUSB_IIDX_EMU_NODE_EEPROM_H
#define EZUSB_IIDX_EMU_NODE_EEPROM_H
#include "ezusb-iidx-emu/node.h"
#include "ezusb-emu/node.h"
void ezusb_iidx_emu_node_eeprom_init(void);
/* Used on 9th to DistorteD */

View File

@@ -1,4 +1,4 @@
#include "ezusb-iidx-emu/node-none.h"
#include "ezusb-emu/node-none.h"
uint8_t ezusb_iidx_emu_node_none_process_cmd(
uint8_t cmd_id, uint8_t cmd_data, uint8_t cmd_data2)

View File

@@ -1,7 +1,7 @@
#ifndef EZUSB_IIDX_EMU_NODE_NONE_H
#define EZUSB_IIDX_EMU_NODE_NONE_H
#include "ezusb-iidx-emu/node.h"
#include "ezusb-emu/node.h"
uint8_t ezusb_iidx_emu_node_none_process_cmd(
uint8_t cmd_id, uint8_t cmd_data, uint8_t cmd_data2);

View File

@@ -1,8 +1,8 @@
#define LOG_MODULE "ezusb-iidx-emu-node-sec-mem"
#define LOG_MODULE "ezusb-emu-node-sec-mem"
#include <string.h>
#include "ezusb-iidx-emu/node-security-mem.h"
#include "ezusb-emu/node-security-mem.h"
#include "ezusb-iidx/secmem-cmd.h"
#include "util/log.h"

View File

@@ -1,7 +1,7 @@
#ifndef EZUSB_IIDX_EMU_NODE_SECURITY_MEM_H
#define EZUSB_IIDX_EMU_NODE_SECURITY_MEM_H
#include "ezusb-iidx-emu/node.h"
#include "ezusb-emu/node.h"
void ezusb_iidx_emu_node_security_mem_init(void);

View File

@@ -1,10 +1,10 @@
#define LOG_MODULE "ezusb-iidx-emu-node-sec-plug"
#define LOG_MODULE "ezusb-emu-node-sec-plug"
#include <string.h>
#include "ezusb-iidx-emu/node-eeprom.h"
#include "ezusb-iidx-emu/node-security-mem.h"
#include "ezusb-iidx-emu/node-security-plug.h"
#include "ezusb-emu/node-eeprom.h"
#include "ezusb-emu/node-security-mem.h"
#include "ezusb-emu/node-security-plug.h"
#include "ezusb-iidx/secplug-cmd.h"
#include "security/rp.h"

View File

@@ -1,7 +1,7 @@
#ifndef EZUSB_IIDX_EMU_NODE_SECURITY_PLUG_H
#define EZUSB_IIDX_EMU_NODE_SECURITY_PLUG_H
#include "ezusb-iidx-emu/node.h"
#include "ezusb-emu/node.h"
#include "security/id.h"
#include "security/mcode.h"

View File

@@ -1,9 +1,9 @@
#define LOG_MODULE "ezusb-iidx-emu-node-sram"
#define LOG_MODULE "ezusb-emu-node-sram"
#include <string.h>
#include "ezusb-iidx-emu/conf.h"
#include "ezusb-iidx-emu/node-sram.h"
#include "ezusb-emu/conf.h"
#include "ezusb-emu/node-sram.h"
#include "ezusb-iidx/sram-cmd.h"
#include "util/fs.h"

View File

@@ -1,7 +1,7 @@
#ifndef EZUSB_IIDX_EMU_NODE_SRAM_H
#define EZUSB_IIDX_EMU_NODE_SRAM_H
#include "ezusb-iidx-emu/node.h"
#include "ezusb-emu/node.h"
uint8_t ezusb_iidx_emu_node_sram_process_cmd(
uint8_t cmd_id, uint8_t cmd_data, uint8_t cmd_data2);

View File

@@ -1,6 +1,6 @@
#define LOG_MODULE "ezusb-iidx-emu-node-wdt"
#define LOG_MODULE "ezusb-emu-node-wdt"
#include "ezusb-iidx-emu/node-wdt.h"
#include "ezusb-emu/node-wdt.h"
#include "ezusb-iidx/wdt-cmd.h"
#include "util/log.h"

View File

@@ -1,7 +1,7 @@
#ifndef EZUSB_IIDX_EMU_NODE_WDT_H
#define EZUSB_IIDX_EMU_NODE_WDT_H
#include "ezusb-iidx-emu/node.h"
#include "ezusb-emu/node.h"
uint8_t ezusb_iidx_emu_node_wdt_process_cmd(
uint8_t cmd_id, uint8_t cmd_data, uint8_t cmd_data2);

View File

@@ -0,0 +1,96 @@
/*
* This file contains the ezusb nodes that appeared on
* all IIDX games so far.
*/
#include "ezusb-iidx/msg.h"
#include "ezusb-emu/node-coin.h"
#include "ezusb-emu/node-eeprom.h"
#include "ezusb-emu/node-none.h"
#include "ezusb-emu/node-security-mem.h"
#include "ezusb-emu/node-security-plug.h"
#include "ezusb-emu/node-sram.h"
#include "ezusb-emu/node-wdt.h"
#include "ezusb-emu/nodes.h"
#include "ezusb-emu/node.h"
/* All IIDX games */
const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_coin = {
.node_id = EZUSB_IIDX_MSG_NODE_COIN,
.init_node = NULL,
.process_cmd = ezusb_iidx_emu_node_coin_process_cmd,
.read_packet = ezusb_iidx_emu_node_coin_read_packet,
.write_packet = ezusb_iidx_emu_node_coin_write_packet};
/* Used on 9th to DistorteD */
const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_eeprom_v1 = {
.node_id = EZUSB_IIDX_MSG_NODE_EEPROM,
.init_node = ezusb_iidx_emu_node_eeprom_init,
.process_cmd = ezusb_iidx_emu_node_eeprom_process_cmd_v1,
.read_packet = ezusb_iidx_emu_node_eeprom_read_packet,
.write_packet = ezusb_iidx_emu_node_eeprom_write_packet};
/* Used on Gold to Sirius */
const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_eeprom_v2 = {
.node_id = EZUSB_IIDX_MSG_NODE_EEPROM,
.init_node = ezusb_iidx_emu_node_eeprom_init,
.process_cmd = ezusb_iidx_emu_node_eeprom_process_cmd_v2,
.read_packet = ezusb_iidx_emu_node_eeprom_read_packet,
.write_packet = ezusb_iidx_emu_node_eeprom_write_packet};
/* All IIDX games */
const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_none = {
.node_id = EZUSB_IIDX_MSG_NODE_NONE,
.init_node = NULL,
.process_cmd = ezusb_iidx_emu_node_none_process_cmd,
.read_packet = ezusb_iidx_emu_node_none_read_packet,
.write_packet = ezusb_iidx_emu_node_none_write_packet};
/* Used on 9th to DistorteD */
const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_security_mem_v1 = {
.node_id = EZUSB_IIDX_MSG_NODE_SECURITY_MEM,
.init_node = ezusb_iidx_emu_node_security_mem_init,
.process_cmd = ezusb_iidx_emu_node_security_mem_v1_process_cmd,
.read_packet = ezusb_iidx_emu_node_security_mem_read_packet,
.write_packet = ezusb_iidx_emu_node_security_mem_write_packet};
/* Used on Gold to Sirius */
const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_security_mem_v2 = {
.node_id = EZUSB_IIDX_MSG_NODE_SECURITY_MEM,
.init_node = ezusb_iidx_emu_node_security_mem_init,
.process_cmd = ezusb_iidx_emu_node_security_mem_v2_process_cmd,
.read_packet = ezusb_iidx_emu_node_security_mem_read_packet,
.write_packet = ezusb_iidx_emu_node_security_mem_write_packet};
/* Used on 9th to DistorteD */
const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_security_plug_v1 = {
.node_id = EZUSB_IIDX_MSG_NODE_SECURITY_PLUG,
.init_node = NULL,
.process_cmd = ezusb_iidx_emu_node_security_plug_process_cmd_v1,
.read_packet = ezusb_iidx_emu_node_security_plug_read_packet_v1,
.write_packet = ezusb_iidx_emu_node_security_plug_write_packet};
/* Used on Gold to Sirius */
const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_security_plug_v2 = {
.node_id = EZUSB_IIDX_MSG_NODE_SECURITY_PLUG,
.init_node = NULL,
.process_cmd = ezusb_iidx_emu_node_security_plug_process_cmd_v2,
.read_packet = ezusb_iidx_emu_node_security_plug_read_packet_v2,
.write_packet = ezusb_iidx_emu_node_security_plug_write_packet};
/* All IIDX games */
const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_sram = {
.node_id = EZUSB_IIDX_MSG_NODE_SRAM,
.init_node = NULL,
.process_cmd = ezusb_iidx_emu_node_sram_process_cmd,
.read_packet = ezusb_iidx_emu_node_sram_read_packet,
.write_packet = ezusb_iidx_emu_node_sram_write_packet};
/* Used on 9th to Sirius */
const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_wdt = {
.node_id = EZUSB_IIDX_MSG_NODE_WDT,
.init_node = NULL,
.process_cmd = ezusb_iidx_emu_node_wdt_process_cmd,
.read_packet = ezusb_iidx_emu_node_wdt_read_packet,
.write_packet = ezusb_iidx_emu_node_wdt_write_packet};

View File

@@ -0,0 +1,17 @@
#ifndef EZUSBEMU_NODES_H
#define EZUSBEMU_NODES_H
#include "ezusb-emu/node.h"
extern const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_coin;
extern const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_eeprom_v1;
extern const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_eeprom_v2;
extern const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_none;
extern const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_security_mem_v1;
extern const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_security_mem_v2;
extern const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_security_plug_v1;
extern const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_security_plug_v2;
extern const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_sram;
extern const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_wdt;
#endif

View File

@@ -0,0 +1,5 @@
libs += ezusb-iidx-16seg-emu
src_ezusb-iidx-16seg-emu := \
node-16seg.c \
nodes.c \

View File

@@ -1,6 +1,6 @@
#define LOG_MODULE "ezusb-iidx-emu-node-16seg"
#include "ezusb-iidx-emu/node-16seg.h"
#include "ezusb-iidx-16seg-emu/node-16seg.h"
#include <string.h>

View File

@@ -1,7 +1,7 @@
#ifndef EZUSB_IIDX_EMU_NODE_16SEG_H
#define EZUSB_IIDX_EMU_NODE_16SEG_H
#include "ezusb-iidx-emu/node.h"
#include "ezusb-emu/node.h"
uint8_t ezusb_iidx_emu_node_16seg_process_cmd(
uint8_t cmd_id, uint8_t cmd_data, uint8_t cmd_data2);

View File

@@ -0,0 +1,16 @@
/*
* This file contains the ezusb nodes that appeared on
* all IIDX games so far.
*/
#include "ezusb-iidx/msg.h"
#include "ezusb-iidx-16seg-emu/node-16seg.h"
/* All IIDX games */
const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_16seg = {
.node_id = EZUSB_IIDX_MSG_NODE_16SEG,
.init_node = NULL,
.process_cmd = ezusb_iidx_emu_node_16seg_process_cmd,
.read_packet = ezusb_iidx_emu_node_16seg_read_packet,
.write_packet = ezusb_iidx_emu_node_16seg_write_packet};

View File

@@ -0,0 +1,8 @@
#ifndef EZUSBEMU_NODES_16SEG_IIDX_H
#define EZUSBEMU_NODES_16SEG_IIDX_H
#include "ezusb-emu/node.h"
extern const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_16seg;
#endif

View File

@@ -1,19 +1,12 @@
libs += ezusb-iidx-emu
libs_ezusb-iidx-emu := \
ezusbemu \
ezusb-emu \
ezusb-iidx-16seg-emu \
src_ezusb-iidx-emu := \
card-mag.c \
msg.c \
node-16seg.c \
node-coin.c \
node-eeprom.c \
node-fpga.c \
node-none.c \
node-security-mem.c \
node-security-plug.c \
node-serial.c \
node-sram.c \
node-wdt.c \
nodes.c \

View File

@@ -9,14 +9,17 @@
#include "hook/iohook.h"
#include "ezusb-emu/msg.h"
#include "ezusb-emu/nodes.h"
#include "ezusb-emu/node-coin.h"
#include "ezusb-iidx/msg.h"
#include "ezusb-iidx-emu/msg.h"
#include "ezusb-iidx-emu/node-coin.h"
#include "ezusb-iidx-emu/node-serial.h"
#include "ezusb-iidx-emu/nodes.h"
#include "ezusb-iidx-16seg-emu/nodes.h"
#include "util/hex.h"
#include "util/log.h"

View File

@@ -1,7 +1,7 @@
#ifndef EZUSB_IIDX_EMU_NODE_FPGA_H
#define EZUSB_IIDX_EMU_NODE_FPGA_H
#include "ezusb-iidx-emu/node.h"
#include "ezusb-emu/node.h"
/* Used on 9th to DistorteD */
uint8_t ezusb_iidx_emu_node_fpga_v1_process_cmd(

View File

@@ -1,7 +1,7 @@
#ifndef EZUSB_IIDX_EMU_NODE_SERIAL_H
#define EZUSB_IIDX_EMU_NODE_SERIAL_H
#include "ezusb-iidx-emu/node.h"
#include "ezusb-emu/node.h"
void ezusb_iidx_emu_node_serial_init(void);

View File

@@ -5,51 +5,10 @@
#include "ezusb-iidx/msg.h"
#include "ezusb-iidx-emu/node-16seg.h"
#include "ezusb-iidx-emu/node-coin.h"
#include "ezusb-iidx-emu/node-eeprom.h"
#include "ezusb-iidx-emu/node-fpga.h"
#include "ezusb-iidx-emu/node-none.h"
#include "ezusb-iidx-emu/node-security-mem.h"
#include "ezusb-iidx-emu/node-security-plug.h"
#include "ezusb-iidx-emu/node-serial.h"
#include "ezusb-iidx-emu/node-sram.h"
#include "ezusb-iidx-emu/node-wdt.h"
#include "ezusb-iidx-emu/node.h"
#include "ezusb-iidx-emu/nodes.h"
/* All IIDX games */
const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_16seg = {
.node_id = EZUSB_IIDX_MSG_NODE_16SEG,
.init_node = NULL,
.process_cmd = ezusb_iidx_emu_node_16seg_process_cmd,
.read_packet = ezusb_iidx_emu_node_16seg_read_packet,
.write_packet = ezusb_iidx_emu_node_16seg_write_packet};
/* All IIDX games */
const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_coin = {
.node_id = EZUSB_IIDX_MSG_NODE_COIN,
.init_node = NULL,
.process_cmd = ezusb_iidx_emu_node_coin_process_cmd,
.read_packet = ezusb_iidx_emu_node_coin_read_packet,
.write_packet = ezusb_iidx_emu_node_coin_write_packet};
/* Used on 9th to DistorteD */
const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_eeprom_v1 = {
.node_id = EZUSB_IIDX_MSG_NODE_EEPROM,
.init_node = ezusb_iidx_emu_node_eeprom_init,
.process_cmd = ezusb_iidx_emu_node_eeprom_process_cmd_v1,
.read_packet = ezusb_iidx_emu_node_eeprom_read_packet,
.write_packet = ezusb_iidx_emu_node_eeprom_write_packet};
/* Used on Gold to Sirius */
const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_eeprom_v2 = {
.node_id = EZUSB_IIDX_MSG_NODE_EEPROM,
.init_node = ezusb_iidx_emu_node_eeprom_init,
.process_cmd = ezusb_iidx_emu_node_eeprom_process_cmd_v2,
.read_packet = ezusb_iidx_emu_node_eeprom_read_packet,
.write_packet = ezusb_iidx_emu_node_eeprom_write_packet};
/* Used on 9th to DistorteD */
const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_fpga_v1 = {
.node_id = EZUSB_IIDX_MSG_NODE_FPGA_V1,
@@ -66,46 +25,6 @@ const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_fpga_v2 = {
.read_packet = ezusb_iidx_emu_node_fpga_read_packet,
.write_packet = ezusb_iidx_emu_node_fpga_write_packet};
/* All IIDX games */
const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_none = {
.node_id = EZUSB_IIDX_MSG_NODE_NONE,
.init_node = NULL,
.process_cmd = ezusb_iidx_emu_node_none_process_cmd,
.read_packet = ezusb_iidx_emu_node_none_read_packet,
.write_packet = ezusb_iidx_emu_node_none_write_packet};
/* Used on 9th to DistorteD */
const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_security_mem_v1 = {
.node_id = EZUSB_IIDX_MSG_NODE_SECURITY_MEM,
.init_node = ezusb_iidx_emu_node_security_mem_init,
.process_cmd = ezusb_iidx_emu_node_security_mem_v1_process_cmd,
.read_packet = ezusb_iidx_emu_node_security_mem_read_packet,
.write_packet = ezusb_iidx_emu_node_security_mem_write_packet};
/* Used on Gold to Sirius */
const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_security_mem_v2 = {
.node_id = EZUSB_IIDX_MSG_NODE_SECURITY_MEM,
.init_node = ezusb_iidx_emu_node_security_mem_init,
.process_cmd = ezusb_iidx_emu_node_security_mem_v2_process_cmd,
.read_packet = ezusb_iidx_emu_node_security_mem_read_packet,
.write_packet = ezusb_iidx_emu_node_security_mem_write_packet};
/* Used on 9th to DistorteD */
const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_security_plug_v1 = {
.node_id = EZUSB_IIDX_MSG_NODE_SECURITY_PLUG,
.init_node = NULL,
.process_cmd = ezusb_iidx_emu_node_security_plug_process_cmd_v1,
.read_packet = ezusb_iidx_emu_node_security_plug_read_packet_v1,
.write_packet = ezusb_iidx_emu_node_security_plug_write_packet};
/* Used on Gold to Sirius */
const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_security_plug_v2 = {
.node_id = EZUSB_IIDX_MSG_NODE_SECURITY_PLUG,
.init_node = NULL,
.process_cmd = ezusb_iidx_emu_node_security_plug_process_cmd_v2,
.read_packet = ezusb_iidx_emu_node_security_plug_read_packet_v2,
.write_packet = ezusb_iidx_emu_node_security_plug_write_packet};
/* Used on 9th to HappySky for magnetic readers */
const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_serial = {
.node_id = EZUSB_IIDX_MSG_NODE_SERIAL,
@@ -113,19 +32,3 @@ const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_serial = {
.process_cmd = ezusb_iidx_emu_node_serial_process_cmd,
.read_packet = ezusb_iidx_emu_node_serial_read_packet,
.write_packet = ezusb_iidx_emu_node_serial_write_packet};
/* All IIDX games */
const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_sram = {
.node_id = EZUSB_IIDX_MSG_NODE_SRAM,
.init_node = NULL,
.process_cmd = ezusb_iidx_emu_node_sram_process_cmd,
.read_packet = ezusb_iidx_emu_node_sram_read_packet,
.write_packet = ezusb_iidx_emu_node_sram_write_packet};
/* Used on 9th to Sirius */
const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_wdt = {
.node_id = EZUSB_IIDX_MSG_NODE_WDT,
.init_node = NULL,
.process_cmd = ezusb_iidx_emu_node_wdt_process_cmd,
.read_packet = ezusb_iidx_emu_node_wdt_read_packet,
.write_packet = ezusb_iidx_emu_node_wdt_write_packet};

View File

@@ -1,21 +1,10 @@
#ifndef EZUSBEMU_NODES_IIDX_H
#define EZUSBEMU_NODES_IIDX_H
#include "ezusb-iidx-emu/node.h"
#include "ezusb-emu/node.h"
extern const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_16seg;
extern const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_coin;
extern const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_eeprom_v1;
extern const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_eeprom_v2;
extern const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_fpga_v1;
extern const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_fpga_v2;
extern const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_none;
extern const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_security_mem_v1;
extern const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_security_mem_v2;
extern const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_security_plug_v1;
extern const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_security_plug_v2;
extern const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_serial;
extern const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_sram;
extern const struct ezusb_iidx_emu_node ezusb_iidx_emu_node_wdt;
#endif

View File

@@ -2,6 +2,7 @@ libs += ezusb2-iidx-emu
libs_ezusb2-iidx-emu := \
ezusb-emu \
ezusb-iidx-16seg-emu \
src_ezusb2-iidx-emu := \
msg.c \

View File

@@ -9,9 +9,8 @@
#include "hook/iohook.h"
#include "ezusb-emu/msg.h"
#include "ezusb-iidx-emu/msg.h"
#include "ezusb-iidx-emu/nodes.h"
#include "ezusb-emu/nodes.h"
#include "ezusb-iidx-16seg-emu/nodes.h"
#include "ezusb2-iidx/msg.h"

View File

@@ -2,7 +2,6 @@ libs += ezusb2-popn-emu
libs_ezusb2-popn-emu := \
ezusb-emu \
ezusb-iidx-emu \
ezusb-iidx \
ezusb2-iidx-emu \

View File

@@ -10,12 +10,11 @@
#include "ezusb-emu/msg.h"
#include "ezusb-iidx-emu/msg.h"
#include "ezusb-iidx-emu/nodes.h"
#include "ezusb-iidx-emu/node-none.h"
#include "ezusb-iidx-emu/node-coin.h"
#include "ezusb-iidx-emu/node-security-mem.h"
#include "ezusb-iidx-emu/node-security-plug.h"
#include "ezusb-emu/nodes.h"
#include "ezusb-emu/node-none.h"
#include "ezusb-emu/node-coin.h"
#include "ezusb-emu/node-security-mem.h"
#include "ezusb-emu/node-security-plug.h"
#include "ezusb2-popn/msg.h"

View File

@@ -75,6 +75,12 @@ static HRESULT(STDCALL *real_Reset)(
IDirect3DDevice9 *self,
D3DPRESENT_PARAMETERS *pp);
static HRESULT (STDCALL *real_SetViewport)(
IDirect3DDevice9 *self, const D3DVIEWPORT9 *pViewport);
static HRESULT (STDCALL *real_SetVertexShader)(
IDirect3DDevice9 *self, IDirect3DVertexShader9 *pShader);
/* ------------------------------------------------------------------------------------------------------------------
*/
@@ -144,6 +150,12 @@ static HRESULT STDCALL my_Reset(
IDirect3DDevice9 *self,
D3DPRESENT_PARAMETERS *pp);
static HRESULT STDCALL my_SetViewport(
IDirect3DDevice9 *self, const D3DVIEWPORT9 *pViewport);
static HRESULT STDCALL my_SetVertexShader(
IDirect3DDevice9 *self, IDirect3DVertexShader9 *pShader);
/* ------------------------------------------------------------------------------------------------------------------
*/
@@ -205,6 +217,12 @@ hook_d3d9_irp_handler_real_dev_draw_primitive_up(struct hook_d3d9_irp *irp);
static HRESULT
hook_d3d9_irp_handler_real_dev_reset(struct hook_d3d9_irp *irp);
static HRESULT
hook_d3d9_irp_handler_real_dev_set_viewport(struct hook_d3d9_irp *irp);
static HRESULT
hook_d3d9_irp_handler_real_dev_set_vertex_shader(struct hook_d3d9_irp *irp);
/* ------------------------------------------------------------------------------------------------------------------
*/
@@ -231,6 +249,10 @@ static const hook_d3d9_irp_handler_t hook_d3d9_irp_real_handlers[] = {
hook_d3d9_irp_handler_real_dev_draw_primitive_up,
[HOOK_D3D9_IRP_OP_DEV_RESET] =
hook_d3d9_irp_handler_real_dev_reset,
[HOOK_D3D9_IRP_OP_DEV_SET_VIEWPORT] =
hook_d3d9_irp_handler_real_dev_set_viewport,
[HOOK_D3D9_IRP_OP_DEV_SET_VERTEX_SHADER] =
hook_d3d9_irp_handler_real_dev_set_vertex_shader,
};
static const hook_d3d9_irp_handler_t *hook_d3d9_handlers;
@@ -501,6 +523,40 @@ static HRESULT STDCALL my_DrawPrimitiveUP(
return hr;
}
static HRESULT STDCALL my_SetViewport(
IDirect3DDevice9 *self, const D3DVIEWPORT9 *pViewport)
{
struct hook_d3d9_irp irp;
HRESULT hr;
memset(&irp, 0, sizeof(irp));
irp.op = HOOK_D3D9_IRP_OP_DEV_SET_VIEWPORT;
irp.args.dev_set_viewport.self = self;
irp.args.dev_set_viewport.pViewport = pViewport;
hr = hook_d3d9_irp_invoke_next(&irp);
return hr;
}
static HRESULT STDCALL my_SetVertexShader(
IDirect3DDevice9 *self, IDirect3DVertexShader9 *pShader)
{
struct hook_d3d9_irp irp;
HRESULT hr;
memset(&irp, 0, sizeof(irp));
irp.op = HOOK_D3D9_IRP_OP_DEV_SET_VERTEX_SHADER;
irp.args.dev_set_vertex_shader.self = self;
irp.args.dev_set_vertex_shader.pShader = pShader;
hr = hook_d3d9_irp_invoke_next(&irp);
return hr;
}
static HRESULT STDCALL my_Reset(
IDirect3DDevice9 *self,
D3DPRESENT_PARAMETERS *pp)
@@ -691,6 +747,12 @@ hook_d3d9_irp_handler_real_dev_create_device(struct hook_d3d9_irp *irp)
real_Reset = api_vtbl->Reset;
api_vtbl->Reset = my_Reset;
real_SetViewport = api_vtbl->SetViewport;
api_vtbl->SetViewport = my_SetViewport;
real_SetVertexShader = api_vtbl->SetVertexShader;
api_vtbl->SetVertexShader = my_SetVertexShader;
*irp->args.ctx_create_device.pdev = (IDirect3DDevice9 *) api_proxy;
return hr;
@@ -775,6 +837,26 @@ hook_d3d9_irp_handler_real_dev_reset(struct hook_d3d9_irp *irp)
irp->args.dev_reset.pp);
}
static HRESULT
hook_d3d9_irp_handler_real_dev_set_viewport(struct hook_d3d9_irp *irp)
{
log_assert(irp);
return real_SetViewport(
irp->args.dev_set_viewport.self,
irp->args.dev_set_viewport.pViewport);
}
static HRESULT
hook_d3d9_irp_handler_real_dev_set_vertex_shader(struct hook_d3d9_irp *irp)
{
log_assert(irp);
return real_SetVertexShader(
irp->args.dev_set_vertex_shader.self,
irp->args.dev_set_vertex_shader.pShader);
}
/* ------------------------------------------------------------------------------------------------------------------
*/

View File

@@ -34,6 +34,8 @@ enum hook_d3d9_irp_op {
HOOK_D3D9_IRP_OP_DEV_SET_RENDER_STATE = 10,
HOOK_D3D9_IRP_OP_DEV_DRAW_PRIMITIVE_UP = 11,
HOOK_D3D9_IRP_OP_DEV_RESET = 12,
HOOK_D3D9_IRP_OP_DEV_SET_VIEWPORT = 13,
HOOK_D3D9_IRP_OP_DEV_SET_VERTEX_SHADER = 14,
};
/**
@@ -170,6 +172,22 @@ struct hook_d3d9_irp {
IDirect3DDevice9 *self;
D3DPRESENT_PARAMETERS *pp;
} dev_reset;
/**
* Params of IDIrect3DDevice9_SetViewport
*/
struct {
IDirect3DDevice9 *self;
const D3DVIEWPORT9 *pViewport;
} dev_set_viewport;
/**
* Params of IDIrect3DDevice9_SetVertexShader
*/
struct {
IDirect3DDevice9 *self;
IDirect3DVertexShader9 *pShader;
} dev_set_vertex_shader;
} args;
size_t next_handler;

View File

@@ -22,6 +22,7 @@
"gfx.scale_back_buffer_filter"
#define IIDXHOOK_CONFIG_GFX_FORCED_REFRESHRATE_KEY "gfx.forced_refresh_rate"
#define IIDXHOOK_CONFIG_GFX_DEVICE_ADAPTER_KEY "gfx.device_adapter"
#define IIDXHOOK_CONFIG_GFX_DIAGONAL_TEARING_FIX_KEY "gfx.diagonal_tearing_fix"
#define IIDXHOOK_CONFIG_GFX_DEFAULT_BGVIDEO_UV_FIX_VALUE false
#define IIDXHOOK_CONFIG_GFX_DEFAULT_FRAMED_VALUE false
@@ -36,6 +37,7 @@
#define IIDXHOOK_CONFIG_GFX_DEFAULT_SCALE_BACK_BUFFER_FILTER_VALUE "none"
#define IIDXHOOK_CONFIG_GFX_DEFAULT_FORCED_RR_VALUE -1
#define IIDXHOOK_CONFIG_GFX_DEFAULT_DEVICE_ADAPTER_VALUE -1
#define IIDXHOOK_CONFIG_GFX_DEFAULT_DIAGONAL_TEARING_FIX_VALUE false
void iidxhook_config_gfx_init(struct cconfig *config)
{
@@ -159,6 +161,13 @@ void iidxhook_config_gfx_init(struct cconfig *config)
IIDXHOOK_CONFIG_GFX_DEFAULT_DEVICE_ADAPTER_VALUE,
"D3D9 device adapter (monitor), -1 to use default, "
"0, 1, 2 etc. to use specified adapter");
cconfig_util_set_bool(
config,
IIDXHOOK_CONFIG_GFX_DIAGONAL_TEARING_FIX_KEY,
IIDXHOOK_CONFIG_GFX_DEFAULT_DIAGONAL_TEARING_FIX_VALUE,
"Fix diagonal tearing with video cards "
"other than Radeon X1300 and HD3450");
}
void iidxhook_config_gfx_get(
@@ -367,4 +376,16 @@ void iidxhook_config_gfx_get(
IIDXHOOK_CONFIG_GFX_DEVICE_ADAPTER_KEY,
IIDXHOOK_CONFIG_GFX_DEFAULT_DEVICE_ADAPTER_VALUE);
}
if (!cconfig_util_get_bool(
config,
IIDXHOOK_CONFIG_GFX_DIAGONAL_TEARING_FIX_KEY,
&config_gfx->diagonal_tearing_fix,
IIDXHOOK_CONFIG_GFX_DEFAULT_DIAGONAL_TEARING_FIX_VALUE)) {
log_warning(
"Invalid value for key '%s' specified, fallback "
"to default '%d'",
IIDXHOOK_CONFIG_GFX_DIAGONAL_TEARING_FIX_KEY,
IIDXHOOK_CONFIG_GFX_DEFAULT_DIAGONAL_TEARING_FIX_VALUE);
}
}

View File

@@ -21,6 +21,7 @@ struct iidxhook_config_gfx {
enum iidxhook_util_d3d9_back_buffer_scale_filter scale_back_buffer_filter;
int32_t forced_refresh_rate;
int32_t device_adapter;
bool diagonal_tearing_fix;
};
void iidxhook_config_gfx_init(struct cconfig *config);

View File

@@ -13,6 +13,7 @@
#include "hook/table.h"
#include "iidxhook-util/d3d9.h"
#include "iidxhook-util/vertex-shader.h"
#include "util/defs.h"
#include "util/log.h"
@@ -64,6 +65,8 @@ static struct {
D3DTEXTUREFILTERTYPE filter;
} iidxhook_util_d3d9_back_buffer_scaling;
static IDirect3DVertexShader9* vertex_shader;
/* ------------------------------------------------------------------------------------------------------------------
*/
@@ -901,6 +904,45 @@ iidxhook_util_d3d9_scale_render_target_to_back_buffer(struct hook_d3d9_irp *irp)
}
}
static void
iidxhook_util_d3d9_iidx18_and_19_fix_diagonal_tearing(struct hook_d3d9_irp *irp)
{
HRESULT hr;
log_assert(irp);
log_assert(irp->op == HOOK_D3D9_IRP_OP_DEV_SET_VIEWPORT || irp->op == HOOK_D3D9_IRP_OP_DEV_SET_VERTEX_SHADER);
if (!iidxhook_util_d3d9_config.iidx18_and_19_diagonal_tearing_fix)
{
return;
}
if (irp->op == HOOK_D3D9_IRP_OP_DEV_SET_VIEWPORT)
{
const D3DVIEWPORT9 *pViewport = irp->args.dev_set_viewport.pViewport;
const float fix_offset[2] = {-1.0F / (float)pViewport->Width, -1.0F / (float)pViewport->Height};
hr = IDirect3DDevice9_SetVertexShaderConstantF(irp->args.dev_set_viewport.self, 63, fix_offset, lengthof(fix_offset));
if (hr != S_OK) {
log_warning("SetVertexShaderConstantF failed: %lX", hr);
}
}
if (irp->op == HOOK_D3D9_IRP_OP_DEV_SET_VERTEX_SHADER)
{
if (!vertex_shader) {
hr = IDirect3DDevice9_CreateVertexShader(irp->args.dev_set_vertex_shader.self, (const DWORD*) g_vs11_vs_main, &vertex_shader);
if (hr != S_OK) {
log_fatal("CreateVertexShader failed: %lX", hr);
}
}
if (irp->args.dev_set_vertex_shader.pShader != NULL) {
irp->args.dev_set_vertex_shader.pShader = vertex_shader;
}
}
}
/* ------------------------------------------------------------------------------------------------------------------
*/
@@ -921,6 +963,7 @@ iidxhook_util_d3d9_log_config(const struct iidxhook_util_d3d9_config *config)
"iidx12_fix_song_select_bg: %d\n"
"iidx13_fix_song_select_bg: %d\n"
"iidx14_to_19_nvidia_fix: %d\n"
"iidx18_and_19_diagonal_tearing_fix: %d\n"
"scale_back_buffer_width: %d\n"
"scale_back_buffer_height: %d\n"
"scale_back_buffer_filter: %d\n"
@@ -938,6 +981,7 @@ iidxhook_util_d3d9_log_config(const struct iidxhook_util_d3d9_config *config)
config->iidx12_fix_song_select_bg,
config->iidx13_fix_song_select_bg,
config->iidx14_to_19_nvidia_fix,
config->iidx18_and_19_diagonal_tearing_fix,
config->scale_back_buffer_width,
config->scale_back_buffer_height,
config->scale_back_buffer_filter,
@@ -1002,6 +1046,7 @@ void iidxhook_util_d3d9_init_config(struct iidxhook_util_d3d9_config *config)
config->iidx12_fix_song_select_bg = false;
config->iidx13_fix_song_select_bg = false;
config->iidx14_to_19_nvidia_fix = false;
config->iidx18_and_19_diagonal_tearing_fix = false;
config->scale_back_buffer_width = 0;
config->scale_back_buffer_height = 0;
config->scale_back_buffer_filter =
@@ -1112,6 +1157,12 @@ iidxhook_util_d3d9_irp_handler(struct hook_d3d9_irp *irp)
return hook_d3d9_irp_invoke_next(irp);
case HOOK_D3D9_IRP_OP_DEV_SET_VIEWPORT:
case HOOK_D3D9_IRP_OP_DEV_SET_VERTEX_SHADER:
iidxhook_util_d3d9_iidx18_and_19_fix_diagonal_tearing(irp);
return hook_d3d9_irp_invoke_next(irp);
default:
return hook_d3d9_irp_invoke_next(irp);
}

View File

@@ -127,10 +127,15 @@ struct iidxhook_util_d3d9_config {
/**
* Fixes a parameter on CreateTexture calls causing the game to crash with
* NVIDIA cards (on GOLD and possible newer)
* NVIDIA cards on all games from GOLD to Lincle including.
*/
bool iidx14_to_19_nvidia_fix;
/**
* Fix diagonal tearing with video cards other than Radeon X1300 and HD3450
*/
bool iidx18_and_19_diagonal_tearing_fix;
/**
* Scale the back buffer after a frame got rendered. This allows you to
* up-/downscale the final frame to display arbitrary resolutions, e.g.

View File

@@ -0,0 +1,107 @@
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
// Parameters:
//
// float4 ColorMultiply;
// float2 FixOffset;
// float4x4 WorldViewProjection;
//
//
// Registers:
//
// Name Reg Size
// ------------------- ----- ----
// WorldViewProjection c0 4
// ColorMultiply c4 1
// FixOffset c63 1
//
vs_1_1
dcl_position v0
dcl_color v1
dcl_texcoord v2
dp4 oPos.z, v0, c2
mul oD0, v1, c4
dp4 r0.x, v0, c0
dp4 r0.y, v0, c1
dp4 r0.z, v0, c3
mad oPos.xy, c63, r0.z, r0
mov oPos.w, r0.z
mov oT0.xy, v2
// approximately 8 instruction slots used
#endif
const BYTE g_vs11_vs_main[] =
{
1, 1, 254, 255, 254, 255,
59, 0, 67, 84, 65, 66,
28, 0, 0, 0, 191, 0,
0, 0, 1, 1, 254, 255,
3, 0, 0, 0, 28, 0,
0, 0, 0, 1, 0, 0,
184, 0, 0, 0, 88, 0,
0, 0, 2, 0, 4, 0,
1, 0, 18, 0, 104, 0,
0, 0, 0, 0, 0, 0,
120, 0, 0, 0, 2, 0,
63, 0, 1, 0, 254, 0,
132, 0, 0, 0, 0, 0,
0, 0, 148, 0, 0, 0,
2, 0, 0, 0, 4, 0,
2, 0, 168, 0, 0, 0,
0, 0, 0, 0, 67, 111,
108, 111, 114, 77, 117, 108,
116, 105, 112, 108, 121, 0,
171, 171, 1, 0, 3, 0,
1, 0, 4, 0, 1, 0,
0, 0, 0, 0, 0, 0,
70, 105, 120, 79, 102, 102,
115, 101, 116, 0, 171, 171,
1, 0, 3, 0, 1, 0,
2, 0, 1, 0, 0, 0,
0, 0, 0, 0, 87, 111,
114, 108, 100, 86, 105, 101,
119, 80, 114, 111, 106, 101,
99, 116, 105, 111, 110, 0,
3, 0, 3, 0, 4, 0,
4, 0, 1, 0, 0, 0,
0, 0, 0, 0, 118, 115,
95, 49, 95, 49, 0, 77,
105, 99, 114, 111, 115, 111,
102, 116, 32, 40, 82, 41,
32, 72, 76, 83, 76, 32,
83, 104, 97, 100, 101, 114,
32, 67, 111, 109, 112, 105,
108, 101, 114, 32, 49, 48,
46, 49, 0, 171, 31, 0,
0, 0, 0, 0, 0, 128,
0, 0, 15, 144, 31, 0,
0, 0, 10, 0, 0, 128,
1, 0, 15, 144, 31, 0,
0, 0, 5, 0, 0, 128,
2, 0, 15, 144, 9, 0,
0, 0, 0, 0, 4, 192,
0, 0, 228, 144, 2, 0,
228, 160, 5, 0, 0, 0,
0, 0, 15, 208, 1, 0,
228, 144, 4, 0, 228, 160,
9, 0, 0, 0, 0, 0,
1, 128, 0, 0, 228, 144,
0, 0, 228, 160, 9, 0,
0, 0, 0, 0, 2, 128,
0, 0, 228, 144, 1, 0,
228, 160, 9, 0, 0, 0,
0, 0, 4, 128, 0, 0,
228, 144, 3, 0, 228, 160,
4, 0, 0, 0, 0, 0,
3, 192, 63, 0, 228, 160,
0, 0, 170, 128, 0, 0,
228, 128, 1, 0, 0, 0,
0, 0, 8, 192, 0, 0,
170, 128, 1, 0, 0, 0,
0, 0, 3, 224, 2, 0,
228, 144, 255, 255, 0, 0
};

View File

@@ -0,0 +1,40 @@
/*
* original shader
* vs.1.1 //Shader version 1.1
* dcl_position v0;
* dcl_color v1;
* dcl_texcoord0 v2;
* m4x4 oPos, v0, c0
* mul oD0, v1, c4
* mov oT0.xy, v2
*
* build command
* fxc.exe /Vi vertex-shader.hlsl /Fh vertex-shader.h /T vs_1_1 /E vs_main
*/
float4x4 WorldViewProjection : register(c0);
float4 ColorMultiply : register(c4);
float2 FixOffset : register(c63);
struct VS {
float4 Position : POSITION; // dcl_position v0;
float4 Color : COLOR; // dcl_color v1;
float2 TexCoord : TEXCOORD0; // dcl_texcoord0 v2;
};
VS vs_main(VS input)
{
VS output;
output.Position = mul(input.Position, WorldViewProjection); // m4x4 oPos, v0, c0
output.Color.x = mul(input.Color.x, ColorMultiply.x); // mul oD0, v1, c4
output.Color.y = mul(input.Color.y, ColorMultiply.y);
output.Color.z = mul(input.Color.z, ColorMultiply.z);
output.Color.w = mul(input.Color.w, ColorMultiply.w);
output.TexCoord = input.TexCoord; // mov oT0.xy, v2
// fix diagonal tearing
output.Position.xy += FixOffset.xy * output.Position.w;
return output;
}

View File

@@ -7,6 +7,7 @@ ldflags_iidxhook1 := \
libs_iidxhook1 := \
iidxhook-util \
ezusb-emu \
ezusb-iidx-16seg-emu \
ezusb-iidx-emu \
security \
eamio \

View File

@@ -11,9 +11,9 @@
#include "ezusb-emu/desc.h"
#include "ezusb-emu/device.h"
#include "ezusb-emu/node-security-plug.h"
#include "ezusb-iidx-emu/msg.h"
#include "ezusb-iidx-emu/node-security-plug.h"
#include "ezusb-iidx-emu/node-serial.h"
#include "ezusb-iidx-emu/nodes.h"

View File

@@ -7,6 +7,7 @@ ldflags_iidxhook2 := \
libs_iidxhook2 := \
iidxhook-util \
ezusb-emu \
ezusb-iidx-16seg-emu \
ezusb-iidx-emu \
security \
eamio \

View File

@@ -11,9 +11,9 @@
#include "ezusb-emu/desc.h"
#include "ezusb-emu/device.h"
#include "ezusb-emu/node-security-plug.h"
#include "ezusb-iidx-emu/msg.h"
#include "ezusb-iidx-emu/node-security-plug.h"
#include "ezusb-iidx-emu/node-serial.h"
#include "ezusb-iidx-emu/nodes.h"

View File

@@ -7,6 +7,7 @@ ldflags_iidxhook3 := \
libs_iidxhook3 := \
iidxhook-util \
ezusb-emu \
ezusb-iidx-16seg-emu \
ezusb2-emu \
ezusb2-iidx-emu \
ezusb-iidx-emu \

View File

@@ -9,7 +9,7 @@
#include "cconfig/cconfig-hook.h"
#include "ezusb-iidx-emu/node-security-plug.h"
#include "ezusb-emu/node-security-plug.h"
#include "ezusb-iidx-emu/node-serial.h"
#include "ezusb-iidx-emu/nodes.h"

View File

@@ -0,0 +1,27 @@
avsdlls += iidxhook4-cn
ldflags_iidxhook4-cn := \
-liphlpapi \
-lws2_32 \
deplibs_iidxhook4-cn := \
avs \
libs_iidxhook4-cn := \
iidxhook-util \
ezusb-emu \
ezusb-iidx-16seg-emu \
ezusb2-emu \
ezusb2-iidx-emu \
security \
hook \
hooklib \
iidxio \
cconfig \
util \
ezusb \
src_iidxhook4-cn := \
avs-boot.c \
path.c \
dllmain.c \

View File

@@ -0,0 +1,103 @@
#define LOG_MODULE "avs-boot"
#include <stdint.h>
#include <string.h>
#include "hook/table.h"
#include "imports/avs.h"
#include "iidxhook4-cn/avs-boot.h"
#include "util/log.h"
static void (*real_avs_boot)(
struct property_node *config,
void *std_heap,
size_t sz_std_heap,
void *avs_heap,
size_t sz_avs_heap,
avs_log_writer_t log_writer,
void *log_context);
static void my_avs_boot(
struct property_node *config,
void *std_heap,
size_t sz_std_heap,
void *avs_heap,
size_t sz_avs_heap,
avs_log_writer_t log_writer,
void *log_context);
static const struct hook_symbol iidxhook4_cn_log_hook_syms[] = {
{.name = "avs_boot",
.patch = my_avs_boot,
.link = (void **) &real_avs_boot},
};
static void avs_boot_replace_property_uint32(
struct property_node *node, const char *name, uint32_t val)
{
struct property_node *tmp;
tmp = property_search(NULL, node, name);
if (tmp) {
property_node_remove(tmp);
}
property_node_create(NULL, node, PSMAP_TYPE_U32, name, val);
}
static void avs_boot_replace_property_str(
struct property_node *node, const char *name, const char *val)
{
struct property_node *tmp;
tmp = property_search(NULL, node, name);
if (tmp) {
property_node_remove(tmp);
}
tmp = property_node_create(NULL, node, PROPERTY_TYPE_STR, name, val);
if (tmp) {
property_node_datasize(tmp);
}
}
static void my_avs_boot(
struct property_node *config,
void *std_heap,
size_t sz_std_heap,
void *avs_heap,
size_t sz_avs_heap,
avs_log_writer_t log_writer,
void *log_context)
{
log_info("Called my_avs_boot");
avs_boot_replace_property_uint32(config, "log/level", 4);
avs_boot_replace_property_str(config, "fs/root/device", ".");
real_avs_boot(
config,
std_heap,
sz_std_heap,
avs_heap,
sz_avs_heap,
log_writer_debug,
NULL);
}
void iidxhook4_cn_avs_boot_init()
{
hook_table_apply(
NULL,
"libavs-win32.dll",
iidxhook4_cn_log_hook_syms,
lengthof(iidxhook4_cn_log_hook_syms));
log_info("Inserted avs log hooks");
}

View File

@@ -0,0 +1,10 @@
#ifndef IIDXHOOK4_CN_AVS_BOOT_H
#define IIDXHOOK4_CN_AVS_BOOT_H
/**
* Initialize hooking of avs_boot. This re-enables avs logging
* and injects a few important settings.
*/
void iidxhook4_cn_avs_boot_init();
#endif

View File

@@ -0,0 +1,224 @@
#include <windows.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "bemanitools/iidxio.h"
#include "cconfig/cconfig-hook.h"
#include "ezusb-emu/node-security-plug.h"
#include "ezusb2-emu/desc.h"
#include "ezusb2-emu/device.h"
#include "ezusb2-iidx-emu/msg.h"
#include "hook/table.h"
#include "hooklib/acp.h"
#include "hooklib/setupapi.h"
#include "iidxhook4-cn/avs-boot.h"
#include "iidxhook4-cn/path.h"
#include "iidxhook-util/chart-patch.h"
#include "iidxhook-util/config-eamuse.h"
#include "iidxhook-util/config-gfx.h"
#include "iidxhook-util/config-io.h"
#include "iidxhook-util/config-sec.h"
#include "iidxhook-util/d3d9.h"
#include "iidxhook-util/settings.h"
#include "security/rp-sign-key.h"
#include "imports/avs.h"
#include "util/log.h"
#define IIDXHOOK4_CN_INFO_HEADER \
"iidxhook for Resort Anthem CN" \
", build " __DATE__ " " __TIME__ ", gitrev " STRINGIFY(GITREV)
#define IIDXHOOK4_CN_CMD_USAGE \
"Usage: inject.exe iidxhook4-cn.dll <bm2dx.exe> [options...]"
static HANDLE STDCALL my_OpenProcess(DWORD, BOOL, DWORD);
static HANDLE(STDCALL *real_OpenProcess)(DWORD, BOOL, DWORD);
static bool iidxhook_init_check;
static const hook_d3d9_irp_handler_t iidxhook_d3d9_handlers[] = {
iidxhook_util_d3d9_irp_handler,
};
static const struct hook_symbol init_hook_syms[] = {
{.name = "OpenProcess",
.patch = my_OpenProcess,
.link = (void **) &real_OpenProcess},
};
static struct iidxhook_config_io config_io;
static void
iidxhook4_cn_setup_d3d9_hooks(const struct iidxhook_config_gfx *config_gfx)
{
struct iidxhook_util_d3d9_config d3d9_config;
iidxhook_util_d3d9_init_config(&d3d9_config);
d3d9_config.windowed = config_gfx->windowed;
d3d9_config.framed = config_gfx->framed;
d3d9_config.override_window_width = config_gfx->window_width;
d3d9_config.override_window_height = config_gfx->window_height;
d3d9_config.framerate_limit = config_gfx->frame_rate_limit;
d3d9_config.pci_vid = config_gfx->pci_id_vid;
d3d9_config.pci_pid = config_gfx->pci_id_pid;
d3d9_config.scale_back_buffer_width = config_gfx->scale_back_buffer_width;
d3d9_config.scale_back_buffer_height = config_gfx->scale_back_buffer_height;
d3d9_config.scale_back_buffer_filter = config_gfx->scale_back_buffer_filter;
d3d9_config.forced_refresh_rate = config_gfx->forced_refresh_rate;
d3d9_config.device_adapter = config_gfx->device_adapter;
d3d9_config.iidx18_and_19_diagonal_tearing_fix = config_gfx->diagonal_tearing_fix;
d3d9_config.iidx14_to_19_nvidia_fix = true;
d3d9_config.iidx18_and_19_diagonal_tearing_fix = config_gfx->diagonal_tearing_fix;
if (config_gfx->monitor_check == 0) {
log_info("Auto monitor check enabled");
d3d9_config.iidx09_to_19_monitor_check_cb =
iidxhook_util_chart_patch_set_refresh_rate;
iidxhook_util_chart_patch_init(
IIDXHOOK_UTIL_CHART_PATCH_TIMEBASE_14_TO_18_VGA);
} else if (config_gfx->monitor_check > 0) {
log_info(
"Manual monitor check, resulting refresh rate: %f",
config_gfx->monitor_check);
iidxhook_util_chart_patch_init(
IIDXHOOK_UTIL_CHART_PATCH_TIMEBASE_14_TO_18_VGA);
iidxhook_util_chart_patch_set_refresh_rate(config_gfx->monitor_check);
}
iidxhook_util_d3d9_configure(&d3d9_config);
hook_d3d9_init(iidxhook_d3d9_handlers, lengthof(iidxhook_d3d9_handlers));
}
/**
* This seems to be a good entry point to intercept
* before the game calls anything important
*/
static HANDLE STDCALL
my_OpenProcess(DWORD dwDesiredAccess, BOOL bInheritHandle, DWORD dwProcessId)
{
struct cconfig *config;
struct iidxhook_util_config_eamuse config_eamuse;
struct iidxhook_config_gfx config_gfx;
struct iidxhook_config_sec config_sec;
if (iidxhook_init_check) {
return real_OpenProcess(dwDesiredAccess, bInheritHandle, dwProcessId);
}
iidxhook_init_check = true;
log_info("-------------------------------------------------------------");
log_info("--------------- Begin iidxhook my_OpenProcess ---------------");
log_info("-------------------------------------------------------------");
config = cconfig_init();
iidxhook_util_config_eamuse_init(config);
iidxhook_config_gfx_init(config);
iidxhook_config_io_init(config);
iidxhook_config_sec_init(config);
if (!cconfig_hook_config_init(
config,
IIDXHOOK4_CN_INFO_HEADER "\n" IIDXHOOK4_CN_CMD_USAGE,
CCONFIG_CMD_USAGE_OUT_DBG)) {
cconfig_finit(config);
exit(EXIT_FAILURE);
}
iidxhook_util_config_eamuse_get(&config_eamuse, config);
iidxhook_config_gfx_get(&config_gfx, config);
iidxhook_config_io_get(&config_io, config);
iidxhook_config_sec_get(&config_sec, config);
cconfig_finit(config);
log_info(IIDXHOOK4_CN_INFO_HEADER);
log_info("Initializing iidxhook...");
/**
* This game is using a black round plug for game license management instead of a black usb dongle.
* No white dongle hooks applies since the game does not have network functionality.
* Also, card readers are not used/checked; no card reader hooks required.
*/
ezusb_iidx_emu_node_security_plug_set_boot_version(
&config_sec.boot_version);
ezusb_iidx_emu_node_security_plug_set_boot_seeds(config_sec.boot_seeds);
ezusb_iidx_emu_node_security_plug_set_plug_black_sign_key(
&security_rp_sign_key_black_iidx);
ezusb_iidx_emu_node_security_plug_set_plug_black_mcode(
&config_sec.black_plug_mcode);
ezusb_iidx_emu_node_security_plug_set_pcbid(&config_eamuse.pcbid);
iidxhook4_cn_setup_d3d9_hooks(&config_gfx);
if (!config_io.disable_io_emu) {
log_info("Starting IIDX IO backend");
iidx_io_set_loggers(
log_impl_misc, log_impl_info, log_impl_warning, log_impl_fatal);
if (!iidx_io_init(
avs_thread_create, avs_thread_join, avs_thread_destroy)) {
log_fatal("Initializing IIDX IO backend failed");
}
} else {
log_info("IIDX IO emulation backend disabled");
}
/* Set up IO emulation hooks _after_ IO API setup to allow
API implementations with real IO devices */
iohook_push_handler(ezusb2_emu_device_dispatch_irp);
iohook_push_handler(iidxhook_util_chart_patch_dispatch_irp);
iohook_push_handler(settings_hook_dispatch_irp);
if (!config_io.disable_io_emu) {
hook_setupapi_init(&ezusb2_emu_desc_device.setupapi);
ezusb2_emu_device_hook_init(ezusb2_iidx_emu_msg_init());
}
log_info("-------------------------------------------------------------");
log_info("---------------- End iidxhook my_OpenProcess ----------------");
log_info("-------------------------------------------------------------");
return real_OpenProcess(dwDesiredAccess, bInheritHandle, dwProcessId);
}
/**
* Hook library for Resort Anthem CN
*/
BOOL WINAPI DllMain(HMODULE mod, DWORD reason, void *ctx)
{
if (reason != DLL_PROCESS_ATTACH) {
return TRUE;
}
log_to_writer(log_writer_debug, NULL);
hook_table_apply(
NULL, "kernel32.dll", init_hook_syms, lengthof(init_hook_syms));
iidxhook4_cn_path_init();
iidxhook4_cn_avs_boot_init();
acp_hook_init();
settings_hook_init();
return TRUE;
}

View File

@@ -0,0 +1,4 @@
LIBRARY iidxhook4-cn
EXPORTS
DllMain@12 @1 NONAME

View File

@@ -0,0 +1,156 @@
#define LOG_MODULE "path"
#include <windows.h>
#include <stdint.h>
#include <string.h>
#include "hook/table.h"
#include "iidxhook4-cn/path.h"
#include "util/log.h"
#include "util/str.h"
#define PATH_A "D:/JDZ-001/contents/"
#define PATH_W L"D:/JDZ-001/contents/"
static HANDLE WINAPI my_CreateFileA(
LPCSTR lpFileName,
DWORD dwDesiredAccess,
DWORD dwShareMode,
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
DWORD dwCreationDisposition,
DWORD dwFlagsAndAttributes,
HANDLE hTemplateFile);
static HANDLE(WINAPI *real_CreateFileA)(
LPCSTR lpFileName,
DWORD dwDesiredAccess,
DWORD dwShareMode,
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
DWORD dwCreationDisposition,
DWORD dwFlagsAndAttributes,
HANDLE hTemplateFile);
static HANDLE WINAPI my_CreateFileW(
LPCWSTR lpFileName,
DWORD dwDesiredAccess,
DWORD dwShareMode,
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
DWORD dwCreationDisposition,
DWORD dwFlagsAndAttributes,
HANDLE hTemplateFile);
static HANDLE(WINAPI *real_CreateFileW)(
LPCWSTR lpFileName,
DWORD dwDesiredAccess,
DWORD dwShareMode,
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
DWORD dwCreationDisposition,
DWORD dwFlagsAndAttributes,
HANDLE hTemplateFile);
static HANDLE WINAPI my_FindFirstFileA(
LPCSTR lpFileName,
LPWIN32_FIND_DATAA lpFindFileData);
static HANDLE(WINAPI *real_FindFirstFileA)(
LPCSTR lpFileName,
LPWIN32_FIND_DATAA lpFindFileData);
static const struct hook_symbol iidxhook4_cn_path_hook_syms[] = {
{.name = "CreateFileA",
.patch = my_CreateFileA,
.link = (void **) &real_CreateFileA},
{.name = "CreateFileW",
.patch = my_CreateFileW,
.link = (void **) &real_CreateFileW},
{.name = "FindFirstFileA",
.patch = my_FindFirstFileA,
.link = (void **) &real_FindFirstFileA},
};
static HANDLE WINAPI my_CreateFileA(
LPCSTR lpFileName,
DWORD dwDesiredAccess,
DWORD dwShareMode,
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
DWORD dwCreationDisposition,
DWORD dwFlagsAndAttributes,
HANDLE hTemplateFile)
{
if (lpFileName != NULL && strstr(lpFileName, PATH_A) == lpFileName) {
char relative_path[MAX_PATH] = ".";
str_cat(relative_path, MAX_PATH, lpFileName + strlen(PATH_A) - 1);
return real_CreateFileA(
relative_path,
dwDesiredAccess,
dwShareMode,
lpSecurityAttributes,
dwCreationDisposition,
dwFlagsAndAttributes,
hTemplateFile);
}
return real_CreateFileA(
lpFileName,
dwDesiredAccess,
dwShareMode,
lpSecurityAttributes,
dwCreationDisposition,
dwFlagsAndAttributes,
hTemplateFile);
}
static HANDLE WINAPI my_CreateFileW(
LPCWSTR lpFileName,
DWORD dwDesiredAccess,
DWORD dwShareMode,
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
DWORD dwCreationDisposition,
DWORD dwFlagsAndAttributes,
HANDLE hTemplateFile)
{
if (lpFileName != NULL && wcsstr(lpFileName, PATH_W) == lpFileName) {
wchar_t relative_path[MAX_PATH] = L".";
wstr_cat(relative_path, MAX_PATH, lpFileName + wcslen(PATH_W) - 1);
return real_CreateFileW(
relative_path,
dwDesiredAccess,
dwShareMode,
lpSecurityAttributes,
dwCreationDisposition,
dwFlagsAndAttributes,
hTemplateFile);
}
return real_CreateFileW(
lpFileName,
dwDesiredAccess,
dwShareMode,
lpSecurityAttributes,
dwCreationDisposition,
dwFlagsAndAttributes,
hTemplateFile);
}
static HANDLE WINAPI my_FindFirstFileA(
LPCSTR lpFileName,
LPWIN32_FIND_DATAA lpFindFileData)
{
if (lpFileName != NULL && strstr(lpFileName, PATH_A) == lpFileName) {
char relative_path[MAX_PATH] = ".";
str_cat(relative_path, MAX_PATH, lpFileName + strlen(PATH_A) - 1);
return real_FindFirstFileA(relative_path, lpFindFileData);
}
return real_FindFirstFileA(lpFileName, lpFindFileData);
}
void iidxhook4_cn_path_init()
{
hook_table_apply(
NULL,
"kernel32.dll",
iidxhook4_cn_path_hook_syms,
lengthof(iidxhook4_cn_path_hook_syms));
log_info("Inserted path hooks");
}

View File

@@ -0,0 +1,6 @@
#ifndef IIDXHOOK4_CN_PATH_H
#define IIDXHOOK4_CN_PATH_H
void iidxhook4_cn_path_init();
#endif

View File

@@ -9,6 +9,7 @@ deplibs_iidxhook4 := \
libs_iidxhook4 := \
iidxhook-util \
ezusb-emu \
ezusb-iidx-16seg-emu \
ezusb2-emu \
ezusb2-iidx-emu \
ezusb-iidx-emu \

View File

@@ -70,6 +70,8 @@ iidxhook4_setup_d3d9_hooks(const struct iidxhook_config_gfx *config_gfx)
d3d9_config.scale_back_buffer_filter = config_gfx->scale_back_buffer_filter;
d3d9_config.forced_refresh_rate = config_gfx->forced_refresh_rate;
d3d9_config.device_adapter = config_gfx->device_adapter;
d3d9_config.iidx14_to_19_nvidia_fix = true;
d3d9_config.iidx18_and_19_diagonal_tearing_fix = config_gfx->diagonal_tearing_fix;
if (config_gfx->monitor_check == 0) {
log_info("Auto monitor check enabled");

View File

@@ -2,6 +2,7 @@ avsdlls += iidxhook5-cn
ldflags_iidxhook5-cn := \
-liphlpapi \
-lws2_32 \
deplibs_iidxhook5-cn := \
avs \
@@ -9,12 +10,10 @@ deplibs_iidxhook5-cn := \
libs_iidxhook5-cn := \
iidxhook-util \
ezusb-emu \
ezusb-iidx-16seg-emu \
ezusb2-emu \
ezusb2-iidx-emu \
ezusb-iidx-emu \
security \
eamio \
acioemu \
hook \
hooklib \
iidxio \

View File

@@ -5,12 +5,11 @@
#include <stdlib.h>
#include <string.h>
#include "bemanitools/eamio.h"
#include "bemanitools/iidxio.h"
#include "cconfig/cconfig-hook.h"
#include "ezusb-iidx-emu/node-security-plug.h"
#include "ezusb-emu/node-security-plug.h"
#include "ezusb2-emu/desc.h"
#include "ezusb2-emu/device.h"
@@ -26,7 +25,6 @@
#include "iidxhook5-cn/avs-boot.h"
#include "iidxhook5-cn/path.h"
#include "iidxhook-util/acio.h"
#include "iidxhook-util/config-eamuse.h"
#include "iidxhook-util/config-gfx.h"
#include "iidxhook-util/config-io.h"
@@ -81,6 +79,8 @@ iidxhook5_cn_setup_d3d9_hooks(const struct iidxhook_config_gfx *config_gfx)
d3d9_config.scale_back_buffer_filter = config_gfx->scale_back_buffer_filter;
d3d9_config.forced_refresh_rate = config_gfx->forced_refresh_rate;
d3d9_config.device_adapter = config_gfx->device_adapter;
d3d9_config.iidx14_to_19_nvidia_fix = true;
d3d9_config.iidx18_and_19_diagonal_tearing_fix = config_gfx->diagonal_tearing_fix;
iidxhook_util_d3d9_configure(&d3d9_config);
@@ -106,7 +106,7 @@ static ATOM WINAPI my_RegisterClassA(const WNDCLASSA *lpWndClass)
iidxhook_init_check = true;
log_info("-------------------------------------------------------------");
log_info("--------------- Begin iidxhook RegisterClassA ---------------");
log_info("------------- Begin iidxhook my_RegisterClassA --------------");
log_info("-------------------------------------------------------------");
config = cconfig_init();
@@ -164,24 +164,9 @@ static ATOM WINAPI my_RegisterClassA(const WNDCLASSA *lpWndClass)
log_info("IIDX IO emulation backend disabled");
}
if (!config_io.disable_card_reader_emu) {
log_misc("Initializing card reader backend");
eam_io_set_loggers(
log_impl_misc, log_impl_info, log_impl_warning, log_impl_fatal);
if (!eam_io_init(
avs_thread_create, avs_thread_join, avs_thread_destroy)) {
log_fatal("Initializing card reader backend failed");
}
} else {
log_info("Card reader emulation backend disabled");
}
/* Set up IO emulation hooks _after_ IO API setup to allow
API implementations with real IO devices */
iohook_push_handler(ezusb2_emu_device_dispatch_irp);
iohook_push_handler(iidxhook_util_acio_dispatch_irp);
iohook_push_handler(settings_hook_dispatch_irp);
if (!config_io.disable_io_emu) {
@@ -190,7 +175,7 @@ static ATOM WINAPI my_RegisterClassA(const WNDCLASSA *lpWndClass)
}
log_info("-------------------------------------------------------------");
log_info("---------------- End iidxhook RegisterClassA ----------------");
log_info("-------------- End iidxhook my_RegisterClassA ---------------");
log_info("-------------------------------------------------------------");
return real_RegisterClassA(lpWndClass);

View File

@@ -9,6 +9,7 @@ deplibs_iidxhook5 := \
libs_iidxhook5 := \
iidxhook-util \
ezusb-emu \
ezusb-iidx-16seg-emu \
ezusb2-emu \
ezusb2-iidx-emu \
ezusb-iidx-emu \

View File

@@ -69,6 +69,8 @@ iidxhook5_setup_d3d9_hooks(const struct iidxhook_config_gfx *config_gfx)
d3d9_config.scale_back_buffer_filter = config_gfx->scale_back_buffer_filter;
d3d9_config.forced_refresh_rate = config_gfx->forced_refresh_rate;
d3d9_config.device_adapter = config_gfx->device_adapter;
d3d9_config.iidx14_to_19_nvidia_fix = true;
d3d9_config.iidx18_and_19_diagonal_tearing_fix = config_gfx->diagonal_tearing_fix;
iidxhook_util_d3d9_configure(&d3d9_config);

View File

@@ -9,6 +9,7 @@ deplibs_iidxhook6 := \
libs_iidxhook6 := \
iidxhook-util \
ezusb-emu \
ezusb-iidx-16seg-emu \
ezusb2-emu \
ezusb2-iidx-emu \
ezusb-iidx-emu \

View File

@@ -10,6 +10,7 @@ libs_iidxhook7 := \
iidxhook-util \
cconfig \
ezusb-emu \
ezusb-iidx-16seg-emu \
ezusb2-emu \
ezusb2-iidx-emu \
ezusb-iidx-emu \

View File

@@ -21,7 +21,7 @@ void iidxhook8_config_io_init(struct cconfig *config)
IIDXHOOK8_CONFIG_IO_DEFAULT_DISABLE_CARD_READER_EMU_VALUE,
"Disable card reader emulation and enable usage of real card "
"reader "
"hardware on COM0 (for games supporting slotted readers)");
"hardware on COM1 (for games supporting slotted readers)");
cconfig_util_set_bool(
config,

View File

@@ -28,7 +28,7 @@ void iidxhook9_config_io_init(struct cconfig *config)
IIDXHOOK9_CONFIG_IO_DISABLE_CARD_READER_EMU_KEY,
IIDXHOOK9_CONFIG_IO_DEFAULT_DISABLE_CARD_READER_EMU_VALUE,
"Disable card reader emulation and enable usage of real card reader "
"hardware on COM0 (for games supporting slotted readers)");
"hardware on COM1 (for games supporting slotted readers)");
cconfig_util_set_bool(
config,

View File

@@ -9,7 +9,7 @@ ldflags_popnhook1 := \
libs_popnhook1 := \
iidxhook-util \
ezusb-iidx-emu \
ezusb-emu \
ezusb2-popn-emu \
ezusb2-emu \
security \

View File

@@ -10,8 +10,7 @@
#include "cconfig/cconfig-hook.h"
#include "ezusb-iidx-emu/node-security-plug.h"
#include "ezusb-iidx-emu/nodes.h"
#include "ezusb-emu/node-security-plug.h"
#include "hook/d3d9.h"
#include "hook/table.h"