Commit Graph

3339 Commits

Author SHA1 Message Date
RadWolfie 265bb3a8e4 Check if it is already defined. 2018-06-07 20:22:36 -05:00
RadWolfie dff0ef183b Fix type cast for NV2A ptimer. 2018-06-07 20:15:39 -05:00
RadWolfie be049defa9 return empty string by default. 2018-06-07 20:11:20 -05:00
RadWolfie f1a42a7b1b Fix empty case warnings for NV2A various source codes 2018-06-07 19:58:27 -05:00
RadWolfie 03f672e58a int is a signed int by default, enforce to use unsigned int. 2018-06-07 19:47:14 -05:00
RadWolfie 7ef45a6bf9 Fix return with a cast
I think it is best to use guint64 for hashes.
2018-06-07 19:46:18 -05:00
RadWolfie dbc7c226df Bypass visual studio's possible bug 2018-06-07 19:45:00 -05:00
RadWolfie 87c1594432 clip's width and height are not float type. 2018-06-07 19:43:55 -05:00
RadWolfie 5a8adcd2b6 Fix empty case warnings for NV2A PFB source code 2018-06-07 19:30:40 -05:00
RadWolfie 6bd9bd2123 Fix empty case warnings for NV2A Debug source code
Since it only has default input without any case filled in. Warning should be ignored for time being until graphic dev team start filling more in.
2018-06-07 19:06:02 -05:00
RadWolfie 9e44e1aa93 Rename _logPrefix to _logThreadPrefix 2018-06-07 17:44:08 -05:00
RadWolfie 89366e7d69 Prevent stack corruption for warning message
Co-Authored-By: Luke Usher <luke.usher@outlook.com>
2018-06-07 17:43:43 -05:00
Luke Usher 8b9c62f729
Merge pull request #1246 from PatrickvL/push_buffer
Push buffer
2018-06-07 19:27:05 +01:00
PatrickvL c17f926162 D3D : SetViewport should check for an assigned render target first! 2018-06-07 18:45:03 +02:00
PatrickvL 18bef9379c D3D : Limit SetViewport to RenderTarget bounds. This could fix some cases where nothing is visible. 2018-06-07 18:42:27 +02:00
PatrickvL ad9a9c3205 Revert "D3D : More HLE pushbuffer refactoring - state is now kept and/or reset more correctly"
This reverts commit 78381cc0f2.
2018-06-07 18:09:13 +02:00
PatrickvL 4d663eb0c5 D3D : Remove more obsolete debugging features 2018-06-07 18:06:42 +02:00
PatrickvL 78381cc0f2 D3D : More HLE pushbuffer refactoring - state is now kept and/or reset more correctly 2018-06-07 17:35:15 +02:00
PatrickvL e8c8872d33 D3D : More HLE pushbuffer refactoring - it's starting to look (and work) more and more like the LLE counterpart! 2018-06-07 17:03:34 +02:00
PatrickvL bf5061c8f7 D3D : Removed obsolete pushbuffer tracking code 2018-06-07 14:37:18 +02:00
PatrickvL b166af9bbc D3D : HLE Pushbuffer refactorings, using an identical approach as LLE. 2018-06-07 14:36:31 +02:00
patrickvl 3d740be8a3 Add the text "LOG_TEST_CASE:" to popup-messages, so this will get logged too. 2018-06-07 10:19:42 +02:00
PatrickvL cafc1d3bbd D3D : Push buffer command refactoring, modelled after envytools but in more explicit steps (first handling command type, then instruction, then flags). 2018-06-07 10:19:42 +02:00
PatrickvL e8b12345f8 D3D : Disabled common popup in push buffer drawing (for non-FVF shaders) 2018-06-07 10:19:42 +02:00
PatrickvL 29d634784b D3D : Documented SwitchTexture and disabled common popup 2018-06-07 10:19:41 +02:00
PatrickvL 2a7c8d2476 D3D : Added push buffer call and return support (just because NV2A_PGRAPH does it too) 2018-06-07 10:19:41 +02:00
PatrickvL 4aee93fe86 D3D : Push buffer command handling improvements 2018-06-07 10:19:41 +02:00
PatrickvL 4504926a57 NV2A : Prepare activation of shader_cache (all that's left is defining USE_SHADER_CACHE and then search path corrections to include glib_compat.h successfully) 2018-06-07 10:19:40 +02:00
PatrickvL 403d86ecb5 NV2A : Update pgraph-prefixed functions to always start with a verb.
Also, renamed attribute variables to vertex_attribute (and introduce it at one more location).
2018-06-07 10:19:40 +02:00
patrickvl 29cab51a4a D3D : Attempt to render push buffer with non-FVF vertex shader (for now only when there's one stream) 2018-06-07 10:19:40 +02:00
patrickvl f41175c42f D3D : Documented Pushbuffer test-cases, and some code-cleanup 2018-06-07 10:19:39 +02:00
patrickvl fa9e364841 D3D : Fixed pushbuffer command decoding, and added a few test-cases 2018-06-07 10:19:39 +02:00
patrickvl e86540fade LOG_TEST_CASE triggers a popup again, but only under DEBUG builds.
This partailly rolls back part 04b618cf1d
2018-06-07 10:19:39 +02:00
PatrickvL 0158e91d2a D3D : Expanding HLE push-buffer drawing 2018-06-07 10:19:39 +02:00
Luke Usher 4f353eef91
Merge pull request #1253 from RadWolfie/dsound-volume-hot-fix
DSound Volume Hot-fix
2018-06-07 06:44:24 +01:00
RadWolfie 9eab19ae00 Only need convert counter to LONG
Reduce conversion necessary for optimization.
2018-06-06 23:07:29 -05:00
RadWolfie 0911180933 Rely on front speakers only
Since rear speakers can be set to silent, it affect the audio to become silent too with average setup.

Plus DirectSound API doesn't support individual speaker volume, using front left and right speaker are the only solution for HLE with DirectSound. OpenAL API might not have this type of support for HLE anyway.
2018-06-06 22:52:31 -05:00
RadWolfie 88ee1bfe88 Fix volume average conversion 2018-06-06 22:47:18 -05:00
Luke Usher b30f01b987 Update test case for regNum > 12 2018-06-06 19:27:20 +01:00
Luke Usher 24fd2bddd3 Fix stack corruption when regnum > 12 2018-06-06 19:24:30 +01:00
Luke Usher 97222b6de0 Fixed-Point alternative implementation for rdtsc replacement
Both slightly faster, and more accurate than the previous implementation

Thanks haxar!
2018-06-05 10:54:54 +01:00
PatrickvL d700120994
Merge pull request #1247 from RadWolfie/logging-update
Output log once for both debug and release builds
2018-06-04 10:48:31 +02:00
RadWolfie cb613dbfec Update to use existing log macro
Thanks to @PatrickvL for the suggestion.
2018-06-04 01:59:48 -05:00
RadWolfie c9bc4aa12d Add missing log prefix for DSound 2018-06-04 01:57:52 -05:00
RadWolfie fd10061978 Output log once for both debug and release builds
Suppressing warnings from release build isn't ideal. With this commit, we can have better idea what we really need to fix.

Plus spamming log isn't ideal either.
2018-06-03 12:22:50 -05:00
RadWolfie fe48980d29 DSP binary is not supported in HLE 2018-06-03 12:10:47 -05:00
RadWolfie b75807b1bd Remove custom DSound log marco 2018-06-03 11:38:49 -05:00
RadWolfie 323cf48a9c Update logs to output real result
Since DSP relative functions are not supported for DirectSound class from Vista and newer. We cannot provide support anyway. OpenAL has better support by the way.
2018-06-03 11:38:03 -05:00
Luke Usher 880233192a
Merge pull request #1244 from jackchentwkh/xinput_fix
Xinput fix and minor clean up

Doesn't fix lensflare, but may fix some other titles
2018-06-02 18:43:45 +01:00
Luke Usher de7d2929b7
Merge pull request #1245 from PatrickvL/log_mask
Log masks with their actual value
2018-06-02 18:39:44 +01:00
patrickvl b2f5ee9c0b Log masks with their actual value 2018-06-02 16:49:52 +02:00
jackchentwkh c529f51672 fix Otogi non-responsive input issue, again :Q
ChangeConnected flag must be set together with CurrentConnect.
2018-06-02 13:12:47 +08:00
jackchentwkh 925f993944 correct the note the XInput subtype #define 2018-06-02 13:11:59 +08:00
Voxel9 0249c7daab God damn CR LF line endings... 2018-06-01 23:03:16 +01:00
Voxel9 b2529c8013 SetRenderState_FillMode fix for 5849 titles (and maybe others) 2018-06-01 22:56:06 +01:00
Luke Usher 8052795154 Call Xbox SetRenderTarget to update internal state 2018-06-01 15:52:53 +01:00
Luke Usher 9682a3f01d ooops 2018-06-01 09:41:33 +01:00
Luke Usher 15c234031a Fix an issue where the ucSubType was derived incorrectly 2018-06-01 09:39:42 +01:00
Luke Usher 16e976636b Not-Required patch cleanup + Fix D3DDevice_SetIndices signature 2018-05-31 22:10:07 +01:00
Luke Usher 09021d29c0
Merge pull request #1230 from LukeUsher/merge-registered-and-host-resource-maps
Merge g_RegisteredResources and g_HostResources into a combined g_XboxDirect3DResources.
2018-05-31 18:08:52 +01:00
Luke Usher b928d0da23 Don't use an additional variable 2018-05-31 18:07:39 +01:00
Luke Usher 29dbe8b019
Merge pull request #1231 from jackchentwkh/vsbc_typo_fix
fix typos of controller mapping dialog and virtual SB dialog.
2018-05-31 16:59:25 +01:00
Luke Usher d05967370b We don't need this extra variable 2018-05-31 16:57:51 +01:00
Luke Usher d3403e2e8c Reduce speed impact of BackBuffer copy: Huge performance boost for some titles 2018-05-31 16:53:31 +01:00
Luke Usher e692b6e433 Revert accidental change 2018-05-31 16:29:56 +01:00
Luke Usher 928d416161 Merge g_RegisteredResources and g_HostResources into a combined
g_XboxDirect3DResources.

This cleans up the code, prevents issues caused by inconsistenies
between the two structures and also pretty much halves the number of lookups that happen per call to GetHostResource, bringing a (slight) performance boost
2018-05-31 16:24:38 +01:00
Luke Usher a2bd0bbaa3
Merge pull request #1228 from LukeUsher/dont-force-depth=1
Don't force Depth = 1
2018-05-31 13:33:35 +01:00
Luke Usher c1db127c3b Don't force Depth = 1 2018-05-31 13:23:14 +01:00
Luke Usher 04b618cf1d LOG_TEST_CASE now shows an identifable log entry rather than a popup message 2018-05-31 11:04:53 +01:00
jackchentwkh 2ad3f2bad6 fix typos of controller mapping dialog and virtual SB dialog.
correct control names accordingly.
2018-05-30 16:52:53 +08:00
PatrickvL e8353f565f D3D : Fix detection of unused registers in vertex shader recompiler - `declaredRegisters` wasn't zero-initialized, it's random contents lead to random vertex-shader conversion errors. 2018-05-29 17:13:40 +02:00
PatrickvL a38da81d7f D3D : Fix pushbuffer based drawing by calling CxbxUpdateNativeD3DResources from there too. 2018-05-29 15:55:41 +02:00
Luke Usher 86a3f88cf6
Merge pull request #1200 from PatrickvL/d3d9_vertex_shader
More porting work towards Direct3D 9
2018-05-29 13:33:22 +01:00
jackchentwkh 6edf293699 Add controller port configuration GUI and support virtual SB controller with feedback status (#1196)
* Add XB_ prefix for xbox XInput related structures and variables to prevent mis-use host equivalent.
Add newly findings for device table related info.

* Revert g_Controller ZeroMemory() calls.
now the XINPUT_STATE is correctly refering to host type, no need to specify the name space.

* Add X_CONTROLLER_HOST_BRIDGE structure type.
Prepare for configurabale host input, and virtual xbox controller.

* Fix DeviceInfo initialization when device table is not found.
always set state to enable rumble.

* experimenting virtual SteelBatalion controller.
using console as controller output.
using XInput and direct input combined keys

* first attem to emulat SteelBatalion controller works.

* add dialog file to solution

* Restore missing dialog files and functions

* Minor fix

* fix dialog control grouping
now registry works.

* refine some controller related constants

* Using Dialog for showing
SBC controller feedback
add possibility of using same dialog for virtual controller input.

* using EmuUpdateTickCount() as modeless dialog message handler.
sort of working.
revert the dlg message handling from wnd.cpp

* Finally the dialog for virtual SB controller feedback status works!
modeless dialog got issues. modal dialog will occupy focus. only way is to use a DLL, load the DLL when cxbx-r emulation child process started, and create a dummy window from DLL then create a modal dialog.
lots of code change and clean up.

* fix debug build,  use same character set setting for all configurations.

* restore C++ optimiztion setting in master

* remove unitended included ribbon resources

* removed necessary official document mentioning

* Add src/CxbxVSBC/Release and src/CxbxVSBC/Debug to .gitignore

* Move Host Port assignment related code to src/common/win32

* fix merge confliction

* oops, fix merge conflictions again.

* Add OLD_XINPUT mark for those marked out old XInput code. need to be reviewed in the future.

* remove unintended binary files

* fix debug build, again.
revert unindteded changes to submodule

* rever unintended submodule change

* Relocate project to build/Win32 folder

Co-Authored-By: anita999 <anita999@ms12.hinet.net>

* Restore sln file base on master

* Include project dependency to build

* Final fixup for sln file

* Restore original new line code

* Update Wnd.cpp

* Remove old include

* Include CxbxVSBC.dll into AppVeyor

This should be the last fixup for pull request.

* Fix merge-conflict

* Fix files encode format to UTF-8

* treat .rc file as text instead of binary

* Revert "treat .rc file as text instead of binary"

This reverts commit 034039d723.
2018-05-29 13:33:01 +01:00
PatrickvL 3f885fb202 D3D9 : More accurate decoding of packed integer to float 2018-05-28 16:54:24 +02:00
PatrickvL 73de67367a D3D9 : Vertex shader declaration recompile fixes 2018-05-28 16:15:04 +02:00
Voxel9 5939f68125 Remove unnecesary space after brace 2018-05-28 11:27:16 +01:00
Voxel9 18a48546fe Remove "LED" text and replace with LLE flags text 2018-05-28 11:24:57 +01:00
patrickvl b23e8cf3f3 D3D9 : More capability checks 2018-05-27 21:04:22 +02:00
patrickvl d0a499c545 D3D9 : Also check D3DDTCAPS during vertex element conversion 2018-05-27 20:57:16 +02:00
blueshogun96 7c06c9b7c1 Cleanup duplicate handle on initial APC creation failure 2018-05-27 10:50:29 -07:00
patrickvl 2668a01a87 D3D9 : Honour D3DCaps for all DECLTYPES 2018-05-27 15:55:17 +02:00
patrickvl 25dc517226 D3D9 : Use an alias for pixel shader constant type 2018-05-27 14:45:56 +02:00
blueshogun96 9800c0d494 Keep original formatting 2018-05-26 12:41:18 -07:00
blueshogun96 ec7cd60b97 Cleanup duplicated handles for APCs 2018-05-26 12:14:04 -07:00
Jan Gocník 006b49937c QueryMemory reports host allocated memory 2018-05-25 15:15:09 +02:00
patrickvl 341edd2512 D3D9 : Honour D3DCaps for UBTYE4 support 2018-05-25 08:38:05 +02:00
RadWolfie 3dc9d0dfd7 Hotfix EEPROM
Found the source of cause, after this change. Attempted to reproduce the issue no longer return. Now everything works as intended.
2018-05-24 20:46:47 -05:00
RadWolfie 25c495341d Another update
* LOWEST_USER_ADDRESS use the same address as XBE_IMAGE_BASE
* Restored 2nd statement check
2018-05-24 12:58:30 -05:00
RadWolfie 5404211da9 Fix previous commit 2018-05-24 12:29:21 -05:00
Jan Gocník c2f944f31f NtQueryVirtualMemory fixed
It now properly reports allocations (even for user memory).
2018-05-24 12:24:44 -05:00
PatrickvL 726c1ed77e D3D9 : Small rename 2018-05-24 14:30:23 +02:00
PatrickvL b54411774e D3D : More Direct3D 9 porting of vertex element conversion code (using more sensible types and code) 2018-05-24 14:15:49 +02:00
PatrickvL f235caca57 D3D9 : Porting more of the vertex shader conversion code 2018-05-24 10:58:11 +02:00
Luke Usher d661ccd0b5
Merge pull request #1198 from PatrickvL/xbdm
Xbdm
2018-05-24 09:51:54 +01:00
PatrickvL 0682970e42 Project fixups 2018-05-24 10:36:24 +02:00
jarupxx e81e6ed7ee D3D : Add patch for LTCG optimized D3DDevice_SetPixelShaderConstant 2018-05-23 20:57:42 +09:00
PatrickvL 356b7c5a27 xbdm : Initial commit; Thunk table + importing (2 functions already imported by debugchannel.xbe XDK sample) 2018-05-22 15:09:58 +02:00
jarupxx 32e89f73c3 D3D : Fix parameter in D3DDevice_SelectVertexShader_0 2018-05-22 19:40:56 +09:00
Jan Gocník ab64d5e96a XInputSetState: properly update the Status array
When a new SetState request is recieved, make sure to either
queue it to the polling thread or return a SUCCESS. Otherwise
the requesting thread will die waiting for something you
didn't take not of.
2018-05-20 23:01:22 +02:00