Commit Graph

26 Commits

Author SHA1 Message Date
Gliniak 7d385c3844 [GIT] Ignore cache directory from git searching 2024-08-25 16:53:08 +02:00
Gliniak 2c6bbf9a4a [GIT] Added recent.toml to ignored files 2022-12-11 11:11:02 +01:00
chss95cs@gmail.com 90c771526d "Fix" debug console, we were checking the cvar before any cvars were loaded, and the condition it checks in AttachConsole is somehow always false
Remove dead #if 0'd code in math.h

On amd64, page_size == 4096 constant, on amd64 w/ win32, allocation_granularity == 65536. These values for x86 windows havent changed over the last 20 years so this is probably safe
and gives a modest code size reduction

Enable XE_USE_KUSER_SHARED. This sources host time from KUSER_SHARED instead of from QueryPerformanceCounter, which is far faster, but only has a granularity of 100 nanoseconds.

In some games seemingly random crashes were happening that were hard to trace because
the faulting thread was actually not the one that was misbehaving, another threads stack was underflowing into the faulting thread.

Added a bunch of code to synchronize the guest stack and host stack so that if a guest longjmps the host's stack will be adjusted.
Changes were also made to allow the guest to call into a piece of an existing x64 function.

This synchronization might have a slight performance impact on lower end cpus, to disable it set enable_host_guest_stack_synchronization to false.
It is possible it may have introduced regressions, but i dont know of any yet

So far, i know the synchronization change fixes the "hub crash" in super sonic and allows the game "london 2012" to go ingame.

Removed emit_useless_fpscr_updates, not emitting these updates breaks the raiden game

MapGuestAddressToMachineCode now returns nullptr if no address was found, instead of the start of the function

add Processor::LookupModule

Add Backend::DeinitializeBackendContext
Use WriteRegisterRangeFromRing_WithKnownBound<0, 0xFFFF> in WriteRegisterRangeFromRing for inlining (previously regressed on performance of ExecutePacketType0)

add notes about flags that trap in XamInputGetCapabilities

0 == 3 in XamInputGetCapabilities

Name arg 2 of XamInputSetState

PrefetchW in critical section kernel funcs if available & doing cmpxchg

Add terminated field to X_KTHREAD, set it on termination

Expanded the logic of NtResumeThread/NtSuspendThread to include checking the type of the handle (in release, LookupObject doesnt seem to do anything with the type)
and returning X_STATUS_OBJECT_TYPE_MISMATCH if invalid. Do termination check in NtSuspendThread.

Add basic host exception messagebox, need to flesh it out more (maybe use the new stack tracking stuff if on guest thrd?)

Add rdrand patching hack, mostly affects users with nvidia cards who have many threads on zen

Use page_size_shift in more places

Once again disable precompilation! Raiden is mostly weird ppc asm which probably breaks the precompilation. The code is still useful for running the compiler over the whole of an xex in debug to test for issues
"Fix" debug console, we were checking the cvar before any cvars were loaded, and the condition it checks in AttachConsole is somehow always false

Remove dead #if 0'd code in math.h

On amd64, page_size == 4096 constant, on amd64 w/ win32, allocation_granularity == 65536. These values for x86 windows havent changed over the last 20 years so this is probably safe
and gives a modest code size reduction

Enable XE_USE_KUSER_SHARED. This sources host time from KUSER_SHARED instead of from QueryPerformanceCounter, which is far faster, but only has a granularity of 100 nanoseconds.

In some games seemingly random crashes were happening that were hard to trace because
the faulting thread was actually not the one that was misbehaving, another threads stack was underflowing into the faulting thread.

Added a bunch of code to synchronize the guest stack and host stack so that if a guest longjmps the host's stack will be adjusted.
Changes were also made to allow the guest to call into a piece of an existing x64 function.

This synchronization might have a slight performance impact on lower end cpus, to disable it set enable_host_guest_stack_synchronization to false.
It is possible it may have introduced regressions, but i dont know of any yet

So far, i know the synchronization change fixes the "hub crash" in super sonic and allows the game "london 2012" to go ingame.

Removed emit_useless_fpscr_updates, not emitting these updates breaks the raiden game

MapGuestAddressToMachineCode now returns nullptr if no address was found, instead of the start of the function

add Processor::LookupModule

Add Backend::DeinitializeBackendContext
Use WriteRegisterRangeFromRing_WithKnownBound<0, 0xFFFF> in WriteRegisterRangeFromRing for inlining (previously regressed on performance of ExecutePacketType0)

add notes about flags that trap in XamInputGetCapabilities

0 == 3 in XamInputGetCapabilities

Name arg 2 of XamInputSetState

PrefetchW in critical section kernel funcs if available & doing cmpxchg

Add terminated field to X_KTHREAD, set it on termination

Expanded the logic of NtResumeThread/NtSuspendThread to include checking the type of the handle (in release, LookupObject doesnt seem to do anything with the type)
and returning X_STATUS_OBJECT_TYPE_MISMATCH if invalid. Do termination check in NtSuspendThread.

Add basic host exception messagebox, need to flesh it out more (maybe use the new stack tracking stuff if on guest thrd?)

Add rdrand patching hack, mostly affects users with nvidia cards who have many threads on zen

Use page_size_shift in more places

Once again disable precompilation! Raiden is mostly weird ppc asm which probably breaks the precompilation. The code is still useful for running the compiler over the whole of an xex in debug to test for issues
2022-11-27 09:39:33 -08:00
chss95cs@gmail.com b41e5060da Fix bindless path in d3d12 that i broke in earlier commit (did not affect any users, thats a debug thing)
Fix guest code profiler, it previously only worked with function precomp + all code you were about to execute already discovered
Allow AndNot if type is V128
2022-10-16 07:47:27 -07:00
gibbed 19f93304c7 Update .gitignore. 2018-05-22 22:24:39 -05:00
DrChat 3d80ed4853 Add microprofile presets to .gitignore 2018-03-01 10:22:53 -06:00
DrChat 063720d6e9 Add .vscode to gitignore 2017-12-20 14:11:36 -06:00
Ben Vanik 952d35911c Folding build_tools back into the main repo for simplicity. 2015-12-30 16:53:14 -08:00
Ben Vanik b7203c2989 Logging to with a ringbuffer. Much faster. 2015-08-29 18:06:30 -07:00
Ben Vanik cb701fcb7c Latest linter. 2015-08-01 04:08:59 -07:00
Ben Vanik e0eb85bbbc Switching to premake. Probably with disasterous consequences. 2015-07-18 16:00:01 -07:00
Ben Vanik 6b52f2682e Fixing elemental input and using embedded resources. 2015-07-07 22:16:46 -07:00
Riley Labrecque 23c91b2eff Remove test binaries now that they can be created on Windows 2015-05-24 01:23:14 -06:00
Ben Vanik acfb5b5722 fnabsx 2015-05-12 18:43:16 -07:00
Ben Vanik 7a00b76a6e Debugger stuff, and changing to vcproj's/sln. 2015-05-09 17:48:12 -07:00
Ben Vanik 4c8f3501ad Removing xdb and old tracing code before rewrite. 2015-05-03 22:01:31 -07:00
Ben Vanik 6b22d35bfc Skeleton debugger. Here we go again! 2015-05-03 10:25:16 -07:00
Ben Vanik 9b21dd8874 Adding imgui. 2015-02-21 11:16:24 -08:00
Ben Vanik dc731f6a31 Most of XamContent* methods, besides enumeration.
Progress on #152.
2015-02-12 14:16:43 -08:00
Ben Vanik 4d59e081b3 Switching from make to shell script for test building. 2014-09-09 22:25:37 -07:00
Ben Vanik 437ec45d66 Binutils with patch (brought forward a decade) for vmx128. 2014-09-09 20:15:49 -07:00
Ben Vanik 916dc397ab Part 1 of kernel simplification/cleanup: removing externs. 2014-08-15 22:59:28 -07:00
Ben Vanik c275562594 Mostly complete tracing. Probably a lot of bugs. 2014-08-15 22:02:08 -07:00
Ben Vanik f93ffdb36f Ignore .svn/. 2014-01-20 23:03:06 -08:00
Ben Vanik a9378eb7eb Debugger can now connect. AngularJS: I have no idea what I'm doing. 2013-12-21 11:53:49 -08:00
Ben Vanik 7e4a9220d7 Initial project skeleton.
This includes a working gyp-based build of an executable that uses LLVM.
2013-01-11 01:23:08 -08:00