Commit Graph

662 Commits

Author SHA1 Message Date
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
arcum42 bbb97ac157 Fix an include in the OpenGL version of ZeroGS.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@625 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:38 +02:00
arcum42 db3207ee57 These variables shouldn't be static.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@624 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:38 +02:00
arcum42 c32940f989 Playing a bit of catchup.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@623 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:38 +02:00
ramapcsx2 522d6ade68 Changed default EE FPU roundmode to "chop" and made the 2 instructions that needed "nearest" rounding change the mode at runtime. Note that the default mode is now the only one that is correct. Games will break with any other mode.
The choice is still there though for any games that don't work with "chop".
Please report these so I can fix them as well.

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@622 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:38 +02:00
Jake.Stine 9c5e3ebfa3 Renamed all Psx* files to Iop*. Someday we'll rename all the psx* functions and vars to iop*, but that's a much larger project.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@621 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:38 +02:00
Jake.Stine 3fc08b659b Cleaned up and streamlined the namespaces quite a bit, split some code into separate modules, and cleaned up the Common.h header file by removing all the unnecessary not-so-common pieces parts.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@620 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:38 +02:00
cottonvibes e312e9d25c fixed an error in a recUpdateFlags() optimization that i've had for along time and for some reason never noticed :( thats to Person on #pcsx2 for pointing it out.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@619 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:38 +02:00
Jake.Stine 8d09b80fb9 Forgot to add the new BaseblockEx files from the prev commit. -_-
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@618 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:38 +02:00