Commit Graph

383 Commits

Author SHA1 Message Date
x1nixmzeng aaed9a18e3 Remove broken capstone library 2018-01-21 15:15:58 +00:00
x1nixmzeng 63bc7749c0 Added Capstone binding library 2018-01-15 00:12:27 +00:00
patrickvl bc091bcbbd Rtl* : Use argument types from xboxkrnl.h instead of standard c types 2018-01-02 23:05:46 +01:00
PatrickvL d60bd90dcb Added (untested) printf kernel API's 2018-01-02 22:37:36 +01:00
PatrickvL 4c3701d2c9
Merge pull request #824 from Luca1991/kernel_stuff
Kernel stuff
2018-01-02 21:30:30 +01:00
ergo720 4c393e8ae1 Overlapped allocations + Chihiro/Debug stuff 2017-12-29 11:41:40 +01:00
ergo720 5d4ee24b0f CleanUp and bug fixes (WIP) 2017-12-17 00:26:50 +01:00
Luke Usher a621f7a8d4 Add IOCTL_DISK_GET_DRIVE_GEOMETRY
This is one of the few IOCTLs required for dashupdate.xbe
2017-11-14 14:02:03 +01:00
Luca D'Amico f38a5c76e7 Implemented KeInitializeDeviceQueue for issue #64 2017-11-12 20:10:08 +01:00
RadWolfie 288ab50e7a Update OpenXDK 2017-11-06 17:04:19 -06:00
Luke Usher 934945d048 Fix DPC bugs: Wrong calling convention was used 2017-08-31 06:12:15 +01:00
Luke Usher c4f2a548f2 Implement FileFsVolumeInformation in NtQueryVolumeInformationFile 2017-07-31 23:36:25 +02:00
Luke Usher e3a19a2a3d Upgrade to DirectX 8.1.
If we're stuck on an older version of DirectX, we might as well use the latest revision ;)
2017-07-29 20:05:54 +01:00
PatrickvL 115ba5ffc6 Update XboxHardwareInfo
Removed macrovision flag, set sensible GPU and MCP revision numbers.
2017-07-20 17:13:27 +02:00
Luke Usher 5f2fc6f04c Add subhook to Cxbx-Reloaded project 2017-07-13 19:46:59 +01:00
Luke Usher 0a30436277 Fix a few kernel APIs that were using _cdecl instead of _stdcall (NTAPI) 2017-07-06 22:45:44 +01:00
Luke Usher 164ca0981d Addressed comments by PatrickvL 2017-07-05 21:27:27 +01:00
Luke Usher 1f10642cb6 Added stubs for All known Ke calls. 2017-07-05 19:56:25 +01:00
Luke Usher 75ec726074 HalEnableSystemInterrupt is type VOID. 2017-06-22 20:04:07 +01:00
Luke Usher 4989dc6b18 Implement PhyGetLinkState 2017-06-20 21:06:53 +01:00
Luke Usher a5c4ae01a6 Removed deprecated dinput and dsound libraries.
The up-to-date versions in the Windows SDK will now be used instead
2017-05-13 22:40:26 +01:00
Luke Usher c463af91b2 Merge branch 'crypto-fixes' of http://github.com/lukeusher/cxbx-reloaded into crypto-fixes 2017-03-27 11:39:00 +01:00
Luke Usher cd41fcd6ec Amendments 2017-03-27 11:38:39 +01:00
PatrickvL aff8808fbc Update xbox.h 2017-03-27 11:16:08 +02:00
Luke Usher 856e1ba873 Implement support for real Xbox keys 2017-03-26 22:56:17 +01:00
Luke Usher f46f77c3ad Initial MemoryManager Implementation 2017-03-23 21:47:19 +00:00
PatrickvL 2d4d3d1a6e Logging split between PAGE and MEM flags 2017-03-21 14:26:31 +01:00
PatrickvL d333087098 Constantified PAGE_SIZE and PAGE_MASK 2017-03-20 13:56:56 +01:00
Luke Usher 86dfc06720 Add a proper implementation for NtUserIoApcDispatcher 2017-03-14 14:32:34 +00:00
PatrickvL 53b562704c Kernel : Added KeSynchronizeExecution and KeTestAlertThread stubs 2017-03-10 11:26:12 +01:00
PatrickvL 20e9cd0131 Kernel : AvSendTVEncoderOption expanded with all possible options 2017-02-26 02:43:25 +01:00
PatrickvL 13619ae0bb Kernel : Fixed ExSaveNonVolatileSetting, centralized EEPROM structs and read/write them via HalReadSMBusValue/HalWriteSMBusValue 2017-02-23 12:25:17 +01:00
PatrickvL db3f80fd0f Kernel : Implemented KeInitializeMutant 2017-02-21 01:49:10 +01:00
PatrickvL 0b027f89ec Kernel : Implemented KeInitializeApc 2017-02-21 01:30:57 +01:00
PatrickvL 3700207a84 Merge remote-tracking branch 'origin/master' 2017-02-20 18:16:30 +01:00
PatrickvL 94c980d7fd Kernel : KeConnectInterrupt and KeDisconnectInterrupt improvements - Countrary to prior research, IRQ's cannot be shared
Also signature fix on HalDisableSystemInterrupt and
HalEnableSystemInterrupt
2017-02-20 18:13:38 +01:00
PatrickvL 2cbc7a7086 Kernel : Stubbed KeResumeThread and KeSuspendThread 2017-02-19 01:22:54 +01:00
PatrickvL 0b03a44959 Kernel : Stubbed KeRestoreFloatingPointState and KeSaveFloatingPointState 2017-02-19 01:03:41 +01:00
PatrickvL 70b6fcac5a Kernel : Implemented PsQueryStatistics partially 2017-02-19 00:47:30 +01:00
PatrickvL 904ae0d0c4 Kernel : Added stubs for RtlEnterCriticalSectionAndRegion and RtlLeaveCriticalSectionAndRegion 2017-02-19 00:18:15 +01:00
PatrickvL a058b6679e Kernel : Fixed arguments to XProfpControl and XProfpGetData 2017-02-18 23:39:57 +01:00
PatrickvL 430516601d Kernel : Corrected and (partially) implemented ExfInterlockedInsertHeadList, ExfInterlockedInsertTailList and ExfInterlockedRemoveHeadList 2017-02-18 19:10:43 +01:00
PatrickvL 1c8689990e Kernel : Implemented ExInitializeReadWriteLock, KeInitializeQueue and KeInitielizeSemaphore 2017-02-18 18:50:53 +01:00
Luke Usher fb5ee938ec Merge pull request #170 from LukeUsher/appveyor-builds
Initial appveyor build scripts
2017-02-15 20:38:57 +00:00
Luke Usher 862e53e2d3 Initial appveyor build scripts 2017-02-15 20:37:47 +00:00
PatrickvL afb4a5cbbb Described more Cxbx FS-patching backgroud information 2017-02-14 11:16:35 +01:00
PatrickvL 9266a22eae Kernel : Added KeRaiseIrqlToSynchLevel stub
Also moved code around and added more comments.
2017-02-13 15:03:09 +01:00
PatrickvL 3313c1c8d8 TIB and FS related cleanup and a few additional comments 2017-02-13 12:18:05 +01:00
PatrickvL 7ed9893a77 Kernel : Corrected and implemented ObReferenceObjectByPointer 2017-02-06 14:12:25 +01:00
PatrickvL 4daff59e1b Kernel : Added ObfReferenceObject stub (the last thunk for Ob*) 2017-02-06 13:58:13 +01:00
PatrickvL ee283ecaa5 Kernel : Added ObReferenceObjectByPointer stub 2017-02-06 13:54:50 +01:00
PatrickvL 8111990205 Kernel : Added ObReferenceObjectByName stub 2017-02-06 13:53:25 +01:00
PatrickvL f79b82a4b3 Kernel : Added ObOpenObjectByPointer stub 2017-02-06 13:51:32 +01:00
PatrickvL d37f06d25b Kernel : Added ObMakeTemporaryObject stub 2017-02-06 13:48:30 +01:00
PatrickvL c0c55ca461 Kernel : Added ObInsertObject stub 2017-02-06 13:46:27 +01:00
PatrickvL 1b71c925f6 Kernel : Added ObCreateObject stub 2017-02-06 13:42:44 +01:00
PatrickvL 258ee34ff5 xboxkrnl : Added KMUTANT struct and comment headers 2017-02-06 13:22:34 +01:00
PatrickvL 92d83306be xboxkrnl: Expanded OBJECT_TYPE struct, updated all occurrences 2017-02-06 13:09:30 +01:00
PatrickvL 156fa48f6d xboxkrnl : Added OBJECT_TYPE struct 2017-02-06 12:10:00 +01:00
PatrickvL 6b9ab6a635 Renamed an argument and comment update 2017-02-06 11:26:51 +01:00
PatrickvL 174c397233 Implemented KeIsExecutingDpc, KeCancelTimer and KeDisconnectInterrupt
Also commented a few functions, and replaced a few magic numbers by
constants.
2017-02-02 18:32:18 +01:00
PatrickvL d441c9ce0e Extended KOBJECTS enum 2017-02-02 17:48:35 +01:00
PatrickvL 57e4f3570a At last introduced KeInterruptTime, used it in KeQueryInterruptTime (which is now protected against overflow)
Also fixed EmuThreadDpcHandler by applying CONTAINING_RECORD to DpcQueue
(DPC's do seem to get called now)
2017-02-01 20:59:32 +01:00
PatrickvL c540b3580c Kernel : Added KeRemoveQueueDpc and KeResetEvent
Fixed and completed KeInitializeEvent, KeInsertQueueDpc and KeSetTimerEx
Also ported LIST_ENTRY methods over from Dxbx and applied where possible
2017-02-01 11:49:38 +01:00
PatrickvL 979bcaaf76 Added incomplete version of KeInitializeEvent
Requires InitializeListHead
2017-01-31 17:14:09 +01:00
PatrickvL 5acc167a07 distorm starts to work 2017-01-09 18:27:32 +01:00
PatrickvL a6ec272604 merge 2017-01-09 15:23:25 +01:00
x1nixmzeng 996f71a6df Added stb_image for image decoding 2017-01-07 20:12:38 +00:00
x1nixmzeng ca965c9ea6 Removed libjpeg library 2017-01-07 19:43:04 +00:00
Luke Usher 3a59895402 Merge pull request #86 from x1nixmzeng/kernel-thunks
Io Kernel API stubs for logging
2017-01-07 18:36:12 +00:00
x1nixmzeng 1b96e452bc IofCompleteRequest stub 2017-01-07 13:57:25 +00:00
x1nixmzeng a962f33878 IofCallDriver stub 2017-01-07 13:53:49 +00:00
x1nixmzeng 9ab7947b10 IoMarkIrpMustComplete stub 2017-01-07 13:47:46 +00:00
x1nixmzeng 673b1d9e9a Fixed issues raised by @PatrickvL 2017-01-07 13:32:16 +00:00
x1nixmzeng b27a466b5f IoSynchronousFsdRequest stub 2017-01-07 02:26:04 +00:00
x1nixmzeng 2107c54fb8 IoSynchronousDeviceIoControlRequest stub 2017-01-07 02:20:10 +00:00
x1nixmzeng 3a3430381a Stubs for IoStartNextPacket, IoStartNextPacketByKey, IoStartPacket 2017-01-07 02:13:36 +00:00
x1nixmzeng 7d606c774d IoSetShareAccess stub 2017-01-07 01:57:34 +00:00
x1nixmzeng 3db796f461 IoSetIoCompletion stub 2017-01-07 01:51:14 +00:00
x1nixmzeng 5183b6e1df IoRemoveShareAccess stub 2017-01-07 01:44:03 +00:00
x1nixmzeng e25754ae17 IoQueueThreadIrp stub 2017-01-07 01:39:59 +00:00
x1nixmzeng d551304b9c IoQueryVolumeInformation stub 2017-01-07 01:35:48 +00:00
x1nixmzeng 74afee069e IoQueryFileInformation stub 2017-01-07 01:14:51 +00:00
x1nixmzeng e032edeee2 IoInvalidDeviceRequest stub 2017-01-07 01:10:30 +00:00
x1nixmzeng df3aac9731 IoInitializeIrp stub 2017-01-07 01:06:03 +00:00
x1nixmzeng 50c945ed3b IoFreeIrp stub 2017-01-07 00:56:24 +00:00
x1nixmzeng d79ff8e7cb IoDeleteDevice stub 2017-01-07 00:27:29 +00:00
x1nixmzeng 6bf0d128a5 Fixed existing Io thunk comments 2017-01-07 00:21:16 +00:00
x1nixmzeng b9d12c5182 IoCheckShareAccess stub 2017-01-07 00:14:56 +00:00
x1nixmzeng 2feda48514 IoBuildSynchronousFsdRequest stub 2017-01-06 23:34:23 +00:00
x1nixmzeng 2dd8488607 IoBuildDeviceIoControlRequest stub 2017-01-06 23:29:26 +00:00
x1nixmzeng f01c92afdb IoBuildAsynchronousFsdRequest stub 2017-01-06 23:24:00 +00:00
x1nixmzeng 7acd574f15 IoAllocateIrp stub 2017-01-06 23:18:12 +00:00
Luke Usher dc6ca7661a Implemented HalReadWritePciSpace
On the Xbox this function calls the X86 in/out opcodes, so this implementation calls IORead/IOWrite functions in EmuX86.
Once In/Out opcodes are implemented, they will also be implemented by calling these new IO functions.
2017-01-06 22:16:00 +00:00
Luke Usher f184baade9 Add glew binaries & add a custom build step to copy them to the output directory.
Prevents glew32.dll errors on compiling
2017-01-05 20:52:18 +00:00
PatrickvL e9267222ad Implemented KeConnectInterrupt
Also prevented unimplemented log message in MmClaimGpuInstanceMemory and
added comment headers to all function declarations in kernel.h
2017-01-05 11:21:15 +01:00
PatrickvL 409ef63176 Merge remote-tracking branch 'refs/remotes/origin/master' into LLE_OpenGL 2017-01-04 15:41:13 +01:00
PatrickvL 095fbd1010 Fixed logging of nullptr (plus better logging in RtlAssert) 2017-01-04 15:34:18 +01:00
PatrickvL c9e8176c6c Merge remote-tracking branch 'refs/remotes/Cxbx-Reloaded/master' into LLE_OpenGL 2017-01-04 14:38:06 +01:00
PatrickvL eff09f89ea Review results on Xc* kernel functions 2017-01-04 14:35:20 +01:00
Luke Usher 2fa170a96c Merge pull request #77 from LukeUsher/PVS-Studio
Enable the use of PVS-Studio (Static Code Analysis Tool)
2017-01-04 05:59:51 +00:00
x1nixmzeng 47e04465a1 Added unimplemented stubs for remaining Xc functions 2017-01-03 23:14:52 +00:00
Luke Usher a7bc9adc86 Enable the use of PVS-Studio (Static Code Analysis Tool) for Cxbx-Reloaded.
These comments activate the free for Open Source license for PVS Studio
See http://www.viva64.com/en/b/0457/ for more details.
2017-01-03 20:29:44 +00:00
PatrickvL d3e805260f Imported glew
Downloaded from
https://sourceforge.net/projects/glew/files/glew/2.0.0/glew-2.0.0-win32.zip/download
(see http://glew.sourceforge.net/index.html)

GitHub mirror on https://github.com/nigels-com/glew
2017-01-03 16:23:05 +01:00
PatrickvL 9ad4449ef9 Emulated EEPROM read/write
Implemented ExQueryNonVolatileSetting and ExSaveNonVolatileSetting using
emulated EEPROM values.
2017-01-03 12:17:20 +01:00
PatrickvL 9459a2d04f Implemented KeLeaveCriticalRegion 2016-12-31 17:31:17 +01:00
PatrickvL c4a61bcf02 Implemented KeEnterCriticalRegion 2016-12-31 17:28:43 +01:00
PatrickvL 29a76be994 Implemented NtQueryMutant 2016-12-31 17:18:21 +01:00
PatrickvL 3516ce8e75 Replaced Zydis with distorm 2016-12-30 18:40:44 +01:00
PatrickvL 6ac5b06bbc Renamed EEPROM_INDEX to XC_VALUE_INDEX
Started porting over all Dxbx Io* kernel signatures
2016-12-30 14:28:52 +01:00
PatrickvL 1e639d98af Implemented RtlUshortByteSwap 2016-12-26 19:51:22 +01:00
PatrickvL 9383e9f6a9 Implemented RtlUpperString 2016-12-26 19:47:35 +01:00
PatrickvL 0c31aeddb4 Implemented RtlUpperChar 2016-12-26 19:41:55 +01:00
PatrickvL cdd8b4dc93 Implemented RtlUpcaseUnicodeToMultiByteN 2016-12-26 19:39:57 +01:00
PatrickvL e01102d8d3 Implemented RtlUpcaseUnicodeString 2016-12-26 18:51:08 +01:00
PatrickvL 6f8a8a728a Implemented RtlUpcaseUnicodeChar 2016-12-26 18:10:20 +01:00
PatrickvL 5e243062d5 Implemented RtlUnicodeToMultiByteSize 2016-12-26 18:02:24 +01:00
PatrickvL a847c1d45c Implemented RtlUnicodeToMultiByteN 2016-12-26 17:45:33 +01:00
PatrickvL c009ff8eb4 Implemented RtlUnicodeStringToInteger 2016-12-26 17:38:49 +01:00
PatrickvL 75eab7a83d Implemented RtlUlongByteSwap 2016-12-26 17:32:08 +01:00
PatrickvL 6a1ae1e42f Implement RtlMultiByteToUnicodeSize 2016-12-26 17:26:30 +01:00
PatrickvL 6b2fa8f984 Implement RtlMultiByteToUnicodeN 2016-12-26 17:21:28 +01:00
PatrickvL d804711bab Implemented RtlMapGenericMask 2016-12-26 16:59:46 +01:00
PatrickvL 023261faf3 Implemented RtlIntegerToUnicodeString 2016-12-26 16:36:27 +01:00
PatrickvL ab33052f5c Implemented RtlIntegerToChar 2016-12-26 16:29:38 +01:00
PatrickvL b1cbc31c1b Implemented RtlFreeUnicodeString 2016-12-26 16:19:50 +01:00
PatrickvL 39a5c64786 Implemented RtlFillMemoryUlong 2016-12-26 16:14:58 +01:00
PatrickvL eb841563de Implemented RtlFillMemory 2016-12-26 13:44:44 +01:00
PatrickvL 7ced0be9e1 Implemented RtlExtendedMagicDivide 2016-12-26 13:33:51 +01:00
PatrickvL bcd6b98764 Implemented RtlExtendedLargeIntegerDivide 2016-12-26 13:28:51 +01:00
PatrickvL fbd7bfdba5 Implemented RtlExtendedIntegerMultiply 2016-12-26 13:23:00 +01:00
PatrickvL dc3d4beaa0 Implemented RtlEqualUnicodeString 2016-12-26 13:05:56 +01:00
PatrickvL 8509e97ed9 Implemented NtQueryEvent 2016-12-24 01:20:26 +01:00
PatrickvL 50d449d378 Implemented NtQuerySemaphore 2016-12-24 01:04:54 +01:00
PatrickvL 440fa2aa48 Implemented RtlDowncaseUnicodeString 2016-12-23 18:37:32 +01:00
PatrickvL 41d393bfe0 Implemented RtlDowncaseUnicodeChar 2016-12-23 18:31:57 +01:00
PatrickvL 183161f4db Implemented RtlCreateUnicodeString 2016-12-23 18:25:49 +01:00
PatrickvL 91cdf3e046 Implemented RtlCopyUnicodeString) 2016-12-23 18:20:54 +01:00
PatrickvL 2d9c0016ca Implemented RtlCopyString 2016-12-23 18:15:27 +01:00
PatrickvL 90363fcf75 Implemented RtlCompareUnicodeString 2016-12-23 18:03:31 +01:00
PatrickvL 5a64d38256 Implemented RtlCompareString 2016-12-23 17:57:58 +01:00
PatrickvL ee4573bd44 Implemented RtlCompareMemoryUlong 2016-12-23 17:48:08 +01:00
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
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 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 570a8743f7 Merge 2016-12-20 13:47:06 +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 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
StrikerX3 953e53f42c Added KWAIT_REASON enum 2016-12-15 19:21:39 -02:00
Luke Usher 90ca700df2 Implement one execution path (AV_QUERY_AV_CAPABILITIES) of AvSendTvEncoderOption 2016-12-14 21:38:26 +00:00
PatrickvL 78856b08a2 Let FscGetCacheSize return what FscSetCacheSize set
No actual file system cache page allocation though...
2016-12-13 16:44:04 +01:00
PatrickvL 553db2dc2d Implemented KeQueryInterruptTime 2016-12-12 17:56:29 +01:00
PatrickvL e6bae132b7 Implemented PsSetCreateThreadNotifyRoutine
Used EmuXRegisterThreadNotifyRoutine as a reference
2016-12-12 17:34:08 +01:00
PatrickvL 7e42995d91 Make PsCreateSystemThread use a placeholder instead of NULL
Also removed no-op EmuCleanupFS()
2016-12-12 17:11:04 +01:00
PatrickvL a6591ae07c Added PsCreateSystemThread as forward to PsCreateSystemThreadEx (which had to be corrected)
Also moved NtStatusToString to EmuFile.cpp.
Forwarded KeBugCheck to KeBugCheckEx, NtWaitForSingleObject,
NtWaitForSingleObjectEx and NtWaitForMultipleObjectsEx to
KeWaitForMultipleObjects (in which all implementation we have thus far,
is now concentrated).
2016-12-12 16:15:04 +01:00
PatrickvL 68d60d0cb2 Applied all possible forwards, extended OBJECT_TYPE, added NtOpenDirectoryObject and ObOpenObjectByName stubs 2016-12-11 22:49:35 +01:00
PatrickvL b37b1bdeaa Copied over a few declarations from https://github.com/xqemu/nxdk 2016-12-10 19:26:28 +01:00
PatrickvL 65b00fa856 Added IoDismountVolume stub
Also added the types needed for it's arguments.
2016-12-10 18:10:49 +01:00
PatrickvL 6071e81ebf Copied over Dxbx comments and NtWriteFile signature 2016-12-02 18:07:03 +01:00
PatrickvL 8bfe7bc426 Prevent naming collisions on kernel symbols using a KRNL() macro 2016-12-02 17:31:34 +01:00
PatrickvL 14427e9996 Added MmClaimGpuInstanceMemory implementation 2016-12-02 15:43:23 +01:00
PatrickvL 3dd16ce418 Added remaining Mm* kernel functions
Introduced and used VOLATILE define
Removed using namespace xboxkrnl
Fixed ambiguous warnings
2016-12-02 10:38:46 +01:00
Luke Usher 56185eed5f Fix compilation of Interlocked API
This was achieved by prefixing XboxKrnl functions with Xb to prevent a name conflict with WinNT.h
Additionally, rather than importing native Interlocked functions from NTDLL, we use the versions defined in WinNT.h
2016-12-01 22:03:48 +00:00
PatrickvL f1c03d9909 Merge remote-tracking branch 'refs/remotes/LukeUsher/master' 2016-12-01 18:01:29 +01:00
PatrickvL 9c821d09c0 Added more kernel stubs
Also applied FASTCALL define. Failed attempt to add Interlocked API's
(VC++ complains about undefined intrinsics or something like that).
2016-12-01 18:01:16 +01:00
Luke Usher 1f5d71f7c4 Add stub for KeCancelTimer 2016-11-30 20:13:15 +00:00
Luke Usher 6899be5a0b Implement KeStallExecutionProcessor 2016-11-30 20:04:11 +00:00
PatrickvL 8322532863 Merge remote-tracking branch 'refs/remotes/LukeUsher/master' 2016-11-29 09:33:03 +01:00
Luke Usher 5d469d9188 Add stubs for ObReferenceObjectByHandle, ObDereferenceObject and KeSetBasePriority
Crash Bandicoot now sits on the loading screen forever, but it doesn't crash, so that's progress, I guess
2016-11-29 06:58:30 +00:00
Luke Usher 574977bf2f Implement XcHMAC
Dashboard no longer crashes when going into the System Information menu option
2016-11-28 20:15:06 +00:00
PatrickvL 3922e44386 Added RtlCharToInteger
Also sorted EXTERN's and IMPORT's, removed end-of-line-spaces and two
incorrect LOG_UNIMPLEMENTED occurances.
2016-11-28 18:22:25 +01:00
Luke Usher 7323a2c711 KfLower/RaiseIrql should be fastcall, not stdcall.
Add implementation for KeRaiseIrql from ReactOS as it seems to be identical to the Xbox implementation.
We may not be able to do the same for KfLowerIrql though, the implementation looks (slightly) different to me.
2016-11-26 22:07:11 +00:00
PatrickvL 740f1ae8af More Ex* signature fixes 2016-11-25 22:47:40 +01:00
PatrickvL 0a31daeb27 Added typedef (P)ERWLOCK 2016-11-25 22:25:01 +01:00
PatrickvL bb1da9bca9 Updated Ps* signatures 2016-11-25 22:24:32 +01:00
PatrickvL ed93832a71 Updated Ex* signatures 2016-11-25 22:24:19 +01:00
PatrickvL 3dd0a8fa8e Remove LONGBOOL - a Delphi Dxbx derelict
Also corrected return type of HalDisableSystemInterrupt to VOID
2016-11-24 16:32:16 +01:00
PatrickvL a0e9bc9724 Added a few UNIMPLEMENTED Ke* functions 2016-11-23 23:42:08 +01:00
PatrickvL 61b59a7931 Applied __fastcall calling convention where appropriate. 2016-11-23 17:35:09 +01:00
PatrickvL f4a4026a03 Added UNIMPLEMENTED stubs for all remaining Hal* kernel functions 2016-11-23 17:34:57 +01:00
PatrickvL 2522524c4e Added UNIMPLEMENTED stubs for al Ex* kernel functions 2016-11-21 16:16:24 +01:00
PatrickvL 5640d74248 Slowly working my way through adding UNIMPLEMENTED skeletons
Rtl* functions can be passed-through to host - as soon as headers are
defined...
2016-11-16 01:43:10 +01:00
PatrickvL 456c5b1c1f Added UNIMPLEMENTED skeletons for remaining Av* and Dbg* kernel entries 2016-11-16 00:34:49 +01:00
PatrickvL 3ade9fce9d Couple the xbox thunks for xboxkrnl::KeInterruptTime and xboxkrnl::KeSystemTime to their actual counterparts on Windows
This way we won't have to spend any time on updating them ourselves, and
still get highly accurate timers!

(Untested. Ported back from Dxbx)
2016-11-14 18:18:12 +01:00
PatrickvL ae9d663af3 Added more variables to the kernel thunk table
Last two variables yet to replace : KeInterruptTime, KeSystemTime
2016-11-13 00:59:47 +01:00
PatrickvL 0df04c2f45 Added a few more variables to the kernel thunk table 2016-11-13 00:46:56 +01:00
PatrickvL 4b710b79a5 This too (is becoming a habit) 2016-11-12 23:54:57 +01:00
PatrickvL 82d36a2470 Corrected a few OpenXDK declarations so they can compile into the kernel thunk table. 2016-11-12 23:54:26 +01:00
PatrickvL d411f1364f Added MmGlobalData, registered in kernel thunk table 2016-11-12 01:27:06 +01:00
PatrickvL 4f7a233391 EXPORTNUM corrections 2016-11-11 11:49:05 +01:00
Luke Usher 52673a5ceb Add dummy implementation for MmLockUnlockBufferPages 2016-10-26 17:07:37 +01:00
Luke Usher c6426b1209 Initial implementation of ExQueryPoolBlockSize
This is not completely correct. but will do for now.
In order to be correct, it will be required to set up a proper pool entry object in ExAllocatePoolWithTag
2016-10-24 21:27:19 +01:00
Luke Usher 72c8acbaf9 Add implementations for KeWaitForMultipleObjects & KeWaitforSingleObject
Add additional nullptr checks within Critical Section emulation
2016-10-23 20:07:27 +01:00
Luke Usher ac7c4a3c8c Add binaries for Zydis, that way there is no need to use CMake to build Cxbx 2016-10-06 08:53:54 +01:00
Luke Usher 0f7ddacfd4 Hmm, this is preperation for something... I wonder what it might be ;) 2016-10-06 08:51:00 +01:00
Luke Usher a160db2c72 XApiVerifyMediaInDrive now passes validation without patches 2016-09-30 06:45:47 +01:00
Luke Usher 08efaf9e53 Implement Partition0 support
Adding some kernel functions in preparing to remove more XAPI patches
2016-09-29 12:24:23 +01:00
Luke Usher d142b3ae0e Dashboard works again 2016-09-28 20:47:09 +01:00