Commit Graph

670 Commits

Author SHA1 Message Date
ramapcsx2 8594b87177 The PLZCW bug was quickly found :p Re-enabled the recompiler with the fix.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@675 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:40 +02:00
ramapcsx2 9c9d67b3d8 One of the recompiled MMI opcodes (PLZCW) is broken. Since the interpreter isn't slower it's used now instead.
Enjoy God of War :)

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@674 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:40 +02:00
Jake.Stine 46f1df20f4 Fixed a potential cause of random-ish crashes during emulation startup, caused by a small typo in the new SysMmap in System.cpp.
Fixed another potential cause of randomish-crashes during dyna_block_discards, by removing some obsolete debug/troubleshooting hacks from when we had register corruption issues. Also removed if(s_pDispatchBlock == NULL) checks in the Dispatchers, which were added during the same period of register corruption paranoia.

Added a check for null pointers in Deci2Call.  Fixes crashes in some games (Samurai Warriors 2 XL, possibly others?)

Changed over most uses of memset to memzero_obj.

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@673 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:40 +02:00
Jake.Stine 271eee8dea Removed most of the cluttery code that used PCSX2_VIRTUAL_MEM. Left in various parts of VM code which could be useful for reference in the future.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@672 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:40 +02:00
cottonvibes e8e5eb320a some more clamping changes by tmkk.
i also fixed a small bug in SysMmap()

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@671 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:40 +02:00
cottonvibes 167399c52c added various VU optimizations by tmkk, including different clamping optimizations.
i also fixed some VU functions to use appropriate clampmodes, that i had forgotten to change in the past.

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@670 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:40 +02:00
arcum42 7adb8c864f A few quick changes to get Linux compiling again. And the 0x8000000 in vtlb_malloc does turn out to be neccessary...
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@669 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:40 +02:00
Jake.Stine 5fbaf63663 More work on the Linux side of things. This blind coding without being able to test stuff is challenging. >_< Also did some cleanups and error corrections in the way recs and vtlb allocate memory.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@668 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:40 +02:00
arcum42 65a1ef18c8 Linux: Commit the latest aR5900-32.S patch, and a few Linux Gui changes.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@667 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:40 +02:00
arcum42 b9fe352299 Remove an obsolete change that made it in on the last commit...
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@666 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:39 +02:00
arcum42 30554896ec Linux: Bring in changes from various patches, and get it compiling again.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@665 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:39 +02:00
Jake.Stine e41d18164e Made some quick fixes to the Linux block manager for the EErec (aR5900-32.S)
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@664 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:39 +02:00
arcum42 347e6c44bb ZeroSPU2: Refactor a few things, break up a few files, and fix a fencepost issue when clamping.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@663 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:39 +02:00
ramapcsx2 1ace722861 Added a game fix that handles delay slots differently in the VUrec. If enabled, it fixes Kingdom Hearts 2 (the gray screen bug, and the slowness) and also Tri-Ace games SPS.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@662 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:39 +02:00
Jake.Stine 672bdb5a60 Implemented Aligned Realloc for Linux, fixed VUmicroMemInit so that it's Linux friendly, and added a new function vtlb_malloc(), which allocates memory blocks below 0x80000000 (which keeps vtlb happy). It's used by PS2, IOP, and VU memory allocators.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@661 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:39 +02:00
Jake.Stine 2cba5081b3 Implemented COP2's branching instructions in the recompiler (BC2F, BC2T, BC2FL, BC2TL), and fixed a bug where Branch-Likely instructions were not recompiled correctly for COP1 and COP0 branches.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@660 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:39 +02:00
Jake.Stine 66733f5a6d Bugfix for emu crash after deleting the ini file.
Added more correct support for hwWrite16 to counters registers (hwWrite16s to the counters were being completely ignored until now)

Added x86AlignExecutable() to the emitter -- generates an executable instruction to pad an area to a given alignment.  It's not used yet but could be useful as an optimization in some rare cases in the future.

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@659 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:39 +02:00
Jake.Stine 24ef7776fd Fixed a logic flaw in r657 that caused a bottleneck in the MTGS ringbuffer stream. It was killing MTGS performance on games like FFXII, BoF5, and other GPU-intensive titles.
Moved GIf/GifDma code into its own file: Gif.cpp.  GS.cpp is a lot more manageable now :D

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@658 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:39 +02:00
cottonvibes 240defef4e some clamping optimizations that also 'prevent' some XMM reg corruptions. current VU recs seem to not allocate VF0 for the opcodes, expecting 'special case' implementations i suppose. this fixes FFXII to work with DaZ according to Nneeve.
also changed min/max opcodes to always 'preserve sign' when clamping.
this lets you 'see' the menu's in GT4 w/o having to use Extra clamping, however you still need Extra Clamping if you don't want SPS in-game.

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@657 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:39 +02:00
Jake.Stine b5f952fc5e Fixed a bug that caused old pre1.8 versions of Gsdx to crash at startup, and fixed some instability problems when loading savestates.
Cleaned up some MTGS code, and improved performance a bit, especially for games that tend to stress the GPU (when Gsdx registers 70%+ cpu).

Programmer notes: Several code cleanups to header files.  Added MemcpyFast.h and SafeArray.h, and removed a couple more ugly #include inter-dependencies. :)

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@656 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:39 +02:00
Jake.Stine b32d84516a Made several modifications to the MTGS and Threading portions of Pcsx2. This should fix some problems in select games that use VIF FIFO 1 (downloads data from GS to EE, forcing an MTGS stall), and should also fix occasional MTGS freezeups during emulation init/exit. MTGS uses pthread's semaphores now instead of pthread_cond (Which as it turns out isn't really doing what I thought it should do). The semaphores are faster and more stable, so it's a win-win. :)
Programmer notes: Added a new u128 type to PS2Etypes.h, and a new SafeAlignedArray<> class to System.h.

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@655 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:39 +02:00
gigaherz@gmail.com d55f680bde pseudonym just made a patch with some changes to the debugger so it works again.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@654 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:39 +02:00
cottonvibes 9223be5a30 enabled the FPU extra-flags code after reviewing it. ZEROx told me it fixes some freezes in MGS3 as well.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@653 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:39 +02:00
Jake.Stine f4404bc1d1 Made a quick hackfix that should solve TlbMiss crashes in a few games, such as .Hack/GU (Issue 87). The real problem is that the VifDma1 happily overwrites past the end of VU1 memory, which spills over into the EE's recLUT tables, which causes rapid death. I fixed it by allocating an extra "cushion" of data at the end of VU1 memory.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@652 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:39 +02:00
Jake.Stine 9a5da04452 Optimized VTLB's mappings for VU0/VU1. Seems like a pretty big speedup to me, but my PC sucks too much on VU1-intensive games for me to be sure. :)
Bugfix: VUSkip works again!  However, frameskipping is still not where it should be... seems to like to skip too much (grr!)

Linux: Committed a new version of aR5900-32.S, which should work better than the old version (but I can't really test it).

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@651 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:39 +02:00
Jake.Stine e4e8b6dbaf Made some significant optimizations to VTLB. Between this and the last couple revision opts, VTLB is now as fast or faster than VM builds (with many more potential optimizations in the queue!).
Removed VM build targets from the Win32 solutions, because it no longer compiles and there's no point anymore in doing the work needed to make it compile.  The optimization style of VTLB is completely incompatible from VM so it would require lots of newly branched code to maintain VM builds.

Commented out a VU0micro Stall warning which was causing a lot of spam in some games.  The games have been noted and the issue will be looked into further in the future.

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@650 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:39 +02:00
arcum42 4575351e36 ZeroSPU2: Fix saving options in the Windows version.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@649 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:39 +02:00
Jake.Stine c09f69f242 Implemented MMX/XMM optimizations for VTLB's vtlb_DynGenRead function (small speedup).
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@648 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:39 +02:00
Jake.Stine 3bc7465b23 Rewrote hwRead32 in HW.cpp, which should give another little bit of speedup. Commented the daylights out of it while I was at it. :D
Fixed another small bug in the CRC display of the console.

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@647 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:39 +02:00
Jake.Stine 01ecf48a6c Applied eol-style:native to some Linux files.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@646 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:39 +02:00
Jake.Stine 1f3bdd4a08 Various fixes related to the last 2 revisions. :)
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@645 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:39 +02:00
Jake.Stine 636e4a8b42 Fixed a speed bottleneck introduced in r643, which required retooling the way the Console::Write API passes parameters. The C++ compiler doesn't optimize const string objects very well, which was leading to a lot of redundancy object creation and exception handling.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@644 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:39 +02:00
Jake.Stine e3149cfd5f Some cleanups of the hwRead/Write functions (maybe a small speedup)
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@643 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:39 +02:00
Jake.Stine 44f5117d24 Optimized memcpy_fast. In addition to being quite a bit faster, it also auto-preserves mmx registers now. So I was also able to remove almost every instance of FreezeMMXRegs (all except those used to guard the GS plugin calls). memcpy_fast (aka memcpy_amd_) is now faster than memcpy_raz for *all* scenarios, so it's been made the new default.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@642 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:39 +02:00
Jake.Stine 4781be9e59 Moved Coissued Load/Store instructions into iR5900CoissuedLoadStore.cpp, and disabled them via the #define PCSX2_VM_COISSUES (coissues are a very minor speedup and could have led to other emulation compatibility problems, and required in enormous amount of complicated code to implement)
Moved VM specific code in Memory.cpp into MemoryVM.cpp.

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@641 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:39 +02:00
ramapcsx2 74a305bd0a Few tweaks to cycles and Tekken4 works again. Picky game it is :p
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@640 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:39 +02:00
Jake.Stine b2eb1cad4f Made several improvements and cleanups to the memzero API - including better linux version of the header. Also changed memcpy_amd_ / memcpy_fast to use __fastcall convention.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@639 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:39 +02:00
gigaherz@gmail.com c63a7dc032 In my previous commit I had left the spu2 read functions commented out "by mistake". I undid that and actually made them be used where they should.
Also a tiny bit more stuff for the DMA code.

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@638 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:39 +02:00
ramapcsx2 4cd211d8ad Cleanup work on the faster clamping code, also by tmkk :)
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@637 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:39 +02:00
cottonvibes e8ec3e1269 Another nice update, Saqib and Nneeve managed to fix up memcards! Games that had memcard problems before should work correctly now (hopefully)
Note: Theres some backwards-compatibility problems with the old memcards, and Krakatos is going to make a thread about it on our forums that EVERYONE should read!
So to avoid problems, please wait till he makes the thread before using this version.

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@636 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:38 +02:00
cottonvibes a0ef6fa420 minor fix and cleanup of saveEAX, thanks to tmkk.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@635 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:38 +02:00
gigaherz@gmail.com 0340f701a9 This commit doesn't change anything of the emulator.
I coded a new way for the IOP to handle DMAs, but it needs too many modifications in other parts of the emulator,
and I'm not in the mood to code all that right now. If anyone wants to try & get this code actually working, go on,
else leave it #if'd away.

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@634 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:38 +02:00
arcum42 a165a01495 ZeroSPU2: Add two files I forgot in my last commit.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@633 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:38 +02:00
cottonvibes be57d5384a made recUpdateFlags more readable while keeping most (all?) of the optimizations from last update.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@632 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:38 +02:00
ramapcsx2 c787b00cc7 Tmmk fixed a bug in saveEAX where a vector wasn't saved in some situations. He also optimized some VU functions, so this revision brings about 5% more speed ;)
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@631 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:38 +02:00
arcum42 dde14aab30 ZeroSPU2: Update the Windows project file, so it knows about the new files from r629.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@630 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:38 +02:00
arcum42 98e9c9635d ZeroSPU2: Some defines become functions, the register list got updated and commented, some code got moved into new files, and some preliminary code for later refactoring was added.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@629 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:38 +02:00
ramapcsx2 7a456fe608 Fixed savestates for vtlb builds. They're much more reliable now :)
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@628 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:38 +02:00
ramapcsx2 9be927fd7a Quick fix for the broken frame/vuskip by Nneeve. Doesn't restore it completely, but it'll do for now :)
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@627 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:38 +02:00
cottonvibes b55bc0794f Today is a great day for ps2 emulation, Tri-Ace games now work with Playground! :D That means that Star Ocean 3, Valkyrie Profile 2, and Radiata Stories all get in-game and might even be playable from start-to-finish (more testing needs to be done to find out if they're fully playable).
For those that don't know, Tri-Ace games use an encryption algorithm that requires bit-accurate results to boot successfully; so they're some of the pickiest games to emulate.

Credit goes to Nneeve who coded special add/sub routines for VU opcodes that make the PS2's VUs more accurate.

Since these routines are SLOW, Rama and I decided to make this a gamefix. Rama also isolated the code so it only runs the slow-routines in the functions that need them to boot the Tri-Ace games (without this, the games would run 40% slower :p).

The gamefix is called "VU Add / Sub Hack", so turn it on and have fun playing/testing tri-ace games on pcsx2-playground! :p

Note: After Krakatos does some more testing, he'll add a public beta for this revision on our forums (sometime within 24hours probably).

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@626 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:38 +02:00