iMMI.cpp: Removed mucho dead pre-SSE2 code. (old code can be grabbed from a tagged revision, in case it's useful for future reference).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1011 96395faa-99c1-11dd-bbfe-3dabce05a288
-Added a safety to the VU cycle stealing hack, so it doesn't go berserk :p
Note:
Due to the changed cycle count a lot of games will get "slower".
Especially FMV will be affected.
This is unfortunate, but correct emulation comes first.
You can however enable the ee sync speedhacks, as they're more stable now as well.
This can bring back the lost speed.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@999 96395faa-99c1-11dd-bbfe-3dabce05a288
Also: Reverted the addition of the ImplementationHelper<> class, since it failed miserably under GCC. -_-
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@998 96395faa-99c1-11dd-bbfe-3dabce05a288
* Added MUL/DIV/IMUL/IDIV to the emitter, renamed as UMUL/SMUL respectively (to remove ambiguity of the instruction behaviors).
* Fixed a bug in the shift instruction emitter that would have caused it to emit the wrong instruction type (like a SHR instead of a SHL, for example).
* Added type strictness to the shift instructions that take the CL register as a parameter. Passing anything other than CL will generate compile time errors now.
* Fixed a syntax error in one of the legacy defines.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@986 96395faa-99c1-11dd-bbfe-3dabce05a288
-minor change
microVU:
-fixed a lot of various errors
-partially implemented some clip flag stuff
-partially implemented some branch/jump stuff
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@981 96395faa-99c1-11dd-bbfe-3dabce05a288
<JakeStine>cotton: your commits always contain "stuff"
<JakeStine>I think you should rename one of your files to "microVU_stuff"
<Dwarg>And maybe others called "microVU_junk" and "microVU_crap"
<Dwarg>Then you could be much clearer
<Dwarg>"Fixed some junk, broke some crap, added some stuff...."
<JakeStine>lol
<cotton>lol
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@972 96395faa-99c1-11dd-bbfe-3dabce05a288
* added implementations for MOV and Shift instructions (SHL, SHR, ROL, ROR, etc).
* Improved compilation optimization considerably, by improving inlining selection in cases where constant propagation can be resolved reliably.
* Moved lots of code around, so that the new emitter and the legacy emitter are more clearly separated; and renamed some vars.
* Changed recompilers to initialize the recBlocks array to 0xcc instead of 0xcd (fills the blocks with the single-byte instruction INT3, which fixes the misalignment mess that would sometimes happen when using disasm views on the RecBlocks contents).
* Switched back to /O2 (Optimize for Speed) instead of /Ox, since MSVC (for me) generally fails to optimize Thread-Local storage in /Ox mode.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@971 96395faa-99c1-11dd-bbfe-3dabce05a288
--Uses BTS + bit arrays for manual block tracking, instead of full invalidation.It makes some games much much faster and doesn't seem to affect he rest (still, testing is needed).Okami that uses some sort of SMC works .. but i'm sure there are some bugs left in it
git-svn-id: http://pcsx2.googlecode.com/svn/branches/vtlb-exp@951 96395faa-99c1-11dd-bbfe-3dabce05a288
- added microVU_Execution.inl
- dispatcher stuff is now recompiled with pcsx2's emitter instead of using inline asm, its cleaner than inline asm and its more portable since the asm won't have to be ported to GCC.
- lots of first-pass implementation for lower opcodes
- implemented documented branch behavior (first pass stuff only)
Note: theres some undocumented stuff branches do according to Nneeve's tests, but i won't implement those for now since 99% of games shouldn't need it, and according to the tests, the behavior seems kind-of random/erratic.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@948 96395faa-99c1-11dd-bbfe-3dabce05a288
Modified VU stalling logic of MR32 and MTIR instructions and modified FDIV stalling.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@927 96395faa-99c1-11dd-bbfe-3dabce05a288
-fixed rm instructions to work with Jake's emitter changes
-implemented the case where upper and lower instructions write to same reg at once (the lower instruction's result is discarded)
-implemented more first pass analyzing stuff
-fixed various bugs...
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@924 96395faa-99c1-11dd-bbfe-3dabce05a288
* Fixed a couple potential bugs in some Rm forms of MMX instructions.
* Improved compilation times by isolating BaseBlockEx.h to the files the needed it (it uses STL junks).
* Removed some dead code form emitters and BaseBlockEx.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@921 96395faa-99c1-11dd-bbfe-3dabce05a288
Cleaned up multitap code a little in both PCSX2 and LilyPad.
Some extra safety checks in LilyPad when loading state.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@906 96395faa-99c1-11dd-bbfe-3dabce05a288
- removed some obsolete 'iCWstate' code.
microVU:
- implemented more rec first pass stuff for the lower instructions.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@903 96395faa-99c1-11dd-bbfe-3dabce05a288
fixed 1-cycle branch delays
fixed an issue with FDIV instructions whose operands are vf00
EE:
fixed recompilation of SRA and SRL when shift amount is 0
fixed conditional recompilation #defines a bit
(as an aside, this fixes a crash in Ratchet and Clank, but the game has other issues)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@895 96395faa-99c1-11dd-bbfe-3dabce05a288
Since it can't be fixed without further code in superVU, full revert for now :/
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@888 96395faa-99c1-11dd-bbfe-3dabce05a288
Emitter: Added Rm/RmOffset forms for AND32 - Untested. I'm pretty sure they're valid instructions but I could be wrong.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@883 96395faa-99c1-11dd-bbfe-3dabce05a288
<cotton>but i guess i shouldn't do that on the svn :D
<cotton>or maybe i can >.> <.< >.>
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@878 96395faa-99c1-11dd-bbfe-3dabce05a288
- Moved one global variable for the VU interpreters, which surprisingly speeds up Star Ocean 3 for me.
- Set Flush to Zero for FPU and VU back to on. Let's see how long it lasts this time :p
- Removed the FFX hack from pcsx2! It's still toggled in the GS plugins, the correct behaviour is having it always on.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@848 96395faa-99c1-11dd-bbfe-3dabce05a288
- 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
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
Reduced the BIOS rom warnings from gaudy red text and stars to simple yellow warnings (since they really don't matter).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@805 96395faa-99c1-11dd-bbfe-3dabce05a288
turns out there only needs to be 1 instance of it, so i had to fix all opcodes that use ACC.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@795 96395faa-99c1-11dd-bbfe-3dabce05a288
This broke Fatal Frame (yes, again..).
Thanks to Nneeve for finding and fixing it so fast :)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@793 96395faa-99c1-11dd-bbfe-3dabce05a288
Grandia 2 is still broken but this is a little faster, less clear happy and "impossible block clearing failures" shouldn't occur any more.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@770 96395faa-99c1-11dd-bbfe-3dabce05a288
Removed the rest of the references to the UseGui global boolean since it wasn't used anymore.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@761 96395faa-99c1-11dd-bbfe-3dabce05a288
the idea is that with SSE, doing operations that don't modify all the vectors can give false-dependencies, and in some situations prevent CPU's out-of-order execution (slows things down).
so the solution is to only use stuff like "movss" when you need to preserve the upper 3 vectors, if not, its always better(faster) to use movaps.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@751 96395faa-99c1-11dd-bbfe-3dabce05a288
note: most of the microVU EFU opcodes are implemented with completely different algorithms than zerorecs. this might prove to be more accurate, but i mainly did it to avoid using x87 FPU instructions (since i'm using mmx regs for storage).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@749 96395faa-99c1-11dd-bbfe-3dabce05a288
<drk||Razi>cotton2: write more helpful logs kthx ;p
<cotton2>doesn't matter, no-one cares what i write since it doesn't effect anything for now
<Krakatos>cotton, stop posting those useless commit comments XD
<feal87>no no, please continue. they're fun, i look forward to read them
<feal87>from time to time
<feal87>:°D
<cotton2>lol :D
<Dwarg>Please spend more time making them more amusing.
<drk||Razi>cotton2: it does matter
<cotton2>dwarg: yeah i know!
<Dwarg>drk||Raz: Why? They're useless for reversion testing
<cotton2>i have to think of good stuff to write :O
<drk||Razi>when the next vu coders (if any, ever ;p) want to look at your code .. and the history is full of crap
<drk||Razi>that won't be much useful
<drk||Razi>;p
<cotton2>there won't be a next vu coder!
<Dwarg>Comments in the actual code would be more useful, wouldn't they?
<cotton2>my code is perfect!
<drk||Razi>lol
<cotton2>>.> <.<
<cotton2>but seriously
<cotton2>i don't think it can get better
<cotton2>unless like
<Dwarg>Rather than going back and comparing SVN comments to changes made way back when
<cotton2>you want to support AVX
<cotton2>or w/e intel's new SSE thing is called
<feal87>and anyway AVX is like 3 years away
<feal87>in that timeline pcsx2 i think will be stabilized
<feal87>:°D
<cotton2>yeah
<drk||Razi>cotton2: just log kthx
<drk||Razi>implemented y,x,z
<drk||Razi>:>
<cotton2>thats what the diffs are for!
<feal87>and anyway really its useless for this stage
<drk||Razi>yea i know
<feal87>until microVU is active and used by PCSX2
<cotton2>i'm just implementing different opcodes though, its not like i'm chaning features
<drk||Razi>you can tell anything from the code -- no comments or changelog needed.Right ? ;p
<feal87>then every change should be documented for regression testing
<cotton2>drk: yup!
<cotton2>well
<cotton2>its not like i'm changing stuff
<cotton2>i'm just implementing things that havn't been coded
<cotton2>so theres nothing to regress to
<feal87>yep
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@742 96395faa-99c1-11dd-bbfe-3dabce05a288
Appended notes:
* ADD in iFPUd should be bit accurate (unless it isn't. needs TESTING)
* MUL in iFPUd with Software Emulate MUL is as much as I could get near bit accurate (not quite enough, probably. needs TESTING)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@728 96395faa-99c1-11dd-bbfe-3dabce05a288
* Fixed Memcard init so that Memcard1 isn't default in both slots (oops!)
* Fixed Memcard path logic so that cards outside your pcsx2 folder can be browsed/selected.
* Fixed CDVD-to-BIOS time sync (I simply forgot a function call!)
* Optimized yuvrgb_sse2, by using Mod/RM form instructions.
* Win32: Same optimization applied to FreezeXMMRegs and FreezeMMXRegs (linux already had this optimization)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@719 96395faa-99c1-11dd-bbfe-3dabce05a288
Pcsx2: Small speedup for the IOP's recClearMem (used a forceinline to cure MSVC's laxidazical inlining)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@714 96395faa-99c1-11dd-bbfe-3dabce05a288
Savestates: Pcsx2 now errors when it encounters a savestate made by a newer version of pcsx2.
Added a new SafeList type to the SafeArray collection (not well tested yet).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@701 96395faa-99c1-11dd-bbfe-3dabce05a288
Removed various instances of legacy VM code that is no longer needed for reference purposes.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@695 96395faa-99c1-11dd-bbfe-3dabce05a288
Fixed up the Saveslot detection somewhat (File:Load > menu now greys out unavailable saveslots).
Applied ICC fixup patch from Issue 84. :)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@677 96395faa-99c1-11dd-bbfe-3dabce05a288
* Moved most of the shared code between the two GUIs into platform independent source modules (System.cpp, Saveslots.cpp, and RecoverySystem.cpp)
* Created two new namespaces which house functions that need to be implemented by OS/platforms: HostGui and HostSys. HostGui is useful -- HostSys I'm not sure I'll keep around in the long run.
* Moved keyEvent struct from PS2Edefs.h to PS2Etypes.h
* Many improvements to the logic flow of the GUI (should be a little less fallible).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@675 96395faa-99c1-11dd-bbfe-3dabce05a288
Added a temporary gamefix option for God of War, which has been broken since r659. Anyway I'll fix this problem in a proper way.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@667 96395faa-99c1-11dd-bbfe-3dabce05a288
This fixes the Digimon menu for example (Gamefix will stay a while longer though, until we confirm ingame is fine as well).
He also updated the advanced dialog a bit.
Remember that this mode can break games if VU clamp is below "Extra + preserve sign"
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@665 96395faa-99c1-11dd-bbfe-3dabce05a288
Win32: Moved various debugger-related dialogs into a new debugger.rc file, to help reduce clutter between both the std resources and the debugger resources.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@660 96395faa-99c1-11dd-bbfe-3dabce05a288
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
Fixed new emitter so it compiles in Debug builds, cleaned up the header files a bit.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@652 96395faa-99c1-11dd-bbfe-3dabce05a288
the emitter is now 'templified' so that you can run multiple instances such as:
eMOVRtoR<0>(EAX, ESP);
this uses emitter instance #0
to use another instance you can simply change the number in the brackets like:
eMOVRtoR<1>(EAX, ESP);
will use instance #1.
all old-functions are mapped to instance #0 by macros.
like:
#define MOVRtoR eMOVRtoR<0>
why do this to the emitter?
so we can have thread safety, and eventually thread the recompilers using different emitter instances.
note: this took me forever to get working (around 12 hours of non-stop coding).
however for some reason debug build is being extra-picky and still giving compile errors.
hopefully Jake or someone else can fix this, because i tried a few stuff, and just got more compile errors ><
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@647 96395faa-99c1-11dd-bbfe-3dabce05a288
* Fixed the IOP's recExecute so that it correctly preserves X86 registers (EDI and EBX were not preserved!)
* Optimized the recExecute procedure, seems like a nice speedup in FMVs and some games that are IOP intensive.
* Renamed psxMemRead to iopMemRead, added new Virt/Phys functions, and fixed several instances of DMAs using translated addresses (DMAs are always physical maps). Our IOP doesn't really emulate the tlb so it won't fix anything, but it's more correct in cas stuff is better supported in the future.
* Removed unneeded FreezeMMXRegs, since the IOPrec doesn't use any mmx/xmm regs anyway.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@628 96395faa-99c1-11dd-bbfe-3dabce05a288
Developers: Changed the way PCSX2_ALIGNED16 macros work, so that they're more friendly to MSVC and Visual Assist X intellisense (more more red squigglies on vars like cpuRegs!)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@618 96395faa-99c1-11dd-bbfe-3dabce05a288
WinGUI: Disabled arguments menu in release build, for sure :p
Buildsystem: Made pcsx2 dependent on zlib, and changed post-build script a bit
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@591 96395faa-99c1-11dd-bbfe-3dabce05a288
tweaked the fpu compare clamping so now gt4 works again.
made the digimon rumble arena 2 fix into a gamefix.
tekken 5 doesn't need a gamefix anymore.
VU fixes:
fixed 2 opcodes thanks to nneeve.
optimized FCOR a bit.
changed the way ICO gamefix works so its less hacky (just always sets VI to 1 instead of setting VI to the opposite of the 'correct' result)
General fix:
there was some odd bug with the autogenerated TEXTINCLUDE stuff.
if you edited a resource, it would generate
#include "afxresmw.h
instead of
#include "afxresmw.h"
(a quotation mark was missing so you'd get compile errors)
so i fixed that ;p
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@563 96395faa-99c1-11dd-bbfe-3dabce05a288
this fixes a bug with Digimon rumble arena 2.
thanks to Nneeve for figuring out the problem.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@547 96395faa-99c1-11dd-bbfe-3dabce05a288
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
This new code properly handles these situations now, removing the need
for the magna carta gamefix, and also fixing problems in dragon quest 8(jp).
Thanks again, tmkk :)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@536 96395faa-99c1-11dd-bbfe-3dabce05a288
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
To make up for the speed loss in Tekken5 and Persona4 the vu cache size is now bigger.
This means another 10% more speed for Tekken, and a whooping 30% for Persona :)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@524 96395faa-99c1-11dd-bbfe-3dabce05a288
note to pcsx2 users: for those that still don't know, these are new VU recompilers i'm working on. They're not working yet, and won't be for at least a few months. So don't expect noticeable changes when i update microVU stuff, since currently they're not being used (when they're in a semi-working/usable state, i'll be sure to put a note in the revision message ;p)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@478 96395faa-99c1-11dd-bbfe-3dabce05a288
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
We'll test if any game still needs DaZ off, and if not so, make that default to on.
DaZ is a more correct behavior for the VU's, and only bugs prevented it from working as expected.
Thanks to Nneeve for his hard work :)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@461 96395faa-99c1-11dd-bbfe-3dabce05a288
- made "framelimit" mode default, instead of "normal" mode (was discussed by team)
- some more microVU rec work...
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@452 96395faa-99c1-11dd-bbfe-3dabce05a288
Changed the Hw FiFo to use what should be a more correct register addressing scheme. The entire contents of each page of the FIFO is mirrored into the lowest register(s). For example, any address between 0x10006010 and 0x10006ff0 should always be treated as address 0x10006000.
Code cleanups and minor optimizations to hw.cpp, FiFo.cpp, and gs.cpp.
Added some additional utility functions to the Path namespace, for splitting paths into files/folders parts.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@451 96395faa-99c1-11dd-bbfe-3dabce05a288
Fixed COP0's recompiled branch instructions (BC0F, BC0T, etc) -- the conditional was not implemented correctly (thanks to Refraction for spotting that one).
Used a better method of clearing the errorlevel during the Pre/Post Build steps. Should be a little less error-prone (pun?)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@447 96395faa-99c1-11dd-bbfe-3dabce05a288
- made pcsx2 to default to MTGS mode "on" instead of "off"
- renamed "Mega VU" recs to "Micro VU" recs since the team thought "Mega" sounded lame ;p
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@439 96395faa-99c1-11dd-bbfe-3dabce05a288