Commit Graph

5851 Commits

Author SHA1 Message Date
rogerman 15a19ba02f Render3D: All 3D rendering settings are now staged. Pending settings are applied only right before the 3D renderer actually renders. 2017-10-18 15:45:46 -07:00
rogerman 8be15113e2 Linux Port (GTK-Glade): Fix screen drawing for GTK-GL. (Regression from commit f5c9a36.) 2017-10-17 23:31:00 -07:00
rogerman 43e740c661 GPU: Fix the clear color on big-endian systems when running RGB666 and RGB888.
- Also endian swap the BGnX and BGnY values on big-endian systems. This is a non-functional change, and is only meant to show that the endian swaps are indeed the correct choice for big-endian.
2017-10-17 18:49:05 -07:00
rogerman f5ead86d89 Cocoa Port: Fix various presentation issues, focusing mostly on the OpenGL presenter and the Screenshot Capture Tool.
- Changing the display video source now updates the display window properly while the emulator is paused.
- Fix bug in the Screenshot Capture Tool where screenshots would have incorrect colors if taken on a PowerPC Mac.
- Fix bug in the Screenshot Capture Tool where screenshots would be completely black if a CPU-based pixel scaler on OpenGL was used.
- The OpenGL presenter's GPU tiering system has been changed to be more strict. This effectively pushes many older GPUs into lower tiers.
- The following pixel scalers now require at least a Low-Tier GPU (previously only required Bottom-Tier): 2xSaI, Super2xSaI, SuperEagle, HQ3x, HQ3xS, HQ4x, HQ4xS
- The following pixel scalers now require at least a Mid-Tier GPU (previously only required Low-Tier): 2xBRZ, 3xBRZ
- Due to the new changes to the GPU tiering system and allowed pixel scalers per tier, the Screenshot Capture Tool running OpenGL now allows pixel upscaling on the GPU instead of disabling it completely.
2017-10-17 13:45:55 -07:00
rogerman e8e3200a23 GFX3D: Fix bug where 3D would fail to render on big-endian systems. (Regression from commit c6a5740.) 2017-10-16 17:38:37 -07:00
rogerman ba6e8e0bab Cocoa Port: Fix a bunch of HUD coloring issues on PowerPC Macs.
- Also fix a display backlight intensity issue on big-endian systems.
2017-10-16 17:03:01 -07:00
rogerman c31a5717ab Cocoa Port: Whenever attempting to take a screenshot using the Screenshot Capture Tool, simply cancel the operation altogether if the target directory does not exist or is not writable. 2017-10-16 12:11:57 -07:00
rogerman 7d2c70b7a8 Cocoa Port: Fix some issues with the Screenshot Capture Tool.
- Fix potential crashing bug that may occur if the target directory
isn’t found when clicking the Take Screenshot button.
- In the Display Layout dropdown panel, reposition the Display
Separation menu to be in the center section instead of in the leftmost
section.
2017-10-16 11:56:24 -07:00
rogerman 649587fcb1 Cocoa Port: Change CommandAttributes, now renamed ClientCommandAttributes, to call a C function pointer instead of an Objective-C selector when dispatching its command function. 2017-10-16 11:35:49 -07:00
zeromus 5c9fbdfb06 winport-fix some screenshots 2017-10-15 16:07:28 -05:00
rogerman baef8b3fda Cocoa Port: In the Screenshot Capture Tool, allow users to override the default display scale (calculated from GPU Scaling Factor) with their own user-defined display scale. 2017-10-14 17:29:59 -07:00
rogerman 73b5074313 OpenGL Renderer: Bring back support for handling the transparent polygon ID check. This fixes many graphical glitches involving transparent polygons in many games. (Regression from r5372. Fixes #74 and fixes #24.) 2017-10-13 18:35:05 -07:00
rogerman 9bfbaf23b8 GFX3D: Correct some notes about the POLYGON_ATTR Mode attribute. 2017-10-13 17:30:00 -07:00
rogerman 5f0c4ecf52 OpenGL Renderer: Shadow polygons doing the polygon ID check should only update the stencil buffer once instead of twice. 2017-10-11 12:45:29 -07:00
rogerman 8e94926072 OpenGL Renderer: Fix bug where translucent fragments drawing on top of zero-alpha fragments were not overwriting the destination fragment color as intended. (Regression from commit 2a1aaf7.) 2017-10-10 17:43:43 -07:00
rogerman 47a71941ac OpenGL Renderer: Add true support for the depth-equals test by properly emulating the tolerance value. This fixes many longstanding bugs related to missing polygons, Z-fighting glitches, and other misc. graphical glitches in many games. 2017-10-10 11:25:16 -07:00
rogerman 2a1aaf727e OpenGL Renderer: Reduce the number of stencil bits needed to emulate the shadow volume mask from 2 to 1. 2017-10-09 14:05:53 -07:00
rogerman c9025e81cb OpenGL Renderer: The fragment depth calculation now works more like how SoftRasterizer does it.
- Also update some comments in gfx3d.h.
2017-10-09 11:05:56 -07:00
rogerman c6a5740665 GFX3D: Rework polygon attributes and texture parameters using the latest coding style. Also improve the performance of SoftRasterizer while we’re at it. 2017-10-06 17:13:08 -07:00
rogerman e7d63e6cd2 GFX3D: Reduce the memory requirement of the vertex lists to one-third of its previous size.
- Has the positive side-effect of improving the OpenGL renderer's performance when many vertices are used.
- Also fix the vertex list double-buffering so that it actually works as intended.
2017-10-04 16:55:08 -07:00
rogerman f4c01c4b57 GPU: Fix bug where the backlight intensity would be incorrectly averaged if frameskipping is enabled. (Regression from commit f5c9a36.) 2017-10-04 00:32:43 -07:00
rogerman 6ca2dbe6d0 Cocoa Port: Fix a crash and a potential deadlock that may occur when responding to host display changes. (Regression from commit 4957d7b.) 2017-10-03 23:49:18 -07:00
rogerman addb17b660 Fix a bug where games would almost always start up with the main screen at low brightness and touch screen completely off. (Regression from commit f5c9a36.) 2017-10-03 17:28:33 -07:00
rogerman ff4a3e0a5c Linux Port (CLI and GTK-Glade): Add support for rendering the backlight intensity on the CPU-based display methods. (Related to commits f5c9a36 and 74ba49e.) 2017-10-03 15:16:18 -07:00
rogerman a3a577f2e9 Windows Port: Replace the backlight kludge in the DirectDraw display method with the new ColorspaceApplyIntensityToBuffer32(). (Related to commits f5c9a36, 3a000b6 and 74ba49e.)
- Also fixes a build problem in MSVC. (Regression from commit 74ba49e.)
2017-10-03 14:26:36 -07:00
rogerman 74ba49e168 Colorspace Handler: Add dedicated functions ColorspaceApplyIntensityToBuffer16() and ColorspaceApplyIntensityToBuffer32() for applying an RGB intensity value to a framebuffer. 2017-10-03 13:54:51 -07:00
zeromus 174dcc11bb Merge pull request #102 from atsampson/master
Fix broken option list in POSIX frontend
2017-10-03 01:56:59 -05:00
Adam Sampson ecbcb3c821 Fix broken option list in POSIX frontend
f5c9a36930 tried to remove an entry from
the list of options, but only deleted half of it.
2017-10-03 07:52:39 +01:00
zeromus 3a000b68fd re #59 - abuse accelerated masterbrightness processor to crudely implement LCD backlight for DD display methods 2017-10-02 14:55:50 -05:00
rogerman f5c9a36930 GPU: NDSDisplayInfo now reports the backlight intensity for each display. The LMNTS demo now properly fades the backlights in and out, but only on frontends that support this feature. (Fixes #59.)
- Note: The backlight intensity is only emulated on frontends with 3D-based display methods, such as OpenGL and Metal. CPU-based display methods, such as DirectDraw, SDL and Cairo, are currently unsupported.
2017-10-02 11:39:40 -07:00
rogerman 059ea519bc Cocoa Port: Vastly improve the ability to take screenshots of the NDS displays.
- The old Tools > Save Screenshot As has been replaced with the new Screenshot Capture Tool.
- The new Screenshot Capture Tool allows screenshots to be configured to render with the same layout features as a display view.
- Screenshot captures now both render and save to file on their own independent threads.
- Screenshots are now captured using the Take Screenshot button, and files are now automatically named based on ROM name and timestamp.
- All of these features means that users can now rapidly take screenshots with their own custom layouts, all with little to no slowdown to the emulation.
- Also do a bunch of code cleanup and refactoring as a side-effect of adding these new features.
2017-09-30 23:54:05 -07:00
zeromus 2c1360dec5 fix #97 - increasing matrix stack cursor size to 6bits caused garbage to get masked into GXSTAT since there had been no &31 to select only the needed 5 bits 2017-09-29 14:47:15 -05:00
rogerman d37ef1ff95 Cocoa Port: Copying the contents of the display window via Edit > Copy now copies the actual contents of the display window instead of directly copying the NDS screens with a generic vertical layout. 2017-09-25 21:21:51 -07:00
rogerman 70c69a46d3 OpenGL Renderer: Fix a bug where the behavior of translucent polygons can become undefined if the frame contains nothing but translucent polygons. Fixes a graphical glitch in Grey's intro scene in Mega Man ZX Advent. (Regression from commit 1742114.) 2017-09-23 21:32:34 -07:00
rogerman 1742114fcd OpenGL Renderer: Reset the current polygon's OpenGL states to the last opaque polygon whenever the zero-destination-alpha-pass is performed. Fixes a graphical bug in MegaMan ZX Advent, where the explosions from the boss in Grey's first level will render incorrectly. (Regression from commit eea54a7.) 2017-09-22 17:25:01 -07:00
rogerman f521ab1164 Cocoa Port: Refactor the hardware mic stuff out of CocoaDSController and into ClientInputHandler. 2017-09-21 00:33:28 -07:00
rogerman f8bbbec0ae OpenGL Renderer: Fix possible crash that may occur if the 3D framebuffer is used before the 3D renderer has a chance to render at least once. (Partially addresses #59.) 2017-09-19 17:47:48 -07:00
rogerman 4ea08792cb Cocoa Port: Fix bug where the ROMInfoPanel was misaligning the locations of info sections. 2017-09-19 15:49:22 -07:00
rogerman aa04c8f233 Cocoa Port: Better guarantee that display views will always be assigned a display ID. 2017-09-19 14:47:55 -07:00
rogerman 830dd0d78c Cocoa Port: Give user feedback for when the emulation gets halted internally.
- Also be more consistent when recovering from an internal emulation halt.
- Also apply enabling the external BIOS, external firmware and firmware boot settings at load/reset time instead of at frame time.
2017-09-19 12:59:44 -07:00
zeromus 1c59441697 fix bug in sthread_isself (fixes #34) 2017-09-17 04:05:17 -05:00
zeromus c5cea732fa update rthreads.c from upstream 2017-09-17 04:02:14 -05:00
rogerman fda9fc2a89 Cocoa Port: Reduce threading overhead for framebuffer fetches and SPU_Emulate_user().
- Framebuffer fetches no longer run on a CocoaDSThread, but instead uses a pthread directly. This can be done since framebuffer fetching only serves one function and always receives the same execution message, making a full CocoaDSThread a waste.
- SPU_Emulate_user() is no longer called on a separate thread, and instead is called in the emulation thread directly. For the typical SPU use case (SPU Sound Synchronization w/ Advanced SPU Logic), SPU_Emulator_user() becomes negligible, and so the threading overhead becomes unnecessary. In the use case where Dual SPU Synch/Asynch is used, Advanced SPU Logic is almost always disabled with it, and so the penalty of calling SPU_Emulator_user() on the emulation thread will be more than compensated by the performance increase of turning off Advanced SPU Logic.
- Also do some code cleanup/refactoring here and there.
2017-09-16 18:08:07 -07:00
rogerman 8f2c85fe86 Cocoa Port: Remove some extraneous properties from DisplayWindowController since these same properties are handled elsewhere. 2017-09-16 02:36:22 -07:00
rogerman 4957d7be5b Cocoa Port: Rework how Metal display views flush to screen, improving their overall performance.
- Fix a bug where Metal display views can block emulation execution if the user very quickly spams inputs while the input HUD is shown.
- Metal display views are no longer frame capped -- they can now run to their fullest performance potential, as fast as the host hardware will allow. This behavior is now consistent with OpenGL display views.
- As a side-effect, non-layer backed OpenGL display views also have a performance improvement.
2017-09-16 00:13:52 -07:00
zeromus 759a039e25 handle powered-off geometry engine more sensibly. involves commit 66b5da1c and issue #31, intended to fix ZX advent. fixes #58. 2017-09-15 09:57:16 -05:00
rogerman d33faecd12 Cocoa Port: Create new DisplayView objects in code instead of creating them implicitly through the nib. 2017-09-13 14:48:19 -07:00
rogerman c94f353f2a Cocoa Port: For Metal display views, in -renderDrawable, separate buffer updates from encoding commands in an effort to try to reduce the hold time on the vended drawable as much as possible. 2017-09-12 00:50:57 -07:00
rogerman d0f16193c5 Cocoa Port: Refactor out more input-related stuff into some new files -- ClientInputHandler.cpp/.h. 2017-09-11 23:32:30 -07:00
rogerman cb4ecbe17e Cocoa Port: Do some refactoring to remove extraneous connections in EmuControllerDelegate. 2017-09-11 15:26:37 -07:00