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
* 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.
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.
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.
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.
* \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
* 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.
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
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.