Commit Graph

1134 Commits

Author SHA1 Message Date
Ben Vanik 52ff9bdfd0 Fixing swizzle. 2013-12-14 15:47:32 -08:00
Ben Vanik 1fb8650f6d Fixing I2F. 2013-12-14 14:41:45 -08:00
Ben Vanik 8af24ab9bb Fixing vrlimi128 2013-12-14 09:27:34 -08:00
Ben Vanik c9adf893a6 Fixing a bunch of vector ops. 2013-12-14 08:47:36 -08:00
Ben Vanik 7ebdd3f7e0 Fixing vectors. 2013-12-14 07:17:33 -08:00
Ben Vanik 21d1e7236b Fixing permute functions. 2013-12-14 06:24:29 -08:00
Ben Vanik a1f41c656a stve*x 2013-12-13 22:24:19 -08:00
Ben Vanik d1210218ac Comment fixes. 2013-12-13 21:20:01 -08:00
Ben Vanik 69704853a3 Special casing sldi. 2013-12-13 20:11:04 -08:00
Ben Vanik 24ce893256 Fixing ROTL macro. 2013-12-13 20:10:56 -08:00
Ben Vanik 689de0279f Swapping bytes. Probably still wrong. 2013-12-08 23:33:40 -08:00
Ben Vanik eb2d596c27 srawx, vsldoi, vupkd3d of D3DCOLOR -- all untested 2013-12-08 23:15:05 -08:00
Ben Vanik 3ec930d9fc INSERT 2013-12-08 23:14:27 -08:00
Ben Vanik ccd5346332 LOAD/STORE_VECTOR_LEFT/RIGHT. It'd be nice not to have these. 2013-12-08 22:16:37 -08:00
Ben Vanik b9df6dc703 load_vector_sh* 2013-12-08 20:58:24 -08:00
Ben Vanik 07b5c3ad81 Adding f64-to-i32 convert. 2013-12-08 20:42:33 -08:00
Ben Vanik 24a13b4021 Fixing carry. 2013-12-08 20:42:20 -08:00
Ben Vanik 2e5489e22f Making the trace format easier to diff with the old stuff. 2013-12-08 20:42:12 -08:00
Ben Vanik 65a36fd69c Fixing CNTLZ. 2013-12-08 16:01:11 -08:00
Ben Vanik 60015afdc4 Misc fixes. 2013-12-08 16:00:55 -08:00
Ben Vanik 7c4b2c6d23 sradi, which was totally wrong before o_o 2013-12-08 15:24:18 -08:00
Ben Vanik 7adc122620 No-op MSR instructions. 2013-12-08 14:31:19 -08:00
Ben Vanik 760d82a9af Fixing endianess of register load/store. 2013-12-08 14:31:03 -08:00
Ben Vanik ec4bf50363 load_acquire/store_release 2013-12-08 14:15:28 -08:00
Ben Vanik 2549292a57 Return address handling. Not happy with the design, but it (sorta) works. 2013-12-08 13:58:57 -08:00
Ben Vanik dc0848f7ba rld* 2013-12-08 13:58:15 -08:00
Ben Vanik 28ff739449 Better nop handling. 2013-12-08 13:17:50 -08:00
Ben Vanik 50f53a483e How did this ever work? Fixing and*. 2013-12-08 12:25:48 -08:00
Ben Vanik e2e2a392ee Scanner now picks up restgprlr calls. 2013-12-08 11:26:43 -08:00
Ben Vanik 1dc356cb4d Allowing dynamic register access checks to be disabled. 2013-12-07 13:15:15 -08:00
Ben Vanik d8cc9fb0b4 Register access (dynamic and static) wired up. 2013-12-07 13:09:22 -08:00
Ben Vanik e5d867a92f Removing comments. 2013-12-07 06:29:58 -08:00
Ben Vanik 3b268f07ef Basic constant propagation. 2013-12-07 05:52:51 -08:00
Ben Vanik 57432d5996 Making ContextPromotion actually remove dead stores. 2013-12-07 04:57:37 -08:00
Ben Vanik 329b554c7a Basic ContextPromotionPass and some opcode info rearranging. 2013-12-07 04:39:48 -08:00
Ben Vanik 51d0be0f0a Basic DCE pass. 2013-12-07 02:18:26 -08:00
Ben Vanik c2113c116d Starting compiler work. Adding pass TODOs. 2013-12-07 01:36:13 -08:00
Ben Vanik fdb6a5cfa3 Initial Alloy implementation.
This is a regression in functionality and performance, but a much better
foundation for the future of the project (I think). It can run basic
apps under an SSA interpreter but doesn't support some of the features
required to do real 360 apps yet.
2013-12-06 22:57:16 -08:00
Ben Vanik 68b8737a58 SETXXv, CNDXXv, SETXXs - may not be right. 2013-11-17 15:20:50 -08:00
Ben Vanik 1f4795e7d4 Fixing shader file names. 2013-11-17 15:20:28 -08:00
Ben Vanik 9441fb8b7a Finally figured out MUL/ADD/SUB_CONST_* 2013-11-16 18:27:17 -08:00
Ben Vanik 1592cf96f7 MAX4v, MINs, MAXs 2013-11-16 16:59:33 -08:00
Ben Vanik 798cad6f87 DOT2ADDv 2013-11-16 16:15:23 -08:00
Ben Vanik 59779e735d Fix input error return. 2013-11-16 07:15:15 -08:00
Ben Vanik 1e86736853 vaddfp and vrfin 2013-11-16 06:58:50 -08:00
Ben Vanik 8398ea4925 I lied, MULADD was not that way. 2013-11-16 05:16:11 -08:00
Ben Vanik 60f48bdd32 Always write oPos. 2013-11-16 04:39:26 -08:00
Ben Vanik 7491058ffd Adding --dump_shaders=path/. 2013-11-16 04:39:16 -08:00
Ben Vanik 8440c9059a Fixing order of MULADDv. 2013-11-16 04:35:08 -08:00
Ben Vanik 271abbf874 Adding --trace_ring_buffer. 2013-11-16 03:06:55 -08:00
Ben Vanik 96c27b3b51 Fixing stack alignment in release mode. 2013-11-16 02:52:33 -08:00
Ben Vanik 7a2032b693 Renaming X_RESULT to be consistent. 2013-11-01 16:23:41 -07:00
Ben Vanik 06d9f7989a Removing signature from export tables. 2013-11-01 16:23:40 -07:00
gibbed f7b7b0708b Argh. 2013-10-27 18:45:19 -07:00
gibbed faa67028ce Mystery GPU registers. 2013-10-27 18:44:20 -07:00
gibbed 8306be77b0 Fixed constant tracking through mr. 2013-10-27 18:44:20 -07:00
Ben Vanik 2de906f3d6 Hacking around with shaders. Pretty sure this is all wrong. 2013-10-27 18:33:50 -07:00
Ben Vanik 0355047838 PM4_LOAD_ALU_CONSTANT 2013-10-27 16:18:54 -07:00
Ben Vanik 7d6dda356c Clear all allocated memory. 2013-10-27 16:01:35 -07:00
Ben Vanik 74ff6bd4fa Finally figured out the ringbufer corruption. 2013-10-27 16:00:51 -07:00
Ben Vanik 11f99ce33b Obeying request to zero. 2013-10-27 12:47:00 -07:00
Ben Vanik 6477d6c21e --scribble_heap, which memsets all allocated memory.
Already exposing bugs.
2013-10-27 12:06:02 -07:00
Ben Vanik 082df81f70 Slowing down the audio system until it does something. 2013-10-27 12:05:17 -07:00
Ben Vanik 692e14665c Tie FPR/VR tracing to --trace_registers 2013-10-25 23:32:11 -07:00
Ben Vanik 3b7fcced0e Fixing broken error check and adding some manual breakpoints. 2013-10-23 23:48:18 -07:00
Ben Vanik 655a486db3 NtResumeThread 2013-10-23 23:32:44 -07:00
Ben Vanik ebef2aef36 Adding audio stub methods. 2013-10-23 23:09:16 -07:00
Ben Vanik ca22980dc0 XInput polling. 2013-10-23 22:42:48 -07:00
Ben Vanik 96daa6b43f Validate arguments on input. 2013-10-23 22:23:52 -07:00
Ben Vanik c4fe2e6926 Input bouncing through to input system. 2013-10-23 22:13:05 -07:00
Ben Vanik 74803ae174 HID system skeleton. 2013-10-23 21:47:36 -07:00
Ben Vanik 20bd15e7fe Partially fixing import logging. Still not sure why vars aren't showing. 2013-10-23 21:11:13 -07:00
Ben Vanik 93e4b70133 Stubbing input a little better. 2013-10-23 21:10:41 -07:00
Ben Vanik 6e60aef72f Special register check for lwbrx. Need a scalable way to do this. 2013-10-23 21:10:26 -07:00
Ben Vanik b7ffd46319 Massive refactoring of all code + audio skeleton.
This should make it easier to find files and (in the future) split things
up into separate libraries.
It also changes around emulator initialization to make it a little more
difficult to do things out of order and a little more sensible as to when
real init work happens.
Also adding a skeleton audio system/driver and reworking CPU register
access to be more extensible.
2013-10-23 20:42:24 -07:00
Ben Vanik c996a4bbaf Stubs for more XAM functions. 2013-10-23 00:05:50 -07:00
Ben Vanik 60ef171ff2 XNetStartup/WSAStartup stubs. 2013-10-22 23:46:42 -07:00
Ben Vanik 447ce90b7b MmQueryAddressProtect. 2013-10-22 23:34:24 -07:00
Ben Vanik 2a8a19e4be KeDelayExecutionThread. 2013-10-22 23:22:30 -07:00
Ben Vanik d9a55a5557 Zero memory on alloc. 2013-10-22 21:50:10 -07:00
Ben Vanik d065ee43e8 PM4_SET_CONSTANT for registers. 2013-10-22 21:32:04 -07:00
Ben Vanik 157cfd4d71 Moving all physical allocs to A..., as games do stupid stuff when at E. 2013-10-22 21:06:12 -07:00
Ben Vanik 62d4d5ce84 Randomly messing with address translation. Still not right. 2013-10-22 21:05:56 -07:00
Ben Vanik d4e19eb583 Certain games seem to do GPU writeback here. 2013-10-22 21:05:32 -07:00
Ben Vanik e0b6d0f689 Cleaning up packet reading/endianness. 2013-10-22 20:47:27 -07:00
Ben Vanik 725cde55d4 Moving the physical heap up a bit to avoid overwriting 0x0. 2013-10-21 23:56:16 -07:00
Ben Vanik f676333ef0 Stub MmQueryAddressProtect - unimplemented. 2013-10-21 21:58:45 -07:00
Ben Vanik f9dd0b0cb2 Allocate physical memory. 2013-10-21 19:28:25 -07:00
Ben Vanik 1fea07b6aa Align physical allocations to page size. 2013-10-21 19:26:41 -07:00
Ben Vanik aa3e8d0332 Allocating things in a physical heap. Super wasteful right now. 2013-10-21 00:59:11 -07:00
gibbed ea022c8dd3 That one byte is totally important. 2013-10-21 00:39:39 -07:00
Ben Vanik ca208fa60a Rewrote memory manager to use a bunch of mapped views. 2013-10-20 23:19:57 -07:00
Ben Vanik d00f4d58e9 Better byte swapping in ringbuffer and fixed logging. 2013-10-20 18:34:46 -07:00
Ben Vanik 42a8fc0b59 --break_on_instruction=0x... and --break_on_memory=0x... 2013-10-20 16:54:59 -07:00
Ben Vanik cddab7ffb0 Fixing free. 2013-10-20 15:28:00 -07:00
Ben Vanik 0c19516de4 Fixing file position default value. 2013-10-20 15:05:09 -07:00
Ben Vanik e919edfb33 Fix xe_memory_is_valid. 2013-10-20 13:47:58 -07:00
Ben Vanik 9f1d2f29c1 --heap_guard_pages=1 to add guard pages. 2013-10-20 13:42:34 -07:00
Ben Vanik ca3f2f1367 Malloc inspect in release mode, too. 2013-10-20 12:46:28 -07:00
Ben Vanik 002400d071 Adding memory info dumping utility, use --log_heap. 2013-10-20 12:39:59 -07:00
Ben Vanik fbea5a6394 Making the GPU counter a vblank counter, not a timer. 2013-10-20 02:00:51 -07:00
Ben Vanik 39adeef2e3 Hiding vertex/index data for now. 2013-10-20 01:59:42 -07:00
Ben Vanik 92899739bd Index buffer upload. 2013-10-20 00:47:32 -07:00
Ben Vanik 5a80c7b9c1 Hacking shaders to get dummy texture colors and such. 2013-10-20 00:20:36 -07:00
Ben Vanik 737a567de6 Fixing code_addr_low_. 2013-10-19 22:31:08 -07:00
Ben Vanik 889e586cab Skeleton for new draw type and texture fetching. 2013-10-19 21:49:25 -07:00
Ben Vanik bdf5bf20a4 vminfp/vmaxfp 2013-10-19 21:26:40 -07:00
Ben Vanik 2cce46c232 vsel/vsel128 2013-10-19 21:20:27 -07:00
Ben Vanik d62e8aaf78 lhbrx/lwbrx/ldbrx/sthbrx/stwbrx/stdbrx 2013-10-19 21:05:06 -07:00
Ben Vanik d60cf676c3 addmex 2013-10-19 20:57:24 -07:00
Ben Vanik 5b91ba89e9 Fixing stdux/stdx o_o 2013-10-19 20:57:19 -07:00
Ben Vanik 62b792c903 Ignoring a packet I don't care about. 2013-10-19 20:30:36 -07:00
Ben Vanik 7ae2d410e5 addex. All of these are wrong - let's hope we don't overflow. 2013-10-19 20:29:19 -07:00
Ben Vanik 4e6799197f fsqrtx/fsqrtsx 2013-10-19 20:25:03 -07:00
Ben Vanik e842a6614a Fixing LR argument for indirect branches. 2013-10-19 19:59:09 -07:00
Ben Vanik 10c69cfaf2 rlwnmx 2013-10-19 19:07:26 -07:00
Ben Vanik 807b949fea Seeing code returning to the execution thunk, something must have broken. 2013-10-19 19:03:47 -07:00
Ben Vanik 4a72010e5f addcx 2013-10-19 19:03:30 -07:00
Ben Vanik fc1be2bfd8 rldimix 2013-10-19 18:54:36 -07:00
Ben Vanik 14b1c860b9 subfmex/subfzex. 2013-10-19 18:33:32 -07:00
Ben Vanik b8edeba195 Actually aligning physical alloc requests. 2013-10-19 18:18:19 -07:00
gibbed 49ee9d05b9 Fixed LR branching. 2013-10-19 17:09:48 -07:00
Ben Vanik 7b0ca71bfb Fixing broken test. 2013-10-19 17:08:34 -07:00
Ben Vanik 68d5f33cfa GPU byte swapping.
A lot of other packets likely do this.
2013-10-19 16:29:00 -07:00
gibbed f15b5dae9d I think this is right. 2013-10-19 15:07:59 -07:00
Ben Vanik f7ad9c89dd Messing with stvlx. 2013-10-19 14:36:32 -07:00
Ben Vanik 91e6c4ed9a Adding address mask to stvlx. 2013-10-19 14:29:14 -07:00
Ben Vanik 31161e0245 SHUFPS_SWAP_DWORDS to make it easier to tell what it's doing. 2013-10-19 14:21:56 -07:00
Ben Vanik 5df538cd44 Adding stack alignment check. We aren't 16b aligned right now. Fuck. 2013-10-19 14:16:34 -07:00
Ben Vanik 007f7e371d Workaround for yet another AsmJit bug. Sigh. 2013-10-19 12:50:42 -07:00
Ben Vanik 37065255a2 Dispatching interrupts. 2013-10-19 12:50:26 -07:00
Ben Vanik 90bc6ad1a8 Interrupts fire on the right 'thread', ringbuffer work, 2013-10-19 11:50:01 -07:00
Ben Vanik 6db8c6c961 Implementing thread state block access. 2013-10-19 02:53:14 -07:00
gibbed 32a0045001 This is probably better. 2013-10-19 01:18:18 -07:00
Ben Vanik c60230f28a Implementing scratch registers correctly (I think). 2013-10-19 01:16:13 -07:00
Ben Vanik 1616d7ba22 WAIT_MEM_REG, REG_RMW (untested), COND_WRITE 2013-10-19 00:46:35 -07:00
Ben Vanik a63db2b7fd Dispatch interrupt outside of main pump. 2013-10-19 00:46:11 -07:00
Ben Vanik 562c86f76d Extending critical sections to spin forever for now. 2013-10-18 21:55:43 -07:00
Ben Vanik 01a94f3850 VdGetSystemCommandBuffer stub. 2013-10-18 21:39:29 -07:00
Ben Vanik 0746e6feb2 ldarx/lwarx/stdcx/stwcx. Probably. 2013-10-18 21:17:20 -07:00
Ben Vanik f2550bd017 KeEnterCriticalRegion/KeLeaveCriticalRegion. 2013-10-18 19:49:51 -07:00
Ben Vanik 6a02ae3768 KfAcquireSpinLock/KfReleaesSpinLock. 2013-10-18 19:11:37 -07:00
Ben Vanik 28e7102a02 Always dump CPU info and assert our dummy thread value is legit. 2013-10-18 18:56:59 -07:00
Ben Vanik d3665cc2e6 Support for VS2013 (and auto picking), a Win xb script, and readme updates.
This also removes the dependency on D3DX, which is only included in the
DXSDK, meaning that just the Win8+ SDK should be required now.
2013-10-17 23:35:54 -07:00
Ben Vanik ff54a04aa1 asmjit fixes. 2013-10-17 14:03:26 -07:00
Ben Vanik 20720f750d KeSetAffinityThread stub, Ob* fns added, current thread handled. 2013-10-17 00:47:02 -07:00
Ben Vanik 7bf6992203 NtSetEvent/NtWaitForSingleObjectEx. 2013-10-16 23:04:52 -07:00
Ben Vanik 1b12949dd2 NtQueryFullAttributesFile. 2013-10-16 22:41:31 -07:00
Ben Vanik fd1054d823 NtSetInformationFile for seek position. 2013-10-16 22:28:26 -07:00
Ben Vanik 5de9b84904 Fixing line endings.
Need to run a script to do this...
2013-10-16 22:22:17 -07:00
Ben Vanik a41827942e Some NtQueryInformation classes. 2013-10-16 22:20:24 -07:00
gibbed 956496fb99 Added KeBugCheck and KeBugCheckEx. 2013-10-16 22:08:41 -07:00
Ben Vanik ab1ba9a508 Partially implemented NtQueryFullAttributes.
Enough to get past the ShaderDump test most games seem to do.
2013-10-16 21:32:53 -07:00
Ben Vanik c53db98517 Locking around some JIT stuff.
Excessive for now, but safer.
2013-10-16 21:32:20 -07:00
Ben Vanik 8e37fb8502 Bytes read via ReadFile! 2013-10-16 20:50:46 -07:00
Ben Vanik fea5c06180 Fixing line endings. 2013-10-16 20:10:16 -07:00
Ben Vanik ab5b9d75e0 Reworking file system so that it's easier to implement file operations. 2013-10-16 20:09:42 -07:00
gibbed d5bd8b9d5b Merge branch 'master' of https://github.com/benvanik/xenia 2013-10-16 19:05:04 -07:00
gibbed 16b0c936d4 Fixed argument size handling in _vsnprintf_shim, like DbgPrint_shim. 2013-10-16 19:04:23 -07:00
gibbed 46b42528fd Fixed xeRtlFillMemoryUlong so it swaps the pattern back to native endianness. 2013-10-16 19:03:22 -07:00
gibbed 309d1621e5 Attempt at a fix for crashes occuring when not using instruction/branch tracing. 2013-10-16 18:55:21 -07:00
Ben Vanik 803e4998de Starting to wire up readfile. 2013-10-16 00:23:05 -07:00
Ben Vanik da2f7f1ea5 Shuffling filesystem to xboxkrnl.
This doesn't really change anything yet, just moves things.
Also fixed some bad over-including.
2013-10-15 23:09:51 -07:00
Ben Vanik 26c06e13d9 Checking in intermediate FS work before moving code. 2013-10-15 22:51:19 -07:00
Ben Vanik a8d10cd9d3 NtClose/NtReadFile skeleton. 2013-10-15 22:28:00 -07:00
Ben Vanik 388f354870 Basic NtCreateFile. 2013-10-15 21:30:57 -07:00
Ben Vanik f409795dd1 Fixing PM4 type 0 packet parsing. 2013-10-15 20:24:32 -07:00
gibbed a483704855 Sneaky tabs. 2013-10-15 19:18:28 -07:00
gibbed d79bd8cfa7 Renamed xboxkrnl_file* to xboxkrnl_nt*, added xboxkrnl_io*. 2013-10-15 19:18:03 -07:00
gibbed f59ff2e44a Fixed debug output format for NtCreateFile. 2013-10-15 05:30:25 -07:00
gibbed 5176a7e7c9 Stubbing out some file stuff. 2013-10-15 05:16:05 -07:00
Ben Vanik 6cda645911 Adding instruction address identifier when not tracing.
This can be removed later.
2013-10-14 21:53:34 -07:00
Ben Vanik 900252a590 Another dummy XCONFIG value. 2013-10-14 21:48:26 -07:00
Ben Vanik 0b24356080 Skipping unknown form of PM4_EVENT_WRITE_SHD for now. 2013-10-14 21:35:23 -07:00
Ben Vanik 80e3e6fa14 Ignoring unimplemented disasm functions by default. 2013-10-14 21:34:13 -07:00
Ben Vanik 963667f65c Forcing bl to function calls. 2013-10-14 21:33:54 -07:00
Ben Vanik 8294f22d76 Ignore decommits for now. 2013-10-14 19:06:26 -07:00
Ben Vanik 929ea13548 Emulated vslb. 2013-10-14 18:33:17 -07:00
Ben Vanik 1eba1fb5c2 vspltb 2013-10-14 18:21:26 -07:00
Ben Vanik 5bed1069f8 mulhwx/mulhwux 2013-10-14 17:49:21 -07:00
Ben Vanik 1e66e39efc divdux/mulldx 2013-10-14 17:30:25 -07:00
Ben Vanik dc804f2471 KeQuerySystemTime/NtCreateEvent. 2013-10-14 17:19:42 -07:00
Ben Vanik 16020df6a2 mfcr disasm. 2013-10-14 00:48:23 -07:00
Ben Vanik 76ca76bb67 Disabling hole filling in the SDB.
This was required when the AOT CPU was built, but isn't needed now.
2013-10-14 00:39:13 -07:00
Ben Vanik 602ed5393e vspltisb/ldarx/stdcx.
ldarx/stdcx are just as faked as the w equivalents.
2013-10-14 00:13:40 -07:00
Ben Vanik 72b54cfe2a Fixing recursion branches. 2013-10-13 22:59:19 -07:00
Ben Vanik b28c51271d A bunch of disasm instructions used by some games. 2013-10-13 22:53:33 -07:00
Ben Vanik e0701905dd Dummy values that games seem to want. 2013-10-13 22:25:23 -07:00
Ben Vanik 2eed0b1575 Fixing wraparound.
This still needs a tremendous amount of cleanup.
2013-10-13 21:18:23 -07:00
Ben Vanik 4887234bba Fixing ring buffer wrap around. I think. 2013-10-13 13:39:46 -07:00
Ben Vanik e0af361d74 Preventing (one of likely many) race condition with ringbuffer.
This was causing acks for commands not executed if the CPU ran faster
than the GPU.
2013-10-13 12:17:07 -07:00
Ben Vanik 41a652dd03 Manual reset was not the solution. Bah. 2013-10-13 12:09:25 -07:00
Ben Vanik f49e35636d Fixing uninitialized members.
Wish VC++ warned about this line clang does...
2013-10-13 11:14:46 -07:00
Ben Vanik c6d779920d Switch ring buffer wait event to manual reset.
Avoids timing issues with kicks.
2013-10-13 11:06:45 -07:00
Ben Vanik fa4c7cdd83 Wait until the ringbuffer thread is spun up.
This could be made much nicer.
2013-10-13 11:06:29 -07:00
Ben Vanik cc12f0b96a Periodically fire interrupts. 2013-10-13 11:06:13 -07:00
Ben Vanik 96a857e892 Massively disgusting and incomplete shader translator. 2013-10-12 22:14:23 -07:00
Ben Vanik 0ef278325f Hacking to get first triangle drawn. 2013-10-12 15:07:34 -07:00
Ben Vanik 83d7523da1 Fixing lvrx. 2013-10-12 15:06:16 -07:00
Ben Vanik d46069cd47 Various tweaks from gibbed. 2013-10-12 10:57:01 -07:00
Ben Vanik 51b79cb399 Minor fixes. 2013-10-12 03:02:39 -07:00
Ben Vanik 8e01e2d945 Vertex fetching. 2013-10-12 02:29:01 -07:00
Ben Vanik 04aad708c9 Shader type read for translation. 2013-10-11 22:04:34 -07:00
Ben Vanik 1378fad3c0 Basic shader cache. 2013-10-11 21:45:20 -07:00
Ben Vanik 6e4fb87992 D3D11 window up and spinning. 2013-10-11 20:23:58 -07:00
Ben Vanik 611d3bbbeb Adding in D3D11 GPU skeleton. 2013-10-09 23:18:22 -07:00
Ben Vanik 8558176ee0 Cleaning up the ucode disassembler. 2013-10-09 22:50:44 -07:00
Ben Vanik 14bf4912d1 Fixing CF decode. 2013-10-09 21:15:23 -07:00
Ben Vanik 7b97d475c2 Hacked in shader disassembler.
Checking this in before I break it. Has tons of issues.
Turns out the 360 GPU uses an Adreno (rAdeon)-like r2xx shader format.
VC++'s handling of bitfields is absolutely terrible.
2013-10-09 20:28:35 -07:00
Ben Vanik 17be429244 Microcode disassembler skeleton. 2013-10-07 19:58:24 -07:00
Ben Vanik 651954ccae Starting to drive command buffer actions down to a graphics driver. 2013-10-06 21:09:58 -07:00
Ben Vanik 371075f154 More GPU decoding. 2013-10-06 19:22:02 -07:00
Ben Vanik 99bde2d67e Fixing terrible vsldoi implementation. Still terrible. 2013-10-06 17:45:59 -07:00
Ben Vanik 87481f5f4c Fixing vperm. 2013-10-06 16:25:41 -07:00
Ben Vanik b77403e754 Fixing lvsl/lvsr. 2013-10-06 16:25:23 -07:00
Ben Vanik 74692232c9 Add trace thread mask.
Makes seeing only thread 1 easier.
2013-10-06 14:35:03 -07:00
Ben Vanik 1fecb95512 Switching altivec disasm to die on failure. 2013-10-06 12:35:24 -07:00
Ben Vanik debf21437e Untested emulated stvlx/stvrx. 2013-10-06 11:22:35 -07:00
Ben Vanik e5ca996a08 Xmm read/write cleanup. 2013-10-06 11:21:50 -07:00
Ben Vanik 9ebbc3535f vsldoi. 2013-10-06 11:21:38 -07:00
Ben Vanik cdb13775e2 Alignment option in xmm read/write. 2013-10-06 10:25:41 -07:00
Ben Vanik 26e22e2b16 Untested and nasty emulated vperm. 2013-10-06 10:25:30 -07:00
Ben Vanik 2b798df631 lvsl/lvsr/lvlx/lvrx 2013-10-06 09:48:42 -07:00
Ben Vanik e8429b75e0 Significantly faster byte swapping on xmm read/write. 2013-10-04 22:29:19 -07:00
Ben Vanik d3bf7813ea Improve perf of vcmp cr6 update. 2013-10-04 13:32:11 -07:00
Ben Vanik e2842ea4b4 fmaddsx, fmsubx, fmsubsx, fcmpu. 2013-10-04 10:30:57 -07:00
Ben Vanik 091957e72e Untested srawx/sradix (makes things run further, at least). 2013-10-04 09:34:36 -07:00
Ben Vanik 0f5d0d992d vupkd3d d3dcolor (untested). 2013-10-03 21:06:40 -07:00
Ben Vanik 611902a97e Fixing vspltw and vrlimi. 2013-10-03 20:19:11 -07:00
Ben Vanik bdb5b0eae2 Fixing alignment of xmm load/store. 2013-10-03 20:18:56 -07:00
Ben Vanik 6d46b51ed4 A few vcmp*'s, float_16_to_32 bit of vupkd3d128 (untested). 2013-10-02 23:25:05 -07:00
Ben Vanik 21d273e85b Tracing FPRs and random fixes. 2013-09-30 22:43:29 -07:00
Ben Vanik 37caa5cea1 vnmsubfp, fixing vrlimi128. 2013-09-30 21:14:23 -07:00
Ben Vanik f5b99d7448 Fixing some altivec instruction decode issues. 2013-09-30 17:54:49 -07:00
Ben Vanik 26ec76ef35 A lot of progress on altivec instructions.
Some bad results, still, and some instructions are not decoding right.
2013-09-29 21:05:48 -07:00
Ben Vanik 3662118246 vmaddfp/vmaddcfp/vmulfp/vsubfp. 2013-09-29 00:02:25 -07:00
Ben Vanik 5652a150e1 vand/vnor/vor/vxor. 2013-09-28 23:45:16 -07:00
Ben Vanik 526b1a85b7 Simple altivec loads/stores. 2013-09-28 23:14:43 -07:00
Ben Vanik f398ccba56 Skeleton emitter file. 2013-09-28 19:52:33 -07:00
Ben Vanik 51184f73ea Disassembling a few instructions. 2013-09-28 19:37:34 -07:00
Ben Vanik f4f66ff7f1 Beginning Altivec disassembly/emitting. 2013-09-28 09:14:04 -07:00
Ben Vanik b0481472f2 Finally adding thread wait so we kill the spin loop. 2013-09-25 20:55:22 -07:00
Ben Vanik d16ab71252 Fixing %d print. 2013-09-25 20:28:42 -07:00
Ben Vanik 3e0d9af57e Placeholders for memory access breakpoints. 2013-09-25 20:13:43 -07:00
Ben Vanik 3706b9a3ce Ignoring MmFreePhysicalMemory (for now).
Games seem to be calling this with 0, which is bogus, so the bug is
elsewhere.
2013-09-25 18:38:18 -07:00
Ben Vanik 536fbbff88 Adding misc Vd functions. 2013-09-25 18:37:30 -07:00
Ben Vanik 3a6ef8cdf9 Fixing VdQueryVideoMode. 2013-09-25 18:37:13 -07:00
Ben Vanik 03a68d4c49 PerformanceCounter. 2013-09-25 18:36:34 -07:00
Ben Vanik b7fd4f975d Fixing ringbuffer pointers and no-op instructions. 2013-09-25 00:46:47 -07:00
Ben Vanik 03494c6b88 Stubbing methods and cleanup. 2013-09-25 00:46:29 -07:00
Ben Vanik 91f62918f6 Adding vblank interrupt. 2013-09-25 00:46:09 -07:00
Ben Vanik 998467ce05 Fixing cntlzd. 2013-09-25 00:21:41 -07:00
Ben Vanik 8424a668bf Basic implementation of events. 2013-09-24 21:26:45 -07:00
Ben Vanik 474ecea277 Adding stubs for SetEvent/ResetEvent. 2013-09-23 22:44:34 -07:00
Ben Vanik be1ce73a30 Fixing WaitForSingleObject timeout args. 2013-09-23 22:15:43 -07:00
Ben Vanik d0d30ab719 Implementing object table. Not complete, but better. 2013-09-22 18:36:06 -07:00
Ben Vanik 3e0db586c0 RtlNtStatusToDosError, for successes. 2013-09-22 16:45:41 -07:00
Ben Vanik d5b8a2091a Switching tracing order to prevent skipping traces of branch instructions. 2013-09-06 23:21:08 -07:00
Ben Vanik 1a3fed942d Skeleton for KeWaitForSingleObject.
Trying to figure out where D3D is getting its object from. It never seems
to create a timer/event/etc.
2013-06-30 10:27:51 -07:00
Ben Vanik 39ef8d8263 Properly using XapiThreadStartup routines, if present. 2013-06-30 10:27:06 -07:00
Ben Vanik 8d5e877a03 VdGetCurrentDisplayGamma and VdQueryVideoFlags. 2013-06-30 08:21:45 -07:00
Ben Vanik c9a39a8b62 Dumping module info on startup and logging unimplemented kernel calls. 2013-06-30 07:53:17 -07:00
Ben Vanik a62426948b Implementing enough ExGetXConfigSetting for D3D. 2013-06-30 07:52:53 -07:00
Ben Vanik 6f602d120a Adding thread ID to trace lines and cleaning up their formatting. 2013-06-30 06:09:08 -07:00
Ben Vanik 052c70efce Fixing broken opcode 63 stuff. 2013-06-02 12:01:43 -07:00
Ben Vanik b3e93a0d1d srad.
Probably right.
2013-06-02 11:33:07 -07:00
Ben Vanik 97b4fdb041 Fixing misnamed register enum. 2013-06-02 10:32:07 -07:00
Rick Gibbed eab588f29f Fixed some additional stack offsets in DbgPrint. 2013-06-02 10:12:27 -07:00
Rick Gibbed e5bfe7264b Corrected issues with DbgPrint & _vnsprintf. 2013-06-02 09:44:31 -07:00
Rick Gibbed fbaaebdb41 Oops. Tab! 2013-06-02 09:43:27 -07:00
Rick Gibbed 100b87846e Merge branch 'master' of https://github.com/benvanik/xenia 2013-06-02 08:08:17 -07:00
Rick Gibbed 9bc490579e 64-bit shim memory macros. 2013-06-02 08:07:40 -07:00
Rick Gibbed c9688bb3e9 DbgPrint & _vnsprintf implementations. VERY HACKY. 2013-06-02 08:07:03 -07:00
Rick Gibbed b97b8226b2 Fixed a crash when adding a FunctionSymbol with a NULL address. 2013-06-02 07:57:38 -07:00
Rick Gibbed 105aee506d dcbf disasm. 2013-06-02 07:56:17 -07:00
espes 388c622ecd fill in some more xenos registers 2013-06-02 17:11:54 +10:00
Ben Vanik cf57481a0e Adding basic register names. 2013-06-01 22:51:09 -07:00
Ben Vanik e00e665a09 Basic command buffer processing. 2013-06-01 21:49:14 -07:00
Ben Vanik ba16a0d847 Trying to setup writeback and add basic secondary command execution. 2013-06-01 03:08:31 -07:00
Ben Vanik 5b0fa8f17e Basic ringbuffer worker. Super hacky, not yet writing back to CPU. 2013-06-01 01:13:44 -07:00
Rick Gibbed 3667821be3 ldarx & stdcx disasm. 2013-05-31 22:01:35 -07:00
Ben Vanik 31199dd41d VdHSIOCalibrationLock. 2013-05-31 21:40:15 -07:00
Ben Vanik 4e6e27d9ac Zero KeCertMonitorData export. 2013-05-31 21:33:19 -07:00
Ben Vanik ef0032ecff Wiring up register read/write from JIT -> GPU. 2013-05-31 21:23:26 -07:00
Rick Gibbed edf3a9155b The stack address needs to start at the end of the allocated memory for the stack, not the beginning. 2013-05-31 20:55:52 -07:00
Ben Vanik d53458023e Fixing/implementing static TLS entries. 2013-05-31 10:01:32 -07:00
Ben Vanik 38efd3837d Adding support for detecting the save/rest fpr and vmx blocks. 2013-05-31 01:53:30 -07:00
Ben Vanik e6195c4086 fmadd, orc, extsh, extsw. 2013-05-31 01:00:00 -07:00
Ben Vanik 9bb36c7404 Fixing decoding of the rld* instructions. 2013-05-31 00:38:26 -07:00
Ben Vanik dc16653164 Fixing decoding of some of the opcode 63 instructions. 2013-05-31 00:09:10 -07:00
Ben Vanik 14c3b8a382 Adding a case for tail calls.
Still missing the forward tail call case, as there is legit code that
does weird branches like that.
2013-05-30 23:41:25 -07:00
Ben Vanik e7665c11eb Adding basic constant checks and updates to memory instructions.
Only those instructions likely to have immediate values have been updated.
It'd be nice to go further than this and a) centralize the ea calculations
b) move this all to the analysis pass c) generate mov's in Read/WriteMemory
using the immediates as bases instead of all the register work.

Also fixing a broken stwcx that was causing crashes.
2013-05-30 23:20:05 -07:00
Ben Vanik 78086684c6 Now tracking constant values for most operations.
This will make it easier to enable memory access optimizations and hacks.
Not all operations are updating the constant registers, only those that
are likely to participate in constant value building. Constant values are
cleared on every basic block, though this may be too zealous it prevents
weird fall-through cases.
2013-05-30 22:50:32 -07:00
Ben Vanik 7990146001 xex2 loader now guesses sizes to allocate.
This may not be right in all cases, but seems to work.
2013-05-29 23:26:34 -07:00
Ben Vanik f307bc9eb1 Adding --target= and --trace_registers flags.
--target=[xex|iso] makes it possible to specify the thing to run from a
flagfile.
2013-05-29 21:45:54 -07:00
Ben Vanik 37530d1438 Adding some required video export variables. 2013-05-29 21:26:29 -07:00
Ben Vanik 6950b21424 Reworking the memory system to not commit 3gb and to properly alloc data.
Now only 512MB is committed on startup. Loaded XEXs are placed into their
required addresses in the 0x8... range. Kernel structures are allocated
from the normal heap like other data. There should no longer be any magical
pointers.
2013-05-29 21:00:55 -07:00
Ben Vanik 61f7f6d28e Starting work on some of the Vd kernel functions. 2013-05-28 20:00:06 -07:00
Ben Vanik 2cecc02787 Skeleton GPU files. 2013-05-27 21:45:55 -07:00
Ben Vanik 16baef3591 Starting physical memory allocation routines.
These currently don't do anything special w.r.t. memory addresses/etc,
but will in the future.
2013-05-27 20:09:40 -07:00
Ben Vanik f78e7945d4 Fixing malloc alighment and duplicate calls to NtAllocateVirtualMemory. 2013-05-27 19:58:20 -07:00
Ben Vanik 1d0ec64d40 Adding srd/srw. Fixing shamts in other shifts. 2013-05-27 05:35:41 -07:00
Ben Vanik 778efdb276 fcfid(z), fctid(z) -- both largely untested. 2013-05-27 05:22:38 -07:00
Ben Vanik 84fb802166 fadd(s), fdiv(s), fmul(s), fsub(s), fsel, frsp, fabs, fmr, fneg, fnmsubs. 2013-05-27 04:09:07 -07:00
Ben Vanik fe6df31280 Finishing off the kernel method conversion. 2013-05-26 23:06:09 -07:00
Ben Vanik 64eb2aa2b3 Converting RTL methods to the new style. 2013-05-26 23:05:05 -07:00
Rick Gibbed c4e0347932 NULLs! 2013-05-26 22:53:46 -07:00
Rick Gibbed fe9cb1cddb Oops. 2013-05-26 22:46:45 -07:00
Rick Gibbed 9f06645e75 Merge branch 'master' of https://github.com/benvanik/xenia 2013-05-26 22:42:28 -07:00
Rick Gibbed 78ee6c9ee9 Added video submodule for xboxkrnl and xam modules. 2013-05-26 22:42:07 -07:00
Rick Gibbed 9eadffe461 Added float/double swap helpers. 2013-05-26 22:39:39 -07:00
Ben Vanik b87b17f51e Converting more kernel methods to the new style. 2013-05-26 22:04:12 -07:00
Ben Vanik 6e8828f843 Switching kernel files to the new style. 2013-05-26 21:37:47 -07:00
Ben Vanik fbe800aacd Preparing to enable unshimmed kernel methods that can be called directly. 2013-05-26 20:32:30 -07:00
Ben Vanik 25d8b5f8d8 Switching shim mapping macro to use ordinal constants. 2013-05-26 20:10:10 -07:00
Ben Vanik a332faf419 Adding ordinal enums to kernel modules.
Access via xe::kernel::modules::xboxkrnl::ordinals::MyFunction
(or just ordinals::MyFunction when in the namespace).
Some collisions occurred - just added random suffixes for now.
2013-05-26 19:28:46 -07:00
Ben Vanik 87b8ebd613 Forgot to switch macros. 2013-05-26 19:19:26 -07:00
Ben Vanik 9f320ba4a7 Prepping kernel export tables for various uses. 2013-05-26 18:57:41 -07:00
Ben Vanik 1b07aace73 Moving kernel functions into their proper namespaces. 2013-05-26 18:43:57 -07:00
Ben Vanik 1a5a8d748d Adding missing files to the xam gypi. 2013-05-26 18:40:51 -07:00
Ben Vanik c10d719d53 Floating point loads/stores.
Seem correct. Maybe not.
2013-05-26 17:59:11 -07:00
Ben Vanik a09170b2c6 Fixing bad EA write order. 2013-05-26 17:49:37 -07:00
Ben Vanik a6db12b48f ldx/ldux. 2013-05-26 17:43:37 -07:00
Rick Gibbed 0ca44083e6 Stick the export ordinal in the dummy address for unimplemented export data, to make it obvious what it is when debugging. 2013-05-26 17:37:31 -07:00
Rick Gibbed c29c4b067f Corrected a xam export to variable. 2013-05-26 17:23:30 -07:00
Ben Vanik b5e729f89e sld. 2013-05-26 16:30:52 -07:00
Ben Vanik 924b08b264 cntlzd and fixing broken cntlzwx. 2013-05-26 16:30:43 -07:00
Ben Vanik 86396816f5 rldicl, rldicr. 2013-05-26 16:10:25 -07:00
Ben Vanik fd86370ccc Fixing warnings on mtmsr/mtmsrd disasm. 2013-05-26 15:03:36 -07:00
Rick Gibbed 5f494a4449 Corrected many xboxkrnl exports to variable. 2013-05-26 09:46:20 -07:00
Rick Gibbed 1b3351b1e2 disasm for mfmsr, mtmsr, mtmsrd 2013-05-26 08:39:31 -07:00
Ben Vanik 82159b2b9d Adding lfd. 2013-05-26 07:19:09 -07:00
Ben Vanik 9d63eb7499 Fixing condition updates for unsigned compares. 2013-05-26 04:21:07 -07:00
Ben Vanik 5d83465ce4 Fixing branches via the indirection block.
Also disabling the local indirection optimization until it's implemented.
2013-05-26 03:59:32 -07:00
Ben Vanik 22f186d713 Better asserts/checks around bad function addresses. 2013-05-26 03:26:49 -07:00
Ben Vanik bf9e92c027 Fixing typo in disasm. 2013-05-26 02:48:31 -07:00
Ben Vanik 35ce144a37 Disasm of some memory routines. 2013-05-26 02:45:32 -07:00
Rick Gibbed 6678279ebf Corrected more issues with X_RTL_CRITICAL_SECTION, RtlInitializeCriticalSection, RtlInitializeCriticalSectionAndSpinCount. 2013-05-26 02:36:48 -07:00
Rick Gibbed d385bc6a10 Added XEASSERTSTRUCTSIZE macro. 2013-05-26 02:36:07 -07:00
Rick Gibbed 237ab5551f Oops. Fixed some formatting in previous commit. 2013-05-26 02:21:05 -07:00
Rick Gibbed 3ac3d8078d Corrected some issues with X_RTL_CRITICAL_SECTION, RtlInitializeCriticalSection, RtlInitializeCriticalSectionAndSpinCount. 2013-05-26 02:18:49 -07:00
Ben Vanik 6b851da9d7 Fixing analysis regression: don't analyze on gets during analysis pass. 2013-05-26 02:11:08 -07:00
Ben Vanik f94256aaaf Adding a simple heuristic to find leaf thunk functions. 2013-05-26 01:43:44 -07:00
Rick Gibbed 1640acaf8a mftb 2013-05-26 00:48:53 -07:00
Ben Vanik 7febbe0f86 Fixing <8b memory accesses. 2013-05-26 00:44:20 -07:00
Rick Gibbed 0855fe7014 addicx 2013-05-26 00:27:36 -07:00
Ben Vanik ab762e0009 Adding disassemblers for the fpu instructions. 2013-05-26 00:13:46 -07:00
Ben Vanik 4073028188 Very basic, super slow, nasty indirection. 2013-05-25 20:32:58 -07:00
Ben Vanik 2986a0be82 Removing debug int3. 2013-05-25 17:20:52 -07:00
Ben Vanik ce27fb333b Fixing rlwimix. 2013-05-25 17:08:31 -07:00
Ben Vanik bd8376e231 Making xenia-test run on Windows. 2013-05-25 05:20:28 -07:00
Ben Vanik edb3aabdd4 Removing llvm backend. 2013-05-25 04:28:21 -07:00
Ben Vanik eb22289dc7 Fixing bad fcmpu disasm. 2013-05-25 04:25:27 -07:00
Ben Vanik a5da226617 cntlzwx. 2013-05-25 03:23:33 -07:00
Ben Vanik de85adea2e divwx/divwux. 2013-05-25 02:49:44 -07:00
Ben Vanik 9f3f5d2c0e mullw. 2013-05-25 01:56:42 -07:00
Ben Vanik e29de199ff srawix. 2013-05-25 01:50:46 -07:00
Ben Vanik 8207bb8088 negx 2013-05-25 01:35:19 -07:00
Ben Vanik 07d0dd98b6 slwx, ignoring twi. 2013-05-25 01:31:38 -07:00
Ben Vanik ed401449b7 Only create the shared return block if required. 2013-05-25 00:45:16 -07:00
Ben Vanik da62ec56f9 Adding the ret required for tail calls. 2013-05-25 00:41:01 -07:00
Ben Vanik fb22aeb5ac Fixing assertion warnings from asmjit. 2013-05-25 00:40:30 -07:00
Ben Vanik f3552ff9a5 Implementing RtlImageXexHeaderField better. 2013-05-25 00:08:01 -07:00
Ben Vanik eac03765db Adding addx. Whoops. 2013-05-25 00:07:35 -07:00
Ben Vanik 12b2dc153e Disabling the faked KeDebugMonitorData. 2013-05-24 23:43:11 -07:00
Ben Vanik 04485b6460 rlwimix/rlwinmx. 2013-05-24 23:34:52 -07:00
Ben Vanik ef3bd6cc53 Fixing disasm of subfic, fixing neg->not, fixing tests to use 8bits. 2013-05-24 23:03:35 -07:00
Ben Vanik 6320ef6b7e Fixing conditionals to use cmp instead of test. 2013-05-24 22:21:05 -07:00
Ben Vanik 7bf69f66fd Logging out the condition register values. 2013-05-24 22:03:57 -07:00
Ben Vanik 2586c10cc5 addzex. 2013-05-24 21:54:04 -07:00
Ben Vanik 9883f32fb7 Fixing logger initialization when codegen logging is disabled. 2013-05-24 21:49:03 -07:00
Rick Gibbed ba718de434 Further corrections on cr checks. 2013-05-24 21:34:03 -07:00
Ben Vanik 1354b9975f Adding basic branch indirection, which doesn't work but is ready to do so. 2013-05-24 21:18:30 -07:00
Ben Vanik c6ed7ff9cf Fixing cr5+ checks. 2013-05-24 20:48:04 -07:00
Ben Vanik 346a27ddf8 Trying again to fix compares. 2013-05-24 20:40:00 -07:00
Ben Vanik e7556a09f8 Fixing bad or during cr0 update - need to be overwriting. 2013-05-24 20:26:06 -07:00
Ben Vanik 68f1eb7f69 Fixing carry and compare flags. 2013-05-24 20:20:18 -07:00
Ben Vanik 97b0e2aa3d Fixing comparison between two gpvars. 2013-05-24 20:09:11 -07:00
Ben Vanik 5e66f7b04b Adding a bunch of nops around trace calls.
5 before, 2 after (so it's easy to see what goes with what).
2013-05-24 19:59:51 -07:00
Ben Vanik 1ad0bb7843 cmp/cmpi/cmpl/cmpli.
May not be right.
2013-05-24 19:52:00 -07:00
Ben Vanik 6cd8495ea2 extsbx. 2013-05-24 19:45:48 -07:00
Ben Vanik 8976f1b046 subfx + subficx. 2013-05-24 19:16:01 -07:00
Ben Vanik 69ebedb43f addic + subfex. 2013-05-24 19:10:54 -07:00
Ben Vanik dc40f28795 addx and switching commenting style on the rest of the unported instrs. 2013-05-24 18:49:14 -07:00
Ben Vanik 1e67547a6b Fixing conditional branch logic. 2013-05-24 18:44:32 -07:00
Ben Vanik 2ab01af0bd Breaking on indirect branches. 2013-05-24 18:34:08 -07:00
Ben Vanik 692f85ed4f Very, very basic branching. Most compares not yet implemented. 2013-05-24 18:28:52 -07:00
Ben Vanik 7e3268621d Optimizing the mr case. 2013-05-24 17:59:01 -07:00
Ben Vanik 748bfe509f Handling null ptr in NtFreeVirtualMemory. 2013-05-24 17:33:57 -07:00
Ben Vanik 21b0d25131 Fixing memory address truncation. 2013-05-24 17:08:12 -07:00
Ben Vanik fcf478ba55 Log all incoming registers on each instruction execute. 2013-05-24 16:53:27 -07:00
Ben Vanik 15cfbd3736 The various _ptr helpers in asmjit are useless. 2013-05-24 16:34:24 -07:00
Ben Vanik e6320dada5 Most of the memory instructions.
Not sure this is correct, as it crashes pretty early on.
2013-05-24 16:16:39 -07:00
Ben Vanik e724fe3e60 Adding some ALU instructions. 2013-05-24 14:21:39 -07:00
Ben Vanik 8965caa833 Adding an option to disable register caching.
Until things work I'm not going to bother with that optimization.
2013-05-24 11:18:50 -07:00
Ben Vanik b8323c3055 Preparing some control instructions for proper emitting. 2013-05-24 03:51:58 -07:00
Ben Vanik bf8f068fa5 Disabling tail calls. 2013-05-24 03:29:21 -07:00
Ben Vanik 2242778fff Fixing trace calls. Disabling logging of redirector. 2013-05-24 02:42:41 -07:00
Ben Vanik eb9b9b0321 Adding bl (unconditional only). 2013-05-24 02:21:12 -07:00
Ben Vanik 2153256109 Fixing line endings. 2013-05-24 01:41:02 -07:00
Ben Vanik 605d66ecf6 Adding the first instructions, mfspr/mtspr. 2013-05-24 01:37:02 -07:00
Ben Vanik 71bd3c799f Local variables setup and spilling/filling. 2013-05-24 00:50:56 -07:00
Ben Vanik 376226c59a Adding basic block labels.
Probably correct.
2013-05-24 00:06:46 -07:00
Ben Vanik a81babac1e Adding comments to the disasm and implementing kernel calls. 2013-05-23 23:39:48 -07:00
Ben Vanik 74ae66aa0a Cleanup and tracing. 2013-05-23 23:22:27 -07:00
Ben Vanik d7d0b94aab x64 emitter now generating redirection blocks and patching them up. 2013-05-23 22:09:04 -07:00
Ben Vanik 12444f6305 Compiles, runs, and hangs in normal wait. 2013-05-23 18:46:09 -07:00
Ben Vanik 1b833b6789 Removing libjit backend. 2013-05-23 18:05:03 -07:00
Ben Vanik bedf86d259 Adding 'x64' backend.
Does not compile.
2013-05-23 18:04:12 -07:00
Ben Vanik 86002b2f44 Removing old llvm cruft. 2013-05-23 17:51:03 -07:00
Ben Vanik 63cee87420 Removing library loader, as it's not used. 2013-05-23 17:50:05 -07:00
Ben Vanik 57b486c4ad Removing libjit, because it is pretty terrible. 2013-05-23 17:48:01 -07:00
Ben Vanik eee856be04 Tweaking things again. Now not getting very far. Sigh. 2013-05-23 15:52:57 -07:00
Ben Vanik f08e80efbc Fixing calling into code. Interpreter can now be used. 2013-05-23 15:44:45 -07:00
Ben Vanik 9487fa027c libjit doesn't encode mov with imm64 offsets, fixing. 2013-05-23 13:55:09 -07:00
Ben Vanik 70a9a1053e The previous truncation was useless. 2013-05-23 13:16:39 -07:00
Ben Vanik 89672e111d Optimizing memory accesses a bit by letting libjit use relative addressing. 2013-05-23 11:46:26 -07:00
Ben Vanik fc8eb3d40a Adding disassembly to traces and bumping libjit. 2013-05-23 11:39:29 -07:00
Ben Vanik 730dba4aea Adding addzex. 2013-05-23 02:13:04 -07:00
Ben Vanik d6f2a0b3f0 Adding --trace_branches.
Simple output right now, can always be enhanced.
2013-05-23 01:31:41 -07:00
Ben Vanik 4495637616 Making sure shim calls are cdecl. 2013-05-23 01:04:14 -07:00
Ben Vanik 6bde04de26 Flushing logging. 2013-05-23 00:26:55 -07:00
Ben Vanik 1a01d365b5 Making code dumps conditional on --log_codegen 2013-05-22 22:01:34 -07:00
Ben Vanik fcb66660c0 (partial) addx and logging compiled addresses. 2013-05-22 21:53:21 -07:00
Ben Vanik 5cb8cf2630 Hacky ALU ops. Need overflow checks. 2013-05-22 21:14:16 -07:00
Ben Vanik 9ed911cdad Fixing comparisons and disabling OutputDebugString logging. 2013-05-22 21:11:27 -07:00
Ben Vanik 2d01dced5a Adding back invalid instruction logs. 2013-05-22 20:58:48 -07:00
Ben Vanik f2c16c24f3 Basic control instructions (no indirection branches yet). 2013-05-22 20:15:04 -07:00
Ben Vanik 1bcb3e8f92 Many more ALU instructions. 2013-05-22 18:51:06 -07:00
Ben Vanik 64b619023d Adding back in quite a few instructions. 2013-05-22 18:03:43 -07:00
Ben Vanik c0dd60bde8 Adding memory access/etc.
Needs byte swapping.
2013-05-22 15:02:26 -07:00
Ben Vanik 7227ba2693 Setting up register fill/spill. 2013-05-22 13:37:44 -07:00
Ben Vanik 16d2b73a73 Main codegen loop now running through instructions. 2013-05-22 13:10:07 -07:00
Ben Vanik dad99769cb Prepping for basic block generation. 2013-05-22 11:53:52 -07:00
Ben Vanik 33e2bc01ee Kernel call thunks and cleanup on exports. 2013-05-22 11:30:53 -07:00
Ben Vanik 37f93d2974 Calling to/from native works! 2013-05-22 11:13:27 -07:00
Ben Vanik a064e68621 Fixing more warnings. 2013-05-21 16:19:11 -07:00
Ben Vanik 720651ba9e Removing wslay socket support in prep for switch to mongoose.
Work on #21.
2013-05-21 16:16:33 -07:00
Ben Vanik 1ec06bd7d0 Tweaking compile options and switching back to VS2010. 2013-05-21 16:08:56 -07:00
Ben Vanik 85804f7415 Initial libjit skeleton.
Not currently generating instructions, but most of the flow is right up to
that point. A lot of work required to refactor the emitter, but wanted to
get this checked in.
2013-05-21 15:36:58 -07:00
Ben Vanik 94e3e592dd Making disassembly much faster by moving string processing to only the
dump path.
2013-05-19 19:32:55 -07:00
Ben Vanik 7d93795c10 Fixing Windows compilation errors. 2013-05-19 09:29:31 -07:00
Ben Vanik 1ce68ca7fe Removing LLVM submodule and build information.
Code is still present until transitioned over to libjit.
2013-05-19 09:29:22 -07:00
Ben Vanik 0aa7d1ec05 Adding libjit.
Removing some old xethunk cruft.
2013-05-19 09:23:50 -07:00
Ben Vanik b018b6fe56 Broken, incomplete, but need to move forward with rewrite. 2013-04-21 12:34:20 -07:00
Ben Vanik 4987147055 Moving disasm functions to ppc/. 2013-03-30 02:01:33 -07:00
Ben Vanik 85bdbd24d1 In-progress work: refactoring PAL not to be instanced.
This removes a lot of useless passing around of the PAL object.
2013-03-29 05:07:32 -07:00
Ben Vanik c46093266e Tracking code low/high addresses per module. 2013-02-24 11:45:16 -08:00
Ben Vanik 690e59ca3e Fixing OSX build. 2013-02-10 12:38:50 -08:00
Ben Vanik bfda368ab5 Compiling on linux. 2013-02-10 12:21:56 -08:00
Ben Vanik 3cae7ed714 Converting logging to ASCII and other Windows fixes. 2013-02-09 08:05:39 -08:00
Ben Vanik 338b890ef5 Fixing VC++ warnings and errors. 2013-02-08 22:07:38 -08:00
Ben Vanik c1e2119db4 Moving socket stuff to core/.
Stubbed win32 methods.
2013-02-06 22:55:18 -08:00
Ben Vanik 2c42ea909b Removing the dependency on OpenSSL, as it sucks. 2013-02-06 21:47:05 -08:00
Ben Vanik 7435a327f7 Windows compat fixes. 2013-02-06 10:04:34 -08:00
Ben Vanik 2521d64615 Fixing decryption key choice to be more robust. 2013-02-06 03:07:57 -08:00
Ben Vanik da23c00d31 Simple thread PAL type (until core/ is rewritten). 2013-02-06 02:44:15 -08:00
Ben Vanik 88431eadce Screw convention; moving include files alongside source files.
They now will show up in xcode/etc.
2013-02-06 02:19:50 -08:00
Ben Vanik 3dfd9c4b00 Tweaks to get the generator running on the next app. 2013-02-03 23:26:20 -08:00
Ben Vanik f1ea74dcff Setting the condition bit in stwcx. 2013-02-03 21:45:44 -08:00
Ben Vanik 7fed5cf579 Last of the integer memory instructions and a lot of the fp ones. 2013-02-03 21:41:38 -08:00
Ben Vanik 4204bc5575 More instructions. 2013-02-03 16:02:09 -08:00
Ben Vanik 59ccfdd999 Read and write map files. 2013-02-03 03:34:43 -08:00
Ben Vanik a020072ed7 Splitting up the symbol database code to make it easier to work with. 2013-02-03 00:50:39 -08:00
Ben Vanik 63f0785ecf Rearranging --abort_before_entry. 2013-02-03 00:34:45 -08:00
Ben Vanik 4f9e6b0547 More debugger work.
Posix only right now.
2013-02-03 00:29:40 -08:00
Ben Vanik 5650cf92ab Initial the websocket implementation.
Not yet running on other threads, but can read/write to a websocket from
a browser.
2013-02-02 02:50:56 -08:00
Ben Vanik c2fbafdc28 Skeleton of the debugger host. 2013-02-01 05:37:42 -08:00
Ben Vanik b6a9dfe7e0 Tweaking output. 2013-02-01 00:21:59 -08:00
Ben Vanik 44b39c797b Fixing ? operator parens issues. 2013-01-31 22:07:56 -08:00
Ben Vanik e8dd27f490 Tweaks to the tweaks.
SDB needs a rewrite.
2013-01-31 22:00:43 -08:00
Ben Vanik 837a414249 Minor tweaks to the SDB to get parsing of real games a bit further.
Unfortunately it looks like issue #10 will have to be addressed before
anything can progress :(
2013-01-31 21:40:07 -08:00
Ben Vanik 7f846afdfc Adding support for disc images.
With this, games can now be loaded! Of course, prep fails.
2013-01-31 20:11:13 -08:00
Ben Vanik f78fdba9c3 Wiring up xex loading via the new virtual filesystem.
File resolution is hacked, but works well enough for testing.
2013-01-31 16:52:50 -08:00
Ben Vanik 59189f12ab Skeleton for the virtual filesystem. 2013-01-31 13:27:00 -08:00
Ben Vanik c77bcbf879 Better module handling. 2013-01-31 11:27:05 -08:00
Ben Vanik 9cfc01940e Thread IDs in critical sections. 2013-01-31 03:01:57 -08:00
Ben Vanik 56912aa2bd Rough CriticalSection work. 2013-01-31 02:50:37 -08:00
Ben Vanik fdbd30acb7 Partially implemented string functions. 2013-01-31 00:19:48 -08:00
Ben Vanik 49af0dbc85 Real modules and threads (mostly).
Need events/waiting to get proper launch thread behavior.
2013-01-30 22:44:32 -08:00
Ben Vanik 2ecacedaa6 Cleaning up LLVM exports and adding an access violation trap. 2013-01-30 14:52:41 -08:00
Ben Vanik 23378443e8 Kernel function work. 2013-01-30 14:26:28 -08:00
Ben Vanik 42009cda88 Fixes to get things compiling on OSX again. 2013-01-30 11:03:19 -08:00
Ben Vanik 1585730ec1 Running on Windows!
Minus gflags parsing right now.
2013-01-30 02:48:34 -08:00
Ben Vanik 94d55b5056 GYP updates for Windows.
This will break OSX for a moment.
2013-01-30 02:19:38 -08:00
Ben Vanik 9e05d44723 Implementing (maybe working) Win32 memory.cc. 2013-01-30 01:45:55 -08:00
Ben Vanik ae4d8ad40e Code fixes to get things somewhat compiling on Windows. 2013-01-30 01:35:08 -08:00
Ben Vanik f117f870fb Cleaning up build warnings. 2013-01-29 20:27:24 -08:00
Ben Vanik 80d74dbe03 Implementing rlwimi. 2013-01-29 18:35:51 -08:00
Ben Vanik 9c86c29140 Setting up locals in codegen based on disassembly results. 2013-01-29 17:47:34 -08:00
Ben Vanik d3054839b7 Now tracking register accesses for each function. 2013-01-29 13:07:59 -08:00
Ben Vanik d1333db404 Disassembly for implemented control/memory instructions. 2013-01-29 01:55:03 -08:00
Ben Vanik 8a560e4cbe Adding disassembler bits for alu. 2013-01-29 00:41:39 -08:00
Ben Vanik 775c97bf53 Beginning work on disassembler functions.
Ideally, this would be automated, but it's easier to just do it manually.
2013-01-28 21:37:03 -08:00
Ben Vanik 7b62fa96bd Progress on ghetto memory allocator. 2013-01-28 21:36:03 -08:00
Ben Vanik 0fde6135a0 Fixing XO instruction decoding. 2013-01-28 15:31:46 -08:00
Ben Vanik 9b0cb94e43 Fixing kernel exported variables. 2013-01-28 14:51:23 -08:00
Ben Vanik 9ad6bb917f RtlImageXexHeaderField stub. 2013-01-28 14:25:16 -08:00
Ben Vanik e93908dd72 Skeleton code for more kernel calls. 2013-01-28 13:28:22 -08:00
Ben Vanik 6c4af5aa70 Kernel calls and variables now working and tracing better. 2013-01-28 12:36:39 -08:00
Ben Vanik 5c2060af72 Now running up to the first required kernel call.
If memory address validation is turned off it runs a lot further.
2013-01-28 03:03:37 -08:00
Ben Vanik 46d5a0b51d Executing a bunch of instructions!
Very hacky module startup code, but can now start XEXs! Time to start
implementing kernel stuff.
2013-01-27 22:14:24 -08:00
Ben Vanik 92a3e19cd9 Fixing to allow multiple executions/process. 2013-01-27 19:33:57 -08:00
Ben Vanik 12d9c3d15e First instruction executed in the test runner!
Fixes #7.
2013-01-27 17:49:32 -08:00
Ben Vanik bba99d4a22 Refactoring to allow for raw binary loading. 2013-01-27 12:48:10 -08:00
Ben Vanik d9b08f569f Adding a bunch of instructions. 2013-01-26 21:51:31 -08:00
Ben Vanik 733fe85d37 Cleaning up function registers and setting up CR. 2013-01-26 01:25:31 -08:00
Ben Vanik 9b3d96a8ae Cleaning up instruction decoding names to match the docs better. 2013-01-25 23:45:13 -08:00
Ben Vanik ffdc1e5d4b Hacking on some instructions. 2013-01-25 23:32:37 -08:00
Ben Vanik ebda245773 Better handling of invalid/unimplemented instructions. 2013-01-25 00:51:56 -08:00
Ben Vanik dcb958de54 Adding better register tracking through locals and fixing branches.
LLVM does an amazing job of optimizing this. There are many opportunities
to make it better, too, by preventing spilling where not required or only
spilling/filling things when needed.
2013-01-25 00:32:42 -08:00
Ben Vanik 47481fecf7 Adding tracing methods. 2013-01-24 00:10:24 -08:00
Ben Vanik 385a4ee23b Cleaning up function creation. 2013-01-23 22:38:59 -08:00
Ben Vanik a10a05b6f2 Misc output cleanup and a test run script. 2013-01-23 21:59:26 -08:00
Ben Vanik 860a0739ec Adding gflags to handle command line flags.
It sucks, but is the best there is without using boost.
2013-01-23 21:31:23 -08:00
Ben Vanik 91f9e8b7bb Generating a lot of code!
Still a few missing instructions/variants and other issues, but a big and
valid LLVM module is being generated.
2013-01-22 00:22:27 -08:00
Ben Vanik 791f14182c Fixing a bunch of valgrind errors and reworking globals. 2013-01-21 14:31:59 -08:00
Ben Vanik b29dd22850 Adding instruction emitting functions.
All empty, all ready to go!
2013-01-21 11:55:42 -08:00
Ben Vanik 95a8be078b Rearranging code a bit to keep things cleaner. 2013-01-21 10:58:52 -08:00
Ben Vanik b91d550ef1 Adding instruction generation loop.
Not yet doing anything, but close.
2013-01-21 01:11:57 -08:00
Ben Vanik 25af5f410a Cleaning up the names in imports/functions. 2013-01-21 00:13:00 -08:00
Ben Vanik 68cc34bb79 Fixing up basic block targets and such. 2013-01-20 17:27:49 -08:00
Ben Vanik 852536ae0a Basic function analysis.
Finds basic blocks and estimates proper function bounds.
Seems legit for compiled code.
2013-01-20 16:46:08 -08:00
Ben Vanik d4b0bf73c1 Prepping flow for basic block building. 2013-01-20 09:48:39 -08:00
Ben Vanik ca2908db32 Converting everything to C++ cause I'm a masochist. 2013-01-20 01:13:59 -08:00
Ben Vanik 8a5dcbc1dd Hacky state for instruction gen. 2013-01-19 11:04:22 -08:00
Ben Vanik ea5154af0f Codegen experimentation. 2013-01-19 05:26:01 -08:00
Ben Vanik c18e94c5be Fleshing out the symbol database.
Now detecting a lot of functions via method hints and generating stub
functions. A few holes (in the test xex), but enough to move forward with
codegen.
2013-01-17 23:18:09 -08:00
Ben Vanik 6c5432eb45 Symbol database skeleton. 2013-01-14 00:02:24 -08:00
Ben Vanik bfec194533 Adding instruction table and basic PPC state.
Can decode a single instruction.
2013-01-13 21:25:28 -08:00
Ben Vanik 099e37490a Work on CPU, codegen skeleton, and thunk. 2013-01-13 15:48:18 -08:00
Ben Vanik 2f4bc598e5 CPU skeleton. 2013-01-13 00:34:08 -08:00
Ben Vanik bcd575f9b0 Massive dump of xenia-info required code.
This is a working xenia-info for xex files (no gdfs files yet).
2013-01-12 23:25:41 -08:00
Ben Vanik 7e4a9220d7 Initial project skeleton.
This includes a working gyp-based build of an executable that uses LLVM.
2013-01-11 01:23:08 -08:00