Commit Graph

6598 Commits

Author SHA1 Message Date
rogerman 9c3e206fed Cocoa Port (OpenEmu Plug-in): Changing a single display mode no longer applies all settings each time. Now, individual settings are applied only if the relevant state bits were actually changed.
- This change helps make display view resizing smoother.
2022-05-07 11:33:02 -07:00
rogerman 289c68fae8 Cocoa Port: Tweak the "View" menu in the standalone app and the "Display Modes" menu in the OpenEmu plug-in to better match each other. 2022-05-06 20:08:40 -07:00
rogerman 3c04e8f4c7 Cocoa Port (OpenEmu Plug-in): Add OpenGL as an option for the emulated GPU rendering engine.
- Now that we can use OpenGL, we can increase the 3D render scaling to up to 8x for machines that can handle it.
- Also add the Fragment Sampling Hack option for SoftRasterizer for certain games that need it to 'fix' texture rendering.
- Also add the Smooth Textures option for OpenGL for games that can benefit from it.
2022-05-06 18:23:52 -07:00
rogerman e90ac6cc43 Cocoa Port (OpenEmu Plug-in): Fix a crash with HUD rendering when running on macOS Monterey.
- So apparently, the buffers used to upload the font texture data must remain in memory for the entire lifetime of the texture when running on Monterey. It is a mystery why the OpenEmu plug-in requires this for Monterey, as this is not required for older macOS versions, nor is it required in any way on the standalone app.
- Also remove the copy of the HUD font path. Since we're now copying the font file itself into memory, retaining a copy of the font path is no longer necessary.
2022-05-06 03:12:01 -07:00
rogerman 0a6aee6421 Cocoa Port (OpenEmu Plug-in): Add support for higher 3D rendering resolutions (up to 4x) with texture upscaling.
- Brings back compatibility for OpenEmu v1.0.4. (This was done because the v0.9.11 could run on it. Note that the advanced display features still require the latest OpenEmu version.)
- Also fixes issues with HUD font rendering.
2022-05-05 22:31:13 -07:00
rogerman dce04f722f Cocoa Port: Rename class "GPUEventHandlerOSX" to "GPUEventHandlerAsync".
- Also make a stub class of GPUEventHandlerAsync to better control some multithreaded stuff in the OpenEmu plug-in.
2022-05-05 14:32:00 -07:00
rogerman 180df28ce7 Cocoa Port: Improve the handling of HUD font rendering for OpenGL display views running on old drivers. 2022-05-05 14:29:53 -07:00
rogerman 6e26980d87 Cocoa Port (OpenEmu Plug-in): Do a complete revamp of the OpenEmu plug-in, giving it the same performance level as the standalone app, plus most of the video display options as the standalone app!
- Includes native binaries for Intel 64-bit, Intel 64-bit Haswell, and ARM64.
- The Dynamic Recompiler engine for ARM64 processors is now enabled by default, greatly increasing performance on Apple Silicon Macs.
- Now includes the full suite of dual-screen display layouts, screen rotations, display gap options, and so on.
- The Heads Up Display is now included.
- Can use the latest features of OpenEmu v2.3.3 running on macOS Monterey, but is also backwards compatible with OpenEmu v2.0.9.1 running on macOS El Capitan.
- Also includes general stability improvements.
2022-05-03 13:24:24 -07:00
rogerman cc530c7a38 Cocoa Port: Display presenter objects now cache the font file in memory, just in case a bad client decides to repeatedly force the reloading of the font. (cough... OpenEmu view resizing... cough) 2022-05-03 04:21:34 -07:00
rogerman ccfd5a5a55 Cocoa Port: Fix a theoretical crash that may occur on app exit.
- This doesn't actually happen in practice, but its good to fix this anyways.
2022-05-03 04:17:30 -07:00
rogerman e2373bc5ff Cocoa Port: Calculate the execution speed less often, but more accurately.
- Also fix a theoretical memory leak with the Video FPS timer.
2022-05-03 04:16:06 -07:00
rogerman e25fd2e8c5 Cocoa Port: Restore the HUD visibility state of an OpenGL presenter if it ever needs to be reinitialized. 2022-05-03 04:11:41 -07:00
rogerman 7239c6cfd6 Cocoa Port: Small refactor to make the ClientDisplayViewInterface::GetNDSPoint() method always available. 2022-05-02 16:10:38 -07:00
rogerman 0e42f772bc Cocoa Port: Refactor a few things. 2022-04-29 12:04:49 -07:00
rogerman ba630ee278 JIT (ARM): Fix for transformers 32bit JIT, corrects shifts in 64bit jit on non condition shifts
- Special thanks to @byte4byte for these fixes.
2022-04-28 10:02:22 -07:00
rogerman a276d8c29c JIT (ARM): Fixes a rendering bug in the SVatGLovesYou demo.
- Special thanks to @byte4byte for the fix. His notes: "Fixed rrx shifts"
2022-04-27 22:58:53 -07:00
rogerman a72134539d JIT (ARM): Fix bug that prevented the Titan LMNTS Demo homebrew ROM from starting up.
- Special thanks to @byte4byte! His notes: "Fixed cmp operands, Fixes titan homebrew rom"
2022-04-27 18:08:34 -07:00
rogerman ebc39eae64 Cocoa Port: Major code refactor to the video display system with the purpose of breaking up multipurpose classes of homogenous data into more focused classes.
- Also removes unnecessary Objective-C code and converts it into C++. Objective-C has its place, but not at this level of function.
2022-04-27 17:02:04 -07:00
rogerman 908a53e85a JIT (ARM): Fix graphical glitches in "Diddy Kong Racing" and "Pokemon Ranger".
- Special thanks again to @byte4byte for this fix. His notes: "Fixes for shifting. Fixes diddy kong racing & pokemon ranger text".
2022-04-27 11:24:59 -07:00
rogerman 88f2dfdb53 Cocoa Port: Fix a longstanding bug where OpenGL video blitter would fail to render to window correctly on Retina displays. 2022-04-27 04:52:25 -07:00
rogerman cfa75df069 JIT (ARM): Fix audio issues with "Chronicles of Narnia: The Lion, the Witch and the Wardrobe". Also fixes incorrect colors in "Transformers: Decepticons" opening movie.
- Special thanks to @byte4byte for this fix. His notes: "Corrected OP_SMxxW_ arm64 instructions, fixes narnia & transformers".
2022-04-26 13:34:39 -07:00
rogerman 2ab69da5e2 JIT (ARM): Fix bugs that caused "Alice in Wonderland" and "Sonic Chronicles: The Dark Brotherhood" to fail to start.
- Also fixes ultra slow text timing in "7th Dragon".
- Special thanks to @byte4byte for this fix. His notes: "Fixed issue with sbc&adc reg and mvns".
2022-04-25 11:18:23 -07:00
rogerman 0b0bee78cc Cocoa Port: Remove the dev+ requirement for Dynamic Recompiler on ARM CPUs. The Dynamic Recompiler option is now available for users running Apple Silicon Macs! 2022-04-24 14:56:07 -07:00
rogerman b1ee7e80d5 JIT (ARM): Fix a crash when resetting the emulator. Also fixes a memory leak. (Related to commit f12a70f4.) 2022-04-24 14:11:33 -07:00
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