Commit Graph

42 Commits

Author SHA1 Message Date
Stenzek 2b4c7d12b6 Common: Merge MathUtils.h into BitUtils.h 2023-07-23 21:52:36 +10:00
TellowKrinkle 738c8cb630 Core: Remove trailing whitespace from all files 2022-09-16 00:52:28 -05:00
kojin 8fdaaa2eab common: reorganize 2021-09-04 18:28:07 -04:00
Dylan Smit 65ee46c0fb
misc: Added the PlayStation name properly. (#3915) 2020-12-06 10:27:51 +01:00
refractionpcsx2 d520f3852b Missed some more code from testing.
I do know what I'm doing I swear
2018-09-04 20:52:17 +01:00
refractionpcsx2 50e3474b60 Missed a debug log. 2018-09-04 20:51:07 +01:00
refractionpcsx2 3c5fad7ef6 Reverted shift register stuff back to how it was, my changes made no difference now and it was slightly more optimal before.
Also fixed spaces (blame PSI :P )
2018-09-04 20:45:28 +01:00
refractionpcsx2 f7fb0f686b Fixed MFSA/MTSA, of course there's a game that abuses it (Rayman 3) 2018-09-04 20:26:36 +01:00
refractionpcsx2 8b0114596b Just adding some comments to MMI fix. 2018-07-31 18:48:51 +01:00
refractionpcsx2 1e0b0605a6 Corrected MMI PMADDW and PMSUBW on the Interpreters thanks to DobieStation for finding the fix 2018-07-31 18:45:32 +01:00
refractionpcsx2 69888e5ab0 EE Rec/Int: Removed micro optimisation in QFSRV/MSTAB/MSTAH. Reverted functionality to match the documentation. There were some scenarios that weren't really accounted for, like developers doing what they're told not to do. 2018-07-15 13:14:46 +01:00
Huud c56ac2cf3e PCSX2: Remove Unused And Unneeded Argument. (#1799)
EE interpeter: remove unused argument

rdd is neither used, nor needed. It appears it was there to pass the _Rd_ word to write to, but the writing was moved to PHMSBH() to have one "if (_Rd_)".

Add a note on undefined behavior
2017-02-01 11:30:41 +01:00
Gregory Hainaut 46a2f6ed24 interpreter: fix a subtle bug in a QFSRV
Math is correct but a shift of 64 bits is illegal in x86 because the cl register is masked

From the x86 spec:
    The destination operand can be a register or a memory location. The count operand can be an immediate value or
    the CL register. The count is masked to 5 bits (or 6 bits if in 64-bit mode and REX.W is used). The count range is
    limited to 0 to 31 (or 63 if 64-bit mode and REX.W is used). A special opcode encoding is provided for a count of 1.
2016-01-12 19:29:10 +01:00
refractionpcsx2 5b4eb65e68 eeInt: Fix logically dead code in PMFLH.
-Coverity CID 146817: In R5900::​Interpreter::​OpcodeImpl::​MMI::​PMFHL(): Code can never be reached because of a logical contradiction (CWE-561)
-This code is used by both the Interpreter and Recompiler, however it was probably never checked because nothing much uses it. Out of 248 games, it was called 0 times.
2015-10-04 13:34:37 +01:00
Jonathan Li 0a0008cf97 Rename Utilities/Math.h to Utilities/MathUtils.h
Math.h conflicts with <math.h> on Visual Studio and causes the utilities
project to fail. Rename it to MathUtils.h instead.
2015-08-09 22:41:18 +01:00
Miguel A. Colón Vélez 1cb47f3c80 Fix the messy revert.
Because someone had to do it.
2015-08-09 10:01:56 -04:00
refractionpcsx2 72b828ef0d Finish previous revert as TortoiseGit failed epicly at it. 2015-06-10 10:11:06 +01:00
Sacha 5287de930b Create a Math.h utility. Use it for count leading sign bits, used in MMI. 2014-08-28 00:42:53 +10:00
ramapcsx2 c47e1ed6e9 Couple clarifications and fixed warnings.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4367 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-02-26 03:20:58 +00:00
cottonvibes 807bd9659c pcsx2 mmi: apparently msvc does an unsigned compare jump when you have:
int src; if (src < 0xffff8000) {}
so solution is either use (int)0xffff8000 or -0x8000...
it also doesn't seem to print out warnings about this either D:

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3712 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-09-01 02:03:10 +00:00
cottonvibes f438a8c8a3 pcsx2 MMI: another fix for PMFHL_CLAMP.
The dst param was never being modified since it was being passed by value instead of by reference. This leads me to believe the rest of MMI.cpp is probably riddled with errors too.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3698 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-08-29 05:13:12 +00:00
gregory.hainaut@gmail.com 72ca36954b pcsx2 MMI: u16 -> u32 for src parameter of PMFHL_CLAMP.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3696 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-08-27 17:51:40 +00:00
Jake.Stine 8375b0a989 Refactoring:
* Added __fi and __ri, which are abbreviations for __forceinline and __releaseinline.
 * Added some static qualifiers to functions in mVU, MMI ops, and others where appropriate.
 * Removed some unnecessary __fastcall qualifiers (since GCC gets funny sometimes when you combine __fastcall and inlining).
 * Made _1mb, _16mb, _1gb values common to all emulation code (moved from newVif/mvu to Common.h) -- they're useful! :)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3624 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-08-09 04:10:38 +00:00
Jake.Stine 70d47bf240 Copyright 2010 : PCSX2 and plugins! (notable exception: didn't update copyright info in any Gabest plugins)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2937 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-05-03 14:08:02 +00:00
Jake.Stine 1dced84153 Linux compilation fixes and fix some signed/unsigned stuff in IsoReader.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2217 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-11-18 16:53:44 +00:00
arcum42 ba37f31849 Trim and tweak a bunch of includes, and a few headers.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2197 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-11-14 12:02:56 +00:00
Jake.Stine 653d09e821 Lots of new code maintenance stuffs:
* Completely new assertion macros: pxAssert, pxAssertMsg, and pxFail, pxAssertDev (both which default to using a message).  These replace *all* wxASSERT, DevAssert, and jASSUME varieties of macros.  New macros borrow the best of all assertion worlds: MSVCRT, wxASSERT, and AtlAssume. :)
 * Rewrote the Console namespace as a structure called IConsoleWriter, and created several varieties of ConsoleWriters for handling different states of log and console availability (should help reduce overhead of console logging nicely).
 * More improvements to the PersistentThread model, using safely interlocked "Do*" style callbacks for starting and cleaning up threads.
 * Fixed console logs so that they're readable in Win32 notepad again (the log writer adds CRs to naked LFs).
 * Added AppInit.cpp -- contains constructor, destructor, OnInit, and command line parsing mess.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1950 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-04 08:27:27 +00:00
Jake.Stine d2fbb22076 Upgraded PCSX2 core and utilities to GPLv3.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1783 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-09-08 12:08:10 +00:00
Jake.Stine 3b10771c36 Got rid of that old 'params' mess on console logs. Not needed anymore since wxwidgets has nicer built in formatting options (never liked it anyway)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1782 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-09-08 05:37:40 +00:00
arcum42 8e3d3080c0 Get rid of Decode_XA. A few minor changes.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1235 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-05-22 00:35:09 +00:00
arcum42 52fcc69628 Apply r1046 to ZeroGS DX as well. Ifdef a few things from r1047 so Linux compiles. A few minor changes.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1048 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-04-23 13:15:44 +00:00
ramapcsx2 157e696182 - Various fixes to MMI and more changes to opcodes to mimic ps2 behavior, thanks to Nneeve.
- Brought back a gamefix for Persona games. They still have missing geometry without it (VU clip flag problem)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@835 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-03-22 19:40:43 +00:00
ramapcsx2 2afa8bb7b3 2 more things by Nneeve. Let's see:
A few changes to the full fpu mode, so it behaves as erratical as the ps2 fpu.
And a fix for a MMI opdcode.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@828 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-03-20 18:50:54 +00:00
Jake.Stine 207e0345e0 SPU2-X (Linux): Did some preliminary work on the Alsa driver.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@664 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-03-03 04:50:26 +00:00
Jake.Stine f270064b41 Committing the beginnings of a new PS2 Exception Handler! This is very much a work in progress, but it shouldn't really break (or fix) anything in its current state.
EE Interpreters: Fixed some signed/unsigned mistakes in some instructions, namely DIVU, DIVU1, unsigned Traps, and a couple unsigned right shifts.  (all of these were already emulated correctly in the recs)

Also: Removed the ThreadPriority stuff from Pcsx2, since it was a throwback to the days of Win95's unstable multitasker. If you really really feel like you need to change the thread priority of Pcsx2, use the Windows Task Manager or a third party util.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@654 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-03-01 21:49:17 +00:00
Jake.Stine 243e4fba9f Added several important variables to the VIFdma savestate, relating to it's SSE unpacker; which should make the gifdone savestate hack obsolete (it broke savestates for most FMVs and some games). Seeing how important the unpacker tables are, it's a miracle VIFdma ever recovered from a savestate without them ;)
Fixed a bug in the memorycard hotswapper.  It wasn't reloading the cards correctly after changes.

Improved the new INTC hack slightly, and changed its description since it's not quite as universally awesome as Pseudonym and I had hoped when we worked on it last night. -_-

Added __fastcall and __forceinline to some of the VIF's unpack functions, where appropriate (very small speedup).

Removed some code I added to the MULT/DIV instructions, since it wasn't needed afterall, and fixed some typos in vtlb's API.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@538 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-02-19 22:48:05 +00:00
Jake.Stine 3532ebada0 Added Nneeve's fix for recMADDU (it was using the IMUL instruction which would have produced potentially incorrect results in rare cases).
Cleaned up some of the signed/unsigned ambiguity surrounding MULT/MULTU instructions.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@533 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-02-19 09:59:02 +00:00
ramapcsx2 058ec7db30 A few fixes for MMI stuff by tmkk, and disabled a logging printf in release builds.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@526 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-02-18 14:03:35 +00:00
ramapcsx2 33d5c66ac7 Lots of work from tmkk. This update adds recompiling for several MMI opcodes, fixes bugs and adds SSSE3 detection.
Thanks again, tmkk! :)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@522 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-02-17 23:29:47 +00:00
Jake.Stine fe6f45e45e Updated the Copyright to reflect the passing of another year. :)
Updated the pcsx2_suite_2008.sln; changed SPU2ghz to SPU2-X.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@502 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-02-15 23:23:46 +00:00
Jake.Stine 6ebfae8ef1 Re-Added eol-style:native properties to the repository. The settings got lost when we merged from Playground to Official.
Added interface.cpp (plugin/pcsx2 interface) and savestate.cpp to SPU2ghz, to help clean up SPU2.cpp.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@463 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-02-09 21:15:56 +00:00
refraction aa94c30dc3 Should be the last of the trunk, gotta finish the branches/tags, but thats the main bulk transferred.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@426 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-02-06 20:04:37 +00:00