ewf: implement EWF virtualization (#84)

(Yeah, I know the OS may cache disk reads, but that wasn't the concern)

The ALLS series of cabs runs EWF to prevent anything from being written to C:\.

This PR adds another layer to iohook to redirect specific open/read/write/close operations to a virtual file table to prevent disk activity, and thus simulate the presence of EWF. This was mainly aimed at ALPB's billing files. Seriously, look at this - especially the timestamps, Sega wtf are you doing.

This does not affect other path hooks. It's turned off by default and will throw an error if the current executable resides on C:\.

Tested with FGO and APMv3.

![22bf755754[1].png](/attachments/31771aee-2e4d-4e4f-85e3-c5eec63c6f78)

Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/84
Co-authored-by: kyoubate-haruka <46010460+kyoubate-haruka@users.noreply.github.com>
Co-committed-by: kyoubate-haruka <46010460+kyoubate-haruka@users.noreply.github.com>
This commit is contained in:
kyoubate-haruka
2025-12-25 00:04:30 +01:00
committed by Dniel97
parent bad219be4c
commit d5bde32df7
11 changed files with 657 additions and 0 deletions
+3
View File
@@ -85,6 +85,9 @@ endif
if get_option('log_all') or get_option('log_vfs')
add_project_arguments('-DLOG_VFS', language: 'c')
endif
if get_option('log_all') or get_option('log_ewf')
add_project_arguments('-DLOG_EWF', language : 'c')
endif
shlwapi_lib = cc.find_library('shlwapi')
dinput8_lib = cc.find_library('dinput8')