├── .ci
├── build-freebsd.sh
├── build-linux-aarch64.sh
├── build-linux.sh
├── build-mac-arm64.sh
├── build-mac.sh
├── deploy-linux.sh
├── deploy-mac-arm64.sh
├── deploy-mac.sh
├── deploy-windows.sh
├── docker.env
├── export-azure-vars.sh
├── export-cirrus-vars.sh
├── generate-qt-ts.sh
├── get_keys-windows.sh
├── github-upload.sh
├── install-freebsd.sh
├── optimize-mac.sh
└── setup-windows.sh
├── .cirrus.yml
├── .clang-format
├── .editorconfig
├── .gdbinit
├── .github
├── CONTRIBUTING.md
├── FUNDING.yml
├── ISSUE_TEMPLATE
│ ├── 1-regression-report.yml
│ ├── 2-bug-report.yml
│ ├── 3-feature-request.yml
│ ├── 4-advanced.md
│ └── config.yml
└── workflows
│ ├── qt-ts.yml
│ └── rpcs3.yml
├── .gitignore
├── .gitmodules
├── 3rdparty
├── 7zip
│ ├── 7zip.filters
│ ├── 7zip.vcxproj
│ └── CMakeLists.txt
├── CMakeLists.txt
├── DetectArchitecture.cmake
├── GL
│ ├── KHR
│ │ └── khrplatform.h
│ └── glext.h
├── GPUOpen
│ └── include
│ │ ├── ffx_a.h
│ │ └── ffx_fsr1.h
├── MoltenVK
│ ├── .gitignore
│ └── CMakeLists.txt
├── OpenAL
│ ├── CMakeLists.txt
│ └── openal-soft.vcxproj
├── SoundTouch
│ ├── CMakeLists.txt
│ ├── soundtouch.vcxproj
│ └── soundtouch.vcxproj.filters
├── asmjit
│ ├── CMakeLists.txt
│ ├── asmjit.vcxproj
│ └── asmjit.vcxproj.filters
├── bcdec
│ └── bcdec.hpp
├── cubeb
│ ├── CMakeLists.txt
│ ├── extra
│ │ └── cubeb_export.h
│ ├── libcubeb.vcxproj
│ └── libcubeb.vcxproj.filters
├── curl
│ ├── CMakeLists.txt
│ ├── extra
│ │ └── wolfssl
│ │ │ └── options.h
│ ├── libcurl.vcxproj
│ └── libcurl.vcxproj.filters
├── discord-rpc
│ ├── CMakeLists.txt
│ ├── discord-rpc.vcxproj
│ └── discord-rpc.vcxproj.filters
├── fusion
│ ├── CMakeLists.txt
│ ├── fusion.vcxproj
│ └── fusion.vcxproj.filters
├── glslang
│ ├── .gitignore
│ ├── CMakeLists.txt
│ ├── glslang.vcxproj
│ └── glslang.vcxproj.filters
├── hidapi
│ ├── CMakeLists.txt
│ ├── hidapi.vcxproj
│ └── hidapi.vcxproj.filters
├── libpng
│ ├── CMakeLists.txt
│ ├── libpng.vcxproj
│ └── pnglibconf.vcxproj
├── libsdl-org
│ ├── CMakeLists.txt
│ ├── SDL.vcxproj
│ └── SDL.vcxproj.filters
├── libusb
│ ├── CMakeLists.txt
│ ├── cmake_modules
│ │ ├── FindCoreFoundation.cmake
│ │ ├── FindIOKit.cmake
│ │ └── LibFindMacros.cmake
│ ├── config.cmake
│ ├── config.h.cmake
│ ├── libusb-1.0.pc.cmake
│ ├── libusb.cmake
│ ├── libusb_static.vcxproj
│ └── os.cmake
├── llvm
│ ├── CMakeLists.txt
│ ├── llvm_build.vcxproj
│ ├── llvm_build.vcxproj.filters
│ ├── llvm_build_clang_cl.vcxproj
│ └── llvm_build_clang_cl.vcxproj.filters
├── miniupnp
│ ├── CMakeLists.txt
│ └── miniupnpc_static.vcxproj
├── opencv
│ └── CMakeLists.txt
├── pine
│ └── pine_server.h
├── qt6.cmake
├── rtmidi
│ ├── CMakeLists.txt
│ └── rtmidi.vcxproj
├── stblib
│ └── CMakeLists.txt
├── unordered_dense
│ └── include
│ │ └── unordered_dense.h
├── version_check.sh
├── wolfssl
│ ├── CMakeLists.txt
│ ├── extra
│ │ └── win32
│ │ │ └── user_settings.h
│ └── wolfssl.vcxproj
├── yaml-cpp
│ ├── CMakeLists.txt
│ ├── yaml-cpp.vcxproj
│ └── yaml-cpp.vcxproj.filters
├── zlib
│ ├── CMakeLists.txt
│ ├── zlib.props
│ └── zlib.vcxproj
└── zstd
│ ├── CMakeLists.txt
│ ├── zstd.rc
│ └── zstd.vcxproj
├── BUILDING.md
├── CMakeLists.txt
├── CMakePresets.json
├── LICENSE
├── README.md
├── Utilities
├── BitField.h
├── CRC.h
├── Config.cpp
├── Config.h
├── File.cpp
├── File.h
├── JIT.h
├── JITASM.cpp
├── JITLLVM.cpp
├── LUrlParser.cpp
├── LUrlParser.h
├── StrFmt.cpp
├── StrFmt.h
├── StrUtil.h
├── Thread.cpp
├── Thread.h
├── Timer.h
├── address_range.h
├── bin_patch.cpp
├── bin_patch.h
├── bit_set.h
├── cfmt.h
├── cheat_info.cpp
├── cheat_info.h
├── cond.cpp
├── cond.h
├── date_time.cpp
├── date_time.h
├── geometry.h
├── git-version-gen.cmd
├── lockless.h
├── mutex.cpp
├── mutex.h
├── ppu_patch.h
├── rXml.cpp
├── rXml.h
├── sema.cpp
├── sema.h
├── simple_ringbuf.cpp
├── simple_ringbuf.h
├── stack_trace.cpp
├── stack_trace.h
├── sync.h
├── transactional_storage.h
├── version.cpp
└── version.h
├── bin
├── GuiConfigs
│ ├── Classic (Bright).qss
│ ├── Darker Style by TheMitoSan.qss
│ ├── Envy.qss
│ ├── Kuroi (Dark) by Ani.qss
│ ├── ModernBlue Theme by TheMitoSan.qss
│ ├── Nekotekina by GooseWing.qss
│ ├── Skyline (Nightfall).qss
│ ├── Skyline.qss
│ ├── YoRHa by Ani.qss
│ ├── YoRHa-background.jpg
│ ├── check_mark_white.png
│ ├── kot-bg.jpg
│ ├── list_arrow_blue.png
│ ├── list_arrow_down_blue.png
│ ├── list_arrow_down_green.png
│ ├── list_arrow_down_white.png
│ ├── list_arrow_green.png
│ └── list_arrow_white.png
├── Icons
│ └── ui
│ │ ├── L1.png
│ │ ├── L2.png
│ │ ├── R1.png
│ │ ├── R2.png
│ │ ├── circle.png
│ │ ├── cross.png
│ │ ├── dpad.png
│ │ ├── dpad_down.png
│ │ ├── dpad_left.png
│ │ ├── dpad_right.png
│ │ ├── dpad_up.png
│ │ ├── fade_bottom.png
│ │ ├── fade_top.png
│ │ ├── left_stick.png
│ │ ├── new.png
│ │ ├── right_stick.png
│ │ ├── save.png
│ │ ├── select.png
│ │ ├── spinner-24.png
│ │ ├── square.png
│ │ ├── start.png
│ │ └── triangle.png
└── test
│ ├── dump_stack.elf
│ ├── gs_gcm_basic_triangle.elf
│ ├── gs_gcm_cube.elf
│ ├── gs_gcm_handle_system_cmd.elf
│ ├── gs_gcm_hello_world.elf
│ ├── gs_gcm_tetris.elf
│ ├── pad_test.elf
│ ├── ppu_thread.elf
│ ├── pspgame.elf
│ ├── rpcsp.elf
│ └── spurs_test.self
├── buildfiles
├── cmake
│ ├── ConfigureCompiler.cmake
│ ├── FindFFMPEG.cmake
│ ├── FindWayland.cmake
│ ├── FindWolfSSL.cmake
│ └── FindZLIB.cmake
└── msvc
│ ├── ci_only.targets
│ ├── common_default.props
│ ├── common_default_clang_cl.props
│ ├── common_default_macros.props
│ ├── rpcs3_debug.props
│ ├── rpcs3_default.props
│ └── rpcs3_release.props
├── darwin
└── util
│ └── sysinfo_darwin.mm
├── git-clang-format
├── objdump.cpp
├── pre-commit.readme
├── rpcs3.sln
├── rpcs3
├── CMakeLists.txt
├── Crypto
│ ├── aes.cpp
│ ├── aes.h
│ ├── aesni.cpp
│ ├── aesni.h
│ ├── decrypt_binaries.cpp
│ ├── decrypt_binaries.h
│ ├── ec.cpp
│ ├── ec.h
│ ├── key_vault.cpp
│ ├── key_vault.h
│ ├── lz.cpp
│ ├── lz.h
│ ├── md5.cpp
│ ├── md5.h
│ ├── sha1.cpp
│ ├── sha1.h
│ ├── sha256.cpp
│ ├── sha256.h
│ ├── unedat.cpp
│ ├── unedat.h
│ ├── unpkg.cpp
│ ├── unpkg.h
│ ├── unself.cpp
│ ├── unself.h
│ ├── unzip.cpp
│ ├── unzip.h
│ ├── utils.cpp
│ └── utils.h
├── Cubeb.vcxproj
├── Cubeb.vcxproj.filters
├── Emu
│ ├── Audio
│ │ ├── AudioBackend.cpp
│ │ ├── AudioBackend.h
│ │ ├── AudioDumper.cpp
│ │ ├── AudioDumper.h
│ │ ├── Cubeb
│ │ │ ├── CubebBackend.cpp
│ │ │ ├── CubebBackend.h
│ │ │ ├── cubeb_enumerator.cpp
│ │ │ └── cubeb_enumerator.h
│ │ ├── FAudio
│ │ │ ├── FAudioBackend.cpp
│ │ │ ├── FAudioBackend.h
│ │ │ ├── faudio_enumerator.cpp
│ │ │ └── faudio_enumerator.h
│ │ ├── Null
│ │ │ ├── NullAudioBackend.h
│ │ │ └── null_enumerator.h
│ │ ├── XAudio2
│ │ │ ├── XAudio2Backend.cpp
│ │ │ ├── XAudio2Backend.h
│ │ │ ├── xaudio2_enumerator.cpp
│ │ │ └── xaudio2_enumerator.h
│ │ ├── audio_device_enumerator.h
│ │ ├── audio_resampler.cpp
│ │ ├── audio_resampler.h
│ │ ├── audio_utils.cpp
│ │ └── audio_utils.h
│ ├── CMakeLists.txt
│ ├── CPU
│ │ ├── Backends
│ │ │ └── AArch64
│ │ │ │ ├── AArch64ASM.cpp
│ │ │ │ ├── AArch64ASM.h
│ │ │ │ ├── AArch64Common.cpp
│ │ │ │ ├── AArch64Common.h
│ │ │ │ ├── AArch64JIT.cpp
│ │ │ │ ├── AArch64JIT.h
│ │ │ │ ├── AArch64Signal.cpp
│ │ │ │ └── AArch64Signal.h
│ │ ├── CPUDisAsm.h
│ │ ├── CPUThread.cpp
│ │ ├── CPUThread.h
│ │ ├── CPUTranslator.cpp
│ │ ├── CPUTranslator.h
│ │ ├── Hypervisor.h
│ │ └── sse2neon.h
│ ├── Cell
│ │ ├── Common.h
│ │ ├── ErrorCodes.cpp
│ │ ├── ErrorCodes.h
│ │ ├── MFC.cpp
│ │ ├── MFC.h
│ │ ├── Modules
│ │ │ ├── HLE_PATCHES.cpp
│ │ │ ├── StaticHLE.cpp
│ │ │ ├── StaticHLE.h
│ │ │ ├── cellAdec.cpp
│ │ │ ├── cellAdec.h
│ │ │ ├── cellAtrac.cpp
│ │ │ ├── cellAtrac.h
│ │ │ ├── cellAtracMulti.cpp
│ │ │ ├── cellAtracMulti.h
│ │ │ ├── cellAtracXdec.cpp
│ │ │ ├── cellAtracXdec.h
│ │ │ ├── cellAudio.cpp
│ │ │ ├── cellAudio.h
│ │ │ ├── cellAudioIn.h
│ │ │ ├── cellAudioOut.cpp
│ │ │ ├── cellAudioOut.h
│ │ │ ├── cellAuthDialog.cpp
│ │ │ ├── cellAvconfExt.cpp
│ │ │ ├── cellBgdl.cpp
│ │ │ ├── cellBgdl.h
│ │ │ ├── cellCamera.cpp
│ │ │ ├── cellCamera.h
│ │ │ ├── cellCelp8Enc.cpp
│ │ │ ├── cellCelp8Enc.h
│ │ │ ├── cellCelpEnc.cpp
│ │ │ ├── cellCelpEnc.h
│ │ │ ├── cellCrossController.cpp
│ │ │ ├── cellCrossController.h
│ │ │ ├── cellDaisy.cpp
│ │ │ ├── cellDaisy.h
│ │ │ ├── cellDmux.cpp
│ │ │ ├── cellDmux.h
│ │ │ ├── cellDmuxPamf.cpp
│ │ │ ├── cellDmuxPamf.h
│ │ │ ├── cellDtcpIpUtility.cpp
│ │ │ ├── cellFiber.cpp
│ │ │ ├── cellFiber.h
│ │ │ ├── cellFont.cpp
│ │ │ ├── cellFont.h
│ │ │ ├── cellFontFT.cpp
│ │ │ ├── cellFontFT.h
│ │ │ ├── cellFs.cpp
│ │ │ ├── cellFs.h
│ │ │ ├── cellGame.cpp
│ │ │ ├── cellGame.h
│ │ │ ├── cellGameExec.cpp
│ │ │ ├── cellGcmSys.cpp
│ │ │ ├── cellGcmSys.h
│ │ │ ├── cellGem.cpp
│ │ │ ├── cellGem.h
│ │ │ ├── cellGifDec.cpp
│ │ │ ├── cellGifDec.h
│ │ │ ├── cellHttp.cpp
│ │ │ ├── cellHttp.h
│ │ │ ├── cellHttpUtil.cpp
│ │ │ ├── cellHttpUtil.h
│ │ │ ├── cellImeJp.cpp
│ │ │ ├── cellImeJp.h
│ │ │ ├── cellJpgDec.cpp
│ │ │ ├── cellJpgDec.h
│ │ │ ├── cellJpgEnc.cpp
│ │ │ ├── cellJpgEnc.h
│ │ │ ├── cellKb.cpp
│ │ │ ├── cellKb.h
│ │ │ ├── cellKey2char.cpp
│ │ │ ├── cellL10n.cpp
│ │ │ ├── cellL10n.h
│ │ │ ├── cellLibprof.cpp
│ │ │ ├── cellMic.cpp
│ │ │ ├── cellMic.h
│ │ │ ├── cellMouse.cpp
│ │ │ ├── cellMouse.h
│ │ │ ├── cellMsgDialog.cpp
│ │ │ ├── cellMsgDialog.h
│ │ │ ├── cellMusic.cpp
│ │ │ ├── cellMusic.h
│ │ │ ├── cellMusicDecode.cpp
│ │ │ ├── cellMusicDecode.h
│ │ │ ├── cellMusicExport.cpp
│ │ │ ├── cellMusicSelectionContext.cpp
│ │ │ ├── cellNetAoi.cpp
│ │ │ ├── cellNetCtl.cpp
│ │ │ ├── cellNetCtl.h
│ │ │ ├── cellOskDialog.cpp
│ │ │ ├── cellOskDialog.h
│ │ │ ├── cellOvis.cpp
│ │ │ ├── cellPad.cpp
│ │ │ ├── cellPad.h
│ │ │ ├── cellPamf.cpp
│ │ │ ├── cellPamf.h
│ │ │ ├── cellPesmUtility.cpp
│ │ │ ├── cellPhotoDecode.cpp
│ │ │ ├── cellPhotoExport.cpp
│ │ │ ├── cellPhotoImport.cpp
│ │ │ ├── cellPng.h
│ │ │ ├── cellPngDec.cpp
│ │ │ ├── cellPngDec.h
│ │ │ ├── cellPngEnc.cpp
│ │ │ ├── cellPngEnc.h
│ │ │ ├── cellPrint.cpp
│ │ │ ├── cellRec.cpp
│ │ │ ├── cellRec.h
│ │ │ ├── cellRemotePlay.cpp
│ │ │ ├── cellRemotePlay.h
│ │ │ ├── cellResc.cpp
│ │ │ ├── cellResc.h
│ │ │ ├── cellRtc.cpp
│ │ │ ├── cellRtc.h
│ │ │ ├── cellRtcAlarm.cpp
│ │ │ ├── cellRudp.cpp
│ │ │ ├── cellRudp.h
│ │ │ ├── cellSail.cpp
│ │ │ ├── cellSail.h
│ │ │ ├── cellSailRec.cpp
│ │ │ ├── cellSaveData.cpp
│ │ │ ├── cellSaveData.h
│ │ │ ├── cellScreenshot.cpp
│ │ │ ├── cellScreenshot.h
│ │ │ ├── cellSearch.cpp
│ │ │ ├── cellSearch.h
│ │ │ ├── cellSheap.cpp
│ │ │ ├── cellSpudll.cpp
│ │ │ ├── cellSpudll.h
│ │ │ ├── cellSpurs.cpp
│ │ │ ├── cellSpurs.h
│ │ │ ├── cellSpursJq.cpp
│ │ │ ├── cellSpursJq.h
│ │ │ ├── cellSpursSpu.cpp
│ │ │ ├── cellSsl.cpp
│ │ │ ├── cellSsl.h
│ │ │ ├── cellStorage.cpp
│ │ │ ├── cellStorage.h
│ │ │ ├── cellSubDisplay.cpp
│ │ │ ├── cellSubDisplay.h
│ │ │ ├── cellSync.cpp
│ │ │ ├── cellSync.h
│ │ │ ├── cellSync2.cpp
│ │ │ ├── cellSync2.h
│ │ │ ├── cellSysCache.cpp
│ │ │ ├── cellSysconf.cpp
│ │ │ ├── cellSysconf.h
│ │ │ ├── cellSysmodule.cpp
│ │ │ ├── cellSysutil.cpp
│ │ │ ├── cellSysutil.h
│ │ │ ├── cellSysutilAp.cpp
│ │ │ ├── cellSysutilAvc.cpp
│ │ │ ├── cellSysutilAvc.h
│ │ │ ├── cellSysutilAvc2.cpp
│ │ │ ├── cellSysutilAvc2.h
│ │ │ ├── cellSysutilAvcExt.cpp
│ │ │ ├── cellSysutilMisc.cpp
│ │ │ ├── cellSysutilNpEula.cpp
│ │ │ ├── cellUsbd.cpp
│ │ │ ├── cellUsbd.h
│ │ │ ├── cellUsbpspcm.cpp
│ │ │ ├── cellUserInfo.cpp
│ │ │ ├── cellUserInfo.h
│ │ │ ├── cellVdec.cpp
│ │ │ ├── cellVdec.h
│ │ │ ├── cellVideoExport.cpp
│ │ │ ├── cellVideoOut.cpp
│ │ │ ├── cellVideoOut.h
│ │ │ ├── cellVideoPlayerUtility.cpp
│ │ │ ├── cellVideoUpload.cpp
│ │ │ ├── cellVideoUpload.h
│ │ │ ├── cellVoice.cpp
│ │ │ ├── cellVoice.h
│ │ │ ├── cellVpost.cpp
│ │ │ ├── cellVpost.h
│ │ │ ├── cellWebBrowser.cpp
│ │ │ ├── cellWebBrowser.h
│ │ │ ├── cell_FreeType2.cpp
│ │ │ ├── libad_async.cpp
│ │ │ ├── libad_core.cpp
│ │ │ ├── libfs_utility_init.cpp
│ │ │ ├── libfs_utility_init.h
│ │ │ ├── libmedi.cpp
│ │ │ ├── libmixer.cpp
│ │ │ ├── libmixer.h
│ │ │ ├── libsnd3.cpp
│ │ │ ├── libsnd3.h
│ │ │ ├── libsynth2.cpp
│ │ │ ├── libsynth2.h
│ │ │ ├── sceNp.cpp
│ │ │ ├── sceNp.h
│ │ │ ├── sceNp2.cpp
│ │ │ ├── sceNp2.h
│ │ │ ├── sceNpClans.cpp
│ │ │ ├── sceNpClans.h
│ │ │ ├── sceNpCommerce2.cpp
│ │ │ ├── sceNpCommerce2.h
│ │ │ ├── sceNpMatchingInt.cpp
│ │ │ ├── sceNpPlus.cpp
│ │ │ ├── sceNpPlus.h
│ │ │ ├── sceNpSns.cpp
│ │ │ ├── sceNpSns.h
│ │ │ ├── sceNpTrophy.cpp
│ │ │ ├── sceNpTrophy.h
│ │ │ ├── sceNpTus.cpp
│ │ │ ├── sceNpTus.h
│ │ │ ├── sceNpUtil.cpp
│ │ │ ├── sceNpUtil.h
│ │ │ ├── sysPrxForUser.cpp
│ │ │ ├── sysPrxForUser.h
│ │ │ ├── sys_crashdump.cpp
│ │ │ ├── sys_crashdump.h
│ │ │ ├── sys_game_.cpp
│ │ │ ├── sys_heap.cpp
│ │ │ ├── sys_io_.cpp
│ │ │ ├── sys_libc.cpp
│ │ │ ├── sys_libc_.cpp
│ │ │ ├── sys_lv2dbg.cpp
│ │ │ ├── sys_lv2dbg.h
│ │ │ ├── sys_lwcond_.cpp
│ │ │ ├── sys_lwmutex_.cpp
│ │ │ ├── sys_mempool.cpp
│ │ │ ├── sys_mmapper_.cpp
│ │ │ ├── sys_net_.cpp
│ │ │ ├── sys_net_.h
│ │ │ ├── sys_ppu_thread_.cpp
│ │ │ ├── sys_prx_.cpp
│ │ │ ├── sys_rsxaudio_.cpp
│ │ │ ├── sys_spinlock.cpp
│ │ │ └── sys_spu_.cpp
│ │ ├── PPCDisAsm.h
│ │ ├── PPUAnalyser.cpp
│ │ ├── PPUAnalyser.h
│ │ ├── PPUCallback.h
│ │ ├── PPUDisAsm.cpp
│ │ ├── PPUDisAsm.h
│ │ ├── PPUFunction.cpp
│ │ ├── PPUFunction.h
│ │ ├── PPUInterpreter.cpp
│ │ ├── PPUInterpreter.h
│ │ ├── PPUModule.cpp
│ │ ├── PPUModule.h
│ │ ├── PPUOpcodes.h
│ │ ├── PPUThread.cpp
│ │ ├── PPUThread.h
│ │ ├── PPUTranslator.cpp
│ │ ├── PPUTranslator.h
│ │ ├── RawSPUThread.cpp
│ │ ├── RawSPUThread.h
│ │ ├── SPUASMJITRecompiler.cpp
│ │ ├── SPUASMJITRecompiler.h
│ │ ├── SPUAnalyser.cpp
│ │ ├── SPUAnalyser.h
│ │ ├── SPUCommonRecompiler.cpp
│ │ ├── SPUDisAsm.cpp
│ │ ├── SPUDisAsm.h
│ │ ├── SPUInterpreter.cpp
│ │ ├── SPUInterpreter.h
│ │ ├── SPULLVMRecompiler.cpp
│ │ ├── SPUOpcodes.h
│ │ ├── SPURecompiler.h
│ │ ├── SPUThread.cpp
│ │ ├── SPUThread.h
│ │ ├── lv2
│ │ │ ├── lv2.cpp
│ │ │ ├── sys_bdemu.cpp
│ │ │ ├── sys_bdemu.h
│ │ │ ├── sys_btsetting.cpp
│ │ │ ├── sys_btsetting.h
│ │ │ ├── sys_cond.cpp
│ │ │ ├── sys_cond.h
│ │ │ ├── sys_config.cpp
│ │ │ ├── sys_config.h
│ │ │ ├── sys_console.cpp
│ │ │ ├── sys_console.h
│ │ │ ├── sys_crypto_engine.cpp
│ │ │ ├── sys_crypto_engine.h
│ │ │ ├── sys_dbg.cpp
│ │ │ ├── sys_dbg.h
│ │ │ ├── sys_event.cpp
│ │ │ ├── sys_event.h
│ │ │ ├── sys_event_flag.cpp
│ │ │ ├── sys_event_flag.h
│ │ │ ├── sys_fs.cpp
│ │ │ ├── sys_fs.h
│ │ │ ├── sys_game.cpp
│ │ │ ├── sys_game.h
│ │ │ ├── sys_gamepad.cpp
│ │ │ ├── sys_gamepad.h
│ │ │ ├── sys_gpio.cpp
│ │ │ ├── sys_gpio.h
│ │ │ ├── sys_hid.cpp
│ │ │ ├── sys_hid.h
│ │ │ ├── sys_interrupt.cpp
│ │ │ ├── sys_interrupt.h
│ │ │ ├── sys_io.cpp
│ │ │ ├── sys_io.h
│ │ │ ├── sys_lwcond.cpp
│ │ │ ├── sys_lwcond.h
│ │ │ ├── sys_lwmutex.cpp
│ │ │ ├── sys_lwmutex.h
│ │ │ ├── sys_memory.cpp
│ │ │ ├── sys_memory.h
│ │ │ ├── sys_mmapper.cpp
│ │ │ ├── sys_mmapper.h
│ │ │ ├── sys_mutex.cpp
│ │ │ ├── sys_mutex.h
│ │ │ ├── sys_net.cpp
│ │ │ ├── sys_net.h
│ │ │ ├── sys_net
│ │ │ │ ├── lv2_socket.cpp
│ │ │ │ ├── lv2_socket.h
│ │ │ │ ├── lv2_socket_native.cpp
│ │ │ │ ├── lv2_socket_native.h
│ │ │ │ ├── lv2_socket_p2p.cpp
│ │ │ │ ├── lv2_socket_p2p.h
│ │ │ │ ├── lv2_socket_p2ps.cpp
│ │ │ │ ├── lv2_socket_p2ps.h
│ │ │ │ ├── lv2_socket_raw.cpp
│ │ │ │ ├── lv2_socket_raw.h
│ │ │ │ ├── network_context.cpp
│ │ │ │ ├── network_context.h
│ │ │ │ ├── nt_p2p_port.cpp
│ │ │ │ ├── nt_p2p_port.h
│ │ │ │ ├── sys_net_helpers.cpp
│ │ │ │ └── sys_net_helpers.h
│ │ │ ├── sys_overlay.cpp
│ │ │ ├── sys_overlay.h
│ │ │ ├── sys_ppu_thread.cpp
│ │ │ ├── sys_ppu_thread.h
│ │ │ ├── sys_process.cpp
│ │ │ ├── sys_process.h
│ │ │ ├── sys_prx.cpp
│ │ │ ├── sys_prx.h
│ │ │ ├── sys_rsx.cpp
│ │ │ ├── sys_rsx.h
│ │ │ ├── sys_rsxaudio.cpp
│ │ │ ├── sys_rsxaudio.h
│ │ │ ├── sys_rwlock.cpp
│ │ │ ├── sys_rwlock.h
│ │ │ ├── sys_semaphore.cpp
│ │ │ ├── sys_semaphore.h
│ │ │ ├── sys_sm.cpp
│ │ │ ├── sys_sm.h
│ │ │ ├── sys_spu.cpp
│ │ │ ├── sys_spu.h
│ │ │ ├── sys_ss.cpp
│ │ │ ├── sys_ss.h
│ │ │ ├── sys_storage.cpp
│ │ │ ├── sys_storage.h
│ │ │ ├── sys_sync.h
│ │ │ ├── sys_time.cpp
│ │ │ ├── sys_time.h
│ │ │ ├── sys_timer.cpp
│ │ │ ├── sys_timer.h
│ │ │ ├── sys_trace.cpp
│ │ │ ├── sys_trace.h
│ │ │ ├── sys_tty.cpp
│ │ │ ├── sys_tty.h
│ │ │ ├── sys_uart.cpp
│ │ │ ├── sys_uart.h
│ │ │ ├── sys_usbd.cpp
│ │ │ ├── sys_usbd.h
│ │ │ ├── sys_vm.cpp
│ │ │ └── sys_vm.h
│ │ └── timers.hpp
│ ├── GDB.cpp
│ ├── GDB.h
│ ├── GameInfo.h
│ ├── IPC.h
│ ├── IPC_config.cpp
│ ├── IPC_config.h
│ ├── IPC_socket.cpp
│ ├── IPC_socket.h
│ ├── IdManager.cpp
│ ├── IdManager.h
│ ├── Io
│ │ ├── Buzz.cpp
│ │ ├── Buzz.h
│ │ ├── Dimensions.cpp
│ │ ├── Dimensions.h
│ │ ├── GHLtar.cpp
│ │ ├── GHLtar.h
│ │ ├── GameTablet.cpp
│ │ ├── GameTablet.h
│ │ ├── GunCon3.cpp
│ │ ├── GunCon3.h
│ │ ├── Infinity.cpp
│ │ ├── Infinity.h
│ │ ├── Keyboard.h
│ │ ├── KeyboardHandler.cpp
│ │ ├── KeyboardHandler.h
│ │ ├── LogitechG27.cpp
│ │ ├── LogitechG27.h
│ │ ├── LogitechG27Config.cpp
│ │ ├── LogitechG27Config.h
│ │ ├── MouseHandler.cpp
│ │ ├── MouseHandler.h
│ │ ├── Null
│ │ │ ├── NullKeyboardHandler.h
│ │ │ ├── NullMouseHandler.h
│ │ │ ├── NullPadHandler.h
│ │ │ ├── null_camera_handler.h
│ │ │ └── null_music_handler.h
│ │ ├── PadHandler.cpp
│ │ ├── PadHandler.h
│ │ ├── RB3MidiDrums.cpp
│ │ ├── RB3MidiDrums.h
│ │ ├── RB3MidiGuitar.cpp
│ │ ├── RB3MidiGuitar.h
│ │ ├── RB3MidiKeyboard.cpp
│ │ ├── RB3MidiKeyboard.h
│ │ ├── Skylander.cpp
│ │ ├── Skylander.h
│ │ ├── TopShotElite.cpp
│ │ ├── TopShotElite.h
│ │ ├── TopShotFearmaster.cpp
│ │ ├── TopShotFearmaster.h
│ │ ├── Turntable.cpp
│ │ ├── Turntable.h
│ │ ├── buzz_config.h
│ │ ├── camera_config.cpp
│ │ ├── camera_config.h
│ │ ├── camera_handler_base.h
│ │ ├── emulated_pad_config.h
│ │ ├── evdev_gun_handler.cpp
│ │ ├── evdev_gun_handler.h
│ │ ├── gem_config.h
│ │ ├── ghltar_config.h
│ │ ├── guncon3_config.h
│ │ ├── interception.cpp
│ │ ├── interception.h
│ │ ├── midi_config_types.cpp
│ │ ├── midi_config_types.h
│ │ ├── mouse_config.cpp
│ │ ├── mouse_config.h
│ │ ├── music_handler_base.h
│ │ ├── pad_config.cpp
│ │ ├── pad_config.h
│ │ ├── pad_config_types.cpp
│ │ ├── pad_config_types.h
│ │ ├── pad_types.cpp
│ │ ├── pad_types.h
│ │ ├── rb3drums_config.cpp
│ │ ├── rb3drums_config.h
│ │ ├── recording_config.cpp
│ │ ├── recording_config.h
│ │ ├── topshotelite_config.h
│ │ ├── topshotfearmaster_config.h
│ │ ├── turntable_config.h
│ │ ├── usb_device.cpp
│ │ ├── usb_device.h
│ │ ├── usb_vfs.cpp
│ │ ├── usb_vfs.h
│ │ ├── usio.cpp
│ │ ├── usio.h
│ │ └── usio_config.h
│ ├── Memory
│ │ ├── vm.cpp
│ │ ├── vm.h
│ │ ├── vm_locking.h
│ │ ├── vm_ptr.h
│ │ ├── vm_ref.h
│ │ ├── vm_reservation.h
│ │ └── vm_var.h
│ ├── NP
│ │ ├── fb_helpers.cpp
│ │ ├── fb_helpers.h
│ │ ├── generated
│ │ │ ├── np2_structs.fbs
│ │ │ └── np2_structs_generated.h
│ │ ├── ip_address.cpp
│ │ ├── ip_address.h
│ │ ├── np_allocator.h
│ │ ├── np_cache.cpp
│ │ ├── np_cache.h
│ │ ├── np_contexts.cpp
│ │ ├── np_contexts.h
│ │ ├── np_dnshook.cpp
│ │ ├── np_dnshook.h
│ │ ├── np_event_data.h
│ │ ├── np_gui_cache.cpp
│ │ ├── np_gui_cache.h
│ │ ├── np_handler.cpp
│ │ ├── np_handler.h
│ │ ├── np_helpers.cpp
│ │ ├── np_helpers.h
│ │ ├── np_notifications.cpp
│ │ ├── np_requests.cpp
│ │ ├── np_requests_gui.cpp
│ │ ├── np_structs_extra.cpp
│ │ ├── np_structs_extra.h
│ │ ├── rpcn_client.cpp
│ │ ├── rpcn_client.h
│ │ ├── rpcn_config.cpp
│ │ ├── rpcn_config.h
│ │ ├── rpcn_countries.cpp
│ │ ├── rpcn_countries.h
│ │ ├── rpcn_types.h
│ │ ├── signaling_handler.cpp
│ │ ├── signaling_handler.h
│ │ ├── upnp_config.cpp
│ │ ├── upnp_config.h
│ │ ├── upnp_handler.cpp
│ │ ├── upnp_handler.h
│ │ └── vport0.h
│ ├── RSX
│ │ ├── Capture
│ │ │ ├── rsx_capture.cpp
│ │ │ ├── rsx_capture.h
│ │ │ ├── rsx_replay.cpp
│ │ │ ├── rsx_replay.h
│ │ │ └── rsx_trace.h
│ │ ├── Common
│ │ │ ├── BufferUtils.cpp
│ │ │ ├── BufferUtils.h
│ │ │ ├── TextureUtils.cpp
│ │ │ ├── TextureUtils.h
│ │ │ ├── bitfield.hpp
│ │ │ ├── buffer_stream.hpp
│ │ │ ├── expected.hpp
│ │ │ ├── io_buffer.h
│ │ │ ├── profiling_timer.hpp
│ │ │ ├── ranged_map.hpp
│ │ │ ├── ring_buffer_helper.h
│ │ │ ├── simple_array.hpp
│ │ │ ├── surface_cache_dma.hpp
│ │ │ ├── surface_store.cpp
│ │ │ ├── surface_store.h
│ │ │ ├── surface_utils.h
│ │ │ ├── texture_cache.cpp
│ │ │ ├── texture_cache.h
│ │ │ ├── texture_cache_checker.h
│ │ │ ├── texture_cache_helpers.h
│ │ │ ├── texture_cache_predictor.h
│ │ │ ├── texture_cache_types.cpp
│ │ │ ├── texture_cache_types.h
│ │ │ ├── texture_cache_utils.h
│ │ │ ├── tiled_dma_copy.hpp
│ │ │ ├── time.hpp
│ │ │ └── unordered_map.hpp
│ │ ├── Core
│ │ │ ├── RSXContext.cpp
│ │ │ ├── RSXContext.h
│ │ │ ├── RSXDisplay.cpp
│ │ │ ├── RSXDisplay.h
│ │ │ ├── RSXDrawCommands.cpp
│ │ │ ├── RSXDrawCommands.h
│ │ │ ├── RSXDriverState.h
│ │ │ ├── RSXEngLock.hpp
│ │ │ ├── RSXFrameBuffer.h
│ │ │ ├── RSXIOMap.hpp
│ │ │ ├── RSXReservationLock.hpp
│ │ │ └── RSXVertexTypes.h
│ │ ├── GCM.h
│ │ ├── GL
│ │ │ ├── GLCommonDecompiler.cpp
│ │ │ ├── GLCommonDecompiler.h
│ │ │ ├── GLCompute.cpp
│ │ │ ├── GLCompute.h
│ │ │ ├── GLDMA.cpp
│ │ │ ├── GLDMA.h
│ │ │ ├── GLDraw.cpp
│ │ │ ├── GLFragmentProgram.cpp
│ │ │ ├── GLFragmentProgram.h
│ │ │ ├── GLGSRender.cpp
│ │ │ ├── GLGSRender.h
│ │ │ ├── GLHelpers.cpp
│ │ │ ├── GLHelpers.h
│ │ │ ├── GLOverlays.cpp
│ │ │ ├── GLOverlays.h
│ │ │ ├── GLPipelineCompiler.cpp
│ │ │ ├── GLPipelineCompiler.h
│ │ │ ├── GLPresent.cpp
│ │ │ ├── GLProcTable.h
│ │ │ ├── GLProgramBuffer.h
│ │ │ ├── GLRenderTargets.cpp
│ │ │ ├── GLRenderTargets.h
│ │ │ ├── GLResolveHelper.cpp
│ │ │ ├── GLResolveHelper.h
│ │ │ ├── GLShaderInterpreter.cpp
│ │ │ ├── GLShaderInterpreter.h
│ │ │ ├── GLTexture.cpp
│ │ │ ├── GLTexture.h
│ │ │ ├── GLTextureCache.cpp
│ │ │ ├── GLTextureCache.h
│ │ │ ├── GLVertexBuffers.cpp
│ │ │ ├── GLVertexProgram.cpp
│ │ │ ├── GLVertexProgram.h
│ │ │ ├── OpenGL.cpp
│ │ │ ├── OpenGL.h
│ │ │ ├── glutils
│ │ │ │ ├── blitter.cpp
│ │ │ │ ├── blitter.h
│ │ │ │ ├── buffer_object.cpp
│ │ │ │ ├── buffer_object.h
│ │ │ │ ├── capabilities.cpp
│ │ │ │ ├── capabilities.h
│ │ │ │ ├── common.cpp
│ │ │ │ ├── common.h
│ │ │ │ ├── fbo.cpp
│ │ │ │ ├── fbo.h
│ │ │ │ ├── image.cpp
│ │ │ │ ├── image.h
│ │ │ │ ├── pixel_settings.hpp
│ │ │ │ ├── program.cpp
│ │ │ │ ├── program.h
│ │ │ │ ├── ring_buffer.cpp
│ │ │ │ ├── ring_buffer.h
│ │ │ │ ├── sampler.cpp
│ │ │ │ ├── sampler.h
│ │ │ │ ├── state_tracker.hpp
│ │ │ │ ├── sync.hpp
│ │ │ │ └── vao.hpp
│ │ │ └── upscalers
│ │ │ │ ├── bilinear_pass.hpp
│ │ │ │ ├── fsr1
│ │ │ │ └── fsr_pass.cpp
│ │ │ │ ├── fsr_pass.h
│ │ │ │ ├── nearest_pass.hpp
│ │ │ │ ├── static_pass.hpp
│ │ │ │ └── upscaling.h
│ │ ├── GSFrameBase.cpp
│ │ ├── GSFrameBase.h
│ │ ├── GSRender.cpp
│ │ ├── GSRender.h
│ │ ├── Host
│ │ │ ├── MM.cpp
│ │ │ ├── MM.h
│ │ │ ├── RSXDMAWriter.cpp
│ │ │ └── RSXDMAWriter.h
│ │ ├── NV47
│ │ │ ├── FW
│ │ │ │ ├── GRAPH_backend.h
│ │ │ │ ├── draw_call.cpp
│ │ │ │ ├── draw_call.hpp
│ │ │ │ ├── draw_call.inc.h
│ │ │ │ ├── reg_context.cpp
│ │ │ │ └── reg_context.h
│ │ │ └── HW
│ │ │ │ ├── common.cpp
│ │ │ │ ├── common.h
│ │ │ │ ├── context.h
│ │ │ │ ├── context_accessors.define.h
│ │ │ │ ├── context_accessors.undef.h
│ │ │ │ ├── nv0039.cpp
│ │ │ │ ├── nv0039.h
│ │ │ │ ├── nv3089.cpp
│ │ │ │ ├── nv3089.h
│ │ │ │ ├── nv308a.cpp
│ │ │ │ ├── nv308a.h
│ │ │ │ ├── nv406e.cpp
│ │ │ │ ├── nv406e.h
│ │ │ │ ├── nv4097.cpp
│ │ │ │ ├── nv4097.h
│ │ │ │ ├── nv47.h
│ │ │ │ └── nv47_sync.hpp
│ │ ├── Null
│ │ │ ├── NullGSRender.cpp
│ │ │ └── NullGSRender.h
│ │ ├── Overlays
│ │ │ ├── FriendsList
│ │ │ │ ├── overlay_friends_list_dialog.cpp
│ │ │ │ └── overlay_friends_list_dialog.h
│ │ │ ├── HomeMenu
│ │ │ │ ├── overlay_home_menu.cpp
│ │ │ │ ├── overlay_home_menu.h
│ │ │ │ ├── overlay_home_menu_components.cpp
│ │ │ │ ├── overlay_home_menu_components.h
│ │ │ │ ├── overlay_home_menu_main_menu.cpp
│ │ │ │ ├── overlay_home_menu_main_menu.h
│ │ │ │ ├── overlay_home_menu_message_box.cpp
│ │ │ │ ├── overlay_home_menu_message_box.h
│ │ │ │ ├── overlay_home_menu_page.cpp
│ │ │ │ ├── overlay_home_menu_page.h
│ │ │ │ ├── overlay_home_menu_savestate.cpp
│ │ │ │ ├── overlay_home_menu_savestate.h
│ │ │ │ ├── overlay_home_menu_settings.cpp
│ │ │ │ └── overlay_home_menu_settings.h
│ │ │ ├── Network
│ │ │ │ ├── overlay_recvmessage_dialog.cpp
│ │ │ │ ├── overlay_recvmessage_dialog.h
│ │ │ │ ├── overlay_sendmessage_dialog.cpp
│ │ │ │ └── overlay_sendmessage_dialog.h
│ │ │ ├── Shaders
│ │ │ │ ├── shader_loading_dialog.cpp
│ │ │ │ ├── shader_loading_dialog.h
│ │ │ │ ├── shader_loading_dialog_native.cpp
│ │ │ │ └── shader_loading_dialog_native.h
│ │ │ ├── Trophies
│ │ │ │ ├── overlay_trophy_list_dialog.cpp
│ │ │ │ └── overlay_trophy_list_dialog.h
│ │ │ ├── overlay_animated_icon.cpp
│ │ │ ├── overlay_animated_icon.h
│ │ │ ├── overlay_animation.cpp
│ │ │ ├── overlay_animation.h
│ │ │ ├── overlay_compile_notification.cpp
│ │ │ ├── overlay_compile_notification.h
│ │ │ ├── overlay_controls.cpp
│ │ │ ├── overlay_controls.h
│ │ │ ├── overlay_cursor.cpp
│ │ │ ├── overlay_cursor.h
│ │ │ ├── overlay_debug_overlay.cpp
│ │ │ ├── overlay_debug_overlay.h
│ │ │ ├── overlay_edit_text.cpp
│ │ │ ├── overlay_edit_text.hpp
│ │ │ ├── overlay_fonts.cpp
│ │ │ ├── overlay_fonts.h
│ │ │ ├── overlay_list_view.cpp
│ │ │ ├── overlay_list_view.hpp
│ │ │ ├── overlay_loading_icon.hpp
│ │ │ ├── overlay_manager.cpp
│ │ │ ├── overlay_manager.h
│ │ │ ├── overlay_media_list_dialog.cpp
│ │ │ ├── overlay_media_list_dialog.h
│ │ │ ├── overlay_message.cpp
│ │ │ ├── overlay_message.h
│ │ │ ├── overlay_message_dialog.cpp
│ │ │ ├── overlay_message_dialog.h
│ │ │ ├── overlay_osk.cpp
│ │ │ ├── overlay_osk.h
│ │ │ ├── overlay_osk_panel.cpp
│ │ │ ├── overlay_osk_panel.h
│ │ │ ├── overlay_perf_metrics.cpp
│ │ │ ├── overlay_perf_metrics.h
│ │ │ ├── overlay_progress_bar.cpp
│ │ │ ├── overlay_progress_bar.hpp
│ │ │ ├── overlay_save_dialog.cpp
│ │ │ ├── overlay_save_dialog.h
│ │ │ ├── overlay_trophy_notification.cpp
│ │ │ ├── overlay_trophy_notification.h
│ │ │ ├── overlay_user_list_dialog.cpp
│ │ │ ├── overlay_user_list_dialog.h
│ │ │ ├── overlay_utils.cpp
│ │ │ ├── overlay_utils.h
│ │ │ ├── overlay_video.cpp
│ │ │ ├── overlay_video.h
│ │ │ ├── overlays.cpp
│ │ │ └── overlays.h
│ │ ├── Program
│ │ │ ├── CgBinaryFragmentProgram.cpp
│ │ │ ├── CgBinaryProgram.cpp
│ │ │ ├── CgBinaryProgram.h
│ │ │ ├── CgBinaryVertexProgram.cpp
│ │ │ ├── FragmentProgramDecompiler.cpp
│ │ │ ├── FragmentProgramDecompiler.h
│ │ │ ├── FragmentProgramRegister.cpp
│ │ │ ├── FragmentProgramRegister.h
│ │ │ ├── GLSLCommon.cpp
│ │ │ ├── GLSLCommon.h
│ │ │ ├── GLSLInterpreter
│ │ │ │ ├── FragmentInterpreter.glsl
│ │ │ │ └── VertexInterpreter.glsl
│ │ │ ├── GLSLSnippets
│ │ │ │ ├── CopyBufferToColorImage.glsl
│ │ │ │ ├── CopyBufferToGenericImage.glsl
│ │ │ │ ├── CopyD24x8ToBuffer.glsl
│ │ │ │ ├── CopyRGBA8ToBuffer.glsl
│ │ │ │ ├── GPUDeswizzle.glsl
│ │ │ │ ├── GenericVSPassthrough.glsl
│ │ │ │ ├── OverlayRenderFS.glsl
│ │ │ │ ├── OverlayRenderVS.glsl
│ │ │ │ ├── RSXMemoryTiling.glsl
│ │ │ │ ├── RSXProg
│ │ │ │ │ ├── RSXDefines2.glsl
│ │ │ │ │ ├── RSXFragmentPrologue.glsl
│ │ │ │ │ ├── RSXFragmentTextureDepthConversion.glsl
│ │ │ │ │ ├── RSXFragmentTextureMSAAOps.glsl
│ │ │ │ │ ├── RSXFragmentTextureMSAAOpsInternal.glsl
│ │ │ │ │ ├── RSXFragmentTextureOps.glsl
│ │ │ │ │ ├── RSXProgramCommon.glsl
│ │ │ │ │ ├── RSXProgrammableBlendPrologue.glsl
│ │ │ │ │ ├── RSXROPEpilogue.glsl
│ │ │ │ │ ├── RSXROPPrologue.glsl
│ │ │ │ │ ├── RSXVertexFetch.glsl
│ │ │ │ │ └── RSXVertexPrologue.glsl
│ │ │ │ ├── ShuffleBytes.glsl
│ │ │ │ └── VideoOutCalibrationPass.glsl
│ │ │ ├── GLSLTypes.h
│ │ │ ├── MSAA
│ │ │ │ ├── ColorResolvePass.glsl
│ │ │ │ ├── ColorUnresolvePass.glsl
│ │ │ │ ├── DepthResolvePass.glsl
│ │ │ │ ├── DepthStencilResolvePass.glsl
│ │ │ │ ├── DepthStencilUnresolvePass.glsl
│ │ │ │ ├── DepthUnresolvePass.glsl
│ │ │ │ ├── StencilResolvePass.glsl
│ │ │ │ └── StencilUnresolvePass.glsl
│ │ │ ├── ProgramStateCache.cpp
│ │ │ ├── ProgramStateCache.h
│ │ │ ├── RSXFragmentProgram.h
│ │ │ ├── RSXOverlay.h
│ │ │ ├── RSXVertexProgram.h
│ │ │ ├── SPIRVCommon.cpp
│ │ │ ├── SPIRVCommon.h
│ │ │ ├── ShaderInterpreter.h
│ │ │ ├── ShaderParam.h
│ │ │ ├── Upscalers
│ │ │ │ └── FSR1
│ │ │ │ │ ├── fsr_ffx_a_flattened.inc
│ │ │ │ │ ├── fsr_ffx_fsr1_flattened.inc
│ │ │ │ │ └── fsr_ubershader.glsl
│ │ │ ├── VertexProgramDecompiler.cpp
│ │ │ ├── VertexProgramDecompiler.h
│ │ │ ├── program_util.cpp
│ │ │ └── program_util.h
│ │ ├── RSXDisAsm.cpp
│ │ ├── RSXDisAsm.h
│ │ ├── RSXFIFO.cpp
│ │ ├── RSXFIFO.h
│ │ ├── RSXOffload.cpp
│ │ ├── RSXOffload.h
│ │ ├── RSXTexture.cpp
│ │ ├── RSXTexture.h
│ │ ├── RSXThread.cpp
│ │ ├── RSXThread.h
│ │ ├── RSXZCULL.cpp
│ │ ├── RSXZCULL.h
│ │ ├── VK
│ │ │ ├── VKAsyncScheduler.cpp
│ │ │ ├── VKAsyncScheduler.h
│ │ │ ├── VKCommandStream.cpp
│ │ │ ├── VKCommandStream.h
│ │ │ ├── VKCommonDecompiler.cpp
│ │ │ ├── VKCommonDecompiler.h
│ │ │ ├── VKCommonPipelineLayout.cpp
│ │ │ ├── VKCommonPipelineLayout.h
│ │ │ ├── VKCompute.cpp
│ │ │ ├── VKCompute.h
│ │ │ ├── VKDMA.cpp
│ │ │ ├── VKDMA.h
│ │ │ ├── VKDataHeapManager.cpp
│ │ │ ├── VKDataHeapManager.h
│ │ │ ├── VKDraw.cpp
│ │ │ ├── VKFormats.cpp
│ │ │ ├── VKFormats.h
│ │ │ ├── VKFragmentProgram.cpp
│ │ │ ├── VKFragmentProgram.h
│ │ │ ├── VKFramebuffer.cpp
│ │ │ ├── VKFramebuffer.h
│ │ │ ├── VKGSRender.cpp
│ │ │ ├── VKGSRender.h
│ │ │ ├── VKGSRenderTypes.hpp
│ │ │ ├── VKHelpers.cpp
│ │ │ ├── VKHelpers.h
│ │ │ ├── VKMemAlloc.cpp
│ │ │ ├── VKOverlays.cpp
│ │ │ ├── VKOverlays.h
│ │ │ ├── VKPipelineCompiler.cpp
│ │ │ ├── VKPipelineCompiler.h
│ │ │ ├── VKPresent.cpp
│ │ │ ├── VKProcTable.h
│ │ │ ├── VKProgramBuffer.h
│ │ │ ├── VKProgramPipeline.cpp
│ │ │ ├── VKProgramPipeline.h
│ │ │ ├── VKQueryPool.cpp
│ │ │ ├── VKQueryPool.h
│ │ │ ├── VKRenderPass.cpp
│ │ │ ├── VKRenderPass.h
│ │ │ ├── VKRenderTargets.cpp
│ │ │ ├── VKRenderTargets.h
│ │ │ ├── VKResolveHelper.cpp
│ │ │ ├── VKResolveHelper.h
│ │ │ ├── VKResourceManager.cpp
│ │ │ ├── VKResourceManager.h
│ │ │ ├── VKShaderInterpreter.cpp
│ │ │ ├── VKShaderInterpreter.h
│ │ │ ├── VKTexture.cpp
│ │ │ ├── VKTextureCache.cpp
│ │ │ ├── VKTextureCache.h
│ │ │ ├── VKVertexBuffers.cpp
│ │ │ ├── VKVertexProgram.cpp
│ │ │ ├── VKVertexProgram.h
│ │ │ ├── VulkanAPI.cpp
│ │ │ ├── VulkanAPI.h
│ │ │ ├── upscalers
│ │ │ │ ├── bilinear_pass.hpp
│ │ │ │ ├── fsr1
│ │ │ │ │ └── fsr_pass.cpp
│ │ │ │ ├── fsr_pass.h
│ │ │ │ ├── nearest_pass.hpp
│ │ │ │ └── upscaling.h
│ │ │ └── vkutils
│ │ │ │ ├── barriers.cpp
│ │ │ │ ├── barriers.h
│ │ │ │ ├── buffer_object.cpp
│ │ │ │ ├── buffer_object.h
│ │ │ │ ├── chip_class.cpp
│ │ │ │ ├── chip_class.h
│ │ │ │ ├── commands.cpp
│ │ │ │ ├── commands.h
│ │ │ │ ├── data_heap.cpp
│ │ │ │ ├── data_heap.h
│ │ │ │ ├── descriptors.cpp
│ │ │ │ ├── descriptors.h
│ │ │ │ ├── device.cpp
│ │ │ │ ├── device.h
│ │ │ │ ├── framebuffer_object.hpp
│ │ │ │ ├── garbage_collector.h
│ │ │ │ ├── graphics_pipeline_state.hpp
│ │ │ │ ├── image.cpp
│ │ │ │ ├── image.h
│ │ │ │ ├── image_helpers.cpp
│ │ │ │ ├── image_helpers.h
│ │ │ │ ├── instance.cpp
│ │ │ │ ├── instance.h
│ │ │ │ ├── memory.cpp
│ │ │ │ ├── memory.h
│ │ │ │ ├── pipeline_binding_table.h
│ │ │ │ ├── query_pool.hpp
│ │ │ │ ├── sampler.cpp
│ │ │ │ ├── sampler.h
│ │ │ │ ├── scratch.cpp
│ │ │ │ ├── scratch.h
│ │ │ │ ├── shared.cpp
│ │ │ │ ├── shared.h
│ │ │ │ ├── swapchain.cpp
│ │ │ │ ├── swapchain.h
│ │ │ │ ├── swapchain_android.hpp
│ │ │ │ ├── swapchain_core.h
│ │ │ │ ├── swapchain_macos.hpp
│ │ │ │ ├── swapchain_unix.hpp
│ │ │ │ ├── swapchain_win32.hpp
│ │ │ │ ├── sync.cpp
│ │ │ │ └── sync.h
│ │ ├── color_utils.h
│ │ ├── display.h
│ │ ├── gcm_enums.cpp
│ │ ├── gcm_enums.h
│ │ ├── gcm_printing.cpp
│ │ ├── gcm_printing.h
│ │ ├── rsx_cache.h
│ │ ├── rsx_decode.h
│ │ ├── rsx_methods.cpp
│ │ ├── rsx_methods.h
│ │ ├── rsx_utils.cpp
│ │ ├── rsx_utils.h
│ │ ├── rsx_vertex_data.cpp
│ │ └── rsx_vertex_data.h
│ ├── System.cpp
│ ├── System.h
│ ├── VFS.cpp
│ ├── VFS.h
│ ├── cache_utils.cpp
│ ├── cache_utils.hpp
│ ├── config_mode.h
│ ├── games_config.cpp
│ ├── games_config.h
│ ├── localized_string.cpp
│ ├── localized_string.h
│ ├── localized_string_id.h
│ ├── perf_meter.cpp
│ ├── perf_meter.hpp
│ ├── perf_monitor.cpp
│ ├── perf_monitor.hpp
│ ├── savestate_utils.cpp
│ ├── savestate_utils.hpp
│ ├── scoped_progress_dialog.cpp
│ ├── stb_image.cpp
│ ├── system_config.cpp
│ ├── system_config.h
│ ├── system_config_types.cpp
│ ├── system_config_types.h
│ ├── system_progress.cpp
│ ├── system_progress.hpp
│ ├── system_utils.cpp
│ ├── system_utils.hpp
│ ├── title.cpp
│ ├── title.h
│ ├── vfs_config.cpp
│ └── vfs_config.h
├── GLGSRender.vcxproj
├── GLGSRender.vcxproj.filters
├── Icons
│ ├── DualShock_3.svg
│ ├── combo_config_bordered.png
│ ├── configure.png
│ ├── controllers.png
│ ├── custom_config.png
│ ├── exit_fullscreen.png
│ ├── fullscreen.png
│ ├── grid.png
│ ├── list.png
│ ├── open.png
│ ├── pause.png
│ ├── play.png
│ ├── refresh.png
│ ├── restart.png
│ └── stop.png
├── Input
│ ├── basic_keyboard_handler.cpp
│ ├── basic_keyboard_handler.h
│ ├── basic_mouse_handler.cpp
│ ├── basic_mouse_handler.h
│ ├── ds3_pad_handler.cpp
│ ├── ds3_pad_handler.h
│ ├── ds4_pad_handler.cpp
│ ├── ds4_pad_handler.h
│ ├── dualsense_pad_handler.cpp
│ ├── dualsense_pad_handler.h
│ ├── evdev_joystick_handler.cpp
│ ├── evdev_joystick_handler.h
│ ├── gui_pad_thread.cpp
│ ├── gui_pad_thread.h
│ ├── hid_pad_handler.cpp
│ ├── hid_pad_handler.h
│ ├── keyboard_pad_handler.cpp
│ ├── keyboard_pad_handler.h
│ ├── mm_joystick_handler.cpp
│ ├── mm_joystick_handler.h
│ ├── pad_thread.cpp
│ ├── pad_thread.h
│ ├── product_info.cpp
│ ├── product_info.h
│ ├── ps_move_calibration.cpp
│ ├── ps_move_calibration.h
│ ├── ps_move_config.cpp
│ ├── ps_move_config.h
│ ├── ps_move_handler.cpp
│ ├── ps_move_handler.h
│ ├── ps_move_tracker.cpp
│ ├── ps_move_tracker.h
│ ├── raw_mouse_config.cpp
│ ├── raw_mouse_config.h
│ ├── raw_mouse_handler.cpp
│ ├── raw_mouse_handler.h
│ ├── sdl_instance.cpp
│ ├── sdl_instance.h
│ ├── sdl_pad_handler.cpp
│ ├── sdl_pad_handler.h
│ ├── skateboard_pad_handler.cpp
│ ├── skateboard_pad_handler.h
│ ├── xinput_pad_handler.cpp
│ └── xinput_pad_handler.h
├── Loader
│ ├── ELF.cpp
│ ├── ELF.h
│ ├── PSF.cpp
│ ├── PSF.h
│ ├── PUP.cpp
│ ├── PUP.h
│ ├── TAR.cpp
│ ├── TAR.h
│ ├── TROPUSR.cpp
│ ├── TROPUSR.h
│ ├── TRP.cpp
│ ├── TRP.h
│ ├── disc.cpp
│ ├── disc.h
│ ├── mself.cpp
│ └── mself.hpp
├── VKGSRender.vcxproj
├── VKGSRender.vcxproj.filters
├── XAudio.vcxproj
├── XAudio.vcxproj.filters
├── display_sleep_control.cpp
├── display_sleep_control.h
├── emucore.vcxproj
├── emucore.vcxproj.filters
├── frame_icon.xpm
├── git-version.cmake
├── headless_application.cpp
├── headless_application.h
├── main.cpp
├── main_application.cpp
├── main_application.h
├── module_verifier.cpp
├── module_verifier.hpp
├── qt
│ └── etc
│ │ └── qt.conf
├── resource.h
├── resources.qrc
├── rpcs3.cpp
├── rpcs3.desktop
├── rpcs3.h
├── rpcs3.icns
├── rpcs3.ico
├── rpcs3.metainfo.xml
├── rpcs3.plist.in
├── rpcs3.png
├── rpcs3.rc
├── rpcs3.svg
├── rpcs3.vcxproj
├── rpcs3.vcxproj.filters
├── rpcs3_version.cpp
├── rpcs3_version.h
├── rpcs3qt
│ ├── CMakeLists.txt
│ ├── _discord_utils.cpp
│ ├── _discord_utils.h
│ ├── about_dialog.cpp
│ ├── about_dialog.h
│ ├── about_dialog.ui
│ ├── auto_pause_settings_dialog.cpp
│ ├── auto_pause_settings_dialog.h
│ ├── basic_mouse_settings_dialog.cpp
│ ├── basic_mouse_settings_dialog.h
│ ├── breakpoint_handler.cpp
│ ├── breakpoint_handler.h
│ ├── breakpoint_list.cpp
│ ├── breakpoint_list.h
│ ├── call_stack_list.cpp
│ ├── call_stack_list.h
│ ├── camera_settings_dialog.cpp
│ ├── camera_settings_dialog.h
│ ├── camera_settings_dialog.ui
│ ├── category.h
│ ├── cg_disasm_window.cpp
│ ├── cg_disasm_window.h
│ ├── cheat_manager.cpp
│ ├── cheat_manager.h
│ ├── config_adapter.cpp
│ ├── config_adapter.h
│ ├── config_checker.cpp
│ ├── config_checker.h
│ ├── curl_handle.cpp
│ ├── curl_handle.h
│ ├── custom_dialog.cpp
│ ├── custom_dialog.h
│ ├── custom_dock_widget.h
│ ├── custom_table_widget_item.cpp
│ ├── custom_table_widget_item.h
│ ├── debugger_add_bp_window.cpp
│ ├── debugger_add_bp_window.h
│ ├── debugger_frame.cpp
│ ├── debugger_frame.h
│ ├── debugger_list.cpp
│ ├── debugger_list.h
│ ├── dimensions_dialog.cpp
│ ├── dimensions_dialog.h
│ ├── downloader.cpp
│ ├── downloader.h
│ ├── elf_memory_dumping_dialog.cpp
│ ├── elf_memory_dumping_dialog.h
│ ├── emu_settings.cpp
│ ├── emu_settings.h
│ ├── emu_settings_type.h
│ ├── emulated_logitech_g27_settings_dialog.cpp
│ ├── emulated_logitech_g27_settings_dialog.h
│ ├── emulated_pad_settings_dialog.cpp
│ ├── emulated_pad_settings_dialog.h
│ ├── fatal_error_dialog.cpp
│ ├── fatal_error_dialog.h
│ ├── find_dialog.cpp
│ ├── find_dialog.h
│ ├── flow_layout.cpp
│ ├── flow_layout.h
│ ├── flow_widget.cpp
│ ├── flow_widget.h
│ ├── flow_widget_item.cpp
│ ├── flow_widget_item.h
│ ├── game_compatibility.cpp
│ ├── game_compatibility.h
│ ├── game_list.cpp
│ ├── game_list.h
│ ├── game_list_base.cpp
│ ├── game_list_base.h
│ ├── game_list_delegate.cpp
│ ├── game_list_delegate.h
│ ├── game_list_frame.cpp
│ ├── game_list_frame.h
│ ├── game_list_grid.cpp
│ ├── game_list_grid.h
│ ├── game_list_grid_item.cpp
│ ├── game_list_grid_item.h
│ ├── game_list_table.cpp
│ ├── game_list_table.h
│ ├── gl_gs_frame.cpp
│ ├── gl_gs_frame.h
│ ├── gs_frame.cpp
│ ├── gs_frame.h
│ ├── gui_application.cpp
│ ├── gui_application.h
│ ├── gui_game_info.cpp
│ ├── gui_game_info.h
│ ├── gui_save.h
│ ├── gui_settings.cpp
│ ├── gui_settings.h
│ ├── hex_validator.h
│ ├── infinity_dialog.cpp
│ ├── infinity_dialog.h
│ ├── input_dialog.cpp
│ ├── input_dialog.h
│ ├── instruction_editor_dialog.cpp
│ ├── instruction_editor_dialog.h
│ ├── ipc_settings_dialog.cpp
│ ├── ipc_settings_dialog.h
│ ├── kernel_explorer.cpp
│ ├── kernel_explorer.h
│ ├── localized.cpp
│ ├── localized.h
│ ├── localized_emu.cpp
│ ├── localized_emu.h
│ ├── log_frame.cpp
│ ├── log_frame.h
│ ├── log_viewer.cpp
│ ├── log_viewer.h
│ ├── main_window.cpp
│ ├── main_window.h
│ ├── main_window.ui
│ ├── memory_string_searcher.cpp
│ ├── memory_viewer_panel.cpp
│ ├── memory_viewer_panel.h
│ ├── microphone_creator.cpp
│ ├── microphone_creator.h
│ ├── midi_creator.cpp
│ ├── midi_creator.h
│ ├── movie_item.cpp
│ ├── movie_item.h
│ ├── movie_item_base.cpp
│ ├── movie_item_base.h
│ ├── msg_dialog_frame.cpp
│ ├── msg_dialog_frame.h
│ ├── music_player_dialog.cpp
│ ├── music_player_dialog.h
│ ├── music_player_dialog.ui
│ ├── numbered_widget_item.h
│ ├── osk_dialog_frame.cpp
│ ├── osk_dialog_frame.h
│ ├── pad_device_info.h
│ ├── pad_led_settings_dialog.cpp
│ ├── pad_led_settings_dialog.h
│ ├── pad_led_settings_dialog.ui
│ ├── pad_motion_settings_dialog.cpp
│ ├── pad_motion_settings_dialog.h
│ ├── pad_motion_settings_dialog.ui
│ ├── pad_settings_dialog.cpp
│ ├── pad_settings_dialog.h
│ ├── pad_settings_dialog.ui
│ ├── patch_creator_dialog.cpp
│ ├── patch_creator_dialog.h
│ ├── patch_creator_dialog.ui
│ ├── patch_manager_dialog.cpp
│ ├── patch_manager_dialog.h
│ ├── patch_manager_dialog.ui
│ ├── permissions.cpp
│ ├── permissions.h
│ ├── persistent_settings.cpp
│ ├── persistent_settings.h
│ ├── pkg_install_dialog.cpp
│ ├── pkg_install_dialog.h
│ ├── progress_dialog.cpp
│ ├── progress_dialog.h
│ ├── progress_indicator.cpp
│ ├── progress_indicator.h
│ ├── ps_move_tracker_dialog.cpp
│ ├── ps_move_tracker_dialog.h
│ ├── ps_move_tracker_dialog.ui
│ ├── qt_camera_handler.cpp
│ ├── qt_camera_handler.h
│ ├── qt_camera_video_sink.cpp
│ ├── qt_camera_video_sink.h
│ ├── qt_music_handler.cpp
│ ├── qt_music_handler.h
│ ├── qt_utils.cpp
│ ├── qt_utils.h
│ ├── qt_video_source.cpp
│ ├── qt_video_source.h
│ ├── raw_mouse_settings_dialog.cpp
│ ├── raw_mouse_settings_dialog.h
│ ├── recvmessage_dialog_frame.cpp
│ ├── recvmessage_dialog_frame.h
│ ├── register_editor_dialog.cpp
│ ├── register_editor_dialog.h
│ ├── render_creator.cpp
│ ├── render_creator.h
│ ├── richtext_item_delegate.h
│ ├── rpcn_settings_dialog.cpp
│ ├── rpcn_settings_dialog.h
│ ├── rsx_debugger.cpp
│ ├── rsx_debugger.h
│ ├── save_data_dialog.cpp
│ ├── save_data_dialog.h
│ ├── save_data_info_dialog.cpp
│ ├── save_data_info_dialog.h
│ ├── save_data_list_dialog.cpp
│ ├── save_data_list_dialog.h
│ ├── save_manager_dialog.cpp
│ ├── save_manager_dialog.h
│ ├── savestate_manager_dialog.cpp
│ ├── savestate_manager_dialog.h
│ ├── screenshot_item.cpp
│ ├── screenshot_item.h
│ ├── screenshot_manager_dialog.cpp
│ ├── screenshot_manager_dialog.h
│ ├── screenshot_preview.cpp
│ ├── screenshot_preview.h
│ ├── sendmessage_dialog_frame.cpp
│ ├── sendmessage_dialog_frame.h
│ ├── settings.cpp
│ ├── settings.h
│ ├── settings_dialog.cpp
│ ├── settings_dialog.h
│ ├── settings_dialog.ui
│ ├── shortcut_dialog.cpp
│ ├── shortcut_dialog.h
│ ├── shortcut_dialog.ui
│ ├── shortcut_handler.cpp
│ ├── shortcut_handler.h
│ ├── shortcut_settings.cpp
│ ├── shortcut_settings.h
│ ├── shortcut_utils.cpp
│ ├── shortcut_utils.h
│ ├── skylander_dialog.cpp
│ ├── skylander_dialog.h
│ ├── stylesheets.h
│ ├── syntax_highlighter.cpp
│ ├── syntax_highlighter.h
│ ├── system_cmd_dialog.cpp
│ ├── system_cmd_dialog.h
│ ├── table_item_delegate.cpp
│ ├── table_item_delegate.h
│ ├── tooltips.cpp
│ ├── tooltips.h
│ ├── trophy_manager_dialog.cpp
│ ├── trophy_manager_dialog.h
│ ├── trophy_notification_frame.cpp
│ ├── trophy_notification_frame.h
│ ├── trophy_notification_helper.cpp
│ ├── trophy_notification_helper.h
│ ├── update_manager.cpp
│ ├── update_manager.h
│ ├── user_account.cpp
│ ├── user_account.h
│ ├── user_manager_dialog.cpp
│ ├── user_manager_dialog.h
│ ├── uuid.cpp
│ ├── uuid.h
│ ├── vfs_dialog.cpp
│ ├── vfs_dialog.h
│ ├── vfs_dialog_path_widget.cpp
│ ├── vfs_dialog_path_widget.h
│ ├── vfs_dialog_tab.cpp
│ ├── vfs_dialog_tab.h
│ ├── vfs_dialog_usb_input.cpp
│ ├── vfs_dialog_usb_input.h
│ ├── vfs_dialog_usb_tab.cpp
│ ├── vfs_dialog_usb_tab.h
│ ├── vfs_tool_dialog.cpp
│ ├── vfs_tool_dialog.h
│ ├── vfs_tool_dialog.ui
│ ├── video_label.cpp
│ ├── video_label.h
│ ├── welcome_dialog.cpp
│ ├── welcome_dialog.h
│ └── welcome_dialog.ui
├── stdafx.cpp
├── stdafx.h
├── tests
│ ├── packages.config
│ ├── rpcs3_test.vcxproj
│ ├── test.cpp
│ ├── test_address_range.cpp
│ ├── test_fmt.cpp
│ └── test_simple_array.cpp
├── update_helper.sh
├── util
│ ├── asm.hpp
│ ├── atomic.cpp
│ ├── atomic.hpp
│ ├── auto_typemap.hpp
│ ├── bless.hpp
│ ├── console.cpp
│ ├── console.h
│ ├── coro.hpp
│ ├── cpu_stats.cpp
│ ├── cpu_stats.hpp
│ ├── dyn_lib.cpp
│ ├── dyn_lib.hpp
│ ├── emu_utils.cpp
│ ├── endian.hpp
│ ├── fence.hpp
│ ├── fifo_mutex.hpp
│ ├── fixed_typemap.hpp
│ ├── fnv_hash.hpp
│ ├── init_mutex.hpp
│ ├── logs.cpp
│ ├── logs.hpp
│ ├── media_utils.cpp
│ ├── media_utils.h
│ ├── serialization.hpp
│ ├── serialization_ext.cpp
│ ├── serialization_ext.hpp
│ ├── shared_ptr.hpp
│ ├── simd.hpp
│ ├── slow_mutex.hpp
│ ├── sysinfo.cpp
│ ├── sysinfo.hpp
│ ├── to_endian.hpp
│ ├── tsc.hpp
│ ├── typeindices.hpp
│ ├── types.hpp
│ ├── v128.hpp
│ ├── video_provider.cpp
│ ├── video_provider.h
│ ├── video_sink.h
│ ├── video_source.h
│ ├── vm.hpp
│ ├── vm_native.cpp
│ ├── yaml.cpp
│ └── yaml.hpp
└── windows.qrc
└── usertype.dat
/.ci/build-freebsd.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh -ex
2 |
3 | # Pull all the submodules except llvm, opencv, libpng, sdl and curl
4 | # Note: Tried to use git submodule status, but it takes over 20 seconds
5 | # shellcheck disable=SC2046
6 | git submodule -q update --init --depth 1 $(awk '/path/ && !/llvm/ && !/opencv/ && !/libpng/ && !/libsdl-org/ && !/curl/ { print $3 }' .gitmodules)
7 |
8 | CONFIGURE_ARGS="
9 | -DWITH_LLVM=ON
10 | -DUSE_SDL=OFF
11 | -DUSE_PRECOMPILED_HEADERS=OFF
12 | -DUSE_NATIVE_INSTRUCTIONS=OFF
13 | -DUSE_SYSTEM_FFMPEG=ON
14 | -DUSE_SYSTEM_CURL=ON
15 | -DUSE_SYSTEM_LIBPNG=ON
16 | -DUSE_SYSTEM_OPENCV=ON
17 | "
18 |
19 | # base Clang workaround (missing clang-scan-deps)
20 | CONFIGURE_ARGS="$CONFIGURE_ARGS -DCMAKE_CXX_SCAN_FOR_MODULES=OFF"
21 |
22 | # shellcheck disable=SC2086
23 | cmake -B build -G Ninja $CONFIGURE_ARGS
24 | cmake --build build
25 |
26 | ccache --show-stats
27 | ccache --zero-stats
28 |
--------------------------------------------------------------------------------
/.ci/docker.env:
--------------------------------------------------------------------------------
1 | # Variables set by Azure Pipelines
2 | CI_HAS_ARTIFACTS
3 | BUILD_REASON
4 | BUILD_SOURCEVERSION
5 | BUILD_ARTIFACTSTAGINGDIRECTORY
6 | BUILD_REPOSITORY_NAME
7 | BUILD_SOURCEBRANCHNAME
8 | APPDIR
9 | ARTDIR
10 | RELEASE_MESSAGE
11 | RUN_UNIT_TESTS
12 | # Variables for build matrix
13 | COMPILER
14 | DEPLOY_APPIMAGE
15 | # Private variables
16 | GITHUB_TOKEN
17 |
--------------------------------------------------------------------------------
/.ci/export-azure-vars.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh -e
2 |
3 | # Export variables for later stages of the Azure pipeline
4 | # Values done in this manner will appear as environment variables
5 | # in later stages.
6 |
7 | # From pure-sh-bible
8 | # Setting 'IFS' tells 'read' where to split the string.
9 | while IFS='=' read -r key val; do
10 | # Skip over lines containing comments.
11 | [ "${key##\#*}" ] || continue
12 | echo "##vso[task.setvariable variable=$key]$val"
13 | done < ".ci/ci-vars.env"
14 |
--------------------------------------------------------------------------------
/.ci/export-cirrus-vars.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh -e
2 |
3 | # Export variables for later stages of the Cirrus pipeline
4 | # Values done in this manner will appear as environment variables
5 | # in later stages.
6 |
7 | # From pure-sh-bible
8 | # Setting 'IFS' tells 'read' where to split the string.
9 | while IFS='=' read -r key val; do
10 | # Skip over lines containing comments.
11 | [ "${key##\#*}" ] || continue
12 | export "$key"="$val"
13 | done < ".ci/ci-vars.env"
14 |
--------------------------------------------------------------------------------
/.ci/generate-qt-ts.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh -ex
2 |
3 | mkdir -p ../translations
4 |
5 | LUPDATE_PATH=$(find /usr -name lupdate -type f 2>/dev/null | head -n 1)
6 | if [ -z "$LUPDATE_PATH" ]; then
7 | echo "Error: lupdate not found!"
8 | exit 1
9 | else
10 | echo "lupdate found at: $LUPDATE_PATH"
11 | $LUPDATE_PATH -recursive . -ts ../translations/rpcs3_template.ts
12 | sed -i 's|filename="\.\./|filename="./|g' ../translations/rpcs3_template.ts
13 | fi
--------------------------------------------------------------------------------
/.ci/get_keys-windows.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh -ex
2 |
3 | curl -fLo "./llvm.lock" "https://github.com/RPCS3/llvm-mirror/releases/download/custom-build-win-${LLVM_VER}/llvmlibs_mt.7z.sha256"
4 |
--------------------------------------------------------------------------------
/.ci/install-freebsd.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env -S su -m root -ex
2 | # NOTE: this script is run under root permissions
3 | # shellcheck shell=sh disable=SC2096
4 |
5 | # RPCS3 often needs recent Qt and Vulkan-Headers
6 | sed -i '' 's/quarterly/latest/' /etc/pkg/FreeBSD.conf
7 |
8 | export ASSUME_ALWAYS_YES=true
9 | pkg info # debug
10 |
11 | # WITH_LLVM
12 | pkg install "llvm$LLVM_COMPILER_VER"
13 |
14 | # Mandatory dependencies (qtX-base is pulled via qtX-multimedia)
15 | pkg install git ccache cmake ninja "qt$QT_VER_MAIN-multimedia" "qt$QT_VER_MAIN-svg" glew openal-soft ffmpeg
16 |
17 | # Optional dependencies (libevdev is pulled by qtX-base)
18 | pkg install pkgconf alsa-lib pulseaudio sdl3 evdev-proto vulkan-headers vulkan-loader
19 |
--------------------------------------------------------------------------------
/.ci/optimize-mac.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | file_path=$(find "$1/Contents/MacOS" -type f -print0 | head -n 1)
4 |
5 | if [ -z "$file_path" ]; then
6 | echo "No executable file found in $1/Contents/MacOS" >&2
7 | exit 1
8 | fi
9 |
10 |
11 | target_architecture="$(lipo "$file_path" -archs)"
12 |
13 | if [ -z "$target_architecture" ]; then
14 | exit 1
15 | fi
16 |
17 | # shellcheck disable=SC3045
18 | find "$1" -type f -print0 | while IFS= read -r -d '' file; do
19 | echo Thinning "$file" -> "$target_architecture"
20 | lipo "$file" -thin "$target_architecture" -output "$file" || true
21 | done
22 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*.{h,cpp,hpp}]
4 | charset = utf-8
5 | indent_style = tab
6 | indent_size = 4
7 | trim_trailing_whitespace = true
8 |
--------------------------------------------------------------------------------
/.gdbinit:
--------------------------------------------------------------------------------
1 | handle SIGSEGV nostop noprint
2 | handle SIGPIPE nostop noprint
3 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | patreon: Nekotekina
2 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/4-advanced.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Advanced
3 | about: For developers and experienced users only
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | ## Please do not ask for help or report compatibility regressions here, use [RPCS3 Discord server](https://discord.gg/rpcs3) or [forums](https://forums.rpcs3.net/) instead.
11 |
12 | You're using the advanced template. You're expected to know what to write in order to fill in all the required information for proper report.
13 |
14 | If you're unsure on what to do, please return back to the issue type selection and choose different category.
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: false
2 | contact_links:
3 | - name: Quickstart guide
4 | url: https://rpcs3.net/quickstart
5 | about: Everything you need to know to install and configure emulator, and add games
6 | - name: Ask for help
7 | url: https://discord.gg/rpcs3
8 | about: If you have some questions or need help, please use our Discord server instead of GitHub
9 | - name: Report game compatibility
10 | url: https://forums.rpcs3.net/thread-196671.html
11 | about: Please use RPCS3 forums to submit or update game compatibility status
--------------------------------------------------------------------------------
/.github/workflows/qt-ts.yml:
--------------------------------------------------------------------------------
1 | name: Generate Translation Template
2 |
3 | on:
4 | workflow_dispatch:
5 | push:
6 | branches:
7 | - master
8 | paths:
9 | - 'rpcs3/**'
10 |
11 | jobs:
12 | Generate_Translation_Template:
13 | name: Generate Translation Template
14 | runs-on: ubuntu-24.04
15 | steps:
16 | - name: Checkout repository
17 | uses: actions/checkout@main
18 |
19 | - name: Install Qt Tools
20 | run: |
21 | sudo apt update
22 | sudo apt install -y qt6-l10n-tools
23 |
24 | - name: Generate .ts file using lupdate (Qt)
25 | working-directory: rpcs3
26 | run: |
27 | ../.ci/generate-qt-ts.sh
28 |
29 | - name: Upload translation template
30 | uses: actions/upload-artifact@main
31 | with:
32 | name: RPCS3_Translation_Template
33 | path: translations/rpcs3_template.ts
34 | compression-level: 0
--------------------------------------------------------------------------------
/3rdparty/MoltenVK/.gitignore:
--------------------------------------------------------------------------------
1 | .ninja_log
2 | build.ninja
3 | cmake_install.cmake
4 | CMakeCache.txt
5 | CMakeFiles
6 | MoltenVK
7 | moltenvk-prefix
8 |
--------------------------------------------------------------------------------
/3rdparty/MoltenVK/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | project(moltenvk NONE)
2 | include(ExternalProject)
3 |
4 | ExternalProject_Add(moltenvk
5 | GIT_REPOSITORY https://github.com/KhronosGroup/MoltenVK.git
6 | GIT_TAG 49b97f2
7 | BUILD_IN_SOURCE 1
8 | SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/MoltenVK
9 | CONFIGURE_COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/MoltenVK/fetchDependencies" --macos
10 | BUILD_COMMAND xcodebuild build -quiet -project "${CMAKE_CURRENT_SOURCE_DIR}/MoltenVK/MoltenVKPackaging.xcodeproj" -scheme "MoltenVK Package \(macOS only\)" -configuration "Release" -arch "${CMAKE_HOST_SYSTEM_PROCESSOR}"
11 | COMMAND ln -f "${CMAKE_CURRENT_SOURCE_DIR}/MoltenVK/MoltenVK/dylib/macOS/libMoltenVK.dylib" "${CMAKE_CURRENT_SOURCE_DIR}/MoltenVK/Build/Products/Release/dynamic/libMoltenVK.dylib"
12 | INSTALL_COMMAND ""
13 | BUILD_BYPRODUCTS "${CMAKE_CURRENT_SOURCE_DIR}/MoltenVK/Build/Products/Release/dynamic/libMoltenVK.dylib"
14 | )
15 |
--------------------------------------------------------------------------------
/3rdparty/OpenAL/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # OpenAL
2 | if(USE_SYSTEM_OPENAL)
3 | if(WIN32)
4 | find_package(OpenAL CONFIG REQUIRED)
5 | else()
6 | find_package(OpenAL REQUIRED)
7 | endif()
8 | add_library(3rdparty_openal INTERFACE)
9 | target_link_libraries(3rdparty_openal INTERFACE OpenAL::OpenAL)
10 | set_target_properties(OpenAL::OpenAL PROPERTIES IMPORTED_GLOBAL ON)
11 | else()
12 | option(ALSOFT_UTILS "Build utility programs" OFF)
13 | option(ALSOFT_EXAMPLES "Build example programs" OFF)
14 | add_subdirectory(openal-soft EXCLUDE_FROM_ALL)
15 | add_library(3rdparty_openal INTERFACE)
16 | target_link_libraries(3rdparty_openal INTERFACE OpenAL::OpenAL)
17 | endif()
18 |
--------------------------------------------------------------------------------
/3rdparty/asmjit/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | set(ASMJIT_EMBED TRUE)
2 | set(ASMJIT_STATIC TRUE)
3 | set(ASMJIT_BUILD_X86 TRUE)
4 | set(ASMJIT_BUILD_ARM FALSE)
5 | set(ASMJIT_BUILD_TEST FALSE)
6 | set(ASMJIT_NO_DEPRECATED TRUE)
7 | set(ASMJIT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/asmjit" CACHE PATH "Location of 'asmjit'")
8 |
9 | include("${ASMJIT_DIR}/CMakeLists.txt")
10 |
11 | add_library(asmjit ${ASMJIT_SRC})
12 | target_include_directories(asmjit PUBLIC ${ASMJIT_DIR}/src)
13 | target_link_libraries(asmjit PRIVATE ${ASMJIT_DEPS})
14 |
15 | # ASMJIT should have a option for disabling installing and this wouldnt
16 | # be required to avoid installing ASMJIT...
17 |
18 | set_property(TARGET asmjit PROPERTY FOLDER "3rdparty/")
19 | add_library(3rdparty::asmjit ALIAS asmjit)
20 |
--------------------------------------------------------------------------------
/3rdparty/cubeb/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Cubeb
2 |
3 | set(BUILD_SHARED_LIBS FALSE CACHE BOOL "Don't build shared libs")
4 | set(BUILD_TESTS FALSE CACHE BOOL "Don't build tests")
5 | set(BUILD_RUST_LIBS FALSE CACHE BOOL "Don't build rust libs")
6 | set(BUILD_TOOLS FALSE CACHE BOOL "Don't build tools")
7 | set(BUNDLE_SPEEX TRUE CACHE BOOL "Bundle the speex library")
8 | set(LAZY_LOAD_LIBS TRUE CACHE BOOL "Lazily load shared libraries")
9 | set(USE_SANITIZERS FALSE CACHE BOOL "Dont't use sanitizers")
10 |
11 | add_subdirectory(cubeb EXCLUDE_FROM_ALL)
12 | add_library(3rdparty::cubeb ALIAS cubeb)
13 |
14 | if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm|ARM|aarch64|AArch64|Aarch64)")
15 | target_compile_definitions(speex PUBLIC
16 | #_USE_NEON
17 | )
18 | elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86|X86|amd64|AMD64|em64t|EM64T)")
19 | target_compile_definitions(speex PUBLIC
20 | _USE_SSE
21 | _USE_SSE2
22 | )
23 | endif ()
24 |
--------------------------------------------------------------------------------
/3rdparty/cubeb/extra/cubeb_export.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #define CUBEB_EXPORT
4 |
--------------------------------------------------------------------------------
/3rdparty/discord-rpc/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # DiscordRPC
2 |
3 | add_library(3rdparty_discordRPC INTERFACE)
4 |
5 | if (USE_DISCORD_RPC AND (WIN32 OR CMAKE_SYSTEM MATCHES "Linux" OR APPLE))
6 | set(BUILD_EXAMPLES FALSE CACHE BOOL "Build example apps")
7 | set(ENABLE_IO_THREAD TRUE CACHE BOOL "Start up a separate I/O thread, otherwise I'd need to call an update function")
8 | set(USE_STATIC_CRT FALSE CACHE BOOL "Use /MT[d] for dynamic library")
9 | set(WARNINGS_AS_ERRORS FALSE CACHE BOOL "When enabled, compiles with `-Werror` (on *nix platforms).")
10 |
11 | add_subdirectory(discord-rpc EXCLUDE_FROM_ALL)
12 | target_include_directories(3rdparty_discordRPC INTERFACE discord-rpc/include)
13 | target_compile_definitions(3rdparty_discordRPC INTERFACE -DWITH_DISCORD_RPC)
14 | target_link_libraries(3rdparty_discordRPC INTERFACE discord-rpc)
15 | endif()
16 |
--------------------------------------------------------------------------------
/3rdparty/fusion/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # To avoid python numpy dependency in debug build, force release build of this library
2 | set(ORIG_BUILD_TYPE ${CMAKE_BUILD_TYPE})
3 | set(CMAKE_BUILD_TYPE Release)
4 | add_subdirectory(fusion EXCLUDE_FROM_ALL)
5 | set(CMAKE_BUILD_TYPE ${ORIG_BUILD_TYPE})
6 |
--------------------------------------------------------------------------------
/3rdparty/glslang/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 | /x64
3 |
--------------------------------------------------------------------------------
/3rdparty/glslang/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | #glslang
2 |
3 | set(ENABLE_PCH OFF CACHE BOOL "Enables Precompiled header" FORCE)
4 | set(BUILD_EXTERNAL OFF CACHE BOOL "Build external dependencies in /External" FORCE)
5 | set(SKIP_GLSLANG_INSTALL ON CACHE BOOL "Skip installation" FORCE)
6 | set(ENABLE_SPVREMAPPER OFF CACHE BOOL "Enables building of SPVRemapper" FORCE)
7 | set(ENABLE_GLSLANG_BINARIES OFF CACHE BOOL "Builds glslangValidator and spirv-remap" FORCE)
8 | set(ENABLE_HLSL OFF CACHE BOOL "Enables HLSL input support" FORCE)
9 | set(ENABLE_OPT OFF CACHE BOOL "Enables spirv-opt capability if present" FORCE)
10 | set(ENABLE_CTEST OFF CACHE BOOL "Enables testing" FORCE)
11 | add_subdirectory(glslang)
12 |
--------------------------------------------------------------------------------
/3rdparty/glslang/glslang.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/3rdparty/hidapi/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # hidapi
2 | set(BUILD_SHARED_LIBS FALSE CACHE BOOL "Don't build shared libs")
3 | set(HIDAPI_INSTALL_TARGETS FALSE CACHE BOOL "Don't install anything")
4 |
5 | if(CMAKE_SYSTEM MATCHES "Linux")
6 | set(HIDAPI_WITH_LIBUSB FALSE CACHE BOOL "Don't build with libusb for linux")
7 | endif()
8 |
9 | add_library(3rdparty_hidapi INTERFACE)
10 | add_subdirectory(hidapi EXCLUDE_FROM_ALL)
11 |
12 | if(APPLE)
13 | target_link_libraries(3rdparty_hidapi INTERFACE hidapi_darwin "-framework CoreFoundation" "-framework IOKit")
14 | elseif(CMAKE_SYSTEM MATCHES "Linux")
15 | target_link_libraries(3rdparty_hidapi INTERFACE hidapi-hidraw udev)
16 | elseif(WIN32)
17 | target_link_libraries(3rdparty_hidapi INTERFACE hidapi::hidapi hidapi::include Shlwapi.lib)
18 | elseif(ANDROID)
19 | target_link_libraries(3rdparty_hidapi INTERFACE hidapi::libusb)
20 | else()
21 | target_link_libraries(3rdparty_hidapi INTERFACE hidapi-libusb usb)
22 | endif()
23 |
--------------------------------------------------------------------------------
/3rdparty/libpng/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # libPNG
2 | # Select the version of libpng to use, default is builtin
3 | if (NOT USE_SYSTEM_LIBPNG)
4 | # We use libpng's static library and don't need to build the shared library and run the tests
5 | set(PNG_SHARED OFF CACHE BOOL "Build shared lib")
6 | set(PNG_TESTS OFF CACHE BOOL "Build libpng tests")
7 | set(SKIP_INSTALL_ALL ON)
8 | add_subdirectory(libpng EXCLUDE_FROM_ALL)
9 | target_include_directories(png_static INTERFACE "${libpng_BINARY_DIR}" "${libpng_SOURCE_DIR}")
10 |
11 | set(LIBPNG_TARGET png_static PARENT_SCOPE)
12 | else()
13 | find_package(PNG REQUIRED)
14 |
15 | add_library(3rdparty_system_libpng INTERFACE)
16 | target_include_directories(3rdparty_system_libpng INTERFACE ${PNG_INCLUDE_DIR})
17 | target_link_libraries(3rdparty_system_libpng INTERFACE ${PNG_LIBRARY})
18 | target_compile_definitions(3rdparty_system_libpng INTERFACE ${PNG_DEFINITIONS})
19 |
20 | set(LIBPNG_TARGET 3rdparty_system_libpng PARENT_SCOPE)
21 | endif()
22 |
--------------------------------------------------------------------------------
/3rdparty/libsdl-org/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | option(SDL_SHARED "Build a shared version of the library" OFF)
2 | option(SDL_STATIC "Build a static version of the library" ON)
3 | option(SDL_TEST_LIBRARY "Build the SDL3_test library" OFF)
4 | add_subdirectory(SDL EXCLUDE_FROM_ALL)
5 |
--------------------------------------------------------------------------------
/3rdparty/libusb/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | project(libusb)
2 |
3 | list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules")
4 | set(LIBUSB_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libusb)
5 |
6 |
7 | option(WITH_DEBUG_LOG "enable debug logging" OFF)
8 | # if debug logging is enabled, by default enable logging
9 | option(WITH_LOGGING "if false, disable all logging" ON)
10 | option(WITHOUT_PTHREADS "force pthreads to not be used. if on, then they are used based on detection logic" OFF)
11 |
12 | set(LIBUSB_MAJOR 1)
13 | set(LIBUSB_MINOR 0)
14 | set(LIBUSB_MICRO 26)
15 |
16 | macro(append_compiler_flags)
17 | foreach(FLAG IN ITEMS ${ARGN})
18 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${FLAG}")
19 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FLAG}")
20 | endforeach()
21 | endmacro()
22 |
23 | include(libusb.cmake)
24 |
--------------------------------------------------------------------------------
/3rdparty/libusb/cmake_modules/FindCoreFoundation.cmake:
--------------------------------------------------------------------------------
1 | # CoreFoundation_INCLUDE_DIR
2 | # CoreFoundation_LIBRARIES
3 | # CoreFoundation_FOUND
4 | include(LibFindMacros)
5 |
6 | find_path(CoreFoundation_INCLUDE_DIR
7 | CoreFoundation.h
8 | PATH_SUFFIXES CoreFoundation
9 | )
10 |
11 | find_library(CoreFoundation_LIBRARY
12 | NAMES CoreFoundation
13 | )
14 |
15 | set(CoreFoundation_PROCESS_INCLUDES CoreFoundation_INCLUDE_DIR)
16 | set(CoreFoundation_PROCESS_LIBS CoreFoundation_LIBRARY)
17 | libfind_process(CoreFoundation)
18 |
--------------------------------------------------------------------------------
/3rdparty/libusb/cmake_modules/FindIOKit.cmake:
--------------------------------------------------------------------------------
1 | # IOKit_INCLUDE_DIR
2 | # IOKit_LIBRARIES
3 | # IOKit_FOUND
4 | include(LibFindMacros)
5 |
6 | # IOKit depends on CoreFoundation
7 | find_package(CoreFoundation REQUIRED)
8 |
9 | find_path(IOKit_INCLUDE_DIR
10 | IOKitLib.h
11 | PATH_SUFFIXES IOKit
12 | )
13 |
14 | find_library(IOKit_LIBRARY
15 | NAMES IOKit
16 | )
17 |
18 | set(IOKit_PROCESS_INCLUDES IOKit_INCLUDE_DIR CoreFoundation_INCLUDE_DIR)
19 | set(IOKit_PROCESS_LIBS IOKit_LIBRARY CoreFoundation_LIBRARIES)
20 | libfind_process(IOKit)
21 |
--------------------------------------------------------------------------------
/3rdparty/libusb/libusb-1.0.pc.cmake:
--------------------------------------------------------------------------------
1 | prefix=@CMAKE_INSTALL_PREFIX@
2 | libdir=@CMAKE_INSTALL_PREFIX@/lib@
3 | includedir=@CMAKE_INSTALL_PREFIX@/include@
4 |
5 | Name: libusb-1.0
6 | Description: C API for USB device access from Linux, Mac OS X and Windows userspace
7 | Version: @VERSION@
8 | Libs: -L${libdir} -lusb-1.0
9 | Libs.private: @LIBUSB_LIB_DEPENDS@
10 | Cflags: -I${includedir}/libusb-1.0
11 |
12 |
--------------------------------------------------------------------------------
/3rdparty/llvm/llvm_build.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hh;hpp;hxx;hm;inl;inc;xsd
11 |
12 |
13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |
16 |
17 |
--------------------------------------------------------------------------------
/3rdparty/llvm/llvm_build_clang_cl.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {fad608c4-4182-4423-85ed-9d1813b9c696}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {02fc0ad3-18aa-4762-b24b-8226dfb0e223}
10 | h;hh;hpp;hxx;hm;inl;inc;xsd
11 |
12 |
13 | {22cf2f8c-de87-4f6f-9b26-a5b9b746968c}
14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |
16 |
17 |
--------------------------------------------------------------------------------
/3rdparty/miniupnp/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | option (UPNPC_BUILD_STATIC "Build static library" TRUE)
2 | option (UPNPC_BUILD_SHARED "Build shared library" FALSE)
3 | option (UPNPC_BUILD_TESTS "Build test executables" FALSE)
4 | option (UPNPC_BUILD_SAMPLE "Build sample executables" FALSE)
5 | option (NO_GETADDRINFO "Define NO_GETADDRINFO" FALSE)
6 | option (UPNPC_NO_INSTALL "Disable installation" TRUE)
7 |
8 | add_subdirectory(miniupnp/miniupnpc EXCLUDE_FROM_ALL)
9 |
--------------------------------------------------------------------------------
/3rdparty/opencv/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # OpenCV
2 |
3 | set(OPENCV_TARGET 3rdparty_dummy_lib PARENT_SCOPE)
4 |
5 | if (USE_SYSTEM_OPENCV)
6 | message(STATUS "RPCS3: using system OpenCV")
7 | find_package(OpenCV COMPONENTS core photo)
8 |
9 | if(OPENCV_FOUND)
10 | message(STATUS "RPCS3: found system OpenCV")
11 | include_directories(${OpenCV_INCLUDE_DIRS})
12 | add_library(3rdparty_opencv INTERFACE)
13 | target_link_libraries(3rdparty_opencv INTERFACE ${OpenCV_LIBS})
14 | target_compile_definitions(3rdparty_opencv INTERFACE -DHAVE_OPENCV)
15 | set(OPENCV_TARGET 3rdparty_opencv PARENT_SCOPE)
16 | else()
17 | message(WARNING "RPCS3: OpenCV not found. Building without OpenCV support")
18 | endif()
19 | else()
20 | message(WARNING "RPCS3: Building without OpenCV support")
21 | endif()
22 |
--------------------------------------------------------------------------------
/3rdparty/rtmidi/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | option(RTMIDI_API_JACK "Compile with JACK support." OFF)
2 | option(RTMIDI_BUILD_TESTING "Build test programs" OFF)
3 | set(RTMIDI_TARGETNAME_UNINSTALL "uninstall-rpcs3-rtmidi")
4 | add_subdirectory(rtmidi EXCLUDE_FROM_ALL)
5 |
--------------------------------------------------------------------------------
/3rdparty/stblib/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | add_library(3rdparty_stblib INTERFACE)
2 | target_include_directories(3rdparty_stblib INTERFACE stb)
3 |
--------------------------------------------------------------------------------
/3rdparty/yaml-cpp/CMakeLists.txt:
--------------------------------------------------------------------------------
1 |
2 | # We don't want to install yaml-cpp but its cmake file doesn't have option
3 | # to disable it...
4 | # So we just install it to a different directory
5 | set(YAML_CPP_INSTALL OFF CACHE BOOL "Don't install YAML")
6 | set(YAML_CPP_DISABLE_UNINSTALL ON CACHE BOOL "Disable yaml-cpp uninstall")
7 |
8 | set(CMAKE_INSTALL_PREFIX_OLD ${CMAKE_INSTALL_PREFIX})
9 | set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/yaml-cpp_install)
10 |
11 | set(YAML_CPP_BUILD_TESTS OFF CACHE BOOL "Enable testing" FORCE)
12 | set(YAML_CPP_BUILD_TOOLS OFF CACHE BOOL "Enable parse tools" FORCE)
13 | set(YAML_CPP_BUILD_CONTRIB OFF CACHE BOOL "Enable contrib stuff in library" FORCE)
14 | add_subdirectory(yaml-cpp EXCLUDE_FROM_ALL)
15 |
16 | set(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX_OLD})
17 |
--------------------------------------------------------------------------------
/3rdparty/zlib/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | if (USE_SYSTEM_ZLIB)
2 | message(STATUS "RPCS3: Using system ZLIB")
3 | find_package(ZLIB QUIET REQUIRED)
4 |
5 | add_library(3rdparty_zlib INTERFACE)
6 | target_link_libraries(3rdparty_zlib INTERFACE ZLIB::ZLIB)
7 | target_compile_definitions(3rdparty_zlib INTERFACE -DZLIB_CONST=1)
8 | else()
9 | option(ZLIB_BUILD_EXAMPLES "Enable Zlib Examples" OFF)
10 | message(STATUS "RPCS3: Using builtin ZLIB")
11 | set(SKIP_INSTALL_ALL ON)
12 | add_subdirectory(zlib EXCLUDE_FROM_ALL)
13 |
14 | add_library(3rdparty_zlib INTERFACE)
15 | target_link_libraries(3rdparty_zlib INTERFACE zlibstatic)
16 | target_include_directories(3rdparty_zlib INTERFACE zlib ${CMAKE_CURRENT_BINARY_DIR}/zlib)
17 | target_compile_definitions(3rdparty_zlib INTERFACE -DZLIB_CONST=1)
18 | endif()
19 |
--------------------------------------------------------------------------------
/3rdparty/zstd/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | option(ZSTD_BUILD_PROGRAMS "BUILD PROGRAMS" OFF)
2 | option(ZSTD_BUILD_SHARED "BUILD SHARED LIBRARIES" OFF)
3 | option(ZSTD_BUILD_STATIC "BUILD STATIC LIBRARIES" ON)
4 | option(ZSTD_BUILD_TESTS "BUILD TESTS" OFF)
5 |
6 | add_subdirectory(zstd/build/cmake EXLUDE_FROM_ALL)
7 | add_library(3rdparty_zstd INTERFACE)
8 | target_link_libraries(3rdparty_zstd INTERFACE libzstd_static)
9 |
--------------------------------------------------------------------------------
/Utilities/cheat_info.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "util/types.hpp"
4 |
5 | #include
6 |
7 | enum class cheat_type : u8
8 | {
9 | unsigned_8_cheat,
10 | unsigned_16_cheat,
11 | unsigned_32_cheat,
12 | unsigned_64_cheat,
13 | signed_8_cheat,
14 | signed_16_cheat,
15 | signed_32_cheat,
16 | signed_64_cheat,
17 | float_32_cheat,
18 | max
19 | };
20 |
21 | constexpr u8 cheat_type_max = static_cast(cheat_type::max);
22 |
23 | struct cheat_info
24 | {
25 | std::string game{};
26 | std::string description{};
27 | cheat_type type = cheat_type::max;
28 | u32 offset{};
29 | std::string red_script{};
30 |
31 | bool from_str(const std::string& cheat_line);
32 | std::string to_str() const;
33 | };
34 |
--------------------------------------------------------------------------------
/Utilities/date_time.cpp:
--------------------------------------------------------------------------------
1 | #include "stdafx.h"
2 | #include "date_time.h"
3 |
4 | #include
5 |
6 | template <>
7 | void fmt_class_string>::format(std::string& out, u64 arg)
8 | {
9 | const std::time_t dateTime = std::chrono::system_clock::to_time_t(get_object(arg));
10 | out += date_time::fmt_time("%Y-%m-%dT%H:%M:%S", dateTime);
11 | }
12 |
--------------------------------------------------------------------------------
/Utilities/ppu_patch.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 | #include
6 |
7 | // Patch utilities specific to PPU code
8 | struct ppu_patch_block_registry_t
9 | {
10 | ppu_patch_block_registry_t() = default;
11 | ppu_patch_block_registry_t(const ppu_patch_block_registry_t&) = delete;
12 | ppu_patch_block_registry_t& operator=(const ppu_patch_block_registry_t&) = delete;
13 |
14 | std::unordered_set block_addresses{};
15 | };
16 |
17 | void ppu_register_range(u32 addr, u32 size);
18 | bool ppu_form_branch_to_code(u32 entry, u32 target, bool link = false, bool with_toc = false, std::string module_name = {});
19 | u32 ppu_generate_id(std::string_view name);
20 |
--------------------------------------------------------------------------------
/bin/GuiConfigs/YoRHa-background.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/GuiConfigs/YoRHa-background.jpg
--------------------------------------------------------------------------------
/bin/GuiConfigs/check_mark_white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/GuiConfigs/check_mark_white.png
--------------------------------------------------------------------------------
/bin/GuiConfigs/kot-bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/GuiConfigs/kot-bg.jpg
--------------------------------------------------------------------------------
/bin/GuiConfigs/list_arrow_blue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/GuiConfigs/list_arrow_blue.png
--------------------------------------------------------------------------------
/bin/GuiConfigs/list_arrow_down_blue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/GuiConfigs/list_arrow_down_blue.png
--------------------------------------------------------------------------------
/bin/GuiConfigs/list_arrow_down_green.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/GuiConfigs/list_arrow_down_green.png
--------------------------------------------------------------------------------
/bin/GuiConfigs/list_arrow_down_white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/GuiConfigs/list_arrow_down_white.png
--------------------------------------------------------------------------------
/bin/GuiConfigs/list_arrow_green.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/GuiConfigs/list_arrow_green.png
--------------------------------------------------------------------------------
/bin/GuiConfigs/list_arrow_white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/GuiConfigs/list_arrow_white.png
--------------------------------------------------------------------------------
/bin/Icons/ui/L1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/Icons/ui/L1.png
--------------------------------------------------------------------------------
/bin/Icons/ui/L2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/Icons/ui/L2.png
--------------------------------------------------------------------------------
/bin/Icons/ui/R1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/Icons/ui/R1.png
--------------------------------------------------------------------------------
/bin/Icons/ui/R2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/Icons/ui/R2.png
--------------------------------------------------------------------------------
/bin/Icons/ui/circle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/Icons/ui/circle.png
--------------------------------------------------------------------------------
/bin/Icons/ui/cross.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/Icons/ui/cross.png
--------------------------------------------------------------------------------
/bin/Icons/ui/dpad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/Icons/ui/dpad.png
--------------------------------------------------------------------------------
/bin/Icons/ui/dpad_down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/Icons/ui/dpad_down.png
--------------------------------------------------------------------------------
/bin/Icons/ui/dpad_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/Icons/ui/dpad_left.png
--------------------------------------------------------------------------------
/bin/Icons/ui/dpad_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/Icons/ui/dpad_right.png
--------------------------------------------------------------------------------
/bin/Icons/ui/dpad_up.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/Icons/ui/dpad_up.png
--------------------------------------------------------------------------------
/bin/Icons/ui/fade_bottom.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/Icons/ui/fade_bottom.png
--------------------------------------------------------------------------------
/bin/Icons/ui/fade_top.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/Icons/ui/fade_top.png
--------------------------------------------------------------------------------
/bin/Icons/ui/left_stick.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/Icons/ui/left_stick.png
--------------------------------------------------------------------------------
/bin/Icons/ui/new.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/Icons/ui/new.png
--------------------------------------------------------------------------------
/bin/Icons/ui/right_stick.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/Icons/ui/right_stick.png
--------------------------------------------------------------------------------
/bin/Icons/ui/save.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/Icons/ui/save.png
--------------------------------------------------------------------------------
/bin/Icons/ui/select.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/Icons/ui/select.png
--------------------------------------------------------------------------------
/bin/Icons/ui/spinner-24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/Icons/ui/spinner-24.png
--------------------------------------------------------------------------------
/bin/Icons/ui/square.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/Icons/ui/square.png
--------------------------------------------------------------------------------
/bin/Icons/ui/start.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/Icons/ui/start.png
--------------------------------------------------------------------------------
/bin/Icons/ui/triangle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/Icons/ui/triangle.png
--------------------------------------------------------------------------------
/bin/test/dump_stack.elf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/test/dump_stack.elf
--------------------------------------------------------------------------------
/bin/test/gs_gcm_basic_triangle.elf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/test/gs_gcm_basic_triangle.elf
--------------------------------------------------------------------------------
/bin/test/gs_gcm_cube.elf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/test/gs_gcm_cube.elf
--------------------------------------------------------------------------------
/bin/test/gs_gcm_handle_system_cmd.elf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/test/gs_gcm_handle_system_cmd.elf
--------------------------------------------------------------------------------
/bin/test/gs_gcm_hello_world.elf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/test/gs_gcm_hello_world.elf
--------------------------------------------------------------------------------
/bin/test/gs_gcm_tetris.elf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/test/gs_gcm_tetris.elf
--------------------------------------------------------------------------------
/bin/test/pad_test.elf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/test/pad_test.elf
--------------------------------------------------------------------------------
/bin/test/ppu_thread.elf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/test/ppu_thread.elf
--------------------------------------------------------------------------------
/bin/test/pspgame.elf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/test/pspgame.elf
--------------------------------------------------------------------------------
/bin/test/rpcsp.elf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/test/rpcsp.elf
--------------------------------------------------------------------------------
/bin/test/spurs_test.self:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RPCS3/rpcs3/99db73a34fd3d988d0a944f2adf259605da57bf7/bin/test/spurs_test.self
--------------------------------------------------------------------------------
/buildfiles/cmake/FindWolfSSL.cmake:
--------------------------------------------------------------------------------
1 | set(WOLFSSL_LIBRARY ON)
2 | set(WOLFSSL_INCLUDE_DIR ON)
3 | set(WOLFSSL_LIBRARIES wolfssl)
4 | set(WOLFSSL_FOUND TRUE)
5 |
--------------------------------------------------------------------------------
/buildfiles/cmake/FindZLIB.cmake:
--------------------------------------------------------------------------------
1 | if(USE_SYSTEM_ZLIB)
2 | list(REMOVE_ITEM CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
3 | find_package(ZLIB)
4 | list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
5 | else()
6 | add_library(ZLIB::ZLIB INTERFACE IMPORTED)
7 | set_target_properties(ZLIB::ZLIB PROPERTIES
8 | INTERFACE_LINK_LIBRARIES zlibstatic
9 | INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_SOURCE_DIR}/3rdparty/zlib/zlib;${CMAKE_BINARY_DIR}/3rdparty/zlib/zlib")
10 | set(ZLIB_FOUND TRUE)
11 | endif()
12 |
--------------------------------------------------------------------------------
/buildfiles/msvc/ci_only.targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | None
6 | true
7 |
8 |
9 | UseLinkTimeCodeGeneration
10 |
11 |
12 |
--------------------------------------------------------------------------------
/buildfiles/msvc/common_default_macros.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | $(DefaultPlatformToolset)
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/darwin/util/sysinfo_darwin.mm:
--------------------------------------------------------------------------------
1 | #pragma GCC diagnostic push
2 | #pragma GCC diagnostic ignored "-Wold-style-cast"
3 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4 | #pragma GCC diagnostic ignored "-Wmissing-declarations"
5 | #import
6 | #pragma GCC diagnostic pop
7 |
8 | namespace Darwin_Version
9 | {
10 | NSOperatingSystemVersion osver = NSProcessInfo.processInfo.operatingSystemVersion;
11 |
12 | int getNSmajorVersion()
13 | {
14 | return osver.majorVersion;
15 | }
16 |
17 | int getNSminorVersion()
18 | {
19 | return osver.minorVersion;
20 | }
21 |
22 | int getNSpatchVersion()
23 | {
24 | return osver.patchVersion;
25 | }
26 | }
27 |
28 | namespace Darwin_ProcessInfo
29 | {
30 | bool getLowPowerModeEnabled()
31 | {
32 | return NSProcessInfo.processInfo.isLowPowerModeEnabled;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/pre-commit.readme:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # git pre-commit hook that run git-clang-format when committing.
4 | # To use it install clang-format and python 2.7 then copy this
5 | # file to .git/hooks/ and remove the extension
6 |
7 | git clang-format --style=file --diff > style.patch
8 | git apply --index style.patch
9 | rm style.patch
10 | exit 0
11 |
--------------------------------------------------------------------------------
/rpcs3/Crypto/decrypt_binaries.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | class decrypt_binaries_t
4 | {
5 | std::vector m_klics;
6 | std::vector m_modules;
7 | usz m_index = 0;
8 |
9 | public:
10 | decrypt_binaries_t(std::vector modules) noexcept
11 | : m_modules(std::move(modules))
12 | {
13 | }
14 |
15 | usz decrypt(std::string_view klic_input = {});
16 |
17 | bool done() const
18 | {
19 | return m_index >= m_modules.size();
20 | }
21 |
22 | const std::string& operator[](usz index) const
23 | {
24 | return ::at32(m_modules, index);
25 | }
26 | };
27 |
--------------------------------------------------------------------------------
/rpcs3/Crypto/ec.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | // Copyright (C) 2014 Hykem
4 | // Licensed under the terms of the GNU GPL, version 2.0 or later versions.
5 | // http://www.gnu.org/licenses/gpl-2.0.txt
6 |
7 | #include "util/types.hpp"
8 |
9 | void ecdsa_set_curve(const u8* p, const u8* a, const u8* b, const u8* N, const u8* Gx, const u8* Gy);
10 | void ecdsa_set_pub(const u8* Q);
11 | void ecdsa_set_priv(const u8* k);
12 | bool ecdsa_verify(const u8* hash, u8* R, u8* S);
13 |
--------------------------------------------------------------------------------
/rpcs3/Crypto/lz.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | // Copyright (C) 2014 Hykem
4 | // Licensed under the terms of the GNU GPL, version 2.0 or later versions.
5 | // http://www.gnu.org/licenses/gpl-2.0.txt
6 |
7 | // Reverse-engineered custom Lempel–Ziv–Markov based compression.
8 |
9 | void decode_range(unsigned int *range, unsigned int *code, unsigned char **src);
10 | int decode_bit(unsigned int *range, unsigned int *code, int *index, unsigned char **src, unsigned char *c);
11 | int decode_number(unsigned char *ptr, int index, int *bit_flag, unsigned int *range, unsigned int *code, unsigned char **src);
12 | int decode_word(unsigned char *ptr, int index, int *bit_flag, unsigned int *range, unsigned int *code, unsigned char **src);
13 | int decompress(unsigned char *out, unsigned char *in, unsigned int size);
14 |
--------------------------------------------------------------------------------
/rpcs3/Crypto/unzip.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | std::vector unzip(const void* src, usz size);
4 |
5 | template
6 | inline std::vector unzip(const T& src)
7 | {
8 | return unzip(src.data(), src.size());
9 | }
10 |
11 | bool unzip(const void* src, usz size, fs::file& out);
12 |
13 | template
14 | inline bool unzip(const std::vector& src, fs::file& out)
15 | {
16 | return unzip(src.data(), src.size(), out);
17 | }
18 |
19 | bool zip(const void* src, usz size, fs::file& out, bool multi_thread_it = false);
20 |
21 | template
22 | inline bool zip(const T& src, fs::file& out)
23 | {
24 | return zip(src.data(), src.size(), out);
25 | }
26 |
--------------------------------------------------------------------------------
/rpcs3/Cubeb.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {F573EFFC-2BB8-43DF-AEFA-4E9EA31A817F}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 |
10 |
11 | Source Files
12 |
13 |
14 | Source Files
15 |
16 |
17 |
18 |
19 | Source Files
20 |
21 |
22 | Source Files
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Audio/Cubeb/cubeb_enumerator.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Emu/Audio/audio_device_enumerator.h"
4 |
5 | #include "cubeb/cubeb.h"
6 |
7 | class cubeb_enumerator final : public audio_device_enumerator
8 | {
9 | public:
10 |
11 | cubeb_enumerator();
12 | ~cubeb_enumerator() override;
13 |
14 | std::vector get_output_devices() override;
15 |
16 | private:
17 |
18 | cubeb* ctx{};
19 | #ifdef _WIN32
20 | bool com_init_success = false;
21 | #endif
22 | };
23 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Audio/FAudio/faudio_enumerator.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #ifndef HAVE_FAUDIO
4 | #error "FAudio support disabled but still being built."
5 | #endif
6 |
7 | #include "Emu/Audio/audio_device_enumerator.h"
8 | #include "FAudio.h"
9 |
10 | class faudio_enumerator final : public audio_device_enumerator
11 | {
12 | public:
13 |
14 | faudio_enumerator();
15 | ~faudio_enumerator() override;
16 |
17 | std::vector get_output_devices() override;
18 |
19 | private:
20 |
21 | FAudio* instance{};
22 | };
23 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Audio/Null/NullAudioBackend.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Emu/Audio/AudioBackend.h"
4 |
5 | class NullAudioBackend final : public AudioBackend
6 | {
7 | public:
8 | NullAudioBackend() {}
9 | ~NullAudioBackend() {}
10 |
11 | std::string_view GetName() const override { return "Null"sv; }
12 |
13 | bool Open(std::string_view /* dev_id */, AudioFreq /* freq */, AudioSampleSize /* sample_size */, AudioChannelCnt /* ch_cnt */, audio_channel_layout /*layout*/) override
14 | {
15 | Close();
16 | return true;
17 | }
18 | void Close() override { m_playing = false; }
19 |
20 | f64 GetCallbackFrameLen() override { return 0.01; };
21 |
22 | void Play() override { m_playing = true; }
23 | void Pause() override { m_playing = false; }
24 | bool IsPlaying() override { return m_playing; }
25 |
26 | private:
27 | bool m_playing = false;
28 | };
29 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Audio/Null/null_enumerator.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Emu/Audio/audio_device_enumerator.h"
4 |
5 | class null_enumerator final : public audio_device_enumerator
6 | {
7 | public:
8 |
9 | null_enumerator() {};
10 | ~null_enumerator() override {};
11 |
12 | std::vector get_output_devices() override { return {}; }
13 | };
14 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Audio/XAudio2/xaudio2_enumerator.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #ifndef _WIN32
4 | #error "XAudio2 can only be built on Windows."
5 | #endif
6 |
7 | #include "Emu/Audio/audio_device_enumerator.h"
8 |
9 | class xaudio2_enumerator final : public audio_device_enumerator
10 | {
11 | public:
12 |
13 | xaudio2_enumerator();
14 | ~xaudio2_enumerator() override;
15 |
16 | std::vector get_output_devices() override;
17 | };
18 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Audio/audio_device_enumerator.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "util/types.hpp"
4 | #include
5 | #include
6 |
7 | class audio_device_enumerator
8 | {
9 | public:
10 |
11 | static constexpr std::string_view DEFAULT_DEV_ID = "@@@default@@@";
12 |
13 | struct audio_device
14 | {
15 | std::string id{};
16 | std::string name{};
17 | usz max_ch{};
18 | };
19 |
20 | audio_device_enumerator() {};
21 |
22 | virtual ~audio_device_enumerator() = default;
23 |
24 | // Enumerate available output devices.
25 | virtual std::vector get_output_devices() = 0;
26 | };
27 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Audio/audio_resampler.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "util/types.hpp"
4 | #include "Emu/Audio/AudioBackend.h"
5 |
6 | #ifndef _MSC_VER
7 | #pragma GCC diagnostic push
8 | #pragma GCC diagnostic ignored "-Wsuggest-override"
9 | #pragma GCC diagnostic ignored "-Wold-style-cast"
10 | #endif
11 | #include "SoundTouch.h"
12 | #ifndef _MSC_VER
13 | #pragma GCC diagnostic pop
14 | #endif
15 |
16 | constexpr f64 RESAMPLER_MAX_FREQ_VAL = 1.0;
17 | constexpr f64 RESAMPLER_MIN_FREQ_VAL = 0.1;
18 |
19 | class audio_resampler
20 | {
21 | public:
22 | audio_resampler();
23 | ~audio_resampler();
24 |
25 | void set_params(AudioChannelCnt ch_cnt, AudioFreq freq);
26 | f64 set_tempo(f64 new_tempo);
27 |
28 | void put_samples(const f32* buf, u32 sample_cnt);
29 | std::pair get_samples(u32 sample_cnt);
30 |
31 | u32 samples_available() const;
32 | f64 get_resample_ratio();
33 |
34 | void flush();
35 |
36 | private:
37 | soundtouch::SoundTouch resampler{};
38 | };
39 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Audio/audio_utils.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | namespace audio
4 | {
5 | struct audio_fxo
6 | {
7 | atomic_t audio_muted {false};
8 | };
9 |
10 | f32 get_volume();
11 |
12 | void toggle_mute();
13 | void change_volume(s32 delta);
14 | }
15 |
--------------------------------------------------------------------------------
/rpcs3/Emu/CPU/Hypervisor.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 |
5 | namespace rpcs3
6 | {
7 | #if defined(ARCH_x64)
8 | union hypervisor_context_t
9 | {
10 | u64 regs[1];
11 | struct
12 | {
13 | u64 rsp;
14 | } x86;
15 | };
16 |
17 | static_assert(sizeof(hypervisor_context_t) == 8);
18 | #else
19 | union alignas(16) hypervisor_context_t
20 | {
21 | u64 regs[16];
22 |
23 | struct
24 | {
25 | u64 pc;
26 | u64 sp;
27 |
28 | u64 x18;
29 | u64 x19;
30 | u64 x20;
31 | u64 x21;
32 | u64 x22;
33 | u64 x23;
34 | u64 x24;
35 | u64 x25;
36 | u64 x26;
37 | u64 x27;
38 | u64 x28;
39 | u64 x29;
40 | u64 x30;
41 |
42 | // x0-x17 unused
43 | } aarch64;
44 | };
45 | #endif
46 | }
47 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Cell/Modules/StaticHLE.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "util/types.hpp"
4 | #include "Emu/Memory/vm_ptr.h"
5 | #include
6 |
7 | struct shle_pattern
8 | {
9 | u16 start_pattern[32];
10 | u8 crc16_length;
11 | u16 crc16;
12 | u16 total_length;
13 | std::string _module;
14 | std::string name;
15 |
16 | u32 fnid;
17 | };
18 |
19 | class statichle_handler
20 | {
21 | public:
22 | statichle_handler(int);
23 | ~statichle_handler();
24 |
25 | statichle_handler(const statichle_handler&) = delete;
26 | statichle_handler& operator=(const statichle_handler&) = delete;
27 |
28 | bool load_patterns();
29 | bool check_against_patterns(vm::cptr& data, u32 size, u32 addr);
30 |
31 | protected:
32 | static u16 gen_CRC16(const u8* data_p, usz length);
33 |
34 | std::vector hle_patterns;
35 | };
36 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Cell/Modules/cellBgdl.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Emu/Memory/vm_ptr.h"
4 |
5 | // Return Codes
6 | enum
7 | {
8 | CELL_BGDL_UTIL_ERROR_BUSY = 0x8002ce01,
9 | CELL_BGDL_UTIL_ERROR_INTERNAL = 0x8002ce02,
10 | CELL_BGDL_UTIL_ERROR_PARAM = 0x8002ce03,
11 | CELL_BGDL_UTIL_ERROR_ACCESS_ERROR = 0x8002ce04,
12 | CELL_BGDL_UTIL_ERROR_INITIALIZE = 0x8002ce05,
13 | };
14 |
15 | enum CellBGDLState : s32
16 | {
17 | CELL_BGDL_STATE_ERROR = 0,
18 | CELL_BGDL_STATE_PAUSE,
19 | CELL_BGDL_STATE_READY,
20 | CELL_BGDL_STATE_RUN,
21 | CELL_BGDL_STATE_COMPLETE,
22 | };
23 |
24 | enum CellBGDLMode : s32
25 | {
26 | CELL_BGDL_MODE_AUTO = 0,
27 | CELL_BGDL_MODE_ALWAYS_ALLOW,
28 | };
29 |
30 | struct CellBGDLInfo
31 | {
32 | be_t received_size;
33 | be_t content_size;
34 | be_t state; // CellBGDLState
35 | vm::bptr reserved;
36 | };
37 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Cell/Modules/cellDmuxPamf.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | struct CellDmuxPamfAttr
4 | {
5 | be_t maxEnabledEsNum;
6 | be_t version;
7 | be_t memSize;
8 | };
9 |
10 | struct CellDmuxPamfEsAttr
11 | {
12 | be_t auQueueMaxSize;
13 | be_t memSize;
14 | be_t specificInfoSize;
15 | };
16 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Cell/Modules/cellFontFT.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "cellFont.h"
4 |
5 | #include "Emu/Memory/vm_ptr.h"
6 |
7 | struct CellFontLibraryConfigFT
8 | {
9 | vm::bptr library;
10 | CellFontMemoryInterface MemoryIF;
11 | };
12 |
13 | using CellFontRendererConfigFT = CellFontRendererConfig;
14 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Cell/Modules/cellFs.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Emu/Memory/vm_ptr.h"
4 |
5 | // CellFsRingBuffer.copy
6 | enum : s32
7 | {
8 | CELL_FS_ST_COPY = 0,
9 | CELL_FS_ST_COPYLESS = 1,
10 | };
11 |
12 | struct CellFsRingBuffer
13 | {
14 | be_t ringbuf_size;
15 | be_t block_size;
16 | be_t transfer_rate;
17 | be_t copy;
18 | };
19 |
20 | // cellFsStReadGetStatus status
21 | enum : u64
22 | {
23 | CELL_FS_ST_INITIALIZED = 0x0001,
24 | CELL_FS_ST_NOT_INITIALIZED = 0x0002,
25 | CELL_FS_ST_STOP = 0x0100,
26 | CELL_FS_ST_PROGRESS = 0x0200,
27 | };
28 |
29 | enum : s32
30 | {
31 | CELL_FS_AIO_MAX_FS = 10, // cellFsAioInit limit
32 | CELL_FS_AIO_MAX_REQUEST = 32, // cellFsAioRead request limit per mount point
33 | };
34 |
35 | struct CellFsAio
36 | {
37 | be_t fd;
38 | be_t offset;
39 | vm::bptrb buf;
40 | be_t size;
41 | be_t user_data;
42 | };
43 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Cell/Modules/cellLibprof.cpp:
--------------------------------------------------------------------------------
1 | #include "stdafx.h"
2 | #include "Emu/Cell/PPUModule.h"
3 |
4 | LOG_CHANNEL(cellLibprof);
5 |
6 | error_code cellUserTraceInit()
7 | {
8 | UNIMPLEMENTED_FUNC(cellLibprof);
9 | return CELL_OK;
10 | }
11 |
12 | error_code cellUserTraceRegister()
13 | {
14 | UNIMPLEMENTED_FUNC(cellLibprof);
15 | return CELL_OK;
16 | }
17 |
18 | error_code cellUserTraceUnregister()
19 | {
20 | UNIMPLEMENTED_FUNC(cellLibprof);
21 | return CELL_OK;
22 | }
23 |
24 | error_code cellUserTraceTerminate()
25 | {
26 | UNIMPLEMENTED_FUNC(cellLibprof);
27 | return CELL_OK;
28 | }
29 |
30 | DECLARE(ppu_module_manager::cellLibprof)("cellLibprof", []()
31 | {
32 | REG_FUNC(cellLibprof, cellUserTraceInit);
33 | REG_FUNC(cellLibprof, cellUserTraceRegister);
34 | REG_FUNC(cellLibprof, cellUserTraceUnregister);
35 | REG_FUNC(cellLibprof, cellUserTraceTerminate);
36 | });
37 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Cell/Modules/cellRemotePlay.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | enum CellRemotePlayError : u32
4 | {
5 | CELL_REMOTEPLAY_ERROR_INTERNAL = 0x80029830
6 | };
7 |
8 | enum
9 | {
10 | CELL_REMOTEPLAY_STATUS_LOADING = 0x00000000,
11 | CELL_REMOTEPLAY_STATUS_WAIT = 0x00000001,
12 | CELL_REMOTEPLAY_STATUS_RUNNING = 0x00000002,
13 | CELL_REMOTEPLAY_STATUS_UNLOADING = 0x00000003,
14 | CELL_REMOTEPLAY_STATUS_FATALERROR = 0x00000004,
15 | CELL_REMOTEPLAY_STATUS_PREMOEND = 0x00000005,
16 | };
17 |
18 | enum
19 | {
20 | CELL_REMOTEPLAY_M4V_MEMORY_CONTAINER_SIZE = 8 * 1024 * 1024,
21 | CELL_REMOTEPLAY_AVC_MEMORY_CONTAINER_SIZE = 10 * 1024 * 1024,
22 | CELL_REMOTEPLAY_480P_MEMORY_CONTAINER_SIZE = 10 * 1024 * 1024,
23 | };
24 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Cell/Modules/cellSpudll.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Emu/Memory/vm_ptr.h"
4 |
5 | enum CellSpudllError : u32
6 | {
7 | CELL_SPUDLL_ERROR_INVAL = 0x80410602,
8 | CELL_SPUDLL_ERROR_STAT = 0x8041060f,
9 | CELL_SPUDLL_ERROR_ALIGN = 0x80410610,
10 | CELL_SPUDLL_ERROR_NULL_POINTER = 0x80410611,
11 | CELL_SPUDLL_ERROR_SRCH = 0x80410605,
12 | CELL_SPUDLL_ERROR_UNDEF = 0x80410612,
13 | CELL_SPUDLL_ERROR_FATAL = 0x80410613,
14 | };
15 |
16 | struct CellSpudllHandleConfig
17 | {
18 | be_t mode;
19 | be_t dmaTag;
20 | be_t numMaxReferred;
21 | be_t numMaxDepend;
22 | vm::bptr unresolvedSymbolValueForFunc;
23 | vm::bptr unresolvedSymbolValueForObject;
24 | vm::bptr unresolvedSymbolValueForOther;
25 | be_t __reserved__[9];
26 | };
27 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Cell/Modules/cellSpursJq.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Cell/Modules/cellSysconf.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Emu/Memory/vm_ptr.h"
4 |
5 | typedef void(CellSysconfCallback)(s32 result, vm::ptr userdata);
6 |
7 | struct CellSysconfBtDeviceInfo
8 | {
9 | be_t deviceId;
10 | be_t deviceType; // CellSysconfBtDeviceType
11 | be_t state; // CellSysconfBtDeviceState
12 | char name[64];
13 | be_t reserved[4];
14 | };
15 |
16 | struct CellSysconfBtDeviceList
17 | {
18 | CellSysconfBtDeviceInfo device[16];
19 | };
20 |
21 | enum CellSysconfBtDeviceType : s32
22 | {
23 | CELL_SYSCONF_BT_DEVICE_TYPE_AUDIO = 0x00000001,
24 | CELL_SYSCONF_BT_DEVICE_TYPE_HID = 0x00000002,
25 | };
26 |
27 | enum CellSysconfBtDeviceState : s32
28 | {
29 | CELL_SYSCONF_BT_DEVICE_STATE_UNAVAILABLE = 0,
30 | CELL_SYSCONF_BT_DEVICE_STATE_AVAILABLE = 1,
31 | };
32 |
33 | enum CellSysConfError : u32
34 | {
35 | CELL_SYSCONF_ERROR_PARAM = 0x8002bb01
36 | };
37 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Cell/Modules/cellSysutilMisc.cpp:
--------------------------------------------------------------------------------
1 | #include "stdafx.h"
2 | #include "Emu/system_config.h"
3 | #include "Emu/Cell/PPUModule.h"
4 | #include "cellSysutil.h"
5 |
6 | LOG_CHANNEL(cellSysutilMisc);
7 |
8 | s32 cellSysutilGetLicenseArea()
9 | {
10 | cellSysutilMisc.warning("cellSysutilGetLicenseArea()");
11 |
12 | const CellSysutilLicenseArea license_area = g_cfg.sys.license_area;
13 | cellSysutilMisc.notice("cellSysutilGetLicenseArea(): %s", license_area);
14 | return license_area;
15 | }
16 |
17 | DECLARE(ppu_module_manager::cellSysutilMisc)("cellSysutilMisc", []()
18 | {
19 | REG_FUNC(cellSysutilMisc, cellSysutilGetLicenseArea);
20 | });
21 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Cell/Modules/libfs_utility_init.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Cell/Modules/libsynth2.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | // Error Codes
4 | enum CellSoundSynth2Error : u32
5 | {
6 | CELL_SOUND_SYNTH2_ERROR_FATAL = 0x80310201,
7 | CELL_SOUND_SYNTH2_ERROR_INVALID_PARAMETER = 0x80310202,
8 | CELL_SOUND_SYNTH2_ERROR_ALREADY_INITIALIZED = 0x80310203,
9 | };
10 |
11 | struct CellSoundSynth2EffectAttr
12 | {
13 | be_t core;
14 | be_t mode;
15 | be_t depth_L;
16 | be_t depth_R;
17 | be_t delay;
18 | be_t feedback;
19 | };
20 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Cell/Modules/sceNpPlus.cpp:
--------------------------------------------------------------------------------
1 | #include "stdafx.h"
2 |
3 | #include "Emu/Cell/PPUModule.h"
4 |
5 | LOG_CHANNEL(sceNpPlus);
6 |
7 | error_code sceNpManagerIsSP()
8 | {
9 | sceNpPlus.warning("sceNpManagerIsSP()");
10 | // TODO seems to be cut to 1 byte by pshome likely a bool but may be more.
11 | return not_an_error(1);
12 | }
13 |
14 | DECLARE(ppu_module_manager::sceNpPlus)("sceNpPlus", []()
15 | {
16 | REG_FUNC(sceNpPlus, sceNpManagerIsSP);
17 | });
18 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Cell/Modules/sceNpPlus.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | error_code sceNpManagerIsSP();
4 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Cell/Modules/sceNpUtil.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | enum
4 | {
5 | SCE_NP_UTIL_BANDWIDTH_TEST_STATUS_NONE = 0,
6 | SCE_NP_UTIL_BANDWIDTH_TEST_STATUS_RUNNING = 1,
7 | SCE_NP_UTIL_BANDWIDTH_TEST_STATUS_FINISHED = 2
8 | };
9 |
10 | struct SceNpUtilBandwidthTestResult
11 | {
12 | be_t upload_bps;
13 | be_t download_bps;
14 | be_t result;
15 | s8 padding[4];
16 | };
17 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Cell/Modules/sys_crashdump.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "Emu/Memory/vm_ptr.h"
3 |
4 | enum
5 | {
6 | SYS_CRASH_DUMP_MAX_LABEL_SIZE = 16,
7 | SYS_CRASH_DUMP_MAX_LOG_AREA = 127 // not actually defined in CELL
8 | };
9 |
10 | struct sys_crash_dump_log_area_info_t
11 | {
12 | char label[SYS_CRASH_DUMP_MAX_LABEL_SIZE]; // 15 + 1 (0 terminated)
13 | vm::bptr addr;
14 | be_t size;
15 | };
16 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Cell/Modules/sys_net_.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Emu/Cell/lv2/sys_net.h"
4 |
5 | struct sys_net_sockinfo_t
6 | {
7 | be_t s;
8 | be_t proto;
9 | be_t recv_queue_length;
10 | be_t send_queue_length;
11 | sys_net_in_addr local_adr;
12 | be_t local_port;
13 | sys_net_in_addr remote_adr;
14 | be_t remote_port;
15 | be_t state;
16 | };
17 |
18 | struct sys_net_sockinfo_ex_t
19 | {
20 | be_t s;
21 | be_t proto;
22 | be_t recv_queue_length;
23 | be_t send_queue_length;
24 | sys_net_in_addr local_adr;
25 | be_t local_port;
26 | sys_net_in_addr remote_adr;
27 | be_t remote_port;
28 | be_t state;
29 | be_t socket_type;
30 | be_t local_vport;
31 | be_t remote_vport;
32 | be_t reserved[8];
33 | };
34 |
35 | struct sys_net_initialize_parameter_t
36 | {
37 | vm::bptr memory;
38 | be_t memory_size;
39 | be_t flags;
40 | };
41 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Cell/RawSPUThread.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Cell/SPUAnalyser.cpp:
--------------------------------------------------------------------------------
1 | #include "stdafx.h"
2 | #include "SPUAnalyser.h"
3 | #include "SPUOpcodes.h"
4 |
5 | const extern spu_decoder g_spu_itype{};
6 | const extern spu_decoder g_spu_iname{};
7 | const extern spu_decoder g_spu_iflag{};
8 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Cell/SPUInterpreter.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "SPUOpcodes.h"
4 |
5 | class spu_thread;
6 |
7 | using spu_intrp_func_t = bool(*)(spu_thread& spu, spu_opcode_t op);
8 |
9 | template
10 | struct spu_interpreter_t;
11 |
12 | struct spu_interpreter
13 | {
14 | static void set_interrupt_status(spu_thread&, spu_opcode_t);
15 | };
16 |
17 | struct spu_interpreter_rt_base
18 | {
19 | protected:
20 | std::unique_ptr> ptrs;
21 |
22 | spu_interpreter_rt_base() noexcept;
23 |
24 | spu_interpreter_rt_base(const spu_interpreter_rt_base&) = delete;
25 |
26 | spu_interpreter_rt_base& operator=(const spu_interpreter_rt_base&) = delete;
27 |
28 | virtual ~spu_interpreter_rt_base();
29 | };
30 |
31 | struct spu_interpreter_rt : spu_interpreter_rt_base
32 | {
33 | spu_interpreter_rt() noexcept;
34 |
35 | spu_intrp_func_t decode(u32 op) const noexcept
36 | {
37 | return table.decode(op);
38 | }
39 |
40 | private:
41 | spu_decoder, spu_intrp_func_t> table;
42 | };
43 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Cell/lv2/sys_bdemu.cpp:
--------------------------------------------------------------------------------
1 | #include "stdafx.h"
2 |
3 | #include "Emu/Cell/ErrorCodes.h"
4 |
5 | #include "sys_bdemu.h"
6 |
7 | LOG_CHANNEL(sys_bdemu);
8 |
9 | error_code sys_bdemu_send_command(u64 cmd, u64 a2, u64 a3, vm::ptr buf, u64 buf_len)
10 | {
11 | sys_bdemu.todo("sys_bdemu_send_command(cmd=0%llx, a2=0x%x, a3=0x%x, buf=0x%x, buf_len=0x%x)", cmd, a2, a3, buf, buf_len);
12 |
13 | return CELL_OK;
14 | }
15 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Cell/lv2/sys_bdemu.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Emu/Memory/vm_ptr.h"
4 | #include "Emu/Cell/ErrorCodes.h"
5 |
6 | // SysCalls
7 |
8 | error_code sys_bdemu_send_command(u64 cmd, u64 a2, u64 a3, vm::ptr buf, u64 buf_len);
9 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Cell/lv2/sys_btsetting.cpp:
--------------------------------------------------------------------------------
1 | #include "stdafx.h"
2 |
3 | #include "sys_btsetting.h"
4 | #include "Emu/Cell/ErrorCodes.h"
5 |
6 | LOG_CHANNEL(sys_btsetting);
7 |
8 | error_code sys_btsetting_if(u64 cmd, vm::ptr msg)
9 | {
10 | sys_btsetting.todo("sys_btsetting_if(cmd=0x%llx, msg=*0x%x)", cmd, msg);
11 |
12 | return CELL_OK;
13 | }
14 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Cell/lv2/sys_btsetting.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Emu/Memory/vm_ptr.h"
4 | #include "Emu/Cell/ErrorCodes.h"
5 |
6 | // SysCalls
7 |
8 | error_code sys_btsetting_if(u64 cmd, vm::ptr msg);
9 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Cell/lv2/sys_console.cpp:
--------------------------------------------------------------------------------
1 | #include "stdafx.h"
2 | #include "Emu/Cell/ErrorCodes.h"
3 |
4 | #include "sys_console.h"
5 |
6 |
7 | LOG_CHANNEL(sys_console);
8 |
9 | error_code sys_console_write(vm::cptr buf, u32 len)
10 | {
11 | sys_console.todo("sys_console_write(buf=*0x%x, len=0x%x)", buf, len);
12 |
13 | return CELL_OK;
14 | }
15 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Cell/lv2/sys_console.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Emu/Memory/vm_ptr.h"
4 |
5 | // SysCalls
6 |
7 | error_code sys_console_write(vm::cptr buf, u32 len);
8 | constexpr auto sys_console_write2 = sys_console_write;
9 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Cell/lv2/sys_crypto_engine.cpp:
--------------------------------------------------------------------------------
1 | #include "stdafx.h"
2 |
3 | #include "Emu/Cell/ErrorCodes.h"
4 |
5 | #include "sys_crypto_engine.h"
6 |
7 | LOG_CHANNEL(sys_crypto_engine);
8 |
9 | error_code sys_crypto_engine_create(vm::ptr id)
10 | {
11 | sys_crypto_engine.todo("sys_crypto_engine_create(id=*0x%x)", id);
12 |
13 | return CELL_OK;
14 | }
15 |
16 | error_code sys_crypto_engine_destroy(u32 id)
17 | {
18 | sys_crypto_engine.todo("sys_crypto_engine_destroy(id=0x%x)", id);
19 |
20 | return CELL_OK;
21 | }
22 |
23 | error_code sys_crypto_engine_random_generate(vm::ptr buffer, u64 buffer_size)
24 | {
25 | sys_crypto_engine.todo("sys_crypto_engine_random_generate(buffer=*0x%x, buffer_size=0x%x", buffer, buffer_size);
26 |
27 | return CELL_OK;
28 | }
29 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Cell/lv2/sys_crypto_engine.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Emu/Memory/vm_ptr.h"
4 | #include "Emu/Cell/ErrorCodes.h"
5 |
6 | // SysCalls
7 |
8 | error_code sys_crypto_engine_create(vm::ptr id);
9 | error_code sys_crypto_engine_destroy(u32 id);
10 | error_code sys_crypto_engine_random_generate(vm::ptr buffer, u64 buffer_size);
11 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Cell/lv2/sys_dbg.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Emu/Memory/vm_ptr.h"
4 | #include "Emu/Cell/ErrorCodes.h"
5 |
6 | // Syscalls
7 |
8 | error_code sys_dbg_read_process_memory(s32 pid, u32 address, u32 size, vm::ptr data);
9 | error_code sys_dbg_write_process_memory(s32 pid, u32 address, u32 size, vm::cptr data);
10 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Cell/lv2/sys_game.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | void abort_lv2_watchdog();
4 |
5 | error_code _sys_game_watchdog_start(u32 timeout);
6 | error_code _sys_game_watchdog_stop();
7 | error_code _sys_game_watchdog_clear();
8 | error_code _sys_game_set_system_sw_version(u64 version);
9 | u64 _sys_game_get_system_sw_version();
10 | error_code _sys_game_board_storage_read(vm::ptr buffer, vm::ptr status);
11 | error_code _sys_game_board_storage_write(vm::ptr buffer, vm::ptr status);
12 | error_code _sys_game_get_rtc_status(vm::ptr status);
13 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Cell/lv2/sys_gamepad.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Emu/Memory/vm_ptr.h"
4 |
5 | //Syscalls
6 |
7 | u32 sys_gamepad_ycon_if(u8 packet_id, vm::ptr in, vm::ptr out);
8 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Cell/lv2/sys_gpio.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Emu/Memory/vm_ptr.h"
4 | #include "Emu/Cell/ErrorCodes.h"
5 |
6 | enum : u64
7 | {
8 | SYS_GPIO_UNKNOWN_DEVICE_ID = 0x0,
9 | SYS_GPIO_LED_DEVICE_ID = 0x1,
10 | SYS_GPIO_DIP_SWITCH_DEVICE_ID = 0x2,
11 | };
12 |
13 | error_code sys_gpio_get(u64 device_id, vm::ptr value);
14 | error_code sys_gpio_set(u64 device_id, u64 mask, u64 value);
15 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Cell/lv2/sys_io.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Emu/Memory/vm_ptr.h"
4 |
5 | struct lv2_io_buf
6 | {
7 | static const u32 id_base = 0x44000000;
8 | static const u32 id_step = 1;
9 | static const u32 id_count = 2048;
10 | SAVESTATE_INIT_POS(41);
11 |
12 | const u32 block_count;
13 | const u32 block_size;
14 | const u32 blocks;
15 | const u32 unk1;
16 |
17 | lv2_io_buf(u32 block_count, u32 block_size, u32 blocks, u32 unk1)
18 | : block_count(block_count)
19 | , block_size(block_size)
20 | , blocks(blocks)
21 | , unk1(unk1)
22 | {
23 | }
24 | };
25 |
26 | // SysCalls
27 |
28 | error_code sys_io_buffer_create(u32 block_count, u32 block_size, u32 blocks, u32 unk1, vm::ptr handle);
29 | error_code sys_io_buffer_destroy(u32 handle);
30 | error_code sys_io_buffer_allocate(u32 handle, vm::ptr block);
31 | error_code sys_io_buffer_free(u32 handle, u32 block);
32 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Cell/lv2/sys_sm.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Emu/Memory/vm_ptr.h"
4 | #include "Emu/Cell/ErrorCodes.h"
5 |
6 | // SysCalls
7 |
8 | error_code sys_sm_get_ext_event2(vm::ptr a1, vm::ptr a2, vm::ptr a3, u64 a4);
9 | error_code sys_sm_shutdown(ppu_thread& ppu, u16 op, vm::ptr param, u64 size);
10 | error_code sys_sm_get_params(vm::ptr a, vm::ptr b, vm::ptr c, vm::ptr d);
11 | error_code sys_sm_set_shop_mode(s32 mode);
12 | error_code sys_sm_control_led(u8 led, u8 action);
13 | error_code sys_sm_ring_buzzer(u64 packet, u64 a1, u64 a2);
14 | constexpr auto sys_sm_ring_buzzer2 = sys_sm_ring_buzzer;
15 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Cell/lv2/sys_time.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Emu/Memory/vm_ptr.h"
4 | #include "Emu/Cell/ErrorCodes.h"
5 |
6 | // SysCalls
7 |
8 | error_code sys_time_set_timezone(s32 timezone, s32 summertime);
9 | error_code sys_time_get_timezone(vm::ptr timezone, vm::ptr summertime);
10 | error_code sys_time_get_current_time(vm::ptr sec, vm::ptr nsec);
11 | error_code sys_time_set_current_time(s64 sec, s64 nsec);
12 | u64 sys_time_get_timebase_frequency();
13 | error_code sys_time_get_rtc(vm::ptr rtc);
14 |
15 | extern u64 g_timebase_offs;
16 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Cell/lv2/sys_trace.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "util/types.hpp"
4 |
5 | // SysCalls
6 | s32 sys_trace_create();
7 | s32 sys_trace_start();
8 | s32 sys_trace_stop();
9 | s32 sys_trace_update_top_index();
10 | s32 sys_trace_destroy();
11 | s32 sys_trace_drain();
12 | s32 sys_trace_attach_process();
13 | s32 sys_trace_allocate_buffer();
14 | s32 sys_trace_free_buffer();
15 | s32 sys_trace_create2();
16 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Cell/lv2/sys_tty.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Emu/Memory/vm_ptr.h"
4 | #include "Emu/Cell/ErrorCodes.h"
5 |
6 | // TTY channels
7 | enum
8 | {
9 | SYS_TTYP_PPU_STDIN = 0,
10 | SYS_TTYP_PPU_STDOUT = 0,
11 | SYS_TTYP_PPU_STDERR = 1,
12 | SYS_TTYP_SPU_STDOUT = 2,
13 | SYS_TTYP_USER1 = 3,
14 | SYS_TTYP_USER2 = 4,
15 | SYS_TTYP_USER3 = 5,
16 | SYS_TTYP_USER4 = 6,
17 | SYS_TTYP_USER5 = 7,
18 | SYS_TTYP_USER6 = 8,
19 | SYS_TTYP_USER7 = 9,
20 | SYS_TTYP_USER8 = 10,
21 | SYS_TTYP_USER9 = 11,
22 | SYS_TTYP_USER10 = 12,
23 | SYS_TTYP_USER11 = 13,
24 | SYS_TTYP_USER12 = 14,
25 | SYS_TTYP_USER13 = 15,
26 | };
27 |
28 | class ppu_thread;
29 |
30 | // SysCalls
31 | error_code sys_tty_read(s32 ch, vm::ptr buf, u32 len, vm::ptr preadlen);
32 | error_code sys_tty_write(ppu_thread& ppu, s32 ch, vm::cptr buf, u32 len, vm::ptr pwritelen);
33 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Cell/timers.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "util/types.hpp"
4 |
5 | u64 convert_to_timebased_time(u64 time);
6 | u64 get_timebased_time();
7 |
8 | // Returns some relative time in microseconds, don't change this fact
9 | u64 get_system_time();
10 |
11 | // As get_system_time but obeys Clocks scaling setting. Microseconds.
12 | u64 get_guest_system_time(u64 time = umax);
13 |
--------------------------------------------------------------------------------
/rpcs3/Emu/GameInfo.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "util/types.hpp"
4 | #include
5 |
6 | struct GameInfo
7 | {
8 | std::string path;
9 | std::string icon_path;
10 | std::string movie_path;
11 |
12 | std::string name;
13 | std::string serial;
14 | std::string app_ver;
15 | std::string version;
16 | std::string category;
17 | std::string fw;
18 |
19 | u32 attr = 0;
20 | u32 bootable = 0;
21 | u32 parental_lvl = 0;
22 | u32 sound_format = 0;
23 | u32 resolution = 0;
24 |
25 | u64 size_on_disk = umax;
26 | };
27 |
--------------------------------------------------------------------------------
/rpcs3/Emu/IPC_config.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Utilities/Config.h"
4 |
5 | struct cfg_ipc : cfg::node
6 | {
7 | cfg::_bool ipc_server_enabled{ this, "IPC Server enabled", false };
8 | cfg::_int<1025, 65535> ipc_port{ this, "IPC Port", 28012 };
9 |
10 | void load();
11 | void save() const;
12 |
13 | bool get_server_enabled() const;
14 | int get_port() const;
15 |
16 | void set_server_enabled(const bool enabled);
17 | void set_port(const int port);
18 |
19 | private:
20 | static std::string get_path();
21 | };
22 |
23 | extern cfg_ipc g_cfg_ipc;
24 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Io/Buzz.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Emu/Io/usb_device.h"
4 |
5 | class usb_device_buzz : public usb_device_emulated
6 | {
7 | public:
8 | usb_device_buzz(u32 first_controller, u32 last_controller, const std::array& location);
9 | ~usb_device_buzz();
10 |
11 | static std::shared_ptr make_instance(u32 controller_index, const std::array& location);
12 | static u16 get_num_emu_devices();
13 |
14 | void control_transfer(u8 bmRequestType, u8 bRequest, u16 wValue, u16 wIndex, u16 wLength, u32 buf_size, u8* buf, UsbTransfer* transfer) override;
15 | void interrupt_transfer(u32 buf_size, u8* buf, u32 endpoint, UsbTransfer* transfer) override;
16 |
17 | private:
18 | u32 m_first_controller;
19 | u32 m_last_controller;
20 | };
21 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Io/GHLtar.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Emu/Io/usb_device.h"
4 |
5 | class usb_device_ghltar : public usb_device_emulated
6 | {
7 | public:
8 | usb_device_ghltar(u32 controller_index, const std::array& location);
9 | ~usb_device_ghltar();
10 |
11 | static std::shared_ptr make_instance(u32 controller_index, const std::array& location);
12 | static u16 get_num_emu_devices();
13 |
14 | void control_transfer(u8 bmRequestType, u8 bRequest, u16 wValue, u16 wIndex, u16 wLength, u32 buf_size, u8* buf, UsbTransfer* transfer) override;
15 | void interrupt_transfer(u32 buf_size, u8* buf, u32 endpoint, UsbTransfer* transfer) override;
16 |
17 | private:
18 | u32 m_controller_index;
19 | };
20 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Io/GameTablet.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Emu/Io/usb_device.h"
4 |
5 | class usb_device_gametablet : public usb_device_emulated
6 | {
7 | public:
8 | usb_device_gametablet(u32 controller_index, const std::array& location);
9 | ~usb_device_gametablet();
10 |
11 | void control_transfer(u8 bmRequestType, u8 bRequest, u16 wValue, u16 wIndex, u16 wLength, u32 buf_size, u8* buf, UsbTransfer* transfer) override;
12 | void interrupt_transfer(u32 buf_size, u8* buf, u32 endpoint, UsbTransfer* transfer) override;
13 |
14 | private:
15 | u32 m_controller_index;
16 | };
17 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Io/GunCon3.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Emu/Io/usb_device.h"
4 |
5 | class usb_device_guncon3 : public usb_device_emulated
6 | {
7 | public:
8 | usb_device_guncon3(u32 controller_index, const std::array& location);
9 | ~usb_device_guncon3();
10 |
11 | void control_transfer(u8 bmRequestType, u8 bRequest, u16 wValue, u16 wIndex, u16 wLength, u32 buf_size, u8* buf, UsbTransfer* transfer) override;
12 | void interrupt_transfer(u32 buf_size, u8* buf, u32 endpoint, UsbTransfer* transfer) override;
13 |
14 | private:
15 | u32 m_controller_index;
16 | std::array m_key{};
17 | };
18 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Io/Null/NullKeyboardHandler.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Emu/Io/KeyboardHandler.h"
4 |
5 | class NullKeyboardHandler final : public KeyboardHandlerBase
6 | {
7 | using KeyboardHandlerBase::KeyboardHandlerBase;
8 |
9 | public:
10 | void Init(keyboard_consumer& consumer, const u32 max_connect) override
11 | {
12 | KbInfo& info = consumer.GetInfo();
13 | std::vector& keyboards = consumer.GetKeyboards();
14 |
15 | info = {};
16 | info.max_connect = max_connect;
17 | info.is_null_handler = true;
18 | keyboards.clear();
19 | for (u32 i = 0; i < max_connect; i++)
20 | {
21 | keyboards.emplace_back(Keyboard());
22 | }
23 | }
24 | };
25 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Io/Null/NullMouseHandler.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Emu/Io/MouseHandler.h"
4 |
5 | class NullMouseHandler final : public MouseHandlerBase
6 | {
7 | using MouseHandlerBase::MouseHandlerBase;
8 |
9 | public:
10 | void Init(const u32 max_connect) override
11 | {
12 | m_info = {};
13 | m_info.max_connect = max_connect;
14 | m_info.is_null_handler = true;
15 | m_mice.clear();
16 | }
17 | };
18 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Io/Null/null_music_handler.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Emu/Io/music_handler_base.h"
4 |
5 | class null_music_handler final : public music_handler_base
6 | {
7 | public:
8 | null_music_handler() : music_handler_base() {}
9 |
10 | void stop() override { m_state = 0; } // CELL_MUSIC_PB_STATUS_STOP
11 | void pause() override { m_state = 2; } // CELL_MUSIC_PB_STATUS_PAUSE
12 | void play(const std::string& /*path*/) override { m_state = 1; } // CELL_MUSIC_PB_STATUS_PLAY
13 | void fast_forward(const std::string& /*path*/) override { m_state = 3; } // CELL_MUSIC_PB_STATUS_FASTFORWARD
14 | void fast_reverse(const std::string& /*path*/) override { m_state = 4; } // CELL_MUSIC_PB_STATUS_FASTREVERSE
15 | void set_volume(f32 volume) override { m_volume = volume; }
16 | f32 get_volume() const override { return m_volume; }
17 |
18 | private:
19 | atomic_t m_volume{0.0f};
20 | };
21 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Io/TopShotElite.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Emu/Io/usb_device.h"
4 |
5 | class usb_device_topshotelite : public usb_device_emulated
6 | {
7 | public:
8 | usb_device_topshotelite(u32 controller_index, const std::array& location);
9 | ~usb_device_topshotelite();
10 |
11 | void control_transfer(u8 bmRequestType, u8 bRequest, u16 wValue, u16 wIndex, u16 wLength, u32 buf_size, u8* buf, UsbTransfer* transfer) override;
12 | void interrupt_transfer(u32 buf_size, u8* buf, u32 endpoint, UsbTransfer* transfer) override;
13 |
14 | private:
15 | u32 m_controller_index;
16 | u8 m_mode;
17 | };
18 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Io/TopShotFearmaster.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Emu/Io/usb_device.h"
4 |
5 | class usb_device_topshotfearmaster: public usb_device_emulated
6 | {
7 | public:
8 | usb_device_topshotfearmaster(u32 controller_index, const std::array& location);
9 | ~usb_device_topshotfearmaster();
10 |
11 | void control_transfer(u8 bmRequestType, u8 bRequest, u16 wValue, u16 wIndex, u16 wLength, u32 buf_size, u8* buf, UsbTransfer* transfer) override;
12 | void interrupt_transfer(u32 buf_size, u8* buf, u32 endpoint, UsbTransfer* transfer) override;
13 |
14 | private:
15 | u32 m_controller_index;
16 | u8 m_mode;
17 | };
18 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Io/Turntable.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Emu/Io/usb_device.h"
4 |
5 | class usb_device_turntable : public usb_device_emulated
6 | {
7 | public:
8 | usb_device_turntable(u32 controller_index, const std::array& location);
9 | ~usb_device_turntable();
10 |
11 | static std::shared_ptr make_instance(u32 controller_index, const std::array& location);
12 | static u16 get_num_emu_devices();
13 |
14 | void control_transfer(u8 bmRequestType, u8 bRequest, u16 wValue, u16 wIndex, u16 wLength, u32 buf_size, u8* buf, UsbTransfer* transfer) override;
15 | void interrupt_transfer(u32 buf_size, u8* buf, u32 endpoint, UsbTransfer* transfer) override;
16 |
17 | private:
18 | u32 m_controller_index;
19 | };
20 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Io/buzz_config.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "emulated_pad_config.h"
4 |
5 | enum class buzz_btn
6 | {
7 | red,
8 | yellow,
9 | green,
10 | orange,
11 | blue,
12 |
13 | count
14 | };
15 |
16 | struct cfg_buzzer final : public emulated_pad_config
17 | {
18 | cfg_buzzer(node* owner, const std::string& name) : emulated_pad_config(owner, name) {}
19 |
20 | cfg_pad_btn red{ this, "Red", buzz_btn::red, pad_button::R1 };
21 | cfg_pad_btn yellow{ this, "Yellow", buzz_btn::yellow, pad_button::cross };
22 | cfg_pad_btn green{ this, "Green", buzz_btn::green, pad_button::circle };
23 | cfg_pad_btn orange{ this, "Orange", buzz_btn::orange, pad_button::square };
24 | cfg_pad_btn blue{ this, "Blue", buzz_btn::blue, pad_button::triangle };
25 | };
26 |
27 | struct cfg_buzz final : public emulated_pads_config
28 | {
29 | cfg_buzz() : emulated_pads_config("buzz") {};
30 | };
31 |
32 | extern cfg_buzz g_cfg_buzz;
33 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Io/camera_config.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Utilities/Config.h"
4 |
5 | struct cfg_camera final : cfg::node
6 | {
7 | cfg_camera();
8 | bool load();
9 | void save() const;
10 |
11 | struct camera_setting
12 | {
13 | int width = 0;
14 | int height = 0;
15 | double min_fps = 0;
16 | double max_fps = 0;
17 | int format = 0;
18 |
19 | static constexpr u32 member_count = 5;
20 |
21 | std::string to_string() const;
22 | void from_string(const std::string& text);
23 | };
24 | camera_setting get_camera_setting(const std::string& camera, bool& success);
25 | void set_camera_setting(const std::string& camera, const camera_setting& setting);
26 |
27 | const std::string path;
28 |
29 | cfg::map_entry cameras{ this, "Cameras" }; // : ,,,,
30 | };
31 |
32 | extern cfg_camera g_cfg_camera;
33 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Io/interception.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "util/atomic.hpp"
4 |
5 | namespace input
6 | {
7 | enum class active_mouse_and_keyboard : u32
8 | {
9 | pad,
10 | emulated
11 | };
12 | extern atomic_t g_active_mouse_and_keyboard;
13 |
14 | extern atomic_t g_pads_intercepted;
15 | extern atomic_t g_keyboards_intercepted;
16 | extern atomic_t g_mice_intercepted;
17 |
18 | void SetIntercepted(bool pads_intercepted, bool keyboards_intercepted, bool mice_intercepted, const char* func = __builtin_FUNCTION());
19 | void SetIntercepted(bool all_intercepted, const char* func = __builtin_FUNCTION());
20 |
21 | void set_mouse_and_keyboard(active_mouse_and_keyboard device);
22 | void toggle_mouse_and_keyboard();
23 | }
24 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Io/midi_config_types.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 |
5 | static constexpr usz max_midi_devices = 3;
6 |
7 | enum class midi_device_type
8 | {
9 | keyboard,
10 | guitar,
11 | guitar_22fret,
12 | drums,
13 | };
14 |
15 | struct midi_device
16 | {
17 | midi_device_type type{};
18 | std::string name;
19 |
20 | static midi_device from_string(const std::string& str);
21 | };
22 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Io/mouse_config.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Utilities/Config.h"
4 |
5 | // For simplicity's sake, there is only one config instead of 127 for MAX_MICE
6 | struct mouse_config final : cfg::node
7 | {
8 | mouse_config();
9 |
10 | const std::string cfg_name;
11 |
12 | cfg::string mouse_button_1{ this, "Button 1", "Mouse Left", true };
13 | cfg::string mouse_button_2{ this, "Button 2", "Mouse Right", true };
14 | cfg::string mouse_button_3{ this, "Button 3", "Mouse Middle", true };
15 | cfg::string mouse_button_4{ this, "Button 4", "", true };
16 | cfg::string mouse_button_5{ this, "Button 5", "", true };
17 | cfg::string mouse_button_6{ this, "Button 6", "", true };
18 | cfg::string mouse_button_7{ this, "Button 7", "", true };
19 | cfg::string mouse_button_8{ this, "Button 8", "", true };
20 |
21 | atomic_t reload_requested = true;
22 |
23 | bool exist() const;
24 | bool load();
25 | void save();
26 |
27 | cfg::string& get_button(int code);
28 | };
29 |
30 | extern mouse_config g_cfg_mouse;
31 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Io/music_handler_base.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "util/types.hpp"
4 | #include "util/atomic.hpp"
5 |
6 | class music_handler_base
7 | {
8 | public:
9 | enum class player_status
10 | {
11 | end_of_media
12 | };
13 |
14 | virtual ~music_handler_base() = default;
15 |
16 | virtual void stop() = 0;
17 | virtual void pause() = 0;
18 | virtual void play(const std::string& path) = 0;
19 | virtual void fast_forward(const std::string& path) = 0;
20 | virtual void fast_reverse(const std::string& path) = 0;
21 | virtual void set_volume(f32 volume) = 0;
22 | virtual f32 get_volume() const = 0;
23 |
24 | s32 get_state() const
25 | {
26 | return m_state;
27 | }
28 |
29 | void set_status_callback(std::function status_callback)
30 | {
31 | m_status_callback = std::move(status_callback);
32 | }
33 |
34 | protected:
35 | atomic_t m_state{0};
36 | std::function m_status_callback;
37 | };
38 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Io/pad_config_types.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "util/types.hpp"
4 |
5 | enum class pad_handler
6 | {
7 | null,
8 | keyboard,
9 | ds3,
10 | ds4,
11 | dualsense,
12 | skateboard,
13 | move,
14 | #ifdef _WIN32
15 | xinput,
16 | mm,
17 | #endif
18 | #ifdef HAVE_SDL3
19 | sdl,
20 | #endif
21 | #ifdef HAVE_LIBEVDEV
22 | evdev,
23 | #endif
24 | };
25 |
26 | enum class mouse_movement_mode : s32
27 | {
28 | relative = 0,
29 | absolute = 1
30 | };
31 |
32 | struct PadInfo
33 | {
34 | u32 now_connect = 0;
35 | u32 system_info = 0;
36 | bool ignore_input = false;
37 | };
38 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Io/rb3drums_config.cpp:
--------------------------------------------------------------------------------
1 | #include "stdafx.h"
2 | #include "rb3drums_config.h"
3 |
4 | LOG_CHANNEL(cfg_log, "CFG");
5 |
6 | cfg_rb3drums g_cfg_rb3drums;
7 |
8 | cfg_rb3drums::cfg_rb3drums()
9 | : cfg::node()
10 | , path(fs::get_config_dir(true) + "rb3drums.yml")
11 | {
12 | }
13 |
14 | bool cfg_rb3drums::load()
15 | {
16 | cfg_log.notice("Loading rb3drums config from '%s'", path);
17 |
18 | if (fs::file cfg_file{path, fs::read})
19 | {
20 | return from_string(cfg_file.to_string());
21 | }
22 |
23 | cfg_log.notice("No rb3drums config found. Using default settings. Path: %s", path);
24 | from_default();
25 | save();
26 | return false;
27 | }
28 |
29 | void cfg_rb3drums::save()
30 | {
31 | cfg_log.notice("Saving rb3drums config to '%s'", path);
32 |
33 | if (!cfg::node::save(path))
34 | {
35 | cfg_log.error("Failed to save rb3drums config to '%s' (error=%s)", path, fs::g_tls_error);
36 | }
37 |
38 | reload_requested = true;
39 | }
40 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Io/recording_config.cpp:
--------------------------------------------------------------------------------
1 | #include "stdafx.h"
2 | #include "recording_config.h"
3 |
4 | LOG_CHANNEL(cfg_log, "CFG");
5 |
6 | cfg_recording g_cfg_recording;
7 |
8 | cfg_recording::cfg_recording()
9 | : cfg::node()
10 | , path(fs::get_config_dir(true) + "recording.yml")
11 | {
12 | }
13 |
14 | bool cfg_recording::load()
15 | {
16 | cfg_log.notice("Loading recording config from '%s'", path);
17 |
18 | if (fs::file cfg_file{path, fs::read})
19 | {
20 | return from_string(cfg_file.to_string());
21 | }
22 |
23 | cfg_log.notice("Recording config missing. Using default settings. Path: %s", path);
24 | from_default();
25 | save();
26 | return false;
27 | }
28 |
29 | void cfg_recording::save() const
30 | {
31 | cfg_log.notice("Saving recording config to '%s'", path);
32 |
33 | if (!cfg::node::save(path))
34 | {
35 | cfg_log.error("Failed to save recording config to '%s' (error=%s)", path, fs::g_tls_error);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/rpcs3/Emu/Io/usb_vfs.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Emu/Io/usb_device.h"
4 | #include "Utilities/Config.h"
5 |
6 | class usb_device_vfs : public usb_device_emulated
7 | {
8 | public:
9 | usb_device_vfs(const cfg::device_info& device_info, const std::array& location);
10 | ~usb_device_vfs();
11 | };
12 |
--------------------------------------------------------------------------------
/rpcs3/Emu/NP/np_dnshook.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 | #include
6 | #include
7 |
8 | #include "util/types.hpp"
9 | #include "Utilities/mutex.h"
10 |
11 | namespace np
12 | {
13 | class dnshook
14 | {
15 | public:
16 | dnshook();
17 |
18 | void add_dns_spy(u32 sock);
19 | void remove_dns_spy(u32 sock);
20 |
21 | bool is_dns(u32 sock);
22 | bool is_dns_queue(u32 sock);
23 |
24 | std::vector get_dns_packet(u32 sock);
25 | s32 analyze_dns_packet(s32 s, const u8* buf, u32 len);
26 |
27 | private:
28 | std::optional get_redir(const std::string& hostname);
29 |
30 | private:
31 | shared_mutex mutex;
32 | std::unordered_map>> m_dns_spylist;
33 | std::vector> m_redirs;
34 | };
35 | } // namespace np
36 |
--------------------------------------------------------------------------------
/rpcs3/Emu/NP/rpcn_countries.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 |
6 | namespace countries
7 | {
8 | struct country_code
9 | {
10 | std::string_view name;
11 | std::string_view ccode;
12 | };
13 | extern const std::array g_countries;
14 | } // namespace countries
15 |
16 |
--------------------------------------------------------------------------------
/rpcs3/Emu/NP/upnp_config.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Utilities/Config.h"
4 |
5 | struct cfg_upnp : cfg::node
6 | {
7 | cfg::string device_url{this, "DeviceUrl", ""};
8 |
9 | void load();
10 | void save() const;
11 |
12 | std::string get_device_url() const;
13 |
14 | void set_device_url(std::string_view url);
15 |
16 | private:
17 | static std::string get_path();
18 | };
19 |
--------------------------------------------------------------------------------
/rpcs3/Emu/NP/upnp_handler.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 |
5 | #include
6 |
7 | #include "upnp_config.h"
8 | #include "Utilities/mutex.h"
9 |
10 | class upnp_handler
11 | {
12 | public:
13 | ~upnp_handler();
14 |
15 | void upnp_enable();
16 | void add_port_redir(std::string_view addr, u16 internal_port, std::string_view protocol);
17 | void remove_port_redir(u16 internal_port, std::string_view protocol);
18 |
19 | bool is_active() const;
20 |
21 | private:
22 | void remove_port_redir_external(u16 external_port, std::string_view protocol, bool verbose = true);
23 |
24 | private:
25 | atomic_t m_active = false;
26 |
27 | shared_mutex m_mutex;
28 | cfg_upnp m_cfg;
29 | IGDdatas m_igd_data{};
30 | UPNPUrls m_igd_urls{};
31 | std::unordered_map> m_bindings;
32 | };
33 |
--------------------------------------------------------------------------------
/rpcs3/Emu/NP/vport0.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 |
5 | #ifdef _WIN32
6 | #include
7 | #else
8 | #include
9 | #endif
10 |
11 | #include "Emu/Cell/lv2/sys_net/nt_p2p_port.h"
12 |
13 | bool send_packet_from_p2p_port_ipv4(const std::vector& data, const sockaddr_in& addr);
14 | bool send_packet_from_p2p_port_ipv6(const std::vector& data, const sockaddr_in6& addr);
15 | std::vector get_sign_msgs();
16 | std::vector> get_rpcn_msgs();
17 |
18 | constexpr s32 VPORT_0_HEADER_SIZE = sizeof(u16) + sizeof(u8);
19 |
20 | // VPort 0 is invalid for sys_net so we use it for:
21 | // Subset 0: Messages from RPCN server, IP retrieval / UDP hole punching
22 | // Subset 1: Signaling
23 | enum VPORT_0_SUBSET : u8
24 | {
25 | SUBSET_RPCN = 0,
26 | SUBSET_SIGNALING = 1,
27 | };
28 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/Capture/rsx_capture.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "rsx_replay.h"
3 |
4 | namespace rsx
5 | {
6 | class thread;
7 | namespace capture
8 | {
9 | void capture_draw_memory(thread* rsx);
10 | void capture_image_in(thread* rsx, frame_capture_data::replay_command& replay_command);
11 | void capture_buffer_notify(thread* rsx, frame_capture_data::replay_command& replay_command);
12 | void capture_display_tile_state(thread* rsx, frame_capture_data::replay_command& replay_command);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/Capture/rsx_trace.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 | #include
6 | #include "util/types.hpp"
7 | #include "Emu/RSX/rsx_methods.h"
8 |
9 | namespace rsx
10 | {
11 | struct frame_trace_data
12 | {
13 | struct draw_state
14 | {
15 | std::string name;
16 | std::pair programs;
17 | rsx::rsx_state state;
18 | std::array, 4> color_buffer;
19 | std::array, 2> depth_stencil;
20 | std::vector index;
21 | u32 vertex_count;
22 | };
23 |
24 | std::vector> command_queue;
25 | std::vector draw_calls;
26 |
27 | void reset()
28 | {
29 | command_queue.clear();
30 | draw_calls.clear();
31 | }
32 | };
33 | }
34 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/Common/profiling_timer.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include "Emu/Cell/timers.hpp"
5 |
6 | namespace rsx
7 | {
8 | struct profiling_timer
9 | {
10 | bool enabled = false;
11 | u64 last;
12 |
13 | profiling_timer() = default;
14 |
15 | void start()
16 | {
17 | if (enabled) [[unlikely]]
18 | {
19 | last = get_system_time();
20 | }
21 | }
22 |
23 | s64 duration()
24 | {
25 | if (!enabled) [[likely]]
26 | {
27 | return 0ll;
28 | }
29 |
30 | auto old = last;
31 | last = get_system_time();
32 | return static_cast(last - old);
33 | }
34 | };
35 | }
36 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/Common/time.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/Common/unordered_map.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #ifdef RSX_USE_STD_MAP
4 | #include
5 |
6 | namespace rsx
7 | {
8 | template
9 | using unordered_map = std::unordered_map;
10 | }
11 | #else
12 | #include "3rdparty/unordered_dense/include/unordered_dense.h"
13 |
14 | namespace rsx
15 | {
16 | template
17 | using unordered_map = ankerl::unordered_dense::map;
18 | }
19 | #endif
20 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/Core/RSXEngLock.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include "../RSXThread.h"
5 |
6 | namespace rsx
7 | {
8 | class eng_lock
9 | {
10 | rsx::thread* pthr;
11 |
12 | public:
13 | eng_lock(rsx::thread* target)
14 | :pthr(target)
15 | {
16 | if (pthr->is_current_thread())
17 | {
18 | pthr = nullptr;
19 | }
20 | else
21 | {
22 | pthr->pause();
23 | }
24 | }
25 |
26 | ~eng_lock()
27 | {
28 | if (pthr) pthr->unpause();
29 | }
30 | };
31 | }
32 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/GL/GLCommonDecompiler.cpp:
--------------------------------------------------------------------------------
1 | #include "stdafx.h"
2 | #include "GLCommonDecompiler.h"
3 |
4 | namespace gl
5 | {
6 | static constexpr std::array, 17> varying_registers =
7 | {{
8 | {"diff_color", 1},
9 | {"spec_color", 2},
10 | {"diff_color1", 3},
11 | {"spec_color1", 4},
12 | {"fogc", 5},
13 | {"fog_c", 5},
14 | {"tc0", 6},
15 | {"tc1", 7},
16 | {"tc2", 8},
17 | {"tc3", 9},
18 | {"tc4", 10},
19 | {"tc5", 11},
20 | {"tc6", 12},
21 | {"tc7", 13},
22 | {"tc8", 14},
23 | {"tc9", 15}
24 | }};
25 |
26 | int get_varying_register_location(std::string_view varying_register_name)
27 | {
28 | for (const auto& varying_register : varying_registers)
29 | {
30 | if (varying_register.first == varying_register_name)
31 | {
32 | return varying_register.second;
33 | }
34 | }
35 |
36 | fmt::throw_exception("Unknown register name: %s", varying_register_name);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/GL/GLCommonDecompiler.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | namespace gl
4 | {
5 | int get_varying_register_location(std::string_view varying_register_name);
6 | }
7 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/GL/GLHelpers.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 |
10 | #include "../GCM.h"
11 | #include "../Common/TextureUtils.h"
12 | #include "../Program/GLSLTypes.h"
13 |
14 | #include "Utilities/mutex.h"
15 | #include "Utilities/geometry.h"
16 | #include "Utilities/File.h"
17 | #include "util/logs.hpp"
18 | #include "util/asm.hpp"
19 |
20 | #include "glutils/common.h"
21 | // TODO: Include on use
22 | #include "glutils/buffer_object.h"
23 | #include "glutils/image.h"
24 | #include "glutils/sampler.h"
25 | #include "glutils/pixel_settings.hpp"
26 | #include "glutils/state_tracker.hpp"
27 |
28 | // Noop keyword outside of Windows (used in log_debug)
29 | #if !defined(_WIN32) && !defined(APIENTRY)
30 | #define APIENTRY
31 | #endif
32 |
33 |
34 | namespace gl
35 | {
36 | void enable_debugging();
37 | bool is_primitive_native(rsx::primitive_type in);
38 | GLenum draw_mode(rsx::primitive_type in);
39 | }
40 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/GL/glutils/common.cpp:
--------------------------------------------------------------------------------
1 | #include "state_tracker.hpp"
2 | #include "vao.hpp"
3 |
4 | namespace gl
5 | {
6 | static thread_local bool s_tls_primary_context_thread = false;
7 | static gl::driver_state* s_current_state = nullptr;
8 |
9 | void set_primary_context_thread(bool value)
10 | {
11 | s_tls_primary_context_thread = value;
12 | }
13 |
14 | bool is_primary_context_thread()
15 | {
16 | return s_tls_primary_context_thread;
17 | }
18 |
19 | void set_command_context(gl::command_context& ctx)
20 | {
21 | s_current_state = ctx.operator->();
22 | }
23 |
24 | void set_command_context(gl::driver_state& ctx)
25 | {
26 | s_current_state = &ctx;
27 | }
28 |
29 | gl::command_context get_command_context()
30 | {
31 | return { *s_current_state };
32 | }
33 |
34 | attrib_t vao::operator[](u32 index) const noexcept
35 | {
36 | return attrib_t(index);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/GL/upscalers/bilinear_pass.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "static_pass.hpp"
4 |
5 | namespace gl
6 | {
7 | using bilinear_upscale_pass = static_upscale_pass;
8 | }
9 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/GL/upscalers/nearest_pass.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "static_pass.hpp"
4 |
5 | namespace gl
6 | {
7 | using nearest_upscale_pass = static_upscale_pass;
8 | }
9 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/GL/upscalers/upscaling.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "../glutils/image.h"
4 | #include "../glutils/state_tracker.hpp"
5 |
6 | namespace gl
7 | {
8 | namespace upscaling_flags_
9 | {
10 | enum upscaling_flags
11 | {
12 | UPSCALE_DEFAULT_VIEW = (1 << 0),
13 | UPSCALE_LEFT_VIEW = (1 << 0),
14 | UPSCALE_RIGHT_VIEW = (1 << 1),
15 | UPSCALE_AND_COMMIT = (1 << 2)
16 | };
17 | }
18 |
19 | using namespace upscaling_flags_;
20 |
21 | struct upscaler
22 | {
23 | virtual ~upscaler() {}
24 |
25 | virtual gl::texture* scale_output(
26 | gl::command_context& cmd, // State
27 | gl::texture* src, // Source input
28 | const areai& src_region, // Scaling request information
29 | const areai& dst_region, // Ditto
30 | gl::flags32_t mode // Mode
31 | ) = 0;
32 | };
33 | }
34 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/GSFrameBase.cpp:
--------------------------------------------------------------------------------
1 | #include "stdafx.h"
2 | #include "GSFrameBase.h"
3 | #include "Emu/system_config.h"
4 |
5 | atomic_t g_game_window_focused = false;
6 |
7 | bool is_input_allowed()
8 | {
9 | return g_game_window_focused || g_cfg.io.background_input_enabled;
10 | }
11 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/Host/MM.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 |
6 | #include "Emu/RSX/Common/simple_array.hpp"
7 | #include "Utilities/address_range.h"
8 |
9 | namespace rsx
10 | {
11 | struct MM_block
12 | {
13 | utils::address_range64 range;
14 | utils::protection prot;
15 |
16 | inline bool overlaps(const utils::address_range64& test) const
17 | {
18 | return range.overlaps(test);
19 | }
20 |
21 | inline bool overlaps(u64 addr) const
22 | {
23 | return range.overlaps(addr);
24 | }
25 | };
26 |
27 | enum mm_backend_ctrl : u32
28 | {
29 | cmd_mm_flush = 0x81000000,
30 | };
31 |
32 | void mm_protect(void* start, u64 length, utils::protection prot);
33 | void mm_flush_lazy();
34 | void mm_flush(u32 vm_address);
35 | void mm_flush(const rsx::simple_array& ranges);
36 | void mm_flush();
37 | }
38 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/NV47/FW/GRAPH_backend.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "../HW/context.h"
4 |
5 | namespace rsx
6 | {
7 | // GRAPH backend class. Wraps RSX acceleration capabilities for the host.
8 | // TODO: Flesh this out.
9 | // TODO: Replace the virtuals with something faster
10 | class GRAPH_backend
11 | {
12 | public:
13 | // virtual void begin() = 0;
14 | // virtual void end() = 0;
15 |
16 | // Patch transform constants. Units are in 32x4 units
17 | virtual void patch_transform_constants(context* /*ctx*/, u32 /*index*/, u32 /*count*/) {};
18 | };
19 | }
20 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/NV47/FW/reg_context.cpp:
--------------------------------------------------------------------------------
1 | #include "stdafx.h"
2 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/NV47/FW/reg_context.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 |
5 | namespace rsx
6 | {
7 | // TODO: Basically replaces parts of the current "rsx_state" object
8 | struct reg_context
9 | {
10 | u32 registers[1];
11 | };
12 | }
13 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/NV47/HW/common.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include "context.h"
5 | #include "context_accessors.define.h"
6 |
7 | namespace rsx
8 | {
9 | enum command_barrier_type : u32;
10 | enum class vertex_base_type : u8;
11 |
12 | namespace util
13 | {
14 | u32 get_report_data_impl(rsx::context* ctx, u32 offset);
15 |
16 | void push_vertex_data(rsx::context* ctx, u32 attrib_index, u32 channel_select, int count, rsx::vertex_base_type vtype, u32 value);
17 |
18 | void push_draw_parameter_change(rsx::context* ctx, rsx::command_barrier_type type, u32 reg, u32 arg0, u32 arg1 = 0u, u32 index = 0u);
19 |
20 | void set_fragment_texture_dirty_bit(rsx::context* ctx, u32 arg, u32 index);
21 |
22 | void set_vertex_texture_dirty_bit(rsx::context* ctx, u32 index);
23 | }
24 | }
25 |
26 | #include "context_accessors.undef.h"
27 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/NV47/HW/context.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 |
5 | namespace rsx
6 | {
7 | class thread;
8 | struct rsx_state;
9 |
10 | #if 0
11 | // TODO: Separate GRAPH context from RSX state
12 | struct GRAPH_context
13 | {
14 | u32 id;
15 | std::array registers;
16 |
17 | GRAPH_context(u32 ctx_id)
18 | : id(ctx_id)
19 | {
20 | std::fill(registers.begin(), registers.end(), 0);
21 | }
22 | };
23 | #endif
24 |
25 | struct context
26 | {
27 | thread* rsxthr;
28 | // GRAPH_context* graph;
29 | rsx_state* register_state;
30 | };
31 | }
32 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/NV47/HW/context_accessors.define.h:
--------------------------------------------------------------------------------
1 | #define RSX(ctx) ctx->rsxthr
2 | #define REGS(ctx) ctx->register_state
3 | #define RSX_CAPTURE_EVENT(name) if (RSX(ctx)->capture_current_frame) { RSX(ctx)->capture_frame(name); }
4 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/NV47/HW/context_accessors.undef.h:
--------------------------------------------------------------------------------
1 | #undef RSX
2 | #undef REGS
3 | #undef RSX_CAPTURE_EVENT
4 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/NV47/HW/nv0039.h:
--------------------------------------------------------------------------------
1 | // NV47 Buffer Management
2 | #pragma once
3 |
4 | #include "context.h"
5 |
6 | namespace rsx
7 | {
8 | namespace nv0039
9 | {
10 | void buffer_notify(context* ctx, u32 reg, u32 arg);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/NV47/HW/nv3089.h:
--------------------------------------------------------------------------------
1 | // NV47 2D Blit Engine
2 | #pragma once
3 |
4 | #include "context.h"
5 |
6 | namespace rsx
7 | {
8 | namespace nv3089
9 | {
10 | void image_in(context* ctx, u32 reg, u32 arg);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/NV47/HW/nv308a.h:
--------------------------------------------------------------------------------
1 | // NV47 Format Conversion
2 | #pragma once
3 |
4 | #include "context.h"
5 |
6 | namespace rsx
7 | {
8 | namespace nv308a
9 | {
10 | struct color
11 | {
12 | static void impl(context* ctx, u32 reg, u32 arg);
13 | };
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/NV47/HW/nv406e.h:
--------------------------------------------------------------------------------
1 | // NV47 Sync Objects
2 | #pragma once
3 |
4 | #include "context.h"
5 |
6 | namespace rsx
7 | {
8 | namespace nv406e
9 | {
10 | void set_reference(context* ctx, u32 reg, u32 arg);
11 |
12 | void semaphore_acquire(context* ctx, u32 reg, u32 arg);
13 |
14 | void semaphore_release(context* ctx, u32 reg, u32 arg);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/NV47/HW/nv47.h:
--------------------------------------------------------------------------------
1 | // RSX Hardware definitions
2 | #pragma once
3 |
4 | #include "nv0039.h" // Buffer objects
5 | #include "nv3089.h" // Blit engine (2D)
6 | #include "nv308a.h" // Format conversion
7 | #include "nv406e.h" // Sync objects
8 | #include "nv4097.h" // 3D engine (GRAPH)
9 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/Null/NullGSRender.cpp:
--------------------------------------------------------------------------------
1 | #include "stdafx.h"
2 | #include "NullGSRender.h"
3 |
4 | u64 NullGSRender::get_cycles()
5 | {
6 | return thread_ctrl::get_cycles(static_cast&>(*this));
7 | }
8 |
9 | NullGSRender::NullGSRender(utils::serial* ar) noexcept : GSRender(ar)
10 | {
11 | }
12 |
13 | void NullGSRender::end()
14 | {
15 | execute_nop_draw();
16 | rsx::thread::end();
17 | }
18 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/Null/NullGSRender.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "Emu/RSX/GSRender.h"
3 |
4 | class NullGSRender : public GSRender
5 | {
6 | public:
7 | u64 get_cycles() final;
8 |
9 | NullGSRender(utils::serial* ar) noexcept;
10 | NullGSRender() noexcept : NullGSRender(nullptr) {}
11 |
12 | private:
13 | void end() override;
14 | };
15 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/Overlays/HomeMenu/overlay_home_menu.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Emu/RSX/Overlays/overlays.h"
4 | #include "Emu/Cell/ErrorCodes.h"
5 | #include "overlay_home_menu_main_menu.h"
6 |
7 | namespace rsx
8 | {
9 | namespace overlays
10 | {
11 | struct home_menu_dialog : public user_interface
12 | {
13 | public:
14 | home_menu_dialog();
15 |
16 | void update(u64 timestamp_us) override;
17 | void on_button_pressed(pad_button button_press, bool is_auto_repeat) override;
18 |
19 | compiled_resource get_compiled() override;
20 |
21 | error_code show(std::function on_close);
22 |
23 | private:
24 | home_menu_main_menu m_main_menu;
25 | overlay_element m_dim_background{};
26 | label m_description{};
27 | label m_time_display{};
28 |
29 | animation_color_interpolate fade_animation{};
30 | };
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/Overlays/HomeMenu/overlay_home_menu_main_menu.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "overlay_home_menu_page.h"
4 |
5 | namespace rsx
6 | {
7 | namespace overlays
8 | {
9 | struct home_menu_main_menu : public home_menu_page
10 | {
11 | home_menu_main_menu(s16 x, s16 y, u16 width, u16 height, bool use_separators, home_menu_page* parent);
12 | };
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/Overlays/HomeMenu/overlay_home_menu_message_box.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "overlay_home_menu_components.h"
4 |
5 | namespace rsx
6 | {
7 | namespace overlays
8 | {
9 | struct home_menu_message_box : public overlay_element
10 | {
11 | public:
12 | home_menu_message_box(s16 x, s16 y, u16 width, u16 height);
13 | compiled_resource& get_compiled() override;
14 | void show(const std::string& text, std::function on_accept = nullptr, std::function on_cancel = nullptr);
15 | void hide();
16 | page_navigation handle_button_press(pad_button button_press);
17 |
18 | private:
19 | label m_label{};
20 | image_button m_accept_btn;
21 | image_button m_cancel_btn;
22 | std::function m_on_accept;
23 | std::function m_on_cancel;
24 | };
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/Overlays/HomeMenu/overlay_home_menu_savestate.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "overlay_home_menu_page.h"
4 |
5 | namespace rsx
6 | {
7 | namespace overlays
8 | {
9 | struct home_menu_savestate : public home_menu_page
10 | {
11 | home_menu_savestate(s16 x, s16 y, u16 width, u16 height, bool use_separators, home_menu_page* parent);
12 | };
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/Overlays/Shaders/shader_loading_dialog.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | class MsgDialogBase;
4 |
5 | namespace rsx
6 | {
7 | struct shader_loading_dialog
8 | {
9 | std::shared_ptr dlg{};
10 | atomic_t ref_cnt{0};
11 |
12 | virtual ~shader_loading_dialog() = default;
13 | virtual void create(const std::string& msg, const std::string& title);
14 | virtual void update_msg(u32 index, std::string msg);
15 | virtual void inc_value(u32 index, u32 value);
16 | virtual void set_value(u32 index, u32 value);
17 | virtual void set_limit(u32 index, u32 limit);
18 | virtual void refresh();
19 | virtual void close();
20 | };
21 | }
22 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/Overlays/Shaders/shader_loading_dialog_native.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "shader_loading_dialog.h"
4 |
5 | class GSRender;
6 |
7 | namespace rsx
8 | {
9 | namespace overlays
10 | {
11 | class message_dialog;
12 | }
13 |
14 | class thread;
15 |
16 | struct shader_loading_dialog_native : rsx::shader_loading_dialog
17 | {
18 | rsx::thread* owner = nullptr;
19 | std::shared_ptr dlg{};
20 |
21 | shader_loading_dialog_native(GSRender* ptr);
22 |
23 | void create(const std::string& msg, const std::string&/* title*/) override;
24 | void update_msg(u32 index, std::string msg) override;
25 | void inc_value(u32 index, u32 value) override;
26 | void set_value(u32 index, u32 value) override;
27 | void set_limit(u32 index, u32 limit) override;
28 | void refresh() override;
29 | void close() override;
30 | };
31 | }
32 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/Overlays/overlay_compile_notification.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "util/types.hpp"
4 | #include "util/atomic.hpp"
5 |
6 | namespace rsx
7 | {
8 | namespace overlays
9 | {
10 | void show_shader_compile_notification();
11 | std::shared_ptr> show_ppu_compile_notification();
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/Overlays/overlay_debug_overlay.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "overlays.h"
4 |
5 | namespace rsx
6 | {
7 | namespace overlays
8 | {
9 | class debug_overlay : public user_interface
10 | {
11 | label text_display;
12 | text_guard_t text_guard{};
13 |
14 | public:
15 | debug_overlay();
16 |
17 | compiled_resource get_compiled() override;
18 |
19 | void set_text(std::string&& text);
20 | };
21 |
22 | void reset_debug_overlay();
23 | void set_debug_overlay_text(std::string&& text);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/Overlays/overlay_edit_text.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "overlay_controls.h"
4 |
5 | namespace rsx
6 | {
7 | namespace overlays
8 | {
9 | struct edit_text : public label
10 | {
11 | enum class direction
12 | {
13 | up,
14 | down,
15 | left,
16 | right
17 | };
18 |
19 | usz caret_position = 0;
20 |
21 | bool m_reset_caret_pulse = false;
22 | bool password_mode = false;
23 |
24 | std::u32string value;
25 | std::u32string placeholder;
26 |
27 | using label::label;
28 |
29 | void set_text(const std::string& text) override;
30 | void set_unicode_text(const std::u32string& text) override;
31 |
32 | void set_placeholder(const std::u32string& placeholder_text);
33 |
34 | void move_caret(direction dir);
35 | void insert_text(const std::u32string& str);
36 | void erase();
37 | void del();
38 |
39 | compiled_resource& get_compiled() override;
40 | };
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/Overlays/overlay_loading_icon.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "overlay_animated_icon.h"
4 |
5 | namespace rsx
6 | {
7 | namespace overlays
8 | {
9 | class loading_icon24 : public animated_icon
10 | {
11 | public:
12 | loading_icon24()
13 | : animated_icon("spinner-24.png")
14 | {
15 | init_params();
16 | }
17 |
18 | loading_icon24(const std::vector& icon_data)
19 | : animated_icon(icon_data)
20 | {
21 | init_params();
22 | }
23 |
24 | private:
25 | void init_params()
26 | {
27 | m_frame_width = m_frame_height = 24;
28 | m_spacing_x = m_spacing_y = 6;
29 |
30 | set_size(24, 30);
31 | set_padding(4, 0, 2, 8);
32 | }
33 | };
34 | }
35 | }
36 |
37 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/Overlays/overlay_progress_bar.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "overlay_controls.h"
4 |
5 | namespace rsx
6 | {
7 | namespace overlays
8 | {
9 | struct progress_bar : public overlay_element
10 | {
11 | private:
12 | overlay_element indicator;
13 | label text_view;
14 |
15 | f32 m_limit = 100.f;
16 | f32 m_value = 0.f;
17 |
18 | public:
19 | progress_bar();
20 | void inc(f32 value);
21 | void dec(f32 value);
22 | void set_limit(f32 limit);
23 | void set_value(f32 value);
24 | void set_pos(s16 _x, s16 _y) override;
25 | void set_size(u16 _w, u16 _h) override;
26 | void translate(s16 dx, s16 dy) override;
27 | void set_text(const std::string& str) override;
28 |
29 | compiled_resource& get_compiled() override;
30 | };
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/Overlays/overlay_trophy_notification.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "overlays.h"
4 | #include "Emu/Cell/Modules/sceNpTrophy.h"
5 |
6 | namespace rsx
7 | {
8 | namespace overlays
9 | {
10 | struct trophy_notification : public user_interface
11 | {
12 | private:
13 | overlay_element frame;
14 | image_view image;
15 | label text_view;
16 |
17 | u64 display_sched_id = 0;
18 | u64 creation_time_us = 0;
19 | std::unique_ptr icon_info;
20 |
21 | animation_translate sliding_animation;
22 | animation_color_interpolate fade_animation;
23 |
24 | public:
25 | trophy_notification();
26 |
27 | void update(u64 timestamp_us) override;
28 |
29 | compiled_resource get_compiled() override;
30 |
31 | s32 show(const SceNpTrophyDetails& trophy, const std::vector& trophy_icon_buffer);
32 | };
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/Program/GLSLSnippets/GenericVSPassthrough.glsl:
--------------------------------------------------------------------------------
1 | R"(
2 | #version 420
3 | #extension GL_ARB_separate_shader_objects: enable
4 |
5 | layout(location=0) out vec2 tc0;
6 |
7 | #ifdef VULKAN
8 | #define gl_VertexID gl_VertexIndex
9 | #endif
10 |
11 | void main()
12 | {
13 | vec2 positions[] = {vec2(-1., -1.), vec2(1., -1.), vec2(-1., 1.), vec2(1., 1.)};
14 | #ifdef VULKAN
15 | // Origin at top left
16 | vec2 coords[] = {vec2(0., 0.), vec2(1., 0.), vec2(0., 1.), vec2(1., 1.)};
17 | #else
18 | // Origin at bottom left. Flip Y coordinate.
19 | vec2 coords[] = {vec2(0., 1.), vec2(1., 1.), vec2(0., 0.), vec2(1., 0.)};
20 | #endif
21 |
22 | tc0 = coords[gl_VertexID % 4];
23 | vec2 pos = positions[gl_VertexID % 4];
24 | gl_Position = vec4(pos, 0., 1.);
25 | }
26 | )"
27 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/Program/GLSLSnippets/RSXProg/RSXDefines2.glsl:
--------------------------------------------------------------------------------
1 | R"(
2 | // Small structures that should be defined before any backend logic
3 | // Avoid arrays and sub-vec4 members because of std140 padding constraints
4 | struct sampler_info
5 | {
6 | float scale_x, scale_y, scale_z; // 12
7 | float bias_x, bias_y, bias_z; // 24
8 | float clamp_min_x, clamp_min_y; // 32
9 | float clamp_max_x, clamp_max_y; // 40
10 | uint remap; // 44
11 | uint flags; // 48
12 | };
13 |
14 | )"
15 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/Program/GLSLSnippets/RSXProg/RSXProgramCommon.glsl:
--------------------------------------------------------------------------------
1 | R"(
2 | #define _select mix
3 | #define _saturate(x) clamp(x, 0., 1.)
4 | #define _get_bits(x, off, count) bitfieldExtract(x, off, count)
5 | #define _set_bits(x, y, off, count) bitfieldInsert(x, y, off, count)
6 | #define _test_bit(x, y) (_get_bits(x, y, 1) != 0)
7 | #define _rand(seed) fract(sin(dot(seed.xy, vec2(12.9898f, 78.233f))) * 43758.5453f)
8 |
9 | #ifdef _GPU_LOW_PRECISION_COMPARE
10 | #define CMP_FIXUP(a) (sign(a) * 16. + a)
11 | #else
12 | #define CMP_FIXUP(a) (a)
13 | #endif
14 |
15 | #ifdef _ENABLE_LIT_EMULATION
16 | vec4 lit_legacy(const in vec4 val)
17 | {
18 | vec4 clamped_val = vec4(max(val.xy, vec2(0.)), val.zw);
19 | return vec4(
20 | 1.,
21 | clamped_val.x,
22 | exp2(clamped_val.w * log2(max(clamped_val.y, 0.0000000001))) * sign(clamped_val.x),
23 | 1.);
24 | }
25 | #endif
26 |
27 | )"
28 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/Program/GLSLSnippets/RSXProg/RSXROPPrologue.glsl:
--------------------------------------------------------------------------------
1 | R"(
2 |
3 | #ifdef _ENABLE_POLYGON_STIPPLE
4 | if (_test_bit(rop_control, POLYGON_STIPPLE_ENABLE_BIT))
5 | {
6 | // Convert x,y to linear address
7 | const uvec2 stipple_coord = uvec2(gl_FragCoord.xy) % uvec2(32, 32);
8 | const uint address = stipple_coord.y * 32u + stipple_coord.x;
9 | const uint bit_offset = (address & 31u);
10 | const uint word_index = _get_bits(address, 7, 3);
11 | const uint sub_index = _get_bits(address, 5, 2);
12 |
13 | if (!_test_bit(stipple_pattern[word_index][sub_index], int(bit_offset)))
14 | {
15 | _kill();
16 | }
17 | }
18 | #endif
19 |
20 | #ifdef _ENABLE_PROGRAMMABLE_BLENDING
21 | vec4 mrt_color[4];
22 | for (int n = 0; n < framebufferCount; ++n)
23 | {
24 | mrt_color[n] = subPassLoad(mrtAttachments[n]);
25 | }
26 | #endif
27 | )"
28 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/Program/MSAA/DepthResolvePass.glsl:
--------------------------------------------------------------------------------
1 | R"(
2 | #version 420
3 | #extension GL_ARB_separate_shader_objects: enable
4 |
5 | #ifdef VULKAN
6 | layout(set=0, binding=0) uniform sampler2DMS fs0;
7 | layout(push_constant) uniform static_data { ivec2 sample_count; };
8 | #else
9 | layout(binding=31) uniform sampler2DMS fs0;
10 | uniform ivec2 sample_count;
11 | #endif
12 |
13 | void main()
14 | {
15 | ivec2 out_coord = ivec2(gl_FragCoord.xy);
16 | ivec2 in_coord = (out_coord / sample_count.xy);
17 | ivec2 sample_loc = out_coord % sample_count.xy;
18 | int sample_index = sample_loc.x + (sample_loc.y * sample_count.y);
19 | float frag_depth = texelFetch(fs0, in_coord, sample_index).x;
20 | gl_FragDepth = frag_depth;
21 | }
22 |
23 | )"
24 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/Program/MSAA/DepthStencilResolvePass.glsl:
--------------------------------------------------------------------------------
1 | R"(
2 | #version 420
3 | #extension GL_ARB_separate_shader_objects: enable
4 | #extension GL_ARB_shader_stencil_export : enable
5 |
6 | #ifdef VULKAN
7 | layout(set=0, binding=0) uniform sampler2DMS fs0;
8 | layout(set=0, binding=1) uniform usampler2DMS fs1;
9 | layout(push_constant) uniform static_data { ivec2 sample_count; };
10 | #else
11 | layout(binding=31) uniform sampler2DMS fs0;
12 | layout(binding=30) uniform usampler2DMS fs1;
13 | uniform ivec2 sample_count;
14 | #endif
15 |
16 | void main()
17 | {
18 | ivec2 out_coord = ivec2(gl_FragCoord.xy);
19 | ivec2 in_coord = (out_coord / sample_count.xy);
20 | ivec2 sample_loc = out_coord % ivec2(sample_count.xy);
21 | int sample_index = sample_loc.x + (sample_loc.y * sample_count.y);
22 | float frag_depth = texelFetch(fs0, in_coord, sample_index).x;
23 | uint frag_stencil = texelFetch(fs1, in_coord, sample_index).x;
24 | gl_FragDepth = frag_depth;
25 | gl_FragStencilRefARB = int(frag_stencil);
26 | }
27 |
28 | )"
29 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/Program/MSAA/DepthStencilUnresolvePass.glsl:
--------------------------------------------------------------------------------
1 | R"(
2 | #version 420
3 | #extension GL_ARB_separate_shader_objects: enable
4 | #extension GL_ARB_shader_stencil_export : enable
5 |
6 | #ifdef VULKAN
7 | layout(set=0, binding=0) uniform sampler2D fs0;
8 | layout(set=0, binding=1) uniform usampler2D fs1;
9 | layout(push_constant) uniform static_data { ivec2 sample_count; };
10 | #else
11 | layout(binding=31) uniform sampler2D fs0;
12 | layout(binding=30) uniform usampler2D fs1;
13 | uniform ivec2 sample_count;
14 | #endif
15 |
16 | void main()
17 | {
18 | ivec2 pixel_coord = ivec2(gl_FragCoord.xy);
19 | pixel_coord *= sample_count.xy;
20 | pixel_coord.x += (gl_SampleID % sample_count.x);
21 | pixel_coord.y += (gl_SampleID / sample_count.x);
22 | float frag_depth = texelFetch(fs0, pixel_coord, 0).x;
23 | uint frag_stencil = texelFetch(fs1, pixel_coord, 0).x;
24 | gl_FragDepth = frag_depth;
25 | gl_FragStencilRefARB = int(frag_stencil);
26 | }
27 |
28 | )"
29 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/Program/MSAA/DepthUnresolvePass.glsl:
--------------------------------------------------------------------------------
1 | R"(
2 | #version 420
3 | #extension GL_ARB_separate_shader_objects: enable
4 |
5 | #ifdef VULKAN
6 | layout(set=0, binding=0) uniform sampler2D fs0;
7 | layout(push_constant) uniform static_data { ivec2 sample_count; };
8 | #else
9 | layout(binding=31) uniform sampler2D fs0;
10 | uniform ivec2 sample_count;
11 | #endif
12 |
13 | void main()
14 | {
15 | ivec2 pixel_coord = ivec2(gl_FragCoord.xy);
16 | pixel_coord *= sample_count.xy;
17 | pixel_coord.x += (gl_SampleID % sample_count.x);
18 | pixel_coord.y += (gl_SampleID / sample_count.x);
19 | float frag_depth = texelFetch(fs0, pixel_coord, 0).x;
20 | gl_FragDepth = frag_depth;
21 | }
22 |
23 | )"
24 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/Program/MSAA/StencilResolvePass.glsl:
--------------------------------------------------------------------------------
1 | R"(
2 | #version 420
3 | #extension GL_ARB_separate_shader_objects: enable
4 |
5 | #ifdef VULKAN
6 | layout(set=0, binding=0) uniform usampler2DMS fs0;
7 | layout(push_constant) uniform static_data
8 | {
9 | layout(offset=0) ivec2 sample_count;
10 | layout(offset=8) int stencil_mask;
11 | };
12 | #else
13 | layout(binding=31) uniform usampler2DMS fs0;
14 | uniform ivec2 sample_count;
15 | uniform int stencil_mask;
16 | #endif
17 |
18 | void main()
19 | {
20 | ivec2 out_coord = ivec2(gl_FragCoord.xy);
21 | ivec2 in_coord = (out_coord / sample_count.xy);
22 | ivec2 sample_loc = out_coord % sample_count.xy;
23 | int sample_index = sample_loc.x + (sample_loc.y * sample_count.y);
24 | uint frag_stencil = texelFetch(fs0, in_coord, sample_index).x;
25 | if ((frag_stencil & uint(stencil_mask)) == 0) discard;
26 | }
27 |
28 | )"
29 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/Program/MSAA/StencilUnresolvePass.glsl:
--------------------------------------------------------------------------------
1 | R"(
2 | #version 420
3 | #extension GL_ARB_separate_shader_objects: enable
4 |
5 | #ifdef VULKAN
6 | layout(set=0, binding=0) uniform usampler2D fs0;
7 | layout(push_constant) uniform static_data
8 | {
9 | layout(offset=0) ivec2 sample_count;
10 | layout(offset=8) int stencil_mask;
11 | };
12 | #else
13 | layout(binding=31) uniform usampler2D fs0;
14 | uniform ivec2 sample_count;
15 | uniform int stencil_mask;
16 | #endif
17 |
18 | void main()
19 | {
20 | ivec2 pixel_coord = ivec2(gl_FragCoord.xy);
21 | pixel_coord *= sample_count.xy;
22 | pixel_coord.x += (gl_SampleID % sample_count.x);
23 | pixel_coord.y += (gl_SampleID / sample_count.x);
24 | uint frag_stencil = texelFetch(fs0, pixel_coord, 0).x;
25 | if ((frag_stencil & uint(stencil_mask)) == 0) discard;
26 | }
27 |
28 | )"
29 |
--------------------------------------------------------------------------------
/rpcs3/Emu/RSX/Program/SPIRVCommon.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | namespace glsl
4 | {
5 | enum program_domain : unsigned char;
6 | enum glsl_rules : unsigned char;
7 | }
8 |
9 | namespace spirv
10 | {
11 | bool compile_glsl_to_spv(std::vector