Commit Graph

128 Commits

Author SHA1 Message Date
refractionpcsx2 0e3397239d GS: Correct GSIMR/GSCSR reg init, regression from previous release 2023-01-31 16:55:45 +00:00
refractionpcsx2 4b49c8bd6e GS: Correct CSR behaviour on mode change 2023-01-31 14:56:48 +00:00
refractionpcsx2 c1bd1fcbd4 GS: Clear Privilage registers on GS Reset via CSR 2023-01-31 14:56:48 +00:00
Stenzek 96a1c77577 Core: Remove PCSX2_CORE define and leftovers from wx 2022-12-24 08:42:23 +00:00
Connor McLaughlin 77e9938f0f GS: Manually throttle fullscreen UI rendering
Fixes rendering at thousands of FPS when pausing if FSUI is active.

Avoids flickering when recreating swap chain in vulkan on menu open,
because we're no longer doing it.
2022-12-08 09:36:41 +00:00
Connor McLaughlin 00bcb4cf02 System: Revamp memory allocation
Guest memory is now mapped into a shared memory/file mapping, for use
with fastmem.

64-bit and 128-bit arguments are passed by register/value instead of by
reference/address.

LDL/LDR/SDL/SDR now use 64-bit GPRs instead of SSE.
2022-10-14 22:24:42 +01:00
TellowKrinkle 738c8cb630 Core: Remove trailing whitespace from all files 2022-09-16 00:52:28 -05:00
Connor McLaughlin 22e9aea827 Config: Fix frame rate being parsed ever-so-slightly off
Also converts from double to float, we don't need additional precision
for storing these values.
2022-09-09 21:21:14 +01:00
lightningterror 0b557fe265 GS/Core: Purge frameskipping.
Get rid of frameskipping, won't be added to Qt.
2022-06-12 11:43:10 +02:00
Connor McLaughlin f6d997ca87 GS: Clear local memory on hardware reset 2022-05-29 16:15:18 +01:00
Connor McLaughlin d535331b4b Misc: Remove __fastcall, __fc, __concall and friends
These have no meaning in x64 (apart from throwing compiler warnings),
and we don't do 32-bit anymore. Also saves needing to include
`Pcsx2Defs.h` in files which don't otherwise need it.
2022-05-12 14:58:03 +01:00
Connor McLaughlin 185ed3ce0b MTGS: Combine init/read FIFO and remove several MTGS waits 2022-04-25 13:32:53 +01:00
refractionpcsx2 38b83af714 GS: Improve interlace handling and odd frames 2022-04-01 10:48:01 +01:00
Connor McLaughlin d3152bee9c GS: Add heuristic-based internal FPS 2022-01-23 17:15:48 +00:00
Connor McLaughlin 0c36647506 GS: Rewrite presentation interface and OSD 2022-01-02 15:06:39 +00:00
TellowKrinkle f7476dfb63 Core: Replace alignment macros with alignas 2021-11-14 13:52:20 -06:00
TellowKrinkle 648a958290 GS: Split GS.h into multiple smaller headers 2021-11-14 13:52:20 -06:00
Connor McLaughlin bd9b43b482 Config: Move more GS settings to base class 2021-10-01 23:46:52 -04:00
Connor McLaughlin e2992cbc02 Remove gui/ directory from target-wide includes 2021-09-17 22:03:00 -04:00
kojin 43e3055d11 config: normalize limiter values before saving 2021-09-11 10:48:24 -04:00
kojin 38f1a9a762 util: purge fixed-point library 2021-09-01 08:32:14 -04:00
Gauvain 'GovanifY' Roussel-Tarbouriech 136c326059 pcsx2: clean up references to plugins 2021-07-03 18:16:11 -04:00
ty e36199c499 Misc:Debugger: Support write-only GS priv reads 2021-04-01 16:32:47 +02:00
refractionpcsx2 fa18568d62 GS: Properly mirror GS reads to CSR 2020-12-24 10:56:36 +00:00
Kojin c57f861f2b
counters: account for vertical frequency differences in non-interlaced anolog modes (#3862) 2020-11-12 17:15:42 -05:00
Akash 59fa831542 PCSX2-Counters: Fix tracking of scalar limit
The scalar limit value was updated only during any turbo/slowmotion
toggle, let's also update it properly after any change in the emulation
settings.

This prevents the need of toggling from turbo/slowmotion to update to
your requested frame rate percentage.
2017-07-25 21:55:22 +02:00
Gregory Hainaut 9d99889703 pcsx2: remove unused variable 2017-04-30 21:20:23 +02:00
Akash 73a879caad PCSX2-Counters: Detect DVD variant videomodes
Improved the video mode detection code by also detecting the DVD variant video modes of NTSC & PAL, PSX mode actually make use of these specific variants, as well as the BIOS. Previously, I just had them as a single bios video mode due to laziness. (I know, my bad)

After further research, it seems that these DVD variant modes have their own individual VSync timing values similar to the standard NTSC & PAL video modes, dealing with those timer codes might be essential in getting timing accuracy of the PSX mode games. (I kept it to default NTSC/PAL values for now, interested people can mess with it later)

I had planned to do this before but there some were concerns that two different video modes make use of 0x73 gate in SetGsCrt, which was rather weird (how the heck could two video modes be used in a single param value?)

 0x73- DVDPAL        ( 720 x  480 @ ??.???Hz)
 0x73- DVD480P       ( 720 x  480 @ ??.???Hz)

Hence, we had decided to use the CMOD bit from SMODE1 (AKA color subcarrier frequency) to detect whether it's an analog or digital video mode and update the necessary timing values but seems like it's no longer necessary, after further discussions from some PS2 developers, we've come to the conclusion that only DVDPAL is possible via 0x73 in SetGsCrt. (So I assume the DVD480p init possibility was fake info from Blue and those other GSM guys who were reverse engineering the PS2)
2017-04-19 21:49:43 +05:30
Akash a9b63a2106 PCSX2-GS: Use interrupt mask register bitfields
Previously, the code used a lot of "bitwise AND" to get specific bitfields of the interrupt mask control register, which makes the code look a bit hacky, also it's even more hard for normal people to calculate the value when hexadecimal values are used for the bitwise operations where the register is totally binary. Instead of dealing with all those mess, let's just get the bitfield values from the already implemented nice union of the IMR register. FWIW it also makes the code more readable.
2016-12-01 16:32:27 +05:30
Akash f1c4b7d5df PSX-mode: Detect video mode via colorburst
Previously the video mode was initialized using the info fetched from SetGsCrt Syscall though unfortunately, it doesn't seem to work with PSX games as they don't use the SetGsCrt syscall. At such cases, we get the video mode info from the SMODE2 colorburst to properly maintain the timing as per the video mode. Might help some cases on PSX games where PAL/NTSC video mode was improperly set to a wrong limit instead of it's actual vertical frequency limit.
2016-11-05 10:29:29 +01:00
refractionpcsx2 2734f53a79 GIF: Implement GIF FIFO on GIF MFIFO mode.
-Removed some obsolete code
-Tiny optimisation for the gifUnit
-Fixed a tiny bug on GIF MFIFO
2016-09-23 17:48:13 +02:00
Akash 95d70db153 Counters: Move interlace detection code to SetGsCrt
* More accurate to PS2 behavior and avoids an useless SMODE write function, it makes sense to also move this as video mode specific colorburst detection was already moved to SetGsCrt.
2016-08-20 23:32:20 +05:30
Akash 78bf5ad88e PCSX2-Counters: Move VideoMode init code from _gsSMODEwrite to SYSCALL
* Moving the code to SYSCALL enables us to detect all the video modes properly.
* Added proper detection of VESA,HDTV,BIOS video modes.
2016-07-09 21:50:38 +05:30
Akash a1fdf1e625 PCSX2-Counters: Rename "GS_RegionMode" to "GS_VideoMode"
Technically there's no term called "RegionMode" and the values obtained through the SMODE1 register is actually used for identifying the video mode of the game not any region modes.

* Convert "GS_VideoMode" into an enum class
2016-07-09 21:50:28 +05:30
ramapcsx2 ec07571069 Revert "PCSX2-Counters: Some Changes to Video mode counter stuffs" 2016-06-09 00:44:14 +02:00
Akash 1a41053c76 PCSX2-Counters: Improved video mode detection
* The detected values using the SMODE registers were for the video modes and not the region of the game, changed the variable naming to video modes to prevent any confusions.
* Fix a bug where 1080I was reported as progressive
* Convert GS_VideMode into an enum class
* Move VideoMode init code from _gsSMODEwrite to SYSCALL
* PCSX2 will now correctly report whether the video mode is NTSC/PAL/VESA/480p/576p/720p/1080i/1080p
2016-06-04 22:10:27 +05:30
refractionpcsx2 68de5228a8 GIF Unit: Stop multiple fires of FINISH IRQ's
- Fixes Indiecar Series 2005.
- Savestate bump was required, sorry, not sorry :P
2015-08-12 02:16:23 +01:00
Sacha 3271048ab6 Remove init procedures from Hw.cpp 2014-08-15 14:17:35 +10:00
refraction c979181bd7 Counters/Vsync: Adjusted VSync according to an older test we had. Fixes Legendz Gekitou! Saga Battle. Also adjusted the number of scanlines depending on if the game is using interlacing or not.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5900 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-13 22:16:21 +00:00
refraction@gmail.com b51f0b01dd GIF Unit: Gave it some timing, kind of. Well the APATH and OPH flags in GIF Stat will now pretend it's transferring anyway, this makes games that read these flags and expect to see them busy very happy indeed. (187 Ride or Die as an example).
I'm expecting something to break, it's my code, it's bound to. But i have tested some 40 games without problems, so my hopes are high!

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5551 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-02-08 23:41:28 +00:00
sudonim1@gmail.com 22bdd1fbec GS/GIF: only raise interrupts on IMR writes on falling edges, i.e. if the interrupt was previously masked. Also remove a block about queued signals from IMR writes which makes no sense to me given that the CSR write to clear the previous SIGNAL should be setting CSR.SIGNAL already, which will trigger the interrupt by the standard mechanism. tl;dr: fixes realta nua and probably other stuff.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5273 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-06 22:04:39 +00:00
refraction 77f0422e7d Gif Unit: Bugfix for Path3 Masking. Fast and the Furious did some channel swapping which freaks it out. Now remembers if it was called by Path 3 for the DMA rewinding to work correctly.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5260 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-01 22:23:43 +00:00
ramapcsx2 a2908b4fed Found one more progressive scan flag and fixed a typo in the GSdx hacks.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5239 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-05-28 20:32:48 +00:00
ramapcsx2 2cb99f0e05 Preliminary NTSC progressive scan support.
The detection is based on a quickly reversed smode1 flag and needs to be done properly.
The timing itself also needs reversing and has only been tested on the VP2 intro video.
(That video now runs without audio / video desync when progressive scan is enabled :) )

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5179 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-04-26 17:07:36 +00:00
refraction 8b563888f8 Fix for Issue 1145 - Issue introduced with VSync changed broke Dynasty Warrior games, this should resolve it. Id swapped the VSync order around but still swapped which Field first, so it started out of sync, silly me!
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5145 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-04-06 14:00:12 +00:00
ramapcsx2 0933ee2fd5 A couple minor changes, including a bad looking block manager bug that wasn't really all that bad :p
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5109 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-02-28 20:57:07 +00:00
cottonvibes ac9bf45f98 pcsx2: Implemented Threaded VU1 :D
Threading VU1 took a lot of rewrites and new code to make possible (MTGS, microVU, gifUnit...), but we finally got to the point where it was feasible, and now we've done it! (so now everyone can stop complaining that pcsx2 only takes advantages of 2 cores :p).

The speedups in the games that benefit from it are great if you have a cpu with 3+ cores (generally a 10~45% speedup), however games that are GS limited can be a slowdown (especially on dual core cpu's).

The option can be found in the speedhacks section as "MTVU (Multi-Threaded microVU1)". And when enabled it should should show the VU thread-time percentage on the title bar window (Like we currently do for EE/GS/UI threads).

It is listed as a speedhack because in order for threading VU1 to have been a speedup, we need to assume that games will not send gif packets containing Signal/Finish/Label commands from path 1 (vu1's xgkick). The good news is very-few games ever do this, so the compatibility of MTVU is very high (a game that does do this will likely hang).

Note: vs2010 builds and Linux builds need to be updated to include "MTVU.h" and "MTVU.cpp".


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4865 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-08-12 02:31:49 +00:00
ramapcsx2 e181358986 Hack for GSdx hardware to fix inverted videos that showed up with the new GIF rewrite.
The problem as I understood is is incomplete COLCLAMP support.
Thanks to sudo for the hack :)

(Unfortunately we couldn't find out more about why these FMV also *all* flicker.)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4837 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-08-01 17:18:13 +00:00
cottonvibes f816748d72 microVU:
- Fixed a bug with mVU's ESIN implementation. This finally fixes the flower-petal bug in Radiata Stories (and hopefully the clouds-bug in VP2 but havn't tested). Rama and I have wanted to fix this for a long time, but never knew the problem :p
- Improved implementation of some undefined behavior that happens on branches to take into account pipeline stalls. 

gif / vif:
- Added some logging code that parses gif packets. It can be enabled by the PRINT_GIF_PACKET macro in Gif.h
- Deleted some old gif code.
- On ReadFIFO_VIF1() clear the out-reg to prevent uninitialized results in case GSreadFIFO() doesn't modify it...
- Create a fallback for GSreadFIFO2() so that its always defined (as long as the plugin implements GSreadFIFO()) 

pcsx2:
- Organized the virtual folders in vs2008 a bit...

Note: vs2010 and Linux builds need to be modified to add Gif_Logger.cpp and delete GIFpath.cpp


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4835 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-08-01 03:16:42 +00:00
cottonvibes c918df60d2 newGif: do what r4829 did, except only flush the gs primitives to the mtgs when theres going to be a GS download (busdir=1).
this should be the only time that an explicit flushing is needed.
doing it this way should be faster than flushing every incomplete gs packet like r4829 was doing...

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4831 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-07-27 03:55:43 +00:00