Commit Graph

46 Commits

Author SHA1 Message Date
Gregory Hainaut 4796803c33 pcsx2: Remove == true/false for boolean logic (#1556)
As discussed in #1553

Clang Tidy reports goes from 156 to 9.

Remain some macro in spu2x + a deadcode line
2016-09-10 20:08:14 +02:00
refractionpcsx2 c753f0d206 VIF-MFIFO: Fix for stalls on wait instructions, fixes Stuart Little 3
- VIF Waits for Path3 to flush, but it was firing before it had finished.
-Condition is much cleaner and less hacky now.
2015-06-27 22:47:44 +01:00
archshift fb9c24b900 Removed `using std::min/max` from PCH 2014-08-14 14:55:52 -07:00
refraction 35b5e6a923 GIF:
-Implemented GIF_MODE Masking fixed the All Star Pro Wrestling series slowness/hanging.

DMA: 
-Standardize the IPU and SIF dma's to use the standard chain handling in hw.c, fixed up some DMA resuming stuff in the forementioned units, VIF, GIF and SPR.

-Added some warnings for DMA stall control which isn't implemented, hopefully somebody will find a game that does it so we can add/test it :)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5915 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-26 22:34:02 +00:00
gregory.hainaut 48356e31b8 linux:
* use same path as game index db for cheats and cheats_ws
* install the new cheat zip file on cmake and debian installer 


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5850 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-26 18:00:14 +00:00
refraction@gmail.com a1bc42fa92 VIF: Put in a check to make sure VIF doesn't break during a FIFO write.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5565 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-02-18 21:17:35 +00:00
refraction@gmail.com c30f67b767 VIF/VU: Fixes for Everblue and Hitman 2 from r5404, details below. Savestate bump needed, sorry. Also fixed a copy/paste bug i noticed along the way in vif0FBRST.
Everblue: Slightly messy fix, not as nice as id hope, but it seems to work, we need to remember VU programs written to the VU so we can check if an unpack is modifying it.  This retains the behaviour of the Snowblind engines whilst fixing everblue.

Hitman 2: Our vif0/1VUFinish() routing which works in conjunction with the delays wasn't paying attention to if the VIF was stalled or not and reran it before the game wanted it to, now fixed.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5544 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-02-05 00:42:44 +00:00
refraction@gmail.com ac54bad33c VIF VU Execs: Fix for r5404 (the fabled Baldurs Gate fix). Need to check that when VIF ends there is no queued VU Exec left else it gets abandoned. Fixes freezing in Legends of Wrestling 2, possibly fixes the graphics on Warship Gunner 2
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5482 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-12-20 23:46:09 +00:00
refraction 159c4ba138 VIF: Fixed a bug which caused PATH3 masking to fail if there was an IRQ on the FlushA command while it needed to wait. Fixes Futurama Issue 1343
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5443 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-10-31 22:12:38 +00:00
refraction d465c18228 More vif work to fix Shadowman 2 and improve the function of some parts. Gave vifstalled a more specific job and reasons for the stall. Also did some work with the irq offset, seperating it from the stalls.
Savestate bump needed.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5380 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-08-16 23:03:27 +00:00
refraction b3f8c59cf4 -Bumped savestate version, forgot to do that in my last commit.
-Fixed a bug stopping GT4 running.
-VIF now waits if the VU is busy rather than spinning, causing huge slowdowns.
-Filled in some bits i missed

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5149 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-04-07 12:27:19 +00:00
refraction d29a30c265 VIF: Reworked the VU delays in to scheduled events to simulate VU run time without killing Metal Saga or Fahrenheit. Adjusted the COP checks on the VU's to use the same method as the VPU_STAT is never set essentially so the VU is never "running".
Path3 Masking: Fixed a bug which caused persona 3 not to boot, previous a hack had been put in place to get around this.
VIF: Fixed a VIF error with the rare game Realta Nua, now goes through the prologue correctly. Game requires the EE timing hack to get rid of most of the noise (Path3 masking problem with new GIF unit, unfixable).

Expecting bugs, I will be monitoring this.


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5147 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-04-07 01:48:34 +00:00
ramapcsx2 54688f1f98 Reverted r4942 as some games need this to work..
Fixes Metal Saga menus and should fix Fahrenheit, too.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4962 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-11-07 16:08:30 +00:00
refraction 702f71d5f1 VIF: Removed the vu cycle counting craziness mentioned in r4941 comments. It was intended to pretend if the VU "ran" for longer than the VIF did, but it didn't really change a lot :P
Savestate version bump again

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4942 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-10-18 18:16:27 +00:00
ramapcsx2 d3f286e120 Fixed pretty bad bug of us counting cycles only for one VIF when the system has 2.
Also added a couple important global variables to be savestated (breaks old state compat).

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4941 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-10-15 10:45:31 +00:00
refraction c368a6a422 Updated the FFX Video Fix, should work again now. Added DMA End log messages to DMA logging. Hopefully one day someone will reverse engineer the FFX video code so we can see if we are really doing something really wrong or if the code is just dire >.<
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4354 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-02-24 11:07:13 +00:00
refraction abf620141b Added some extra "how much in VIF fifo" checks, removed a silly one, fixes Gungrave
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4241 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-01-21 16:24:54 +00:00
refraction 07bb54acc4 Fix for GTC Africa Jerkyness (Placement issue), Fix for Aura for Laura demo causing graphical errors, was multiplying VU Cycles by BIAS twice, not really clever :P
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4239 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-01-21 15:17:29 +00:00
refraction d87d13e155 -Fix for killzone.
-Did same code for VIF0 just to standardize things a little.

If this breaks anything let me know, and make sure it is this revision please.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4013 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-11-11 21:48:55 +00:00
Jake.Stine 003da7d287 MAJOR: All new hwRead and hwWrite handlers (expect regressions). Details:
* Writes via 16 and 8 bit ops now use 32-bit read/modify/write operations by default; which should enable nearly complete support for all such operations (instead of the formerly spotty coverage before).
 * Eliminated almost all former 8/16-bit specific register operations.  All code shares the same 32 bit handlers now.
 * Completely revamped the developer trace logs for hardware registers!  *ALL* registers are logged now, complete with address, name, and value being read/written (and nicely formatted!).
 * Handlers are now fully page-based using templated functions (minor speedup)


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3704 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-08-31 05:22:26 +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 912872af80 Introducing a mostly revamped Tracelog and Console log system. Various console log sources can now be toggled on/off on the fly, allowing end users to enable more verbose logging when they encounter problems. Both console and trace sources can be given automatic prefixing.
DevNotes:  DevCon logs are now available in *Release* builds as well as Devel builds, and can be enabled from the Console window's "Sources" menu.  They are disabled by default in Release builds, and are always enabled regardless of the ini setting in devel builds.  Debug logs are still strictly available in debug builds only.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3609 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-08-06 05:46:09 +00:00
refraction 25887c62ee -Sorted some VIF problems causing unknown vifcmd errors (Enter the Matrix)
-Fixed up some path3 masking stuff, trying a slightly different approach too.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3349 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-06-30 00:55:22 +00:00
refraction 4186201f3b Fix for Beyond Good and Evil (maybe Raving Rabids too), added a couple of bits of logging for 8 and 16 bit reads.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3328 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-06-27 15:34:04 +00:00
arcum42 06e4ae00b2 pcsx2: A bit of cleanup.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3307 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-06-25 23:13:41 +00:00
refraction 26fece9510 Summary of fixes
Games
- Resident Evil Dead Aim flickering graphics fixed.
- Flatout games should now boot everytime (instead of randomly)
- Sega Superstar Tennis flashing fixed
- Destruction Derby graphics fixed (NTSC confirmed, PAL unsure)
- Tenchu Fatal Shadows flickering textures fixed, Issue 748
- Spyro Hero's Tail should boot again, Issue 746

General Info
- General reworking of the GS paths with all paths prioritizing more correctly.
- XGKICK can stall if another GS transfer is in progress
- Major reworking of Path3 masking, could still be combined with normal Path3 transfers, but lets get it working first :P
- Taken in to account a few conditions which could have caused VIF to lock up/crash when stalling on ends.
- Unreversed GIF and SPR and VIF so its the normal way round
- all DMA paths should now resume correctly after being stopped by hardware
- GIF FIFO now actually transfers stuff :P
- VIF CMD's simulated by the length of the interrupts at the end.

Phew, i think that's everything :S

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3274 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-06-22 23:10:40 +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
sudonim1 4457fe40fc Removed all trailing whitespace in *.c *.cpp *.h because it irritates me.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2897 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-04-25 00:31:27 +00:00
sudonim1 a05e9c62be Set svn:eol-style=native on all *.c *.cpp *.h
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2894 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-04-24 21:37:39 +00:00
arcum42 0f661e8f47 Chcr is a non-pod type.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2891 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-04-24 20:14:09 +00:00
refraction 662d589217 Improved my previous fix, Psychonaughts exhibited behaviour sudo mentioned (data not being grabbed from VU) so added a seperate SPR handler.
Removed an old check which is useless now and added a new replacement one.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2890 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-04-24 18:59:31 +00:00
sudonim1 a21fb4b984 Map uninstalled main memory (>32MB). I can't see any suggestion in the manuals that accessing these addresses generates a bus error or tlb miss (and they are in the bios default tlb initialisation), so I'm assuming that it acts as write only memory for both DMA and normal accesses. The write-only implementation is a little sketchy for DMA, but it's very unlikely to matter in practice.
Changed dmaGetAddr to not lookup addresses in the TLB.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2883 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-04-22 00:11:53 +00:00
refraction b1954edc3d - Better implementation of Reverse FIFO (Fatal Frame QWC Warning and more!)
- Improved handling of suspended DMA's, Also some traps in case DMA values are changed during suspend (please report if they don't start with 5 or 6)
- Better handling of GS Path priorities, this improves many Path3 Masked games such as Star Wars Episode 3, Gran Turismo 4 (slightly) and Videos like Digital Devil Saga/FFX
- Removed Voodoo Cycles
- Doesn't kill everything this time :P

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2853 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-04-15 00:32:58 +00:00
ramapcsx2 04eb79093d Revision 2822 contains a bug somewhere that we need to figure out.
So this reverts all VIF and GIF related code of that revision, 
leaving only the changes that were made to IPU.

Compatibility should be fixed again, with the added bonus of lots more videos working. 

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2828 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-04-09 15:15:43 +00:00
refraction 774411e3a4 Pleanty O' Changes:
- IPU 1 DMA rewritten - now much more readable, less hacky. A couple of games are still slightly picky, but overall compatability is similar (if not better in some cases)
- Reverse VIF transfers figured out and implemented (mostly)! - There are still some problems with this, will work on it.
- Improved GS PATH transfer control, now PATH2 and 3 cant transfer when PATH1 is, PATH3 cant when PATH2 is and so on.
- IPU now waits for ended GS transfers, for some reason this was screwing videos (mainly from PATH2) and causing them to be torn, which the original voodoo cycles addition fixed.

Note: You may see a lot of "Double IRQ on DMA 4" messages.  At the moment these are unavoidable but aren't actually causing any issues. I do know about them :P

Feel free to negative is I've seriously broke something lol

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2822 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-04-08 01:22:30 +00:00
refraction 928816732b -Fixed a small bug in the unpack dynarec causing it to drop back to the interpreter (MGS3 - now about 10fps faster!)
-Rewrote VIF0 DMA to work like VIF1, report any breakage from it.
-Tweaked a couple of cycle bits when stalling VIF

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2766 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-03-26 00:06:29 +00:00
refraction c697f6e6da Fixed for Looney Tunes menu. Commented some Forcebreak stuff for future reference, removed offending code from Vif0 till i can be bothered to rewrite the DMA to be like Vif1.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2760 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-03-21 00:34:54 +00:00
cottonvibes 0c8c01494f Minor vif/vu changes...
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2654 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-03-02 04:36:09 +00:00
cottonvibes c144913ede Vif:
- Deleted old vif transfer code.
- Deleted Vif_Commands.cpp
- Added Vif_Transfer.cpp


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2622 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-02-22 02:04:55 +00:00
cottonvibes 19b65d52c1 Set vif0 to use the new vif transfer code...
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2612 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-02-20 04:23:28 +00:00
cottonvibes 76194c82dc Vif - Cleanups/refactoring
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2585 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-02-11 04:36:47 +00:00
arcum42 c455ea38e5 Fix Linux. Use defines for CPU_INT.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2522 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-01-25 22:40:01 +00:00
cottonvibes 46079853f9 Unified vif0 and vif1's write32 functions...
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2518 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-01-25 07:42:45 +00:00
cottonvibes 5fa30179a8 some vif/vu changes...
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2517 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-01-25 06:42:09 +00:00
cottonvibes 34fa47eba1 fixed some vif stuff.
not sure if any game was using the code in hwwrite.cpp, so i couldn't test the fix.
the old code was wrong though (unless it was trying to implement some undocumented feature which i doubt).

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2516 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-01-24 22:50:18 +00:00
cottonvibes 92ddae17ce More vif refactoring/cleanups.
There is a lot of code duplication in the vif0/vif1 files, I will probably work on getting them to use common functions.


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2489 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-01-23 04:14:59 +00:00