zeromus
3dc7e6d70e
fix warnings from weird code
2019-03-17 23:23:48 -04:00
zeromus
aef0374ed8
fix warnings and 64bit problems
2019-03-17 23:12:08 -04:00
zeromus
065d9e4321
fix printf warning
2019-03-17 23:08:21 -04:00
zeromus
9805fe3de4
winport - support multiple mic samples, selected with new hotkeys
2019-03-17 22:55:53 -04:00
zeromus
ec351f3015
fix warnings
2019-03-17 22:53:55 -04:00
zeromus
72ecc8e66c
quick fix to stop OSD from crashing if we try to print a line to the OSD before the frontend is fully initialized
2019-03-17 22:53:40 -04:00
zeromus
ed92e1ef68
get rid of printf warnings
2019-03-17 22:02:40 -04:00
rogerman
fe9541b448
NDSSystem.cpp: Make firmware loading more robust.
2019-03-10 00:57:16 -08:00
rogerman
8fa60fafd3
Firmware: Ensure that memory leaks don't happen when errors occur.
2019-03-10 00:53:26 -08:00
rogerman
42817475c2
OpenGL Renderer: Fix bug where Edge Mark and Fog were not properly being handled when the framebuffer is cleared using a clear image, such as in "Sonic Chronicles: The Dark Brotherhood". (Regression from commit 0dab591.)
2019-02-06 23:17:35 -08:00
rogerman
bb25742512
GPU: Fix some compiler warnings.
2019-02-06 18:43:11 -08:00
rogerman
fa8cf5a6dc
OpenGL Renderer: Fix bug where the Special Zero Alpha Blending option would cause graphical glitches in certain games while MSAA was enabled on GPUs that support the GL_ARB_sample_shading extension. (Regression from commit e4ec1d6.)
2019-02-06 17:57:44 -08:00
rogerman
3c87d8b268
OpenGL Renderer: In GLX, there is no need to load glBlendEquation(), which is an OpenGL v1.2 function, since the current version of GLX (v1.4, circa 2005) implicitly supports OpenGL v1.3. Fixes #254 . (Regression from commit ef3e93b.)
2019-02-06 10:23:17 -08:00
rogerman
ee7d707acf
OpenGL Renderer: Fix compiling for non-Cocoa ports. (Regression from commit ef3e93b.)
2019-02-05 11:58:31 -08:00
rogerman
ef3e93b4e9
OpenGL Renderer: Fog rendering now uses dual-source blending if available. (OpenGL 3.2 only.)
2019-02-05 02:43:20 -08:00
rogerman
fc4f12efd0
OpenGL Renderer: In the shaders, replace texture() with texelFetch() wherever appropriate. (OpenGL 3.2 only.)
...
- Also do some minor code cleanup.
2019-02-05 01:57:20 -08:00
rogerman
e433a6d80e
SoftRasterizer: Fix a bug where some games would occasionally have unreliable rendering or precipitous performance drops. (Regression from commit e06d11f.)
2019-02-04 23:40:15 -08:00
rogerman
242ccb26cf
GFX3D: Oops! Make the clipper modes actually work as intended instead of ALWAYS using ClipperMode_Full.
2019-02-02 20:39:47 -08:00
rogerman
4f8b788e97
Render3D: Refactor the Render3D class in order to better reflect how the 3D renderers do things now.
2019-02-01 17:57:33 -08:00
rogerman
3e73a550e3
OpenGL Renderer: Ensure that all color attachments are assigned sequentially without gaps, and ensure that fragment shaders write out a value to each assigned attachment in all cases. This is being done to try and satisfy extremely picky AMD drivers that can do crazy-go-nuts things when the color attachments are not meticulously managed this way.
2019-01-29 16:50:47 -08:00
rogerman
e4ec1d634a
OpenGL Renderer: Better emulate the special NDS rendering quirk for drawing front-facing fragments on top of back-facing opaque fragments. Completely fixes the Customize screens in Sands of Destruction. (Related to commit 8944328.)
...
- Specifically, translucent polygons now properly render on top of the back-facing opaque fragments from the opaque polygon rendering pass. Do note that emulating this special NDS rendering quirk is still not complete, as it does not account for drawing any translucent polygons on top of the opaque fragments of back-facing partially-translucent alpha-textured polygons. However, I have not seen any games that actually go so deep into such an edge case. If there is such a game, then this issue will need to be revisited.
- Now that this special rendering quirk is more accurate, this does cost some performance. However, since this rendering quirk is controlled by the "Enable Depth L-Equal Polygon Facing" option, which is OFF by default, this performance loss is deemed acceptable in favor of the increased accuracy.
2019-01-29 01:20:13 -08:00
zeromus
1c937adb9e
fix #250 , probably
2019-01-27 12:24:35 -05:00
rogerman
e06d11f6df
GFX3D: The polygon clipping stage now occurs before any polygon sorting, allowing for the sorting of smaller lists. This can be a significant performance improvement for some 3D scenes with high polygon counts.
...
- 3D renderers no longer perform polygon clipping themselves, instead relying on GFX3D to do it. By default, the clipping mode is ClipperMode_DetermineClipOnly, but 3D renderers can change this by overriding the virtual method Render3D::GetPreferredPolygonClippingMode() and returning their preferred clipping mode.
2019-01-23 16:03:09 -08:00
rogerman
b8e85e0c9d
OpenGL Renderer: Revert the texture sampling hack in commit 02cd950
-- it causes graphical glitches in Sands of Destruction, especially visible within the Sky Gaol.
2019-01-23 14:44:47 -08:00
rogerman
4cd19ce522
OpenGL Renderer: Before rendering, determine the list of clipped polygons, and then only render the clipped polygons, just like how SoftRasterizer does it. Most 3D games will see a significant performance improvement. For certain games with very high polygon count scenes, those games will see a massive performance boost.
2019-01-21 16:21:32 -08:00
rogerman
bb93a0a365
OpenGL Renderer: Fix an occasional crashing bug that may occur when initializing the Clear Image textures. (Regression from commit 3dc860b.)
2019-01-18 16:20:11 -08:00
rogerman
d70bc19d9a
OpenGL Renderer: Oops!!! Fix a critical bug that completely broke all rendering!!! (Regression from commit ab3d489.)
2019-01-18 14:32:13 -08:00
rogerman
ab3d48947a
OpenGL Renderer: Reduce some buffer related synchronization in BeginRender().
2019-01-18 13:54:37 -08:00
rogerman
02cd950b02
OpenGL Renderer: In an effort to try and reduce graphical glitches whenever users try to run enhancements that were never native to the NDS to begin with, the texture sampling method is now being forced to clamp for polygons with texture coordinates of either 0.0 or 1.0.
2019-01-17 23:03:52 -08:00
rogerman
0dab5917b6
OpenGL Renderer: Fix a bug where the incorrect buffer would be cleared when trying to clear the Fog attributes buffer while Edge Mark is disabled. Partially addresses #247 . (Regression from commit 21a3fae.)
2019-01-16 16:19:33 -08:00
rogerman
d63ae63d1b
OpenGL Renderer: Fix compiling for non-Cocoa ports. (Regression from commit c9db815.)
2019-01-16 15:46:13 -08:00
rogerman
c9db815171
OpenGL Renderer: Improve the overall reliability of CPU-to-GPU buffer writes, fixing a bug where certain polygons would intermittently flicker in some games. (OpenGL 3.2 only.)
2019-01-16 11:57:36 -08:00
rogerman
7990e6c3f3
OpenGL Renderer: Fix a bug where Fog rendering would fail when used with MSAA. Fixes #246 . (OpenGL 3.2 only. Regression from commit 21a3fae.)
2019-01-15 21:47:50 -08:00
zeromus
6ed5cf8420
winport - fix bug using all available window size when maximizing and fullscreening
2019-01-16 00:10:25 -05:00
rogerman
3dc860b248
Render 3D: Simplify the code a little by removing the working Polygon ID buffer for clear images.
...
- As a collateral improvement, this change also works as a minor optimization for the OpenGL Renderer for games that use clear images.
2019-01-14 16:13:08 -08:00
rogerman
26504031ff
OpenGL Renderer: Partially revert commit 0f045d4
-- don't do the Z adjust in the vertex shader. Apparently, we shouldn't need to explicitly do this in OpenGL, as this adjustment should be automatic. Fixes a graphical glitch that can occur in "Sonic Chronicles: The Dark Brotherhood".
2019-01-14 15:17:13 -08:00
rogerman
0f045d430c
OpenGL Renderer: When rendering the main geometry, adjusts all Z-positions in the vertex shader so that Z is more likely to naturally fall between the depth range of 0.0 and 1.0. Further mitigates the performance cost of using the NDS-Style Depth Calculation option.
2019-01-14 12:08:33 -08:00
zeromus
9b1ce0efc3
add --slot1-no8000prot, fixes #183
2019-01-13 14:51:51 -05:00
rogerman
066366184c
Video Filters: Fix an issue where the internal buffers were not created using a guaranteed alignment, possibly causing a segfault on AVX2-enabled systems. Fixes #245 .
2019-01-11 00:40:16 -08:00
rogerman
f5d90a77c1
GPU: Fix graphical glitch that can occur when frameskip is enabled, running a custom resolution on a multicore CPU system. (Regression from commit abc0649.)
2019-01-10 21:33:16 -08:00
zeromus
605ce35812
winport - restore some tool windows which are minimized, when their menu option is selected
2019-01-10 20:54:31 -05:00
rogerman
4a13a03f46
Windows Port: Fix compiling on 32-bit Windows. (Regression from commit abc0649.)
2019-01-09 23:40:32 -08:00
rogerman
abc0649ad2
GPU: Significantly improve the performance of HD rendering for many 3D games.
...
- Specifically, if the previous frame is determined to draw the entire HD layer directly over the backdrop layer, then the current frame's entire custom framebuffer is asynchronously cleared using line 0's backdrop color since most games will keep the backdrop color constant for all scanlines. Because this is a common rendering case, many 3D games should see a performance improvement when running very large HD framebuffers (8x or higher).
- Also fix a compiling issue for non-SSE2 systems. (Regression from commit 3890431.)
2019-01-09 22:41:42 -08:00
rogerman
3890431154
GPU: Working engine buffers are now set up in advance, asynchronously, starting after line 191.
2019-01-08 23:47:36 -08:00
rogerman
0f87ada863
types.h: Add support for atomic variables.
...
- Also clean up some stuff that doesn't belong in this file.
2019-01-08 17:17:30 -08:00
rogerman
50f42fae55
OpenGL Renderer: More minor shader efficiency tweaks when using the NDS Style Depth Calculation option.
2019-01-06 00:23:17 -08:00
rogerman
85ee9e0ff9
OpenGL Renderer: Fix some interactions between Edge Mark and the Special Zero Alpha Blending option. (Regression from commit 6f8c060.)
...
- Also remove some extraneous stencil buffer clears.
2019-01-05 12:49:16 -08:00
rogerman
40a4b3cdcf
OpenGL Renderer: Do some minor shader efficiency tweaks. (OpenGL 3.2 only.)
2019-01-04 18:48:28 -08:00
rogerman
21a3fae0f3
OpenGL Renderer: Do some minor efficiency, stability, and consistency tweaks.
2019-01-02 01:10:59 -08:00
rogerman
f97c633441
OpenGL Renderer: Okay, let's try using GL_AMD_conservative_depth for those AMD drivers that outright lie about supporting GL_ARB_conservative_depth. (Related to commit 4d6a132
and commit 39f9483.)
2018-12-30 02:12:54 -08:00
rogerman
39f9483034
OpenGL Renderer: Also require GLSL 4.00 when using the GL_ARB_conservative_depth extension. (Related to commit 4d6a132.)
2018-12-30 01:36:54 -08:00
rogerman
4d6a132116
OpenGL Renderer: Mitigate some of the performance penalty of using the NDS Style Depth Calculation option.
...
- GPUs that support the GL_ARB_conservative_depth extension will benefit more from this commit. (OpenGL 3.2 only.)
- Also fix some miscellaneous bugs.
2018-12-29 22:37:37 -08:00
rogerman
0c0bd5144e
Cocoa Port: Do a small optimization when doing video output framebuffer fetches for Metal display views.
2018-12-28 15:39:09 -08:00
rogerman
aeea0ea46a
OpenGL Renderer: Remove the material_6bit_to_float LUT, since we already have an equivalent existing LUT -- divide6bitBy63_LUT.
2018-12-26 22:35:34 -08:00
rogerman
c1357c1451
OpenGL Renderer: Do some minor performance improving tweaks.
...
- Most notably, fix a performance regression where polygon drawing was no longer getting batched due to an incorrect polygon-facing test. (Regression from commit dab414c.)
2018-12-26 19:48:22 -08:00
rogerman
062d9a65a7
Cocoa Port: Do a minor optimization for Metal display views running on macOS v10.13 High Sierra and later.
2018-12-24 21:35:17 -08:00
rogerman
022cf3c702
Cocoa Port: Looks like all macOS versions 10.13 High Sierra and later don't support P-Buffers, so properly handle this error condition and disable the OpenGL 3D renderer when trying to run it without FBOs on these newer macOS versions.
2018-12-22 14:53:19 -08:00
rogerman
7bb438020b
OpenGL Renderer: Fix bug where the OpenGL renderer would completely fail to run if the user's ancient GPU doesn't support shaders. (Regression from commit 7080e21.)
...
- Also do some minor improvements to the code robustness when creating an OpenGLRenderer object.
2018-12-21 16:21:44 -08:00
rogerman
589524823b
OpenGL Renderer: Oops! Finish doing the shader rework started in commit 7080e21
for legacy OpenGL so that it works the way its supposed to. Doing this now fixes legacy OpenGL for (hopefully) all GPU drivers and also allows for all of the same shader optimizations as OpenGL 3.2.
2018-12-18 20:21:18 -08:00
rogerman
d3e4b6010c
OpenGL Renderer: Eliminate the requirement for 66 varying floats in the Fog shader by replacing the varying floats with constants. Also fixes an issue with the geometry shader in legacy OpenGL. (Regressions from commit 7080e21
and commit 37afaef
. Fixes #240.)
2018-12-18 16:47:53 -08:00
zeromus
30212212b5
winport - set PreferredToolArchitecture to x64
2018-12-18 13:53:42 -05:00
rogerman
37afaefa2f
OpenGL Renderer: Replace the accuracy/performance tradeoff "Enable Depth Equals Test Tolerance" with "Enable NDS-Style Depth Calculation", where disabling this option allows the host GPU to natively calculate depth which significantly improves performance in many games.
...
- New Behavior: In addition to emulating the existing Depth Equals Test Tolerance, NDS-Style Depth Calculation accounts for all NDS depth calculations within the fragment shader. Most notably, disabling this option forgoes the W-depth / Z-depth differentiation that the NDS uses, instead preferring the GPU's native Z-depth calculation. Using the GPU's native depth calculation significantly improves performance, but many games use W-depth calculations or are sensitive to subtleties in the Z-depth calculation, and so this option must remain ON by default for compatibility's sake.
- Also fixes a shader initialization issue on the Windows port. (Regression from commit 7080e21.)
2018-12-18 10:50:41 -08:00
rogerman
7080e2156b
OpenGL Renderer: Rework the rendering shaders so that the shader program code is more dynamically generated. This may yield some performance improvement for certain 3D rendering cases, especially when running on lesser GPUs with fewer and/or slower shader execution units.
2018-12-17 16:16:50 -08:00
rogerman
ae8fb2c3bb
GPU: Fix a bug where using VRAM as a display capture source would sometimes cause graphical glitches under certain conditions. (Regression from commit 2c6a5f9.)
2018-12-17 15:33:16 -08:00
zeromus
88d930ce82
winport - fix loading files named things like Splookékrong from commandline, fixes #238
2018-12-15 17:26:28 -05:00
rogerman
7ff5c5eece
Render 3D: Improve the overall rendering accuracy of Edge Mark. Most notably, Edge Mark now properly renders at screen edges. As of now, the current algorithm is as accurate as its ever going to get under our current 3D rendering engine.
2018-12-14 17:08:16 -08:00
rogerman
e6d6f2e10d
Cocoa Port: Fix a bug where clipboard copies and screenshots taken from Metal display views will cause the image to be Y-flipped.
2018-12-14 15:41:05 -08:00
rogerman
2c6a5f9868
GPU: Do some code cleanup of the display capture code.
2018-12-12 18:34:47 -08:00
zeromus
e604631413
winport - fix things named like Blorkénflarge in the recent roms menu ( #238 )
2018-12-12 15:50:52 -05:00
rogerman
8c2379f6f8
Firmware: Fix various endianness issues. Most importantly, this fixes a bug with touch input not working correctly on big-endian systems. (Regression from commit bb38022.)
2018-12-12 02:49:44 -08:00
rogerman
471f53e506
Cocoa Port: Fix various issues on the PPC build.
...
- Fix compiling issues for big-endian systems.
- Fix bug where the Recent ROMs menu and also launching the app while loading a ROM file would fail to load the ROM on macOS v10.5 Leopard.
- Fix bug where GPU main memory display mode would show incorrect pixels on big-endian systems when running at 15-bit color depth.
- As an unintended collateral improvement, GPUEngineA::_HandleDisplayModeMainMemory() now has SSE2-accelerated versions for 18-bit and 24-bit color depths. This was done less for its performance benefit (main memory display mode is an extremely rare feature) and more for better code consistency and code completeness.
2018-12-11 17:45:36 -08:00
zeromus
e56059872f
winport - fix loading games named things like "Yokémorp". It was probably only open through drag and drop.
...
Probably broke japanese. If I did, write a bug so I can fix japanese and break latin characters again.
2018-12-11 18:20:39 -05:00
Declan Hoare
a3eebbac21
don't clobber existing screenshots
2018-12-06 23:59:18 +11:00
rogerman
35e834ff2c
GFX3D: Revert the polygon sorting code back to its original state, which should result in a minor performance improvement for high polygon-count scenes.
...
- After years of testing, no one has reported running into the assert in gfx3d_ysort_compare() so I think we should be safe in reverting std::stable_sort() back to std::sort().
- For the sorting function, use gfx3d_ysort_compare_orig() since this function compiles down to fewer instructions than gfx3d_ysort_compare_kalven() does, resulting in better sorting performance.
- Of note, I'm pretty sure that SF commit r5132 is what fixed the original bug (see SF#1461 for more details) by getting rid of the NaN comparisons that were tripping up std::sort(). In the future, we should research why we're dividing by 0 in the first place, since r5132 is clearly a hack of a fix.
2018-12-05 14:37:33 -08:00
zeromus
d80a84b762
Merge pull request #207 from cosmo-ray/fix-linux-gcc8.2-warnings
...
Fix gcc8.2 warnings on linux
2018-12-05 14:10:52 -06:00
zeromus
9ea1b5cbda
Merge pull request #223 from intact/gtk-fix-screenshot-path
...
Gtk+ Port: Use Desktop or Home as fallback directory for screenshots
2018-12-05 14:10:42 -06:00
rogerman
355e4a0fb4
OpenGL Renderer: Remove a now defunct framebuffer texture, significantly reducing VRAM usage at the higher resolutions.
2018-12-04 21:49:09 -08:00
rogerman
3d573e150f
OpenGL Renderer: Properly clear the framebuffer during a power-off condition, just like how SoftRasterizer does it. (Related to commit 66b5da1
and commit 759a039
. Fixes #234.)
...
- Also do a minor performance optimization by only doing the framebuffer clear once for each power-off condition, rather than repeatedly and unnecessarily clearing the framebuffer for each and every V-blank.
2018-12-04 21:23:58 -08:00
rogerman
df22c6e14d
Cocoa Port: Fix some intermittent issues related to launching the app while loading a ROM file (i.e. double-clicking an NDS ROM file to launch DeSmuME.app).
2018-12-04 01:26:27 -08:00
rogerman
b9a8bafe8b
GPU: Do some code cleanup of the display capture code.
2018-12-03 16:22:12 -08:00
Jules.A
157717a61f
Hide the console window before freeing so if the console is attachted to another process (currently occuring under Win10) it is at least hidden.
2018-12-03 00:52:09 +08:00
rogerman
c3614a7e95
GPU: Do some minor code cleanup.
2018-12-01 21:56:32 -08:00
rogerman
fb8d937239
GPU: Fix bug where GPUEngineA::RenderLine_Layer3D() was trying to run with uninitialized values. (Regression from commit 37a8ca0.)
2018-12-01 21:38:03 -08:00
rogerman
37a8ca0983
GPU: Do a bunch of minor tweaks and code cleanup to the various pixel compositor methods. Significantly reduces the compiled code size.
...
- Of note, when running at custom resolutions, we are now being more aggressive in performing early tests for rejecting pixels as soon as possible. This may yield a minor performance improvement in some very specific rendering scenarios that require the window test.
2018-12-01 20:44:45 -08:00
rogerman
6a1d9e4848
GPU: Rendering complete OBJ layer lines is now SSE2-accelerated at the native resolution. This change is less of a performance enhancement and more of improving the code consistency. As of now, ALL complete OBJ layer lines, whether internally generated or from read from VRAM, whether rendering at native resolution or custom resolution, should now be SSE2-accelerated. This commit finalizes this concept. (Related to commit 8e9e7c4
and commit 60c01bd.)
2018-12-01 15:46:23 -08:00
rogerman
60c01bd63a
GPU: Do a few more minor optimizations to rendering complete OBJ layer lines. Most notably, all complete OBJ layer lines, not just ones reading directly from custom VRAM, now benefit from the SSE2-accelerated code.
2018-11-30 20:12:58 -08:00
rogerman
9a53e8be69
GPU: Fix bug in GPUEngineBase::_PixelUnknownEffectWithMask16_SSE2() where blending effects for OBJ layers were being handled incorrectly. This bugfix only affects SSE2-enabled systems. (Regression from commit 8e9e7c4
. Fixes #232.)
2018-11-30 17:10:56 -08:00
rogerman
2c5c2f6186
GPU: Use the same technique in the commit 6bcd19b
GPUEngineBase::_CompositeVRAMLineDeferred() bug fix in order to do a tiny optimization to GPUEngineBase::_CompositeLineDeferred(). Also makes the code more consistent as well.
2018-11-29 22:25:37 -08:00
rogerman
d0330fc96e
Cocoa Port: Upgrade Interface Builder .xib files to 3.2 format with minimum deployment target of macOS 10.6. This change effectively drops support for building DeSmuME directly from a PowerPC Mac. Fixes #231 .
...
- It is still possible to create a PowerPC binary, but this now requires some extra steps. From now on, you must use an Intel Mac running Mavericks or earlier to re-save the .xib files with a deployment target of macOS 10.5 in Interface Builder 3.2, and then use Xcode 3 to build a PowerPC binary using the Xcode 3 project file.
2018-11-29 22:02:07 -08:00
zeromus
3e37352bee
winport - menu option to control CLI console visibility
...
fixes #230
2018-11-29 16:25:59 -06:00
rogerman
6bcd19b3cb
GPU: Fix a bug in GPUEngineBase::_CompositeVRAMLineDeferred() where compInfo.target.xCustom was overstepping its bounds in X-dimension only custom buffers. This had the effect of causing undefined coloring when running at custom resolutions. (Regression from commit 8e9e7c4
. Fixes #228 and fixes #229.)
2018-11-29 13:12:56 -08:00
zeromus
f6938dc80a
Merge pull request #217 from SuuperW/paths
...
Paths
2018-11-29 15:04:31 -06:00
rogerman
8e9e7c4a2a
GPU: Enable SSE2-accelerated custom-sized VRAM reads through the OBJ layer. This significantly improves the performance of many games, such as those that make use of dual-screen 3D, when running at the higher resolutions.
2018-11-29 02:00:21 -08:00
rogerman
6fc6ceb294
SoftRasterizer: For SSE2-enabled systems only, fix a rare graphical glitch that can sometimes occur in some games. (Regression from commit 21f04c9.)
2018-11-28 17:31:49 -08:00
rogerman
4f543aa8ca
Cocoa Port: Yet another attempt at eliminating microstuttering in Metal display views. While it hasn't been completely eliminated yet, it shouldn't be as bad now.
2018-11-28 13:36:02 -08:00
rogerman
1f9b9e02a4
SoftRasterizer: Fix build issues on Windows. (Regression from commit 21f04c9.)
2018-11-23 15:30:11 -08:00
rogerman
21f04c9ef2
SoftRasterizer: Do some minor improvements to both performance and code size.
2018-11-23 14:59:13 -08:00
Roger Manuel
b1abf50a01
Merge pull request #224 from Jules-A/WinOglCompatUI
...
WIP WinFrontend UI for the new OpenGL compatabilty tradeoffs.
2018-11-23 14:17:00 -08:00
Jules.A
a51a6d4b6d
Revert pointless changes that only saved a few lines.
2018-11-23 17:18:16 +08:00
Jules.A
20547d38a2
Remove unneeded bool initialisation and now that ini values are sanatized comboboxes can be initialised and set in a loop to save a few lines.
2018-11-23 17:05:40 +08:00
Jules.A
7e4a270644
Ughh... get rid of the extra semicolon...
2018-11-23 14:19:56 +08:00
Jules.A
db1ca70f59
Fix label variable naming, spacing and finally get ini value checking working without requiring to check for the value that is getting changed,
2018-11-23 14:12:52 +08:00
Jules.A
156c590ca4
Check if user inputted values are correct on initiation.
2018-11-23 01:47:14 +08:00
Jules.A
54c6205e95
Fix up the UI and delete the unusused function (it's really not worth it until more settings can be checked).
2018-11-22 22:16:36 +08:00
rogerman
d410b5c195
SoftRasterizer: Fix Z-depth calculations when compiling on MSVC. Fixes the overworld map in Dragon Quest IV. (Regression from commit d81a75c.)
...
- Apparently, MSVC has a more strict implementation of IEEE-754 single-precision floats (with 23-bit significands) than Clang and GCC, and so we going to drop 2 LSBs during the calculation so that we're multiplying z by a 22-bit significand. Coincidentally, this now matches what we're doing with the OpenGL renderer, so this tends to better code consistency.
2018-11-21 19:52:30 -08:00
Jules.A
30e9fb9c46
WIP WinFrontend UI for the new OpenGL compatabilty tradeoffs. Should be fully functional except for CheckValid3DSettingInt where I messed up so I left it commented out, honestly it's probably not needed anyways as there's already checks in place, it just doesn't update ini until you save settings. UI is still a mess, will have to work on that later.
2018-11-21 21:48:30 +08:00
intact
2f93fedbf8
Gtk+ Port: Use Desktop or Home as fallback directory for screenshots
2018-11-21 14:44:35 +01:00
rogerman
f03a880ef9
WiFi: In Compatibility mode, reset the current RX packet's latency counter for every halfword write like its supposed to be.
2018-11-20 23:14:09 -08:00
rogerman
adbbd406b1
Cocoa Port: Add tooltips for each of the OpenGL rendering accuracy options.
2018-11-20 17:56:18 -08:00
rogerman
6f8c060db6
OpenGL Renderer: It is now possible to toggle certain accuracy-related features on and off so that users can choose where to make their accuracy-performance tradeoffs. These four emulation accuracy features are: 'Shadow polygons', 'Special zero alpha blending', 'Depth-Equals test tolerance', and 'Depth-LEqual polygon facing'.
...
- New Behavior: Due to the rarity of needing to emulate 'Depth-LEqual polygon facing' and its guaranteed reduction in performance in all games, this accuracy feature is now OFF by default.
- Expose these new settings in the Cocoa port UI.
2018-11-20 11:44:30 -08:00
rogerman
1e18c3fb9f
Windows Port: When running OpenGL display method, properly initialize V-sync to match wantVsync rather than assuming that the default setting for wantVsync will match the default setting of the video driver.
2018-11-19 02:49:31 -08:00
rogerman
d81a75c867
SoftRasterizer / OpenGL Renderer: Drop less bits in the depth calculation, making for smoother depth transitions. For certain games, this may allow for better distance rendering, especially at the higher resolutions. (Related to commit c9025e8.)
...
- SoftRasterizer may now drop at most one LSB, down from dropping 9 LSBs.
- OpenGL will now drop only 2 LSBs, down from 9 LSBs. In this case, dropping 2 LSBs was specifically chosen to ensure that the Dragon Quest IV overworld map continues to work.
- If this change makes the depth inaccuracy too much worse than before, then we may have to make these particular depth calculations optional in the future. This will need additional testing.
2018-11-17 23:20:59 -08:00
rogerman
be8d08ae87
WiFi: Make WifiHandler::_CopyFromRXQueue() more efficient by doing less copying and less locking.
2018-11-17 19:50:45 -08:00
rogerman
91526e6324
WiFi: Significantly reduce the host-to-emulator latency of libpcap-sourced packets in Infrastructure mode by running RX packet receives on a separate thread, just like how socket-sourced packets in Ad-hoc mode do it.
...
- Also, Infrastructure mode can no longer "partially function." Now, it either works completely or not at all, just like how Ad-hoc mode does it.
2018-11-17 16:02:04 -08:00
rogerman
71df3f4f28
NDSSystem.cpp: Fix interactions between external firmware loading and BIOS loading. Always ensure that loading external firmware is dependent on loading both ARM9 and ARM7 BIOS files.
2018-11-15 01:04:06 -08:00
rogerman
e27cc87bdf
Firmware: Standardize how the firmware configuration is set.
...
- Now, the only two methods for changing any firmware setting is by modifying CommonSettings.fwConfig or by loading an external NDS firmware binary file.
- All methods for changing the firmware MAC address through the WifiHandler class have been removed.
- The FirmwareConfig struct can now handle the WFC User ID.
- Clients can now retrieve the current MAC address and WFC User ID using NDS_GetCurrentWFCUserID(). It is also possible to retrieve the WFC User ID from CommonSettings.fwConfig.
- Setting up the firmware in NDS_Reset() should now be more consistent. However, this does change some of the loading/unpacking order previously set by NDS_FakeBoot(). This will need additional testing.
- Do a whole bunch of code refactoring and cleanup.
2018-11-15 00:18:22 -08:00
rogerman
5d85ac2e23
WiFi: Reduce the number of packets read by pcap_dispatch() from 16 to 1, significantly reducing the host-to-emulator latency of Infrastructure packet reads. This seems to be the best choice for maintaining a stable online connection, albeit at a significantly increased CPU cost for the host machine.
...
- Also do some minor code refactoring and cleanup.
2018-11-08 01:49:36 -08:00
rogerman
6eb1a79a71
WiFi: Significantly reduce the host-to-emulator latency of socket-sourced packets and make the emulated copy-to-WRAM latency more consistent when running Compatibility mode.
...
- Also slightly reduce the host-to-emulator latency of libpcap-sourced packets.
2018-11-07 13:20:10 -08:00
Roger Manuel
7ae2d764b0
Merge pull request #216 from Jules-A/winWifi
...
Win Port: Wifi cleanups following 9d05935
2018-11-04 15:32:05 -08:00
SuuperW
4affd3ca8a
Allow user to change new path settings in the path config dialog.
2018-11-04 07:08:59 -06:00
SuuperW
c8d534299f
Add SRAM_IMPORT_EXPORT path setting to separate from the auto-save battery location.
2018-11-04 06:08:08 -06:00
rogerman
c8306de8d2
arm_jit.cpp: OP_LDRD_REG() and OP_STRD_REG() now treat even-numbered registers as double-word load/stores, while odd-numbered registers are treated as single-word load/stores. (Fixes #215.)
...
- This change shouldn't actually change any functionality in practice... probably. This change is there to silence a compiler warning more than anything else... hopefully.
2018-11-02 13:06:15 -07:00
Jules.A
aecf153016
Fix wrong bool type, attempt to make warnings more clear.
2018-11-02 10:18:27 +08:00
Jules.A
ef53eccb0e
I guess they aren't the same message.
2018-11-02 09:26:08 +08:00
Jules.A
b6c69b031f
Nit: GetBridgeDeviceList already has proper return codes so just initialize variable locally.
2018-11-02 09:19:55 +08:00
Jules.A
36040e90a3
Let the user know when WinPcap isn't loaded.
2018-11-02 07:35:15 +08:00
Jules.A
4705c3e59a
Whoops, fix deviceCount.
2018-11-01 21:47:15 +08:00
Jules.A
c640e5c480
Winport wifi cleanups after 9d05935
. Removes interface for setting wifi mode along with removing redundant code.
2018-11-01 21:40:14 +08:00
rogerman
620048c43c
Firmware: Add the NDS_ReadFirmwareDataFromFile() function, which allows ports to either retrieve the entirety of a firmware file's data or to quickly read just a specific piece of it.
...
- The Cocoa port uses this new function for UI purposes.
2018-11-01 03:44:05 -07:00
rogerman
9d05935696
WiFi: The user no longer has to manually choose between using Ad-Hoc or Infrastructure modes. The code now automatically sends/receives packets to and from their proper places.
...
- This change obsoletes "CommonSettings.wifi.mode", which now does nothing. Ports that make use of this setting should remove it.
- Also do a bunch of code refactoring and cleanup.
2018-11-01 00:23:41 -07:00
rogerman
1e9aa08f54
Cocoa Port: Do some minor code cleanup.
2018-11-01 00:02:05 -07:00
rogerman
84e5228274
matrix.cpp: Use the __restrict keyword for MatrixCopy(), MatrixCompare(), and MatrixGetMultipliedIndex() to further clarify that the passed in matrices must be separate and non-overlapping.
2018-10-31 23:45:49 -07:00
zeromus
d8c0ca6f5b
notify the lua script of an updated projection, in more cases (re: #130 )
2018-10-31 23:30:40 -04:00
zeromus
ad7b80ec87
add lua functions emu.gamecode and emu.smallgamecode for game-specific hacks in scripts
...
re #130
2018-10-31 21:29:25 -04:00
rogerman
56895a11aa
Cocoa Port: Delete the now defunct preferredResourceStorageMode property that was obsoleted by commit da3970d
.
2018-10-31 15:54:46 -07:00
rogerman
8944328f80
OpenGL Renderer: Partially fix rendering in the Customize screen of Sands of Destruction.
...
- This fix properly emulates the less-than-or-equal depth test rendering for front-facing polygons drawn on top of opaque back-facing fragments, but only if the front-facing polygon is opaque. Translucent front-facing polygons are not supported at this time due to requiring extensive changes to the rendering logic and shaders in order to emulate this extremely rare and niche NDS feature. (If you require the proper rendering of translucent front-facing polygons on top of back-facing fragments, then you must use SoftRasterizer.)
2018-10-31 13:44:20 -07:00
rogerman
44ac04df27
OpenGL Renderer: Do some small optimizations to the OpenGLRenderer::ZeroDstAlphaPass() and OpenGLRenderer::RenderEdgeMarking() methods. Also reduce VRAM usage.
2018-10-31 01:23:13 -07:00
rogerman
dab414c725
OpenGL Renderer: Force front facing and back facing polygons to draw in separate groups, fixing a rendering bug in the car selection screen of "Need For Speed: Most Wanted". (Regression from commit 47a7194
. Fixes #212.)
2018-10-29 15:00:59 -07:00
rogerman
276e26c194
OpenGL Renderer: Calculate the polygon facing for each individual polygon, just like how SoftRasterizer does it.
2018-10-29 14:08:44 -07:00
rogerman
2000737593
GPU: Remove now defunct line info buffers.
2018-10-29 09:58:00 -07:00
rogerman
1c36705fe3
Windows Port: Fix all the compilers warnings when using the CACHE_ALIGN macro by reverting the use of alignas(X) back to __declspec(align(X)).
2018-10-28 15:54:09 -07:00
zeromus
26bfb66caf
auto-select retail nand for Daigassou! Band-Brothers DX ( fixes #213 )
2018-10-28 09:00:24 -04:00
rogerman
0beabec97c
Save States: Properly rescale and convert the internal 3D framebuffer to and from a standard format -- 32-bit RGBA8888. (Related to commit c1eafc5
and completes all the work in PR #190 by @SuuperW.)
2018-10-27 22:54:30 -07:00
rogerman
79687d3031
GPU: Okay, so fix another potential bug with main memory display mode in 15-bit since the evaluation order of function parameters is not guaranteed across different compilers. (In this particular case, the evaluation order is actually important.)
2018-10-27 19:49:24 -07:00
rogerman
fb7dbca344
GPU: Fix bug with main memory display mode when running 18-bit or 24-bit color depth. (Fixes #211.)
2018-10-27 19:25:15 -07:00
rogerman
4735079c9a
Save States: The GPU framebuffer downscaling code can now take a faster code path if available.
2018-10-27 16:28:00 -07:00
rogerman
0f9f86fe61
GPU: Improve the code consistency when it comes to scaling up lines.
2018-10-27 15:50:16 -07:00
rogerman
4b28d272a7
Save State: Properly rescale and convert the GPU framebuffers to and from a standard format -- native size at 15-bit RGB555. (Related to commit c1eafc5
and PR #190 by @SuuperW.)
2018-10-27 12:11:34 -07:00
rogerman
c1eafc53f2
Save States: Manually merge in most of the changes (with the exception of the GPU framebuffer rescaling and reformatting code) based on several commits in PR #190 by @SuuperW.
2018-10-26 00:17:08 -07:00
rogerman
c3dbb920fa
Cocoa Port: Do some UI tweaks with reporting the firmware MAC address.
2018-10-25 15:42:27 -07:00