Commit Graph

6193 Commits

Author SHA1 Message Date
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
rogerman 2e7099052d Linux GTK Port: Fix compiling for GTK port. (Regression from commit 064527e.)
- The new behavior for the Multisample Antialiasing checkbox: Checked - GFX3D_Renderer_MultisampleSize = 4, Unchecked - GFX3D_Renderer_MultisampleSize = 0. (If someone else wants to make some UI so that GFX3D_Renderer_MultisampleSize can be set to other sizes, then have at it.)
2018-10-25 11:55:44 -07:00
rogerman e2d60f62fd Windows Port: Fix compiling for Windows port. (Regression from commit bb38022.) 2018-10-25 02:34:26 -07:00
rogerman bb38022873 Firmware: Replace the old NDS_fw_config_data struct with the new FirmwareConfig struct, which allows for easy modification of all the user-related settings, including all the WiFi settings. Also do a massive refactor and cleanup of the firmware-related code.
- Also exposes all of the WiFi-related firmware settings in the Cocoa port UI.
2018-10-25 01:43:19 -07:00
rogerman da3970d817 Cocoa Port: Improve the performance and robustness of Metal display views.
- Add a unique sequence number to fetched frames to ensure that older frames are not drawn after newer frames.
- After much research, finally settle on a method for fetching the NDS framebuffers -- using a MTLBlitCommandEncoder to blit a MTLBuffer to a MTLTexture. It is faster than uploading a texture using [id<MTLTexture> replaceRegion:mipmapLevel:withBytes:bytesPerRow:], and also faster than using a pinned-memory backed linear texture. This method will be the way going forward for fetching framebuffers in Metal.
2018-10-25 01:05:36 -07:00
rogerman 064527e24e CommonSettings: Remove the now obsolete GFX3D_Renderer_Multisample setting. (Related to commit 94ddf1a.) 2018-10-25 00:35:22 -07:00
Roger Manuel 3cc4a64b69
Merge pull request #205 from Jules-A/antialiasing_settings
AntiAliasing Settings
2018-10-24 23:56:07 -07:00
Jules.A 0965eef5b3 rogerman fixes 2018-10-25 07:05:06 +08:00
Jules.A cfd77abaf7 Fixed UI elements moving around by simply re-arranging the order in resources.rc... Also added extra check when context is created. 2018-10-25 04:50:33 +08:00
Jules.A 65285aeb8c Cleaned up variable positions, added dummy OGL initiation so max device samples could be obtained from any renderer.
As a result, values higher than user is capable of won't be created.
2018-10-24 08:04:59 +08:00