7044 Commits

Author SHA1 Message Date
rogerman
dedb7137d5 Cocoa Port: Major refactor, mostly involving replacing the old CocoaDSGPU class with the new CocoaGraphicsController class.
- These changes replace even more Objective-C code with C++ code.
- Fix building for the OpenEmu Plug-in using the latest code from previous refactors.
- In the 3D Rendering Settings panel, add the ability to switch the 3D rendering engine to explicitly run OpenGL in Legacy mode or in 3.2 Core Profile mode. (dev+ builds only.)
2026-01-07 23:07:18 -08:00
rogerman
49dd1a5b84 Cocoa Port: Do a tiny (and possibly dubious) optimization to the xBRZ GLSL shaders. 2026-01-06 21:31:30 -08:00
rogerman
7a0ba8c11f Cocoa Port: Reformat spacing in ClientDisplay3DPresenter::SetHUDTouchLinePositionVertices() method to use spaces instead of tabs. 2026-01-06 21:13:38 -08:00
rofl0r
7f4d1802c1
Fix typo in issue template header
Corrected the header from 'Isse' to 'Issue' for clarity.
2025-12-11 15:35:02 +01:00
rogerman
b500fb5419 NDSSystem.cpp: In GameHacks::reset(), have the loop for deleting cheats objects match the loop in GameHacks::execute() for better code consistency. 2025-12-08 15:32:23 -08:00
rogerman
38a674d455 Windows Port/Interface: Make build files more robust and less prone to breakage for future Visual Studio versions. (Related to commit 39f27d3, 5e006a0, and PR #936.) 2025-12-08 14:53:23 -08:00
rogerman
5e006a009d Windows Interface: Make builds compatible with VS2012, VS2013, and VS2026. (Related to commit 39f27d3 and PR #936.) 2025-12-08 11:08:32 -08:00
rogerman
39f27d32d1 Windows Port: Make builds compatible with VS2012, VS2013, and VS2026. (Based on PR#936.) 2025-12-08 09:51:49 -08:00
rogerman
6d9f01dced Windows Port: Minor fixes to allow builds on older Visual Studio versions. 2025-12-07 20:23:06 -08:00
rofl0r
23805ba217 gtk2: implement export battery save menu item 2025-12-07 13:47:15 +00:00
rogerman
f744661edf Cocoa Port: Reduce the size of legacy Release builds by stripping debugging symbols, and fix runtime for ppc32. (Regression from commit d5e4ed5.) 2025-12-07 01:39:57 -08:00
rogerman
a0b088ea76 Fix compiling for non-Windows platforms. (Regression from commit df8816f.) 2025-12-06 20:29:49 -08:00
zeromus
df8816f44f add system for per-game AR-style cheats (re #483) 2025-12-06 18:35:24 -05:00
Konstantysz
efd7486357
Add backup memory import/export API to interface (#932) 2025-10-29 16:22:56 +01:00
rofl0r
a9df2b9f41 Revert "interface API: add backup memory import/export functions (#930)"
This reverts commit 47f91c4fc2da292f9af7b12a799fd3cedd0e756d.

this commit breaks build and is reverted until a PR with a fix comes in.
2025-10-27 18:18:11 +00:00
Konstantysz
47f91c4fc2
interface API: add backup memory import/export functions (#930)
* Add backup memory import/export API to interface

* Add documentation for backup import/export functions

* Simplify API
2025-10-27 14:25:50 +01:00
Link Mauve
84676aae89 Remove executable bit from source files 2025-10-05 14:27:20 +02:00
rogerman
2ab82a6c06 Windows Port: Fix bug where using a fixed window size for the display window would cause the display window to get shrunk by the GPU Scaling Factor. (Regression from commit d5e4ed5.) 2025-10-02 16:06:59 -07:00
rogerman
588b1ad15f OpenGL Renderer: Remove extraneous glFinish() calls that cause a minor performance loss on older GPUs. (Regression from commit 8238c35.) 2025-10-02 00:17:35 -07:00
rogerman
2f4fab6200 Fix compiling for GTK3 port. (Regression from commit d5e4ed5.) 2025-10-01 23:58:28 -07:00
rogerman
d5e4ed57d7 GPU: Major refactor that simplifies the code and moves all GPU settings changes (except for 3D-related settings) to occur right before the beginning of line zero. All ports have been significantly affected by this change.
- GPU core: GPU engine class instantiations are now allocated with new and delete operators, rather than using static Allocate() and FinalizeAndDeallocate() methods.
- GPU core: GPU engines now reference an assigned GPUSubsystem object, rather than referencing the GPU global variable.
- Cocoa Port: Move all CGL context creation code to its own appropriate file. This now follows the same code pattern as WGL, GLX, EGL, and SDL.
- Windows Port: Reduce host memory usage for video framebuffers by using the framebuffer page system in GPUSubsystem directly instead of copying to separate DisplayBuffer structs.
- WIndows Port: Slightly improve overall video performance for both DirectDraw and OpenGL by eliminating one framebuffer copy.
- Windows Port: Significantly improve OpenGL video performance further (when running without video magnification filters) through better texture management, and also by eliminating one additional framebuffer copy.
- Windows Port: Virtually eliminate all CPU usage when the emulation is idle by eliminating periodic video redrawing.
- Windows Port: Greatly improve HUD redrawing when the emulation is idle. Window redrawing can now be up to the refresh rate of the host monitor.
- Windows Port: Fix a bug where changing the video magnification filter would cause a memory leak.
- GTK2 Port Only: Now supports vector fonts for HUD drawing via AGG2D_USE_VECTORFONTS, just like how the GTK3 port does it.
- GTK2 / GTK3 Ports: The Code::Blocks project file now defines AGG2D_USE_VECTORFONTS for both ports.
- GTK2 / GTK3 Ports: Maximum GPU Scaling Factor increased from 10.0 to 16.0. This now matches the maximum GPU Scaling Factor for the Cocoa and Windows ports.
- GTK2 / GTK3 Ports: The default color format is now 18-bit RGB666 instead of 15-bit RGB555. This is the actual color format for the NDS, and now matches the default color format for the Cocoa and Windows ports.
- GTK2 / GTK3 Ports: For anyone who cares to implement this -- it is now possible to set the video output color format, as the code is now ready for it. (Just set up some UI to call gtk*Event->SetColorFormat(), passing in an NDSColorFormat enum value to set the color format.)
- GTK2 / GTK3 Ports: Fix a bug where taking screenshots would fail.
2025-10-01 23:17:56 -07:00
rogerman
815a70cd71 Colorspace Handler: Fix a compiling issue for AVX-512. (Regression from commit 586aea5.) 2025-09-27 19:27:28 -07:00
rogerman
335c7ad7e2 GPU: ClearWithColor() running in 15-bit color mode now always clears both native and custom buffers.
- This is being done for compatibility with less sophisticated clients that don't handle the NDSDisplayInfo.isCustomSizeRequested flag.
2025-09-21 21:07:41 -07:00
rogerman
5610909e5c Render3D: Improve robustness of Render3DColorOut buffer binding. 2025-09-21 19:42:06 -07:00
thesource
c5bd273a9a Port commit 58bbe69 to GTK3 frontend 2025-09-22 00:26:42 +02:00
rogerman
288a1e8347 Cocoa Port: Finish refactoring the audio output code. (Related to commit 3b07d28.) 2025-09-13 22:07:34 -07:00
rogerman
a08de1b00a Cocoa Port: More refactoring.
- Add "ClientCheatManager.cpp" and "ClientFirmwareControl.cpp" files, moving all this C++ code to their own files.
- Remove the "cocoa_videofilter.mm/.h" files, which were never used and aren't planned to ever be used in the future.
2025-09-11 23:28:46 -07:00
rogerman
3b07d284cb Cocoa Port: Major refactor to replace the Obj-C class CocoaDSOutput with the C++ class ClientEmulationOutput.
- Also replace more color-related data types from the generic uint32_t type to the more specific Color4u8 type.
2025-09-11 14:08:00 -07:00
rogerman
1638bc00ae saves.cpp: Improve the code consistency of other functions that have a similar file name usage pattern. (Related to commit 6754adf.) 2025-09-03 09:48:37 -07:00
rogerman
6754adff86 saves.cpp: Add a bit more clarity to what scan_savestates() is actually doing, which is to concatenate a file extension to a base file name, and then use the resultant file name for a check. 2025-09-02 14:17:21 -07:00
rogerman
9f009f4856 Cocoa Port: Rename the class "OGLVideoOutput" to "OGLDisplayPresenter". Also remove some unused, and now obsolete, class methods. 2025-08-29 11:33:05 -07:00
rogerman
0fb3d46798 Cocoa Port: Fix potential issues for OpenGL display views running their fetched video processing on ancient GPUs that really really want to clear the framebuffer for stability. (Regression from commit 1670e3a.) 2025-08-28 13:39:47 -07:00
rogerman
1670e3a750 Cocoa Port: OpenGL display views can now perform color conversions and apply the NDS Master Brightness on the GPU during video fetch, just like how Metal display views do it.
- Systems with fast non-Metal capable GPUs (such as the MacBook Pro 17" Late-2011 or the iMac 27" Mid-2011) will see the most benefit, especially when running 18-bit video at high GPU scaling factors.
- For older systems with slower GPUs, running the new GPU-based video postprocessing may result in an overall performance loss. In order to run the video postprocessing on the CPU like before, you can use the menu option "View > Run Filters on GPU" to control whether video postprocessing happens on the GPU or on the CPU.
2025-08-28 01:30:16 -07:00
rogerman
a779eb7a59 gfx3d.h: Fix some comments. It's "byte", not "bit"! 2025-08-18 22:04:39 -07:00
rogerman
107e15d20b Linux Ports (All): Make EGL initialization more robust. 2025-08-17 21:21:13 -07:00
linkmauve
df06de4cca
Remove OSMesa support (#905)
Mesa has now removed OSMesa from its codebase, see
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33836

There is no reason to keep this any longer, especially since EGL can do
the same and more.
2025-08-17 20:46:34 -07:00
rogerman
b568e4359c Render3D: Huge refactor that adds the new Render3DColorOut class, which now handles the framebuffers that integrate the 3D layer and the BG0 layer.
- Framebuffers are now double-buffered, which may help improve performance on games running at less than 60 FPS on host systems with weak GPUs.
- For OpenGL, slightly improve framebuffer download performance on macOS.
2025-08-13 23:58:21 -07:00
rogerman
8238c353fc Render3D: Do some last minor refactoring tweaks. (Related to commit 2a52196.) 2025-08-09 22:16:46 -07:00
rogerman
2a5219649a Render3D: Do a bunch of refactor in preparation of a more substantial refactor that will follow. 2025-08-09 19:21:55 -07:00
rogerman
82761798cc Fix compiling on newer GCCs that are averse to referencing variables on an unexpected memory alignment. 2025-08-09 17:51:53 -07:00
rogerman
81683cb097 Fix memory alignment issues with bitfield structs when compiled on MSVC. 2025-08-09 16:00:34 -07:00
En-En
75958772ef
posix: in __glx_initOpenGL, add null check after XOpenDisplay (#920)
* posix: in `__glx_initOpenGL`, add null check after `XOpenDisplay`

Would segfault when built with GLX enabled and ran in Wayland. Now the same scenario instead falls back to the SoftRasterizer. Still not ideal, but using SDL as a fallback requires considerably more code redesign.

* posix: refine GLX with no X server error message
2025-08-08 13:54:19 -07:00
rogerman
a7812dcea5 Cocoa Port: Don't set thread priorities on single-core systems, hopefully preventing thread starvation and helping single-core systems run more stable. 2025-08-07 21:20:17 -07:00
rogerman
4ca5101f52 Cocoa Port: Fix a performance bug where OpenGL display views weren't fully DMA'ing the video frames directly from app to GPU as intended.
- This bug fix may improve video performance with certain configurations by up to 10%. (OpenGL display views only.)
2025-08-04 09:57:49 -07:00
rogerman
6715015cb6 Cocoa Port: Try to fix some potential issues with UI updates happening off the main thread. 2025-07-31 21:12:50 -07:00
rogerman
5cc55d60bd Cocoa Port: Correct the usage of the GL_UNPACK_CLIENT_STORAGE_APPLE switch in OpenGL display views. 2025-07-31 21:09:42 -07:00
rogerman
cf5153d02d Cocoa Port: Fix building with "DeSmuME (Latest).xcodeproj" on older Xcode. (Regression from commit 445060a.) 2025-07-27 15:45:04 -07:00
rogerman
e52e3963d0 GPU: Add AltiVec-accelerated functions for 2D layer compositing. (For PowerPC CPUs only.)
- This improves GPU performance by up to 25% on a PowerPC 970MP.
2025-07-25 17:37:55 -07:00
rogerman
2c4ff5fea6 GPU: CopyLineExpand() and CopyLineReduce() now respect the NEEDENDIANSWAP flag for 32-bit elements. 2025-07-25 13:24:45 -07:00
rogerman
ff7ad435d6 Texture Handler: Fix incorrect alpha masking on 16-bit direct textures for AltiVec. 2025-07-24 17:41:21 -07:00