Commit Graph

2846 Commits

Author SHA1 Message Date
Luke Usher 761143945c Merge pull request #738 from LukeUsher/fixing-jsrf
Fix JSRF Regression after NV2A merge
2017-09-20 10:33:15 +01:00
Luke Usher 96925bc97d Oops: Device_End is a required patch for HLE as it processes draw comments 2017-09-20 10:05:59 +01:00
Luke Usher d06fc6d669 Prevent NV2A VBlank Thread creation when in HLE Mode.
VBlank callbacks were effectively being called twice, oops!
2017-09-20 10:05:12 +01:00
Luke Usher 66502da40f Merge pull request #736 from PatrickvL/PixelPorting
Ported Dxbx Pixel Shader conversion (Currently disabled)
2017-09-19 14:05:37 +01:00
Luke Usher a4fa55519d Implement INC/DEC opcodes 2017-09-19 13:30:07 +02:00
Luke Usher e16468c83d Disable another patch that is not required now (D3DDevice_End()) 2017-09-19 13:30:07 +02:00
Luke Usher 56caba8feb Remove some patches that are no longer required with D3D_CreateDevice unpatched 2017-09-19 13:30:07 +02:00
Luke Usher 64025e0096 Mark contiguous memory region as executable.
No benefit right now, but this is essential if we want to load/run a real kernel
2017-09-19 13:30:07 +02:00
Luke Usher ab5138a3b9 Fix an issue with SUB and CMP opcodes where the carry flag would not be calculated correctly 2017-09-19 13:30:07 +02:00
Luke Usher 1cd9cafb78 EmuX86: Implement SUB opcode 2017-09-19 13:30:07 +02:00
Luke Usher 5f60dddd8f Allow CxbxPopupMessage to be called with Non-const strings 2017-09-19 13:30:07 +02:00
Luke Usher 7283193101 Allow CxbxPopupMessage to be called with non-const strings 2017-09-19 13:30:07 +02:00
Luke Usher 1e677f30c1 Use a higher precision clock for more accurate VBlank timing 2017-09-19 13:30:07 +02:00
Luke Usher dea313b234 More NV2A Work 2017-09-19 13:30:07 +02:00
Luke Usher a3c6c17c24 Line ending consistency 2017-09-19 13:30:07 +02:00
Luke Usher d573332431 More PGRAPH 2017-09-19 13:30:07 +02:00
Luke Usher c9cc6eced0 More NV2A porting from XQEMU
Current Status:
Official XDK titles deadlock while calling BlockOnTime.
NXDK titles are generating render commands and appear to be working, although we do not actually implement pgraph yet, so we get a blank screen.
2017-09-19 13:30:07 +02:00
Luke Usher abdaf89602 Move interrupt processing thread to CxbxKrnl rather than specific to EmuNV2A 2017-09-19 13:30:07 +02:00
Luke Usher 9fccb952b2 EmuNV2A: Fix a crash caused by a double lock. 2017-09-19 13:30:07 +02:00
Luke Usher ce1ecf1371 More NV2A work 2017-09-19 13:30:07 +02:00
Luke Usher 4465f2a33a More porting from XQEMU + Fixed a major Cxbx-Unique NV2A BUG
DEVICE_READ/WRITE_32_REG:
Registers were being written to the completely wrong addresses!
2017-09-19 13:30:07 +02:00
Luke Usher 10f783470c Remove TEST dialog: Not required 2017-09-19 13:30:07 +02:00
Luke Usher a1048d0042 Working towards making Interrupt support more generic/less NV2A specific 2017-09-19 13:30:07 +02:00
Luke Usher 147b293c8c Oops: Interrupt Service Routine was being called with the wrong calling convention. 2017-09-19 13:30:07 +02:00
Luke Usher e36a607009 NV2A Interrupts now fire in an Xbox thread!
The interrupt service routine runs, sets up the DPC call, but then the global kernel DPC handler crashes when accessing the KPCR.
This DPC code is marked as experimental, so it needs work.
2017-09-19 13:30:07 +02:00
Luke Usher 6814e2afeb Make sure HLE Vblank doesn't get triggered when LLE is enabled
Make GetNextVBlankTime available to EmuNV2A
2017-09-19 13:30:07 +02:00
Luke Usher 03ce1333a4 More porting from XQEMU.
LLE execution now gets stuck on D3D_BlockOnTime.

Could be lack of interrupts.
2017-09-19 13:30:07 +02:00
Luke Usher fb74bb8e9c Disable CreateDevice/KickPushBuffer patches
Allows NV2A LLE to take over this part of bootup.

NOTE: This needs testing extensively before merging is possible.
2017-09-19 13:30:07 +02:00
Luke Usher 338b627b2b Porting NV2A From QEMU
No PGRAPH emulation yet, but this is enough to get past Direct3D_CreateDevice init.
2017-09-19 13:30:07 +02:00
PatrickvL 0bb636b9e0 Merge remote-tracking branch 'origin/PixelPorting' into PixelPorting 2017-09-19 09:40:15 +02:00
PatrickvL 7cbdd7b430 Allow merging this code by NOT switching over to new pixel shader code yet (it requires more work before this can be enabled). 2017-09-19 09:33:32 +02:00
PatrickvL 09872bf16d First attempt to use Dxbx pixel shader code. Will probably crash. It'd better to base this on Luke's work to get D3D_CreateDevice running unpatched. That way, many patches (including PixelShader related ones) can be disabled, allowing much easier emulation. 2017-09-19 09:33:31 +02:00
PatrickvL 6d131d5fc0 Finished translation of functional part of Dxbx Pixel Shader conversion code.
(Albeit PSH_XBOX_SHADER::DecodedToString is still incomplete).
2017-09-19 09:33:31 +02:00
PatrickvL 2149e4a4a5 Nearly finished back-porting Dxbx pixel shader conversion code.
With this change, Cxbx-Reloaded is linking again.
Two functions need to be completed (PSH_XBOX_SHADER::DecodedToString and ConvertConstantsToNative), after which testing can commence!
2017-09-19 09:33:31 +02:00
PatrickvL 19b7a5da33 Corrected all other pixel-shader comments which got damaged by a global find&replace 2017-09-19 09:33:31 +02:00
PatrickvL 92f4581d3c Fix global find&replace errors 2017-09-19 09:33:31 +02:00
PatrickvL 5cbf7b61fd Another batch of translation (about 40% to go) 2017-09-19 09:33:30 +02:00
PatrickvL 901d16785e Half-way translating pixel shader conversion code from Dxbx (Delphi) to Cxbx-Reloaded (C++) 2017-09-19 09:33:30 +02:00
PatrickvL a325f6aa87 Back porting of more Dxbx PixelShader conversion types.
Also moved most of the types from PixelShader.h to PixelShader.cpp
2017-09-19 09:33:30 +02:00
PatrickvL 1f966bc7eb More back porting of Dxbx pixel-shader related type definitions and comments 2017-09-19 09:33:30 +02:00
PatrickvL 8ff5c497e7 Started back-porting Dxbx pixel shaders 2017-09-19 09:33:30 +02:00
PatrickvL 5a10e350a0 Allow merging this code by NOT switching over to new pixel shader code yet (it requires more work before this can be enabled). 2017-09-19 09:33:02 +02:00
PatrickvL bf690c855c First attempt to use Dxbx pixel shader code. Will probably crash. It'd better to base this on Luke's work to get D3D_CreateDevice running unpatched. That way, many patches (including PixelShader related ones) can be disabled, allowing much easier emulation. 2017-09-18 18:32:10 +02:00
PatrickvL 19e329add7 Finished translation of functional part of Dxbx Pixel Shader conversion code.
(Albeit PSH_XBOX_SHADER::DecodedToString is still incomplete).
2017-09-18 15:08:27 +02:00
PatrickvL e44f6bcf55 Nearly finished back-porting Dxbx pixel shader conversion code.
With this change, Cxbx-Reloaded is linking again.
Two functions need to be completed (PSH_XBOX_SHADER::DecodedToString and ConvertConstantsToNative), after which testing can commence!
2017-09-18 11:21:15 +02:00
PatrickvL ad74c23946 Corrected all other pixel-shader comments which got damaged by a global find&replace 2017-09-18 09:38:53 +02:00
PatrickvL 327e76c935 Fix global find&replace errors 2017-09-17 19:11:49 +01:00
PatrickvL d00a33ef81 Another batch of translation (about 40% to go) 2017-09-17 18:49:52 +01:00
PatrickvL 73482456db Half-way translating pixel shader conversion code from Dxbx (Delphi) to Cxbx-Reloaded (C++) 2017-09-17 17:13:27 +01:00
PatrickvL f465a27362 Back porting of more Dxbx PixelShader conversion types.
Also moved most of the types from PixelShader.h to PixelShader.cpp
2017-09-16 16:46:22 +01:00