1
0
mirror of https://github.com/djhackersdev/bemanitools.git synced 2025-01-18 23:14:02 +01:00

feat(iidx19): Add back btools monitor check for iidxhook5

Provide an option for non final lincle revisions and
if the "modern" monitor check is not delivering stable
results on the final lincle revision, e.g. using the
original "pendual lcd" monitor.
This commit is contained in:
icex2 2023-03-20 23:52:43 +01:00 committed by icex2
parent cb884c307c
commit b2e0d9f3d6
6 changed files with 30 additions and 8 deletions

View File

@ -7,6 +7,9 @@ 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

View File

@ -7,8 +7,8 @@
/* 9th to DD */
#define IIDXHOOK_UTIL_CHART_PATCH_TIMEBASE_9_TO_13 59.95
/* GOLD to Resort Anthem */
#define IIDXHOOK_UTIL_CHART_PATCH_TIMEBASE_14_TO_18_VGA 60.05
/* GOLD to Lincle */
#define IIDXHOOK_UTIL_CHART_PATCH_TIMEBASE_14_TO_19_VGA 60.05
/**
* Install hooks to intercept chart file loading. This allows you to patch

View File

@ -95,14 +95,14 @@ iidxhook3_setup_d3d9_hooks(const struct iidxhook_config_gfx *config_gfx)
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);
IIDXHOOK_UTIL_CHART_PATCH_TIMEBASE_14_TO_19_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_TIMEBASE_14_TO_19_VGA);
iidxhook_util_chart_patch_set_refresh_rate(config_gfx->monitor_check);
}

View File

@ -90,14 +90,14 @@ iidxhook4_cn_setup_d3d9_hooks(const struct iidxhook_config_gfx *config_gfx)
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);
IIDXHOOK_UTIL_CHART_PATCH_TIMEBASE_14_TO_19_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_TIMEBASE_14_TO_19_VGA);
iidxhook_util_chart_patch_set_refresh_rate(config_gfx->monitor_check);
}

View File

@ -80,14 +80,14 @@ iidxhook4_setup_d3d9_hooks(const struct iidxhook_config_gfx *config_gfx)
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);
IIDXHOOK_UTIL_CHART_PATCH_TIMEBASE_14_TO_19_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_TIMEBASE_14_TO_19_VGA);
iidxhook_util_chart_patch_set_refresh_rate(config_gfx->monitor_check);
}

View File

@ -26,6 +26,7 @@
#include "hooklib/setupapi.h"
#include "iidxhook-util/acio.h"
#include "iidxhook-util/chart-patch.h"
#include "iidxhook-util/config-gfx.h"
#include "iidxhook-util/config-io.h"
#include "iidxhook-util/config-misc.h"
@ -73,6 +74,23 @@ iidxhook5_setup_d3d9_hooks(const struct iidxhook_config_gfx *config_gfx)
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_19_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_19_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));
@ -150,6 +168,7 @@ static bool my_dll_entry_init(char *sidcode, struct property_node *param)
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(iidxhook_util_chart_patch_dispatch_irp);
iohook_push_handler(settings_hook_dispatch_irp);
if (!config_io.disable_io_emu) {