Commit Graph

6828 Commits

Author SHA1 Message Date
rogerman f12a70f4b7 Add a brand new JIT CPU emulation engine for ARM! Special thanks to user @byte4byte from byte4byte.com for making this new feature!
- If you have an ARM processor, expect anywhere between 10% to 50% improvement to CPU emulation performance for most games.
- But it isn't quite for prime time just yet. There is a crashing bug related to munmap() at emit_core.cpp:93 that causes the app to crash when resetting the emulator after a game has already been run.
- The Cocoa port now enables the new ARM JIT engine for Macs running Apple Silicon processors, but only for dev+ builds. This is due to the crashing bug noted above.
2022-04-23 20:00:30 -07:00
rogerman 2e95dda3f5 Cocoa Port: Fix some memory leak issues, especially apparent when running Metal display views. 2022-04-22 18:23:46 -07:00
rogerman 57dd000496 Cocoa Port (OpenEmu Plug-in): Add arm64 binary. 2022-04-22 12:12:05 -07:00
rogerman cd0cc31505 Cocoa Port (OpenEmu Plug-in): Remove [OEGameCore changeDisplayMode] deprecation in favor of the latest display mode API. (Related to commit 452c3340.)
- Also sets things up for adding new display modes in the future.
2022-04-22 04:03:43 -07:00
rogerman 452c33405c Cocoa Port (OpenEmu Plug-in): Update DeSmuME's OEGameCore to the latest version of the OpenEmu SDK.
- There should be no functional changes in this commit. We're simply mirroring the latest SDK for changes to come.
- Fix all deprecations, with the exception of [OEGameCore changeDisplayMode]. This one will be quite involved.
2022-04-21 11:13:04 -07:00
rogerman 4708404734 Cocoa Port: Disable OpenGL 3D renderer for PowerPC Macs. Also update some tooltips to reflect new app behavior based on previous commits. 2022-04-20 22:34:25 -07:00
rogerman 53dd630ea5 Cocoa Port: Remove the menu options "Emulation > Show Wi-Fi Settings" and "Tools > Show AV Capture Tool".
- The features contained therein aren't ready for prime time, and so they are being pushed out to the next release.
- These menu options are still accessible on dev+ builds.
2022-04-20 18:43:27 -07:00
rogerman 725ffb5127 Cocoa Port: Be a lot cleaner about commenting out non-working code. 2022-04-20 18:31:22 -07:00
rogerman ab38d17fea OpenGL Renderer: Fix rendering on very very very old GPUs, such as the ATi Mobility X1600 (circa 2006).
- This change basically returns us to using 1D textures for color LUTs instead of using uniform arrays. 1D textures seem to be more compatible for most older hardware.
- Unfortunately, while most older GPUs will work better with this change, this may break the OpenGL renderer on even older GPUs, such as the GeForce 7800 GT (circa 2005).
- I'm estimating that more old GPUs benefit from this change than not, and so using 1D textures is what will stand. The vast majority of users will be using hardware newer than this, and so anyone who can't run OpenGL renderer in 2022 can just switch to SoftRasterizer.
2022-04-20 18:24:07 -07:00
rogerman 45a2f424e6 matrix.cpp: Remove saturation logic from MatrixMultiply(), as this causes characters to disappear during "Kingdom Hearts: Re-coded" character conversations.
- This bug was found by enabling FIXED_POINT_MATH_FUNCTIONS_USE_ACCUMULATOR_SATURATE. Since this macro is disabled by default, this commit should not affect any normal operation.
2022-04-18 23:29:21 -07:00
rogerman 803c885ef2 Cocoa Port: Rollback strong linking of Metal.framework for the x86_64h Final Release build. (Related to commit d0d0f62d.)
- Apparently, there are some Macs that have Intel Haswell CPUs that can run macOS versions earlier than El Capitan, so Metal.framework must be weak-linked for the Final Release.
- All x86_64h Debug builds and all Apple Silicon builds still retain strong linking with Metal.framework.
2022-04-18 17:00:50 -07:00
rogerman d0d0f62d4d Cocoa Port: Strong link Metal.framework for builds that can support it. 2022-04-18 16:46:20 -07:00
rogerman 42da2645c1 Cocoa Port: Fix a bug where the troubleshooting form text would not switch to Dark Mode appearance. 2022-04-18 15:32:06 -07:00
rogerman 864d419513 Cocoa Port: Use [MTLDrawable present] instead of [MTLDrawable presentAtTime:]. Does this reduce microstuttering even further? 2022-04-18 14:54:54 -07:00
rogerman bd030db03f Cocoa Port: Use a std::queue to keep track of Metal drawable ordering.
- This is probably super paranoid and completely overkill, but it makes me feel better to do this. Now there is absolute certainty that nothing can disrupt the drawable order in between rendering and presentation. Microstuttering from mis-ordered drawables can no longer happen.
2022-04-18 13:20:41 -07:00
rogerman 32461006d9 Cocoa Port: Fix bug where CPU-based video filters would cause wonky colors on PowerPC Macs. 2022-04-18 10:03:09 -07:00
rogerman a758e3f0df Cocoa Port: In DeSmuME Preferences, increase the size of the Input Preferences view from 640x495 to 800x540. 2022-04-16 21:50:39 -07:00
rogerman 84e98a0c49 Cocoa Port: Fix some bugs related to macOS Mojave's Dark Mode.
- Fix a bug where running DeSmuME on a Mac with a non-Haswell 64-bit Intel CPU would fail to switch the GUI icons into Dark Mode, despite the user running Mojave or later.
- Fix a bug where the GUI icons would occasionally fail to correctly switch between Light Mode and Dark Mode if the user changed the system appearance in System Preferences while running Mojave or Catalina.
- Add a new menu option in "Tools > App Appearance Mode" to manually force DeSmuME's app appearance to reflect Light Mode or Dark Mode. (Only available on dev+ builds.)
2022-04-16 20:58:10 -07:00
rogerman 680b3c16a3 Cocoa Port: Troubleshooting forms for Public Release builds now display the same detailed app build info as the other builds.
- Since the executable can now contain 5 binary slices, having the detailed info available can provide extra insight on the user's runtime environment.
2022-04-16 20:40:33 -07:00
rogerman 9035c193c8 Cocoa Port: The microphone and speaker icons now adapt their appearance to macOS Mojave's Dark Mode. 2022-04-15 17:30:59 -07:00
rogerman a73705bc50 Cocoa Port: Polish the behaviors for hardware microphone authorization. (Related to commit efa72df1.)
- Hardware microphone authorization is now requested on app startup instead of when a ROM is loaded.
- CoreAudioInput is now better at handling situations when the hardware mic is not available, fixing some bugs with the mic level indicator.
- Add some helpful tooltips in the Microphone Settings panel when the hardware mic is not authorized.
- Add a new idle mic icon to denote when the hardware mic is not available. (The gray color should denote a 'software only' status.)
- Further brighten up the microphone icon for when software samples are active to help with visibility when running Dark Mode.
2022-04-15 12:34:05 -07:00
rogerman 02d8f0aa4d Oops! Forgot to commit a file. 2022-04-14 16:02:47 -07:00
rogerman 899ab48d78 GFX3D: Rework how matrix stacks are initialized in an attempt to get MSVC to successfully build Win32.
- Access to the matrix stacks has been simplified to the point where MatrixStackInit() and MatrixStackGet() are now obsolete. These functions have been removed.
2022-04-14 15:53:15 -07:00
rogerman 965419d7ca Cocoa Port: Add new microphone and speaker icons in preparation of adding support for macOS Mojave's Dark Mode.
- Also adds the AVFoundation framework to the "Xcode (Latest).xcodeproj" file in preparation of new UI related to dealing with macOS Mojave's microphone permissions.
2022-04-14 13:55:18 -07:00
rogerman 2645a69005 matrix.cpp: Simplify the NEON functions by replacing separate multiply and add instructions with combined multiply-accumulate instructions.
- Also simplify the __mtx4_multiply_mtx4_* functions by removing duplicate code.
2022-04-13 23:29:34 -07:00
rogerman efa72df171 Cocoa Port: Fix microphone permissions when running macOS v10.14 Mojave and later. (Fixes #475.)
- Also fixes another bug where the microphone level indicator won't update when running macOS v10.14 Mojave and later.
2022-04-13 17:31:40 -07:00
rogerman 2113af2994 Cocoa Port: Update the microphone level once every 4 frames instead of once every 8 frames. This makes the level indicator appear smoother. 2022-04-13 17:24:23 -07:00
rogerman 7c90bc592f Cocoa Port: Fix broken settings sheets for Input Preferences when running on pre-Mavericks macOS. (Regression from commit e9b3998f, also related to commit 8f20237c.) 2022-04-13 15:42:25 -07:00
rogerman 46a8c2385a Cocoa Port: Rename one more instance of "OS X Core Audio" to "macOS Core Audio". (Related to commit 62f78f2f.) 2022-04-13 11:42:40 -07:00
rogerman 8d1188f552 matrix.cpp: Add NEON versions of geometry engine math functions.
- Also do some minor bug fixes with some floating-point functions.
- Also remove __vec4_dotproduct_vec4_fixed_SSE4() since the function didn't work anyways, and since we now have __vec4_dotproduct_vec4_fixed_NEON() to use as an actual working reference.
2022-04-13 02:03:12 -07:00
rogerman b608a62cd0 matrix.cpp: Major cleanup and refactor. All previous functionality and behavior should be retained.
- This refactor was done to support future additions of SIMD functions using ISAs other than SSE / SSE4.1.
- Add support for fixed-point math functions using accumulators that saturate, following the GEM_TransformVertex() function. This feature requires new testing, and has been disabled for now in order to retain the previous behavior.
- Remove the obsolete and unused functions _MatrixMultVec4x4_NoSIMD() and vector_fix2float(). If non-SIMD testing is required, it should be easy enough to comment out the SIMD code paths in the appropriate function in favor of the plain C code path.
2022-04-12 17:33:20 -07:00
Keppl 631f2a265e Added check that index file was actually openned for writing.
If not, skip creating backup part of loading.
2022-04-12 19:07:06 -04:00
Keppl dec93fecfa Added configuration option to define number of max number of backups. Windows only at the moment. 2022-04-11 22:26:16 -04:00
Keppl 970663bf71 Fixed bug when writing index, set default max to 200 2022-04-11 17:59:17 -04:00
Keppl 53be5f6968 Changed loadstate_slot function to keep only 5 latest backups when saving curring state before loading.
Once more than 5 exist, oldest one will be overwritten.
2022-04-10 22:36:10 -04:00
rogerman 2e6b938378 Render3D / SoftRasterizer: Add some more NEON optimizations. 2022-04-08 03:43:07 -07:00
rogerman e8de3db99c Cocoa Port: If OpenGL is the Video Output Engine, then drop the revision number from the engine name in the troubleshooting forms.
- The only OpenGL version with a revision number is v1.2.1, but the Cocoa port will always use v2.0 or higher. So let's remove the revision number to make things look cleaner.
- Also change the tags "DESMUME RUNTIME INFORMATION" to "DESMUME TROUBLESHOOTING INFORMATION", which is more explanatory when the information is copy/pasted into whatever text field it appears in.
2022-04-08 01:27:08 -07:00
rogerman 1490a19ad1 Cocoa Port: Fix a GUI bug where adding or removing an input mapping in Input Preferences may occasionally cause its outline view to fail to update under certain OS/build combinations.
- I solved it by simply reloading the entire outline view instead of picking and choosing specific items to reload. Due to the relatively few amount of items in the outline view (less than 1000 items), reloading the entire outline view is still very fast, even on a PowerPC Mac.
2022-04-07 18:21:30 -07:00
rogerman ed52d0e093 Cocoa Port: dev+ builds from the "DeSmuME (Latest).xcodeproj" file no longer generate MainMenu.strings files.
- MainMenu.strings files can still be generated from builds from the "DeSmuME (XCode 3).xcodeproj" file, which does result in a cleaner file to begin with.
2022-04-07 17:15:00 -07:00
rogerman 62f78f2f24 Cocoa Port: Rename the "OS X Core Audio" audio output engine to "macOS Core Audio". 2022-04-07 17:02:47 -07:00
rogerman 4df869c309 Cocoa Port: Fix a potential crash on startup if Metal is not available. (Regression from commit 6833e315.)
- Also change one of Apple's Metal enums to an older version to fix a compiling issue with Xcode 8.
2022-04-07 16:28:50 -07:00
rogerman 6833e3159d Cocoa Port: Tune up the DeSmuME runtime information in the troubleshooting forms.
- Add line for the Video Output Engine. Backend type (OpenGL or Metal), version, and renderer information are all reported.
- Remove section breaking dashes, as this causes GitHub's comment parser to reformat the runtime info in unpredictable ways.
- To compensate for removing the section breaking dashes, add delimiters for the beginning and the ending of the runtime information.
- If the Active Cheat Count is 0, then just report "NO" for Cheats, as this is functionally equivalent, but less confusing to read.
2022-04-07 13:29:30 -07:00
rogerman 2efb260b44 GPU: Client fetch objects can now have names and descriptions. 2022-04-07 13:17:34 -07:00
rogerman 7c036c1d50 Cocoa Port: Fix bug where Apple Silicon dev+ builds didn't include "dev+" in their app name. 2022-04-07 00:08:03 -07:00
rogerman 31225d0ed1 texcache.cpp: Oops! This file accidentally got sent with the last commit before I could clean it up. All unused development/debugging code has now been removed.
- Here's what the notes should have said: Add SIMD optimized versions of texture unpacking functions. AVX2, NEON, and AltiVec are now supported.
2022-04-06 23:59:56 -07:00
rogerman 28f12cf088 Colorspace Handler: Further optimize NEON code.
- Commit 9ccc791 was, more or less, a straight port of the SSE2 code, making it less than ideal. This updated version uses more NEON-only instructions to further improve performance.
2022-04-06 23:51:29 -07:00
rogerman 27a32d6262 Sigh... partially revert commit e8328ed to make Linux builds happy. 2022-04-06 10:34:26 -07:00
rogerman 42c59d9257 Minor correction related to commit e8328eda.
- If this doesn't fix Linux builds (it probably won't), then I will partially revert commit e8328eda to make it work.
2022-04-06 10:16:49 -07:00
rogerman e8328eda33 GPU: Clean up some old header stuff now that the SIMD code has been factored out. 2022-04-05 23:15:51 -07:00
rogerman c5c9e2d3a7 Colorspace Handler: Pad out some small arrays so that they can be useful for SIMD vector loads. Up to 512-bit vector loads are supported.
- For practical reasons, we shouldn't need to pad out any arrays past 64 bytes any time soon.
2022-04-05 22:28:43 -07:00