Commit graph

953 commits

Author SHA1 Message Date
Tyler Stachecki
440c51fef2 Add modified functions for RSP. 2014-10-18 11:32:43 -04:00
Tyler Stachecki
71961f0b00 Implement the RSP decoder. 2014-10-18 11:32:36 -04:00
Tyler Stachecki
b20b138d99 Add the RSP opcode entries. 2014-10-18 11:32:27 -04:00
Tyler Stachecki
f569e5f839 Fix bug that produced false-positive error codes. 2014-10-18 09:20:19 -04:00
Tyler Stachecki
e9a24f09d6 Patch some undefined behaviour.
Cast to an unsigned type before shifting to avoid shifting a
negative value to the left. Unlikely to impact integrity of
generated code; more of a correctness commit.
2014-10-17 08:49:14 -04:00
Tyler Stachecki
62a5d5807b Fix Clang x86(_64) builds, add AddressSanitizer to debug. 2014-10-17 08:45:34 -04:00
Tyler Stachecki
7ed4d51b01 Use signed types for DMULT.
Thanks, krom!
2014-10-04 22:29:18 -04:00
Tyler Stachecki
971bcd131b Prevent namespace collisions. 2014-09-04 13:45:57 -04:00
Tyler Stachecki
6c4d9569d3 arch/x86_64: Fix a precedence issue in tlb_read. 2014-09-04 13:30:42 -04:00
Tyler Stachecki
62f452b4ab Fix an error in the SDL/SDR implementation. 2014-08-31 13:13:27 -04:00
Tyler Stachecki
d7aaff460d Fix a potential issue in the last commit.
request->size need not be >= 4 for SDL/SDR; fix it.
2014-08-31 12:11:29 -04:00
Tyler Stachecki
17010317ab Implement SDL/SDR. 2014-08-31 11:59:52 -04:00
Tyler Stachecki
e58dc2cef2 Add/adjust C-pad and D-pad, sensitivity mappings. 2014-08-30 14:58:28 -04:00
Tyler Stachecki
b921f65710 os/unix: Detect and delete auto-repeated keypresses.
Ignore auto-repeat KeyPress and KeyRelease events sent by X11.
Thanks go out to Nacho for originally reporting this bug.
2014-08-30 11:57:41 -04:00
Tyler Stachecki
1e0b850ef5 Add a missing break statement. 2014-08-28 22:50:51 -04:00
Tyler Stachecki
aba60c487b Flip backwards controls, remove memory delay hack. 2014-08-27 23:22:18 -04:00
Tyler Stachecki
0d15bd9ddc Add some preliminary input support. 2014-08-27 23:13:08 -04:00
Tyler Stachecki
ee44e46abb os/windows: Add keyboard press and release events. 2014-08-27 19:10:03 -04:00
Tyler Stachecki
d011d9b5f5 Fix some obvious common TLB bugs. 2014-08-26 22:58:21 -04:00
Tyler Stachecki
99a6b1ee28 os/unix: Add keyboard press and release events. 2014-08-26 22:44:27 -04:00
Tyler Stachecki
3ed2957de7 Fix a careless mistake in the last commit. 2014-08-24 21:53:30 -04:00
Tyler Stachecki
dad4626533 Fix the showstopping coherency bug.
This bug is the result of an optimization gone wrong. To keep
performance high, we cache the last-used MIPS instruction and data
segments (useg, sseg, kseg, uxseg, etc.), instead of recomputing the
segment 1-2x per cycle (it's expensive).

Unfortunately, this means that the segments need to be manually
invalidated at certain points, lest one risks using a segment which
may no longer be valid. This was the case for this bug, in which the
segments were not invalidated following an ERET (exception return).
2014-08-24 20:58:16 -04:00
Tyler Stachecki
315a1220c7 Add a temporary fix to restore builds on MSVC. 2014-08-24 11:20:04 -04:00
Tyler Stachecki
d839dd57a3 Remove some bogus, unnecessary logic. 2014-08-24 00:36:21 -04:00
Tyler Stachecki
1fcc6254ff Remove a pair of fall-through branch targets. 2014-08-23 23:56:37 -04:00
Tyler Stachecki
d72a7d38ef Last batch of TLB translation fixes. 2014-08-23 23:52:52 -04:00
Tyler Stachecki
404bbb9253 Use the correct page mask value. 2014-08-23 22:36:46 -04:00
Tyler Stachecki
6ef9115668 Fix a bunch of TLB translation bugs. 2014-08-23 22:10:46 -04:00
Tyler Stachecki
e6bc8ebe64 Add more TLB support, verify things. 2014-08-23 20:06:45 -04:00
Tyler Stachecki
aba5b13ba1 Fix MFC1 now that FS/FT handling is correct. 2014-08-23 16:59:24 -04:00
Tyler Stachecki
c7e09f90bd Add enough support for libdragon to run. 2014-08-23 16:25:35 -04:00
Tyler Stachecki
84deb2fd6b Set available RDRAM size for 6102/6105 carts. 2014-08-23 15:59:15 -04:00
Tyler Stachecki
c6c6b2782d Fix a very subtle bug in the segment cacher. 2014-08-23 15:22:50 -04:00
Tyler Stachecki
5f5d4da9a6 Commit preliminary (untested) TLB support. 2014-08-23 14:24:21 -04:00
Tyler Stachecki
925e1e2dcd Make sure SSSE3 flags are passed to GCC/Clang. 2014-08-22 08:44:00 -04:00
Tyler Stachecki
2b94264a92 Pass IW to each opcode function.
Instead of having almost every opcode function load IW off the
stack through the VR4300 pointer, just pass it as an argument on
the stack to reduce binary size and hoist a load up.

Thanks go out to Narann for this idea.
2014-08-22 07:54:53 -04:00
Tyler Stachecki
53c875b06c Support more ops within the CACHE instruction. 2014-08-21 21:46:53 -04:00
Tyler Stachecki
266b77bd5c Remove a useless state/cycle type. 2014-08-21 21:45:50 -04:00
Tyler Stachecki
d1d03d36bf Remvoe the pseudo-fault (UNC). 2014-08-21 21:45:30 -04:00
Tyler Stachecki
156b41d6a1 Optimize writes that hit in the data cache. 2014-08-21 21:43:21 -04:00
Tyler Stachecki
da980ed4d2 Fix up some sloppy hacks from before. 2014-08-21 21:43:16 -04:00
Tyler Stachecki
172d61358f Actually start using the data cache. 2014-08-21 21:43:11 -04:00
Tyler Stachecki
81c799576a Fill and flush data cache lines as required. 2014-08-21 21:43:07 -04:00
Tyler Stachecki
04a40ccc91 Implement DCM/DCB according to the manual. 2014-08-21 21:43:00 -04:00
Tyler Stachecki
3ef365b78f Move data memory writes to fault handlers. 2014-08-21 21:42:48 -04:00
Tyler Stachecki
f95d6c80af Make data cache accesses less painful to look at. 2014-08-21 21:42:09 -04:00
Tyler Stachecki
7ed69c7d38 Fix MI_INIT_MODE_REG bug.
MI_INIT_MODE, MI_EBUS_TEST_MODE and MI_RDRAM_REG_MODE bits
were begin unconditionally masked out, even when not explicitly
asked.

Thanks to bsmiles32 for pointing out this bug.
2014-08-21 20:45:03 -04:00
Tyler Stachecki
13eb205caf Fix bugs in LDL/LDR combined function.
Thanks to Nacho for reporting this bug.
2014-08-21 20:41:22 -04:00
Tyler Stachecki
2a7cbe9f20 Fix some Windows issues introduced in last commits. 2014-08-21 09:40:46 -07:00
Tyler Stachecki
38ba3f7893 Fix x86_64 build errors in last commits. 2014-08-21 12:24:08 -04:00