Commit Graph

4531 Commits

Author SHA1 Message Date
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
FlatOutPS2 ff98dac104 psxmode: Correct exe name for several PSX titles
Several PSX titles lack a backslash in the elf path, which made the disc
serial contain 'cdrom:', this caused savestate issues in those ganes.

Solves: https://github.com/PCSX2/pcsx2/issues/1692
2016-12-13 17:32:26 +01:00
Akash a83042d5c0 PCSX2-WX: Update strings in Language dialog 2016-12-10 12:35:57 +00:00
Akash 83eb79c9d9 PCSX2-WX: Proper source medium on menuitem
Previously the boot menu items always displayed "Boot CDVD" regardless of the current source medium, this behavior has been fixed to properly adjust the text when source medium is changed. Now it'll display Boot CDVD/ISO/BIOS with respect to the current source medium.

v2: Some instances of "Iso" have been changed to "ISO" for consistency.
v3: Remove the unnecessary "Reboot" on menu item labels, saves some string translations.
v4: Add a new shortcut key for the primary boot menu item.
2016-12-10 12:35:57 +00:00
Akash b86518ef24 CDVD: Convert CDVD_SourceType into enum class
* Add a template function for underlying type conversions of enumerations
2016-12-10 12:35:57 +00:00
Akash f367fa5a98 PCSX2-WX: Fix Shutdown menu item behavior
There is already a dedicated bind event to handle the gray out of the menu item, so let's just gray it out initially and let the bind event handler do it's thing.

The previous behavior would only gray out the menu item when all the plugins are in a non-active state which didn't seem ideal as the plugins were shutdown only when closing PCSX2 (or) switching plugins.
2016-12-10 12:35:57 +00:00
Akash 259b81317d PCSX2-WX: Disable HostFs for release builds 2016-12-10 12:35:57 +00:00
Gregory Hainaut 7f64f39c05 vtune: count the number of ERET to trigger a quick exit
The purpose is to stop vtune profiling in a predictable way. It allows
to compare multiple runs.

ERET is called every syscall/interrupt return so it is proportional to
the EE program execution.
2016-12-10 11:07:35 +01:00
Gregory Hainaut b9369e7c00 pcsx2: remove the reserve feature of recompiler memory
Cons:
* requires ~180MB of physical memory (virtual memory is the same so it
  doesn't impact the 4GB limit)

From steam: 98.81% got at least 2GB of RAM. 83.62% got at least 4GB of RAM.
That being said, it might not really increase RAM requirements as OS could put the
new allocation in the swap.

Pro:
* code is much easier
* remove at least half of the signal listener
* last but not least, it is way easier for profiler/debugger
2016-12-09 09:28:19 +01:00
Gregory Hainaut 903d3595e5 pcsx2: add a --profiling cli option
Disable Framelimiter and Vsync

So you can profile real data instead of the idle time between vsync ;)
2016-12-09 09:28:19 +01:00
Gregory Hainaut 0453e5cad8 cmake: improve vtune integration
Year is included in the path so search in order 2018/2017/2016

Not ideal but at least all logic is inside the FindVtune module
2016-12-09 09:28:19 +01:00
Jonathan Li faa46bb62d gui: Fix Plugin Selector panel memory leak
SafeList is totally unsafe for non-POD objects.
2016-12-07 20:25:45 +00:00
Jonathan Li 5109687a31 gui: Remove "Restore Defaults" button tooltip on Speedhacks panel
It's incorrect, and the button is self explanatory - fixing it would
just mean having a marginally useful tooltip that would require
translating.
2016-12-07 00:46:56 +00:00
refractionpcsx2 cfb801345b Merge pull request #1681 from PCSX2/interrupt_mask_register
PCSX2-GS: Use interrupt mask register bitfields
2016-12-04 01:42:44 +00:00
Jonathan Li 56d0c51033 pcsx2:windows: Don't create console stdio menu item
It's not used on Windows and it causes Visual Studio to report a memory
issue.
2016-12-01 18:25:14 +00:00
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
Gregory Hainaut 2b8a808fe3 remove trailing white space (until I run clang-format on the full code) 2016-11-29 22:59:06 +01:00
Gregory Hainaut 4c3e98754e vif JIT: increment based on sizeof(T)
Struct on x64 will be 32B so +2 instead of +1
2016-11-28 19:07:04 +01:00
Gregory Hainaut 9862e5d207 vif hash: move bucket size check in the 'add' path instead of 'find' path
More logical this way
2016-11-28 19:07:04 +01:00
Gregory Hainaut c9db1c6c4b vtune: plug PCSX2 core + add missing profiling (VU/VIF/TLB)
Doesn't fully work yet
* Unknown stack frame
* Outside any known module

Potential root cause:
* Nvidia driver
* VU code as ebp is required for emulation so likely no frame
2016-11-28 19:07:04 +01:00
Gregory Hainaut 4fca5f4d88 mvu: use static array for dispatcher code
I don't understand why but standard mmap blew up Vtune
2016-11-28 19:07:04 +01:00
Jonathan Li 230b470a3c pcsx2:freebsd: Disable aio use on FreeBSD 10.3 and earlier
A FreeBSD 10.3 user (meowthink) reported to me that games were not
working properly on their system. After some investigation, it was
discovered that aio was buggy on their setup. There's also bug reports
for other applications that involve aio too.

Workaround the issue by using a normal read and disabling the use of aio
on FreeBSD 10.3 and earlier. It'll remain enabled on FreeBSD 11.0 in the
hope that the aio issue has since been fixed.
2016-11-24 19:50:07 +00:00
Vladimir Jigulin 268b4d9f9f debugger: memory view improvements
Highlight memory location referenced by current register
Allow memory window not be aligned by row size
Use radio and checks in menu
2016-11-21 10:31:34 +01:00
Gregory Hainaut 0e2ec9c2cb pcsx2 gui: reduce the padding to 2 for low cost display 2016-11-19 11:27:20 +01:00
Gregory Hainaut 4aa79df402 pcsx2 gui: increase a bit the about box
It was too crowded
2016-11-19 11:21:07 +01:00
Gregory Hainaut b251d47712 pcsx2 gui: use dynamic section sized for ee/vu cycle message
Static size is better aligned but it consumes too much space on the GUI

Besides, if a string (translation) is bigger that the static size it will be cut off.

VU/EE min sized are the same to keep a proper alignment
2016-11-19 11:21:07 +01:00
Gregory Hainaut 4ee942aba2 pcsx2 gui: use pxGetFixedFont helper instead of wxFont constructor 2016-11-19 11:19:24 +01:00
refractionpcsx2 e0cd520837 VIF: Apply stall fix to VIF0 as well. 2016-11-13 12:15:18 +00:00
Gregory Hainaut c5d727da39 CDVD: check return value of ToLong
Reported by coverity
2016-11-12 19:36:44 +01:00
Gregory Hainaut 356429d0e7 Sio: use & 0xFF instead of u8 mask
Tentative to avoid various bad coverity reports
2016-11-12 19:29:10 +01:00
Gregory Hainaut 2da6cb263d pcsx2: Gcc warning in copy constructor of BaseMessageBoxEvent
../pcsx2/gui/MessageBoxes.cpp:62:1: warning: base class ‘class pxActionEvent’ should be explicitly initialized in the copy constructor [-Wextra]
 BaseMessageBoxEvent::BaseMessageBoxEvent( const BaseMessageBoxEvent& event )
2016-11-12 18:47:11 +01:00
Gregory Hainaut 5e5b927abd gzip reader: bad find interface
Find => return int
find => return size_t (behave as STL)

Thanks to gcc for the useful warning

+ a cast to avoid an useless warning
2016-11-12 18:41:07 +01:00
Gregory Hainaut a7e76438b2 iop: use const on some variables
Avoid coverity warning
2016-11-12 18:26:28 +01:00
Gregory Hainaut 056ecb1c39 pcsx2: add some cast to fix gcc (int vs uint) warning
I'm pretty sure that .RMSK (which is an u32:31) warnings are false positives
2016-11-12 17:36:40 +01:00
Gregory Hainaut 63c825d0e0 pcsx2: check return value of std functions
Avoid noisy gcc warnings
2016-11-12 17:36:06 +01:00
refractionpcsx2 1053234507 VIF: Fix some stalls getting stuck in situations, fixes #1658
Gif FIFO: Improve reliability a little bit, especially when MFIFO is in use.
2016-11-12 12:36:04 +00:00
Gregory Hainaut cf739d2493 Merge pull request #1655 from PCSX2/greg/git-rev-title
pcsx2 gui: use git desribe as version name
2016-11-08 23:42:15 +01:00
Gregory Hainaut 18f677d530 oups miss one minus 2016-11-08 23:11:12 +01:00
Gregory Hainaut f6c27c2abf pcsx2: use ASCII minus 2016-11-08 23:09:20 +01:00
Gregory Hainaut 5596f69c0e pcsx2 gui: use git desribe as version name
Shorter than date and give all the useful info

Require windows test

close #1043
2016-11-08 22:44:39 +01:00
Gregory Hainaut 784f549339 pcsx2: always probe the ctrl/shift/alt key state
Event handling becomes messy when you press in the app but release outside of it (due to desktop change)

close #477
2016-11-08 22:42:42 +01:00
Gregory Hainaut 6c3a4c6927 iop bios: fix gcc warnings
* return value of function can't be const
* use unique_ptr
2016-11-08 21:53:27 +01:00
Pseudonym b3b1f3ac68 IOP: Convert most IOP memory access in the IRX HLE and debugging module to
safe access through iopMem* functions.
2016-11-08 19:08:51 +00:00
Pseudonym 809684e9de IOP: PSX bios console output filtering of repeated and empty lines. 2016-11-07 10:09:12 +00:00
Gregory Hainaut 253bd1aea3 linux compilation fix of previous iop change 2016-11-05 15:44:57 +01:00
refractionpcsx2 49b80a4916 Merge pull request #1383 from PCSX2/prafullpcsx2-eecache
EE-Int: Minor EE Cache changes
2016-11-05 13:30:31 +00:00
Pseudonym 8259b29896 IOP: PSX bios console output 2016-11-05 12:14:01 +00:00
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 ae57b960c2 Vif-Rec: Initialise IsAligned for VifUnpackSSE_Simple. Should fix the valgrind reported issue (no compatibility changes expected) 2016-11-04 22:31:07 +00:00
Gregory Hainaut c9974b65c4 iop: remove kernelTTYFileDescrWrite debug function
Recommended by pseudo

Main issue is a buffer underflow when strlen(...) < 2
2nd issue is code is called based on hardcoded address of a single bios.
2016-11-01 13:41:54 +01:00
Gregory Hainaut 270d7191ce sio: increase buffer to avoid overflow
memcardWrite will use "sio.buf[data + 5] = mcd->term;" and data is 8 bits

Reported by coverity
2016-11-01 13:41:03 +01:00
Pseudonym 1f44c4be2f SPU2-X: PSX games should be able to read ENDX correctly now, which is
important functionality for many sound engines.
Fixed two other obvious errors in the psx compatibility merge, probably
inconsequential.
2016-10-20 04:17:03 +01:00
Pseudonym a415d59e2f Remove use of integer constants for iop events that I missed in the
previous commit (thank you @turtleli, I was mentally filtering this line
of code).
Fixes #1618
2016-10-13 16:30:05 +01:00
Pseudonym 733fd79f46 Removed internal iop event enum assignments which just confuse readers and
traces of an old hack.
2016-10-11 18:53:23 +01:00
Robert Neumann ca59ce45c0 psxmode: Make cd read delays longer to avoid mdec glitches and possibly some other data corruption. Proper read timings can be added later using cdvd.cpp as an example. 2016-10-07 21:36:06 +02:00
Robert Neumann f45527468f psxmode: silence "vsync timeout" spam 2016-10-07 18:22:37 +02:00
Gregory Hainaut 7d165da105 pcsx2: update credit box
Put turtleli in dev section
Add FlatOut in special thanks section

Thanks you very much for your hard work.
2016-10-03 22:25:59 +02:00
refractionpcsx2 471f33ceef Vif Unpack: initialise UnpkNoOfIterations before use. 2016-10-02 17:18:49 +01:00
refractionpcsx2 744d07b8a1 Vif: Fix MSCNT for MK: Shaolin Monks.
-Tested Baldurs Gate, Twisted Metal, Warship Gunner 2 and Downhill Domination, all seem to be fine still.
2016-10-02 15:35:06 +01:00
refractionpcsx2 59be0818e2 Gif: Fix MFIFO logic so it doesn't get caught in a loop (Tekken Tag) 2016-10-02 14:35:36 +01:00
Robert Neumann 98c22b9acb psxmode: tried to put the hardware reconfiguration reset in the proper location. didn't work for some reason. 2016-10-01 12:16:56 +02:00
Robert Neumann d8e0b9f541 psxmode: few comments and a missing hw write. 2016-10-01 11:41:07 +02:00
Jonathan Li e8ab0f6e85 Merge pull request #1591 from turtleli/update-wx
3rdparty: Update wxWidgets to latest 3.0.x git branch
2016-10-01 02:34:45 +01:00
Jonathan Li 7ad38057b5 symbolmap: Use C++11 recursive mutex
Newer wxWidgets versions call SetThreadUILanguage() on Windows, which
somehow causes our recursive mutex implementation to take ~1ms when
recursive locking occurs. So when a game boots up and the debugger is
loading the symbol map which can easily have 15000+ symbols, the GUI
locks up for 15+ seconds.

Switching to C++11 recursive mutexes seems to work around the issue. It
should be safe here since there's no direct interaction with the GUI.

Note: There is still a 1-2 second GUI lockup when booting a game on
Windows (it has existed for quite a while, and is more noticeable with
fast boot). It doesn't seem to affect Linux (or maybe it's harder to
detect).
2016-09-30 00:55:07 +01:00
Robert Neumann a6eb615431 psxmode: kernel TTY (printf) 2016-09-29 19:02:57 +02:00
Robert Neumann fd58ee6289 psxmode: disabled a PGIF ringbuffer memset, added comments 2016-09-28 16:18:59 +02:00
Robert Neumann 013940250b psxmode: color for mdec please! ;p 2016-09-25 19:55:44 +02:00
Robert 5e460c57f8 psxmode: add all the rest on core side. psx mode works now.
- include a small game exe detection so pcsx2 doesn't believe it's running the bios
- cdrom.cpp has a hack to account for pcsx2's wrong iop dma timing when mixing mdec and cdrom dmas. This should be properly fixed for the benefit of all ps2 / psx software!
- dmasif2 is disabled since pgpu already handles it
2016-09-24 20:11:32 +02:00
Robert 277b8f3503 psxmode:EE: Plug SBUS PGIF register
v2: improve code integration
v3: fix conflict between sif2/pgif code
2016-09-24 20:11:32 +02:00
Robert 43e8796b2c psxmode:IOP: Init mdec and pgif 2016-09-24 20:11:32 +02:00
Robert 4047e34050 psxmode:IOP: plug in hardware read / write handlers for PGIF and MDEC
v2:
* Update sioRead8() to read a single byte  and add a comment on it
* Better code integration IOP REG

v3:
* only log the bad 16 bit access
2016-09-24 20:11:16 +02:00
Robert 35fa20d965 psxmode: changes to sio that allow psx pads to work 2016-09-24 20:08:46 +02:00
Robert 95be7cf505 build: cmake/MSVC add mdec.cpp/h files 2016-09-24 20:08:46 +02:00
Robert Neumann f22a8126ed psxmode: prepare mdec 2016-09-24 20:08:46 +02:00
Robert Neumann 236c0c78c3 psxmode:MDEC: use dedicated MDEC_LOG 2016-09-24 20:08:46 +02:00
Robert Neumann 58fe959f85 build: cmake/MSVC add the 2 new files 2016-09-24 20:08:46 +02:00
Robert 280b036b91 psxmode: add PGPU.cpp/h code by user wise on the assemblergames.com forums. 2016-09-24 20:08:45 +02:00
Gregory Hainaut f26842faa7 Of course I screwed up in the rebase!
It is a shame!
2016-09-23 18:08:51 +02: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
refractionpcsx2 71601b88ff Fix & symbols in GameFixesPanel 2016-09-23 17:41:48 +02:00
refractionpcsx2 97a8cc7ce5 PCSX2/GameDB: Savestate version bump, Added GIFFIFO entries to GameDB
-RE Savestate version: Sorry, not sorry ;)
2016-09-23 17:41:48 +02:00
refractionpcsx2 0b83b849e7 GIF: Implement GIF FIFO - Enabled as hack as it is slow
-Fixes DJ Hero, Wallace & Gromit (properly), Hot Wheels (closer)
2016-09-23 17:41:48 +02:00
Gregory Hainaut 6e6eae7844 pcsx2:gsdx:spu2x: use parenthesis around macro parameters
For safety reasons.
2016-09-18 16:13:55 +02:00
Gregory Hainaut b3d31869d6 recompiler: use a function to replace HWADDR macro 2016-09-18 16:13:55 +02:00
Gregory Hainaut c448c2becb mtvu: use function instead of macro 2016-09-18 16:13:55 +02:00
Gregory Hainaut d39f17bda3 FPU: replace check* macros by functions
v2: remove useless return after function call
2016-09-18 16:13:29 +02:00
Gregory Hainaut 9648e25018 pcsx2: don't obfuscate the template type with macro 2016-09-18 16:13:29 +02:00
Gregory Hainaut 64d499af6e pcsx2|spu2x: remove unused macro 2016-09-18 16:13:29 +02:00
Gregory Hainaut 02da178d5c pcsx2: replace macro in GameDb by function 2016-09-18 16:13:28 +02:00
Gregory Hainaut 35cf2638e8 Vif: replace makeMergeMask macro with a function 2016-09-18 16:13:28 +02:00
Gregory Hainaut a5a2298c7d IPU: replace BUTTERFLY macro with a function 2016-09-18 16:13:28 +02:00
Gregory Hainaut 796b2d4970 IPU: replace SATURATE macro with a function 2016-09-18 16:13:28 +02:00
Gregory Hainaut ac1b3845b2 pcsx2:log: add MDEC_LOG trace capability 2016-09-18 15:35:59 +02:00
Nobbs66 6589feaacd Link Unconditionally (#1566)
EE Interpreter: Link Unconditionally on Branch and Link instructions
-Link instructions used to store the return address if the branch was
taken, but the correct behaviour is to store the return address whether
or not the branch is taken.
2016-09-16 09:58:37 +01:00
Gregory Hainaut 4796803c33 pcsx2: Remove == true/false for boolean logic (#1556)
As discussed in #1553

Clang Tidy reports goes from 156 to 9.

Remain some macro in spu2x + a deadcode line
2016-09-10 20:08:14 +02:00
Kingcom f2a0f9f61a Fix memory view scrolling, keep window start aligned to row size, and retain focus upon positioning it to the address accessed by an opcode 2016-09-10 15:44:25 +02:00
Gregory Hainaut 4ebe739b44 pcsx2: remove various unused variable
Warning can be reenabled on GCC

A warning isn't fixed as potentially the code is wrong
../pcsx2/gui/MemoryCardFolder.cpp: In member function ‘void FolderMemoryCard::FlushFileEntries(u32, u32, const wxString&, MemoryCardFileMetadataReference*)’:
../pcsx2/gui/MemoryCardFolder.cpp:1027:10: warning: unused variable ‘filenameCleaned’ [-Wunused-variable]
     bool filenameCleaned = FileAccessHelper::CleanMemcardFilename( cleanName );
2016-09-10 00:09:05 +02:00
Gregory Hainaut c8e9207879 svu: avoid a maybe uninitialized warning
False positive but compilers aren't reliable
2016-09-10 00:03:53 +02:00
Gregory Hainaut a6c25b7bff ipu: DATA is an u32 not a pointer
Fix compilers warning.
2016-09-07 22:06:27 +02:00
Gregory Hainaut 244bb555f9 Merge pull request #1532 from ssakash/Coverity
PCSX2: Fix a bunch of coverity defects
2016-09-05 20:16:13 +02:00
Akash 022e650dc6 SuperVU: Initialize class members
CID 146985 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)8.
uninit_member: Non-static class member vuxy is not initialized in this
constructor nor in any functions that it calls
2016-09-03 20:29:50 +05:30
Akash 7e5bca3dfd Counters: Make the code behavior more explicit
CID 168623 (#1 of 1): Missing break in switch
(MISSING_BREAK)unterminated_case: The case for value
GS_VideoMode::Unknown is not terminated by a 'break' statement.
2016-09-03 20:29:40 +05:30
Gregory Hainaut 774d98991c iop rec: fully enable COP2 support 2016-09-02 21:05:28 +02:00
Gregory Hainaut b47c50ae5d iop rec: add the missing LWC2/SWC2 (CP2 reg from/to mem) 2016-09-01 21:50:13 +02:00
Gregory Hainaut 1ee0526e41 iop rec: add constant propagation for COP2
Inspirated from COP0
2016-09-01 21:16:43 +02:00
Gregory Hainaut bdc29dbbbf iop rec: put cop2 comment in the good position... 2016-09-01 20:47:12 +02:00
Gregory Hainaut d78d515acb iop rec: plug GTE (aka COP2) in the recompiler
Code isn't enabled yet to avoid any breakage

Edit iR3000ATables.cpp line 1446
2016-08-27 17:23:37 +02:00
Gregory Hainaut 411a25b610 Merge pull request #1531 from PCSX2/clang-tidy-empty-instead-of-size
pcsx2|common|gsdx: use empty() instead of .size() ==/!= 0 check
2016-08-26 10:05:01 +02:00
ramapcsx2 c1f45dafa5 Merge pull request #1507 from FlatOutPS2/master
PCSX2: IPU end of video freeze fixes
    Fixes end of video freeze in Enthusia - Professional Racing.
    Fixes end of video freeze with IPU Normal error in games like Enter The Matrix(#1494), Rygar, Freestyle Metal X, etc. Also fixes The Incredible Hulk and Bolt (thanks to @prafullpcsx2 for testing).
2016-08-23 12:56:21 +02:00
Gregory Hainaut f3d14dadc7 Merge pull request #1524 from ssakash/SMODE2_Override
EE: Minor changes to syscall function
2016-08-22 11:37:13 +02:00
Gregory Hainaut 1a8825b374 pcsx2|common|gsdx: use empty() instead of .size() ==/!= 0 check
Enhance readability reported by clang tidy
2016-08-21 17:20:13 +02:00
Akash 6bc6d20a87 R5900: Add an enum class for SYSCALL
v2: Fix indentation on switch-case.
2016-08-20 23:32:31 +05:30
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
Jonathan Li f338ffea74 console: Remove scrollbar mouse drag pause behaviour
If the dev/verbose logging option is enabled and the game requires
automatic gamefixes, the console log will always scroll to the bottom
when the scrollbar is released since a new log message will be output
when emulation unpauses.

This could be quite annoying when checking a log while the game is
running. The behaviour doesn't seem to be all that useful anymore
(previously it was useful to work around a GUI bug where the automatic
gamefixes/widescreen patches/cheats menu options didn't apply
immediately) and only works on Windows, so let's remove it.
2016-08-17 22:07:42 +01:00
Gregory Hainaut 15a4d1f0a9 pcsx2: fix gcc warning
MIPSAnalyst.cpp:124:9: warning: ‘takeBranch’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    else if (sure && !takeBranch)

False positive as sure will be false but safer this way
2016-08-17 21:23:06 +02:00
Gregory Hainaut bf0e5dc5bd Merge pull request #1516 from PCSX2/emitter-manual-void-cast
pcsx2: manually cast function pointer to void*
2016-08-17 18:56:55 +02:00
Gregory Hainaut cc68776069 pcsx2: manually cast function pointer to void*
Templace is nicer but give a hard time to compiler.

New version compile in both gcc&clang without hack

v2: add an uptr cast too for VS2013 sigh...
v3: use an ugly function pointer cast to please VS2013
2016-08-17 09:53:30 +02:00
FlatOutPS2 c8f6d68d68 PCSX2: IPU end of video freeze fix
Fixes end of video freeze in Enthusia - Professional Racing.
2016-08-15 19:48:21 +02:00
Gregory Hainaut 252c043409 Merge pull request #1518 from PCSX2/pcsx2-high-level-fopen
Pcsx2 high level fopen
2016-08-15 15:41:27 +02:00
Pseudonym 07e21427b9 When PS1 loading was enabled, someone neglected to check that allowing the function to continue wouldn't cause any problems.
Fixes #1515
2016-08-15 14:23:43 +01:00
Gregory Hainaut 0f1c10230a CDVD: catch MEC/NVM file exception
It will stop the emulation and open a nice box with an error message instead of terminate PCSX2
2016-08-15 14:09:01 +02:00
Gregory Hainaut deb7121fde CDVD: Use wxFFile API to handle MEC file too
again nicer, exception safe, less compilation warning :)

v2:
* check file is properly opened in write mode
* only print an error when result is bad
2016-08-15 13:08:54 +02:00
Gregory Hainaut 534e01e2d6 CDVD: Use wxFFile API to handle NVM file
Nicer, exception safe, less compilation warning :)

v2: check fp is properly open in write mode
2016-08-15 13:06:34 +02:00
Gregory Hainaut ef7530af29 microVU: fix aliasing issue
Union is safer for the compiler
2016-08-14 20:49:12 +02:00
Gregory Hainaut 2d2fdd6e44 debugger: remove useless null check
It is done too late.
CID 168625 (#1 of 1): Dereference before null check (REVERSE_INULL)
check_after_deref: Null-checking this->cpu suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
2016-08-12 22:57:09 +02:00
Gregory Hainaut 24ff2482a4 pcsx2: break when switch value is CoreThread_Indeterminate
Fix another GCC warning
2016-08-12 19:30:14 +02:00
Gregory Hainaut 6f64fc9f84 pcsx2: don't compare pointer with 0 2016-08-12 19:30:14 +02:00
Gregory Hainaut f28ab4c280 pcsx2: gcc warning sign compare 2016-08-12 19:30:14 +02:00
Gregory Hainaut 214253c579 pcsx2: properly init structure with the { } pattern
Remove also 2 unused variables

GCC warning is still disabled as it generates lots of false positive. GCC5 and later will improve the situation

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36750
2016-08-12 19:30:14 +02:00
FlatOutPS2 59a4442880 PCSX2: IPU Normal error end of video freeze fix
Fixes end of video freeze with IPU Normal error in games like Enter The
Matrix, Rygar, Freestyle Metal X, etc.
2016-08-09 14:06:21 +02:00
avih 5a75906ce7 Merge pull request #1492 from ssakash/EE_Cyclerate
PCSX2-WX: Add a mild overclock option on the slider
2016-08-08 19:27:33 +03:00
avih f35c5f1c91 Merge pull request #1491 from ssakash/VFrequency
PCSX2-WX: Add proper vertical frequency values on GS Frame
2016-08-08 18:44:49 +03:00
Akash 0ff7076d84 GUI: Convert text color for -1 value to red
* Only use dark green color for the default cycle rate. using a different color just for a single value (previously for -1) might be confusing for users.

* Use a constant RGB form of dark sea green color instead of the regular dark green color. these new RGB values have been *tuned* for perf...err perfection!
2016-08-08 19:20:51 +05:30
Akash bc54e3d01b R5900: Add a mild overclock option
* Adds a mild overclock option to have the 0 at middle of the slider.
2016-08-08 19:20:44 +05:30
Akash e738acbe3c R5900: Minor clean up (no functional change)
* Rename some variables as the previous names didn't make much sense.

* Convert unnecessary int data types to bool.
2016-08-08 18:45:00 +05:30
refractionpcsx2 84f1b08033 VIF: Fix up some scenarios with Reverse VIF FIFO. Fixes #1502
-Also noted a scenario which isn't really handled correctly but unsure what would happen in those cases (if there are any). I guess we'll find out :)
2016-08-07 12:27:28 +01:00
Akash 005f63d455 PCSX2-WX: Improve percentage calculation on GSFrame
Calculate the percentage value using the vertical frequency fetched from counters.
2016-08-05 18:24:03 +05:30
Akash e7f66900fa Counters: Add a new function GetVerticalFrequency()
No functional changes done, the current commit helps us to pass vertical frequency values of individual video modes to GUI code for accurate percentage calculation on titlebar. (which is done on the succeeding commit)
2016-08-05 18:23:55 +05:30
Jonathan Li af60501fb6 windows: Remove unused solution files and property sheets
The solution files are unused and for ancient Visual Studio versions -
GSDumpGUI has its own solution file, and bin2cpp is included in the main
solution file.

The property sheets have either fallen out of use or were never used in
the first place.
2016-08-04 23:09:08 +01:00
Gregory Hainaut 2844facae5 FPU/sVU: Fix GCC warning
may be used uninitialized in this function

Jump pointer are false positive but it helps to make compiler happy
2016-08-02 15:29:38 +02:00
Avi Halachmi (:avih) e329b6ffd0 boot: fix: show bios info at the console title
This is a regression from 6db18446 , which, due to correctly applying
the patches when the bios starts, also updated the console title (which
happens at the same function).

So when updating the settings and loading the patches, only update the
console title if we're already outside of the bios.
2016-07-31 20:56:00 +03:00
Avi Halachmi (:avih) 6db1844656 patches: load correctly for the bios on full boot
We already had loading of the patches (and applying patch=0) before the
game elf recompiles, now do the same when the bios starts too.
2016-07-31 20:05:04 +03:00
Avi Halachmi (:avih) 2aac8d875a patches: more consistency with console messages
If the dev/verbose console source is enabled then there's no change.

If it's not enabled (i.e. most users), then:
- Don't show patch info messages twice on boot (regression from 27e7ecce).
- Show patch info messages when loading a saved state (never worked).
- Don't show patch info messages for the bios.

It still doesn't print the info when patches/fixes/etc are enabled or
disabled while a game is running, because such actions while a game is
running can have unexpected effects regardless (for instance, it's
technically impossible to unapply a patch).

If one really wants to follow the exact timing and info about patch
loading, just enable the dev/verbose console source at the console menu.
2016-07-31 19:07:14 +03:00
Avi Halachmi (:avih) 5e3c2f0c6a eeCycleRage: negligible fix for the milest underclock calculation
This now makes the mildest underclock really identical to before 90b11b2 .
2016-07-30 18:11:35 +03:00
Avi Halachmi (:avih) 460b7be47a eeCycleRate: add/restore a milder underclock value to the slider
Also slightly modify the textual description of the other underclock items.

All previous values available at the slider are still there, but since
the new value is now the mildest (slider == -1), it "pushes" the previous
-1 and -2 values one notch down.

This restores the mildest value to be identical to how it behaved before
90b11b2f , which is measured as about 75% speed.

Because the "balanced" preset uses the -1 slider value, it means this
restored mild value is now also used by the balanced preset.

As a note, while the message for the mildest value was always "reduce by
about 33%", before 90b11b2f it was actually about 25% reduction (75% speed,
like with this commit now), and after that commit it was about 40% reduction
(60% speed).

Also, since we add new value to the slider only on one side, the "0"
(default) slider position is now not at the exact middle. That's fine,
but maybe we could also add a milder overclock value on the other side
to have that symetric again.
2016-07-30 17:36:34 +03:00
Avi Halachmi (:avih) 67dc3eef4b gui: eeCycleRate: more accurate description based on measurements
The ee cyclerate percentage values at the slider text were inaccurate,
and sometimes wildely so.

Add some code to measure the actual speed at runtime (disabled by default)
and update the (static) slider text values according to the measurements.

Also change the description from increase/reduce "by AA %" to "to BB %".

This makes it slightly easier to grasp. E.g. "reduce speed to 10%" is
easier to grasp than "reduce speed by 90%", and similarly, "increase
speed to 300%" is easier to grasp than "increase speed by 200%".
2016-07-30 16:04:27 +03:00
Avi Halachmi (:avih) e8e6d3bc77 game settings/patches: don't apply acidentally to the bios
While c782b62 added much more reliable game game startup detection, the
settings system did not yet gain that knowledge, but typically that's OK.

Typically the settings (and patches) are loaded according to the current
CRC, which happens once on bios boot (with general settings) and then again
when the game starts, which includes game-specific fixes, patches, etc.

However, if the setting are changed (and therefore also applied) after
the game CRC is known but before the game starts, such as if the user
presses Tab to change framelimiter while at the bios, then until now it
was accidentally applying the game's settings while still at the bios.

This commit makes the settings routine know whether or not the game actually
started, and apply the generic/game settings accordingly.
2016-07-29 20:55:58 +03:00
Pseudonym c782b6222c More robust eeload hooking to monitor and interfere with bios and game loading.
Maybe some other cruft can go now this should be reliable.
2016-07-29 16:51:18 +01:00
Robert Neumann eacd789a88 Fix an oversight (missing an include) 2016-07-29 14:06:27 +02:00
Avi Halachmi (:avih) 27e7ecce65 patches: load before recompiling the elf entry block
Commit 330704a added code which applies the patches before recompiling the
elf entry block, but because at that stage the patches for the current
CRC were not yet loaded, effectively it did nothing.

Now it actually loads the patches before applying them.

As a result, it should now be possible for patches (with place=0) to be
effective before the elf is executed.

This is a hack, because the emulation loads the patches while it's not
paused. It works, but it's not great. A better way would be to pause the
emulation once the entry point is detected, then make the setting get
applied normally (which also loads the patches normally), and then resume
the emulation.

This _should_ properly fix #627 (the test case works as expected now).
2016-07-28 22:25:00 +03:00
Avi Halachmi (:avih) defbdcc2b8 AppCoreThread: small refactor (no-op)
In preparation for the next commit
2016-07-28 22:19:45 +03:00
Gregory Hainaut 55bc7a678a pcsx2: ICC warning: type qualifier on return type is meaningless 2016-07-28 10:36:58 +02:00
Jonathan Li a9f9c1406c Merge pull request #1474 from turtleli/windows-64-bit-fixes
Windows 64-bit compile fixes
2016-07-28 00:19:04 +01:00
Avi Halachmi (:avih) cff8cb137c patches: simplify by unifying patches/cheats (effectively no-op)
patches and cheats are exactly the same (pnach style patch line) but we
stored two sets of them depending on their source: "patches" for
GameIndex.dbf patches, and "cheats" for all the rest (cheats, widescreen,
etc).

Unify patches and cheats and keep only "patches", cleanup and rename the
public API at Patch.h, and add documentation.

Also: add some console messages on invalid "place" value, and when we skip
searching cheats_ws.zip because a pnach file was found at cheats_ws dir.

Also: removed checks before applying different kinds of patches/cheats
because we don't need them (we didn't have disabled patches loaded anyway).

The checks removal _shouldn't_ have any effect, except that the checks were
wrong and accidentally prevented loading widescreen hacks which have a place
value of 0. No one probably noticed it since all the widescreen patches
which I looked at have a place value of 1. So now ws patches with place=0
would load correctly too. If we'll ever have such.
2016-07-27 18:15:17 +03:00
Avi Halachmi (:avih) eb1e890278 patches/cheats: document "place" value and use it explicitly
This commit doesn't change any behavior, but documents the "places" value
of the patch structure ("place" is 1 in patch=1,... and 0 in patch=0,...)
and also uses an enum to make its use explicit.
2016-07-27 14:21:37 +03:00
Avi Halachmi (:avih) 67aee8a19c patches: reset also patches on VM restart
This should fully fix #851
2016-07-27 14:21:37 +03:00
Avi Halachmi (:avih) 56adb85a87 cheats: reset cheats when restarting the VM
If cheats are enabled and loaded (pnatch files from the cheats folder, or
from the cheats_ws folder, or from cheats_ws.zip), then they were still
applied for some time while rebooting the emulation after a game is already
loaded (e.g. start pcsx2, boot fast, play, boot full). This could cause
the reboot to fail if some patches were applied (e.g. widescreen patches).

It seems that the offending application of the cheats happens at
SysCoreThread::VsyncInThread(), which possibly runs before the config
change event is handled (and re-load the cheats for the current crc).

So reset/invalidate the cheats when the VM is reset.

This should improve issue #851, but ultimately not fully fix it, since
the patches (from games db) are not reset yet with this commit, and we
don't have a function to do so. For now the non-cheats patches are only
reset/reloaded when a configuration change is being handled.

It would probably be a good thing if we can unify patches/cheats.
2016-07-27 14:21:37 +03:00
Jonathan Li 77b9f2c15e pcsx2: Initialise g_Conf->Mcd[].Type
Fixes a valgrind warning. Folder memory cards are autodetected later, so
it's safe to set it to a file memory card.
2016-07-24 22:41:54 +01:00
Jonathan Li 38c802a4ef pcsx2:windows: Remove unused sampling profiler
Visual Studio has a much more powerful performance profiler which can do
the same task and more.
2016-07-24 21:42:53 +01:00
Jonathan Li 043d2926fa pcsx2:windows: Disable SuperVU for 64-bit builds
Doesn't compile. Not going to make this work either.
2016-07-23 10:52:10 +01:00
Jonathan Li 8387de09e2 pcsx2: Use _M_X86_64 for Baseblock static_assert ifdef
Fixes a 64-bit compilation issue.
2016-07-23 10:51:56 +01:00
Gregory Hainaut fa12743c8e debugger: fix another missing init
==18373== Conditional jump or move depends on uninitialised value(s)
==18373==    at 0x825CC9B: CtrlMemView::render(wxDC&) (CtrlMemView.cpp:277)
==18373==    by 0x825DA19: CtrlMemView::paintEvent(wxPaintEvent&) (CtrlMemView.cpp:138)
==18373==    by 0x81F3A5F: Pcsx2App::HandleEvent(wxEvtHandler*, void (wxEvtHandler::*)(wxEvent&), wxEvent&) (AppMain.cpp:614)
==18373==    by 0x40BC50B: wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const (in /usr/lib/i386-linux-gnu/libwx_baseu-3.0.so.0.2.0)
==18373==    by 0x426C654: wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) (in /usr/lib/i386-linux-gnu/libwx_baseu-3.0.so.0.2.0)
==18373==    by 0x426C752: wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) (in /usr/lib/i386-linux-gnu/libwx_baseu-3.0.so.0.2.0)

Reported by gcc too
2016-07-22 19:02:34 +02:00
Gregory Hainaut 7d35e15fea Merge pull request #1444 from PCSX2/atomic-relax
Atomic relax
2016-07-22 18:36:02 +02:00
Gregory Hainaut 9182a287e2 Merge pull request #1469 from PCSX2/valgrind-memleak
Valgrind memleak
2016-07-22 18:17:37 +02:00
Gregory Hainaut 55a408edad debugger: init resolvePointerStrings to a default value
Fix valgrind issue:

==3560== Conditional jump or move depends on uninitialised value(s)
==3560==    at 0x81F7949: CtrlRegisterList::OnDraw(wxDC&) (CtrlRegisterList.cpp:291)
==3560==    by 0x47826DE: wxAnyScrollHelperBase::HandleOnPaint(wxPaintEvent&) (in /usr/lib/i386-linux-gnu/libwx_gtk2u_core-3.0.so.0.2.0)
==3560==    by 0x4785969: wxScrollHelperEvtHandler::ProcessEvent(wxEvent&) (in /usr/lib/i386-linux-gnu/libwx_gtk2u_core-3.0.so.0.2.0)
==3560==    by 0x426CA0E: wxEvtHandler::SafelyProcessEvent(wxEvent&) (in /usr/lib/i386-linux-gnu/libwx_baseu-3.0.so.0.2.0)
==3560==    by 0x4710BAE: wxWindowBase::HandleWindowEvent(wxEvent&) const (in /usr/lib/i386-linux-gnu/libwx_gtk2u_core-3.0.so.0.2.0)
==3560==    by 0x44EF67D: wxWindow::GTKSendPaintEvents(_GdkRegion const*) (in /usr/lib/i386-linux-gnu/libwx_gtk2u_core-3.0.so.0.2.0)
2016-07-22 10:13:54 +02:00
Gregory Hainaut b322ef286e CDVD: initialize a temporary buffer
I'm not sure to understand why Valgrind reports it as we populate the buffer
during the ReadAsync. Maybe Valgrind doesn't like async IO from the kernel.

In doubt, the init will avoid those warnings

==19897== Thread 6 EE Core:
==19897== Conditional jump or move depends on uninitialised value(s)
==19897==    at 0x80FE9E1: BlockdumpFileReader::DetectBlockdump(AsyncFileReader*) (BlockdumpFileReader.cpp:40)
==19897==    by 0x8109EE5: InputIsoFile::Open(wxString const&, bool) (InputIsoFile.cpp:229)
==19897==    by 0x810939E: ISOopen(char const*) (CDVDisoReader.cpp:57)
==19897==    by 0x810194E: DoCDVDopen() (CDVDaccess.cpp:359)
==19897==    by 0x80B651C: SysCorePlugins::OpenPlugin_CDVD() (PluginManager.cpp:1219)
2016-07-21 09:51:16 +02:00
Gregory Hainaut 3c0a97354c pcsx2:linux: leaking allocation isn't necessary 2016-07-21 09:51:15 +02:00
Gregory Hainaut 8b91aefd49 gui: add a destructor to CtrlRegisterList object
So we can free allocated memory
2016-07-21 09:51:15 +02:00
Gregory Hainaut 11e5fe8879 pcsx2 gui: fix a pseudo memory leak on SavestateEntryPack
It is a pseudo leak as it is a global object. Nevertheless it pollutes
the valgrind log.

v2:
* use an array of unique pointer
* use ArraySize instead of a constant
2016-07-21 09:50:28 +02:00
Jonathan Li f8605dda61 common|pcsx2: Tidy/standardise VS project
Combine all the different configurations together so the project files
are more generic and maintainable.

Also standardise the layout so all the project files will be similar and
all have the same standard elements (even if empty).

Add 64-bit configurations.
2016-07-19 23:25:12 +01:00
ramapcsx2 ddc68626d8 Merge pull request #1442 from ssakash/Counters
PCSX2-Counters: Improve video mode detection
2016-07-18 19:28:24 +02:00
Gregory Hainaut 10ea05bc6f common: remove old atomic wrapper
Use cross-platform std::atomic instead
2016-07-14 18:29:41 +02:00
Gregory Hainaut 567976e822 MTVU: port vuCycles to std::atomic
V2: use relaxed order as the variable doesn't carry load/store dependency
It is only used as a counter for the speed hack
2016-07-14 18:29:41 +02:00
Gregory Hainaut 3f0655c821 MTVU: port write pointer to atomic and optimize atomic access
Write pointer can be relaxed-read from the EE thread
Read pointer can be relaxed-read from the VU thread

Warning: AtomicExchange calls were replaced by release-store
However AtomicExchange generates a memory barrier (at least on linux)
So either it is useless and it will be faster, or it will explode ;)
2016-07-14 18:29:41 +02:00
Gregory Hainaut ca46921796 MTVU: use acquire/release semantics for atomic operation
* Avoid the generation of memory barrier (mfence)
* Based on the fact that it used to work on previous code without any
  barrier

v2:
* keep basic code in reset path
* use relaxed access for isBusy. The variable doesn't carry load/store
  dependency but is instead an hint to optimize semaphore post
2016-07-14 18:29:40 +02:00
Gregory Hainaut 3b4c357aaa MTGS: avoid a potential very rare deadlock 2016-07-14 18:29:40 +02:00
Gregory Hainaut 4cdf05efac MTGS: use private member for RingBufferLock
Easier to understand the purpose of the 2nd lock
2016-07-14 18:29:40 +02:00
Gregory Hainaut 5913ff1bd8 MTGS: port read/write pointer to full atomic + optimize atomic access
Read pointer is only written by the MTGS thread so it can be relaxed-read
by the MTGS thread

Write pointer is only written by the EE thread so it can be relaxed-read
by the EE thread

Remove volatile stuff
2016-07-14 18:29:40 +02:00
Gregory Hainaut 6fb7beb58a MTGS: use acquire/release semantics for atomic operation
* Avoid the generation of memory barrier (mfence)
* Based on the fact that it used to work on previous code without any
  barrier

v2:
* keep "slow" and safe atomic on reset path
* use relaxed atomic for m_RingBufferIsBusy
The signal doesn't carry dependency with others load/store. Instead it is used
as an hint to awake the semaphore
As a side, there is a potential thread bug

T1 do
* wait sema
* busy = true;
* while (!queue.empty) do work...
* busy = false;
* go back to wait sema

T2 do
* post sema even if busy is false

If T1 stop after the while queue but before the busy, T2 won't post the
event. When T1 will wake up, it will block on the semaphore
2016-07-14 18:29:40 +02:00
NZJenkins b491f5cdc5 Zero out the skip bp
Fixes #1453
2016-07-12 17:51:56 +12:00
Akash 2ed67f6d65 EE-SYSCALL: Move messages back to dev/verbose level
These messages are not needed anymore as we'll get the video mode
information from the console messages on Counters.
2016-07-09 21:50:41 +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 e7d4bc4506 PCSX2-Counters: Remove default video mode variable
* Fixes a bug where NTSC VideoMode was automatically used when videomode is uninitialized. the bug was only temporary till the SMODE register was written.
2016-07-09 21:50:37 +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
Gregory Hainaut a735e2b58f Merge pull request #1287 from mogaika/debug_window_improve
Debugger features
2016-07-07 19:59:33 +02:00
Vladimir Jigulin 7e91eb6616 debugger: some user-friendly improves in ui
Grouping bytes in debugger memory window, following pointers and history
Goto in register view
Printing strings in pointer registers
Memory view can be resized correctly by ctrl+wheel
Improvement in function 5900DebugInterface::isValidAddress
2016-07-03 22:01:09 +03:00
Akash 72661e7c16 PCSX2-Core: Clean up some warnings on MSVC
x86emitter : Convert variable type from u8 to bool.
recVTLB: Cast "sign" to bool to prevent a warning.
R5900OpcodeImpl: Cast all the values in array to u64 instead of s64.
2016-06-30 16:49:18 +05:30
Pseudonym 36dd50005a Changed the M[FT]P[CS] instruction decoding logic to match results from this test:
https://github.com/unknownbrackets/ps2autotests/blob/master/tests/cpu/ee_cop0/performance.cpp
2016-06-23 20:57:43 +01:00
Jonathan Li 185012b2b7 gui: Use newer wxWidgets event type names
Also add a comment about how the wxEVT_LIST_ITEM_DESELECTED bug only
affects Windows.
2016-06-20 00:00:26 +01:00
Jonathan Li b8ac54052c gui: Use Bind instead of Connect for everything else 2016-06-19 23:25:09 +01:00
Jonathan Li 1c398c2b77 gui: Use Bind instead of Connect for menus
Also rearrange the order to (mostly) reflect menu ordering and remove
some bindings to non-existent menu items.
2016-06-19 23:14:55 +01:00
Jonathan Li 0ecee3deda cleanup: Remove unnecessary rebuild files
They're used for converting the image files to header files, but they're
outdated and have been unused for quite a while.
2016-06-17 23:56:31 +01:00
Jonathan Li 2436480d9b gui: Use Bind instead of Connect for panels and dialogs 2016-06-17 00:03:59 +01:00
Jonathan Li 7ac47676e2 pcsx2: Use Bind compatible event declarations/definitions
Also remove some unused event types.
2016-06-16 21:37:45 +01:00
Jonathan Li aee0d4c0c8 gsframe: Use Bind instead of Connect 2016-06-16 21:37:45 +01:00
Jonathan Li 2112e38886 gsframe: Use wx enum for left mouse button 2016-06-16 21:37:45 +01:00
ramapcsx2 ec07571069 Revert "PCSX2-Counters: Some Changes to Video mode counter stuffs" 2016-06-09 00:44:14 +02:00
ramapcsx2 d482c5de91 Merge pull request #1368 from PCSX2-Alpha/Counters
PCSX2-Counters: Some Changes to Video mode counter stuffs / introduce proper names and differentiate between official PS2 video modes
2016-06-09 00:14:25 +02:00
FlatOutPS2 f1ba9c9d6a PCSX2-WX: MainFrame keyboard navigation improvement (#1388)
Adding shortcuts to all the menu options, that only some of the options
in the Config tab already had.

Also update translations so menus are still localised (well, mostly).
2016-06-08 21:48:16 +01:00
Jonathan Li 9e9505a732 linux: Fix hotswapping CDVD message truncation
Iso, Plugin, and NoDisc were truncated to I, P, and N. Fix the issue.
2016-06-06 23:35:05 +01:00
Jonathan Li c7940856ce windows: Remove unneeded library dependencies
Some are unnecessary since they're already taken care of by project
references, while others are duplicates or unused.
2016-06-04 22:55:48 +01:00
Akash f9b56bc354 EE-SYSCALL: Move messages back to dev/verbose level
Not needed anymore as we get another message from Counters for each
change in video mode. (refer previous commit)
2016-06-04 22:10:36 +05:30
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 3b2b6a20aa eeCache: Flush cache entries on DXLTG
-SYNC.L should be called before this command forcing the cache to writeback to memory, but that would be slow to do every time, so we will do it on this command.
2016-06-04 12:57:14 +01:00
prafullpcsx2 8418d54ac7 Minor EE Cache changes
This seems to help games that require EE Cache. Please test Ice Age 2 and Evolution Snowboarding.
2016-06-03 12:00:55 +05:30
NZJenkins 6bc02cbb45 GetBreakPointCondition handle temp breakpoints
Fixes #1374
temp bp were not previously handled
2016-05-30 16:16:32 +12:00
refractionpcsx2 67288b4735 A wild bracket has appeared! I choose you, delete button! 2016-05-29 14:13:45 +01:00
refractionpcsx2 bbecc3d0c2 microVU: Only spam "Reading VU1 Regs" warning in Dev mode and only when MTVU is enabled. It's useless when it isn't. 2016-05-29 13:23:25 +01:00
Jonathan Li b20433c0be windows: Remove user.props references from all projects
find . -name *.vcxproj -exec sed -i -e '/user.props/d' {} \;

Microsoft recommends against using .user files. From
https://msdn.microsoft.com/en-us/library/669zx6zc.aspx :
"The best practice is to delete the reference to them in Property
Manager to ensure that your projects operate independently of any
per-user, per-computer settings. This is important to ensure correct
behaviour in a SCC (source code control) environment."

If you cannot compile SPU2-X after this commit (since that still relies
on the old DirectX SDK), you'll need to fix your build environment.
2016-05-29 12:21:52 +01:00
Jonathan Li c6ed5ee9c6 windows: Make build work with non-English parent directory
Not a recommendation to do so. Alsorecommendnottousespaceseither.
2016-05-28 23:27:34 +01:00
Jonathan Li bde5960581 iop: Use count_leading_sign_bits for err, counting sign bits
Replaces the inline assembly and generic version with the unified
implementation.
2016-05-21 23:26:18 +01:00
Jonathan Li eaa4abea45 ipu: Convert yuv2rgb sse2 inline assembly to intrinsics
It's more portable.

Use _mm_shuffle_epi32 instead of _mm_movehl_ps - I think it avoids
data bypass delays going from integer to float domains on older
processors, and Agner's tables indicate that the instruction has the
same latency and occasionally has higher throughput (depending on cpu).

And switch the _mm_xor_si128 and _mm_unpacklo_epi8 around so the same
constant can be used for both C bias and alpha.
2016-05-21 23:26:17 +01:00
Jonathan Li 6362b9c9b2 pcsx2: aio: Complete POSIX AIO reader 2016-05-21 13:23:10 +01:00
Jonathan Li e10ed744bc pcsx2:freebsd: Fix build 2016-05-20 22:32:41 +01:00
Jonathan Li 9537accb51 linux: Remove old recent ISO list workarounds
Seems to work fine now, no warnings or compile errors.
2016-05-19 09:08:13 +01:00
Jonathan Li 203fb71851 linux:async-iso: Fix invalid file descriptor checks
-1 is returned when open() fails, not 0.
2016-05-18 23:31:32 +01:00
refractionpcsx2 ad61503d83 CDVD: Fix drive status on BREAK.
-Formula One 2001 expects the drive to be paused after break.
-The command breaks from the current command, it doesn't stop the drive :)
2016-05-18 21:44:13 +01:00
Jonathan Li 92d4d93fce Merge pull request #1312 from FlatOutPS2/master
Automatic aspect ratio switch during FMV playback
2016-05-11 14:07:59 +01:00
FlatOutPS2 5871874f70 Avoid crash on some systems with FMV software switch
Avoid crash on some systems switching HW><SW in fullscreen aspect
ratio's with FMV Software switch.

Replaces previous zoom adjusting fix with a more efficent one.

Squashed a small improvement into commit.
2016-05-11 14:33:25 +02:00
NZJenkins 25b29a2864 Ensure selected rows are visible in debugger
Fixes #1353
DebuggerLists:
Select does not ensure the item is visible if selecting
Went with existing convention of Select and Focus.

CtrlRegisterList:
Added ensureVisible, called whenever the current row selection is
changed
2016-05-10 13:01:18 +12:00
Jonathan Li 23782b5c24 Merge pull request #1337 from turtleli/autodock
Console: Add AutoDock option to menu
2016-05-09 00:13:21 +01:00
Jonathan Li c540840cd4 pcsx2: Apply auto gamefix/widescreen/cheat changes immediately 2016-05-06 20:32:31 +01:00
Jonathan Li f97b556e23 pcsx2: Use incoming settings when applying settings
The old config settings were wrongly used when determining whether to
load patches, cheats and widescreen hacks. These settings needed to be
applied twice to actually take effect if they were changed while a game
is running.

Use the incoming settings so the settings only need to be applied once.
2016-05-06 01:03:51 +01:00
FlatOutPS2 6defe6e07d Automatic aspect ratio switch during FMV playback
Updated to bypass ini setting for automatic aspect ratio switch.
2016-05-03 16:50:42 +02:00
Jonathan Li ad652706d6 debugger:windows: Fix vanishing breakpoints when scrollbar disappears
On Windows, it seems that if you resize the columns in the size event
handler when the scrollbar disappears, the listview contents may decide
to disappear as well. So let's avoid the resize for this case.
2016-05-03 00:42:45 +01:00
Jonathan Li 7435e6e7b3 Console: Add AutoDock option to menu 2016-05-02 17:02:16 +01:00
Jonathan Li 9b58b3fb6e Console: Do not scroll to bottom unless text is updated
Also remove the size event handler and use Bind instead of Connect
2016-05-01 18:38:59 +01:00
Jonathan Li 6b5761dfa4 gui: Avoid out-of-bound access when sVU is disabled
The radio buttons are ifdef'd out so they don't exist.
2016-05-01 09:52:36 +00:00
Jonathan Li 35e17127af debugger: Use Bind instead of Connect for events 2016-04-29 00:16:16 +01:00
Jonathan Li 4227477fc4 ConsoleLogger: Use wxTE_NOHIDESEL style for pxLogTextCtrl
It prevents the console logger text from disappearing on Windows and we
can remove a Windows specific fix.
2016-04-29 00:15:44 +01:00
Jonathan Li d89043d8ac pcsx2: Remove wx2.8 code and uses of wxMAJOR_VERSION
Technically wxMAJOR_VERSION wasn't the right thing to use, but it was
good enough.
2016-04-29 00:09:47 +01:00
Jonathan Li f7495c6867 ConsoleLogger: Use Bind instead of Connect 2016-04-27 23:24:17 +01:00
Jonathan Li de6b7752d4 ConsoleLogger: Define events in a Bind compatible way
Also remove the pxEvt_LogWrite event, since that isn't used.
2016-04-27 23:24:17 +01:00
Jonathan Li a6ba7a19b9 ConsoleLogger: Removed DockedMove
It's unused.
2016-04-27 23:24:17 +01:00
Jonathan Li 91161b37dd pcsx2: Remove duplicate license blurb in BreakpointWindow.cpp 2016-04-27 20:38:08 +01:00
Jonathan Li dda44519c1 pcsx2|utilities: Use non-deprecated wxFont stuff 2016-04-23 13:57:42 +01:00
Jonathan Li 5de16001e2 Merge pull request #1273 from PCSX2-Alpha/Willkuer_suggestion
Always show number of loaded widescreen hacks/cheats in console title
if the respective options are enabled (even if none are loaded).

Always print the number of loaded widescreen hacks to the console if
the option is enabled (even if none are loaded).
2016-04-07 23:38:23 +01:00
Gregory Hainaut 1208dbe8c7 cmake: add an option to build the new legacy GSdx plugin
+ bump the new one to 1.1.0 (to ease reporting)
2016-04-07 21:46:42 +02:00
Gregory Hainaut 8ccdc05c08 Merge pull request #1217 from PCSX2-Alpha/CRTC_option
GSDX : Add an option for CRTC size and some other video mode stuffs
2016-04-07 21:24:46 +02:00
Akash 9ad33012ad Core: Cleanup and some changes to console messages
* Always show number of cheats/widescreen hacks loaded in console title when respective options are enabled.
* Make the placement of braces consistent
2016-04-07 15:48:49 +05:30
Gregory Hainaut 5736b5e9eb debugger: properly init DisassemblyLineInfo
Avoid conditinal check on uninitialized value (reported by Valgrind)
2016-04-07 09:36:22 +02:00
Jonathan Li 0ab7b6340d Merge pull request #1275 from AdmiralCurtiss/memcard-plugin-switch-filter-reset
Move folder memcard filter management into the actual folder memcard class to fix #1179 and similar.
2016-04-06 23:59:36 +01:00
Akash 3dd8574e33 EE-Syscall: print log messages even without dev/verbose checked 2016-04-06 09:22:55 +05:30
Akash af1b6f4b42 EE-Syscall: Add some missing video modes 2016-04-06 09:22:53 +05:30
Gregory Hainaut ee08a6fc53 Merge pull request #1270 from PCSX2/monolithic-build
Monolithic build
2016-04-03 11:20:07 +02:00
Admiral H. Curtiss 97a68becb9 Handle filter management in the folder memcard class rather than outside.
This prevents desync between what is assumed to be the active filter and
what is actually the active filter, fixing errors like #1179 where the
memory cards are closed and reopened for whatever reason.
2016-04-02 15:22:11 +02:00
Admiral H. Curtiss 3b7ba39590 Fix potential access of free'd memory when re-opening an already open folder memory card. 2016-04-02 04:03:07 +02:00
Gregory Hainaut e96b29f84f mVU: init microRegAlloc
CID 146988
2016-03-30 19:56:19 +02:00
Gregory Hainaut eb2c61ccc0 pcsx2: init FileMemoryCard
CID 147037
2016-03-30 19:56:19 +02:00
Gregory Hainaut 27400b0be1 pcsx2: initialize pxEvtQueue
CID 146991
2016-03-30 19:56:19 +02:00
Gregory Hainaut cf722fdf50 pcsx2: Initialized member of SysCorePlugins
CID 147006
2016-03-30 19:56:19 +02:00
Gregory Hainaut 459aebe8bf pcsx2:gif: initialize gif unit member
CID 147032
2016-03-30 19:56:19 +02:00
Gregory Hainaut beadc0e69b pcsx2:gif: reset field from the constructor
CID 147031
2016-03-30 19:56:19 +02:00
Gregory Hainaut 0fb249284f debugger: initialized member
CID 147003
CID 147004
2016-03-30 19:56:19 +02:00
Gregory Hainaut 1bd8113f66 cmake: add various option to disable plugin support 2016-03-30 10:19:54 +02:00
Gregory Hainaut f010f9458b plugin: add define to select builtin plugin 2016-03-30 09:54:34 +02:00
Gregory Hainaut 3a8164ac4e plugins: add a dynamic/static loader 2016-03-30 09:42:17 +02:00
Jonathan Li 5d303c793b cdvd:iso: Use Volume Descriptor to find layer break
The DVD layer 0 sector count is stored in the Volume Space Size field of
the Primary Volume Descriptor on DVD layer 0. This value is the same as
the total sector count for a single layer DVD and the first layer 1 LSN
of a dual layer DVD.

Let's use that to determine the layer 1 start LSN instead of using the
brute force approach. Since this approach is much faster than the
previous approach, the layer break is no longer cached.
2016-03-20 21:42:35 +00:00
refractionpcsx2 6649f43069 VIF: Only delay MSCAL - Fixes #1218 Downhill Domination and Twisted Metal Head-On. Snowblind games still fine 2016-03-20 17:18:17 +00:00
Jonathan Li e760a9566a windows: Move EmbeddedImage.h to utilities project file 2016-03-16 20:41:21 +00:00
Jonathan Li a487aaf952 Merge pull request #1232 from turtleli/nonxp-toolkit
windows: Switch to Non-XP compatible toolkits
2016-03-16 20:34:27 +00:00
Gregory Hainaut 0ef8ddb2a2 Merge pull request #924 from kust2708/onepad-gui
Onepad GUI for Linux - New wxWidget interface
2016-03-15 20:23:44 +01:00
Jonathan Li 9ed9b2d8cd windows: Switch to DefaultPlatformToolset aka non-XP toolsets
Basically I ran
find . -name "*.vcxproj" -exec sed -i -e 's/_xp//' {} \;

This will likely break XP, but it paves the way on Windows for a PCSX2
that does not require the DirectX redistributables to be installed for
Windows 8, 8.1 and 10 users. Windows Vista and 7 users will still require
the DirectX redistributable files for XInput and XAudio, though PCSX2
should still be capable of running if a user does not actually use either
of them.
2016-03-13 12:04:28 +00:00
NZJenkins ba706b6dab Check delay breakpoint condition
isBreakpointNeeded returns if breakpoints are needed for any combination
of the current pc and delay slot.
dynarecCheckBreakpoint checks conditions for each breakpoint slot.
2016-03-04 11:26:37 +13:00
Gregory Hainaut e57a75ac55 Merge pull request #1202 from PCSX2/atomic-v2
Atomic v2
2016-02-28 22:08:29 +01:00
Gregory Hainaut ca8955daf3 MTVU: port ScopedLockBool to std::atomic 2016-02-28 15:29:31 +01:00
Gregory Hainaut 3a4787dd98 MTVU: partially port code to MTVU
Remains volatize as MTGS and the ScopedLockBool stuff
2016-02-28 15:29:31 +01:00
Gregory Hainaut 40b1a3996a VU: port BaseVUmicroCPU to std::atomic 2016-02-28 15:29:31 +01:00
Gregory Hainaut 8555a87380 GS.h: use std::atomic 2016-02-28 15:29:31 +01:00
Gregory Hainaut 5a84a0d8d2 MTGS: port to std::atomic
Except the ring pointers m_ReadPos/m_WritePos because it requires
memory access optimization
2016-02-28 15:29:31 +01:00
Gregory Hainaut 410922a943 Deci2: port to std::atomic 2016-02-28 15:29:31 +01:00
Gregory Hainaut 3a9bd90a3b Gif: port code to std::atomic 2016-02-28 15:29:31 +01:00
Gregory Hainaut 92078b1c58 System: port to std::atomic
v2: use an explicit int type for clang
// multiple conversions from switch condition type
// 'std::atomic<ExecutionMode>' to an integral or enumeration type

v3/v4: use .load to read variable (clang 3.7)
v5: add back 'std::atomic<ExecutionMode>' now that .load is used everywhere
2016-02-28 15:29:00 +01:00
Gregory Hainaut 34826c9506 PluginManager: port to std::atomic 2016-02-28 15:29:00 +01:00
Gregory Hainaut 97cc468509 gui: use std::atomic bool to manage the gui
V2: Don't use 64 bits atomic (I'm not sure it is legal on 32 bits)
Note: Clang-3.7 fails to link
2016-02-28 15:29:00 +01:00
Gregory Hainaut e5d4f2c24f EE: use std::atomic<bool> for reset variable 2016-02-28 15:29:00 +01:00
Jonathan Li 2d4e2fb8cb windows: spu2-x does not use the emitter
So let's not specify it as a build dependency.

Also remove some unnecessary manual library linkage and remove the
wsWidgets GUI property sheet, which does nothing useful.
2016-02-28 11:08:08 +00:00
Jonathan Li 1103f9046a Merge pull request #1201 from PCSX2-Alpha/minor_changes
PCSX2-WX: Minor changes to core panels/dialog
2016-02-24 19:59:40 +00:00
Akash e1febf7ec1 EE/VU Panel: Remove unnecessary code
Removed some unneeded explicit calls of the enable function and also corrected the placement of braces on a function. ( do note that only the specific function at the file used a different placement of the braces)

Also fix the grayout behavior of SuperVU recompiler option when DISABLE_SVU is defined. (thanks to turtleli)
2016-02-23 17:51:20 +05:30
Akash 35f599833c EE-Panel: gray out EE Cache when recompiler is set 2016-02-23 17:51:12 +05:30
NZJenkins 729218ec4b debugger: Fix opcode lookup crash 2016-02-21 22:39:29 +00:00
Gregory Hainaut a66c911fed cmake: factorize debug/dev define 2016-02-21 16:17:10 +01:00
Akash ef9b8b792f About Box: Fix a very minor typo 2016-02-21 17:45:23 +05:30
Jonathan Li aff75131e4 gui: Fix console log source menu item behaviour
Fixes an issue where the Enable all/Disable all/Restore Default menu
items in the Console Log Sources menu do not immediately enable/disable
CDVD log output.
2016-02-15 20:05:17 +00:00
kust2708 823a37aed7 OnePad : New GUI based on gwWidget
Buttons done, configuration initialization done.
Still need to add Gamepad and Joysticks configuration frames.
Require png file for the moment (the embedded picture will be fixed after).

New Onepad GUI based on wxWidget (Main frame almost finish)
Background picture is now embedded
Button binding works
Loading and saving works
Need to add feedback and gamepad, joysticks configuration frame

Modification of the onepad CMakeList.txt
Automatic generation of images headers using perl script

Modification of the test feedback function
2016-02-14 17:26:31 +01:00
BoopFtang fd4997ab94 StepOut breakpoint fix
Fixes #1164
SetSkipFirst wasn't called
2016-02-14 19:22:43 +13:00
Jonathan Li f423549257 pcsx2: Fix savestate saving crash
My bad.
2016-02-13 14:57:55 +00:00
Karasuhebi c843130854 Change Playstation to PlayStation in the About dialog and the CLI dialog.
Changed the word "Playstation" to the proper "PlayStation" in the About
dialog and the Command Line Options dialog.

Add a space between PlayStation and 2.
2016-02-13 13:58:58 +01:00
Gregory Hainaut 38b9198dba Merge pull request #1173 from turtleli/replace-scoped-ptr
Replace ScopedPtr with unique_ptr
2016-02-13 13:49:18 +01:00
ramapcsx2 32182fe126 always fflush ee/iop logs. fixes the test suite timing out on windows. 2016-02-13 12:14:40 +01:00
Jonathan Li f67cb001df Merge pull request #1172 from NZJenkins/master
Debugger breakpoint bugfix
2016-02-11 22:47:40 +00:00
Gregory Hainaut 50caca4002 EE: replace EE/FPU mov opcode when FPU_RECOMPILE isn't enabled
It will be easier for testing if we change the format of the FPU register
2016-02-11 18:53:28 +01:00
Gregory Hainaut 122baa17a2 EE: intruder detected 2016-02-11 18:43:33 +01:00
BoopFtang 83a877c3dc Fixes #1161
In the case of a disabled breakpoint at the address, false would be
returned without checking for temp breakpoint
2016-02-10 15:54:56 +13:00
Jonathan Li 499fed40f2 pcsx2: Convert ScopedPtr to unique_ptr 2016-02-08 22:31:45 +00:00
Jonathan Li 8889f4fdcc gui: Replace ScopedPtr with unique_ptr 2016-02-08 22:31:45 +00:00
Jonathan Li 92bb849e7c Use unique_ptr instead of ScopedPtr for exceptions 2016-02-08 22:31:45 +00:00
Jonathan Li 115b14bc94 cdvd: Replace ScopedPtr with unique_ptr 2016-02-08 22:31:45 +00:00
Gregory Hainaut 5b74374bb2 Merge pull request #1169 from PCSX2/remove-mmx
Remove mmx
2016-02-08 19:17:24 +01:00
Gregory Hainaut fe0229aed0 EE: remove dead code 2016-02-08 09:52:31 +01:00
Gregory Hainaut 5611333c29 PCSX2: remove reporting of mmx/3dnow 2016-02-08 09:16:52 +01:00