hooklib: Allow proper passthrough of serial calls to real hardware (#26)
Only enabled / tested on IIDX CB and SDVX5 The point of this, is to allow rs232 hooks for only the descriptors that we hook. This is because the emulation here is incomplete. Although the IOCTL's do end up being passed to the real hardware, the game rejects some of the responses and hangs. By short circuiting out, and calling the real Comm functions instead, it works. And hence, card-reader passthrough works on IIDX25+/SDVX5+ finally without eamio-real
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include "acioemu/emu.h"
|
||||
|
||||
#include "hook/iohook.h"
|
||||
#include "hooklib/rs232.h"
|
||||
|
||||
#include "iidxhook8/bi2a.h"
|
||||
|
||||
@@ -31,6 +32,8 @@ void bio2_port_init(bool disable_poll_limiter)
|
||||
// they use the same framing
|
||||
ac_io_emu_init(&bio2_emu, L"COM4");
|
||||
bio2_emu_bi2a_init(&bio2_emu, disable_poll_limiter);
|
||||
|
||||
rs232_hook_add_fd(bio2_emu.fd);
|
||||
}
|
||||
|
||||
void bio2_port_fini(void)
|
||||
|
||||
@@ -126,6 +126,7 @@ static bool my_dll_entry_init(char *sidcode, struct property_node *param)
|
||||
API implementations with real IO devices */
|
||||
iohook_init(iidxhook_handlers, lengthof(iidxhook_handlers));
|
||||
rs232_hook_init();
|
||||
rs232_hook_limit_hooks();
|
||||
|
||||
if (!iidxhook8_config_io.disable_bio2_emu) {
|
||||
bio2_port_init(iidxhook8_config_io.disable_poll_limiter);
|
||||
|
||||
Reference in New Issue
Block a user