Commit graph

59 commits

Author SHA1 Message Date
RadWolfie
55f84cd67e move functions into their own locations 2020-04-14 20:24:19 -05:00
PatrickvL
b2b0813db4 Loader : Added emulation DLL, working towards this stub compiling, moved loader project to subfolder 2020-04-14 20:24:17 -05:00
patrickvl
34072e9fd9 Random stuff, taken from my old Loader branch 2020-04-14 20:24:16 -05:00
RadWolfie
b4457c3605 replace experimental filesystem to std filesystem 2019-09-25 13:53:02 -05:00
PatrickvL
a6c0353c5b Fix a large part of XTL-hell (#1731)
* Rename g_CurrentXboxVertexShaderHandle to g_Xbox_VertexShader_Handle

* Remove CxbxDrawContext.XboxVertexShaderHandle field, and replaced reads from this field by g_Xbox_VertexShader_Handle (since all writes to this field used that as source)

* Removed commented-out #include's

* Removed duplicate DEF_VSH_* defines, replaced usage by existing X_D3DVSD_*() defines.

* Removed commented-out #include's from src/vsbc

* Removed nearly all "namespace XTL"-wrappers around #includes; Instead, wrap applicable contents of these included files in namespace XTL. Removed all now-obsolete "XTL::" prefixes.

* Moved all host D3D9 symbols outside of namespace XTL (finally!)

* Removed all "using namespace XTL;" occurences (except one, which is marked with a TODO)

* Restored Unix EOL style (to avoid large diffs with upstream)

* Moved CxbxInitAudio outside XTL namespace (this was the last Cxbx* symbol in XTL)

* Removed final "using namespace XTL" occurence by cleaner wrapping of logging intrinsics inside and outside namespace XTL.

* Prefix a few Xbox types with X_ (and avoid compile-error by removing the now-obsolete duplicate of X_D3DCALLBACK).
Also nicely indent all Direct3D9 alias defines, introduced when porting from Direct3D8. Who knows, one day we might re-define them once again to port to more recent Direct3D versions?

* Made EmuXTL.h obsolete, by #include'ing specific headers instead of it.

* Removed unused #include's of EmuFS.h

* Remove #pragma once, when there's already an include guard present.

* Delete EmuXTL.h and XOnline.cpp, keep but disable XOnline.h for documentation purposes.

* Fix all compiler warnings that have no functional impact. What's left requires more research

* Remove GetVersion, retain Wine check
2019-09-24 16:25:52 -05:00
ergo720
0eb57e2578 Remove DBG_PRINTF_EX 2019-06-10 18:51:45 +02:00
Luke Usher
aeca3d3d92 Use standard types from cstdint rather than custom typedefs 2019-03-27 15:54:17 +00:00
Fisherman166
aea3e27ab1 Remove ascii CXBX headers from all source files. 2019-03-02 20:06:24 -08:00
Luke Usher
602efd6d6e Remove upper limit on Xbox Threads: This was a left-over from original Cxbx and is unnecessary 2018-11-22 07:28:37 +00:00
PatrickvL
17fdc8e01d Logging : Renamed DbgPrintf to DBG_PRINTF (it's a macro after all), introduced Ex-tended versions of a few macro's, which accept something else than LOG_PREFIX and removed and/or applied LOG_PREFIX where appropriate. Also applied LOG_CHECK_ENABLED in EmuX86 to avoid slowdowns when X86 debug logging is disabled. 2018-09-24 11:26:30 +02:00
Luke Usher
b00ab30648 Split Symbol scanning and patching phases
This allows for both steps to be completely disconnected, easily
allowing patches to be turned on or off based on a set of flags, as well
as preventing the need to clear the HLE cache when switching from
HLE->LLE.

This also allows patches to be seen/modifed from a central location,
no more searching through the codebase to determine if a function should
be patched or not, and no more 'FUNC_EXPORTS/GetProcAddress' magic!

Currently, this is used for HLE only, but could really shine when
extended to introduce optional detour based logging even when LLE is
enabled.

For example We could easily add a LLE_D3D_DETOUR flag, which when
enabled, patches functions with a wrapper, which simply logs input and
output, calling the original xbox function via a trampoline.

This would be great for debugging, as we'd get a full call trace from
the API level, even when not implementing HLE.

There's also the possibility of mixing in some patches even with LLE
enabled: for a hybrid HLE/LLE solution of the same functionality,
but there are no plans to implement that at this moment of time.
2018-08-28 16:23:53 +01:00
ergo720
82f429f3c9 Fixed LoggedModules bug + refactored log gui + allow to print debug messages also on release builds 2018-08-14 13:50:58 +02:00
ergo720
00ed9cfe00 Allow cxbxr to build with new logging 2018-08-13 20:50:54 +02:00
ergo720
069767174c Huge logging refactoring (doesn't build yet) 2018-08-13 20:50:54 +02:00
RadWolfie
4182df723f Fix to support other compilers by include experimental path 2018-08-08 15:29:35 -05:00
RadWolfie
07a05f0e52 Use settings ini file method (#1370)
* Import SimpleIni module

* Rename XBController to DInputController

Since it's only about configure DirectInput support.

* Append to previous 2 commits

* Initialize Settings class

* Append to previous commit

* Properly use EmuXTL header instead of EmuShared

* Move audio variables into setting class

* Move video variables into Settings class

* Append to previous commit

* Move hack variables into Settings class

* Append previous commit

* Append to third previous commit

* Move xbox controller port map to Settings class

* Append to second previous commit

* Move DirectInput Controller map to Settings class

* Remove old XInput member variable

* Append to second previous commit

* Tiny Fixup

* Remove Load/Save from EmuShared class

* Move both GUI and emulate/core to Settings class

* Oops, append to DirectInput controller's commit(s)

* Fix spaces to tab plus remove useless extra spaces

* Code format fixes

* Fix EmuShared's Set____ function to include const type.

Then "set" functions are supportive for both const and non-const variables.

* Add Sync and GetDataLocation functions to Settings class

* Move include filesystem into root header file.

* Introduce Verify function in Settings class

* Fix old bug for console remains open

* Making some adjustments...

* Append

* Another fix for any output prints crash.

* Add Delete function to Settings class

Plus keep save's file path if has given one.

* Fix LLE_USB to set into Settings class' member variable.

* No longer rely on GUI's end to reset LLE flags for multi-xbe titles.

* Simulate what GUI will do except in standalone kernel mode support.

* Move m_StorageLocation into Settings class as central.

Plus optimization for GetDataLocation function.

* Update sentence...

* Remove m_XbePath from EmuShared class.

Since kernel process is launching by on its own without rely on GUI process.

* Update copyright

* Fix DirectInput config not responding message

* Implement new feature: Bypass running as admin warning message

* Rename Emulate Settings to Core Settings

Plus move AllowAdminPrivilage option to core.

* Add reserve space for Settings' structure to integrate into EmuShared

* Ensure all reserves are set to 0 by default.

* Append to "Rename Emulate Settings to Core Settings" commit

* Fix rebase loss.

* Fix kernel mode process's window screen

* Correction: use bool for allowAdminPrivilege and add a save data

* Few fixes for allowAdminPrivilege

* Implement support to prevent tamper shared memory between GUI processes.

NOTE: Kernel process will be using same shared memory since guiProcessID will remain as 0.

* Various improvement

* Use std library functions
* Use single column spaces for align support on different tab size
* Include failsafe if custom and file path string values are bad format

Apparently ARRAYSIZE isn't define on other compilers.

* Last ARRAYSIZE replacement plus buffer overflow protection

* Replace WinAPI to std library's filesystem

* Revert support for 2+ emulation process at same time.

Emulation's graphic screen has corruption between both windows. Not even a wrapper to D3D9 will fix it.
2018-08-07 08:30:07 +01:00
PatrickvL
bf5061c8f7 D3D : Removed obsolete pushbuffer tracking code 2018-06-07 14:37:18 +02:00
ergo720
e6cc0e62a8 Rebasing 2018-03-20 18:12:46 +01:00
x1nixmzeng
5f3ddf6ee1 Merge https://github.com/Cxbx-Reloaded/Cxbx-Reloaded into cxbx-debugger 2018-02-07 22:05:11 +00:00
PatrickvL
735a4bcfc5
Merge pull request #907 from Voxel9/Settings-Initialize
Implement 'Reset to Defaults' menu feature.
2018-02-07 08:10:27 +01:00
Voxel
d09ebb106b Implement 'Reset to Defaults' menu feature. 2018-02-06 21:22:56 +00:00
CakeLancelot
28907a5b49 Only do debug tracking on debug builds 2018-02-06 12:49:24 -06:00
x1nixmzeng
9a1ae72145 Support for launching the debugger with a F9
Mimics the 'start' functionality by opening the last recently used XBE
if it isn't already
2018-02-01 23:38:19 +00:00
x1nixmzeng
416a3a9a68 Support for naming threads under Windows 2018-01-31 23:17:33 +00:00
ergo720
4c393e8ae1 Overlapped allocations + Chihiro/Debug stuff 2017-12-29 11:41:40 +01:00
RadWolfie
d709723e9d Comment CxbxCheckIntegrity Header Out 2017-11-07 01:37:25 -06:00
RadWolfie
8379cdad10 Log Relative Stuff 2017-11-06 21:05:30 -06:00
PatrickvL
2261039e18 Cherry-picked new color conversion code
Logo's are read with new code
Kept old code in use for textures
2017-09-11 17:54:31 +02:00
Luca D'Amico
48f6c1107a Log all configuration settings during start of emulation (FIX issue #668) 2017-08-19 22:56:48 +02:00
Luke Usher
ef40bcf328 Patch functions are now exported and can be located via GetProcAddress
This is a prerequisite for good HLE Cachine
2017-04-19 16:33:17 +01:00
Henrik Rydgard
bc4ccea18d Avoid including version.h everywhere. Use multiprocessor build. 2017-03-23 21:55:13 +01:00
PatrickvL
a3aad91231 Merged CxbxKrnl.DLL into Cxbx.exe
Fixes issue #202
2017-03-01 15:54:33 +01:00
PatrickvL
d1e0b2b390 Use g_bChihiro in MmClaimGpuInstanceMemory kernel API 2017-01-13 16:31:53 +01:00
PatrickvL
3dc20dfc63 Detect Chihiro XBE's, decode entry points accordingly 2017-01-13 15:38:50 +01:00
PatrickvL
bf7a74b248 DbgPrintf and EmuWarning updates; Changed one into the other where applicable, prefixed GetCurrentThreadId() centrally, removed or added newlines where required. 2017-01-10 17:15:24 +01:00
x1nixmzeng
444524defa Fix for various compile errors when compiling with the LLVM toolset 2017-01-07 18:01:26 +00:00
Luke Usher
cc024e870f Fix compilation in release mode.
_DEBUG_TRACE is undefined in release builds, leading to compiler errors.
2016-11-15 21:45:11 +00:00
PatrickvL
334b98bb0f Updated and extended thunk table
Used Dxbx as a reference
2016-11-11 11:05:05 +01:00
PatrickvL
21ac7bc71d Updated all logging to use new macro's
Removed DbgFunc* variadic macro's.
2016-11-10 23:57:21 +01:00
PatrickvL
b379ca30da WIP 2016-11-10 17:46:49 +01:00
PatrickvL
fb6d6fd321 Got most of the new Dbg macro's working, except the most important one (the call to DbgFuncHexArg) 2016-11-08 17:23:32 +01:00
PatrickvL
1e15027bd0 Small cleanuo, macro's not fully functional yet 2016-11-08 00:45:40 +01:00
PatrickvL
966745cfe6 Renamed DbgFuncArgs to DbgFuncFmtArgs, added DbgFuncHexArgs
DbgFuncHexArgs doesn't need a format string anymore, because of creative
use of macro defines.

Note : This is not tested yet!
2016-11-07 14:56:46 +01:00
PatrickvL
94d3fbbffe Replaced DbgPrintg EmuKrnl with DbgFuncArgs, avoiding typos altogether 2016-11-07 11:38:59 +01:00
PatrickvL
54327cf829 Merge remote-tracking branch 'refs/remotes/LukeUsher/master' 2016-11-07 08:09:05 +01:00
Luke Usher
cfaae52f53 implement automatic versioning based on git status
If the current commit has a tag, the version string will be "Cxbx-Reloaded TAG_NAME (DATE)
If the current commit does not have a tag, the version string will be "Cxbx-Reloaded COMMIT_SHORT_HASH (DATE)"
2016-10-27 09:19:50 +01:00
PatrickvL
23de0a544a tmp 2016-10-21 23:20:56 +02:00
Luke Usher
3d23b9aef0 Rebrand to Cxbx-Reloaded and prepare for initial Proof of Concept release 2016-10-07 17:20:30 +01:00
Luke Usher
f7569a4ce9 Disabled Debug_Alloc as it is causing crashes in debug builds. 2016-04-01 22:59:34 +01:00
Echelon9
964c0038a8 Ensure the Cxbx Kernel .dll is labelled correctly throughout, taking the opportunity to simplify the Release and Debug branches. Bump version number as well. 2012-11-26 01:44:43 +11:00