gibbed
919d84ad73
Fixed ToXdkProtectFlags returning bad protection flags when
...
nocache/writecombine were present.
2016-06-20 11:27:53 -05:00
Dr. Chat
23b2e25fb8
XThread: Don't release ourselves before calling thread_->Terminate!
2016-06-18 20:58:58 -05:00
gibbed
dcd71c1613
Fixing format_core for %hc/%hC/%wc/%wC/%hs/%hS/%ls/%lS/%ws/%wS type specifiers.
2016-06-18 19:24:49 -05:00
gibbed
85e38b7657
Invalidate physical memory passed to NtReadFile.
2016-06-18 18:26:23 -05:00
gibbed
096febb3bb
Oops. Unbreaking shim_utils.h.
2016-06-18 14:02:38 -05:00
gibbed
4fc3bdf213
Fixed AppendParam for X_EX_TITLE_TERMINATE_REGISTRATION,
...
X_EXCEPTION_RECORD.
Added AppendParam for X_OBJECT_ATTRIBUTES.
2016-06-18 13:44:52 -05:00
gibbed
2d60d6f672
Split out trampoline generation to make it reusable.
2016-06-18 13:41:49 -05:00
gibbed
8ea9aea84c
Actually there's yet one more argument to VdInitializeScalerCommandBuffer.
2016-06-18 08:16:49 -05:00
gibbed
890a0513ef
Tagged NtSetInformationFile as high frequency.
2016-06-18 08:03:19 -05:00
gibbed
f39eb9f047
Tagged NtReadFile as high frequency.
2016-06-18 08:02:18 -05:00
gibbed
9477cef006
Corrected offset in comment for X_DISPLAY_INFO.
2016-06-18 08:00:41 -05:00
gibbed
b12579c64c
Fixed arguments to VdInitializeScalerCommandBuffer.
2016-06-18 08:00:09 -05:00
Dr. Chat
27c16b1936
GPU: Fix incorrectly calculating the primary ringbuffer's size
2016-06-16 21:30:06 -05:00
Dr. Chat
2512a6360e
Pass the physical frontbuffer address into the CP
2016-03-17 21:55:47 -05:00
Ben Vanik
cd02cdfc70
Making memory API less error prone; fixes buffer/constant uploads.
2016-02-20 19:19:29 -08:00
Ben Vanik
c667dfc596
Don't put kernel stacks in GPU memory.
2016-02-16 15:05:11 -08:00
sephiroth99
205f64eb8b
Fix compilation with VS2015 Update 2 CTP
2016-02-11 23:47:11 -05:00
Dr. Chat
bf2c3d34da
Fix XMAInitializeContext is_stereo flag.
2016-01-30 13:04:52 -06:00
Dr. Chat
9b1e6d6cb3
Resolve a module name to its full path before comparing names.
2016-01-24 09:50:48 -06:00
sephiroth99
a74c88851b
Rework RtlTime with portable time conversion functions
2016-01-20 12:26:49 -05:00
sephiroth99
bf910c2d9a
Add missing definitions for XAPC constants
...
Fixes linking errors for these symbols.
2016-01-20 11:26:35 -05:00
Ben Vanik
6777ce6668
Reconcile debugger and save state stuff into a single implementation.
...
Fixes #497 and fixes #496 .
Still rough edges, but at least less duplication.
2016-01-18 11:48:21 -08:00
Dr. Chat
bd6bf16bd1
New flag: disable_global_lock - Disables global lock usage in guest code.
2016-01-13 19:40:00 -06:00
Ben Vanik
9c93fa5187
Cleaning up xdbf stuff.
...
- moving next to xex utils
- fixing error cases around icon setting (and allowing reset)
- making C++11
- abstracting a bit so future additions will be easier
- fixing non-xex uses
2016-01-10 11:04:55 -08:00
Ben Vanik
86b706d87c
Merge pull request #509 from x1nixmzeng/xex-resources
...
Rebrand the Xenia window with module metadata
2016-01-10 08:55:47 -08:00
x1nixmzeng
6530b9dc49
Added callback when new module is launched
...
This avoids having to guess the display window title format
Also manually fixed the linting errors picked out by travis which do not
get picked up using xb format locally
2016-01-09 17:36:46 +00:00
x1nixmzeng
06f259c87d
Mask the name index instead
...
The maximum number of import libraries (32) is already asserted
2016-01-09 02:43:29 +00:00
x1nixmzeng
7e4fdf7669
Fixed rare crash when accessing library import by name
...
The library name index may only be 8-bits.
This bug was not present in the previous implementation due to a bitmask
(0xFF) - see
ea99ba8e3b/src/xenia/kernel/util/xex2.cc (L272)
2016-01-09 01:19:05 +00:00
x1nixmzeng
321e2d8873
Set the window title from the module resource pool
2016-01-07 00:58:05 +00:00
Ben Vanik
c8b544ffd4
Fixing casts. This is why I need tests.
2016-01-01 12:45:06 -08:00
Ben Vanik
8770e6e6cf
Adding yaml-cpp for #428 , use rando fork until jbeder/yaml-cpp#342 lands.
2016-01-01 12:13:36 -08:00
Ben Vanik
207b835386
I have a dream that one day compilers will agree.
2016-01-01 19:19:18 +00:00
Ben Vanik
2f012fb56d
Though I disagree with these lint fixes, I want travis to shut up.
2016-01-01 18:38:20 +00:00
Ben Vanik
b02ca62388
Fixing most remaining C++ warnings in clang.
2016-01-01 18:37:33 +00:00
Ben Vanik
95d3a9c345
Minor clang warning fixes.
2016-01-01 06:01:22 +00:00
Ben Vanik
f26bea88d9
Replacing zlib with snappy in traces, adding trace header, docs.
2015-12-30 22:58:22 -08:00
Ben Vanik
952d35911c
Folding build_tools back into the main repo for simplicity.
2015-12-30 16:53:14 -08:00
Ben Vanik
0482ffad5a
Allow XMA decoder to be suspended.
2015-12-30 16:53:13 -08:00
Dr. Chat
2a590f31fe
XFile: Track asynchronous/synchronous flag (and return appropriately in nt Read/Write file)
2015-12-30 17:36:05 -06:00
Ben Vanik
3ca0bff246
Avoid duplicate object handle assignment on creation.
2015-12-29 14:03:23 -08:00
Ben Vanik
948aa2400d
Formatting all code. Too gnarly to rebase properly.
2015-12-29 13:13:34 -08:00
Dr. Chat
4e7dfa477b
Assign XModule path on load rather than in the constructor
2015-12-29 13:10:03 -08:00
Dr. Chat
c242a01043
Mark XThreads as running before calling Execute
2015-12-29 13:10:02 -08:00
Dr. Chat
6108ff1608
Use a 64-bit bitmap rather than a 32-bit bitmap.
2015-12-29 13:10:02 -08:00
Dr. Chat
764dcba75a
Update TLS comments
2015-12-29 13:10:01 -08:00
Dr. Chat
5cb591b993
Compensate for static TLS when accessing dynamic TLS.
2015-12-29 13:10:01 -08:00
Dr. Chat
bca5fb5382
XThread acquire mutants on restore
2015-12-29 13:10:00 -08:00
Dr. Chat
5c94062110
XFile setup async_event_ in the restore constructor
2015-12-29 13:10:00 -08:00
Dr. Chat
fefc2036b3
Fix XSemaphores saving/restoring a bad counter
2015-12-29 13:09:59 -08:00
Dr. Chat
d4da8cab4e
BitMap: Change the size param to the number of entries (bits)
2015-12-29 13:09:59 -08:00
Dr. Chat
eee0bb070c
Store thread TLS in guest memory rather than using host APIs
2015-12-29 13:09:58 -08:00
Dr. Chat
bb5fd73b9e
Register user-modules with the kernel in UserModule::Restore
2015-12-29 13:09:57 -08:00
Dr. Chat
2855036f72
Remove modules from the object table if they fail to load.
2015-12-29 13:09:57 -08:00
Dr. Chat
3e6c70defa
Fixup UserModule::LoadFromFile to use new vfs API
2015-12-29 13:09:56 -08:00
Dr. Chat
f4154810b6
XamModule::LoaderData::launch_data_present
2015-12-29 13:09:56 -08:00
Dr. Chat
68f9949829
Make XObject::GetWaitHandle a protected function
2015-12-29 13:09:55 -08:00
Dr. Chat
8f92c60a0b
ObCreateSymbolicLink/ObDeleteSymbolicLink
2015-12-29 13:09:54 -08:00
Dr. Chat
ab9fac9a98
XMutant Save/Restore
2015-12-29 13:09:53 -08:00
Dr. Chat
5aff9d12ee
Call XObject::WaitCallback on successful waits
2015-12-29 13:09:52 -08:00
Dr. Chat
d0f547020a
XamLoaderLaunchData: Fix incorrect return values when launch data is not present.
2015-12-29 13:09:52 -08:00
Dr. Chat
f5237d486a
KernelState::TerminateTitle - Release the global lock in smaller regions / No need for an argument specifying if called from guest
2015-12-29 13:09:51 -08:00
Dr. Chat
366f91e191
XFile Save/Restore
2015-12-29 13:09:51 -08:00
Ben Vanik
383a173a18
REBASE: fixing xthread instruction decoding.
2015-12-29 13:09:50 -08:00
Dr. Chat
bcacb9b127
Remove vfs dependency on kernel, implement I/O completion ports
2015-12-29 13:09:50 -08:00
Dr. Chat
a5c22ec214
XThread: Only need to retain a pointer to our object - not a handle.
2015-12-29 13:09:49 -08:00
Dr. Chat
621d3f8abb
XThread free stack on destruction
2015-12-29 13:09:49 -08:00
Dr. Chat
07d31862f1
XThread: Special case save/restore for threads no longer running.
2015-12-29 13:09:48 -08:00
Dr. Chat
b58e9afbf1
Fix XThread::StepIntoBranch not properly stepping into blr/bctr
2015-12-29 13:09:48 -08:00
Dr. Chat
44c9e8fe25
Save/Restore the guest clock in XThreads
2015-12-29 13:09:47 -08:00
Dr. Chat
adec5602c2
XModule log on save/restore
2015-12-29 13:09:47 -08:00
Dr. Chat
6f4626118e
Fix infinite loop in StepToSafePoint after stepping to an address once
2015-12-29 13:09:46 -08:00
Dr. Chat
4cbe219476
Don't update the dispatch header in KetSetEvent/KeResetEvent (threading issues)
2015-12-29 13:09:46 -08:00
Dr. Chat
d0284e943d
XSemaphore Save/Restore
2015-12-29 13:09:45 -08:00
Dr. Chat
afb514528e
Save/Restore XThreads before any other kernel objects
2015-12-29 13:09:44 -08:00
Dr. Chat
b97a39150b
Rewrite Rtl critical section implementation (and implement full waiters)
2015-12-29 13:09:44 -08:00
Dr. Chat
606aa9af6f
XThread: Update the PC when we step out of an export!
2015-12-29 13:09:43 -08:00
Dr. Chat
d2d97fe58f
XThread - Fix unconditional conditional branch check
2015-12-29 13:09:42 -08:00
Dr. Chat
24f8295daa
Make KernelState::TerminateTitle try to terminate XThreads safely.
2015-12-29 13:09:39 -08:00
Dr. Chat
3007a98d2d
Install false-branch breakpoint only if the opcode is conditional.
2015-12-29 13:09:38 -08:00
Dr. Chat
f9de61ceed
XThread::StepToSafePoint - Handle cases where the thread hasn't started yet.
2015-12-29 13:09:37 -08:00
Dr. Chat
a6322c7bf4
NativeList getters/setters
2015-12-29 13:09:36 -08:00
Dr. Chat
89c408965e
Can't call constructors from other constructors
2015-12-29 13:09:35 -08:00
Dr. Chat
7d30e1297a
NotifyListener Save/Restore
2015-12-29 13:09:34 -08:00
Dr. Chat
87931369e4
XObject no kernel state constructor
2015-12-29 13:09:34 -08:00
Dr. Chat
b3ed0fa445
NativeList default constructor
2015-12-29 13:09:33 -08:00
Dr. Chat
23b6a1f943
Fix xam_net.cc
2015-12-29 13:09:33 -08:00
Dr. Chat
4a3773d2fb
XModule Save/Restore
2015-12-29 13:09:32 -08:00
Dr. Chat
93602ed48a
No need to double-retain Ke* objects, as having them in the object table is enough.
2015-12-29 13:09:32 -08:00
Dr. Chat
a4865bd24a
Retain objects when restored into the object table.
2015-12-29 13:09:31 -08:00
Dr. Chat
c8a2298b9d
Remove ~NotifyListener call to UnregisterNotifyListener (as it's impossible for this to occur)
2015-12-29 13:09:26 -08:00
Dr. Chat
290d5d9594
Fix incorrect double-retaining of objects on restore.
2015-12-29 13:09:24 -08:00
Dr. Chat
7e88e54cbe
XObject::host_object -> XObject::is_host_object
2015-12-29 13:09:23 -08:00
Dr. Chat
1e36ea8b69
Use c_str() when passing a string to sprintf!
2015-12-29 13:09:23 -08:00
Dr. Chat
c44742b0e3
XEvent write signaled state
2015-12-29 13:09:22 -08:00
Dr. Chat
e54850e1f2
XThread::set_name - Use more efficient xe::format_string instead of a StringBuffer
2015-12-29 13:09:22 -08:00
Dr. Chat
e4e1bc1060
Remove dead code from UserModule (how did this even get here?)
2015-12-29 13:09:22 -08:00
Dr. Chat
8a9493a048
Remove unused XboxkrnlModule::LaunchModule
2015-12-29 13:09:21 -08:00
Dr. Chat
442f063ddf
XThread Save: Handle emulated instructions/MMIO/etc that call out of guest code
2015-12-29 13:09:20 -08:00
Dr. Chat
785824531c
Fix the assert on no restore handler found
2015-12-29 13:09:20 -08:00
Dr. Chat
6e0057020c
XEvent Save/Restore (TODO: Write signaled state)
2015-12-29 13:09:19 -08:00
Dr. Chat
ce92dd5691
ObjectTable Save/Restore (and overloads/PurgeAllObjects/GetAllObjects)
2015-12-29 13:09:19 -08:00
Dr. Chat
aa7919bd89
emulator.cc savestates
...
Change UserModule::Launch to be non-blocking (returns the main thread)
2015-12-29 13:09:17 -08:00
Dr. Chat
52ec24ea6a
Stash handles rather than native pointers in Ke* objects.
2015-12-29 13:09:17 -08:00
Dr. Chat
4301641bdf
XThread Save/Restore
2015-12-29 13:09:16 -08:00
Ben Vanik
194c13f977
REBASE: Fix vector out of range access.
2015-12-29 13:09:16 -08:00
Dr. Chat
5517518d36
XObject savestate setup (Save/Restore, tracks all handles, tracks if host object)
2015-12-29 12:35:59 -08:00
Dr. Chat
712a5da64b
KernelState::Save/Restore (and misc. changes)
2015-12-29 12:35:58 -08:00
Dr. Chat
ed85346f3b
XObject Save/Restore
2015-12-29 12:32:50 -08:00
Dr. Chat
4a13316daa
Track export data on kernel trampolines as well.
2015-12-29 12:32:49 -08:00
Dr. Chat
b8d4f26e46
Fix NtWaitForMultipleObjectsEx definition
2015-12-29 12:32:49 -08:00
Dr. Chat
87cdce1440
Export kBlocking tag
2015-12-29 12:32:48 -08:00
Dr. Chat
666f5543a8
Cleanup ThreadState and XThread
2015-12-29 12:32:46 -08:00
Ben Vanik
990d973c74
New ppc opcode decoder.
...
Seems to work and match up with the old decoder (which may be bad).
Old decoder remains until all functionality is replaced.
2015-12-27 22:53:05 -08:00
Ben Vanik
0a316808a5
Include order fixes.
2015-12-27 10:27:46 -08:00
Ben Vanik
0e58208add
Dropping elemental-forms and swapping out with imgui.
...
Too much code for such little use. This should simplify porting.
2015-12-26 20:25:24 -08:00
sephiroth99
a281f6d70d
ObjectTable: Remove explicit specialization in class scope
...
Function template 'LookupObject' in ObjectTable class has
a specialization in class scope, which is not allowed.
While MSVC seems OK with that, clang complains about it.
Fix this issue by moving the definition of the specialisation
outside the class scope, and moving the declaration in the
'.cc' file.
2015-12-17 01:04:44 -05:00
Ben Vanik
15816327b4
Renaming xe::cpu::frontend to xe::cpu::ppc.
2015-12-14 21:17:55 -08:00
Ben Vanik
bea8870700
Shuffling old-style ucode.h under gl4.
2015-11-28 16:10:27 -08:00
Ben Vanik
1956b8708e
Fixing include orders and whitelisting others.
...
Will be broken until clang SVN 253772 is available on travis/snapshots.
2015-11-21 11:34:46 -08:00
Dr. Chat
4dfe1addaa
Verify that LookupObject actually returns an object of the requested type.
2015-11-12 19:06:15 -06:00
Dr. Chat
7fc22f1987
Add a static kType field to all objects
2015-11-12 19:01:55 -06:00
Dan Weatherford
e178853e46
Partially implement XamUserWriteProfileSettings
...
Handles writing binary blob settings to the user profile which can then be read
by XamUserReadProfileSettings.
2015-11-09 16:53:52 -06:00
Ben Vanik
4af6c41740
Moving profiling.h to base - UI could be separated for cleanliness.
2015-11-07 12:31:07 -08:00
Ben Vanik
440c807936
Fix error state shutdown crash.
2015-11-06 16:27:07 -08:00
Ben Vanik
b9326be93c
Merge pull request #447 from DrChat/excreatethread_ptr_fix
...
Fix ExCreateThread returning a handle when game requests a pointer
2015-11-03 20:01:12 -08:00
Dr. Chat
cd12b3d198
Converted MmCreateKernelStack / Implemented MmDeleteKernelStack
2015-11-01 21:59:27 -06:00
Dr. Chat
b628577855
Implemented KeSetCurrentStackPointers
2015-11-01 21:56:40 -06:00
Dr. Chat
cee0e582c2
Remove workarounds for handles passed into Ke* functions.
2015-10-31 10:31:35 -05:00
Dr. Chat
4d22c21688
ExCreateThread: Flag 0x80 indicates we should return the thread pointer, not handle.
2015-10-31 10:28:53 -05:00
Dr. Chat
3547d31c3d
Generate trampoline functions for GetProcAddressByOrdinal on kernel modules.
2015-10-24 14:14:08 -05:00
Dr. Chat
c33e95981b
Formatting.
2015-09-25 18:46:50 -05:00
Dr. Chat
71818a3129
Convert NtCreateEvent to new format
2015-09-25 18:39:14 -05:00
Dr. Chat
b12480820c
word_t shim parameter
2015-09-25 18:38:33 -05:00
Dr. Chat
f5ee6f4cf5
XEX2 lan key header
2015-09-25 18:38:10 -05:00
Dr. Chat
ba399d52b9
NtAllocateVirtualMemory: Return STATUS_MAPPED_ALIGNMENT if the base address is unaligned
2015-09-25 18:37:49 -05:00
Dr. Chat
d78f43c574
XamContentOpenFile stub
2015-09-25 18:35:57 -05:00
Dr. Chat
9ceab26560
Print the LAN key header
...
Check if the module is a XEX module before calling Unload on XexModule
2015-09-25 18:34:54 -05:00
Dr. Chat
3cbc65ac29
XThread Get/Set Last Error
2015-09-25 18:22:13 -05:00
Ben Vanik
ee92f75a84
Updating to the latest clang-format. Make sure to update yourselves!
2015-09-22 08:26:19 -07:00
sephiroth99
ab2ef82d55
xobject: remove accept method of object_ref class
...
The removed method was causing an error in clang ("call to non-static member
function without an object argument"). As it was not used, simply remove
it.
2015-09-22 07:43:08 -07:00
Ben Vanik
3fc1d02a09
Suspend some host threads that make guest callbacks.
2015-09-21 21:24:26 -07:00
Ben Vanik
5d033f9cb3
A new debugger.
...
Lots of bugs/rough edges/etc - issues will be filed.
Old-style debugging still works (just use --emit_source_annotations to get
the helpful movs back and --break_on_instruction will still fire).
2015-09-20 21:31:05 -07:00
Ben Vanik
a1a996c1e6
Shrinking UI elements in the debugger.
2015-09-06 20:49:20 -07:00
Ben Vanik
e5fbf840d2
Shuffling kernel/.
2015-09-06 18:07:52 -07:00
Ben Vanik
494cba7131
Removing unused XAsyncRequest.
2015-09-06 14:10:34 -07:00
Ben Vanik
8588fbc6cf
Shuffling kernel util types to util/.
2015-09-06 13:45:52 -07:00
Ben Vanik
cb3dbcccbc
Notes.
2015-09-06 11:05:16 -07:00
Ben Vanik
669f5b061f
Moving DPC list into KernelState and removing unused file.
2015-09-06 09:36:39 -07:00
Ben Vanik
3c96b6fa0a
DANGER DANGER. Switching to global critical region.
...
This changes almost all locks held by guest threads to use a single global
critical region. This emulates the behavior on the PPC of disabling
interrupts (by calls like KeRaiseIrqlToDpcLevel or masking interrupts),
and prevents deadlocks from occuring when threads are suspended or
otherwise blocked.
This has performance implications and a pass is needed to ensure the
locking is as granular as possible. It could also break everything
because it's fundamentally unsound. We'll see.
2015-09-06 09:30:54 -07:00
Ben Vanik
6c07eb8e5c
Faster RtlFillMemoryUlong.
2015-09-05 14:38:07 -07:00