Commit Graph

1173 Commits

Author SHA1 Message Date
PatrickvL bc4d26f089 Implemented RtlCompareMemory 2016-12-23 17:42:25 +01:00
PatrickvL ceb69874f0 Implemented NtDeleteFile
However scary, this is still required
2016-12-23 17:29:05 +01:00
PatrickvL 70cf10327e Merge pull request #2 from PatrickvL/ExtraLogging
Extralogging
2016-12-23 17:08:32 +01:00
PatrickvL 0fdda33b4d Merge pull request #3 from PatrickvL/OOVPA_Refactoring
Oovpa refactoring
2016-12-23 17:08:24 +01:00
PatrickvL 67cf33b928 Log prefix has to be updated per call after all 2016-12-23 17:06:17 +01:00
PatrickvL 16f7356103 More oovpa cleanup 2016-12-23 16:59:08 +01:00
PatrickvL 8af250f042 Renamed symbols, mainly Native to Host
VolumeLetter into DriveLetter (the official term)
XboxFullPath into XboxDevicePath
NativePath into HostPath / HostDevicePath
NativeRootHandle into HostRootHandle
Also, small improvements to _CxbxConvertFilePath
Added drive A, S and V
2016-12-23 16:21:43 +01:00
PatrickvL 5e61efa03e Oovpa refactoring (#54)
* Cleanup (renames, comments and indenting)

Read GetCurrentProcess() once (g_CurrentProcessHandle further on)
Forwarded KeWaitForSingleObject to KeWaitForMultipleObjects

* Refactored all OOVPA's

* Fixed a few small mistakes

* More oovpa cleanup

XRefOne applied to CDirectSoundStream_SetI3DL2Source_1_0_3936
CDirectSoundVoice_SetHeadroom_1_0_4627 and
IDirectSound_CreateSoundStream_1_0_5849
Removed overlooked folder copy
Indenting/newline fixes
2016-12-23 11:07:24 +00:00
PatrickvL bbb34cd3b6 More oovpa cleanup
XRefOne applied to CDirectSoundStream_SetI3DL2Source_1_0_3936
CDirectSoundVoice_SetHeadroom_1_0_4627 and
IDirectSound_CreateSoundStream_1_0_5849
Removed overlooked folder copy
Indenting/newline fixes
2016-12-23 11:54:52 +01:00
PatrickvL 591fe83b40 Merge remote-tracking branch 'refs/remotes/origin/master' into ExtraLogging 2016-12-23 11:36:38 +01:00
PatrickvL e58b49b022 Merge remote-tracking branch 'refs/remotes/Cxbx-Reloaded/master' into PatrickvL/master 2016-12-23 11:34:37 +01:00
PatrickvL 4971b951a6 Merge remote-tracking branch 'refs/remotes/Cxbx-Reloaded/master' into OOVPA_Refactoring 2016-12-23 11:34:13 +01:00
Ivan Roberto de Oliveira 4eba2e31e3 File information struct conversions (#53)
* Selectively merging fs-experimental into master

In particular, I'm not merging the automatic parent folder creation stuff because I'm not convinced it's the right thing to do

* Implemented more FileInfo converters

This should take care of all types used by NtSet/QueryInformationFile. The remaining types are used by NtQueryDirectoryFile.

* FileName probably needs to be converted

* Fix compilation errors

* Restore string conversion

* Revert NtDeviceIoControlFile

Panzer Dragoon failed the initial XapiVerifyMediaInDrive check due to the changes made to this function. We need proper low level I/O device emulation for this to work.

* Fix XeImageFileName

Helps with Avalaunch initialization. It still crashes further down the
road.

* Comment on XBE location

* Implemented conversions for NtQueryInformationFile and NtQueryFullAttributesFile
2016-12-22 22:25:22 +00:00
Luke Usher ea78ca05d8 Oovpa refactoring (#51)
* Cleanup (renames, comments and indenting)

Read GetCurrentProcess() once (g_CurrentProcessHandle further on)
Forwarded KeWaitForSingleObject to KeWaitForMultipleObjects

* Refactored all OOVPA's

* Fixed a few small mistakes
2016-12-22 20:35:17 +00:00
PatrickvL bd009cdeae Fixed a few small mistakes 2016-12-22 12:01:34 +01:00
Luke Usher ece663f6fe Merge pull request #50 from x1nixmzeng/remove-exe-support
Removed all EXE support
2016-12-22 05:10:25 +00:00
PatrickvL 9675d5ec7b Merge remote-tracking branch 'refs/remotes/Cxbx-Reloaded/master' 2016-12-22 01:20:20 +01:00
PatrickvL 9dacd95cc4 Merge remote-tracking branch 'refs/remotes/Cxbx-Reloaded/master' into OOVPA_Refactoring 2016-12-22 01:15:04 +01:00
PatrickvL 7292e95945 Refactored all OOVPA's 2016-12-22 01:14:35 +01:00
x1nixmzeng 5bbc31029f Removed all EXE support
Very aggressive cull of old Exe support:

Removed GUI for importing/exporting Exe files
Removed GUI for storing Exe history
Removed GUI for Executable Generation
Removed unused EmuExe class
Removed unused Exe registry settings
Removed unused Exe file history
Removed unused standalone Cxbe console app which would no longer compile
2016-12-21 23:58:11 +00:00
Luke Usher af663c8f44 Use IRQL value in the emulated KPCR structure rather than overwriting the Windows TIB structure (#42)
* Use IRQL value in the emulated KPCR structure rather than overwriting the Windows TIB structure.

Note: The entire KPCR is currently per thread, this is not correct as the KPCR should be per-cpu.
The issue here is that the first part of the KPCR, NT_TIB should be per thread.

I haven't figured out a good way to keep that portion per-thread while keeping the rest of the structure global,
that said, it will function fine as long as the same thread calls the IRQL functions.

* Move KPCR fetch code into KeGetPcr();

This exists as a macro on the Xbox, but we implement it as a function because the xbox approach requires FS to point to the KPCR
This isn't possible on 64-bit Windows, even with 32-bit code, so this approach is required.
2016-12-20 21:46:07 +00:00
Luke Usher 73c0b0ca68 Implement XcRC4 functions. (#43)
* Implment XcRC4 functions.

Using a (very slightly) modified version of Cryptlib (The Rc4Context structure has been re-ordered to match the order of elements in the Xbox RC4 context)
https://github.com/WaterJuice/CryptLib

* Use Rc4Xor rather than Rc4Output
2016-12-20 21:45:56 +00:00
PatrickvL 040bdaf904 Merge remote-tracking branch 'refs/remotes/Cxbx-Reloaded/master' into PatrickvL/master 2016-12-20 17:48:19 +01:00
PatrickvL 4e06ac6992 Cleanup (renames, comments and indenting) (#41)
Read GetCurrentProcess() once (g_CurrentProcessHandle further on)
Forwarded KeWaitForSingleObject to KeWaitForMultipleObjects
2016-12-20 16:20:04 +00:00
PatrickvL c1e3b570be Cleanup (renames, comments and indenting)
Read GetCurrentProcess() once (g_CurrentProcessHandle further on)
Forwarded KeWaitForSingleObject to KeWaitForMultipleObjects
2016-12-20 16:51:16 +01:00
PatrickvL 3d88d6f230 Small renames 2016-12-20 15:18:51 +01:00
PatrickvL 0243f44a85 Merge remote-tracking branch 'refs/remotes/Cxbx-Reloaded/master' into PatrickvL/master 2016-12-20 14:26:08 +01:00
PatrickvL b096ca5b08 Forwarded NtPulseEvent to NtDll
Deduplicated declarations.
2016-12-20 14:08:46 +01:00
PatrickvL 3b47ce363b Merge pull request #40 from PatrickvL/ExtraLogging
Extra logging
2016-12-20 13:57:20 +01:00
PatrickvL 7485f2f906 Merge 2016-12-20 13:52:03 +01:00
PatrickvL 570a8743f7 Merge 2016-12-20 13:47:06 +01:00
PatrickvL 95817ba552 Merge remote-tracking branch 'refs/remotes/Cxbx-Reloaded/master' into PatrickvL/master 2016-12-20 13:39:15 +01:00
PatrickvL 2a4158d441 Implemented all kernel Timer functions using NtDLll
Forwarded NtCreateTimer, NtSetTimer, NtQueryTimer, NtCancelTimer to
their respective Nt counterpart.
Declared all required types for this.
Also implemented KeSetEvent minimally.
2016-12-20 13:39:08 +01:00
PatrickvL 4165ea2766 Started logging some flags (#37) 2016-12-19 16:32:09 +00:00
PatrickvL 85d5c87aab Merge branch 'master' of https://github.com/PatrickvL/Cxbx-Reloaded.git 2016-12-19 17:18:43 +01:00
PatrickvL 923d820227 Kernel improvements
New implementations : IoCreateDevice, KeGetCurrentIrql, NtFsControlFile,
RtlMoveMemory, RtlRip

Updated implementations : HalGetInterruptVector, HalReadSMBusValue,
KeInitializeInterrupt, KeRaiseIrqlToDpcLevel, KeSetBasePriorityThread,
MmAllocateContiguousMemory, NtDeviceIoControlFile, NtDuplicateObject
2016-12-19 17:12:54 +01:00
PatrickvL 58d74eea90 Dug up some more xbox kernel signatures and types 2016-12-19 14:56:52 +01:00
PatrickvL ddb21efc5c Started logging some flags 2016-12-19 12:29:43 +01:00
PatrickvL 44f744f88d Merge remote-tracking branch 'refs/remotes/Cxbx-Reloaded/master' into PatrickvL/master 2016-12-19 10:13:06 +01:00
PatrickvL 3f05ebf636 Merge remote-tracking branch 'refs/remotes/LukeUsher/master' 2016-12-16 09:58:10 +01:00
Luke Usher 399e5180fb Merge pull request #33 from StrikerX3/master
A bunch of small things
2016-12-16 08:24:01 +00:00
Luke Usher 36040a771d Re-added XAPI Fiber functions.
I removed these a long time ago, but it turns out our FS/KPCR implementation isn't good enough for these yet
This is unlikely to be fixed until we update our kernel implementation to properly update the Emulated KPCR structure when required and patch out all remaining FS register instructions, currently it just implements enough to get TLS working.

Research into where and when KPCR structure members should be updated.
2016-12-16 08:19:33 +00:00
StrikerX3 094cf8d763 Logging header for KWAIT_REASON 2016-12-15 22:52:16 -02:00
StrikerX3 3800bc6061 Added missing LOGRENDER_ENUM for the KWAIT_REASON enum 2016-12-15 21:25:46 -02:00
StrikerX3 9ba477b811 Merge branch 'master' of github.com:LukeUsher/Cxbx-Reloaded 2016-12-15 19:22:24 -02:00
StrikerX3 953e53f42c Added KWAIT_REASON enum 2016-12-15 19:21:39 -02:00
Luke Usher 23ed63f50d Fix incorrect cases of XRefNotUsed in the HleDatabase 2016-12-15 21:21:04 +00:00
StrikerX3 58b3a424d5 Merge branch 'master' of github.com:LukeUsher/Cxbx-Reloaded 2016-12-15 19:06:16 -02:00
StrikerX3 e780a9f15d Sanitize BOOLEANs too 2016-12-15 18:26:34 -02:00
PatrickvL 5d6abe44a4 Logging improvements: indenting, all enums, hex values 2016-12-15 18:01:17 +01:00