1129 Commits

Author SHA1 Message Date
Connor McLaughlin
915989fa25 CommonHostInterface: Remove extra newlines in messages 2020-04-14 04:05:10 +10:00
Connor McLaughlin
67f2eb3fed Qt: Fix -fullscreen not working 2020-04-13 22:37:24 +10:00
Connor McLaughlin
81cf4b469f Frontends: Add shared command line interface
Also provides batch mode and automatic fullscreen switching.

  -help: Displays this information and exits.
  -version: Displays version information and exits.
  -batch: Enables batch mode (exits after powering off)
  -fastboot: Force fast boot for provided filename
  -slowboot: Force slow boot for provided filename
  -resume: Load resume save state. If a boot filename is provided,
    that game's resume state will be loaded, otherwise the most
    recent resume save state will be loaded.
  -state <index>: Loads specified save state by index. If a boot
    filename is provided, a per-game state will be loaded, otherwise
    a global state will be loaded.
  -statefile <filename>: Loads state from the specified filename.
    No boot filename is required with this option.
  -fullscreen: Enters fullscreen mode immediately after starting.
  -nofullscreen: Prevents fullscreen mode from triggering if enabled.
  -portable: Forces "portable mode", data in same directory.
  --: Signals that no more arguments will follow and the remaining
    parameters make up the filename. Use when the filename contains
    spaces or starts with a dash.
2020-04-13 22:17:09 +10:00
Connor McLaughlin
6a03bb2d15 HostInterface: Drop std::filesystem requirement 2020-04-12 21:06:33 +10:00
Connor McLaughlin
e843fcd9f0 SDLControllerInterface: Fix broken input when player IDs clash 2020-04-11 19:36:53 +10:00
Connor McLaughlin
4fd5d6ca4f SDL: Fix software renderer image uploads in OpenGL 2020-04-11 18:54:20 +10:00
Connor McLaughlin
a682b720e1 Qt: Fix software renderer image uploads in OpenGL 2020-04-11 18:54:09 +10:00
Connor McLaughlin
7779a54bc5 GPU: Rename 'Force Progressive Scan' to 'Disable Interlacing'
It affects rendering as well as display/scanout now, after all.
2020-04-11 16:37:53 +10:00
Connor McLaughlin
9e024b7a51 GPU: Handle VRAM wrap-around behavior on scanout 2020-04-11 16:09:03 +10:00
Connor McLaughlin
fc3efebb38 Revert "SPU: Use reverb formula from Mednafen-PSX"
This reverts commit 809b9f89ca0a24934ffa13c7901345ed0aa82eeb.
2020-04-11 15:04:04 +10:00
Connor McLaughlin
54adad948b Qt: Add .mcr extension to memory card file picker 2020-04-11 11:57:39 +10:00
Connor McLaughlin
a4a112f5d8 CDROM: Deliver invalid sub-q (libcrypted) sectors to CPU
Nocash documentation would suggest that it only needs the sector to be
skipped by GetLocP. Which would make sense as the non-subchannel data is
still completely valid.
2020-04-11 02:44:43 +10:00
Connor McLaughlin
6d55979dac HostDisplay: Fix 1x1 1:1 AR screenshots in OpenGL 2020-04-11 00:56:28 +10:00
Connor McLaughlin
05e4e7d262 CDROM: Add timing for speed changes/adjust seek timing
This makes the BIOS take longer to load the executable off the disc,
giving the sound effects longer to fade out and reducing the overlap
with the game.
2020-04-11 00:40:44 +10:00
Connor McLaughlin
809b9f89ca SPU: Use reverb formula from Mednafen-PSX 2020-04-11 00:40:28 +10:00
Connor McLaughlin
64a96ad718 Common/WAVWriter: Add accessors 2020-04-11 00:24:30 +10:00
Connor McLaughlin
156a360d86 SDL: Migrate to common host interface
It now supports controllers again. But you have to bind them in Qt.
2020-04-11 00:00:44 +10:00
Connor McLaughlin
6cfad33b8e HostInterface: Set NoNav on FPS window
Prevents it stealing focus in SDL frontend.
2020-04-11 00:00:37 +10:00
Connor McLaughlin
674bcdfeec INISettingsInterface: Add Save() method 2020-04-11 00:00:21 +10:00
Connor McLaughlin
ebc3aa118c SDL: Fix DXGI intercepting ALT+ENTER 2020-04-11 00:00:15 +10:00
Connor McLaughlin
6775100170 GPU: Drop OpenGL ES renderer
We can put this through the normal GL renderer instead.
2020-04-11 00:00:10 +10:00
Connor McLaughlin
fbfd838e22 GPU: Add pixel aspect ratio option
Can display in 4:3, 16:9, 1:1 ratios.
2020-04-10 15:12:35 +10:00
Connor McLaughlin
3325d2c42c GPU: Add Force NTSC timings option
This option forces NTSC timings for PAL games, causing them to either
run faster (more likely) or smoother (less likely).
2020-04-10 13:35:10 +10:00
Connor McLaughlin
a06240141e GPU/D3D11: Fix incorrect usage of CopySubresourceRegion() in CopyVRAM()
I believe this is what was causing the renderer to have issues on
Windows 7.
2020-04-10 01:07:44 +10:00
Connor McLaughlin
5a19abbbd3 GPU/D3D11: Fix broken 24-bit display/interlacing when upscaled 2020-04-10 00:43:18 +10:00
Connor McLaughlin
f0a3e66d08 GPU/Software: Fix broken display when VRAM is X-offset 2020-04-09 20:50:57 +10:00
Connor McLaughlin
2413c5a6a3 GPU/Software: Fix incorrect colours in 24-bit FMVs 2020-04-09 00:46:00 +10:00
Connor McLaughlin
3c45603cb4 MemoryCard: Batch sector writes together 5 seconds at a time
Reduces disk writes for SSDs (assuming the OS didn't just cache all the
writes), and limits OSD spam.

Fixes #146.
2020-04-09 00:14:26 +10:00
Connor McLaughlin
0a004361fc Qt: Work around flip model swap chains being limited to vsync when parented
Fixes fast forward not working on some systems.
2020-04-09 00:14:19 +10:00
Connor McLaughlin
1f40d5f77d Qt: Implement memory card remove button 2020-04-09 00:13:44 +10:00
Connor McLaughlin
3272b37853 Qt: Implement browse button for memory card paths 2020-04-09 00:09:16 +10:00
Connor McLaughlin
9915d977e4 Qt: Fix memory card path not applying
Fixes #245.
2020-04-09 00:03:52 +10:00
Connor McLaughlin
cbe9ef24b9 SettingWidgetBinder: Use QString instead of const char*
Fixes potential string lifetime issues.
2020-04-09 00:03:20 +10:00
Connor McLaughlin
bc66b2691d CDImage: Linux build fix 2020-04-08 21:26:51 +10:00
Connor McLaughlin
0006052728 SPU: Fix some registers not being saved to state 2020-04-08 20:33:39 +10:00
Connor McLaughlin
08567fedf4 CDROM: Fix crash when loading save state from different system 2020-04-08 13:08:27 +10:00
Connor McLaughlin
9851b75368 CDImage: Fix crash on invalid cuesheet 2020-04-08 11:58:05 +10:00
Connor McLaughlin
32dbd173c5 Qt: Add link to Discord server in Help menu 2020-04-07 13:54:25 +10:00
Connor McLaughlin
610abc1a75 BIOS: Make SCPH-3000 BIOS known 2020-04-07 11:54:24 +10:00
Connor McLaughlin
b4538b1d2e HostInterface: Add redump BIOS filenames to search list
ps-10x.bin, ps-30x.bin, etc.
2020-04-07 11:54:22 +10:00
Connor McLaughlin
e91d760175 HostInterface: Fix crash on startup with controller connected 2020-04-06 12:18:33 +10:00
Connor McLaughlin
0c1547d9e3 CDROM: Don't use valid bit for last subq, read on reset
Fixes GetlocP failing after resetting the system, causing some FMVs to
break/games to get wedged.
2020-04-06 00:25:56 +10:00
Connor McLaughlin
b7cdaaf36a CDROM: Defer setting reading/playing bit until sector is read
Fixes softlock in Chicken Run.
2020-04-06 00:25:49 +10:00
Connor McLaughlin
411fbe8416 Common/Event: Add unit tests 2020-04-05 23:25:45 +10:00
Connor McLaughlin
e7640d5367 HostInterface: Make SetUserDirectory() overridable by frontends 2020-04-05 22:59:06 +10:00
Connor McLaughlin
11e8a91e30 CommonHostInterface: Simplify fullscreen toggle 2020-04-05 22:58:54 +10:00
Connor McLaughlin
bf6c1c4866 Qt: Implement render-to-seperate-window and render-to-main toggle 2020-04-05 22:58:47 +10:00
Connor McLaughlin
abb87f497f Common: Port Event class from YBaseLib over 2020-04-05 22:57:35 +10:00
Connor McLaughlin
70ccdcfc30 INISettingsInterface: Make constructor parameter a std::string 2020-04-05 22:57:29 +10:00
Connor McLaughlin
45d7294c3c CDROM: Limit XA playback to first-identified file/channel
Fixes background music in initial menu of Tomb Raider III.
2020-04-05 01:39:43 +10:00
Connor McLaughlin
cae2e09957 SDLControllerInterface: Pass player ID to hooks not joystick ID
Should fix controllers which show up as non-zero players.
2020-04-05 01:28:08 +10:00
Connor McLaughlin
3cfead36c4 Revert "GPU: Clamp coordinates to 11 bits after applying drawing offset"
This reverts commit 5302f8381807c3736a9d439bd6727404ba8dbd59.

This is not the correct fix, and breaks other games.
2020-04-04 19:31:19 +10:00
Connor McLaughlin
4ea3c994f6 GL/ShaderCache: Linux build fix 2020-04-04 00:52:04 +10:00
Connor McLaughlin
ddf52cc8c7 GPU/SW: Implement interlaced display 2020-04-04 00:24:37 +10:00
Connor McLaughlin
c483a78889 GPU: Implement interlaced VRAM fills 2020-04-04 00:24:37 +10:00
Connor McLaughlin
2aecb570c1 GPU: Implement interlaced rendering in hardware backends 2020-04-04 00:24:37 +10:00
Connor McLaughlin
bb3c0a2ccc GPU/HW/OpenGLES: Use shader cache 2020-04-04 00:24:37 +10:00
Connor McLaughlin
d0be5618ec GPU/HW/OpenGL: Use shader cache 2020-04-04 00:24:37 +10:00
Connor McLaughlin
f566ca7a50 GL/ShaderCache: Recreate cache when creating program from binary fails
This is probably due to a driver or GPU change, so all programs will be
"bad" and if we don't start from scratch, we'll never cache any new
program versions.
2020-04-04 00:24:34 +10:00
Connor McLaughlin
ca2f691dbe Common: Add GL Shader Cache class 2020-04-04 00:11:09 +10:00
Connor McLaughlin
ef4808bbde GL/Program: Add program binary interface 2020-04-04 00:11:04 +10:00
Connor McLaughlin
256cb8a82c GL/Program: Make moveable 2020-04-04 00:11:00 +10:00
Connor McLaughlin
7f5c6f8b4f GPU/HW: Move some flush checks to command time 2020-04-04 00:10:55 +10:00
Connor McLaughlin
5302f83818 GPU: Clamp coordinates to 11 bits after applying drawing offset
Fixes flickering in some scenes (e.g. Galbadia Missile Base).
2020-04-04 00:10:45 +10:00
Connor McLaughlin
48fba47ee6 GPU: Implement skip-drawing-to-active-field for interlaced mode
Currently only in the software renderer.
2020-04-04 00:10:41 +10:00
Connor McLaughlin
5b6027e6bb Add common-tests and rectangle class tests 2020-04-03 01:32:27 +10:00
Connor McLaughlin
643e429ad2
Merge pull request #211 from ggdrt/patch-0
GPU: Fix "Draw To Display Area" debug reporting
2020-04-02 11:41:09 +10:00
Connor McLaughlin
2a6e04988f GPU/HW: Simplify 24-bit scanout and interlacing shader
Has the added bonus of being faster (no downscale copy) and fixes the
edge case where the image is cropped in VRAM.
2020-04-02 00:17:25 +10:00
Connor McLaughlin
1d948a53e0 SPU: Reinitialize transfer event on loading state 2020-04-02 00:17:15 +10:00
Albert Liu
b27e030059 GPU: Fix "Draw To Display Area" debug reporting 2020-04-01 06:10:31 -07:00
Connor McLaughlin
3daa6b469a Build: Explicitly disable spectre mitigations
Mitigations-off gave a roughly 20-25% boost in performance on my laptop
(i7-7700HQ), even with the recompiler.

It seems AppVeyor was building with them enabled. You shouldn't treat an
emulator like a sandbox and run untrusted code in it amyway.
2020-04-01 22:30:19 +10:00
Connor McLaughlin
31581763a3 GPU: Correct starting position for polyline terminator search
Fixes broken visuals in Wild Arms, probably others.
2020-04-01 20:24:57 +10:00
Connor McLaughlin
0eb740a0aa Qt: Add CDROM Enable Region Check option 2020-04-01 14:50:27 +10:00
Connor McLaughlin
9933910312 SDL: Add CDROM Enable Region Check option 2020-04-01 14:50:21 +10:00
Connor McLaughlin
15c33ebedb CDROM: Add "Enable Region Check" option 2020-04-01 01:48:37 +10:00
Connor McLaughlin
e36e70a266 CDROM: Drop sector buffer not read back to dev log level
This happens a lot in games and it's perfectly fine, but sometimes it
can mean the game is wedged and not receiving data.
2020-03-31 22:29:03 +10:00
Connor McLaughlin
f6711cbafa CDROM: Pausing while seeking should be an error response
Confirmed by hardware test.
2020-03-31 22:28:55 +10:00
Connor McLaughlin
00c24c2501 CDROM: Adjust ACK timings to be closer to hardware test results
Fixes Shrek Treasure Hunt.
2020-03-31 22:28:48 +10:00
Connor McLaughlin
8439e1c54e GPU: Adjust visible ticks/lines, fix underflow in height 2020-03-31 22:28:37 +10:00
Connor McLaughlin
6bc91f2157 GPU: Polyline must have at least two vertices
Fixes GPU stream corruption in Lifeforce Tenka.
2020-03-30 13:58:39 +10:00
Connor McLaughlin
eaf13a1461 GPU: Fix flipped MSB/LSB for single pixel reads 2020-03-30 00:41:31 +10:00
Connor McLaughlin
f13cfce34d GPU: Fix incorrect polyline terminator check
Fixes Gran Turismo 2, maybe others.
2020-03-30 00:35:39 +10:00
Connor McLaughlin
a9109c7552 System: Don't insert blank memory card if path unspecified 2020-03-30 00:14:15 +10:00
Connor McLaughlin
3f042cd477 CDROM: Fix play command with parameter forever seeking
Fixes audio playback when selecting track in BIOS CD player.
2020-03-30 00:13:46 +10:00
Connor McLaughlin
3a31282fe6 CDROM: GetTN should return first_track, last_track
Fixes CDDA playback in Street Sk8er, Jellyfish - The Healing Friend,
probably others.
2020-03-30 00:13:42 +10:00
Connor McLaughlin
7ecac6dbcf CDImage: Use track's control instead of last track's control for pregap 2020-03-30 00:13:26 +10:00
Connor McLaughlin
02f67a801e CDROM: Fix behavior of stat bit 5 according to hardware tests 2020-03-29 17:52:37 +10:00
Connor McLaughlin
deb2865606 CDROM: Preserve header valid bit on more commands
Fixes Goryuujin Electro hanging on boot.
2020-03-29 01:16:01 +10:00
Connor McLaughlin
0e0bd2852f CDROM: Trigger INT5 on shell open
This behaviour has been verified on console.

Fixes disc swap detection in "Arc the Lad III"
2020-03-29 01:15:04 +10:00
Connor McLaughlin
2292292956 CDROM: Set mode to read raw sectors after reset
Fixes "This is Football 2", possibly others.
2020-03-29 01:14:58 +10:00
Connor McLaughlin
148279e2f2 GPU: Rewrite CRTC display modeling and overscan handling 2020-03-29 01:14:37 +10:00
Connor McLaughlin
fe824d6c89 GPU: Display VRAM with 1:1 pixel ratio rather than scaling 2020-03-29 01:14:33 +10:00
Connor McLaughlin
21ddfacd40 Settings: Add missing crop mode save 2020-03-29 01:13:53 +10:00
Connor McLaughlin
e6d5a9d3e4 GPU: Add missing blitter ticks reset to SoftReset() 2020-03-29 01:13:40 +10:00
Connor McLaughlin
10197506c5 CDROM: Implement 8-sector buffering behavior 2020-03-29 01:13:25 +10:00
Connor McLaughlin
a988384423 Common/HeapArray: Fix move construction/assignment 2020-03-29 01:13:14 +10:00
Connor McLaughlin
46239e6758 GPU: Fix GP0(1Fh) locking up emulator 2020-03-29 01:12:54 +10:00
Connor McLaughlin
5dbdc0b60c DMA: Remove timing events
We'll probably need to revert/re-add a variant of this when we
eventually implement chopping. But for now it simplifies things.
2020-03-29 01:12:44 +10:00
Connor McLaughlin
423f04325f SPU: Implement timing for RAM reads/writes 2020-03-29 01:12:37 +10:00
Connor McLaughlin
20025b2ffd Qt: Hide mouse cursor in fullscreen mode
Fixes #135.
2020-03-29 01:12:27 +10:00