Commit Graph

4531 Commits

Author SHA1 Message Date
arcum42 f44f676cce Remove old obsolete code specific to ancient Windows versions of GSdx. 2020-07-25 19:15:03 -07:00
Tyler Wilding ef96e050f9
Resolve Recording Issues for Linux / OnePad users (#3293)
* git: Ignore uncaught linux build artifacts

* onepad-legacy: Return legitimate key event on `PADkeyEvent` call

Onepad-legacy was the plugin that was building and being used on my linux environment.  I'm not sure if t hat's expected and normal 'onepad' has yet to take over.

* onepad: Return legitimate key event on `PADkeyEvent` call

* recording: Remove unnecessary `PadKeyDispatch(ev)` wrapping func

* recording: Cleanup key event handling when GSFrame CoreThread is paused

* recording: Refactor recording status check to be more explicit

* recording: Define additional key bindings for capitalized varient

Despite the advice of the docstrings in these files, on linux this seems to be required for the bindings to consistently fire.

* onepad: Declare `AnalyzeKeyEvent` not static

* recording: Ensure file extension is appended to recording file on linux

* recording: Correct typo in comment

* recording: Better wording around linux keybinding handling

* Remove unneeded `extern`
2020-07-25 17:58:50 -07:00
refractionpcsx2 b28382632a
IPU: Perform an interrupt on IPU_CTRL Reset. (#3555)
* IPU: Perform an interrupt on IPU_CTRL Reset.
Doing this reset performs a forced command end, meaning the IPU will run through the procedure of ending any command running and telling the core that it is done, even if there is no command currently active.
Fixes Fightbox

* Remove Fightbox patch
2020-07-24 08:56:46 +01:00
lightningterror a1acaaa50c pcsx2-gui: Remove SuperVU reference from vuflaghack tooltip. 2020-07-23 21:06:55 +02:00
John Zimmermann 7e52b9550f
Allow running on systems without wx stackwalker (#3519)
closes #2796
2020-07-19 19:13:15 -07:00
refractionpcsx2 8a6d56bb29 Revert IOP Counter change. IOP counters already edge triggered based on INT flag 2020-07-18 20:54:29 +01:00
refractionpcsx2 54f47572af EE REC: Prevent crash when DI instruction is in branch delay slot 2020-07-16 20:09:12 +01:00
refractionpcsx2 e04d86ad39
VIF MSCAL instructions wait on VU T-Bit stop (#3539)
* VIF MSCAL instructions wait on VU T-Bit stop
Fixes:
The Sims
Spiderman 3
Sharks Tale
Maybe some bits of Over the Hedge

* Removed Spiderman 3 patches

* Fix VIF DMA resuming when stalled on tag

* Remove warning which doesn't really need to be there anymore
2020-07-15 13:15:47 +01:00
refractionpcsx2 105478aa6d EE/IOP Timer Interrupt Handling
Don't interrupt if compare/overflow flag is already set

Removed patches for Harry Potter Prisoner of Azkeban and Chamber of Secrets as they should no longer be required.
Note - Some harry potter games still have the EE Timing Fix which may also not be required
2020-07-15 13:14:19 +01:00
tellowkrinkle 1e1d455a4d
Use PCH with Clang (#3546) 2020-07-14 22:57:11 -07:00
tellowkrinkle f7d84c4637
pcsx2: Fix a few crashes in macOS. (#3424)
* Fix crash on shutdown in macOS

* Fix crashing in ISO list on macOS

* Use MAP_FIXED on linux too
It works as expected and has no race conditions.
2020-07-12 23:54:21 +02:00
RedDevilus c23f3be21f pcsx2-gui: Modern Dark Themed Console v2.Replaces old dark mode with modern dark mode to the console.
Darker than dark (#3446)
2020-07-12 18:46:50 +01:00
RedDevilus 257f8b1142
pcsx2-gui: Modern Dark Themed Console. (3446)
Replaces old dark mode with modern dark mode to the console.
2020-07-11 22:44:24 +02:00
Florin9doi be1c97a18b Mpeg.cpp/h indentation 2020-06-27 15:03:44 +01:00
Mrlinkwii 0f1cbe7410
SPR spacing cleanup (#3499)
Correct spacing in SPR.cpp
2020-06-26 20:21:55 +01:00
prafullpcsx2 4e4a097240
Implemented memory mode check in cop0.cpp (#3324)
This makes Next Generation Tennis 2003 (Roland Garros French Open 2003) and Spongebob Battle for Bikini Bottom (PAL) work.
2020-06-09 21:50:06 +01:00
Jonathan Li d08e49f2df pcsx2: Remove leftover array entry from SuperVU removal
It was causing GameDB fixes to be applied wrongly.
2020-06-03 20:16:00 +01:00
Shanoah Alkire 30ffda406c Remove -Wno-char-subscripts, as it was there for supervu. 2020-06-01 16:34:31 -07:00
Ryudo300 2a9451fed5
PCSX2-GUI: Update BackgroundLogo. (#3423)
Fixes the background/logo glitching out when using DPI scaling.
2020-05-30 21:19:09 +02:00
lightningterror a9f41c6824 Revert "pcsx2: Change order of "Video (GS)" submenu. (#3265)"
This reverts commit b00792d6ce.

It confused a lot of people that were used to the previous position.
Maybe was a good idea, but bad result.
2020-05-27 22:34:48 +02:00
arcum42 5903ee95fe Remove unused folder in Visual Studio project. 2020-05-24 20:04:20 -07:00
arcum42 2b115d031e
Remove superVU. (#3386)
* Remove superVU, as well as the VUClipFlagHack, which was SuperVU only.
2020-05-24 19:08:12 -07:00
Jonathan Li 0277b69ff1 ipu: Revert Klonoa 2 workaround
This reverts commit 10ee832dc1.

The workaround should be unnecessary now that the indx4 is properly
aligned.
2020-05-25 00:20:44 +01:00
Jonathan Li 08cb843180 ipu: Use alignas to ensure 16-byte alignment of indx4 array 2020-05-25 00:20:44 +01:00
Christian Kenny aec8e959d9 SaveStateBase: Remove unused "m_DidBios" bool. 2020-05-24 13:27:11 +01:00
Christian Kenny 5ab97eb873 Savestate: Remove unimplemented exceptions. 2020-05-24 13:27:11 +01:00
tellowkrinkle f9771c38a6
macOS fixes (#3357)
* macOS compile

* Fix memprotect error on macOS

* Fix semaphore wait + thread cancel on macOS

* Fix timedlock timeout calculation

* spu2-x macOS

* onepad macOS support

* Add MacOS game controller db

* Disable onepad_legacy on macOS

* Fix spu2-x configuration crashes

* Make recompiler work on 32-bit macOS

* Use dylib extension for plugins on macOS

* Make app bundle on macOS

* Use git info for Info.plist version
2020-05-23 23:19:47 -07:00
Jonathan Li efe3bc1613 pcsx2: Implement IPU VQ conversion
Fixes the blue flames in Klonoa 2.
2020-05-17 21:33:41 +01:00
Jonathan Li dca0c4ed79 pcsx2: Change IPU vqclut data type
This should improve the readability of the IPU VQ conversion.
2020-05-17 21:33:41 +01:00
Jonathan Li c533a65764 pcsx2: Add IPU dither block SSE2 implementation 2020-05-17 21:33:41 +01:00
Jonathan Li f9b51e2656 pcsx2: Add IPU dithering to RGB32->RGB16 conversion 2020-05-17 21:33:41 +01:00
Jonathan Li 1ac1bc9a95 pcsx2: Move IPU RGB32->RGB16 format conversion to separate file 2020-05-17 21:33:41 +01:00
Jonathan Li cb96dec8a6 pcsx2:windows: Remove DWM code
DwmEnableMMCSS doesn't seem to make a difference.
DwmSetPresentParameters is unused and is also not implemented from
Windows 8.1 onwards.
2020-05-17 18:13:39 +01:00
Filjo Abraham b00792d6ce
pcsx2: Change order of "Video (GS)" submenu. (#3265) 2020-05-15 16:46:46 +02:00
water111 94e1635882
Make recLUT not hardcoded to 32 MB. (#3095)
This change makes the EE recompiler not hardcoded to working with 32 MB of RAM, and instead work with the amount of RAM set in Ps2MemSize::MainRam. The rest of PCSX2 seems to work fine with more than 32 MB of RAM - it is only the EE recompiler that has trouble. If the Ps2MemSize::MainRam value is not changed from the default 32 MB, there should be no change: 32 MB / 0x10000 = 0x200, the value that was there previously.

This may be helpful if anybody else in the future wants to emulate a PS2 dev kit with 128 MB or RAM, or maybe the PSX dvr thing which I think has 64 MB of RAM. I've confirmed that with the change, you could set Ps2MemSize::MainRam to 128 MB, and execute code with the recompiler that's above the first 32 MB of RAM, and do VIF and scratchpad DMA transfers from this upper memory as well.
2020-05-12 23:03:38 -07:00
arcum42 3c8d4029dd
Only update the backup when freezing or defrosting, not when updating the ui. Refactor saveslot code. (#3363) 2020-05-12 22:55:34 -07:00
refractionpcsx2 c009a95d68
Fix situation where a VIF IRQ triggers and the game triggers a STOP causing the IRQ to never trigger. (#3385)
Fixes Nitro Bike
2020-05-12 23:59:56 +01:00
refractionpcsx2 184f0df2c5
Modify VU PC addressing so it only multiplies by 8 before entering the p… (#3362)
* Modify VU addressing so it only multiplies by 8 before entering the program
Fixes issues with VU1 TPC being read multiplied by 8 (bad)

* Removed assert on SuperVU which no longer makes sense
2020-05-12 23:59:42 +01:00
refractionpcsx2 ce1955ff60
Allow reading of 8bit timers (and other hardware pages) (#3361)
Fixes Robin Hood
2020-05-07 20:30:35 +01:00
arcum42 5c60f66890
Fix various cmake issues (#3352)
* Change the minimum cmake version to a range. Uses the new policies of the newer versions if you are on them, taking care of CMP0054.

* Grab a newer version of FindHarfBuzz.cmake from Webkit that fixes the cmake warning the earlier one was giving.

* Add in -ftime-trace as an option on build.sh.

* Precompile PrecompiledHeader.h if you are using cmake 3.16+ and GCC. (Currently disabled on clang due to compilation issues.)

* Check if target_precompile_headers exists rather than by version.

Co-authored-by: scribam <scribam@users.noreply.github.com>
2020-05-07 08:32:34 -07:00
Jonathan Li 15a9a95284 pcsx2: Bump version number 2020-05-07 08:40:04 +01:00
refractionpcsx2 18f772e71c Debugger: Fix editing of function names 2020-05-02 14:56:49 +01:00
refractionpcsx2 97df1dd3b5 Only reload the function symbols in debugger once per game 2020-05-02 14:22:43 +01:00
refractionpcsx2 4ce3fdfcb2 Fix up debugger stepping 2020-05-02 04:53:03 +01:00
refractionpcsx2 939e576df9 Separate debug pausing from savestates and recording frame advance 2020-05-02 04:29:30 +01:00
refractionpcsx2 ea52da9428 Move debugger function list reset to when the debugger breaks in to the code. Stops a long freeze when first launching a game 2020-05-02 03:41:42 +01:00
lightningterror 62dd5d980d pcsx2-tas: Adjust TAS code to be properly disabled with macro.
VS complains about errors so isolate the code in each file for TAS with macros.

Remove ifndef for m_capturingVideo as it is used for video capture menu.
2020-03-19 20:27:19 +01:00
RedPanda4552 a7285ff375 PCSX2: PCSX2 1.6 Documentation Overhaul. (#3139)
Update all documentation for 1.6.
Source files for documentation are in md format and are kept in pcsx2\pcsx2\Docs, final exported/converted docs are in pdf format (Configuration_Guide and PCSX2_FAQ).

Update First time wizard to reflect recent documentation changes.
Update cmake to reflect recent documentation changes.

PO/POT/MO Localisation needs to be updated for the First time wizard to include the documentation changes.
NSIS installer needs to be updated to reflect the recent changes.
2020-02-10 04:46:49 +01:00
Jonathan Li bb5e91a377 pcsx2:gui: Make the presets tooltip translatable again 2020-01-17 08:45:42 +00:00
Jonathan Li 7a83f7c8f6 pcsx2: Quickfix for translatable string not being picked up by xgettext 2020-01-15 09:24:41 +00:00
refractionpcsx2 10dd9412a1 Fix CMSAR1 execution to use correct multiplier
Fix ILW/ISW/LQ/SQ on microVU for reading VU1 regs

Marvel Nemesis - Rise of the Imperfects goes ingame now, but it's quite messy
2019-12-30 15:26:44 +00:00
lightningterror 90b0e7af83 pcsx2-gui: Remove Dump memory option from Debugger.
Feature was never implemented, option served no purpose to remain there.

Issue #3186
2019-12-23 19:47:55 +01:00
chaoticgd 63a6e94444 Fix VIF unpack log message in Vif_Unpack.cpp for VU1 2019-12-23 01:17:25 +00:00
refractionpcsx2 908049a0fb pcsx2: DI execution is delayed by one instruction.
Fixes booting issues in the following games:
Jak X, Namco 50th anniversary, Spongebob the Movie, Spongebob Battle for Bikini Bottom,
The Incredibles, The Incredibles rize of the underminer, Soukou kihei armodyne, Garfield Saving Arlene, Tales of Fandom Vol. 2.

The games will no longer require a patch to boot.
2019-12-22 20:58:29 +01:00
Jonathan Li 363b87b334 gui: Fix about dialog logo DPI scaling
Also dynamically allocate the wxStaticBitmap control since its parent
window will delete it, which can cause issues.
2019-12-19 19:53:40 +01:00
lightningterror 1dc5d07696 pcsx2-gui: Fix dpi scaling for some windows.
About, first time wizard, import settings, assertion dialog.
2019-12-19 19:53:40 +01:00
lightningterror 18fe9431e0 pcsx2-gui: Update About window.
Add forum and license links.
Remove Developers and Contributors names, replaced with:
"Big thanks to everyone who contributed to the project throughout the years."
2019-12-19 19:53:40 +01:00
Jonathan Li aa03c83126 pcsx2: Fix mainframe wxStaticBitmap delete issue
wxWindow classes will delete their children when destroyed, so
the wxStaticBitmap control must be allocated with new to avoid
undefined behaviour.
2019-12-02 20:40:48 +00:00
Some1fromthedark e7d1a58a5a pcsx2: Remove special case from pointer patch command parsing (#3135)
Removes the special case in type 6 (pointer) code parsing when the data value
is 0. This matches Codebreaker behaviour.
2019-10-23 01:21:01 +01:00
Jonathan Li c87b8c7f49 pcsx2|utilities: Remove ambiguous wxString-related overloads
Avoid some function overloads that can accept char*, wxChar* and
wxString as a parameter. wxString can be constructed with either of
those parameters, so the function overloads may actually result in
ambiguity errors. Keep the wxString parameter versions and remove the
rest.

Fixes some compile errors on FreeBSD.
2019-10-07 01:39:32 +01:00
KrossX fd5d80b53f Set F4's AlsoApplyToGui to false to avoid a hang when spammed. 2019-09-30 19:56:10 +05:30
Jonathan Li 45687cd51a pcsx2: Partially fix IPU PACK command
The pack command converts from RGB32 to RGB16/INDX4, not RAW8 to
RGB16/INDX4.

Also, the VQ conversion (still unimplemented) only occurs when the
output format is 0, so fix that as well.
2019-09-29 12:06:27 +01:00
Some1fromthedark 33f4f04594 pcsx2: Fix parsing error in pointer patch command (#3112)
Fixes a type 6 (pointer) code parsing error that resulted in codes
with more than one offset getting terminated early.
2019-09-21 17:32:33 +01:00
arcum42 877c4358d8 Take care of a typo that only effects pcsx2 if built without superVU. 2019-09-07 11:09:45 -07:00
FlatOutPS2 0e84e2c438 pcsx2-counters: Revert to older VRender/VBlank timings
This fixes timing issues in Dynasty Warriors 3 Xtreme Legends
(fake save corruption), Jak II (random speedup issues) and Shadow of
Rome (FMV audio issues).

Also update the comments since a lot of them refer to past revisions of
the code.
2019-09-02 08:23:05 +01:00
Jonathan Li 92aa43fe91 cdvd: Fix end-of-disc issues (#3051)
* cdvd: Fix off-by-one end of file checks

* cdvd: Fix loading for games that attempt to read non-existent sectors

Some games will hang when attempting to read non-existent sectors.
Just do nothing when it occurs instead of erroring out.

* cdvdgigaherz: Fix loading for games that attempt to read non-existent sectors

Some games will hang when attempting to read non-existent sectors.
Just do nothing when it occurs instead of erroring out.

* cdvd: Don't write non-existent sectors to blockdump
2019-08-25 16:09:28 +02:00
KrossX 9788f6db2c PCSX2: Avoid hang when switching renders with hotkey. (#3072) 2019-08-19 15:44:33 +02:00
KrossX 4bb968158d PCSX2: Wait some frames between F9 SW render toggles. (#3052)
Setting the toggle variable is now at the vsync point. FMV toggle should still work as usual, but the F9 toggle should have to wait the full period of around 32 frames. This seems short enough while also depends on how fast those frames can rendered, avoiding having to set a timer in ms.
2019-08-07 19:51:29 +02:00
arcum42 11187cff9e
PCSX2: Set pad plugin and bios defaults automatically. (#3020)
Default to Onepad on Linux, Lilypad on Windows, and default to using the bios if there is one listed.
2019-08-02 20:06:50 -07:00
arcum42 2f8932e370 Cache code cleanups. 2019-07-13 17:49:51 -07:00
KrossX c678627b19 pcsx2: Auto select proper GSdx plugin in Plugin Selection. (#3013)
In order AVX2 -> SSE4 -> SSE2.
Auto selected by cpu instruction support.
2019-07-12 23:48:20 +02:00
gibbed b739e9187d pcsx2: Fix microVU debug logging. 2019-07-12 06:25:12 +02:00
arcum42 cc1a320c61 Remove sVU_Compare.h and iVU1micro.cpp, both of which appear unused. 2019-07-06 15:47:26 -07:00
arcum42 fc35de02f2
build.sh and cmake plugin code cleanup (#2953)
* Refactor build.sh. Restructure finding plugins. Remove legacy code. Add --clean-plugins option. Document --no-trans option.

Don't do setcap if dev9ghzdrk isn't being built. List dependencies if they are missing. Remove code related to zerospu2, and misc plugins we aren't building. Minor message changes.
2019-07-04 19:49:11 -07:00
Akash a36d5a0221 CDVD: Add fallback path for blockdump source name unavailability
2 pass fallback cases for the untitled scenario was mentioned in the TODO comment to be completed, added  one of them. (Still doesn't seem reliable enough, but honestly when do we  Also modified blank space indentation at a part to tab space to satisfy lightning boi.
2019-07-01 11:29:35 +05:30
Akash 7290576a2a CDVD: Add configurable directory for blockdumps storage
Previously the blockdumps will be automatically stored in the root directory of PCSX2, added an INI option in "PCSX2_ui.ini" named "CurrentBlockdump" to modify the directory to whatever is preferred by the user. (Some people were requesting for this)

A GUI could also be added if anyone wants, but considering the popularity of this I'm not sure as blockdumps will only be used my less percentile of users and mostly by testers and developers for debugging.
2019-06-30 11:48:12 +05:30
Shanoah Alkire cc6a58da18 Remove sVU_Debug.h, as nothing in it is actually used anywhere. 2019-06-16 19:31:02 -07:00
arcum42 563772fdf1 Added a universal 64-bit define, and a message indicating that Pcsx2 was compiled as 64 bit in the system information. 2019-06-16 17:33:17 -07:00
Ian Brown a1a6374709 Build: Changes required to compile and run using VS 2019 (#2975)
in vs 2019, the system xhash used by unordered_map uses Target in its template definition. pcsx2 #defines this in the r5900 and r3000 headers which leak cause a cryptic compilation error. A quick fix here is just to undef it in gamebase.h. A better fix would be to encapsulate the definition or use something more c++ to avoid the pre-processor. Add a comment to explain the _Target_ undef.

tap.h did not have string defined. I guess this was included transitively somewhere with an earlier set of system headers.

Biostools, the file is opened in text mode which causes the bios to be partially read. I'm not sure that's vs2019 specific but it's wrong in any case. Maybe the default mode parameter changed at some point. Maybe wxFile would be a better choice here rather than WxFFile because wxFile always open s in binary mode.
2019-06-01 13:34:21 +02:00
Thomas Evans 1f1b68a9b4 debugger: Muti-byte hex strings can now be pasted into the memory view. (#2960)
You can now paste a hex string into the memory view (with Ctrl+V).
2019-06-01 13:30:03 +02:00
Shanoah Alkire 2941fd9b87 wx: Replace a bunch of wx 2.8 macros with the wx 3.x versions. 2019-05-11 20:43:47 -07:00
Shanoah Alkire 5d4ae31ba1 Add a few default functions in explicitly. (-Wdeprecated-copy) 2019-05-11 19:18:18 -07:00
lightningterror 87f36852b6 pcsx2: ofc I forgot to completely remove the variable from the previous commit ... 2019-05-01 22:57:46 +02:00
lightningterror bbce809ac9 pcsx2-gui: Don't put Screenshot button in a submenu.
Bonus take care of a compiler warning.

Issue #2949
2019-05-01 22:40:49 +02:00
hibye8313 56a976e277 microVU: Add gamefix for Crash Tag Team Racing. Fixes constant recompilation problems. 2019-04-30 22:57:11 +01:00
lightningterror 6a4fa90b8f pcsx2-wx: Remove extra separator line.
Close #2936
2019-04-22 17:38:28 +02:00
lightningterror 4202cbe7e8 pcsx2 savestates: Bump savestate version, required for the previous TAS PR merge.
Attention! Older savestates will be incompatible so please use a
previous older dev build (such as dev 3043) to save your progress on
memory cards instead!
2019-04-21 00:50:18 +02:00
Tyler Wilding 0980c7185f recording: Opt-into keybindings, revert potential overrides if disabled 2019-04-21 00:45:44 +02:00
Tyler Wilding ec9c97e0bf recording: freeze recording information to savestate regardless 2019-04-21 00:45:44 +02:00
Tyler Wilding 506ea4c4d2 recording: various formatting and review corrections
Squashed commit:

[7955b42e3] recording: Throw errors on fread/fwrite errors.

[5a2160f9e] recording: Remove function implementation from header files

[f2937ab5f] recording: Fixed UndoCount metadata bug and will gracefully fail if savestate is missing

[d7f4d43e5] recording: Refactored code-style to be consistent

[0f77fbb71] recording: Refactor to use switch statements

[28d7945f6] recording: Resolve CMake warnings and use tagged github links for cross-linking to LilyPad

[7c01c6cb4] recording: corrected disparity between comment and code

[17a8bd8d6] recording: Remove all usages of #define

[3830f5a82] recording: Refactor enums and general cleanup

[569ef7d67] recording: Completely disable new console log sources when recording is disabled
2019-04-21 00:45:44 +02:00
Tyler Wilding 08d923ca6f recording: Append copyright headers
Squashed commits:

[47be08613] recording: Forgot to refactor the usage of std::size
2019-04-21 00:45:44 +02:00
Tyler Wilding 64104ca9fd gui:recording: Revert addition of Screenshot As, will contribute as separate PR
Along with changing the .bmp file naming scheme.
2019-04-21 00:45:44 +02:00
Tyler Wilding c12c6ed149 recording: Added some more useful logs and cleaned up some TODOs 2019-04-21 00:45:44 +02:00
Tyler Wilding eb7030cf12 recording: Use conventional savestate functions, save save-state in a separate file alongside recording file
Regressions were discovered after merging with master due to way the save state data was saved within the movie file.
This change uses the same functions used in the GUI to create savestates to create a compressed save-state file.  Eventually this could be re-incorporated back into the recording file and could be backwards compatible.
2019-04-21 00:45:44 +02:00
Tyler Wilding 270f7fd905 recording: Significant refactor on VirtualPad implementation 2019-04-21 00:45:44 +02:00
Tyler Wilding d7074503d8 recording: Use wxFopen instead of f_open 2019-04-21 00:45:44 +02:00
Tyler Wilding 6b3fb14339 recording:gui: Temporarily remove Movie Editor GUI, add back at a later date
This is a rather involved refactor and isn't critical to getting the main PR / spike merged.
2019-04-21 00:45:44 +02:00
Tyler Wilding db4ff1e8fc recording:gui: Overhaul VirtualPad GUIs 2019-04-21 00:45:44 +02:00
Tyler Wilding 3d6bfacd55 recording:gui: was not correctly removing recording top level menu bar option 2019-04-21 00:45:44 +02:00
Tyler Wilding 8b6ccde441 gui:recording: force ascii for filepath of recording, remove legacy conversions 2019-04-21 00:45:44 +02:00
Tyler Wilding cb7425c59f recording: removed C++ reserved pattern usages, removed japanese comments 2019-04-21 00:45:44 +02:00
Tyler Wilding 6e111205a2 travis: include recording header files in travis build properly 2019-04-21 00:45:44 +02:00
Tyler Wilding 5fefe28e39 recording: recording file implementation 2019-04-21 00:45:44 +02:00
Tyler Wilding 94c160401c recording: implementation for recording file GUI panel 2019-04-21 00:45:44 +02:00
Tyler Wilding 0021ad66e0 recording:gui: dialog for creating a new recording 2019-04-21 00:45:44 +02:00
Tyler Wilding ddd2e3f8f0 recording: main recording functions and input gathering 2019-04-21 00:45:44 +02:00
Tyler Wilding 7a03bafa27 recording:gui: movie editor window and virtual pads 2019-04-21 00:45:44 +02:00
Tyler Wilding 7b79235f19 gui:recording: new mainmenu event listeners 2019-04-21 00:45:44 +02:00
Tyler Wilding e2e882e08b gui:recording: All main window modifications and additions 2019-04-21 00:45:44 +02:00
Tyler Wilding bad3fa73f4 recording: implementation for new keybindings 2019-04-21 00:45:44 +02:00
Tyler Wilding 407224d29c recording: added new log sources 2019-04-21 00:45:44 +02:00
Tyler Wilding e3333a9b8c recording: all modifications to pcsx2/ source 2019-04-21 00:45:44 +02:00
Tyler Wilding 6252c7bd6a recording: visual studio project changes 2019-04-21 00:45:44 +02:00
Tyler Wilding f147923555 travis:recording: added Recording sources to CMake scripts 2019-04-21 00:45:44 +02:00
FlatOutPS2 17ac536116 pcsx2: Fix stall on branch .. in delay slot.
Fixes stall when loading a stage in WRC 3.

Original pr https://github.com/PCSX2/pcsx2/pull/1783

Collaborator: lightningterror
2019-04-10 04:06:18 +02:00
Chromaryu 5f099b1bea Pnach: Add Author line. (#2911)
Adds a separate author line for pnach entries. This will allow to separate comments with other info such as pnach purposes.

GameDB could be updated with the new changes for a more slick and clean look.
2019-04-01 23:10:43 +02:00
refractionpcsx2 10ee832dc1 Workaround to avoid access violation problem in Klonoa 2 loading Volkan Inferno
Lets hope the build bot doesn't mess this up :P
2019-03-21 20:17:14 +00:00
lightningterror 811d8781ab cdvd: Get rid of code that disabled loading psx discs.
Not used anymore.
2019-03-01 17:21:13 +05:30
Chromaryu 8a16d96112 PCSX2-EE: Improve SetGSCrt logging 2019-03-01 17:09:37 +05:30
Akash 7106909d3f PCSX2: Avoid enabling VuClipFlag at some scenarios
VuClipFlag hack is only used for SuperVU1 Recompiler, let's avoid enabling it when it's not used.

Previously a console message would be provided stating that "(GameDB) Enabled Gamefix: VuClipFlagHack" even when the user is using the Interpreter (or) MicroVU Recompiler. The following patch prevents such confusions.
2019-03-01 14:41:13 +05:30
Shanoah Alkire 64ab2d53e1 Add comments to prevent various warnings about falling through on case statements. 2019-02-23 22:08:57 -08:00
lightningterror 6905d4d883 x86emitter: Purge empty file sse_helpers.h.
Code was removed in
60a9463e7a
Right now it's useless.
Update VS/cmake project files to remove any mentions of the file as
well.
2019-02-18 11:51:06 +01:00
RedPanda4552 6a52b8cdcb pcsx2: Update speed hack presets to be more friendly and usable (#2793)
Old presets touched parts such as VU clamping for what seems to be no good reason at all, and applied some rather dodgy combinations of EE cyclerate and cycle skipping. Also added MTVU to presets 3-6.
2019-01-30 22:29:47 +01:00
GovanifY 628f5abaac PCSX2: Remove the arbitrary limit on patches by converting the patch list to a vector. (#2797)
Pnach had a limit that, while increased at some point to 2048, is still not enough for everyone. This uses a vector to avoid that limit, as there is no reason to keep it and people loading pnach with over 2048 patches most likely know what they are doing.
Inipatch group member was also unused in the whole codebase so I did some cleanup and removed it.
2019-01-23 02:01:30 +01:00
lightningterror ea38e2eba5 pcsx2: Remove/disable unused variables.
Removed:
MC2_SIZE in MemoryCardFile.cpp,
length in microVU_Log.inl
VU_Neg_Infinity in sVU_Upper.cpp.

Commented out:
mc_sizeinfo_8mb in Sio.cpp
2019-01-09 16:01:56 +01:00
lightningterror 549b438a84 pcsx2: Remove unused variable "maddr" from Vif1_MFIFO.cpp.
One less warning to worry about.
2019-01-01 22:07:18 +01:00
Shanoah Alkire 0ff7ea3ccc Only use -Wno-class-memaccess on gcc 8.0 or higher, as it didn't exist previously. 2018-12-26 21:55:25 -08:00
Shanoah Alkire 0e43803562 SaveSlots: Initialise the crc to 0, as well as serialName being an empty string. 2018-12-11 23:34:24 -08:00
Shanoah Alkire 73209c520c Some annoying logs about COP0 are now COP0 Logs. 2018-12-11 21:22:41 -08:00
Shanoah Alkire bea4e56d5d Saveslots: Initialize serialName to a blank string. 2018-12-10 19:55:54 -08:00
arcum42 d05163a26f
Remove gigaherz old wip 'new' iopdma code. (#2703)
* Remove gigaherz old wip new iopdma code.

* Second pass removing dma code I missed last time.
2018-12-09 18:00:04 -08:00
lightningterror 417ba188bd PCSX2: Change EE Cyclerate, Cycle Skipping speedhacks gui level colors.
0 - Green - no change
-1/+1 - Orange
-2/+2 - Light Red
-3/+3 - Red - no change.
2018-12-05 21:27:58 +01:00
lightningterror ee89fa5eec pcsx2: Add StaticLine between Zoom and Disable window resize border. 2018-11-22 06:19:15 +01:00
lightningterror 57a90e5fa5 pcsx2: Purge leftover commented out code for exclusive fullscreen.
Keep the comment references as they provide some good info.
2018-11-22 01:46:54 +01:00
lightningterror ec6b5a12e3 pcsx2: Fix some issues on FMV Aspect Ratio Override.
gui: Move the Off option to the top instead of bottom for FMV Aspect Ratio Override.

It's not ideal for it to be at the bottom.

Adjust the logic how the button works, there was an issue if both aspect ratios
were the same the aspect ratio chosen was selected to Fill.
Also adjust the code so the button better responds to realtime toggling.

If disabling the button realtime during a fmv then the normal aspect ratio
should be chosen.

There's still an issue left where if the fmv button is changed first and then
the aspect ratio button the button would would not work. Switching it off
seems to reset and make it work again.
2018-11-19 17:03:45 +01:00
lightningterror c6abc08b5f PCSX2: Correct FMVAspectRatioSwitchNames ini labels.
Small follow up correction from #2690, the ini options were inverted.
2018-11-18 21:15:29 +01:00
FlatOutPS2 fd7a862226 PCSX2: "FMV Aspect Ratio Switch/Override" feature.
Change "Switch to 4:3 aspect ratio when an FMV plays" to
"FMV Aspect Ratio Override" drop down menu.

The option temporarily changes the Aspect Ratio to either
16:9 or 4:3 depending on the option that is selected,
and depending on the Window Aspect ratio that is selected.

Original commit:
8d471e1f16

Co author: lightningterror.
2018-11-18 19:26:07 +01:00
arcum42 2e1db411fa GSdx: Folder Reorganization. (#2657)
This pull request is for the pending reorganization of the folder structure on GSdx,
making it better organized and easier to work with.

Also remove unused GSTextureFX.cpp file.
2018-11-16 19:41:37 +01:00
Shanoah Alkire 51ceec74a3 A bit of cleanup. 2018-11-15 00:55:49 -08:00
PSISP 9e7b2ed153 Debugger: Make EE kernel region accessible to debugger. (#2559)
Currently, none of the EE kernel is viewable from the debugger, which poses issues when debugging code that makes use of syscalls. This PR should allow the memory region 0x80000000 - 0x800FFFFF to have readable disassembly.
2018-11-08 23:17:30 +01:00
Iritscen a3c6ad636b PCSX2: Add ability to pass launch arguments to games with CLI option '--gameargs="-arg1 -arg2 -etc (#2576)
For more information please check the PR (#2576) since it's a bit detailed.
2018-11-07 19:07:17 +01:00
Shanoah Alkire 8f52d82e58 Refresh the save slots if either the crc *or* the serial number are different. (Needed for ps1 saves.) 2018-10-28 16:03:50 -07:00
Shanoah Alkire 122871654e Expand out a define to get rid of a warning. Get rid of other compiler warnings. Re-indent so that it doesn't look like a statement is part of an if statement when it isn't. 2018-10-27 02:49:03 -07:00
Shanoah Alkire 6710b0c906 Get rid of a few GSdx warnings. Remove some extra newlines in Sio's console output. 2018-10-27 01:59:53 -07:00
lightningterror a25f3ccdda pcsx2-gui: Align some of the buttons/options in GS Window.
They look a little bit more tidy now.
2018-10-22 21:22:43 +02:00
Shanoah Alkire 322290b19c Reenable the new saveslots. Disable the logging for them. 2018-10-15 23:57:33 -07:00
Shanoah Alkire 8f986828e7 Revert "Saveslots: This version is still commented out, and somewhat broken at the moment. If you uncomment it, after loading a game, pause and then resume to force the save and load menus to update."
This reverts commit 49b91ea78f.
2018-10-15 23:46:41 -07:00
lightningterror 77ac35058c pcsx2: small string typo fix. 2018-10-16 01:08:12 +02:00
lightningterror 06f4b77f63 PCSX2: Add tooltip warning for Widescreen Patches.
Close #1733
2018-10-15 09:14:57 +02:00
Shanoah Alkire 49b91ea78f Saveslots: This version is still commented out, and somewhat broken at the moment. If you uncomment it, after loading a game, pause and then resume to force the save and load menus to update. 2018-10-14 02:41:41 -07:00
Shanoah Alkire cb05daf437 Add some logging for the saveslot changes, and the option to turn on just the extra ui update calls without the other saveslot changes, for testing. 2018-10-13 18:43:41 -07:00
Shanoah Alkire 149f30c7fa Removing some warnings from GSdx and pcsx2 because gcc 8 spams them mercilessly. They should probably be fixed properly, but in the meantime, this'll prevent them from masking other compiler warnings. 2018-10-13 13:56:38 -07:00
pgert 48d9763d26 PCSX2: GUI textstring corrections 2018-10-10 23:40:11 +02:00
Shanoah Alkire 8defe54e3b Redo how the saveslot code works. Still leaving disabled until it's been tested. 2018-10-05 22:21:54 -07:00
lightningterror d5700a8508 pcsx2: Update some redirect links. 2018-10-05 02:01:53 +02:00
Daniel Nowak da1eb056a3 Add network capability for Linux (#2586) 2018-10-02 21:37:34 -07:00
Shanoah Alkire 92484a8416 Disable the new saveslot code. (It can be reenabled by uncommenting the define in Saveslots.h) 2018-09-30 02:46:44 -07:00
Shanoah Alkire 042311a827 Make it easy to turn on and off the new saveslot code. Comment out a UI update that doesn't look needed that could have been causing issues. 2018-09-29 14:27:58 -07:00
Jonathan Li 7433ee7fc1 pcsx2: Warn if GameDB section start tag is incorrect
This helps avoid patches not being applied due to whitespace mismatches.
For example:
[patches ]
[ patches]
[patches  =  012345678]
2018-09-17 08:41:53 +01:00
Jonathan Li f47321c287 pcsx2: Improve GameDB multiline section parsing
If the entry separator (line of dashes) is found, assume the multiline
section end tag is missing or incorrect and stop parsing so that it
doesn't affect subsequent database entries.

Also improve the error messages so it is slightly more clear what the
error is.
2018-09-17 08:41:53 +01:00
arcum42 f3d738d771 Remove an extern that goes to a function not in the code. 2018-09-16 00:40:07 -07:00
arcum42 914573a5c3 Restore wxInvalidDateTime, and fix the call that was crashing debug. 2018-09-15 23:51:52 -07:00
arcum42 e9ae9cacd8 Using wxInvalidDatetime does not get along with debug builds. Using 1/1/1970 instead. 2018-09-15 03:52:41 -07:00
arcum42 9cb35a8972 PCSX2: Save/load slot improvements.
With these changes, saveslots will be labeled as either empty or
with the date that the file was last updated on. The menu items
for loading them are also disabled if the slot is empty.

It's possible if you are very fast to access the menu before the
slots change. It updates when the crc changes. When you save a saveslot,
the menu item also changes to show the time you told it to save until the
file is actually done saving.

Also fix an issue with backup saveslots not working properly from the
gui on first load.
2018-09-11 00:39:33 +02:00
Jonathan Li a977f1e6c1 pcsx2|utilities; Revert ambiguous wxString related commits
This reverts
93d5b52df3
f3e78b8267
55155ca7f1.

Unfortunately wxString stuff is a PITA to deal with. Breaks FreeBSD
compile, but there are probably more issues that just haven't been
reported yet...
2018-09-04 21:57:27 +01:00
refractionpcsx2 d520f3852b Missed some more code from testing.
I do know what I'm doing I swear
2018-09-04 20:52:17 +01:00
refractionpcsx2 50e3474b60 Missed a debug log. 2018-09-04 20:51:07 +01:00
refractionpcsx2 3c5fad7ef6 Reverted shift register stuff back to how it was, my changes made no difference now and it was slightly more optimal before.
Also fixed spaces (blame PSI :P )
2018-09-04 20:45:28 +01:00
refractionpcsx2 f7fb0f686b Fixed MFSA/MTSA, of course there's a game that abuses it (Rayman 3) 2018-09-04 20:26:36 +01:00
Jonathan Li 93d5b52df3 pcsx2|utilities: Remove ambiguous wxString-related overloads
Avoid some function overloads that can accept char*, wxChar* and
wxString as a parameter. wxString can be constructed with either of
those parameters, so the function overloads may actually result in
ambiguity errors. Keep the wxString parameter versions and remove the
rest.

Fixes some compile errors on FreeBSD.
2018-09-03 01:56:35 +01:00
Jonathan Li 81faa33a38 debugger: Reset breakpoint skip on boot
Fixes an issue where the first breakpoint after rebooting a game may
be skipped if the following sequence takes place:
 - The first breakpoint after booting the game is triggered once.
 - The user hits run to resume the game
 - The user reboots the game without any other breakpoint being
 triggered.
2018-08-29 23:04:56 +01:00
Jonathan Li a922a0b1f5 pcsx2: Don't store the GameDB serial in the key list
It's already available in the id field, so storing it again is a waste
of space and CPU cycles.
2018-08-29 22:26:09 +01:00
Jonathan Li 4dcb47d829 pcsx2: Remove GameDB blocktable
It doesn't provides much of a performance improvement over directly
using an unordered map. This change also means that if there are
duplicate GameDB entries then they'll be merged together instead of
having only the last entry take effect.

Also increase the unordered map reserve size.
2018-08-29 22:26:09 +01:00
Jonathan Li fcda371f9a utilities: Remove HashMap
It's now unused.
2018-08-29 22:26:09 +01:00
Jonathan Li 6e3d6a1b17 pcsx2: Simplify GameDB hashing
Converting the string to lowercase is unnecessary when the actual entry
is still case sensitive.

Also just use std::hash of std::string and std::wstring instead, which
fixes a FreeBSD compile error (cannot convert to const char*).
2018-08-29 22:26:09 +01:00
Jonathan Li bde62436fa pcsx2: Simplify Game_Data member functions
There's no need to have a lot of overloads accepting wxChar*, char* cand
const wxString&. Keep only the const wxString& versions and remove the
rest. This fixes an infinite recursion warning on FreeBSD.

Also simplify sectionExists and getSection to avoid unnecessary
conversion to and from wxString.
2018-08-29 22:26:09 +01:00
Jonathan Li 76a75efef1 pcsx2: Remove GameDB write related code
There's no use for it now that the database editor has been removed.

Also remove the Game_Data POD comment because I don't think it makes
sense and remove an unused variable.
2018-08-29 22:26:09 +01:00
Souzooka 7963f418c1 Add System Out as a logging source. (#2563)
* Enable logging from new source, PS2 system output

* Enable printf formatting with (up to only 7 currently)

* Fix fallthrough bug in SYSCALL switch/case

* Remove unnecessary memread32 call in sysPrintOut case
2018-08-27 13:56:48 +02:00
Jonathan Li 4eaee45d1a pcsx2:gui: Remove Game Database dialog and panel
It has too many issues:
 - It's in an incomplete state. The ListView isn't connected up and I'm
 not sure what it was supposed to do.
 - Comments are stripped from the database when changes are saved.
 - Some key value pairs do not show (EE/VU clamp/rounding and
 MemCardFilter).
 - It doesn't work well on Linux (though this one seems easy to fix).
2018-08-26 22:31:49 +01:00
RedPanda4552 4dc4892588 Rename VU Cycle stealing to EE Cycle Skipping, and change tool tips for
EE Cycle Stealing and EE Cycle Skipping
2018-08-25 18:50:26 +02:00
arcum42 7bcfc9827e Get rid of AppConfigDialog.cpp. 2018-08-21 11:48:48 -07:00
Souzooka d00e0ed605 Debugger: Display ACC register. (#2527)
Displays/allows ACC VU0f register to be set.
2018-08-11 16:14:08 +02:00
Jonathan Li cdee1875a5 pcsx2: Avoid trigraphs
Fixes a -Wtrigraph warning on clang.
2018-08-07 00:15:10 +01:00
Jonathan Li c10d6c3ed1 pcsx2: Add override to SysTraceLog functions declarations/definitions
Makes it clearer what is being overridden. Also avoids a
-Winconsistent-missing-override warning on clang.
2018-08-07 00:15:10 +01:00
howjun d9fa7f7d34 Grammar corrections in readme-Docs.txt (#2529) 2018-07-31 21:12:46 +02:00
refractionpcsx2 8b0114596b Just adding some comments to MMI fix. 2018-07-31 18:48:51 +01:00
refractionpcsx2 1e0b0605a6 Corrected MMI PMADDW and PMSUBW on the Interpreters thanks to DobieStation for finding the fix 2018-07-31 18:45:32 +01:00
Souzooka 4e429b27be Debugger: Display/set correct VU values (#2526) 2018-07-30 09:20:37 +01:00
Jonathan Li 1b5f2639a0 pcsx2:windows: Fix path issues
Fixes some issues with opening files if the path contains characters not
present in the current codepage.
2018-07-23 00:51:02 +01:00
Jonathan Li b2ae86d142 pcsx2: Pass UTF-8 pathnames to plugins
Fixes empty log and ini directory paths being passed to the plugins on
Windows when the pathnames contain characters not present in the current
system codepage.

Fixes the inability to create snapshots when the pathname contains
non-ASCII characters on Linux (Windows requires more pathname handling
fixes).
2018-07-23 00:51:02 +01:00
refractionpcsx2 69888e5ab0 EE Rec/Int: Removed micro optimisation in QFSRV/MSTAB/MSTAH. Reverted functionality to match the documentation. There were some scenarios that weren't really accounted for, like developers doing what they're told not to do. 2018-07-15 13:14:46 +01:00
refractionpcsx2 46662b0436 MFIFO: Fix Tadr position on END tags with data. An Empty interrupt needs to be fired at DMA end for FF7 DoC, but the formula doesn't work out normally since we don't increment TADR on END tags (due to Soul Calibur 2 & 3 breaking), so a special case is made for MFIFO 2018-07-14 14:32:02 +01:00
Robert Neumann f41e5da94b IOP: VBlank handler small fix 2018-06-28 18:08:10 +02:00
Akash bb1c225e66 Counters: Fix vsync hsync cycles calculation for rounding error
In games like ICO where the render and blanks both need to be rounded,
one was prioritized over the other one leading to a truncated value in
the total vsync cycles. This patch fixes it, it's more or less for a
trivial cycle accuracy rather than a signfifcant change which might
influence games. (Not sure, maybe it would?)

Potentially it might be nice to revamp the whole vertical blank
calculation system to make it more readable (discussed about this with
ref), but it's not of much priority right now.
2018-06-27 19:55:33 +05:30
refractionpcsx2 ba1689f6d6 Mild improvement to VIF MFIFO logging, got rid of a useless global variable \o/ 2018-06-20 22:01:10 +01:00
Robert Neumann 6f2ded8222 psxmode: move pgifInit() over to EE reset; start porting recent (later than ~2001) changes in CdRom.cpp, starting with labels; add a note on missing video timing recalculation when entering psxmode 2018-06-08 21:53:36 +02:00
Robert Neumann 30b722b807 psxmode: actually apply the new iop / cd read timings; add seek delays that mimic real ones; altogether this at least fixes fmv playing way too quickly (music in Chrono Cross intro is fine now, for example) 2018-06-08 03:57:14 +02:00
refractionpcsx2 c78b5b706d MFIFO: Refactor of some of the VIF/GIF MFIFO functionality. Centralised the MFIFO resume function which should have been separate anyway.
Added some more memory address safeguards.
Logging now makes a bit more sense to look at.
2018-05-30 01:29:23 +01:00
refractionpcsx2 823431599f Previous fix for Eragon was incorrect. Game makes PATH3 busy then performs a reset, allowing VIF to continue, this is the fix I should have made ;) 2018-05-26 16:00:37 +01:00
Timothy O'Barr 342c10bd85 PS1 mode: Adjustments to processor clock speed and CD read speed. (#2447)
switch IOP clock, CD read speed and EE/IOP cycle ratio for PSX mode
2018-05-26 13:20:02 +02:00
refractionpcsx2 6bf87d7eff VIF FIFO: Hacked the hack. Fixes Downtown Run. Tested all known games that need the hack, they still work *phew* 2018-05-21 21:54:00 +01:00
refractionpcsx2 9b82449542 Fixed optimisation problem on branch in branch delay slot. Fixes Dropship - United Peace Force. Props to MrCK1 for finding the issue. 2018-05-19 02:23:58 +01:00
Jonathan Li dc53278163 pcsx2: Remove theming support
It's incomplete, and there's not much that is actually themeable
(basically only the background logo and icons can be changed).
2018-04-28 01:18:12 +01:00
Jonathan Li 1d7cef08a7 pcsx2: Fix potential return of uninitialised value 2018-04-26 01:15:44 +01:00
Jonathan Li 908a37598c pcsx2: Use enums instead of hardcoded integer
Might prevent future breakage.
2018-04-26 01:15:44 +01:00
Ryudo300 f99711cdc2 PCSX2-GUI: 'About' Logo
Updated the About page's logo to match our current logo.
2018-04-17 12:29:49 +01:00
Ryudo300 630177ef4c PCSX2-GUI
BackgroundLogo update, also in preparation for use in other places. Used zopflipng to compress the file.
2018-04-16 16:28:49 +01:00
Christian Kenny 28fd47dd22 Add missing names to About Box, removed duplicate, misc. formatting 2018-04-15 18:56:50 +01:00
lightningterror 0e329347cf PCSX2: Update gamefix tooltip.
Remove mention of Crash Tag Team Racing from VU I bit gamefix tooltip.
Not needed since the gamefix has been removed for the game as it causes
more issues.
2018-04-11 19:37:29 +01:00
pgert 432999fae8 PCSX2: Minor lingual correction on tooltip (#2328)
Small correction to trace logging tooltip string.
2018-03-08 23:24:37 +05:30
refractionpcsx2 6d7e2c56d9 Gif: Allow flag setting for PRIM/REG transfers on 0 length packets. Fixes Reservoir Dogs 2018-03-07 22:23:01 +00:00
Christian Kenny f6e4a3081d Console Window: Reset the titlebar when the VM is shutdown. 2018-03-05 20:17:01 +05:30
Christian Kenny a9168fed56 PCSX2: Remove the "DisableOutput" option. (#2298)
It's been broken/unused for some time.
2018-03-04 14:03:50 +00:00
Jonathan Li faa4be49c7 gui: Fix trace logging panel misc section behaviour
This enables/disables the misc section when the master trace log toggle
checkbox has changed state.
2018-02-28 01:19:12 +00:00
Jonathan Li 8dfeeb354f pcsx2: Fix Trace Logging enable/disable behaviour
This disables SIF logging if the master trace logging switch has been
disabled.
2018-02-28 01:19:12 +00:00
Jonathan Li c3dbc4e945 gui: Fix apply button on Trace Logging dialog
Instead of binding all checkbox events to an event handler, bind only
the master trace log toggle checkbox event and continue processing the
event after it has been handled. This fixes the non-functional apply
button and is also more efficient.
2018-02-28 01:19:12 +00:00
FlatOutPS2 41f6337bfa GameDB: Update Crash Tag Team Racing
Fixes performance drops and short freezes in adventure mode.

Alas, there is no Crash Tag Team Wrestling, so I replaced it with the
correct title.

Updates Gamefixes Panel entry of VU I bit Hack.

Closes #1785
2018-02-27 01:06:30 +01:00
Akash c23241c5f4 PCSX2-Counters: Fix rounding of blank and render
I guess the intention of the older logic was to get the truncated part
by comparing with the original value, but that went wrong due to using
the pre-normalized value (before the division) for comparison.

Hence let's just do a modulo for rounding the render and blank.
2018-02-10 16:10:41 +05:30
Akash 785fe6b2e3 Counters: Fix Hblank calculation for DVD videmodes
Previously, the DVD variant NTSC/PAL modes used the horizontal blanking
interval calculation algorithm used by digital video modes, which
shouldn't be used and also rounding error check was neglected.

Added the DVD variant modes to the list in analog video mode finder
subroutine. This should impact timing/vertical synchronization in PSX
games significantly.
2018-02-08 15:56:00 +05:30
Jonathan Li 743caf46f2 pcsx2: Fix string truncation on Windows 2018-02-06 00:04:52 +00:00
viciousShadow 27c45fc995 pcsx2: Fix copy bytes patch command
This adjusts the copy bytes command format from
5aaaaaaa nnnnnnnn
00000000 bbbbbbbb
to
5aaaaaaa nnnnnnnn
bbbbbbbb 00000000
so that it matches the copy bytes command format used by PS2 cheat
devices (GS/CB/XP/AR2).
2018-02-05 00:56:59 +00:00
FlatOutPS2 8600ada735 PCSX2: Avoid SYSTEM.CNF error message in PSX mode (#2286)
Avoid error on non-empty last line of file.
2018-02-03 16:08:49 +01:00
lightningterror ab44ebd7e0 PCSX2: Add configurable Cheats folder to Components Selectors.
Add GUI option to Plugins Components Selectors to change the default
"Cheats" folder location. Similar to savestates/logs/..etc.
2018-01-27 23:26:11 +00:00
Jonathan Li eeca9f61bf cdvd: Fix writing of CD blockdumps
Write the full CD sector (not including subchannels) to a blockdump
instead of just a partial CD sector that isn't offset correctly.
2018-01-27 22:28:29 +00:00
Jonathan Li 79d57e2949 cdvd: Fix and switch to writing v2 format blockdumps
Switch to using vector for the dump sector table, and also fix a bug
where memory was not allocated when writing to a v2 format block dump,
causing a null pointer dereference.

Also switch to using the v2 block dump format, which generally produces
smaller dump files (the dumps also seem smaller than the ones generated
by cdvdiso, which seems to repeat sectors).
2018-01-27 22:28:29 +00:00
refractionpcsx2 f7c0a910f8 Gif: Don't set state on NOP packet. Fixes #2277 2018-01-26 23:02:23 +00:00
FlatOutPS2 24b83fd96c PCSX2: Memory card minor code improvements
- Adds tooltip for Convert memory card button in the memory card dialog
- Updates several memory card console writes.
- Adds 2018 copyrights to the updated files
2018-01-18 23:04:50 +00:00
FlatOutPS2 c749f961ef PCSX2: Add keyboard shortcuts to memory card dialog right-click menu 2018-01-18 23:04:50 +00:00
FlatOutPS2 1ad6fd8297 PCSX2: Update PSX memory card file extension
Changes the file extension used by PSX memory cards to the common .mcr
instead of using the same (.ps2) extension used by PS2 memory cards.

Updates the extension listed in Create memory card dialog when a PSX or
PS2 memory card is selected.
2018-01-18 23:04:50 +00:00
FlatOutPS2 f8e2c65cef PCSX2: Replace PSX memory card checkbox
Replaces the awkward checkbox for a PSX memory card in the bottom left
of the Create Memory Card dialog with a radio button like the other
memory card types.
2018-01-18 23:04:50 +00:00
Jonathan Li fad0a2a55f cmake: Remove old macro substitution workaround
The workaround was used to prevent macro substitution occuring on paths
containing "linux", but it's no longer necessary since "linux" is not
set as a predefined macro when a "-std=" option is passed to gcc.

Fixes #2268.
2018-01-18 20:50:58 +00:00
Russ K 43d0bd99cb Enhance "Assemble Opcode" to be pre-populated by existing instruction. (#2244) 2018-01-14 02:47:00 +01:00
Akash 36a1c7a265 PCSX2-WX: Display the video mode on titlebar
I found it might be useful for looking into issues at certain cases
where users provide a screenshot covering the titlebar, so we can easily
identify which video mode is being used.

Especially useful for looking into PCRTC issues.
2018-01-07 13:32:47 +05:30
Jonathan Li e0ec8b3be1 iop: Fix booting ELF files on a different drive
Fixes a regression introduced in b3b1f3ac68,
where ELF files on a different drive to PCSX2 would fail to load.
2018-01-07 06:22:42 +00:00
Russ K 854246846d Fix mouse click focus in debugger near functions ending in a branch. (#2250)
This code updates the DisassemblyFunction objects to only include Delay Slots when they are within the bounds of the function.
2018-01-06 11:05:42 +01:00
Russ K 74282b46ff Corrected MipsOpscodes table for unconditional branch. (#2247)
The assembler was previously assembling instruction "b i" as an alias to "j I".
This caused unexpected behavior when attempting to assemble an
unconditional branch. The previous behavior would cause
position-independent code to fail due to the distinction between
the absolute address of a jump vs. the offset of a branch.
2018-01-04 10:01:48 +01:00
RedPanda4552 5fec900861 Make PSX cards appear as Pocketstation devices. (#2208)
Fixes memcard access in Final Fantasy VIII, and likely in other PSX
games supporting the Pocketstation peripheral. This makes inserted PSX cards show up as PocketStation devices in the PS2 browser, which is okay for now.
2017-12-10 17:03:26 +01:00
Jonathan Li 025eef63b5 pcsx2:gui: Display '&' properly in recent ISO list menu
& is used to specify the keyboard shortcut key in menu labels. && must
be used to display an &.

Closes #2148.
2017-11-26 22:47:16 +00:00
Jackson Sommerich eb796a13ce Update PCSX2_FAQ.doc to reflect changes made on the PCSX2 Forum (#2087)
doc: Update FAQ document

* Update system requirements to match README.md and remove references to v0.9.6
* Fix formatting issues, add link for DirectX and speed issues
2017-11-23 09:45:08 +01:00
Jonathan Li 96b412ebb8 pcsx2|common|gsnull: Remove GSprintf API
It's not really used, and the OSD uses a different API.

The specified calling convention (stdcall) is also incorrect since
variadic functions are caller-clean, not callee-clean. The compilers
ignore the stdcall and just use cdecl (I think), though it does trigger
a -Wcast-calling-convention on clang.
2017-10-29 01:01:49 +01:00
Akash c783b6d7b5 PS2-HW: Remove address of non-existent registers
It seems not all DMA channels have the same set of 32 bit registers. Removed
addresses of registers which aren't actually present in the memory
space.

Example: Channel 0/1/2 have address stack registers but the other
channels lack it. According to documents, the remaining memory space of
the channels seems to be reserved. Which means, write access would be
disregarded and read access would return an unknown value.

Credit goes to Gregory and CK1 for notifying me about it, special mention to ssakash for actually pushing the change to github. Also I wasn't the one who introduced the non-existent registers into the code, these registers were present before under a different name.
2017-10-13 20:28:34 +05:30
Brian 7a7844162d Add clear list option to ISO Selector 2017-10-10 22:43:40 +01:00
Akash 3356c63cdc PS2-HW: Fix DMA channel register addresses
The macro for address of channel 9 was wrongly having the address of
channel 8, fixed it. (Luckily MADR and QWC were unused so we should be
safe)

Thanks to Fireboyd78 for notifying us about this. (Closes #2091)

Also fixed some inconsistencies where some of the DMA channel register
addresses weren't defined for all the bitfields.
2017-10-10 19:54:48 +05:30
ramapcsx2 af2278c3c2 Merge pull request #2067 from RedPanda4552/master
Add PSX memory card support
2017-09-17 16:53:36 +02:00
Brian e4777f6563 Allow PSX memcard creation, dynamic SIO delay type. 2017-09-15 11:19:33 -04:00
Ryudo300 ada0d57452 PCSX2-GUI: Logo Update (Wider image)
New logo for the main interface of PCSX2. (400px instead of 380)
2017-09-07 18:15:26 +02:00
Jonathan Li 056cbbcdcd pcsx2: Fix inconsistent framelimiter/vsync interaction
If emulation is paused and resumed, vsync may become enabled even if the
frame limiter is currently disabled. This state persists until the
settings are changed or the hotkeys are used.

Fix the inconsistent framelimiter/vsync behaviour so that vsync isn't
enabled whenever the framelimiter is disabled, which matches the
behaviour in the rest of the code.
2017-08-30 21:08:54 +01:00
Jonathan Li c02a545c7d pcsx2: Apply vsync changes immediately on settings change
Fixes an issue where changes to the vsync settings are not applied until
emulation is paused and resumed.
2017-08-30 21:08:54 +01:00
Akash ebe9b3368e PCSX2-WX: Force disable MTVU hack on safest preset
The safest preset should ideally try to provide
the highest accuracy and stability when emulating the
PS2, allowing the manipulation of the MTVU hack could
just destroy both of these things, hence the following patch
force disables the hack on safest preset.
2017-08-09 20:10:17 +05:30
Gregory Hainaut f5838c5178 pcsx2 gui: uses a combo box for Vsync
The possible values are
* Disabled
* Enabled
* Adaptive Vsync (the new possibility)
2017-08-05 11:00:41 +02:00
Gregory Hainaut e8636136c8 core: add a getter for the vsync option
v2: allow all combinations of framelimiter and vsync options
v3:
* disable vsync when the user disable framelimiter with F4
* Use g_Conf->EmuOptions instead of EmuConfig
2017-08-05 11:00:41 +02: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
Akash 9af03035aa PCSX2-WX: Revert titlebar update behavior on Windows
Current behavior - The tilebar isn't updated when the user enters full screen mode and when the user returns back to windowed mode they have the older title bar values for a brief second, this sort of behavior is undesirable just in the cost of saving some overhead for updating title. (which is really negligent)

Hence reverting the code back to how it has been for the past 7 years (Yes, I did my research), I'm doing it only for the windows side at the moment as a code comment describes of some sort of Linux specific issue on wxWidgets side.
2017-07-12 22:07:37 +02:00
Akash 9e13b7da01 PCSX2-WX: Add restore defaults to GS panel 2017-07-12 22:04:37 +02:00
Gregory Hainaut 1279112ac0 core: add hidden option EnableVsyncWindowFlag to add the WS_POPUP flag
Goal is to ease testing of Vsync/Tearing

v2:
Properly propagate the WS_POPUP flag
2017-07-02 15:08:16 +02:00
Jonathan Li 6e029fc184 cmake: Fix NetBSD compilation
Closes #1973
2017-07-01 11:54:59 +01:00
Akash 58102a39a4 PCSX2-WX: Add "Always ask when booting" option
When enabled, this option opens the file explorer to directly select the
ISO at each boot instances instead of relying on the Recent ISO list.
2017-06-19 23:33:29 +01:00
Akash b75868cc7c PCSX2-WX: Increment max ISO count in recent ISO list
The default 12 is rather low and won't suffice for most cases, updating
it to 20 to give some extra space for additional ISOs. Incrementing it
to an even higher value might not be so good as it consumes lots of
vertical space, not a nice idea for people with smaller screens.
2017-06-19 23:33:29 +01:00
Gregory Hainaut 02861fabc8 pcsx2|common: replace throw() by noexcept 2017-05-13 10:38:35 +02:00
Gregory Hainaut 33fb806f13 core: remove noexcept on destructor
It is the default on C++11
2017-05-13 10:38:35 +02:00
Gregory Hainaut 47264dc350 core: use = default for trivial destructor
Again not reported by clang-tidy and done with sed
2017-05-13 10:38:35 +02:00
Gregory Hainaut 2ff43f2ed8 core: remove throw specifier on destructor
It is the 'default' on C++11
2017-05-13 10:38:35 +02:00
Gregory Hainaut 94b50b85e7 core: use = default instead of trivial copy constructor 2017-05-13 10:38:35 +02:00
Gregory Hainaut 585ccc1b24 core: use = default instead of trivial constructor/destructor
reported by clang-tidy

Note: drop throw() specifier as it is the 'default' in C++11 for
destructor
2017-05-13 10:38:35 +02:00
Gregory Hainaut d332bb1645 core/gui: use = default instead of trivial constructor/destructor
reported by clang-tidy

Note: drop throw() specifier as it is the 'default' in C++11 for
destructor
2017-05-13 10:38:35 +02:00
Akash 984fcfda2e Counters: Update videomode enum with proper prefix
Thanks to @colepcsx2 (https://github.com/PCSX2/pcsx2/pull/1896#commitcomment-21858717) for pointing it out!

I also updated the prefix in the inferior video mode detection of GSdx, I'm not even sure why we need the videomode info on the plugin side, might be useful someday.
2017-05-11 11:23:10 +02:00
Akash 7a2cbfd6bf GSFrame: Update title only after rendering starts
The title bar will display "progressive" for 1-2 seconds when booting an interlaced game at some cases, it's due to an uninitialized SMODE2 register, so let's wait till the rendering starts to allow time for the
SMODE2 init and get the proper values from games.
2017-05-11 11:23:10 +02:00
Gregory Hainaut b9e62be3c1 modernize: use std::make_unique instead of std::unique_ptr
I didn't update GSdx and cdvdGigaherz because we need to pull
common include files
2017-05-03 12:03:38 +02:00
Jonathan Li 29eed182c2 pcsx2: Remove unnecessary aMax/aMin macros 2017-04-30 23:41:19 +01:00
Gregory Hainaut 0d3f02ee34 svu: cast variable to int to avoid unsigned vs int comparison 2017-04-30 21:20:23 +02:00
Gregory Hainaut 3a04e3d003 gif: avoid (wrong) uninitialized warning
My guess is that GCC reports an warning because of the default case.

I don't think we support yet __builtin_unreachable on Linux
Nevertheless it will still be an issue in non-release build
2017-04-30 21:20:23 +02:00
Gregory Hainaut dc00af8829 psx|spu2x|gsdx: shift negative value is undefined in C standard
Instead does the negation after the shift

v2: assert shift <= 15 in clamp_mix
2017-04-30 21:20:23 +02:00
Gregory Hainaut 9d99889703 pcsx2: remove unused variable 2017-04-30 21:20:23 +02:00
Gregory Hainaut 98a5492e37 Revert "pcsx2: call XInitThreads at init"
This reverts commit 99180f5afb.

Unfortunately Mint/Arch got segmentation fault in Xlib mutex locking...
Sadly Xlib will be back to thread-unsafe mode.

I'm cooking another solution based on EGL
2017-04-30 12:49:52 +02:00
Gregory Hainaut 99180f5afb pcsx2: call XInitThreads at init
X11 isn't thread safe by default. It make sense in 1990 but it is ugly nowadays.

The trick is that is must called before any X11 function. So the only
safe place is at the start of the main.  Pcsx2App::OnInit() is the
sooner that I've found.
2017-04-26 21:23:31 +02:00
Jonathan Li 16904d580d pcsx2: Fix booting ISO from commandline 2017-04-21 22:45:19 +01:00
refractionpcsx2 cca6e1dcae Merge pull request #1896 from ssakash/counterstuff
PCSX2-Counters: Detect DVD variant videomodes
2017-04-21 10:26:58 +01:00
Jonathan Li 620b9b3300 pcsx2: Avoid clearing current ISO when not autorunning with an ISO 2017-04-21 10:54:16 +02:00
Jonathan Li 92b1f3cf6d pcsx2: Fix "nodisc" commandline option
It was present in the help text but didn't actually do anything.
2017-04-21 10:54:16 +02:00
Jonathan Li 088aa2ffdc pcsx2: Fix autorun when commandline and current CDVD options differ
Fixes an issue where the game will either boot the wrong CDVD source or
fail to boot if the current CDVD option doesn't match the option
specified in the command line.
2017-04-21 10:54:16 +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
Kingcom 92aa270062 Align functions to up to 16 bytes in the function scanner 2017-04-19 08:34:03 +02:00
Kingcom 4b9d409628 Make memory view row size configurable, store it and "Align window to row size" in settings 2017-04-15 22:48:33 +01:00
Gregory Hainaut a378e307b3 common: drop pthread TLS emulation
thread_local is supported by all C++11 compliant compiler

Keep a way to disable TLS for shared object to avoid issue of DTV
slot shortage.
2017-04-14 17:18:20 +02:00
Jonathan Li 9fa053cd88 pcsx2: Remove unused variables
I'm not sure these variables were ever used.
2017-04-09 00:44:16 +01:00
FlatOutPS2 4c84a99f68 PCSX2: Console log widescreen patch folder message improvement
Improves the widescreen patch message when loading from the cheats_ws
folder instead of the archive.
2017-03-31 23:50:35 +01:00
FlatOutPS2 b4001e65e7 PCSX2: Console log plugin message update
Remove full path from every plugin binding and only add it to the
preceding "Loading Plugins..." line.
Instead the revision date and version number are printed for each plugin
to make it easier to identify issues with plugin versions.
2017-03-31 23:50:35 +01:00
Jonathan Li cf4194fef7 pcsx2: Remove unused Windows files
There's actually more (old cheats and patch browser?), but I don't know
whether they'd be useful so I'll leave those alone for now.
2017-03-22 18:15:07 +00:00
Jonathan Li 178f31f4c6 pcsx2:mainframe: Remove some comments and unused prototypes
The flag comment was wrong, the rest are mostly old leftovers/TODOs.
2017-03-21 23:21:20 +00:00
Jonathan Li e344578a01 pcsx2: Remove unused MenuId_Sys_Restart and related code 2017-03-21 19:06:34 +00:00
Jonathan Li 1837d43d96 gui: Remove unused/incomplete panels/dialogs
Also rearrange the CMakeLists.txt slightly so things are easier to find
and to remove a duplicate entry.
2017-03-21 00:10:45 +00:00
Jonathan Li fb174b482f pcsx2: Remove unused/incomplete stuck/wait for thread dialogs 2017-03-21 00:10:45 +00:00
Jonathan Li 559f64ee4f pcsx2: Remove VS2013 ifdefs 2017-03-13 23:57:28 +00:00
Gregory Hainaut 4227a5bb59 debugger: add eu bios info 2017-03-13 19:41:19 +01:00
Akash 8f02052232 Plugin-Function: Add OSD for incomplete/corrupt savestates
Previously, the OSD neglected to mention any sort of message when the savestate load is failed, the following patch now also prints a message on OSD when detecting such cases of loading an incomplete/corrupt savestate.
2017-02-24 19:21:37 +01:00
Volodymyr Kutsenko 6862106dee VU0: added a special case to the CFC2 instruction if it copies the value
from the TPC register (fixes Street Fighter EX3 #954 and R Racing
Evolution the invisible cars issue)
2017-02-23 04:38:26 +02:00
Jonathan Li 1ff6eec1e3 isoreader:gzip: Avoid shallow copying z_stream objects
This prevents the internal state of the objects from becoming
inconsistent, which causes inflate() to fail with recent zlib versions
(1.2.9 and later).
2017-02-18 15:49:00 +00:00
Gregory Hainaut da1bb43618 cmake: Add various missing file in CMakeLists.txt
Add some windows code path. It would reduce the burden to port Cmake to windows.
(sill miss 3rdparty/some plugins/...)
2017-02-16 20:11:57 +01:00
Gregory Hainaut 35ed991abe pcsx2: set the size of the vector in the constructor 2017-02-03 21:56:24 +01:00
Gregory Hainaut 6d7b1f9dbd common: move ssappendf in DisR59000asm.cpp
Legacy function to print EE opcode. It doesn't worth an extra file.
2017-02-01 18:24:51 +01:00
Huud c56ac2cf3e PCSX2: Remove Unused And Unneeded Argument. (#1799)
EE interpeter: remove unused argument

rdd is neither used, nor needed. It appears it was there to pass the _Rd_ word to write to, but the writing was moved to PHMSBH() to have one "if (_Rd_)".

Add a note on undefined behavior
2017-02-01 11:30:41 +01:00
Jonathan Li af38b8bf97 pcsx2: Avoid having to translate the same strings twice
Both strings have almost identical strings present elsewhere in the code,
the only difference being that they use one less space.
2017-01-31 22:30:08 +00:00
Jonathan Li c65e467c83 pcsx2:windows: Fix unreferenced local variable warning
Also fix some typos in the warning messages.
2017-01-31 22:26:03 +00:00
Gregory Hainaut bccc3ef253 Merge pull request #1770 from np511/gcc-cleanup
Cleanup GCC warnings - still needs some work
2017-01-30 15:28:33 +01:00
np511 15d66cf337 Properly format 2017-01-29 09:06:21 -05:00
np511 936d9edc4c Remove old/pointless code 2017-01-29 09:06:21 -05:00
Jonathan Li 56c2d20b90 pcsx2:gui: Add menu item for creating block dumps 2017-01-26 18:48:07 +00:00
lightningterror 0b93aa5d12 Revert "Update Copyright notices/disclaimers 2017"
This reverts commit fc5bdb771f.
2017-01-26 17:12:13 +01:00
lightningterror 3d4e1c1246 Update Copyright notices/disclaimers 2017
Update all Copyright notices/disclaimers in scripts to 2017
2017-01-26 17:12:13 +01:00
Gregory Hainaut d9efbfb178 pcsx2: don't use npos as array index 2017-01-22 16:50:55 +01:00
Gregory Hainaut 5d119bec31 vif: init field in constructor + remove empty function 2017-01-22 16:23:40 +01:00
Gregory Hainaut ad7892bd15 svu: init all field of RANGE struct 2017-01-22 16:10:43 +01:00
Gregory Hainaut 44b5552231 MTVU: hide ring buffer pointer bug under the carpet
There is a bug lurking around (intro of SotC). Unfortunately, I didn't find it. So instead, I added a safety net
in the ring buffer reservation.
2017-01-22 15:42:14 +01:00
Gregory Hainaut 24c780c884 MTVU/GS: try to relax the readAmount atomic operation
I suspect it to be the same on x86

The real issue is the various atomic in FinishGSPacketMTVU which I'm afraid will create some cpu stall
2017-01-18 19:11:51 +01:00
Gregory Hainaut e3d1871f86 MTVU: small thread scheduling improvement
* Use yield to avoid a spin loop during WAIT
* Don't flush the full buffer when we miss space
2017-01-18 19:11:10 +01:00
Gregory Hainaut fff5230631 MTVU: redo properly atomic management around the MTVU ring buffer
The ring buffer is composed of severals read/write by transaction.

Atomic operations are only required at the start/end of the full
transaction. In the middle, you can use normal variable (optimization
opportunity for the compiler)

Use acquire/release semantics on isBusy and vuCycles to remain 100% safe
(relaxed might be doable but better be safe than sorry)

Use dedicated cache line for atomic variable to avoid any conflict between CPU
2017-01-18 19:10:47 +01:00
Gregory Hainaut d589be9415 GIF: remove 'done' of the GS_Packet struct
The struct is copied in various ring buffer (hot path)
We only need the return status of the function so use a reference instead of
a state variable

Side note: if we align the struct to 16B maybe the compiler can use SSE to copy it.

Warning: it breaks save state compatibility
2017-01-18 19:08:29 +01:00
Gregory Hainaut 7b3984059a MTVU/MTGS: use a mutex free ring buffer
Most of the time the mutex was likely optimized. Now we have the guarantee that
thread won't block.
2017-01-18 19:07:01 +01:00
FlatOutPS2 da57014eb8 GSdx OSD: Add Windows UI and new option
Adds Windows UI and option to limit the amount of log messages on the
screen at the same time/in the buffer.
2017-01-10 20:07:29 +00:00
FlatOutPS2 d42759c641 GSdx OSD: Minor log improvements 2017-01-10 20:07:29 +00:00
Jonathan Li 285bcbcec0 vifUnpack: Report the correct number of bytes
It now reports 6904 bytes instead of just less than 4GB.
2017-01-07 14:49:33 +00:00
ramapcsx2 80be9d92ca Merge pull request #1709 from turtleli/cdvd-street-fighter-ex3
cdvd: Street Fighter EX3 (NTSC-J) black screen fix.
2017-01-06 22:21:03 +01:00
Jason Brown fce2814735 Added callbacks for OSD Log and Monitor. Added wrappers in PCSX2 main for callbacks. Added some basic info calls (e.g. Saving loading FPS) 2017-01-03 10:43:56 +01:00
Jason Brown 44e671bb0a Add an RGBA getter for ConsoleColors 2017-01-03 10:43:56 +01:00
refractionpcsx2 c88cd1b065 Merge pull request #1720 from ssakash/rtc
PCSX2-Counters: Fix RTC counting in Progressive modes
2016-12-27 00:00:00 +00:00
refractionpcsx2 af3c1fc510 Gif MFIFO: Slight Optimisation for GIF MFIFO heavily used area.
Hopefully this translates well to slower systems :)

Tekken Tag:

Before: 79-81fps
After: 82-84fps

Front Mission 4 intro (as it pans over the roofs)
Before: 158-159fps
After: 165-166fps
2016-12-24 20:09:47 +00:00
Akash c92830b103 PCSX2-Counters: Fix RTC counting at certain cases
Previously, the seconds variable of the RTC was updated on progressive modes after every 50 Vsyncs, which was obviously wrong. The code has been adjusted to update the RTC with respect to the vertical frequencies of various other video modes.
2016-12-24 11:54:25 +05:30
Jonathan Li 10eb88f6fe Merge pull request #1706 from PCSX2/greg/vif-hash
Greg/vif hash
2016-12-21 22:30:27 +00:00
Gregory Hainaut 58e4076620 vif: update alignment constraint
16B alignment is now useless for nVifBlock (no more SSE)
However update the alignment of bucket to 64B. It will reduce cache miss
probability in the find loop
2016-12-18 22:51:23 +01:00
Gregory Hainaut d812222061 vif: use u32 code instead of u8/u16
It avoids memory stalls and greatly reduces the overhead of the dVifUnpack function

Here a vtune summary of this branch (done on SotC init)

dVifUnpack<1> was 14.5% of effective VU thread time
dVifUnpack<1> is now 3.8% of effective VU thread time

I hope it will translate to better fps
2016-12-18 22:44:24 +01:00
Gregory Hainaut ef75b36013 vif: move back the cache seach in the unpack function
Avoid the various move to return the value (actually due to the pointer)
2016-12-18 22:44:22 +01:00
Gregory Hainaut e4c2c53b19 vif: inline dVifsetVUptr function
It avoid a double cmp/jmp on the dynarec/interpreter mode.
2016-12-18 22:44:01 +01:00
Gregory Hainaut 6ae082dab2 vif: compute the length during the compilation stage 2016-12-18 22:44:00 +01:00
Gregory Hainaut 7a33cda122 vif: replace sse cmp code with standard cmp
Standard instruction are faster to execute besides the CPU can optimize the cmp/jne

SSE

  e0:	add    ecx,0x10
  e3:	cmp    eax,0x7
  e6:	jg     1b0 <void dVifUnpack<0>(unsigned char const*, bool)+0x1b0>
enter_loop:
  ec:	vpcmpeqd xmm0,xmm1,XMMWORD PTR [ecx]
  f0:	vmovmskps eax,xmm0
  f4:	cmp    eax,0x7
  f7:	jne    e0 <void dVifUnpack<0>(unsigned char const*, bool)+0xe0>

Standard cmp

  d8:	add    eax,0x10
  db:	mov    esi,DWORD PTR [eax+0xc]
  de:	test   esi,esi
  e0:	je     190 <void dVifUnpack<0>(unsigned char const*, bool)+0x190>
enter_loop:
  e6:	cmp    ecx,DWORD PTR [eax+0x4]
  e9:	jne    d8 <void dVifUnpack<0>(unsigned char const*, bool)+0xd8>
  eb:	cmp    DWORD PTR [eax+0x8],ebx
  ee:	jne    d8 <void dVifUnpack<0>(unsigned char const*, bool)+0xd8>

v2: use reference instead of a pointer for find parameter
2016-12-18 22:43:07 +01:00
Jonathan Li f441efd776 cdvd: Set the data ready flag after a finished transfer
Fixes a black screen loading issue in Street Fighter EX3 (NTSC-J).
2016-12-18 16:27:05 +00:00
Jonathan Li 5c53708f43 cdvd: cdvdRead08 is interrupt reason, not status
It seems there was a bad copy paste that caused PwOff to be changed to
Status in bc9e0b08ad.
2016-12-18 16:25:52 +00:00
Jonathan Li c974a0d888 pcsx2: Fix "ISO Selector" menu item removal memleak
Delete() deletes the menu item but keeps the sub menu. Remove() doesn't
delete the menu item.

Also use AppendSubMenu - using Append on a submenu is deprecated.
2016-12-18 14:31:27 +00:00
Gregory Hainaut 2320efeb55 vif: increase buckets number to 64K
It allow to compare only 8B in the lookup so SSE could be replaced with general instruction

As a bonus, it allow to compute the hash key with a mov rather than modulo (which was an 'and')
2016-12-18 14:05:55 +01:00
Gregory Hainaut 1a32062439 vif: repack nVifBlock struct
cl/wl can fit in a single byte. Add a 2B length field instead.
It will contains the pre computed length to reduce dVifsetVUptr overhead
2016-12-18 14:05:55 +01:00
Gregory Hainaut d34e99b38b vif: handle the special case 0 in the compilation stage (rather than lookup) 2016-12-18 14:05:55 +01:00
Gregory Hainaut 555c96a941 vif: reorganize dVifUnpack
Inline the execution part
Add a num parameter to dVifsetVUptr
Use a local variable for the nVifBlock instead of a global struct state

The goal is to ease future update of the nVifBlock struct
2016-12-18 14:05:55 +01:00
Gregory Hainaut 10b3d429fe vif: new implementation of the hash bucket
Previous implementation saved the both the chain pointer and the chain size
Rational: size is useful to add new element and to detect the end of the chain
Vif cache is rarely miss. So 'add' is barely called and the end of a chain is
barely reached.

New implementation will add a null cell at the end of the chain. As a
cell contains a x86 pointer, if is null you could conclude that you
reach the end of the chain.

The 'add' function will traverse the chain to get the current size. It is
a cold path besides the chain is often short (< 4).

The 'find' function only need to check the startPtr bytes to detect the end
of the loop.

Note: SizeChain was replaced with a std::array
2016-12-18 14:05:53 +01:00
Gregory Hainaut c58b04979f vif: remove the type template of HashBucket
The class is designed and optimized for the layout of nVifBlock.
Besides it will ease future improvement.
2016-12-18 13:41:14 +01:00
Gregory Hainaut c368618d09 vif: use intrinsic cast instead of ugly define 2016-12-18 13:41:14 +01:00
Gregory Hainaut 1acc81c25d vif: don't allocate vifblock hash on the heap
Avoid an extra indirection to access the hash bucket (Find function)
2016-12-18 13:41:14 +01:00
Gregory Hainaut 3dc7dc0cdc vif: improve block compilation management
Safety:
* check remaining space before compilation
* clear hash if recompiler is reset

Perf:
* don't research the hash after a miss
* reduce branching in Unpack/ExecuteUnpack

Note: a potential speed optimization for dVifsetVUptr
Precompute the length and store in the cache. However it need 2B on the
nVifBlock struct. Maybe we can compact cl/wl. Or merge aligned with upkType
(if some bits are useless)
2016-12-18 13:41:13 +01:00
Gregory Hainaut b0b5c27fec vif: remove useless state from nVifStruct 2016-12-18 13:23:07 +01:00
Gregory Hainaut c2587abcea mVU: always call perf before leaving the compilation function
I misses some early return in my first tentative. Now VTune shows me
properly the time in VU recompiler.

Note: It seem some block overlap (likely due to the branching mess). But it is still way better than no data
2016-12-16 22:01:06 +01:00
Gregory Hainaut 632b4971de common: remove memset duplicates
Use standard memset instead of memset_8

Move memzero/memset8 in a common OS file.
2016-12-16 20:45:22 +01:00
Gregory Hainaut b3474b5a71 MTVU/gif: prebuilt the fake packet
GS_Packet constructor calls memset which is quite slow and useless as data is overwritten

Vtune overhead of Gif_Unit::Execute goes from 5.8% to 3.0% (EE thread)
2016-12-16 10:31:23 +01:00