Commit Graph

657 Commits

Author SHA1 Message Date
ramapcsx2 d0a7068f2e Tweaked the forceinlines a bit, more speed :)
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@612 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:37 +02:00
ramapcsx2 d2129c63ae Forceinlining these brings Fatal Frame from 159fps to 183 :)
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@611 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:37 +02:00
ramapcsx2 8447734202 Fatal frame should work now. Also repaired a *slight* mistake I made :p
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@610 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:37 +02:00
cottonvibes 25300c1222 deleted old mingw/dev++ project files
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@609 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:37 +02:00
cottonvibes febe42c059 lol i forgot to add the renamed iCOP0 files :D
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@608 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:37 +02:00
cottonvibes 70854f099e renamed iCP0 to iCOP0 to be consistent with the other COP files. very minor VU micro work.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@607 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:37 +02:00
Jake.Stine 1098253df7 Major bugfix/oopsie from r595 - I forgot to set the freezeregs flag, so XMM regs were getting corrupted liberally.
Added proper implementations for COP0's branching functions (BC0F, BC0T, etc).

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@606 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:37 +02:00
cottonvibes 1deab308d1 updated Playground readme, and added some snapshots taken by bositman which i will add to the main page.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@605 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:37 +02:00
ramapcsx2 3b1354f49c More work on the EE cycle counts, much closer to the real ps2 now. Also added a quick method to determine what EE opcode is used by games ;)
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@604 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:37 +02:00
ramapcsx2 62e071fd6e Full optimization gives a tad more speed ;)
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@603 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:37 +02:00
Jake.Stine 7f9311f527 Noticed a typo in Memory.cpp, from r577 changes.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@601 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:37 +02:00
ramapcsx2 2bf3aecdd5 Hackfixes for Fatal Frame 1 (and possibly other games) that workaround some alignment problems on MTGS and a problem with handling unknown VIFcommands.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@600 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:37 +02:00
cottonvibes 87271cb5b0 further optimized recQFSRV thanks to some suggestions by Jake.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@599 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:37 +02:00
cottonvibes 66125f0c95 implemented recQFSRV() so it doesn't need to call the interpreter function. also minor emitter changes.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@598 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:37 +02:00
Jake.Stine 62ea8a9541 Added __fastcall and __forceinline to yet more IPU routines, where appropriate, and implemented more coder-friendly union-based structures for some of the IPU bitfields.
Removed some dead code form VUmicroMemInit -- it was already being handled by memInit.  Made a few other minor tweaks of the memory protection code (hoping to fix VM issues, but no luck yet).

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@597 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:37 +02:00
Jake.Stine 42951f240c Simplified/improved the memory protection model, and optimized the EErec's block fetch slightly. Note: VM builds are still unstable, and most notably crash on almost all FMVs. Still hoping I can find a fix tho. :)
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@596 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:37 +02:00
Jake.Stine 3bf7df410f Yay! Stack corruption bugs squashed! Much rejoicing! Pcsx2 is usable again! Oh, and emulation speeds are a good measure faster now too.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@595 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:37 +02:00
Jake.Stine 0175009d93 Repaired the old piece-by-piece recompiler enablers in iR5900.h, and re-added some forceinlines to iR5900-32.cpp that seem to help reduce the impact of stack corruption to occasional crashes (instead of insta-death). >_<
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@594 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:37 +02:00
Jake.Stine 66d0cac446 Changed a bunch of 32-bit writes in Hw.cpp to 16 bits, which they're supposed to be.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@593 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:37 +02:00
Jake.Stine 7dfc3631ad Repaired the interpreter such that it works, tho not tested much (takes hours to test it, heh). Fixed up the disassembler / instruction logger a little bit. It's more or less usable now, although most of the VU opcodes aren't implemented.
*NOTE* There is a stack corruption bug lingering in the recompilers.  We know about its existence but not the cause yet.  Until found it's going to cause generally random crash type behavior.  (ouch!)

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@592 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:37 +02:00
Jake.Stine e812cd997f Pcsx2_Suite_2008 solution now supports the new project build types correctly.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@591 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:37 +02:00
Jake.Stine 1c17e8f37b Repaired a last-second oopsie from r588... and set it up so that game CRC is displayed in the console window title even when patches are disabled.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@590 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:37 +02:00
Jake.Stine a251c8c67c Minor code cleanups and spelling fixes. :) (posted as a separate rev for the purpose of uncluttering the prev revision)
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@589 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:37 +02:00
Jake.Stine 1eabf946bb General improvements to the emulator's reset and recovery code, including several fixes the the VM build (but it's still not entirely stable, but seems to work for many games), and fixed a bug where starting new games wouldn't pick up the CRC correctly.
Did a little code cleanup on the VUSkip, and fixed a problem where-by VU-skip enabled could cause odd behavior when exiting/re-entering emulation.

Removed the unused REC_COP2 option (it was not useful anyway since the COP2 and EE are always recompiled together)

Made a few more __fastcalls out of IPU functions.

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@588 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:37 +02:00
Jake.Stine f1bdbd59a8 Fixed a bug in the COP0 TLB / Branch instructions that was causing some games to freeze up or crash (bug was introduced in r572).
Cleaned up the GUI code a bit.  The gui is no longer recursively called from the EErecs branchtest.  This is good for process stack security, good for savestate stability, and good for improving the GUI's ability to handle and recover from errors (although the last part will need more work before it's fully implemented).

Did some more cleanups of the IPU code.  Fixed some tabbing and formatting, and did a couple more __fastcalls.

Note to our compilers: We redid the naming scheme of the build targets (again!).  Builds are now names Debug, Devel, and Release.  The builds behave the same as they did prior, except that now the names are much shorter.  Also, we decided to disable PCH on Release builds for safety sake.  Devel builds still have PCH enabled on everything except IPU.cpp.

**VM build is still broken!**  (I'm going to take a look at it in earnest tomorrow)

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@587 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:37 +02:00
Jake.Stine 28e4ac4079 Disabled PCH for IPU.cpp -- it was causing problems that crashed FFXII vids among others.
Moved Dynarec-related IPU const mem reads/writes to iIPU.cpp, and added some __fastcall directives to various relevant functions and function pointers (very small speedup).

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@586 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:37 +02:00
Jake.Stine 52952bce92 Squashed an MTGS bug that I strongly suspect was responsible for MTGS problems reported in Issue 108.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@585 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:37 +02:00
Jake.Stine 664cfd3491 Fixed crash bug when running Cpu Config before starting emulation of a game.
Enforced correct propagation of the GS window handle to pad plugins on Esc/Resume.

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@584 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:37 +02:00
Jake.Stine 787739fd49 Found something that might very well be a bugfix for some crashing problems stemming from changes made in r516.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@583 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:36 +02:00
Jake.Stine e955e021d4 Added some new highly-optimized memset alternatives, located in memzero.h (currently Win32-only). Since most uses of memset involve constant values for both the length and destination parameters, it's possible to use a function template to generate very precise inlined code. :)
Additionally, the new memset alternatives correctly save the XMM0 register, which can be clobbered by MSVC's memset implementation.

Changed some code in iR5900's eventTest to use EAX instead of ECX (very small speedup).

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@582 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:36 +02:00
Jake.Stine 85f13a4067 Just noticed I made a nasty typo in VifDma.cpp from r577, which probably made some games *very* unhappy.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@581 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:36 +02:00
Jake.Stine 71cd24ec22 Optimized the iR5900's event test code, undoing the slowdown from the previous revision and picking up another 1-2% on top of performance of earlier revisions.
Applied gratuitous amounts of inlining to WinSysExec.cpp to ink out another 0.1% speed boost. heh

Fixed the double-keystroke bug when using certain combinations of Pad plugins.

Added JNS32 to the ix86 emitter.

*IMPORTANT*  VM builds are STILL broken.

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@580 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:36 +02:00
cottonvibes 3cf679babf fixed a typo from my last commit
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@579 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:36 +02:00
Jake.Stine 7b2a5f068f *EXPERIMENTAL* Switched the code over to a new method of exception handling which should be more efficient and easier to debug and, most importantly, fixes a lot of the weird errors we've been getting since r488.
*NOTE: THIS IS REVISION WORKS ON VTLB ONLY -- VM BUILDS ARE CURRENTLY BROKEN*  If you like VM, do not try to compile or use this revision.  The VM build will crash anytime you try to load a savestate or exit/resume emulation.

(Interpreters and some other stuff are also broken too, but will be fixed shortly)

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@578 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:36 +02:00
Jake.Stine 7488e930d4 Updated savestates to version 0x12 (0x02 VTLB) -- added a couple missing SIF vars and added support for cottonvibes' new VIregs structure format in r576.
Fixed a few bugs in the GS-on-Close recovery system.  It should work more and crash less now.

Restructured the entire initialization process of Ps2 memory and cpu resources.  All emulation system resources are allocated when the app first starts now, giving Pcsx2 the best possible chance to allocate needed Virtual Memory resources.  And *Hopefully* this resolves some memory corruption issues that have persisted since r488.

Added several new functions to System.cpp as partof the new API: SysAllocateMem(), SysAllocateDynarecs(), etc.

Created some new files: VU0microInterp.cpp and VU1microInterp.cpp, and separated the VU cpus into their own "cpu" structure (they used to be grouped in with the R5900, which made it awkward to work with them).

Turned off speed optimizations for the WinMain.cpp and WinSysExec.cpp files, due to a compiler bug in MSVC that causes it to completely break codegen for the RunExecute() function.

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@577 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:36 +02:00
cottonvibes d6383a4a04 VI regs needed padding to make them 128bit VU0 maps VU1's VI regs as 128bits to addr 0x4xx0 in VU0 mem, with only lower 16 bits valid, and the upper 112bits are hardwired to 0.
i changed the 2 functions that deal with VU mem addresses to reflect the changes (GET_VU_MEM() and recVUTransformAddr())
they also had a bug where they weren't mapping VU1's VF regs to 0x4000.

i think i got all the VU mem functions that needed to be modified, if games break with this revision then we know i missed one ><

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@576 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:36 +02:00
arcum42 2821b483bf This'll at least get rid of the Linux compiler errors, though the tons of linker errors, half of which are in assembly files, are still there.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@575 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:36 +02:00
arcum42 84c7b1bdc3 Various ZeroGS cleanups. A few things got mirrored from the dx version to the opengl version, and vice-versa. A few defines became inlined functions, and if statements became switch statements...
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@574 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:36 +02:00
Jake.Stine 0c2f86a870 Repaired some more of the Linux-side of things. It's the least I can do for having constantly broken it. >_<
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@573 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:36 +02:00
Jake.Stine 1b45f46fb5 Moved the EE's various opcode subsets into their own namespaces, as per Cottonvibes' request (MMI, COP0, COP1), and fixed numerous compilation errors in the debug builds while I was at it.
Improved the behavior of the VARG_PARAM thingie in release builds.  It generates a little bit more compact compiled code now.

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@572 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:36 +02:00
ramapcsx2 c77d4d007a Added SysPrintfs to each VU opcode, to make debugging easier (phew..) :p
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@571 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:36 +02:00
ramapcsx2 a89d71f9bc Re-enable a hack for the vm build. Fixes Fatal Frame 1 on that. VTLB builds don't need it :)
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@570 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:36 +02:00
Jake.Stine fada5aea50 Removed some obsolete code regarding the EE's interrupt handler, and added some lines to the Linux code to help it build correctly (I hope) under the new namespace layout.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@569 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:36 +02:00
arcum42 4f92f7ae14 Fix a few compiler errors in Linux. I'm still trying to figure out the dependancy issues StringUtils is giving me, though, so doesn't compile in Linux right now...
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@568 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:36 +02:00
Jake.Stine bd08dc7824 Removed some obsolete #pragma warning() directives, and moved the one useful one into the precomiled header so that it doesn't need to be included into every file manually.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@567 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:36 +02:00
Jake.Stine adf070f8ea Code cleanup Revision: Implemented COP0 and COP1 (FPU) opcodes in the new opcode table system, rearranged namespaces to (hopefully!) make more sense, deleted a bunch of unused or duplicated prototypes in headers, and separated a few sections of general code into their own modules (such as XMMfreezeRegs/MMXfreezeRegs found in iCore and iR5900-32 modules, and some COP2-specific functions in VU0)
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@566 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:36 +02:00
cottonvibes cfa967bdf7 minor recUpdateFlags changes
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@565 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:36 +02:00
cottonvibes fc924ba6e0 minor VU recUpdateFlags() changes based on what Jake mentioned in r560
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@564 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:36 +02:00
Jake.Stine a20ceb0bcb Renamed all output files to conform to a consistent standard (pcsx2pg-vtlb-dev.exe / SPU2ghz-Pg / etc). Namely, the Dev builds of pcsx2 are now clearly marked, and Public builds are naked: pcsx2pg-vtlb.exe.
Changed all the PPr's in the plugin names to "Pg."  Dunno why I did PP in the first place.  I must have had sand in my eye.

Removed ASIO code from spu2ghz - the driver model is way too overly complicated and now that XA2 is stable it would have been of little use even if it had ever worked right.  OH yeah, and no more const error on compile under some revisions of DXSDK.  Yay! :D

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@563 a6443dda-0b58-4228-96e9-037be469359c
2016-05-24 22:40:36 +02:00
Jake.Stine 41524a03f6 Fixed compile errors generated on Release to Public builds in the last revision.
Fixed some instabilities in the Close GS on Escape feature when also using MTGS.

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