Billy Laws
6aa95d82f2
Windows: Query FileStandardInformation for getting file EOF info
...
FileEOFInformation is write-only on actual windows.
2024-08-22 14:34:45 +00:00
Billy Laws
7c34f449d1
Windows: Translate file open flags passed to NtCreateFile
2024-08-22 14:34:45 +00:00
Billy Laws
e9435203a0
Windows: Fix access() implementation
...
Had the result inverted.
2024-08-22 14:33:06 +00:00
Ryan Houdek
eadb502059
Merge pull request #3978 from bylaws/create
...
Windows: Implement CreateDirectoryW CRT function
2024-08-20 11:39:57 -07:00
Ryan Houdek
8e1695afa3
Merge pull request #3977 from bylaws/wowex
...
WOW64: Improve exception handling
2024-08-20 11:39:22 -07:00
Ryan Houdek
1caa31c5cb
Merge pull request #3962 from Sonicadvance1/remove_vixl_requirement
...
HostFeatures: Removes vixl usage
2024-08-19 14:31:13 -07:00
Billy Laws
9067f3513a
Windows: Implement CreateDirectoryW CRT function
...
Used when the .fex-emu config dir doesn't exist. Also fixes up
CreateFile to not leak memory.
2024-08-19 19:11:17 +00:00
Billy Laws
4d26178f25
Windows: Commonise guest exception handling logic and use for WOW64
2024-08-19 19:07:29 +00:00
Ryan Houdek
33cef7c8cd
CRT: New symbols that fmt uses
2024-08-18 13:21:17 -07:00
Ryan Houdek
40d12c4d0e
HostFeatures: Removes vixl usage
...
If we query the CPU flags ourselves then vixl is no longer a
compile-time or runtime dependency unless the vixl disassembler or
simulator is built.
A bit spicy from all the feature bits we need to load up.
2024-08-16 08:36:52 -07:00
Ryan Houdek
ef4c4f6e9b
FEXCore: Disable vixl linking if vixl disasm or simulator is disabled
...
This was mostly there, just needed to remove some extraneous headers and
only insert vixl in to the library list if the options were enabled.
2024-08-16 07:29:41 -07:00
Billy Laws
16b007df33
Windows: Partially implement the registry read API
2024-08-13 13:31:32 +00:00
Billy Laws
3cbc421c7e
Windows: Detect CPU features using the registry
...
Native Windows does not support ID instruction emulation, instead it
populates registry keys containing their values.
2024-08-13 13:31:32 +00:00
Ryan Houdek
4a3250ddea
Merge pull request #3928 from bylaws/winval
...
InvalidationTracker: Better match Windows code invalidation behaviour
2024-08-09 20:29:57 -07:00
Billy Laws
93ab57454a
InvalidationTracker: Better match Windows code invalidation behaviour
...
When given a NULL base address, Windows invalidation callbacks will
ignore the given size and invalidate all code.
2024-08-08 12:46:49 +00:00
Billy Laws
8f372821f8
Windows: Use the FEX CRT
2024-08-07 15:49:41 +00:00
Billy Laws
6376d06bed
Windows: Introduce a minimal Windows API replacement
2024-08-07 15:49:41 +00:00
Billy Laws
1bb293d4be
Windows: Pull in some math and formatting functions from Musl
2024-08-07 15:49:41 +00:00
Billy Laws
0e069f1e97
Windows: Introduce a minimal CRT replacement
...
It is dangerous for FEX to rely on the system CRT as calls can have side
effects that are also visible to the running application, and if patches
are applied to any CRT exports used during compilation the call checker
would trigger a reentry into the JIT to compile the patch and hence
deadlock. Only functions that FEX actively uses are implemented, with
the rest triggering an abort.
2024-08-07 15:49:41 +00:00
Billy Laws
fa72be2ec5
Windows: Don't warn for unknown CPU features
...
This happens regularly as wine/games will scan all features from 0 to 64.
2024-08-01 12:06:05 +00:00
Billy Laws
b7ff6dd9c6
Windows: Disable logging if SilentLog is enabled
2024-08-01 12:04:59 +00:00
Billy Laws
80c9a43eef
Windows: Fallback to a log file for debug output on Windows
...
OutputDebugString etc are exception based and thus don't really work for
FEX's needs as often times logs can happen in places where exceptions
cannot be thrown.
2024-08-01 11:45:07 +00:00
Billy Laws
05155778d4
Windows: Commonise logging code
2024-08-01 11:45:07 +00:00
Ryan Houdek
2fdd80fe3a
Merge pull request #3833 from bylaws/common-tso
...
Windows: Commonise TSOHandlerConfig
2024-07-06 17:38:45 -07:00
Billy Laws
7fa7061aa5
Windows: Report as an AMD64 processor when targeting ARM64EC
2024-07-06 20:37:15 +00:00
Billy Laws
b21e77c1e0
Windows: Commonise TSOHandlerConfig
2024-07-06 19:20:49 +00:00
Billy Laws
a7f4e99278
InvalidationTracker: Always invalidate all regions of a section on unmap
...
Unmapping a section will unmap the whole size initially allocated,
irrespective of how their protections are changed afterwards. Make sure
to follow this logic for invalidation too.
2024-04-18 15:16:28 +00:00
Billy Laws
a6d061b711
InvalidationTracker: Invalidate code across all threads
...
When thread management was moved to the frontend, invalidation moved
from being a global operation to per-thread but the WOW64 backend wasn't
updated to account for this. Now for any invalidation event loop over
all threads tracked by the frontend and invalidate the appropriate
range.
2024-04-18 15:14:31 +00:00
Paulo Matos
2b4ec88dae
Whole-tree reformat
...
This follows discussions from #3413 .
Followup commits add clang-format file, script and blame ignore lists.
2024-04-12 16:26:02 +02:00
Ryan Houdek
d11a36eaea
Moves FHU TypeDefines to FEXCore includes
...
FEXCore includes was including an FHU header which would result in
compilation failure for external projects trying to link to libFEXCore.
Moves it over to fix this, it was the only FHU usage in FEXCore/include
NFC
2024-03-29 02:54:54 -07:00
Billy Laws
9f311cd97e
CommonWindows: Split out code invalidation logic from WOW64
...
This will also be used by FEX ARM64EC module.
2024-01-12 00:12:26 +00:00
Billy Laws
1115ce4a95
CommonWindows: Introduce, and split out CPU feature logic from WOW64
...
This can also be used by the FEX ARM64EC module.
2024-01-12 00:12:26 +00:00