Commit Graph

6817 Commits

Author SHA1 Message Date
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
rogerman b1d49d14ec matrix.h: Fix compiling on AltiVec-enabled systems. (Regression from commit 8a9fec43.) 2022-04-05 22:12:05 -07:00
rogerman 74cdfeea32 Colorspace Handler: Fix some bugs with NEON.
- These changes shouldn't change existing functionality, but are more to document what the code should actually be doing. Regardless, these changes are truly correct.
2022-04-03 15:34:15 -07:00
rogerman 9ccc791e32 Colorspace Handler: Add support for NEON-A64.
Signed-off-by: rogerman <rogerman@users.noreply.github.com>
2022-04-02 23:47:21 -07:00
rogerman 8a9fec431a matrix.h: stream_copy_fast() for AltiVec and NEON now mirror their associated buffer_copy_fast() functions, replacing memcpy().
- Since stream_copy_fast() and buffer_copy_fast() are intended for small finite-sized buffers only, we shouldn't need a full memcpy() call with these.
2022-04-02 23:43:46 -07:00
rogerman 7e85253ebb Core: Add preliminary support for ARM NEON-A64. The generic memset and buffer_copy functions are now supported.
- Note that NEON support is assuming the A64 instruction set. But if there is enough user demand for running the A32 instruction set, and if it is feasible to backport the NEON code to A32, then this may be explored at a later date. But for now, we are sticking with A64.
2022-04-02 21:33:14 -07:00
Roger Manuel 03be21608e
Update build.yml for macOS nightlies (regression from commit e9b3998f) 2022-04-02 17:36:25 -07:00
rogerman 1f377be17b Core: Do some minor header cleanup. 2022-04-02 17:28:02 -07:00
rogerman a9706059e0 Cocoa Port: Fix AltiVec vec_perm() related bugs if building for ppc64.
- Apparently, vec_perm() on ppc32 assumes that vec_perm() will always use vectors with 8-bit elements. However, ppc64 vec_perm() can use elements of different sizes, and so we need to typecast every single case of this so that the correct vec_perm() is called on ppc64.
2022-04-02 15:57:38 -07:00
rogerman a677ffd168 videofilter.cpp: Silence a compiler warning by initializing the entire SSurface struct instead of just a part of it. 2022-04-02 15:53:03 -07:00
rogerman 8f20237c04 Cocoa Port: Fixes the use of macOS GUI sheets in Lion and Mountain Lion. (Regression from commit e9b3998f.) 2022-04-02 15:40:23 -07:00
rogerman e9b3998fe8 Cocoa Port: Add new build targets for Apple Silicon, and also clean up Release Build targets.
- Apple Silicon builds target macOS 11.0 SDK, so almost all deprecation warning associated with this have also been fixed. (The remaining deprecation warnings in preferencesWindowDelegate.mm still need to be fixed in some other way.)
- Intel 64-bit developer builds now require macOS 10.12 SDK (Xcode 8 or later). Of note, this produces faster SSE4.1 code by default, but also requires a Penryn-era Core2Duo CPU or later. (Note that Intel 64-bit non-Haswell in release builds still use SSSE3.)
- Improves overall stability when running DeSmuME on macOS 10.5 Leopard.
- In addition, release builds running Intel 64-bit non-Haswell no longer require macOS 10.7 Lion. They can run on Leopard again!
- Finally fix some GUI issues in the About box when running Dark Mode on macOS 10.14 Mojave or later.
2022-04-02 13:52:17 -07:00