Commit Graph

5690 Commits

Author SHA1 Message Date
emoose f58fba9219 [CPU] Fix heap corruption by XEXP header patch not resizing headers correctly
This should hopefully fix GTA IV's TU (for media ID 6AC07221 at least)
2020-01-11 20:26:41 +11:00
emoose 3e74b85c20 [VFS/Kernel] Fixes to allow games to make use of cache partitions
Happy new year! Here's my first commit of the 2020s :)

With these fixes, Halo 3 Epsilon will now write cached map data & other things (autosaves/datamine...) to the cache0/cache1 partitions, (as long as mount_cache cvar is set)
(Halo 3 retail will also write some things to cache with this, but oddly doesn't cache map stuff... which is strange because Epsilon was built only a day or two after the retail build, so I'm not sure why it'd work differently...
Maybe retail needs a TU applied for it to work or something like that)
Other games should hopefully work with cache now too (AFAIK the problem was in SDK library code, that a lot of games probably share)
No idea if this will actually improve anything though, but at least things will work closer to what games expect :)

The way this works is by tricking the cache-partition code (staticly linked into the game exe) into thinking that the Partition0/Cache0/Cache1 devices are valid.
To do that I made another kind of VFS device, the NullDevice, which just takes in a list of paths to handle.
Whenever an IO request is made to one of these paths, the NullDevice can simply pretend to the game that everything was successful, which satisfies the requirements needed for caching.

It also makes use of another trick: setting TitleInsecureCacheDrive XEX permission, which seems to skip a huge chunk of cache-init code (STFC filesystem device registration & stuff like that)
I'm not sure if this would work with every single revision of the STFC/cache code though...
At least in Halo 3 the retail code will handle the TitleInsecureCacheDrive case for us fine, but maybe older/more recent versions don't include functionality for it, need to look into it some more.
(I did try an impl. without needing this permission months ago, got pretty far with it but got caught on one tiny issue that I couldn't figure out... too bad I didn't find out about this permission earlier!)
2020-01-02 12:15:06 +11:00
Cancerous f9f2b2f702 [Kernel] HDD and save detection changes 2019-12-28 23:22:47 -05:00
Cancerous d90cc3a7e9 [Kernel] added more checks to filter user_index out of range 2019-12-28 23:22:36 -05:00
Cancerous 600d750d95 [Kernel] - further adjustments to xam overlapped ui for storage selection and messages 2019-12-28 23:22:07 -05:00
Cancerous b49bbe30e4 [Kernel] - time fix for darksouls 2019-12-28 23:22:03 -05:00
Cancerous 6303a17010 [VFS] more logging for resolving files 2019-12-28 23:21:58 -05:00
Cancerous 7fefb79339 [Kernel] - swapdisc fixes for gtav 2019-12-28 23:21:54 -05:00
Cancerous 96a75cefe3 [Kernel] stubs for 9199 (eventually) 2019-12-28 23:21:46 -05:00
illusion98 a303baa897 Force 1080p output mode 2019-12-19 04:16:52 -05:00
illusion98 65eed6f061 Merge remote-tracking branch 'CookiePLMonster/xex-unload-image' into canary-old-update 2019-12-16 04:11:36 -05:00
Gliniak efde5068b0 [Achievements] XamUserCreateAchievementEnumerator - title_id 0 behaviour
Based on research 0 in title_id is interpreted as current game
2019-12-14 10:49:58 -05:00
Gliniak 7ed41824a5 [XAM] Removed code related to buffer clear
Some games have hardcoded buffer size which doesn't match real size
2019-12-14 10:49:46 -05:00
Cancerous f0cc9562ae further ajustment to buffer size to fix regression 2019-12-06 12:23:09 -05:00
Cancerous cb246e7501 title update fixup - breaks xex1 temporarily 2019-12-06 12:01:20 -05:00
Cancerous 5627e3abb5 [Kernel] More adjustment to XNotification spam filter 2019-12-06 09:55:26 -05:00
Cancerous 027f691770 [Kernel] - adjusting XAMEnumerate buffer size to fix Angry Birds and Resonance of Fate - thanks Gliniak 2019-12-06 09:55:02 -05:00
Gliniak 1fb027daa7 [Kernel/Sketchy] Implemented NtQueueApcThread
Signed-off-by: Gliniak <Gliniak93@gmail.com>
2019-12-05 02:44:27 -05:00
illusion98 e469101678 Merge remote-tracking branch 'upstream/master' into canary-old-update 2019-12-05 02:44:05 -05:00
Triang3l c43ccc073d [D3D12] Submit command lists on primary buffer end 2019-12-04 21:42:26 +03:00
Cancerous e1ec74dcbe [Kernel, UI]
threaded UI notifications from emoose Issue 1296
added fixups for hdd detection in more games (wheelman for example)
changed filter that stops notification spam
2019-12-02 09:56:11 -05:00
Margen67 6630031558 [CI] Skip master branch, also rename xenia.exe to xenia-canary.exe in AppVeyor+Azure 2019-12-02 09:55:46 -05:00
Margen67 099a07b248 [GitHub Actions] Releases, minor changes
Formatting fixes.
Add comment about SSE2 builds not working on non-AVX(2) CPUs.
Don't build tests.
 Prepare artifacts:
  Switch to PowerShell.
  Rename xenia.exe to xenia-canary.exe.
 Add Releases:
  This allows GitHub Actions to have a link to the latest artifacts like AppVeyor, except not slow as fuck.
  Currently AVX-only since users will get confused which one to download (this is also why vfs-dump isn't included in the zip), and I don't know how to use the upload_url from another job configuration.
  Releases won't be created for PRs.

You can download the latest Release from here: https://github.com/xenia-canary/xenia-canary/releases/latest/download/xenia-canary.zip
2019-12-02 09:55:34 -05:00
Margen67 a717775898 [GitHub Actions] Add exclusions 2019-12-02 09:54:38 -05:00
Margen67 e8196d3912 [README] stuff
Move status badges to top
Change Status into Download
Remove Contributors Wanted!
2019-12-02 09:54:28 -05:00
illusion98 8d25068fef [Kernel] Title Update fixup
Co-Authored-By: aerosoul94 <aerosoul94@hotmail.com>
2019-12-02 09:50:21 -05:00
illusion98 17481ebdd1 Revert "[Memory] Trigger watches when making pages writable, not the other way around"
A Workaround for UE3 games causing exploding vertices.
This reverts commit 8ba6f3fc37.
2019-12-02 09:49:49 -05:00
illusion98 470df23c31 [Kernel] use TV Gamma as default instead of CRT 2019-12-02 09:49:38 -05:00
Radosław Gliński f98770190e [THREADING] Removed old walkaround for zombie threads 2019-12-02 09:48:53 -05:00
illusion98 bdd5947e85 small fixup for fps counter
this code is a meme
2019-12-02 09:43:14 -05:00
illusion98 c4c9f104d8 Merge remote-tracking branch 'upstream/master' into canary-old-1 2019-12-02 09:40:45 -05:00
Margen67 a886ad3acc Fix GitHub Actions 2019-12-02 09:39:34 -05:00
Joel Linn 922f1f220a [CPU] Implement mftb instruction natively.
When the cvars clock_no_scaling and clock_source_raw are set, tick counts will be directly calculated in the emitted code.
2019-12-01 17:11:58 -06:00
Joel Linn 15d422d988 [Base] Optional raw Clock source.
New cvar clock_source_raw allows to use the cpu cycle counter itself as an alternative time source, if system timing resolution is to low and causes problems.
2019-12-01 17:11:58 -06:00
Joel Linn f88d46cead [Base] Optional Clock scaling bypass.
New cvar clock_no_scaling bypasses all time scaling code.
Clock state is non dynamic.
Timing is always derived from host.
2019-12-01 17:11:58 -06:00
Joel Linn 7e244e0488 [Base] Clock state now unaltered by threading.
- Removed tick and time values from ThreadSavedState.
- Removed affiliated get/set code from Save and Restore.
- Removed dangerous SetGuestTickCount method.
2019-12-01 17:11:58 -06:00
Joel Linn d6ce72ddc9 [Base] Clock reworked.
- Time progression is now equal and in sync on all threads.
- Floating point imprecisions do not interfere with timing.
2019-12-01 17:11:58 -06:00
Triang3l 6a3a56b3b9 [D3D12] Workaround for texture flickering on Nvidia - don't use sampler 2047 2019-12-01 21:39:48 +03:00
Silent c5db959154 [Kernel] Retain handles and not objects in XThread
This fixes cases introduced by 52e836d0f81e752ba368717e68773b591adfa9cf
where thread handles get closed before the thread finishes.
Handle was assumed to be alive there, which was not true as
threads self-referenced only their objects, not their handles.

Affected games: Payday 2 Demo
2019-11-30 20:08:30 -06:00
Silent 728531eff7 [Kernel] Operate on handle refcounts in Ob funcs
Although this seems counter-intuitive, operating on handle
reference counters in
- ObLookupThreadByThreadId
- ObReferenceObjectByHandle
- ObDereferenceObject
allows to cleanly clean up handles for resources created elsewhere
and destructed by ObDereferenceObject (for example, threads with 0x80
creation flag). Operating on pointer reference counters alone
would leave a stray handle in the slots list.
2019-11-30 20:08:30 -06:00
Silent 05ef022fd7 [Kernel] Do not retain handle in ExCreateThread
Closing the thread handle should delete the thread object
if it's finished. When this handle was retained, closing the handle
left a lingering handle reference and thus this XThread would leak
2019-11-30 20:08:30 -06:00
Silent 5bec69e983 [Kernel] Add some useful asserts 2019-11-30 20:08:30 -06:00
gibbed ae15c27a24 [x64] Take advantage of StashConstantXmm. 2019-11-30 20:08:10 -06:00
gibbed 04a54cc58f [x64] Fix constant src2 in VECTOR_ROTATE_LEFT_V128. 2019-11-30 20:08:10 -06:00
gibbed f7a8c5ce7a [x64] Fix corruption of src1 in calls to EmulateVectorRotateLeft.
To mitigate this mistake in the future, implemented new
StashConstantXmm functions.
2019-11-30 20:08:10 -06:00
gibbed 43cef29c6d [UI] Disable saving of imgui INI file.
By default imgui saves an INI file named 'imgui.ini' to the current directory,
which is undesired behavior. Until we can properly specify a full path to
a good location, disable saving of the INI file.
2019-11-30 18:54:15 -06:00
aerosoul bc8b629092 [Kernel] Enable XEX1 loading 2019-11-20 18:09:28 -06:00
Joel Linn 03d5455a2f [imgui] Fixes to work with new api.
- Font atlas is now owned by context.
- Switch from deprecated io.RenderDrawListsFn callback to dedicated call in window.cc.
- Replaced deprecated ImGuiCol_ModalWindowDarkening with ImGuiCol_ModalWindowDimBg.
- Replaced deprecated SetScrollHere() with SetScrollHereY().
- Replaced deprecated GetContentRegionAvailWidth() with GetContentRegionAvail().x.
- Replaced deprecated ShowTestWindow() with ShowDemoWindow().
- Replaced deprecated ImGuiCol_ChildWindowBg with ImGuiCol_ChildBg.
- Replaced deprecated SetNextTreeNodeOpen() with SetNextItemOpen().
2019-11-20 08:05:40 -06:00
Joel Linn 1985169924 [imgui] Make code compile with new imgui. 2019-11-20 08:05:40 -06:00
Joel Linn e4c9078cb5 [imgui] Update submodule. 2019-11-20 08:05:40 -06:00