Commit Graph

3339 Commits

Author SHA1 Message Date
Jan Gocník cfa3c3d5ac Fix in SetState polling loop
Once the pFeedback->Header.hEvent event is set, the game is free to free
the buffer that it was pointing to. In HP1 game, the pointer
even lead to the stack. Because that stack was changing a lot,
pFeedback->Header.dwStatus eventually resolved to a non-zero
value and we started to overwrite some random memory.
2018-05-20 21:35:40 +02:00
blueshogun96 12986a78f2 User APC threads require special permissions to work 2018-05-20 11:04:17 -07:00
RadWolfie 46c079cf5e
Merge pull request #1192 from RadWolfie/master
Force unpatch XActEng
2018-05-19 11:21:47 -05:00
RadWolfie 9724361717 Force unpatch XActEng
Since we are not emulating XActEng directly. We can unpatch all of it base on old HLEDatabase document.

P.S. XActEng is a wrapper of DSound.
2018-05-19 11:17:44 -05:00
RadWolfie e1e2bbc676 Reword to match enum selections 2018-05-19 00:20:31 -05:00
RadWolfie 093c9e20d2 Show correct icon to popup message dialog 2018-05-19 00:08:59 -05:00
Jan Gocník 9771f989d0 Fix some CriticalSection bugs
The main issue was that the corresponding Event to the CriticalSection
wasn't created when the CriticalSection was and the return value of
KeWaitForSingleObject wasn't checked, so the STATUS_INVALID_HANDLE
was quitely ignored.

This actually gets Harry Potter and the Sorcerer's Stone to intro.
2018-05-18 23:50:39 +02:00
Luke Usher 7eafccbf68 Prevent pgraph_update_surface when OpenGL is not enabled 2018-05-18 16:04:17 +01:00
Luke Usher 5d29536932 Fix a crash in Crash Bandicoot when using a non-rendertarget Cube Texture 2018-05-18 14:20:26 +01:00
Luke Usher 9c27e04a37 Fix local Debug build. Hopefully AppVeyor fixed too 2018-05-18 13:28:52 +01:00
Luke Usher b3cdf0dbfd Use one global EEPROM Reset function when required 2018-05-18 13:25:42 +01:00
Luke Usher 377f388279 Fix Cube Mapping! 2018-05-18 12:10:23 +01:00
Luke Usher da61ebab94 Add some notes to D3DDevice_Swap 2018-05-18 08:59:27 +01:00
Luke Usher bacbba2fd1 Initialize default Serial No. to Cxbx-R 2018-05-17 14:25:58 +01:00
Luke Usher b80de27d12 Prevent exceptions on invalid NtDll handle 2018-05-17 14:25:46 +01:00
Luke Usher 7e9c70cdec SetRenderTarget should update the g_bHasDepthStencil flag 2018-05-17 10:47:16 +01:00
Luke Usher 8f638512af Fix a crash when GetHostResource failes within D3DDevice_GetBackBuffer 2018-05-17 08:44:02 +01:00
RadWolfie a9d09457dd Remove leftover file (Currently in XbSymbolDatabase project) 2018-05-16 18:27:01 -05:00
RadWolfie 913087c21f Fix warning messages
* \src\cxbxkrnl\emursa.cpp(1032): warning C4018: '<': signed/unsigned mismatch
* \src\cxbxkrnl\emursa.cpp(1034): warning C4018: '<=': signed/unsigned mismatch
* \src\cxbxkrnl\emuxapi.cpp(256): warning C4018: '<': signed/unsigned mismatch
* \src\cxbxkrnl\emufile.cpp(331): warning C4267: '=': conversion from 'size_t' to 'xboxkrnl::USHORT', possible loss of data
* \src\cxbxkrnl\emuxinput.cpp(63): warning C4789: buffer 'g_Controller' of size 16 bytes will be overrun; 24 bytes will be written starting at offset 0
* \src\cxbxkrnl\emud3d8\convert.cpp(769): warning C4244: '=': conversion from 'uint32' to 'uint8', possible loss of data
* \src\cxbxkrnl\emud3d8\convert.cpp(770): warning C4244: '=': conversion from 'uint32' to 'uint8', possible loss of data
* \src\cxbxkrnl\emud3d8\convert.cpp(771): warning C4244: '=': conversion from 'uint32' to 'uint8', possible loss of data
* \src\cxbxkrnl\gloffscreen\gloffscreen_common.cpp(64): warning C4018: '<': signed/unsigned mismatch
* \src\devices\video\emunv2a_pfifo.cpp(81): warning C4805: '|': unsafe mix of type 'xbaddr' and type 'bool' in operation
* \src\devices\video\emunv2a_pgraph.cpp(3103): warning C4838: conversion from 'int' to 'unsigned int' requires a narrowing conversion
* \src\devices\video\nv2a_vsh.cpp(704): warning C4018: '<': signed/unsigned mismatch
* \src\devices\video\nv2a_shaders.cpp(231): warning C4018: '<': signed/unsigned mismatch
* \src\devices\video\emunv2a_pgraph.cpp(2938): warning C4018: '<': signed/unsigned mismatch
* \src\devices\video\emunv2a_pgraph.cpp(3749): warning C4018: '<': signed/unsigned mismatch
* \src\devices\video\emunv2a_pgraph.cpp(2972): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
* \src\devices\video\emunv2a_pgraph.cpp(2973): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
2018-05-16 18:22:19 -05:00
PatrickvL 73e08f2ba2
Merge pull request #1179 from RadWolfie/master
Editorconfig second revision
2018-05-16 20:17:15 +02:00
RadWolfie ccff183600 Editorconfig second revision
* Apply only for src and resource directories.

With this setup, it should work as intended only for Cxbx-Reloaded's source code without affecting third-party projects.
2018-05-16 10:20:48 -05:00
Luke Usher 626da4df66 Use D3DUSAGE_RENDERTARGET within D3DDevice_GetBackBuffer 2018-05-16 08:21:28 +01:00
Luke Usher 8ba14178ec Fix Destination Rect 2018-05-16 08:19:33 +01:00
Luke Usher 4e166b697f Update GetBackBuffer to use the xbox backbuffer surface 2018-05-15 23:06:50 +01:00
Luke Usher 07f7c04145 Fix upscaled rendering (dashboard, others) 2018-05-15 22:53:16 +01:00
Luke Usher cf505dcfe8 Previous approach still had issues... for now lets ignore multisampling and fix it later. This PR is specifically for RenderTarget afterall. 2018-05-15 22:44:54 +01:00
Luke Usher 91803d0ec3 Fix titles using multisampling without breaking direct backbuffer access 2018-05-15 21:54:10 +01:00
PatrickvL b44ee57c56 D3D : Limit viewport scaling for field-rendering to backbuffer only.
Restore filtering mode when copying Xbox to host backbuffer.
Fixed Direct3D 9 SetRenderTarget.
Described some test-cases.
2018-05-15 09:29:47 +02:00
PatrickvL 69574b9b8e D3D : Try to dither the backbuffer copy
Also a few D3D9 porting changes.
2018-05-14 18:25:06 +02:00
PatrickvL cb798bb901 D3D : Less logging on Swap problems 2018-05-14 16:23:48 +02:00
PatrickvL 19053ae6b0 D3D : Attempt to render movies on multi-sample back buffers (and some curious notes on that) 2018-05-14 16:13:12 +02:00
PatrickvL 9935518b10 D3D : Fix double-width backbuffer issue, by using D3DMULTISAMPLE_2_SAMPLES too in our host CreateDevice call 2018-05-14 16:13:10 +02:00
PatrickvL c85f47fcc0 VS2015 compile fix, fixes issue #1170 2018-05-14 16:13:09 +02:00
PatrickvL cc52c5ece8 D3D : In D3DDevice_SetRenderTarget, pass applicable D3DUsage (D3DUSAGE_RENDERTARGET or D3DUSAGE_DEPTHSTENCIL) as argument to GetHostSurface (and thus also needs to be passed to GetHostResource, EmuVerifyResourceIsRegistered, GetHostBaseTexture and CreateHostResource). This fixes the shadow surface in Dolphin XDK sample (and probably many other situations) 2018-05-14 16:13:09 +02:00
PatrickvL 37e77f72f4 Oops 2018-05-14 16:13:08 +02:00
PatrickvL a3ccb931d2 D3D : Cleanup overlay code, acknowledging color-space conversion render state 2018-05-14 16:13:07 +02:00
PatrickvL 4ab28196b2 D3D : EmuPC2XB_D3DFormat can now return linear (by default) or swizzled formats 2018-05-14 16:13:06 +02:00
PatrickvL 39ff82ea85 Blit overlay to host backbuffer during swap too (#7) 2018-05-14 16:13:06 +02:00
Luke Usher 156a22d2a2 SetRenderTarget no longer fails!
This is the first commit working towards fixing RenderTargets and seperating the host/xbox backbuffers.
NOTE: This is largely incomplete, this is just the first step.

Currently known issues:
  - YUV Overlays/FMV in some titles are currently very broken and rather slow
  - Probably a lot more: please report issues/regressions
2018-05-14 16:13:05 +02:00
RadWolfie c1c34e50b2 Plus D3DDevice symbol check if exist too. 2018-05-14 01:45:31 -05:00
RadWolfie ff4b0a1022 Pre-fixup before start to use re-intialize DSound. 2018-05-14 01:31:59 -05:00
RadWolfie 4169bd86e3 Fixup D3D States code and device. 2018-05-14 01:31:02 -05:00
RadWolfie 7271a454f9 Temp disable debug message from DSound's volume 2018-05-12 21:25:22 -05:00
RadWolfie c77a95ae31 Don't perform find, check if value is 0 by default 2018-05-12 20:42:20 -05:00
RadWolfie f1689f11f2 Remove old code 2018-05-12 20:41:12 -05:00
RadWolfie f3f4f1e44b Workaround fix for time being with LLE enabled 2018-05-12 20:13:38 -05:00
PatrickvL 3ec6263e2f
Merge pull request #1162 from x1nixmzeng/rtl-locale-fixes
Fixed RtlUpperChar/RtlLowerChar
2018-05-12 22:20:14 +02:00
x1nixmzeng 462c9ec7d8 Fixed RtlUpperString case conversion 2018-05-12 19:44:08 +01:00
x1nixmzeng 4327cbf468 Fixed case conversion methods for Xbox locale 2018-05-12 19:42:28 +01:00
jackchentwkh ef2f3e61fb Fix RalliSport crash with multiple times of racing.
The problem is that a newly passed in XBOX resource has indentical key as an xbox resource in our g_HostResource map, but the xbox resources are at different location, with the same Data address and other settings.
2018-05-13 02:19:07 +08:00
RadWolfie 58571f4bde Remove XREF_ADDR_DERIVE
Nothing need to be change inside XbSymbolDatabase moudle.
2018-05-12 07:24:10 -05:00
RadWolfie a2cf964f86 Final fix for Cxbx-R compile issue 2018-05-12 07:24:10 -05:00
RadWolfie 53b2def540 Should be final fix
However, XbSymbolDatabase's pull request is missing OOVPA signature.
2018-05-12 07:24:10 -05:00
RadWolfie 82aaf60817 Remove unused files since had been moved and cause bad build 2018-05-12 07:24:10 -05:00
RadWolfie b87893f3fe Fix old tabs mess 2018-05-12 07:24:10 -05:00
RadWolfie cc05e9ad3a Replace tabs to spaces
Update coding style for HLEIntercept files.
2018-05-12 07:24:10 -05:00
RadWolfie 366afcc778 Add support for output message 2018-05-12 07:24:10 -05:00
RadWolfie 6b07012459 Hopefully this is a final fixup
Tested with 10+ titles. Only noticable change is CreateMutexA changed to CreateMutex in HLECache file.
2018-05-12 07:24:10 -05:00
RadWolfie e579f87b2c Upgrade XbSymbolDatabase with minor update
* disable debug build trace since it does not compile and need to be move into XbSymbolDatabase
* Use > 0 for boolean check.
2018-05-12 07:24:10 -05:00
RadWolfie 6800055b29 Using XbSymbolScan is accurate with XbSymbolDatabase
However, there appear to be one function not being detected at the moment with Burnout title.
2018-05-12 07:24:10 -05:00
RadWolfie caa323e613 Remove local test breakpoint 2018-05-12 07:24:10 -05:00
RadWolfie 1419fc14e0 Update to sync with XbSymbolDatabase
Currently not optimized, and planning on COMPLETE move scan optimized with our own header structure to be used with.
2018-05-12 07:24:10 -05:00
RadWolfie ed263d7dbc Start using XbSymbolDatabase library
It does not fully transfer everything yet and D3D8 depending on OOVPA signature directly are currently disabled for time being.
2018-05-12 07:24:10 -05:00
RadWolfie 4344f5db58 Remove HLEDatabase files
Moving into new project.
2018-05-12 07:24:10 -05:00
patrickvl 04122aafef D3D : Added some notes to handling parent-textures for surface-conversion 2018-05-12 02:20:30 +02:00
patrickvl d2db9557b4 D3D : Fix Burnout so it gets in-game again, by checking parent texture type first, before getting it's surface 2018-05-12 02:03:51 +02:00
patrickvl 672b1d2824 D3D : Call GetVerticesInBuffer once instead of per stream. Also let GetVerticesInBuffer loop over entire index buffer (as the highest index could ly before the starting vertex offset) 2018-05-12 01:38:33 +02:00
patrickvl e8e6fc56fb D3D : Don't crash hard when SetStreamSource fails (this gets Galleon in-game again) 2018-05-12 01:15:23 +02:00
patrickvl 70af9c5684 D3D : Added comments about a few more reported test-cases 2018-05-12 00:19:54 +02:00
patrickvl bac6fc3b2b D3D : Added notes on dynamic textures (which cause unreachable, black mipmap levels) 2018-05-11 22:27:47 +02:00
jackchentwkh 54e12cafae Fix fading black regression. 2018-05-12 00:25:20 +08:00
patrickvl a44971470b D3D : Fixed JSRF glitches - no more regressions in this branch!!! 2018-05-11 09:48:03 +02:00
patrickvl 9e1a1394cc D3D : Refactored the determination of how many vertices are in a vertex buffer 2018-05-11 09:15:56 +02:00
patrickvl ad0d817463 rebase fix 2018-05-11 00:53:55 +02:00
patrickvl a85def1d02 D3D : Disabled experiments, trying to get SetRenderTarget working at all times 2018-05-11 00:49:56 +02:00
patrickvl 78997168c4 D3D : Tiny bits of porting to Direct3D 9 2018-05-11 00:49:55 +02:00
patrickvl 125fce4481 D3D : Added (also experimental) support for parent-volume textures behind volumes 2018-05-11 00:49:54 +02:00
patrickvl c0567b1920 D3D : Added (experimental) support for parent-textures behind surfaces 2018-05-11 00:49:52 +02:00
patrickvl 3905de4a11 D3D : Experiment with D3DUsage flags 2018-05-11 00:49:51 +02:00
patrickvl 91ed03eba8 D3D : Refactored initialization of supported-format arrays 2018-05-11 00:49:49 +02:00
patrickvl d77fe1c1a4 D3D : Popup D3DDevice_DrawVertices test-cases for Quad-rendering with a StartVertex above 0 2018-05-11 00:49:48 +02:00
patrickvl b4daa37cab D3D : Take StartIndex into account when calling WalkIndexBuffer 2018-05-11 00:49:47 +02:00
patrickvl 143b02aa1d D3D : Instead of calling WalkIndexBuffer on pQuadToTriangleIndexBuffer, we can derive the LowIndex and HighIndexes ourselves 2018-05-11 00:49:30 +02:00
jackchentwkh 1d3e93963f not sleep enough!! :Q 2018-05-11 00:49:17 +02:00
jackchentwkh 1704ae8fd1 oops, something wrogn during rebase.
here is the code.
2018-05-11 00:49:15 +02:00
jackchentwkh 2aacd23d62 Fix missing diagonal half screen. 2018-05-11 00:49:14 +02:00
patrickvl 78124fca5e D3D : Small refactorings 2018-05-11 00:49:12 +02:00
patrickvl b3a10ba949 D3D : Apply WalkIndexBuffer everywhere possible 2018-05-11 00:49:11 +02:00
patrickvl b35ec48a27 D3D : Renamed to g_CachedIndexBase to g_XboxBaseVertexIndex 2018-05-11 00:49:09 +02:00
jackchentwkh 6ccf591cd2 Use WalkIndexBuffer() 2018-05-11 00:49:06 +02:00
jackchentwkh dd99b48511 Add index buffer walk through to setup min. index and index vertex span correctly. 2018-05-11 00:49:05 +02:00
PatrickvL ddaf4b293e Merge pull request #22 from jackchentwkh/DrawingPrimitives Romove wrong pIndexData assignment 2018-05-11 00:48:47 +02:00
jackchentwkh 724239f721 Romove wrong pIndexData assignment
pIndexData was assigned in line#432 with correct value.
2018-05-11 00:48:46 +02:00
Luke Usher cd751877e4 Fix vertex buffer size calculation: pIndexData wasn't set in DrawContext 2018-05-11 00:48:42 +02:00
patrickvl 1415ce2a1a Post-rebase fixes 2018-05-11 00:48:41 +02:00
PatrickvL 57f49dd378 D3D : Incomplete (!) attempt at fixing cube texture conversion (this needs adjusting). XDK test cases : CubeMap, Fur, FuzzyTeapot, Strip
Also some much needed code cleanup (indenting, comments, grouping variables, etc).
2018-05-11 00:48:40 +02:00
PatrickvL 5e8a34cb22 D3D : Determine texture dimensions via already existing tooling functions. This fixes the bump texture in BumpEarth XDK sample.
Also split up texture-format support array into 6 versions : texture vs surface, and normal vs render-target vs depth-stencil.
2018-05-11 00:48:38 +02:00
patrickvl 86c3455f81 D3D : Populate (to-patch) stream info directly, instead of via a memcpy 2018-05-11 00:48:37 +02:00
patrickvl 2f6e79e71b D3D : Renamed DynamicPatch to Info, making the vertex-conversion code a bit better to understand. Also merged CxbxVertexStreamPatch into CxbxVertexShaderInfo and CxbxVertexShaderElementPatch into CxbxVertexShaderStreamInfo, recuding the number of confusing types. 2018-05-11 00:48:35 +02:00
PatrickvL 72d9d63450 Cleaning up and renaming lots of vertex conversion code, towards finding the reason vertex-streams aren't converted correctly (see Dolphin sample) 2018-05-11 00:48:34 +02:00
patrickvl c6d0cca1a7 D3D : Introduced and used MapXboxVertexShaderHandleToCxbxVertexShader 2018-05-11 00:48:32 +02:00
patrickvl a47170b1f1 D3D : Disabled bNeedRHWReset partially. Added dimensionality to texture-normalization 2018-05-11 00:48:31 +02:00
patrickvl 44399f9ab9 D3D : DrawIndexedVertices must pass on the active IndexBase, so GetVertexBufferSize takes it into account 2018-05-11 00:48:29 +02:00
patrickvl 0e1887e5a7 D3D : Added a few test-cases (removed popups for them) 2018-05-11 00:48:28 +02:00
PatrickvL 33b0564b9e D3D : Removed dead code 2018-05-11 00:48:27 +02:00
PatrickvL 47957f0b79 D3D : Silence two LOG_TEST_CASE's (because comments already show a few cases) 2018-05-11 00:48:25 +02:00
PatrickvL a3c250445e D3D : Fixed memory leak, and a mistake in the previous commit (assigning uiHostVertexStride too soon) 2018-05-11 00:48:24 +02:00
PatrickvL a3a240a5b5 D3D : More cleanup 2018-05-11 00:48:23 +02:00
PatrickvL 73ccf18285 D3D : Some more renaming and code cleanup 2018-05-11 00:48:21 +02:00
PatrickvL 47d00b4d7a D3D : Addressed Luke's review comments (somewhat) 2018-05-11 00:48:20 +02:00
PatrickvL a93cdfa15e D3D : New primitive drawing code starts working! 2018-05-11 00:48:18 +02:00
patrickvl 8c0a784785 Rebase fixes 2018-05-11 00:48:17 +02:00
patrickvl a9e28964f1 D3D : Many more renames from WIP_LessVertexPatching branch, and now also most of it's vertex buffer conversion (not everything, yet) 2018-05-11 00:48:15 +02:00
PatrickvL a13ee28307 D3D : Renames, taken from WIP_LessVertexPatching (no functional change yet) 2018-05-11 00:48:14 +02:00
PatrickvL aa6896ddce D3D : Fix after rebase 2018-05-11 00:48:12 +02:00
PatrickvL 7ee1b3197f D3D : In EmuFlushIVB, call CxbxDrawPrimitiveUP instead of g_pD3DDevice8->DrawPrimitiveUP.
Also renamed VertexPatchDesc into CxbxDrawContext and VertexPatcher into CxbxVertexBufferConverter.
2018-05-11 00:48:11 +02:00
PatrickvL 738f584e63 D3D : Less primitive patching (not finished yet) 2018-05-11 00:48:09 +02:00
PatrickvL 2e88968bc1 D3D : Copied over CxbxDraw* functions from my WIP_LessVertexPatching branch.
Note : This causes corruption, we're probably missing something
2018-05-11 00:48:08 +02:00
patrickvl fb31f6e952 D3D : Disable popup on D3DDevice_GetViewportOffsetAndScale (we've got plenty of test-cases now) 2018-05-11 00:44:48 +02:00
patrickvl 584985bb3a D3D : DrawIndexedVerticesUP fallbacks for two unsupported primitive types 2018-05-09 23:39:53 +02:00
PatrickvL 4c656faad4
Merge pull request #1146 from jackchentwkh/master
Fix RalliSpor crash by skip QUADLIST rendering with index buffer.
2018-05-09 22:20:47 +02:00
jackchentwkh b521a11bb1 Skip unsupported Primitive Type rendering.
add more info with EmuWarning for the ease of future debugging.
2018-05-10 03:16:18 +08:00
PatrickvL 4be153164f
Merge pull request #1144 from jarupxx/LTCG_patch
D3D : Copy over from Standard functions to LTCG optimized functions
2018-05-09 14:22:11 +02:00
jarupxx 5dc9d5310e D3D : Copy over from Standard functions to LTCG optimized functions
due lost parameter in EAX.
- D3DDevice_LoadVertexShader_4
- D3DDevice_SetTextureState_BorderColor_4
- D3DDevice_SetStreamSource_8

Rewrite functions
- D3DDevice_SelectVertexShader_4

Also add functions
- D3DDevice_LoadVertexShader_0
- D3DDevice_SetTextureState_TexCoordIndex_0
- D3DDevice_SetTextureState_ColorKeyColor_4
2018-05-09 20:58:46 +09:00
jackchentwkh b026952740 Skip rendering when dwCount==0 or possible non-FVF push buffer 2018-05-08 18:56:24 +08:00
jackchentwkh c3cc70c6cf only warning instead of shut down when possible non-FVF push buffer detected. 2018-05-08 18:21:06 +08:00
jarupxx 03921a4b2a Leave LOG TEST_CASE on EndVisibilityTest_0
Valid parameter is passed in EAX
2018-05-07 18:28:13 +09:00
patrickvl 9917594c76 Fixed linker error under Release builds (thanks to Radwolfie's help) 2018-05-06 04:36:59 -05:00
patrickvl 579bb0a898 Avoid linker error under Release builds (but still needs a fix) 2018-05-06 04:36:59 -05:00
PatrickvL 7a76fd4473 D3D : Log host D3DCaps unconditionally 2018-05-06 04:36:59 -05:00
PatrickvL ef9c36346d D3D : Log all host D3DCaps members to string 2018-05-06 04:36:59 -05:00
PatrickvL 5233fe8ccc D3D : Dump host D3DCaps (initial commit - there's more to be rendered) 2018-05-06 04:36:59 -05:00
PatrickvL 4f8543065a D3D : Avoid a crash when creating a fallback texture instead of something that was supposed to become a DepthStencil.
This occurred when Panzer Dragoon ORTA goes in-game for example.
2018-05-04 17:48:07 +02:00
Luke Usher 564826e38d Fix an issue where AutoDepthStencilFormat of D16_LOCKABLE caused CreateDevice to fail 2018-05-03 23:17:44 +01:00
Luke Usher e54e7fbfcf Make new RDTSC patch the default, the old method is optional 2018-05-03 21:23:09 +01:00
Luke Usher 07bad7b1c6
Merge pull request #1123 from jackchentwkh/RDTSC-Patch
Repropose RDTSC patch hack
2018-05-03 18:55:49 +01:00
Luke Usher a9f81d778c
Merge pull request #1125 from jackchentwkh/D3DDevice_BeginPush_two_arg
Quick Fix for 4531 BeginPush OOVPA
2018-05-03 18:54:53 +01:00
jackchentwkh f656648c2c Add BeginPush OOVPA for 4531, tested with crazi taxi 3.
add 4531 to BeginPush OOVPA registration.
revise BeginPush2 loging message.
2018-05-04 01:02:45 +08:00
Luke Usher 45b4a62b65
Merge branch 'master' into RDTSC-Patch 2018-05-03 16:53:33 +01:00
Luke Usher 0d8f1dd269
Merge pull request #1124 from jackchentwkh/D3DDevice_BeginPush_two_arg
Add D3DDevice_BeginPush2 patch for XDK 4134
2018-05-03 16:43:03 +01:00
jackchentwkh 3b8250c598 Add more remarks.
we shall use scaled PerformanceCounter all the time no matter we patched the rdtsc or not.
2018-05-03 23:40:27 +08:00
jackchentwkh cd60b7bbf8 put deleted code back with remarks. 2018-05-03 22:59:13 +08:00
jackchentwkh c5fb332601 add D3DDevice_BeginPush2 for XDK4134
Rallisport uses this version.
2018-05-03 21:55:34 +08:00
Luke Usher fe464da7fd
Merge pull request #1109 from PatrickvL/viewport_scaling
Viewport scaling
2018-05-03 14:06:23 +01:00
jackchentwkh 557ccc13a0 restore hack option
only patch rdtsc when the hack option is selected
2018-05-03 20:38:34 +08:00
jackchentwkh e90c2f659d Using pattern matching for rdtsc search.
exclude certain false positive.
2018-05-03 19:51:33 +08:00
patrickvl ccd82a8e0f HLE : Configurable viewport scaling (as a hack) 2018-05-02 19:10:03 +02:00
Luke Usher 7015aaa07b Return => Continue 2018-05-02 21:51:07 +08:00
Luke Usher e6235bb013 Avoid false positives using method derised by jackchen 2018-05-02 21:51:07 +08:00
Luke Usher 3e516f6b0d Oops, don't break after finding one rdtsc in a section 2018-05-02 21:51:07 +08:00
Luke Usher 8f63dffd98 Fix off-by-one error in rdtsc patch 2018-05-02 21:51:07 +08:00
Luke Usher 7f97ebf71f Fix false positive detecion in ,data segment in some titles 2018-05-02 21:51:07 +08:00
Luke Usher e53213f056 Patch rdtsc instructions 2018-05-02 21:51:07 +08:00
PatrickvL c7c964394b
Merge pull request #1113 from jackchentwkh/master
RAW pushbuffer handling improve
2018-05-01 22:18:06 +02:00
jackchentwkh f88ed6f7fd Fix method 1800
Restore the mis-deleted pIndexData initiation.
Correctly calculate dwCount with 16 bit element.
NO_INCREMENT flag implementation (by guess, ha!)
2018-05-01 23:13:53 +08:00
PatrickvL 7ac82d5de1 HLE : GetViewport scales host viewport back to Xbox dimensions (some titles might get less confused by the return value) 2018-05-01 17:03:49 +02:00
RadWolfie 270a821ad5 Replace static size to dynamic array for DSound
Both DS Buffer and Stream are now using C++ std vector instead of static
size array which is in C.

It should improve performance for lower-end computers. Before, high-end
computers will only notice very light performance impact. Now appear to
be no performance impact unless certain titles are preserving maximum
size.
2018-04-30 23:29:38 -05:00
jackchentwkh 4bb24dc19a raw pushbuffer process fixup
add NOP method support
add TRANSFORM_CONSTANT_LOAD and TRANSFORM_CONSTANT method tips.
improve unkonwn method handling by skipping parameters indicated by dwCount
add pushbuffer size check to prevent overflow.
2018-05-01 10:48:46 +08:00
jackchentwkh 5fbb91c6a6 Fix address interpretation of PushBuffer Data and Fixup Data.
Include the fixup code without using function
2018-04-30 09:22:39 +08:00
patrickvl 6a897212a7 HLE : Refactored window resizing, so it's done only when needed, only in the GUI process. 2018-04-29 22:33:03 +02:00
patrickvl bed1d7bfc7 HLE : Fake field rendering by halving the perceived height in SetViewPort 2018-04-29 22:33:03 +02:00
patrickvl 8fa81b99af HLE : Post-rebase fixes 2018-04-29 22:33:03 +02:00
patrickvl 2654eaae3c HLE : Limit width/height to desktop resolution 2018-04-29 22:33:03 +02:00
patrickvl df81c52372 HLE : Resize window according to configuration 2018-04-29 22:33:02 +02:00
patrickvl 73b96ac783 HLE : Disable calling the Xbox SetViewport code, as it causes regressions.
Also start collecting test-cases for D3DDevice_GetViewportOffsetAndScale
2018-04-29 22:33:01 +02:00
patrickvl eff073e518 HLE : Use CxbxGetPixelContainerMeasures to get overlay dimensions 2018-04-29 22:33:01 +02:00
patrickvl 25e32d8d7c HLE : Post-rebase fixes 2018-04-29 22:33:00 +02:00
patrickvl 0ec58ff4b8 HLE : Cache render-target (and depth-stencil while we're at it) for use in SetViewPort 2018-04-29 22:33:00 +02:00
PatrickvL d3a278a5aa HLE : Scale viewport from Xbox to host (this might fix some drawns to the upper-left corner) 2018-04-29 22:33:00 +02:00
Luke Usher 317b9dfe00
Revert "Replace EmuX86's interpreter with Unicorn" 2018-04-29 20:16:03 +01:00
Luke Usher 2d1de80459
Merge pull request #1110 from jackchentwkh/multi_controller
Multi Controller Support with Xinput
2018-04-29 20:12:19 +01:00
RadWolfie 3dec725f76 Remove debug trace from release build 2018-04-29 12:40:44 -05:00
RadWolfie e591409cca Fixed no audio
It was cause by hRet not set to DS_OK, original value returned to title
was out of memory flag.

This fix titles:
* Mafia
* JSRF
* Taz - Wanted
* etc
2018-04-29 12:40:44 -05:00
RadWolfie 53ac646e2e Fix Mafia crash
If there's no packets, then there's no reason to process stream.
2018-04-29 12:40:44 -05:00
RadWolfie 194e0dc0e8 Ctrl pan cannot be used with ctrl 3D flag 2018-04-29 12:40:44 -05:00
RadWolfie 09eb0ef6be Removed unused 2 local vars 2018-04-29 12:40:44 -05:00
RadWolfie 636060ea1b Renames and use pThis instead of ppDSBuffer 2018-04-29 12:40:44 -05:00
RadWolfie 603f086180 Replace silence with predefined volume min
Plus don't re-set volume twice.
2018-04-29 12:40:44 -05:00
RadWolfie e9bdc1f0b5 Append check if stream is paused 2018-04-29 12:40:44 -05:00
RadWolfie ae3f812347 Small fixup for Pause functionality
Plus do set status outside of DS_OK state too.
2018-04-29 12:40:44 -05:00
RadWolfie 0043262818 Fix previous commit
Oops...
2018-04-29 12:40:44 -05:00
RadWolfie c8aa74a85a Update Stream creation to similar of Buffer does 2018-04-29 12:40:44 -05:00
RadWolfie ffc70d0721 Move early enough to output org lVolume before set 2018-04-29 12:40:44 -05:00
RadWolfie 1294db22f6 Add support for SetHeadroom function
Untested btw, yet the concept should work as is.
2018-04-29 12:40:44 -05:00
RadWolfie f35add180c Missed another patch requirement for DSound Stream 2018-04-29 12:40:44 -05:00
RadWolfie be63382661 Change print format mistake
Might be printing wrong numbers.
2018-04-29 12:40:44 -05:00
RadWolfie 0493faaf43 Oops...
Should not be looping in here.
2018-04-29 12:40:44 -05:00
RadWolfie 5da6e0c9d2 Fix older XDK titles crash 2018-04-29 12:40:44 -05:00
RadWolfie d19efc44f9 Fix SW: KotOR title
Packet was incomplete due to dwMaxSize is greater than 5 seconds worth
of data.

Plus fixup synch flags whenever is able to add/remove its limitation.
2018-04-29 12:40:44 -05:00
RadWolfie 3f51494f48 Also DSP function being ignored too 2018-04-29 12:40:44 -05:00
RadWolfie 1b9405c8b8 Fix passdown value for second call. 2018-04-29 12:40:44 -05:00
RadWolfie 990b87198e Replace NULL to nullptr since it is pointer... 2018-04-29 12:40:44 -05:00
RadWolfie 3c723d2763 Various bug fixes
* no reason to re-set value twice from SetBufferData
* passdown the length, not offset
* use counter instead of count
* if size is the same replace "out of memory" to "ok" result, and ignore
DSP image function.

This is the corrections, however doesn't cover every faults few titles
has atm.
2018-04-29 12:40:44 -05:00
RadWolfie 7fb1451fee Add SwitchToThread inside loop when buffer playing 2018-04-29 12:40:43 -05:00
RadWolfie 18c6948153 Fix SetBufferData biggest issue of all
!Major breakthrough!

Titles improved:
* The Simpsons: Road Rage (now has music and voiceover audible)
* Ghost Recon: Thunder Island (No longer output distort noises ingame.
100% sure the rest of sequels will work correctly.)
2018-04-29 12:40:43 -05:00
RadWolfie 3590aa0f19 Another small update
* Only perform a buffer resize. Allow play function to make buffer
update only.
* Removed unused parameters.
2018-04-29 12:40:43 -05:00
RadWolfie 17ca484370 Small updates 2018-04-29 12:40:43 -05:00
RadWolfie 73ebd2f893 Also fix DS Buffer GetStatus function too.
PAUSED (xbox) and BUFFERLOST (host) are using same value. We're only
enforcing 3 flags for xbox.
2018-04-29 12:40:43 -05:00
RadWolfie 5e48c63046 Replace unimplemented to ignored for HRTF functions 2018-04-29 12:40:43 -05:00
RadWolfie be6fab6b7e Add audio debug mute control
For pinpoint which audio is causing problem then troubleshoot from
there.
2018-04-29 12:40:43 -05:00