Merge branch 'PCSX2:master' into master

This commit is contained in:
987123879113 2022-06-26 02:09:35 +09:00 committed by GitHub
commit ab0ee8cbab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
44 changed files with 582 additions and 274 deletions

View File

@ -35,8 +35,8 @@ mkdir -p squashfs-root/usr/lib/
mkdir -p squashfs-root/usr/optional/libstdc++
mkdir -p squashfs-root/usr/optional/libgcc_s
cp ./.github/workflows/scripts/linux/AppRun "$GITHUB_WORKSPACE"/squashfs-root/AppRun
curl -sSfL "https://github.com/darealshinji/AppImageKit-checkrt/releases/download/continuous/AppRun-patched-$APPARCH" -o "$GITHUB_WORKSPACE"/squashfs-root/AppRun-patched
curl -sSfL "https://github.com/darealshinji/AppImageKit-checkrt/releases/download/continuous/exec-$APPARCH.so" -o "$GITHUB_WORKSPACE"/squashfs-root/usr/optional/exec.so
curl -sSfL "https://github.com/PCSX2/appimage-checkrt-branch/releases/download/AppImage-checkrt/AppRun_patched" -o "$GITHUB_WORKSPACE"/squashfs-root/AppRun-patched
curl -sSfL "https://github.com/PCSX2/appimage-checkrt-branch/releases/download/AppImage-checkrt/exec.so" -o "$GITHUB_WORKSPACE"/squashfs-root/usr/optional/exec.so
chmod a+x ./squashfs-root/AppRun
chmod a+x ./squashfs-root/runtime
chmod a+x ./squashfs-root/AppRun-patched

View File

@ -19,26 +19,27 @@ Installers and binaries for both stable and development builds are available fro
### Minimum
| Operating System | CPU | GPU | RAM |
| ---------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- |
| - Windows 8.1 or newer (64 bit) <br/> - Ubuntu 18.04/Debian or newer, Arch Linux, or other distro (64 bit) | - Supports SSE4.1 <br/> - [PassMark Single Thread Performance](https://www.cpubenchmark.net/singleThread.html) rating near or greater than 1600 <br/> - Two physical cores, with hyperthreading | - Direct3D10 support <br/> - OpenGL 3.x support <br/> - [PassMark G3D Mark](https://www.videocardbenchmark.net/high_end_gpus.html) rating around 3000 (GeForce GTX 750) <br/> - 2 GB Video Memory | 4 GB |
| Operating System | CPU | GPU | RAM |
| ------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- |
| - Windows 8.1 or newer (64-bit) <br/> - Ubuntu 18.04/Debian or newer, Arch Linux, or other distro (64-bit) <br/> - macOS 10.13 | - Supports SSE4.1 <br/> - [PassMark Single Thread Performance](https://www.cpubenchmark.net/singleThread.html) rating near or greater than 1600 <br/> - Two physical cores, with hyperthreading | - Direct3D10 support <br/> - OpenGL 3.x support <br/> - Vulkan 1.1 support <br/> - Metal support <br/> - [PassMark G3D Mark](https://www.videocardbenchmark.net/high_end_gpus.html) rating around 3000 (GeForce GTX 750) <br/> - 2 GB Video Memory | 4 GB |
_Note: Recommended Single Thread Performance is based on moderately complex games. Games that pushed the PS2 hardware to its limits will struggle on CPUs at this level. Some release titles and 2D games which underutilized the PS2 hardware may run on CPUs rated as low as 1200. A quick reference for CPU **intensive games**: [Wiki](https://wiki.pcsx2.net/Category:CPU_intensive_games), [Forum](https://forums.pcsx2.net/Thread-LIST-The-Most-CPU-Intensive-Games) and CPU **light** games: [Forum](https://forums.pcsx2.net/Thread-LIST-Games-that-don-t-need-a-strong-CPU-to-emulate)_
### Recommended
| Operating System | CPU | GPU | RAM |
| ------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- |
| - Windows 10 (64 bit) <br/> - Ubuntu 19.04/Debian or newer, Arch Linux, or other distro (64 bit) | - Supports AVX2 <br/> - [PassMark Single Thread Performance](https://www.cpubenchmark.net/singleThread.html) rating near or greater than 2100 <br/> - Four physical cores, with or without hyperthreading | - Direct3D11 support <br/> - OpenGL 4.6 support <br/> - [PassMark G3D Mark](https://www.videocardbenchmark.net/high_end_gpus.html) rating around 6000 (GeForce GTX 1050 Ti) <br/> - 4 GB Video Memory | 8 GB |
| Operating System | CPU | GPU | RAM |
| ----------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- |
| - Windows 10 (64-bit) or newer <br/> - Ubuntu 19.04/Debian or newer, Arch Linux, or other distro (64-bit) <br/> - macOS 10.13 | - Supports AVX2 <br/> - [PassMark Single Thread Performance](https://www.cpubenchmark.net/singleThread.html) rating near or greater than 2100 <br/> - Four physical cores, with or without hyperthreading | - Direct3D12 support <br/> - OpenGL 4.6 support <br/> - Vulkan 1.3 support <br/> - Metal support <br/> - [PassMark G3D Mark](https://www.videocardbenchmark.net/high_end_gpus.html) rating around 6000 (GeForce GTX 1050 Ti) <br/> - 4 GB Video Memory | 8 GB |
_Note: Recommended GPU is based on 3x Internal, ~1080p resolution requirements. Higher resolutions will require stronger cards; 6x Internal, ~4K resolution will require a [PassMark G3D Mark](https://www.videocardbenchmark.net/high_end_gpus.html) rating around 12000 (GeForce GTX 1070 Ti). Just like CPU requirements, this is also highly game dependent. A quick reference for GPU **intensive games**: [Wiki](https://wiki.pcsx2.net/Category:GPU_intensive_games)_
### Technical Notes
- You need the [Visual C++ 2019 x86 Redistributables](https://support.microsoft.com/en-us/help/2977003/) to run PCSX2.
- You need the [Visual C++ 2019 x64 Redistributables](https://support.microsoft.com/en-us/help/2977003/) to run PCSX2.
- Windows XP and Direct3D9 support was dropped after stable release 1.4.0.
- Windows 7 and Windows 8.0 support was dropped after stable release 1.6.0.
- 32 bit support was dropped after stable release 1.6.0.
- 32-bit support was dropped after stable release 1.6.0.
- The Qt version is only supported on Windows 10 or newer.
- Make sure to update your operating system and drivers to ensure you have the best experience possible. Having a newer GPU is also recommended so you have the latest supported drivers.
- Because of copyright issues, and the complexity of trying to work around it, you need a BIOS dump extracted from a legitimately-owned PS2 console to use the emulator. For more information about the BIOS and how to get it from your console, visit [this page](pcsx2/Docs/PCSX2_FAQ.md#question-13-where-do-i-get-a-ps2-bios).
- PCSX2 uses two CPU cores for emulation by default. A third core can be used via the MTVU speed hack, which is compatible with most games. This can be a significant speedup on CPUs with 3+ cores, but it may be a slowdown on GS-limited games (or on CPUs with fewer than 2 cores). Software renderers will then additionally use however many rendering threads it is set to and will need higher core counts to run efficiently.

View File

@ -2623,7 +2623,7 @@ SCES-50293:
name: "ATV Off-Road"
region: "PAL-M5"
SCES-50294:
name: "Gran Turismo 3 A-Spec"
name: "Gran Turismo 3 - A-Spec"
region: "PAL-M5"
compat: 5
SCES-50295:
@ -4436,9 +4436,21 @@ SCES-82035:
memcardFilters:
- "SLES-82034"
- "SCES-82034"
SCKA-10001:
name: "Gangcheol Gigap Sadan - Online Battlefield"
region: "NTSC-K"
SCKA-10005:
name: "EyeToy - Edukids"
region: "NTSC-K"
SCKA-10006:
name: "Come on Baby"
region: "NTSC-K"
SCKA-10007:
name: "EyeToy - Tales"
region: "NTSC-K"
SCKA-20003:
name: "War of the Monsters - Kaijuu Daigekisen"
region: "NTSC-K"
SCKA-20004:
name: "Sly Cooper and the Thievius Raccoonus"
region: "NTSC-K"
@ -4501,6 +4513,9 @@ SCKA-20016:
vuClampMode: 2 # Respawn issues, Fixes SPS, avoids teleporting characters.
gsHWFixes:
alignSprite: 1 # Fixes vertical lines.
SCKA-20017:
name: "EyeToy - Play"
region: "NTSC-K"
SCKA-20018:
name: "Getaway, The"
region: "NTSC-K"
@ -4529,6 +4544,9 @@ SCKA-20023:
name: "Fatal Frame II"
region: "NTSC-K"
compat: 5
SCKA-20024:
name: "EyeToy - Groove"
region: "NTSC-K"
SCKA-20025:
name: "Katamari Damacy"
region: "NTSC-K"
@ -4590,6 +4608,9 @@ SCKA-20035:
gsHWFixes:
mipmap: 1
trilinearFiltering: 1
SCKA-20036:
name: "EyeToy - Monkey Mania"
region: "NTSC-K"
SCKA-20037:
name: "Ratchet & Clank 3"
region: "NTSC-K"
@ -4618,6 +4639,9 @@ SCKA-20040:
textureInsideRT: 1
autoFlush: 1
preloadFrameData: 1 # Fixes Sony splash at boot.
SCKA-20041:
name: "EyeToy - Play 2"
region: "NTSC-K"
SCKA-20043:
name: "Magna Carta"
region: "NTSC-K"
@ -4684,6 +4708,9 @@ SCKA-20055:
SCKA-20056:
name: "LuluRara - Powered by Zillerner [with USB microphone]"
region: "NTSC-K"
SCKA-20057:
name: "Minna no Golf 4 - Everybody's Golf"
region: "NTSC-K"
SCKA-20058:
name: "Bumpy Trot"
region: "NTSC-K"
@ -4740,6 +4767,15 @@ SCKA-20065:
- EETimingHack # Mitigates bounciness of vertical shaking but better fix with EE cyclerate +1.
gsHWFixes:
alignSprite: 1 # Fixes vertical lines.
SCKA-20066:
name: "EyeToy - Play 3"
region: "NTSC-K"
SCKA-20067:
name: "Stuart Little 3 - Big Photo Adventure"
region: "NTSC-K"
SCKA-20068:
name: "Disney-Pixar's Cars"
region: "NTSC-K"
SCKA-20069:
name: "Siren 2"
region: "NTSC-K"
@ -4827,11 +4863,22 @@ SCKA-20092:
MTVUSpeedHack: 0
gameFixes:
- XGKickHack # Fixes grey fighters problem.
SCKA-20093:
name: "Ratatouille"
region: "NTSC-K"
roundModes:
vuRoundMode: 2 # Fixes very minor lines appearing at certain points during the game.
gsHWFixes:
halfPixelOffset: 2 # Reduces blooming misalignment.
wildArmsHack: 1 # Reduces blooming misalignment.
SCKA-20096:
name: "Barnyard"
region: "NTSC-K"
gsHWFixes:
mipmap: 1
SCKA-20098:
name: "Spongebob Squarepants - Creature from the Krusty Krab"
region: "NTSC-K"
SCKA-20099:
name: "Persona 3"
region: "NTSC-K"
@ -6365,6 +6412,9 @@ SCPS-56003:
roundSprite: 1 # Fix line in the sky.
mipmap: 1
textureInsideRT: 1
SCPS-56004:
name: "Otostaz"
region: "NTSC-K"
SCPS-56005:
name: "Gran Turismo Concept 2002 Tokyo-Seoul"
region: "NTSC-K"
@ -6381,6 +6431,9 @@ SCPS-56008:
gsHWFixes:
halfPixelOffset: 2 # Reduces blurriness.
disablePartialInvalidation: 1 # Fixes ghost rendering.
SCPS-56009:
name: "Smash Court Pro Tournament"
region: "NTSC-K"
SCPS-56011:
name: "U - Underwater Unit"
region: "NTSC-K"
@ -9534,6 +9587,8 @@ SLES-50396:
compat: 4
gameFixes:
- VUSyncHack # Fixes SPS.
gsHWFixes:
alignSprite: 1 # Fixes vertical lines.
SLES-50397:
name: "Prisoner of War"
region: "PAL-M5"
@ -21237,15 +21292,18 @@ SLES-82053:
halfPixelOffset: 2 # Fixes blurriness.
memcardFilters:
- "SLES-82048"
SLKA-15002:
name: "Space Raiders"
region: "NTSC-K"
SLKA-15003:
name: "Shikigami no Shiro II"
region: "NTSC-K"
SLKA-15004:
name: "Gunbird - Premium Package"
region: "NTSC-J"
region: "NTSC-K"
SLKA-15005:
name: "Strikers 1945 I-II"
region: "NTSC-J"
region: "NTSC-K"
compat: 5
gameFixes:
- EETimingHack # Fixes part II intro screen.
@ -21260,16 +21318,53 @@ SLKA-15008:
region: "NTSC-K"
gsHWFixes:
roundSprite: 2 # Fixes sprite ghosting.
SLKA-15009:
name: "Hudson Selection Vol. 4 - Takahashi Meijin no Bouken Jima"
region: "NTSC-K"
SLKA-15013:
name: "Grand Slam 2003 Tennis" # Hard Hitter 2
region: "NTSC-K"
SLKA-15018:
name: "Kidou Senshi Gundam Seed"
region: "NTSC-K"
roundModes:
eeRoundMode: 1 # Fixes camera issue.
gameFixes:
- FpuNegDivHack # Fixes target loss issue.
SLKA-15021:
name: "GrowLanser3"
region: "NTSC-K"
compat: 5
gameFixes:
- OPHFlagHack
SLKA-15028:
name: "Simple 2000 Series Ultimate Vol. 6 - Love - Upper!"
region: "NTSC-K"
SLKA-15029:
name: "Simple 2000 Series Vol. 37 - The Shooting - Double Shienryu"
region: "NTSC-K"
SLKA-15030:
name: "Simple 2000 Series Vol. 5 - The Block Kuzushi Hyper"
region: "NTSC-K"
SLKA-15032:
name: "Gradius V"
region: "NTSC-K"
compat: 5
SLKA-15033:
name: "Princess Maker 2"
region: "NTSC-K"
SLKA-15044:
name: "Super Puzzle Bobble 2"
region: "NTSC-K"
SLKA-25006:
name: "Twin Caliber"
region: "NTSC-K"
SLKA-25009:
name: "Kengo 2"
region: "NTSC-K"
SLKA-25010:
name: "Mystic Heroes"
region: "NTSC-K"
SLKA-25012:
name: "Devil May Cry 2 Dante"
region: "NTSC-K"
@ -21286,6 +21381,9 @@ SLKA-25014:
SLKA-25015:
name: "Evolution Skateboarding"
region: "NTSC-K"
SLKA-25018:
name: "Sphinx and the Cursed Mummy"
region: "NTSC-K"
SLKA-25021:
name: "Shinobi"
region: "NTSC-M3"
@ -21302,6 +21400,9 @@ SLKA-25026:
textureInsideRT: 1 # Fixes rainbow shadow of legions.
alignSprite: 1 # Fixes green vertical lines.
roundSprite: 2 # Fixes vertical lines and some font artifacts but not completely fixed.
SLKA-25027:
name: "NBA Street Vol. 2"
region: "NTSC-K"
SLKA-25029:
name: "MVP Baseball 2003"
region: "NTSC-K"
@ -21310,6 +21411,9 @@ SLKA-25029:
SLKA-25030:
name: "WWE SmackDown! Shut Your Mouth"
region: "NTSC-K"
SLKA-25031:
name: "Tom Clancy's Ghost Recon"
region: "NTSC-K"
SLKA-25032:
name: "Enter the Matrix"
region: "NTSC-K"
@ -21319,6 +21423,9 @@ SLKA-25033:
name: "Gregory Horror Show"
region: "NTSC-K"
compat: 1
SLKA-25034:
name: "Real Bass Fishing - Top Angler"
region: "NTSC-K"
SLKA-25035:
name: "Mobile Suit Gundam - Lost War Chronicles"
region: "NTSC-K"
@ -21363,16 +21470,30 @@ SLKA-25048:
SLKA-25049:
name: "Metal Slug 3"
region: "NTSC-K"
SLKA-25050:
name: "Shin Sangoku Musou 3"
region: "NTSC-K"
SLKA-25051:
name: "Clock Tower 3"
region: "NTSC-K"
compat: 5
SLKA-25052:
name: "Finding nemo"
region: "NTSC-K"
gsHWFixes:
alignSprite: 1 # Fixes vertical lines.
SLKA-25055:
name: "Hitman - Silent Assasin"
region: "NTSC-K"
SLKA-25056:
name: "Air Ranger 2 - Rescue Helicopter"
region: "NTSC-K"
SLKA-25060:
name: "I.Q. Remix+ - Intelligent Qube"
region: "NTSC-K"
SLKA-25061:
name: "Tom Clancy's Splinter Cell"
region: "NTSC-K"
SLKA-25062:
name: "Dragon Ball Z 2"
region: "NTSC-K"
@ -21384,6 +21505,13 @@ SLKA-25064:
name: "Tenchu 3 Wrath of Heaven"
region: "NTSC-K"
compat: 5
SLKA-25065:
name: "Silent Hill 3"
region: "NTSC-K"
clampModes:
vuClampMode: 2 # Fixes some lighting/shadow artefacts (most light sources like the Flashlight are unaffected).
gameFixes:
- SoftwareRendererFMVHack # Fixes blackscreen when FMV.
SLKA-25066:
name: "Zone of the Enders - The 2nd Runner SE"
region: "NTSC-K"
@ -21398,6 +21526,14 @@ SLKA-25071:
name: "Tantei Jinguji Saburo 8 Innocent Black"
region: "NTSC-K"
compat: 5
SLKA-25073:
name: "Tomb Raider - The Angel of Darkness"
region: "NTSC-K"
gameFixes:
- SoftwareRendererFMVHack # Fixes garbage pixels.
SLKA-25076:
name: "Shin Megami Tensei 3"
region: "NTSC-K"
SLKA-25077:
name: "Culdcept II - Expansion"
region: "NTSC-K"
@ -21405,6 +21541,9 @@ SLKA-25078:
name: "Rayman 3 - Hoodlum Havoc"
region: "NTSC-K"
compat: 5
SLKA-25080:
name: "dot hack - Infection"
region: "NTSC-K"
SLKA-25081:
name: "SD Gundam G Generation Neo"
region: "NTSC-K"
@ -21422,12 +21561,18 @@ SLKA-25084:
alignSprite: 1 # Fixes vertical lines.
wildArmsHack: 1 # Improves visual clarity whilst upscaling.
roundSprite: 1 # Reduces graphics garbage on UI whilst upscaling.
SLKA-25085:
name: "Shin Sangoku Musou 3 - Mushouden"
region: "NTSC-K"
SLKA-25087:
name: "FIFA Soccer 2004"
region: "NTSC-J"
compat: 5
clampModes:
vuClampMode: 2 # Missing geometry with microVU.
SLKA-25090:
name: "Starsky & Hutch"
region: "NTSC-K"
SLKA-25091:
name: "Hanjuku Hero vs. 3D"
region: "NTSC-K"
@ -21449,6 +21594,9 @@ SLKA-25093:
halfPixelOffset: 2 # Fixes ghosting.
roundSprite: 2 # Fixes various lines / reduces bars on right edge.
disablePartialInvalidation: 1 # Fixes textureless graphics ingame.
SLKA-25098:
name: "Lord of the Rings, The - The Return of the King"
region: "NTSC-K"
SLKA-25100:
name: "Dragon Quest V Dragon Quarter"
region: "NTSC-K"
@ -21456,6 +21604,18 @@ SLKA-25100:
SLKA-25103:
name: "Neon Genesis Evangelion 2"
region: "NTSC-K"
SLKA-25105:
name: "XII Stag"
region: "NTSC-K"
SLKA-25108:
name: "Eve Burst Error Plus"
region: "NTSC-K"
SLKA-25109:
name: "Shirachuu Tankenbu"
region: "NTSC-K"
SLKA-25111:
name: "King of Fighters 2001, The"
region: "NTSC-K"
SLKA-25112:
name: "King of Fighters 2001, The"
region: "NTSC-K"
@ -21467,9 +21627,33 @@ SLKA-25115:
eeClampMode: 3 # For camera issues in some scenes.
gsHWFixes:
disablePartialInvalidation: 1 # Fixes black screens.
SLKA-25117:
name: "World Soccer Winning Eleven 7 International"
region: "NTSC-K"
SLKA-25118:
name: "SSX 3"
region: "NTSC-K"
gsHWFixes:
textureInsideRT: 1 # Fixes rainbow effect in the pause menu before a jump.
halfPixelOffset: 2 # Fixes depth lines.
SLKA-25120:
name: "Prince of Persia - The Sands of Time"
region: "NTSC-K"
gsHWFixes:
autoFlush: 1 # Reduces post-processing misalignment.
roundSprite: 2 # Reduces post-processing misalignment.
SLKA-25122:
name: "Sonic Heroes"
region: "NTSC-K"
SLKA-25123:
name: "Taishou Mononoke Ibunroku"
region: "NTSC-K"
SLKA-25125:
name: "SNK vs. Capcom - Chaos"
region: "NTSC-K"
SLKA-25128:
name: "Sangokushi IX"
region: "NTSC-K"
SLKA-25130:
name: "Bloody Roar 4"
region: "NTSC-K"
@ -21490,9 +21674,27 @@ SLKA-25135:
name: "Kunoichi"
region: "NTSC-K"
compat: 5
SLKA-25136:
name: "Need for Speed - Underground"
region: "NTSC-K"
gameFixes:
- EETimingHack # Fixes broken textures.
gsHWFixes:
halfPixelOffset: 2 # Fixes misaligned post-processing.
SLKA-25137:
name: "Sims, The - Bustin' Out"
region: "NTSC-K"
gsHWFixes:
halfPixelOffset: 1 # Fixes vertical lines, font and others.
SLKA-25138:
name: "dot hack - Mutation"
region: "NTSC-K"
SLKA-25139:
name: "Fu-un Shinsengumi"
region: "NTSC-K"
SLKA-25140:
name: "Medal of Honor - Rising Sun"
region: "NTSC-K"
SLKA-25144:
name: "Final Fantasy X-2"
region: "NTSC-K"
@ -21501,6 +21703,12 @@ SLKA-25144:
- SoftwareRendererFMVHack # Fixes brightness and overlapping subtitles.
gsHWFixes:
roundSprite: 1 # Fixes font artifacts.
SLKA-25145:
name: "dot hack - Outbreak"
region: "NTSC-K"
SLKA-25146:
name: "Kaido Battle 2 - Chain Reaction"
region: "NTSC-K"
SLKA-25149:
name: "Silent Hill 4 The Room"
region: "NTSC-K"
@ -21526,6 +21734,9 @@ SLKA-25160:
region: "NTSC-K"
roundModes:
eeRoundMode: 0 # Ladder glitch in "Assembly of Nihilo B11" level.
SLKA-25161:
name: "Aqua Kids"
region: "NTSC-K"
SLKA-25165:
name: "Mobile Suit Gundam - Seed Destiny - Rengou vs. Z.A.F.T. II Plus"
region: "NTSC-K"
@ -21539,6 +21750,9 @@ SLKA-25166:
SLKA-25167:
name: "King of Fighters XI, The"
region: "NTSC-K"
SLKA-25168:
name: "WWE SmackDown! vs. RAW 2007"
region: "NTSC-K"
SLKA-25170:
name: "SD Gundam G Generation Seed"
region: "NTSC-K"
@ -21561,9 +21775,18 @@ SLKA-25172:
mipmap: 1
cpuFramebufferConversion: 1 # Fixes right side of the screen from garbage textures.
halfPixelOffset: 2 # Aligns mirror reflections, removes some bloom-related ghosting.
SLKA-25174:
name: "dot hack - Quarantine"
region: "NTSC-K"
SLKA-25175:
name: "Transformers"
region: "NTSC-K"
SLKA-25176:
name: "Pump It Up - Exceed"
region: "NTSC-K"
SLKA-25180:
name: "Tom Clancy's Splinter Cell - Pandora Tomorrow"
region: "NTSC-K"
SLKA-25181:
name: "Energy Airforce Aim Strike"
region: "NTSC-K"
@ -21576,6 +21799,16 @@ SLKA-25183:
SLKA-25186:
name: "King of Fighters, The - Maximum Impact [Limited Edition]"
region: "NTSC-K"
SLKA-25187:
name: "Shin Sangoku Musou 3 - Empires"
region: "NTSC-K"
SLKA-25196:
name: "DRIV3R"
region: "NTSC-K"
gameFixes:
- BlitInternalFPSHack # Fixes internal FPS detection.
gsHWFixes:
autoFlush: 1
SLKA-25198:
name: "Tenchu Kurenai"
region: "NTSC-K"
@ -21630,6 +21863,9 @@ SLKA-25209:
- GIFFIFOHack # Partially fixes graphical issues also needs EE cycle rate + 3.
gsHWFixes:
mipmap: 1
SLKA-25211:
name: "King of Fighters, The - Maximum Impact"
region: "NTSC-K"
SLKA-25213:
name: "Berserk"
region: "NTSC-K"
@ -21694,12 +21930,23 @@ SLKA-25232:
SLKA-25233:
name: "Sonic - Mega Collection Plus"
region: "NTSC-K"
SLKA-25237:
name: "Lord of the Rings, The - The Third Age"
region: "NTSC-K"
SLKA-25241:
name: "Need for Speed - Underground 2"
region: "NTSC-K"
gsHWFixes:
halfPixelOffset: 1 # Fixes misaligned post-processing.
SLKA-25243:
name: "Medal of Honor - European Assault"
region: "NTSC-K"
SLKA-25244:
name: "WWE SmackDown! vs. Raw"
region: "NTSC-K"
SLKA-25245:
name: "Spongebob SquarePants - Movin' With Friends"
region: "NTSC-K"
SLKA-25246:
name: "Bard's Tale, The"
region: "NTSC-K"
@ -21834,6 +22081,18 @@ SLKA-25301:
memcardFilters:
- "SLKA-25301"
- "SLKA-25300"
SLKA-25303:
name: "Matrix, The - Path of Neo"
region: "NTSC-K"
gsHWFixes:
halfPixelOffset: 2 # Fix effects upscaling.
SLKA-25304:
name: "Burnout Revenge"
region: "NTSC-K"
clampModes:
vuClampMode: 0 # Fixes buggy lighting on certain objects.
gsHWFixes:
halfPixelOffset: 2 # Fixes depth lines.
SLKA-25307:
name: "Dragon Ball Z Sparking"
region: "NTSC-K"
@ -21856,9 +22115,18 @@ SLKA-25314:
eeRoundMode: 1 # Fixes camera issue.
gameFixes:
- FpuNegDivHack # Fixes target loss issue.
SLKA-25315:
name: "NBA Live 06"
region: "NTSC-K"
SLKA-25317:
name: "Shin Sangoku Musou 3 [PlayStation 2 - Big Hit Series]"
region: "NTSC-K"
SLKA-25318:
name: "WWE SmackDown! vs. RAW 2006"
region: "NTSC-K"
SLKA-25319:
name: "Spongebob SquarePants - Lights, Camera, PANTS"
region: "NTSC-K"
SLKA-25320:
name: "Ikusa Gami"
region: "NTSC-K"
@ -21873,7 +22141,10 @@ SLKA-25322:
region: "NTSC-K"
SLKA-25323:
name: "SSX On Tour"
region: "NTSC-J-K"
region: "NTSC-J"
SLKA-25325:
name: "SSX On Tour"
region: "NTSC-K"
SLKA-25328:
name: "Castlevania - Curse of Darkness"
region: "NTSC-K"
@ -21890,9 +22161,17 @@ SLKA-25329:
SLKA-25331:
name: "Marc Ecko's Getting Up - Contents Under Pressure"
region: "NTSC-K"
SLKA-25332:
name: "Marc Ecko's Getting Up - Contents Under Pressure"
region: "NTSC-K"
SLKA-25333:
name: "Metal Slug Complete"
region: "NTSC-K"
SLKA-25334:
name: "Need for Speed - Most Wanted"
region: "NTSC-K"
gsHWFixes:
halfPixelOffset: 2 # Fixes blurriness.
SLKA-25335:
name: "Shadow the Hedgehog"
region: "NTSC-K"
@ -21904,6 +22183,12 @@ SLKA-25341:
SLKA-25342:
name: "Ryu ga Gotoku"
region: "NTSC-K"
SLKA-25346:
name: "Prince of Persia - The Two Thrones"
region: "NTSC-K"
gsHWFixes:
autoFlush: 1 # Reduces post-processing misalignment.
halfPixelOffset: 1 # Reduces post-processing misalignment.
SLKA-25351:
name: "One Piece Pirates Carnival"
region: "NTSC-K"
@ -21934,6 +22219,11 @@ SLKA-25359:
SLKA-25361:
name: "Keroro Gunsou MeroMero Battle Royale Z"
region: "NTSC-K"
SLKA-25363:
name: "Guitar Hero III - Legends of Rock"
region: "NTSC-K"
roundModes:
vuRoundMode: 0 # Crashes without.
SLKA-25364:
name: "Mobile Suit Gundam - Climax U.C."
region: "NTSC-K"
@ -21954,6 +22244,9 @@ SLKA-25374:
SLKA-25375:
name: "Transformers - The Game"
region: "NTSC-K"
SLKA-25378:
name: "FIFA world cup 2006"
region: "NTSC-K"
SLKA-25381:
name: "Winning Eleven 10"
region: "NTSC-K"
@ -22336,6 +22629,18 @@ SLPM-55207:
SLPM-55208:
name: "Hakuouki - Zuisouroku"
region: "NTSC-J"
SLPM-55209:
name: "World Soccer Winning Eleven 2010"
region: "NTSC-J"
SLPM-55210:
name: "Final Fantasy XII International Zodiac Job System [Ultimate Hits]"
region: "NTSC-J"
SLPM-55211:
name: "Pachislot Higurashi no Naku Koro ni Matsuri"
region: "NTSC-J"
SLPM-55212:
name: "Jigoku Shoujo Mioyosuga [Limited Edition]"
region: "NTSC-J"
SLPM-55221:
name: "beatmania IIDX 16 EMPRESS + PREMIUM BEST (EMPRESS DISC)"
region: "NTSC-J"
@ -23667,7 +23972,7 @@ SLPM-62418:
region: "NTSC-J"
compat: 5
SLPM-62422:
name: "Hudson Selection Vol.4 - Adventure Island (Takahashi Meijin no Bouken Jima)"
name: "Hudson Selection Vol.4 - Takahashi Meijin no Bouken Jima"
region: "NTSC-J"
compat: 5
SLPM-62423:
@ -24709,6 +25014,9 @@ SLPM-62780:
SLPM-62784:
name: "Kao no nai Tsuki Select Story"
region: "NTSC-J"
SLPM-64501:
name: "Shin Sangoku Musou"
region: "NTSC-K"
SLPM-64502:
name: "Winback"
region: "NTSC-J"
@ -24729,6 +25037,9 @@ SLPM-64513:
gsHWFixes:
preloadFrameData: 1 # Fixes random texture corruptions such as horizontal lines.
cpuFramebufferConversion: 1 # Fixes fog wall.
SLPM-64514:
name: "Legends of Wrestling"
region: "NTSC-K"
SLPM-64521:
name: "Raging Bless - Hangma Muksirok"
region: "NTSC-K"
@ -24754,6 +25065,17 @@ SLPM-64528:
gsHWFixes:
mipmap: 1
cpuFramebufferConversion: 1 # Fixes right side of the screen from garbage textures.
SLPM-64532:
name: "Digital Holmes"
region: "NTSC-K"
SLPM-64534:
name: "Psyvariar - Complete Edition"
region: "NTSC-K"
SLPM-64540:
name: "Sims, The"
region: "NTSC-K"
speedHacks:
MTVUSpeedHack: 0 # Fixes bad graphics due to bad T-Bit handling.
SLPM-64549:
name: "Shikigami no Shiro"
region: "NTSC-K"
@ -31488,6 +31810,14 @@ SLPM-67502:
compat: 5
gsHWFixes:
disablePartialInvalidation: 1 # Fixes corrupt textures.
SLPM-67503:
name: "FIFA 2002"
region: "NTSC-K"
SLPM-67504:
name: "SSX Tricky"
region: "NTSC-K"
roundModes:
eeRoundMode: 0 # Fixes riders vanish into the floor.
SLPM-67505:
name: "James Bond 007 - Agent Under Fire"
region: "NTSC-K"
@ -31504,6 +31834,9 @@ SLPM-67508:
roundModes:
eeRoundMode: 1
vuRoundMode: 3
SLPM-67512:
name: "FIFA World Cup 2002"
region: "NTSC-K"
SLPM-67513:
name: "Final Fantasy X International"
region: "NTSC-K"
@ -31522,6 +31855,15 @@ SLPM-67519:
region: "NTSC-K"
roundModes:
eeRoundMode: 0 # Fixes game hanging in the "Clark running away" ingame cutscene.
SLPM-67521:
name: "E.O.E. - Eve of Extinction"
region: "NTSC-K"
SLPM-67522:
name: "Sangokushi Senki"
region: "NTSC-K"
SLPM-67523:
name: "Shin Sangoku Musou 2"
region: "NTSC-K"
SLPM-67524:
name: "Armored Core 3"
region: "NTSC-K"
@ -31529,6 +31871,9 @@ SLPM-67524:
eeRoundMode: 0 # Fixes Z-Fighting.
gsHWFixes:
halfPixelOffset: 2 # Corrects positioning of reflections on suit's surfaces.
SLPM-67526:
name: "Ghost Vibration"
region: "NTSC-K"
SLPM-67527:
name: "Need for Speed - Hot Pursuit 2"
region: "NTSC-K"
@ -31565,15 +31910,24 @@ SLPM-67535:
SLPM-67536:
name: "Bongsin Yeonui 2"
region: "NTSC-K"
SLPM-67537:
name: "FIFA 2003"
region: "NTSC-K"
SLPM-67540:
name: "Auto Modellista"
region: "NTSC-K"
compat: 5
SLPM-67545:
name: "Project Minerva"
region: "NTSC-K"
SLPM-67546:
name: "Lord of the Rings - The Two Towers"
region: "NTSC-K"
clampModes:
vuClampMode: 3 # Fix white shiny weapons.
SLPM-67550:
name: "Shin Sangoku Musou 2 - Mushouden"
region: "NTSC-K"
SLPM-67552:
name: "Tomak - Save the Earth Again [Complete Edition]"
region: "NTSC-K"
@ -38261,6 +38615,8 @@ SLUS-20345:
compat: 4
gameFixes:
- VUSyncHack # Fixes SPS.
gsHWFixes:
alignSprite: 1 # Fixes vertical lines.
SLUS-20346:
name: "AirBlade"
region: "NTSC-U"

View File

@ -589,7 +589,7 @@ void cdvdReloadElfInfo(std::string elfoverride)
// Recognized and PS2 (BOOT2). Good job, user.
_reloadElfInfo(std::move(elfpath));
}
catch (Exception::FileNotFound& e)
catch ([[maybe_unused]] Exception::FileNotFound& e)
{
#ifdef PCSX2_CORE
Console.Error("Failed to load ELF info");
@ -859,12 +859,12 @@ static uint cdvdRotationalLatency(CDVD_MODE_TYPE mode)
static uint cdvdBlockReadTime(CDVD_MODE_TYPE mode)
{
int numSectors = 0;
int offset = 0;
// CAV Read speed is roughly 41% in the centre full speed on outer edge. I imagine it's more logarithmic than this
if (cdvd.SpindlCtrl & CDVD_SPINDLE_CAV)
{
int numSectors = 0;
int offset = 0;
// Sector counts are taken from google for Single layer, Dual layer DVD's and for 700MB CD's
switch (cdvd.Type)
{

View File

@ -97,19 +97,18 @@ int InputIsoFile::FinishRead3(u8* dst, uint mode)
if (m_current_lsn >= m_blocks)
return 0;
int _offset = 0;
int length = 0;
int ret = 0;
if (m_read_inprogress)
{
ret = m_reader->FinishRead();
const int ret = m_reader->FinishRead();
m_read_inprogress = false;
if (ret < 0)
return ret;
}
int _offset = 0;
int length = 0;
switch (mode)
{
case CDVD_MODE_2352:

View File

@ -72,7 +72,6 @@ void ThreadedFileReader::Loop()
if (m_quit)
return;
void* ptr;
u64 requestOffset;
u32 requestSize;
@ -81,7 +80,7 @@ void ThreadedFileReader::Loop()
for (;;)
{
ptr = m_requestPtr.load(std::memory_order_acquire);
void* ptr = m_requestPtr.load(std::memory_order_acquire);
requestOffset = m_requestOffset;
requestSize = m_requestSize;
lock.unlock();

View File

@ -128,7 +128,7 @@ bool VulkanHostDisplay::ChangeRenderWindow(const WindowInfo& new_wi)
void VulkanHostDisplay::ResizeRenderWindow(s32 new_window_width, s32 new_window_height, float new_window_scale)
{
if (m_swap_chain->GetWidth() == new_window_width && m_swap_chain->GetHeight() == new_window_height)
if (m_swap_chain->GetWidth() == static_cast<u32>(new_window_width) && m_swap_chain->GetHeight() == static_cast<u32>(new_window_height))
{
// skip unnecessary resizes
m_window_info.surface_scale = new_window_scale;

View File

@ -1772,8 +1772,6 @@ inline bool GSState::TestDrawChanged()
void GSState::FlushPrim()
{
const u32 new_prim = PRIM->U32[0];
if (m_index.tail > 0)
{
GL_REG("FlushPrim ctxt %d", PRIM->CTXT);

View File

@ -378,9 +378,9 @@ void GSDevice::Interlace(const GSVector2i& ds, int field, int mode, float yoffse
if (mode == 0 || mode == 2) // weave or blend
{
// weave first
const int offset = static_cast<int>(yoffset) * field;
const float offset = yoffset * static_cast<float>(field);
DoInterlace(m_merge, m_weavebob, field, false, GSConfig.DisableInterlaceOffset ? 0 : offset);
DoInterlace(m_merge, m_weavebob, field, false, GSConfig.DisableInterlaceOffset ? 0.0f : offset);
if (mode == 2)
{

View File

@ -172,6 +172,20 @@ bool GSRenderer::Merge(int field)
GSVector2i resolution(GetResolution());
bool scanmask_frame = m_scanmask_used && !display_offset;
const bool ignore_offset = !GSConfig.PCRTCOffsets;
const bool is_bob = GSConfig.InterlaceMode == GSInterlaceMode::BobTFF || GSConfig.InterlaceMode == GSInterlaceMode::BobBFF;
// Use offset for bob deinterlacing always, extra offset added later for FFMD mode.
float offset = is_bob ? (tex[1] ? tex[1]->GetScale().y : tex[0]->GetScale().y) : 0.0f;
int field2 = 0;
int mode = 2;
// FFMD (half frames) requires blend deinterlacing, so automatically use that. Same when SCANMSK is used but not blended in the merge circuit (Alpine Racer 3)
if (GSConfig.InterlaceMode != GSInterlaceMode::Automatic || (!m_regs->SMODE2.FFMD && !scanmask_frame))
{
field2 = ((static_cast<int>(GSConfig.InterlaceMode) - 1) & 1);
mode = ((static_cast<int>(GSConfig.InterlaceMode) - 1) >> 1);
}
for (int i = 0; i < 2; i++)
{
@ -292,6 +306,13 @@ bool GSRenderer::Merge(int field)
// src_out_rect is the resized rect for output. (Not really used)
src_out_rect[i] = (GSVector4(r) * scale) / GSVector4(tex[i]->GetSize()).xyxy();
if (m_regs->SMODE2.FFMD && !is_bob && !GSConfig.DisableInterlaceOffset && GSConfig.InterlaceMode != GSInterlaceMode::Off)
{
// Why 3/4? Mainly to line up the odd scanlines for the interlacing routine.
interlace_offset += ((tex[1] ? tex[1]->GetScale().y : tex[0]->GetScale().y) * 0.75f) * static_cast<float>(field ^ field2);
// We're handling the interlacing offset for upscaling in the merge circuit, rather than in the interlacing shader.
offset = 0.0f;
}
// Restore manually offset "interlace" lines
dst[i] += GSVector4(0.0f, interlace_offset, 0.0f, interlace_offset);
}
@ -330,9 +351,7 @@ bool GSRenderer::Merge(int field)
// When interlace(FRAME) mode, the rect is half height, so it needs to be stretched.
if (m_regs->SMODE2.INT && m_regs->SMODE2.FFMD)
{
ds.y *= 2;
}
m_real_size = ds;
@ -349,28 +368,8 @@ bool GSRenderer::Merge(int field)
g_gs_device->Merge(tex, src_gs_read, dst, fs, m_regs->PMODE, m_regs->EXTBUF, c);
// Use offset for bob deinterlacing, for normal deinterlacing we add an extra 1 since it's clearer, with bob that causes extra shake.
const bool is_bob = GSConfig.InterlaceMode == GSInterlaceMode::BobTFF || GSConfig.InterlaceMode == GSInterlaceMode::BobBFF;
const float offset = (!m_regs->SMODE2.FFMD && !is_bob) ? 0 : ((tex[1] ? tex[1]->GetScale().y : tex[0]->GetScale().y));
if (isReallyInterlaced() && GSConfig.InterlaceMode != GSInterlaceMode::Off)
{
// FFMD (half frames) requires blend deinterlacing, so automatically use that. Same when SCANMSK is used but not blended in the merge circuit (Alpine Racer 3)
if (GSConfig.InterlaceMode == GSInterlaceMode::Automatic && (m_regs->SMODE2.FFMD || scanmask_frame))
{
constexpr int field2 = 0;
constexpr int mode = 2;
g_gs_device->Interlace(ds, field ^ field2, mode, offset);
}
else
{
const int field2 = ((static_cast<int>(GSConfig.InterlaceMode) - 1) & 1);
const int mode = ((static_cast<int>(GSConfig.InterlaceMode) - 1) >> 1);
g_gs_device->Interlace(ds, field ^ field2, mode, offset);
}
}
g_gs_device->Interlace(ds, field ^ field2, mode, offset);
if (GSConfig.ShadeBoost)
{
@ -724,16 +723,17 @@ void GSRenderer::QueueSnapshot(const std::string& path, u32 gsdump_frames)
else
{
time_t cur_time = time(nullptr);
static time_t prev_snap;
// The variable 'n' is used for labelling the screenshots when multiple screenshots are taken in
// a single second, we'll start using this variable for naming when a second screenshot request is detected
// at the same time as the first one. Hence, we're initially setting this counter to 2 to imply that
// the captured image is the 2nd image captured at this specific time.
static int n = 2;
char local_time[16];
if (strftime(local_time, sizeof(local_time), "%Y%m%d%H%M%S", localtime(&cur_time)))
{
static time_t prev_snap;
// The variable 'n' is used for labelling the screenshots when multiple screenshots are taken in
// a single second, we'll start using this variable for naming when a second screenshot request is detected
// at the same time as the first one. Hence, we're initially setting this counter to 2 to imply that
// the captured image is the 2nd image captured at this specific time.
static int n = 2;
if (cur_time == prev_snap)
m_snapshot = fmt::format("gs_{0}_({1})", local_time, n++);
else

View File

@ -26,8 +26,7 @@ static CRCHackLevel s_crc_hack_level = CRCHackLevel::Full;
CRC::Region g_crc_region = CRC::NoRegion;
////////////////////////////////////////////////////////////////////////////////
// Broken on both DirectX and OpenGL
// (note: could potentially work with latest OpenGL)
// Partial level, broken on all renderers.
////////////////////////////////////////////////////////////////////////////////
bool GSC_BigMuthaTruckers(const GSFrameInfo& fi, int& skip)
@ -312,7 +311,7 @@ bool GSC_Tekken5(const GSFrameInfo& fi, int& skip)
{
// Don't enable hack on native res if crc is below aggressive.
// Fixes/removes ghosting/blur effect and white lines appearing in stages: Moonfit Wilderness, Acid Rain - caused by upscaling.
// Downside is it also removes the channel effect which is fixed on OpenGL.
// Downside is it also removes the channel effect which is fixed.
// Let's enable this hack for Aggressive only since it's an upscaling issue for both renders.
skip = 95;
}
@ -475,8 +474,7 @@ bool GSC_ZettaiZetsumeiToshi2(const GSFrameInfo& fi, int& skip)
}
else if ((fi.FBP | fi.TBP0) && fi.FPSM == fi.TPSM && fi.TPSM == PSM_PSMCT16 && fi.FBMSK == 0x3FFF)
{
// Note start of the effect (texture shuffle) is fixed in openGL but maybe not the extra draw
// call....
// Note start of the effect (texture shuffle) is fixed but maybe not the extra draw call
skip = 1000;
}
}
@ -620,7 +618,7 @@ bool GSC_Simple2000Vol114(const GSFrameInfo& fi, int& skip)
}
if (fi.TME && (fi.FBP == 0x0e00) && (fi.TBP0 == 0x1000) && (fi.FBMSK == 0x0000))
{
// Depth shadows, they don't work properly on OpenGL as well.
// Depth shadows.
skip = 1;
}
}
@ -696,7 +694,7 @@ bool GSC_YakuzaGames(const GSFrameInfo& fi, int& skip)
}
////////////////////////////////////////////////////////////////////////////////
// Correctly emulated on OpenGL but can be used as potential speed hack
// Full level, correctly emulated on OpenGL/Vulkan but can be used as potential speed hack
////////////////////////////////////////////////////////////////////////////////
bool GSC_GetawayGames(const GSFrameInfo& fi, int& skip)
@ -938,7 +936,7 @@ void GSState::SetupCrcHack()
lut[CRC::YakuzaGames] = GSC_YakuzaGames;
}
// Hacks that were fixed on OpenGL
// CRC FULL is for Direct3D, they are fixed on OpenGL/Vulkan
if (CRC_Full)
{
// Accurate Blending

View File

@ -866,7 +866,7 @@ void GSRendererHW::SwSpriteRender()
ASSERT(!m_env.PABE.PABE); // No PABE
// PSMCT32 pixel format
ASSERT(!PRIM->TME || (PRIM->TME && m_context->TEX0.PSM == PSM_PSMCT32));
ASSERT(!PRIM->TME || m_context->TEX0.PSM == PSM_PSMCT32);
ASSERT(m_context->FRAME.PSM == PSM_PSMCT32);
// No rasterization required

View File

@ -68,9 +68,6 @@ static __fi int IPU1chain() {
void IPU1dma()
{
int ipu1cycles = 0;
int totalqwc = 0;
if(!ipu1ch.chcr.STR || ipu1ch.chcr.MOD == 2)
{
//We MUST stop the IPU from trying to fill the FIFO with more data if the DMA has been suspended
@ -87,6 +84,9 @@ void IPU1dma()
return;
}
int tagcycles = 0;
int totalqwc = 0;
IPU_LOG("IPU1 DMA Called QWC %x Finished %d In Progress %d tadr %x", ipu1ch.qwc, IPU1Status.DMAFinished, IPU1Status.InProgress, ipu1ch.tadr);
if (!IPU1Status.InProgress)
{
@ -101,7 +101,7 @@ void IPU1dma()
}
ipu1ch.madr = ptag[1]._u32;
ipu1cycles += 1; // Add 1 cycles from the QW read for the tag
tagcycles += 1; // Add 1 cycles from the QW read for the tag
if (ipu1ch.chcr.TTE) DevCon.Warning("TTE?");
@ -123,7 +123,7 @@ void IPU1dma()
//Do this here to prevent double settings on Chain DMA's
if(totalqwc == 0 || (IPU1Status.DMAFinished && !IPU1Status.InProgress))
{
totalqwc = std::max(4, totalqwc);
totalqwc = std::max(4, totalqwc) + tagcycles;
IPU_INT_TO(totalqwc * BIAS);
}
else
@ -136,6 +136,7 @@ void IPU1dma()
}
else
{
totalqwc = std::max(4, totalqwc) + tagcycles;
IPU_INT_TO(totalqwc * BIAS);
}
}

View File

@ -1936,13 +1936,11 @@ void FolderMemoryCard::CalculateECC(u8* ecc, const u8* data)
0xc3, 0x44, 0x55, 0xd2, 0x66, 0xe1, 0xf0, 0x77, 0x77, 0xf0, 0xe1, 0x66, 0xd2, 0x55, 0x44, 0xc3,
0x00, 0x87, 0x96, 0x11, 0xa5, 0x22, 0x33, 0xb4, 0xb4, 0x33, 0x22, 0xa5, 0x11, 0x96, 0x87, 0x00};
int i, c;
ecc[0] = ecc[1] = ecc[2] = 0;
for (i = 0; i < 0x80; i++)
for (int i = 0; i < 0x80; i++)
{
c = Table[data[i]];
const int c = Table[data[i]];
ecc[0] ^= c;
if (c & 0x80)

View File

@ -621,8 +621,7 @@ void Update(unsigned int port, unsigned int slot)
{
s[port][slot].sticks[0].vert = -s[port][slot].sticks[0].vert;
}
// GH2 hack.
else if (config.GH2)
else // GH2 hack.
{
const unsigned int oldIdList[5] = {ID_R2, ID_CIRCLE, ID_TRIANGLE, ID_CROSS, ID_SQUARE};
const unsigned int idList[5] = {ID_L2, ID_L1, ID_R1, ID_R2, ID_CROSS};

View File

@ -378,7 +378,7 @@ void SelChanged(int port, int slot)
if (!hWnd)
return;
HWND hWndTemp, hWndList = GetDlgItem(hWnd, IDC_BINDINGS_LIST);
int j, i = ListView_GetSelectedCount(hWndList);
int i = ListView_GetSelectedCount(hWndList);
wchar_t* devName = L"N/A";
wchar_t* key = L"N/A";
wchar_t* command = L"N/A";
@ -387,20 +387,20 @@ void SelChanged(int port, int slot)
int sensitivity = 0;
int deadZone = 0;
int skipDeadZone = 0;
int nonButtons = 0;
// Set if sensitivity != 0, but need to disable flip anyways.
// Only used to relative axes.
int disableFlip = 0;
wchar_t temp[4][1000];
Device* dev;
int bFound = 0;
int ffbFound = 0;
ForceFeedbackBinding* ffb = 0;
Binding* b = 0;
if (i >= 1)
{
int index = -1;
int flipped = 0;
int nonButtons = 0;
int ffbFound = 0;
while (1)
{
if (!(config.bind && (!config.configureOnBind || quickSetup)))
@ -411,7 +411,8 @@ void SelChanged(int port, int slot)
item.iItem = index;
item.mask = LVIF_TEXT;
item.pszText = temp[3];
for (j = 0; j < 3; j++)
int j = 0;
for (; j < 3; j++)
{
item.iSubItem = j;
item.cchTextMax = sizeof(temp[0]) / sizeof(temp[3][0]);

View File

@ -280,13 +280,13 @@ void EnumRawInputDevices()
wchar_t* productID = displayName + 10000;
RAWINPUTDEVICELIST* list = (RAWINPUTDEVICELIST*)malloc(sizeof(RAWINPUTDEVICELIST) * count);
int keyboardCount = 1;
int mouseCount = 1;
count = GetRawInputDeviceList(list, (unsigned int*)&count, sizeof(RAWINPUTDEVICELIST));
// Not necessary, but reminder that count is -1 on failure.
if (count > 0)
{
int keyboardCount = 1;
int mouseCount = 1;
for (int i = 0; i < count; i++)
{
if (list[i].dwType != RIM_TYPEKEYBOARD && list[i].dwType != RIM_TYPEMOUSE)

View File

@ -39,18 +39,21 @@ WindowsMouse::WindowsMouse(DeviceAPI api, int hWheel, wchar_t* displayName, wcha
wchar_t* WindowsMouse::GetPhysicalControlName(PhysicalControl* control)
{
wchar_t* names[9] = {
L"L Button",
L"R Button",
L"M Button",
L"Mouse 4",
L"Mouse 5",
L"X Axis",
L"Y Axis",
L"Y Wheel",
L"X Wheel"};
if (control->id < 9)
{
wchar_t* names[9] = {
L"L Button",
L"R Button",
L"M Button",
L"Mouse 4",
L"Mouse 5",
L"X Axis",
L"Y Axis",
L"Y Wheel",
L"X Wheel"};
return names[control->id];
}
return Device::GetPhysicalControlName(control);
}

View File

@ -116,32 +116,33 @@ public:
wchar_t* GetPhysicalControlName(PhysicalControl* c)
{
const static wchar_t* names[] = {
L"D-pad Up",
L"D-pad Down",
L"D-pad Left",
L"D-pad Right",
L"Start",
L"Back",
L"Left Thumb",
L"Right Thumb",
L"Left Shoulder",
L"Right Shoulder",
L"Guide",
L"A",
L"B",
L"X",
L"Y",
L"Left Trigger",
L"Right Trigger",
L"Left Thumb X",
L"Left Thumb Y",
L"Right Thumb X",
L"Right Thumb Y",
};
unsigned int i = (unsigned int)(c - physicalControls);
if (i < 21)
{
const static wchar_t* names[] = {
L"D-pad Up",
L"D-pad Down",
L"D-pad Left",
L"D-pad Right",
L"Start",
L"Back",
L"Left Thumb",
L"Right Thumb",
L"Left Shoulder",
L"Right Shoulder",
L"Guide",
L"A",
L"B",
L"X",
L"Y",
L"Left Trigger",
L"Right Trigger",
L"Left Thumb X",
L"Left Thumb Y",
L"Right Thumb X",
L"Right Thumb Y",
};
return (wchar_t*)names[i];
}
return Device::GetPhysicalControlName(c);

View File

@ -105,7 +105,6 @@ void D2_DBGP(const u8 *inbuffer, u8 *outbuffer, char *message, char *eepc, char
const DECI2_DBGP_RUN*run =(DECI2_DBGP_RUN*) &in[1];
static char line[1024];
int i, s;
memcpy(outbuffer, inbuffer, 128*1024);//BUFFERSIZE
//out->h.length=sizeof(DECI2_DBGP_HEADER);
@ -132,7 +131,7 @@ void D2_DBGP(const u8 *inbuffer, u8 *outbuffer, char *message, char *eepc, char
sprintf(line, "%s/GETREG count=%d kind[0]=%d number[0]=%d",
in->id==0?"CPU":in->id==1?"VU0":"VU1", in->count, eregs[0].kind, eregs[0].number);
if (in->h.destination=='I'){
for (i=0; i<in->count; i++)
for (int i=0; i<in->count; i++)
switch (iregs[i].kind){
case 1:switch (iregs[i].number){
case 0:iregs[i].value=psxRegs.GPR.n.lo;break;
@ -150,7 +149,7 @@ void D2_DBGP(const u8 *inbuffer, u8 *outbuffer, char *message, char *eepc, char
iregs[0].value++;//dummy; might be assert(0)
}
}else
for (i=0; i<in->count; i++)
for (int i=0; i<in->count; i++)
switch (eregs[i].kind){
case 0:memcpy(eregs[i].value, &cpuRegs.GPR.r[eregs[i].number], 16);break;
case 1:
@ -181,7 +180,7 @@ void D2_DBGP(const u8 *inbuffer, u8 *outbuffer, char *message, char *eepc, char
sprintf(line, "%s/PUTREG count=%d kind[0]=%d number[0]=%d value=%016I64X_%016I64X",
in->id==0?"CPU":in->id==1?"VU0":"VU1", in->count, eregs[0].kind, eregs[0].number, eregs[0].value[1], eregs[0].value[0]);
if (in->h.destination=='I'){
for (i=0; i<in->count; i++)
for (int i=0; i<in->count; i++)
switch (iregs[i].kind){
case 1:switch (iregs[i].number){
case 0:psxRegs.GPR.n.lo=iregs[i].value;break;
@ -199,7 +198,7 @@ void D2_DBGP(const u8 *inbuffer, u8 *outbuffer, char *message, char *eepc, char
;//dummy; might be assert(0)
}
}else
for (i=0; i<in->count; i++)
for (int i=0; i<in->count; i++)
switch (eregs[i].kind){
case 0:memcpy(&cpuRegs.GPR.r[eregs[i].number], eregs[i].value, 16);break;
case 1:
@ -388,7 +387,8 @@ void D2_DBGP(const u8 *inbuffer, u8 *outbuffer, char *message, char *eepc, char
cpuRegs.GPR.n.gp.UL[0]=run->gp;
// threads_array[0].argc = run->argc;
u32* argv = (u32*)&run[1];
for (i=0, s=0; i<(int)run->argc; i++, argv++) s+=argv[i];
int s = 0;
for (int i=0; i<(int)run->argc; i++, argv++) s+=argv[i];
memcpy(PSM(0), argv, s);
// threads_array[0].argstring = 0;
runStatus = STOP;

View File

@ -1979,9 +1979,10 @@ void StartVoices(int core, u32 value)
if (IsDevBuild)
{
V_Voice& thisvc(Cores[core].Voices[vc]);
if (MsgKeyOnOff())
{
V_Voice& thisvc(Cores[core].Voices[vc]);
ConLog("* SPU2: KeyOn: C%dV%02d: SSA: %8x; M: %s%s%s%s; H: %04x; P: %04x V: %04x/%04x; ADSR: %04x%04x\n",
core, vc, thisvc.StartA,
(Cores[core].VoiceGates[vc].DryL) ? "+" : "-", (Cores[core].VoiceGates[vc].DryR) ? "+" : "-",
@ -1990,6 +1991,7 @@ void StartVoices(int core, u32 value)
thisvc.Pitch,
thisvc.Volume.Left.Value >> 16, thisvc.Volume.Right.Value >> 16,
thisvc.ADSR.regADSR1, thisvc.ADSR.regADSR2);
}
}
}
}

View File

@ -54,10 +54,11 @@ static void populateApiWidget(SettingsCB* settingsCB, const std::string& device)
gtk_list_store_clear(GTK_LIST_STORE(gtk_combo_box_get_model(settingsCB->combo)));
auto dev = RegisterDevice::instance().Device(device);
int port = 1 - settingsCB->player;
GtkComboBox* widget = settingsCB->combo;
if (dev)
{
int port = 1 - settingsCB->player;
std::string api;
auto it = changedAPIs.find(std::make_pair(port, device));
@ -90,10 +91,10 @@ static void populateSubtypeWidget(SettingsCB* settingsCB, const std::string& dev
gtk_list_store_clear(GTK_LIST_STORE(gtk_combo_box_get_model(settingsCB->subtype)));
auto dev = RegisterDevice::instance().Device(device);
int port = 1 - settingsCB->player;
GtkComboBox* widget = settingsCB->subtype;
if (dev)
{
int port = 1 - settingsCB->player;
int sel = 0;
if (!LoadSetting(nullptr, port, device, N_DEV_SUBTYPE, sel))
{
@ -134,7 +135,6 @@ static void apiChanged(GtkComboBox* widget, gpointer data)
SettingsCB* settingsCB = (SettingsCB*)data;
int player = settingsCB->player;
gint active = gtk_combo_box_get_active(GTK_COMBO_BOX(widget));
int port = 1 - player;
auto& name = settingsCB->device;
auto dev = RegisterDevice::instance().Device(name);
@ -145,6 +145,7 @@ static void apiChanged(GtkComboBox* widget, gpointer data)
std::advance(it, active);
if (it != apis.end())
{
int port = 1 - player;
auto pair = std::make_pair(port, name);
auto itAPI = changedAPIs.find(pair);
@ -162,12 +163,12 @@ static void subtypeChanged(GtkComboBox* widget, gpointer data)
SettingsCB* settingsCB = (SettingsCB*)data;
int player = settingsCB->player;
gint active = gtk_combo_box_get_active(GTK_COMBO_BOX(widget));
int port = 1 - player;
auto& name = settingsCB->device;
auto dev = RegisterDevice::instance().Device(name);
if (dev)
{
int port = 1 - player;
changedSubtype[std::make_pair(port, name)] = active;
}
}
@ -176,14 +177,15 @@ static void configureApi(GtkWidget* widget, gpointer data)
{
SettingsCB* settingsCB = (SettingsCB*)data;
int player = settingsCB->player;
int port = 1 - player;
auto& name = settingsCB->device;
auto& api = settingsCB->api;
auto dev = RegisterDevice::instance().Device(name);
if (dev)
{
int port = 1 - player;
auto& api = settingsCB->api;
GtkWidget* dlg = GTK_WIDGET(g_object_get_data(G_OBJECT(widget), "dlg"));
[[maybe_unused]]int res = dev->Configure(port, api, dlg);
}

View File

@ -83,19 +83,13 @@ void INIAddOutExt(char *tempname, int temppos) {
// Returns number of bytes read to get line (0 means end-of-file)
int INIReadLine(ACTUALHANDLE infile, char *buffer) {
int charcount;
int i;
char tempin[2];
int retflag;
int retval;
charcount = 0;
i = 0;
tempin[1] = 0;
retflag = 0;
int charcount = 0;
int i = 0;
char tempin[2] = {0};
int retflag = 0;
while((i < INIMAXLEN) && (retflag < 2)) {
retval = ActualFileRead(infile, 1, tempin);
const int retval = ActualFileRead(infile, 1, tempin);
charcount++;
if(retval != 1) {
retflag = 2;
@ -118,22 +112,17 @@ int INIReadLine(ACTUALHANDLE infile, char *buffer) {
// Returns: number of bytes to get to start of section (or -1)
int INIFindSection(ACTUALHANDLE infile, const char *section) {
int charcount;
int i;
int retflag;
int charcount = 0;
int retflag = 0;
int retval;
char scanbuffer[INIMAXLEN+1];
charcount = 0;
retflag = 0;
while(retflag == 0) {
retval = INIReadLine(infile, scanbuffer);
if(retval == 0) return(-1); // EOF? Stop here.
if(scanbuffer[0] == '[') {
i = 0;
int i = 0;
while((i < INIMAXLEN) &&
(*(section + i) != 0) &&
(*(section + i) == scanbuffer[i + 1])) i++;
@ -152,22 +141,16 @@ int INIFindSection(ACTUALHANDLE infile, const char *section) {
// Returns: number of bytes to get to start of keyword (or -1)
int INIFindKeyword(ACTUALHANDLE infile, const char *keyword, char *buffer) {
int charcount;
int i;
int j;
int retflag;
int retval;
int charcount = 0;
int retflag = 0;
char scanbuffer[INIMAXLEN+1];
charcount = 0;
retflag = 0;
while(retflag == 0) {
retval = INIReadLine(infile, scanbuffer);
int retval = INIReadLine(infile, scanbuffer);
if(retval == 0) return(-1); // EOF? Stop here.
if(scanbuffer[0] == '[') return(-1); // New section? Stop here.
i = 0;
int i = 0;
while((i < INIMAXLEN) &&
(*(keyword + i) != 0) &&
(*(keyword + i) == scanbuffer[i])) i++;
@ -176,7 +159,7 @@ int INIFindKeyword(ACTUALHANDLE infile, const char *keyword, char *buffer) {
retflag = 1;
if(buffer != NULL) {
i++;
j = 0;
int j = 0;
while((i < INIMAXLEN) && (scanbuffer[i] != 0)) {
*(buffer + j) = scanbuffer[i];
i++;
@ -197,15 +180,13 @@ int INIFindKeyword(ACTUALHANDLE infile, const char *keyword, char *buffer) {
// Returns: number of bytes left to write... (from charcount back)
int INICopy(ACTUALHANDLE infile, ACTUALHANDLE outfile, int charcount) {
char buffer[4096];
int i;
int chunk;
int retval;
int chunk = 4096;
i = charcount;
int i = charcount;
chunk = 4096;
if(i < chunk) chunk = i;
while(chunk > 0) {
retval = ActualFileRead(infile, chunk, buffer);
int retval = ActualFileRead(infile, chunk, buffer);
if(retval <= 0) return(i); // Trouble? Stop here.
if(retval < chunk) chunk = retval; // Short block? Note it.

View File

@ -742,14 +742,13 @@ void usb_ep_dump(USBDevice* dev)
/* [USB_ENDPOINT_XFER_BULK] = */ "bulk",
/* [USB_ENDPOINT_XFER_INT] = */ "int",
};
int ifnum, ep, first;
Console.Warning("Device \"%s\", config %d\n",
dev->product_desc, dev->configuration);
for (ifnum = 0; ifnum < 16; ifnum++)
for (int ifnum = 0; ifnum < 16; ifnum++)
{
first = 1;
for (ep = 0; ep < USB_MAX_ENDPOINTS; ep++)
int first = 1;
for (int ep = 0; ep < USB_MAX_ENDPOINTS; ep++)
{
if (dev->ep_in[ep].type != USB_ENDPOINT_XFER_INVALID &&
dev->ep_in[ep].ifnum == ifnum)

View File

@ -115,11 +115,9 @@ void* my_g_malloc_n(size_t n_blocks,
void* my_g_realloc(void* mem,
size_t n_bytes)
{
void* newmem;
if (G_LIKELY(n_bytes))
{
newmem = realloc(mem, n_bytes);
void* newmem = realloc(mem, n_bytes);
//TRACE (GLIB_MEM_REALLOC((void*) newmem, (void*)mem, (unsigned int) n_bytes, 0));
if (newmem)
return newmem;

View File

@ -469,11 +469,9 @@ static void hid_pointer_sync(HIDState* hs)
static void hid_keyboard_event(HIDState* hs, InputEvent* evt)
{
int scancodes[3], i, count;
int slot;
int scancodes[3];
InputKeyEvent* key = &evt->u.key;
count = qemu_input_key_value_to_scancode(&key->key,
const int count = qemu_input_key_value_to_scancode(&key->key,
key->down,
scancodes);
if (hs->n + count > QUEUE_LENGTH)
@ -481,9 +479,9 @@ static void hid_keyboard_event(HIDState* hs, InputEvent* evt)
//trace_hid_kbd_queue_full();
return;
}
for (i = 0; i < count; i++)
for (int i = 0; i < count; i++)
{
slot = (hs->head + hs->n) & QUEUE_MASK;
const int slot = (hs->head + hs->n) & QUEUE_MASK;
hs->n++;
hs->kbd.keycodes[slot] = scancodes[i];
}

View File

@ -462,15 +462,13 @@ static int usb_hub_handle_control(USBDevice* dev, int request, int value,
static int usb_hub_handle_data(USBDevice* dev, int pid,
uint8_t devep, uint8_t* data, int len)
{
USBHubState* s = (USBHubState*)dev;
int ret;
int ret = 0;
switch (pid)
{
case USB_TOKEN_IN:
if (devep == 1)
{
USBHubPort* port;
USBHubState* s = (USBHubState*)dev;
unsigned int status;
int i, n;
n = (s->nb_ports + 1 + 7) / 8;
@ -485,7 +483,7 @@ static int usb_hub_handle_data(USBDevice* dev, int pid,
status = 0;
for (i = 0; i < s->nb_ports; i++)
{
port = &s->ports[i];
USBHubPort* port = &s->ports[i];
if (port->wPortChange)
status |= (1 << (i + 1));
}
@ -520,17 +518,13 @@ static int usb_hub_broadcast_packet(USBHubState* s, int pid,
uint8_t devaddr, uint8_t devep,
uint8_t* data, int len)
{
USBHubPort* port;
USBDevice* dev;
int i, ret;
for (i = 0; i < s->nb_ports; i++)
for (int i = 0; i < s->nb_ports; i++)
{
port = &s->ports[i];
dev = port->port.dev;
USBHubPort* port = &s->ports[i];
USBDevice* dev = port->port.dev;
if (dev && (port->wPortStatus & PORT_STAT_ENABLE))
{
ret = dev->handle_packet(dev, pid,
int ret = dev->handle_packet(dev, pid,
devaddr, devep,
data, len);
if (ret != USB_RET_NODEV)
@ -570,13 +564,9 @@ static void usb_hub_handle_destroy(USBDevice* dev)
USBDevice* usb_hub_init(int nb_ports)
{
USBHubState* s;
USBHubPort* port;
int i;
if (nb_ports > MAX_PORTS)
return NULL;
s = (USBHubState*)qemu_mallocz(sizeof(USBHubState));
USBHubState* s = (USBHubState*)qemu_mallocz(sizeof(USBHubState));
if (!s)
return NULL;
s->dev.speed = USB_SPEED_FULL;
@ -591,9 +581,9 @@ USBDevice* usb_hub_init(int nb_ports)
strncpy(s->dev.devname, "QEMU USB Hub", sizeof(s->dev.devname));
s->nb_ports = nb_ports;
for (i = 0; i < s->nb_ports; i++)
for (int i = 0; i < s->nb_ports; i++)
{
port = &s->ports[i];
USBHubPort* port = &s->ports[i];
port->port.opaque = s;
port->port.index = i;
port->port.attach = usb_hub_attach;

View File

@ -81,10 +81,9 @@ size_t RingBuffer::read(uint8_t* dst, size_t nbytes)
void RingBuffer::write(uint8_t* src, size_t nbytes)
{
size_t bytes;
while (nbytes > 0)
{
bytes = std::min(nbytes, m_capacity - m_end);
size_t bytes = std::min(nbytes, m_capacity - m_end);
memcpy(back(), src, bytes);
write(bytes);
src += bytes;

View File

@ -714,7 +714,7 @@ namespace usb_eyetoy
}
}
int sel_new;
int sel_new = 0;
g_signal_connect(G_OBJECT(rs_cb), "changed", G_CALLBACK(deviceChanged), (gpointer)&sel_new);
gtk_widget_show_all(dlg);

View File

@ -248,7 +248,6 @@ namespace usb_eyetoy
{
EYETOYState* s = (EYETOYState*)dev;
static const int max_ep_size = 896;
uint8_t data[max_ep_size];
uint8_t devep = p->ep->nr;
if (!s->hw_camera_running)
@ -261,6 +260,7 @@ namespace usb_eyetoy
switch (p->pid)
{
case USB_TOKEN_IN:
uint8_t data[max_ep_size];
if (devep == 1)
{
memset(data, 0xff, sizeof(data));

View File

@ -895,7 +895,6 @@ namespace usb_mic
static BOOL CALLBACK WASAPIDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
int tmp = 0;
WASAPISettings* s;
switch (uMsg)
@ -954,6 +953,7 @@ namespace usb_mic
{
case EN_CHANGE:
{
int tmp = 0;
switch (LOWORD(wParam))
{
case IDC_BUFFER1_USB:

View File

@ -580,20 +580,18 @@ namespace usb_pad
HBITMAP hAABitmap = (HBITMAP)GetCurrentObject(hAADC, OBJ_BITMAP);
GetBitmapBits(hAABitmap, dstSize, lpDstBits);
int gridSize = scale * scale;
const int gridSize = scale * scale;
int resultRed, resultGreen, resultBlue;
int dstX, dstY = 0, dstOffset;
int srcX, srcY, srcOffset;
int dstY = 0;
int tmpX, tmpY, tmpOffset;
for (int y = 1; y < dstHeight - 2; y++)
{
dstX = 0;
srcX = 0;
srcY = (y * scale) * srcPitch;
int dstX = 0;
const int srcY = (y * scale) * srcPitch;
for (int x = 1; x < dstWidth - 2; x++)
{
srcX = (x * scale) * 4;
srcOffset = srcY + srcX;
const int srcX = (x * scale) * 4;
const int srcOffset = srcY + srcX;
resultRed = resultGreen = resultBlue = 0;
tmpY = -srcPitch;
@ -613,7 +611,7 @@ namespace usb_pad
tmpY += srcPitch;
}
dstOffset = dstY + dstX;
const int dstOffset = dstY + dstX;
lpDstBits[dstOffset + 2] = (BYTE)(resultRed / gridSize);
lpDstBits[dstOffset + 1] = (BYTE)(resultGreen / gridSize);
lpDstBits[dstOffset] = (BYTE)(resultBlue / gridSize);

View File

@ -525,7 +525,6 @@ namespace usb_pad
int GtkPadConfigure(int port, const char* dev_type, const char* apititle, const char* apiname, GtkWindow* parent, ApiCallbacks& apicbs)
{
GtkWidget *ro_frame, *rs_cb;
GtkWidget *right_vbox, *left_vbox;
ConfigData cfg{};
@ -633,7 +632,7 @@ namespace usb_pad
gtk_box_pack_start(GTK_BOX(right_vbox), cfg.label, TRUE, TRUE, 5);
}
ro_frame = gtk_frame_new("Force feedback");
GtkWidget* ro_frame = gtk_frame_new("Force feedback");
gtk_box_pack_start(GTK_BOX(right_vbox), ro_frame, TRUE, FALSE, 5);
//GtkWidget *frame_vbox = gtk_vbox_new (FALSE, 5);
@ -704,7 +703,7 @@ namespace usb_pad
g_signal_connect(G_OBJECT(chk_btn), "toggled", G_CALLBACK(checkbox_toggled), reinterpret_cast<gboolean*>(&cfg.use_hidraw_ff_pt));
gtk_box_pack_start(GTK_BOX(frame_vbox), chk_btn, FALSE, FALSE, 5);
rs_cb = new_combobox("Device:", frame_vbox, true);
GtkWidget* rs_cb = new_combobox("Device:", frame_vbox, true);
const std::vector<uint16_t> whitelist{PAD_LG_FFB_WHITELIST};
int idx = 0, sel_idx = 0;

View File

@ -831,13 +831,12 @@ namespace usb_pad
cfg->pt[plyCapturing] = IsDlgButtonChecked(hW, IDC_DFP_PASS) > 0;
break;
case IDC_UNBIND:
int sel;
HWND lhW;
lhW = GetDlgItem(hW, IDC_LIST1);
while (1)
{
ZeroMemory(&lv, sizeof(LVITEM));
sel = ListView_GetNextItem(lhW, -1, LVNI_SELECTED);
int sel = ListView_GetNextItem(lhW, -1, LVNI_SELECTED);
if (sel < 0)
break;
lv.iItem = sel;

View File

@ -101,14 +101,13 @@ namespace usb_pad
return;
static int warned = 0;
int caps = 0;
DevCon.WriteLn("FFB %02X, %02X, %02X, %02X : %02X, %02X, %02X, %02X",
ffdata->cmdslot, ffdata->type, ffdata->u.params[0], ffdata->u.params[1],
ffdata->u.params[2], ffdata->u.params[3], ffdata->u.params[4], ffdata->padd0);
if (ffdata->cmdslot != CMD_EXTENDED_CMD)
{
int caps = 0;
uint8_t slots = (ffdata->cmdslot & 0xF0) >> 4;
uint8_t cmd = ffdata->cmdslot & 0x0F;

View File

@ -65,10 +65,11 @@ void vu1ExecMicro(u32 addr)
// Most of the time with MTVU we want to pretend the VU has finished quickly as to gain the benefit from running another thread
// however with T-Bit games when the T-Bit is enabled, it needs to wait in case a T-Bit happens, so we need to set "Busy"
// We shouldn't do this all the time as it negates the extra thread and causes games like Ratchet & Clank to be no faster.
if (VU0.VI[REG_FBRST].UL & 0x800)
{
VU0.VI[REG_VPU_STAT].UL |= 0x0100;
}
// if (VU0.VI[REG_FBRST].UL & 0x800)
// {
// VU0.VI[REG_VPU_STAT].UL |= 0x0100;
// }
// Update 25/06/2022: Disabled this for now, let games YOLO it, if it breaks MTVU, disable MTVU (it doesn't work properly anyway) - Refraction
vu1Thread.ExecuteVU(addr, vif1Regs.top, vif1Regs.itop, VU0.VI[REG_FBRST].UL);
return;

View File

@ -28,10 +28,8 @@ static unsigned psxout_repeat;
static void flush_stdout(bool closing = false)
{
size_t linelen;
while (!psxout_buf.empty()) {
linelen = psxout_buf.find_first_of("\n\0", 0, 2);
size_t linelen = psxout_buf.find_first_of("\n\0", 0, 2);
if (linelen == std::string::npos) {
if (!closing)
return;

View File

@ -31,11 +31,11 @@ int BaseBlocks::LastIndex(u32 startpc) const
if (0 == blocks.size())
return -1;
int imin = 0, imax = blocks.size() - 1, imid;
int imin = 0, imax = blocks.size() - 1;
while (imin != imax)
{
imid = (imin + imax + 1) >> 1;
const int imid = (imin + imax + 1) >> 1;
if (blocks[imid].startpc > startpc)
imax = imid - 1;
@ -52,10 +52,10 @@ BASEBLOCKEX* BaseBlocks::GetByX86(uptr ip)
if (0 == blocks.size())
return 0;
int imin = 0, imax = blocks.size() - 1, imid;
int imin = 0, imax = blocks.size() - 1;
while(imin != imax) {
imid = (imin+imax+1)>>1;
const int imid = (imin+imax+1)>>1;
if (blocks[imid].fnptr > ip)
imax = imid - 1;

View File

@ -182,14 +182,13 @@ void recCTC1()
void recMFC1()
{
int regt, regs;
if (!_Rt_)
return;
EE::Profiler.EmitOp(eeOpcode::MFC1);
_eeOnWriteReg(_Rt_, 1);
regs = _checkXMMreg(XMMTYPE_FPREG, _Fs_, MODE_READ);
const int regs = _checkXMMreg(XMMTYPE_FPREG, _Fs_, MODE_READ);
if (regs >= 0)
{
@ -198,7 +197,7 @@ void recMFC1()
}
else
{
regt = _checkXMMreg(XMMTYPE_GPRREG, _Rt_, MODE_READ);
const int regt = _checkXMMreg(XMMTYPE_GPRREG, _Rt_, MODE_READ);
if (regt >= 0)
{
@ -514,7 +513,7 @@ u32 FPU_MUL_HACK(u32 s, u32 t)
void FPU_MUL(int regd, int regt, bool reverseOperands)
{
u8 *noHack, *endMul = nullptr;
u8 *endMul = nullptr;
if (CHECK_FPUMULHACK)
{
@ -522,7 +521,7 @@ void FPU_MUL(int regd, int regt, bool reverseOperands)
xMOVD(edx, xRegisterSSE(reverseOperands ? regd : regt));
xFastCall((void*)(uptr)&FPU_MUL_HACK, ecx, edx); //returns the hacked result or 0
xTEST(eax, eax);
noHack = JZ8(0);
u8* noHack = JZ8(0);
xMOVDZX(xRegisterSSE(regd), eax);
endMul = JMP8(0);
x86SetJ8(noHack);
@ -1182,8 +1181,7 @@ FPURECOMPILE_CONSTCODE(DIV_S, XMMINFO_WRITED | XMMINFO_READS | XMMINFO_READT);
//------------------------------------------------------------------
void recMADDtemp(int info, int regd)
{
int t1reg;
int t0reg = _allocTempXMMreg(XMMT_FPS, -1);
const int t0reg = _allocTempXMMreg(XMMT_FPS, -1);
switch (info & (PROCESS_EE_S | PROCESS_EE_T))
{
@ -1337,7 +1335,7 @@ void recMADDtemp(int info, int regd)
default:
if (regd == EEREC_ACC)
{
t1reg = _allocTempXMMreg(XMMT_FPS, -1);
const int t1reg = _allocTempXMMreg(XMMT_FPS, -1);
xMOVSSZX(xRegisterSSE(t0reg), ptr[&fpuRegs.fpr[_Fs_]]);
xMOVSSZX(xRegisterSSE(t1reg), ptr[&fpuRegs.fpr[_Ft_]]);
if (CHECK_FPU_EXTRA_OVERFLOW) { fpuFloat2(t0reg); fpuFloat2(t1reg); }
@ -1435,7 +1433,6 @@ FPURECOMPILE_CONSTCODE(MOV_S, XMMINFO_WRITED | XMMINFO_READS);
//------------------------------------------------------------------
void recMSUBtemp(int info, int regd)
{
int t1reg;
int t0reg = _allocTempXMMreg(XMMT_FPS, -1);
switch (info & (PROCESS_EE_S | PROCESS_EE_T))
@ -1562,7 +1559,7 @@ void recMSUBtemp(int info, int regd)
default:
if (regd == EEREC_ACC)
{
t1reg = _allocTempXMMreg(XMMT_FPS, -1);
const int t1reg = _allocTempXMMreg(XMMT_FPS, -1);
xMOVSSZX(xRegisterSSE(t0reg), ptr[&fpuRegs.fpr[_Fs_]]);
xMOVSSZX(xRegisterSSE(t1reg), ptr[&fpuRegs.fpr[_Ft_]]);
if (CHECK_FPU_EXTRA_OVERFLOW) { fpuFloat2(t0reg); fpuFloat2(t1reg); }
@ -1744,7 +1741,6 @@ FPURECOMPILE_CONSTCODE(SUBA_S, XMMINFO_WRITEACC | XMMINFO_READS | XMMINFO_READT)
void recSQRT_S_xmm(int info)
{
EE::Profiler.EmitOp(eeOpcode::SQRT_F);
u8* pjmp;
bool roundmodeFlag = false;
//Console.WriteLn("FPU: SQRT");
@ -1772,7 +1768,7 @@ void recSQRT_S_xmm(int info)
/*--- Check for negative SQRT ---*/
xMOVMSKPS(xRegister32(tempReg), xRegisterSSE(EEREC_D));
xAND(xRegister32(tempReg), 1); //Check sign
pjmp = JZ8(0); //Skip if none are
u8* pjmp = JZ8(0); //Skip if none are
xOR(ptr32[&fpuRegs.fprc[31]], FPUflagI | FPUflagSI); // Set I and SI flags
xAND.PS(xRegisterSSE(EEREC_D), ptr[&s_pos[0]]); // Make EEREC_D Positive
x86SetJ8(pjmp);

View File

@ -418,7 +418,6 @@ void FPU_ADD_SUB(int tempd, int tempt) //tempd and tempt are overwritten, they a
void FPU_MUL(int info, int regd, int sreg, int treg, bool acc)
{
u8* noHack;
u32* endMul = nullptr;
if (CHECK_FPUMULHACK)
@ -427,7 +426,7 @@ void FPU_MUL(int info, int regd, int sreg, int treg, bool acc)
xMOVD(arg2regd, xRegisterSSE(treg));
xFastCall((void*)(uptr)&FPU_MUL_HACK, arg1regd, arg2regd); //returns the hacked result or 0
xTEST(eax, eax);
noHack = JZ8(0);
u8* noHack = JZ8(0);
xMOVDZX(xRegisterSSE(regd), eax);
endMul = JMP32(0);
x86SetJ8(noHack);
@ -951,10 +950,9 @@ FPURECOMPILE_CONSTCODE(SUBA_S, XMMINFO_WRITEACC | XMMINFO_READS | XMMINFO_READT)
void recSQRT_S_xmm(int info)
{
EE::Profiler.EmitOp(eeOpcode::SQRT_F);
u8* pjmp;
int roundmodeFlag = 0;
int tempReg = _allocX86reg(xEmptyReg, X86TYPE_TEMP, 0, 0);
int t1reg = _allocTempXMMreg(XMMT_FPS, -1);
const int tempReg = _allocX86reg(xEmptyReg, X86TYPE_TEMP, 0, 0);
const int t1reg = _allocTempXMMreg(XMMT_FPS, -1);
//Console.WriteLn("FPU: SQRT");
if (g_sseMXCSR.GetRoundMode() != SSEround_Nearest)
@ -976,7 +974,7 @@ void recSQRT_S_xmm(int info)
//--- Check for negative SQRT --- (sqrt(-0) = 0, unlike what the docs say)
xMOVMSKPS(xRegister32(tempReg), xRegisterSSE(EEREC_D));
xAND(xRegister32(tempReg), 1); //Check sign
pjmp = JZ8(0); //Skip if none are
u8* pjmp = JZ8(0); //Skip if none are
xOR(ptr32[&fpuRegs.fprc[31]], FPUflagI | FPUflagSI); // Set I and SI flags
xAND.PS(xRegisterSSE(EEREC_D), ptr[&s_const.pos[0]]); // Make EEREC_D Positive
x86SetJ8(pjmp);

View File

@ -1325,8 +1325,7 @@ void recPADSBH()
EE::Profiler.EmitOp(eeOpcode::PADSBH);
int info = eeRecompileCodeXMM(XMMINFO_READS | XMMINFO_READT | XMMINFO_WRITED);
int t0reg;
const int info = eeRecompileCodeXMM(XMMINFO_READS | XMMINFO_READT | XMMINFO_WRITED);
if (EEREC_S == EEREC_T)
{
@ -1338,7 +1337,7 @@ void recPADSBH()
}
else
{
t0reg = _allocTempXMMreg(XMMT_INT, -1);
const int t0reg = _allocTempXMMreg(XMMT_INT, -1);
xMOVDQA(xRegisterSSE(t0reg), xRegisterSSE(EEREC_T));

View File

@ -1288,13 +1288,14 @@ static void PreBlockCheck(u32 blockpc)
extern void iDumpPsxRegisters(u32 startpc, u32 temp);
static u32 lastrec = 0;
static int curcount = 0;
const int skip = 0;
//*(int*)PSXM(0x27990) = 1; // enables cdvd bios output for scph10000
if ((psxdump & 2) && lastrec != blockpc)
{
static int curcount = 0;
constexpr int skip = 0;
curcount++;
if (curcount > skip)

View File

@ -54,17 +54,17 @@ REC_FUNC_DEL(MADDU1, _Rd_);
// if upper is 1, write in upper 64 bits of LO/HI
void recWritebackHILO(int info, int writed, int upper)
{
int regd, reglo = -1, reghi, savedlo = 0;
int savedlo = 0;
uptr loaddr = (uptr)&cpuRegs.LO.UL[upper ? 2 : 0];
uptr hiaddr = (uptr)&cpuRegs.HI.UL[upper ? 2 : 0];
u8 testlive = upper ? EEINST_LIVE2 : EEINST_LIVE0;
const uptr hiaddr = (uptr)&cpuRegs.HI.UL[upper ? 2 : 0];
const u8 testlive = upper ? EEINST_LIVE2 : EEINST_LIVE0;
if (g_pCurInstInfo->regs[XMMGPR_HI] & testlive)
xMOVSX(rcx, edx);
if (g_pCurInstInfo->regs[XMMGPR_LO] & testlive)
{
int reglo = 0;
if ((reglo = _checkXMMreg(XMMTYPE_GPRREG, XMMGPR_LO, MODE_READ)) >= 0)
{
if (xmmregs[reglo].mode & MODE_WRITE)
@ -87,7 +87,7 @@ void recWritebackHILO(int info, int writed, int upper)
{
_eeOnWriteReg(_Rd_, 1);
regd = -1;
int regd = -1;
if (g_pCurInstInfo->regs[_Rd_] & EEINST_XMM)
{
if (savedlo)
@ -112,6 +112,7 @@ void recWritebackHILO(int info, int writed, int upper)
if (g_pCurInstInfo->regs[XMMGPR_HI] & testlive)
{
int reghi = 0;
if ((reghi = _checkXMMreg(XMMTYPE_GPRREG, XMMGPR_HI, MODE_READ)) >= 0)
{
if (xmmregs[reghi].mode & MODE_WRITE)
@ -132,14 +133,13 @@ void recWritebackHILO(int info, int writed, int upper)
void recWritebackConstHILO(u64 res, int writed, int upper)
{
int reglo, reghi;
uptr loaddr = (uptr)&cpuRegs.LO.UL[upper ? 2 : 0];
uptr hiaddr = (uptr)&cpuRegs.HI.UL[upper ? 2 : 0];
u8 testlive = upper ? EEINST_LIVE2 : EEINST_LIVE0;
if (g_pCurInstInfo->regs[XMMGPR_LO] & testlive)
{
reglo = _allocCheckGPRtoXMM(g_pCurInstInfo, XMMGPR_LO, MODE_WRITE | MODE_READ);
int reglo = _allocCheckGPRtoXMM(g_pCurInstInfo, XMMGPR_LO, MODE_WRITE | MODE_READ);
if (reglo >= 0)
{
@ -158,7 +158,7 @@ void recWritebackConstHILO(u64 res, int writed, int upper)
if (g_pCurInstInfo->regs[XMMGPR_HI] & testlive)
{
reghi = _allocCheckGPRtoXMM(g_pCurInstInfo, XMMGPR_HI, MODE_WRITE | MODE_READ);
int reghi = _allocCheckGPRtoXMM(g_pCurInstInfo, XMMGPR_HI, MODE_WRITE | MODE_READ);
if (reghi >= 0)
{

View File

@ -80,8 +80,6 @@ int eeProcessHILO(int reg, int mode, int mmx)
// core of reg caching
void eeRecompileCode0(R5900FNPTR constcode, R5900FNPTR_INFO constscode, R5900FNPTR_INFO consttcode, R5900FNPTR_INFO noconstcode, int xmminfo)
{
int mmreg1, mmreg2, mmreg3, mmtemp, moded;
if (!_Rd_ && (xmminfo & XMMINFO_WRITED))
return;
@ -97,11 +95,12 @@ void eeRecompileCode0(R5900FNPTR constcode, R5900FNPTR_INFO constscode, R5900FNP
return;
}
moded = MODE_WRITE | ((xmminfo & XMMINFO_READD) ? MODE_READ : 0);
const int moded = MODE_WRITE | ((xmminfo & XMMINFO_READD) ? MODE_READ : 0);
// test if should write xmm, mirror to mmx code
if (g_pCurInstInfo->info & EEINST_XMM)
{
int mmreg1, mmreg3, mmtemp;
pxAssert(0);
if (xmminfo & (XMMINFO_READLO | XMMINFO_WRITELO))
@ -183,7 +182,7 @@ void eeRecompileCode0(R5900FNPTR constcode, R5900FNPTR_INFO constscode, R5900FNP
{
// no const regs
mmreg1 = _allocCheckGPRtoXMM(g_pCurInstInfo, _Rs_, MODE_READ);
mmreg2 = _allocCheckGPRtoXMM(g_pCurInstInfo, _Rt_, MODE_READ);
int mmreg2 = _allocCheckGPRtoXMM(g_pCurInstInfo, _Rt_, MODE_READ);
if (mmreg1 >= 0 || mmreg2 >= 0)
{
@ -294,7 +293,6 @@ void eeRecompileCode0(R5900FNPTR constcode, R5900FNPTR_INFO constscode, R5900FNP
// rt = rs op imm16
void eeRecompileCode1(R5900FNPTR constcode, R5900FNPTR_INFO noconstcode)
{
int mmreg1, mmreg2;
if (!_Rt_)
return;
@ -312,7 +310,7 @@ void eeRecompileCode1(R5900FNPTR constcode, R5900FNPTR_INFO noconstcode)
pxAssert(0);
// no const regs
mmreg1 = _allocCheckGPRtoXMM(g_pCurInstInfo, _Rs_, MODE_READ);
const int mmreg1 = _allocCheckGPRtoXMM(g_pCurInstInfo, _Rs_, MODE_READ);
if (mmreg1 >= 0)
{
@ -320,7 +318,7 @@ void eeRecompileCode1(R5900FNPTR constcode, R5900FNPTR_INFO noconstcode)
// check for last used, if so don't alloc a new XMM reg
_addNeededGPRtoXMMreg(_Rt_);
mmreg2 = _checkXMMreg(XMMTYPE_GPRREG, _Rt_, MODE_WRITE);
int mmreg2 = _checkXMMreg(XMMTYPE_GPRREG, _Rt_, MODE_WRITE);
if (mmreg2 < 0)
{
@ -357,7 +355,6 @@ void eeRecompileCode1(R5900FNPTR constcode, R5900FNPTR_INFO noconstcode)
// rd = rt op sa
void eeRecompileCode2(R5900FNPTR constcode, R5900FNPTR_INFO noconstcode)
{
int mmreg1, mmreg2;
if (!_Rd_)
return;
@ -375,7 +372,7 @@ void eeRecompileCode2(R5900FNPTR constcode, R5900FNPTR_INFO noconstcode)
pxAssert(0);
// no const regs
mmreg1 = _allocCheckGPRtoXMM(g_pCurInstInfo, _Rt_, MODE_READ);
const int mmreg1 = _allocCheckGPRtoXMM(g_pCurInstInfo, _Rt_, MODE_READ);
if (mmreg1 >= 0)
{
@ -383,7 +380,7 @@ void eeRecompileCode2(R5900FNPTR constcode, R5900FNPTR_INFO noconstcode)
// check for last used, if so don't alloc a new XMM reg
_addNeededGPRtoXMMreg(_Rd_);
mmreg2 = _checkXMMreg(XMMTYPE_GPRREG, _Rd_, MODE_WRITE);
int mmreg2 = _checkXMMreg(XMMTYPE_GPRREG, _Rd_, MODE_WRITE);
if (mmreg2 < 0)
{