Compare commits

...

2591 Commits

Author SHA1 Message Date
rogerman 6f1a63fe89 Cocoa Port: Support Automatic Graphics Switching, allowing the use of the integrated GPU to run video display windows. (Requires a dual-GPU MacBook Pro with Metal-capable GPUs.)
- While this results in a 20% performance loss for video display window functions (like video filters), this also dramatically extends battery life. To return to the old way of using the discrete GPU for video display windows, the user must disable Automatic Graphics Switching in their System Preferences.
- The Troubleshooting Window now correctly reports the emulated 3D renderer that is currently active, rather than the one that is selected in the GUI.
- Also fix a bug where creating a OpenGL 3D renderer's context would immediately fall back to Apple Software Renderer if context creation failed. Now, context creation falls back to Apple Software Renderer as the last resort, only after all other Core Profile contexts have failed.
2025-03-26 16:55:25 -07:00
rogerman 25356b70f1 GPU: Add some more optimizations hints in CopyLineExpand() for SSSE3. 2025-03-26 13:26:42 -07:00
rogerman 75766495f9 Cocoa Port: Add some missing file references to the Xcode 3 project. 2025-03-20 22:55:40 -07:00
rogerman 1091e69726 Cocoa Port: Fix a bunch of bugs related to moving windows between Retina and non-Retina displays. (Related to commit 2bc5b0d.) 2025-03-19 03:11:16 -07:00
rogerman f6e0feb13e Cocoa Port: Report which OpenGL renderer is actually selected for 3D rendering. (Debug mode only.) 2025-03-18 15:55:01 -07:00
rogerman 33754b706e Cocoa Port: Add support for performing OpenGL 3D rendering on the 2013 Mac Pro's second GPU.
- For OpenGL 3D rendering, this yields a performance improvement of 2% - 4%.
2025-03-17 17:03:35 -07:00
rogerman 50e39989f7 GPU: Do some small optimizations to SSE2 and AVX2. 2025-03-16 23:15:46 -07:00
rogerman c73a7ffe53 GPU: Add NEON-accelerated functions for 2D layer compositing. (For 64-bit ARM CPUs only.)
- This improves GPU performance by up to 20% on the Raspberry Pi 5, and up to 50% on Apple Silicon CPUs.
2025-03-16 16:23:21 -07:00
rogerman e2379a66d6 matrix.h: Fix const-correctness for some *_fast function parameters.
- In practice, this only affected compiling for NEON on certain compilers. Other SIMD ISAs should remain unaffected.
2025-03-16 16:13:12 -07:00
zeromus 5cd9d36bba
Merge pull request #888 from Morilli/fix-movie-commands
fix movie command flags not actually being OR'd together
2025-02-14 03:16:42 -05:00
Morilli b756ffb1e6 fix movie command flags not actually being OR'd together 2025-02-14 08:57:30 +01:00
zeromus bec2329653
Merge pull request #886 from Anonym271/master
Bugfix: MemROMReaderWrite not working for size=1
2025-02-11 16:55:35 -05:00
Anonym271 06bef8b560 Bugfix: MemROMReaderWrite was not working for 1 byte length because it
would copy the current mem's byte into the source buffer instead of the
opposite way.
2025-02-11 22:49:20 +01:00
rofl0r dfcd482933 fix couple of header names to work on case-sensitive file systems 2024-12-06 02:37:38 +01:00
rofl0r 8a4fd0a9cb arm_jit: fix build when LOG_JIT_LEVEL != 0 2024-12-06 02:37:38 +01:00
zeromus b022181a05
Merge pull request #867 from lifehackerhansol/libnds-v2
Minor fixes for libnds v2.0.0 release
2024-11-14 23:54:53 -05:00
lifehackerhansol ee39a36f20
cp15: add support for process ID 2024-11-14 20:47:47 -08:00
lifehackerhansol c1624b2b33
MMU: support 8-bit write to REG_IPCSYNC 2024-11-14 20:47:47 -08:00
Max Fedotov 1192bf6f2c
EGL: use eglGetPlatformDisplay if available (#865)
POSIX Ports: When acquiring an EGL context, try calling the client-specific eglGetPlatformDisplay() before falling back to the more generic eglGetDisplay(). Hopefully fixes #864.
2024-11-12 22:50:35 -08:00
thesource 2c7fac57ff port 0.5 GPU scaling increments/window sizes to GTK3 2024-11-06 22:43:22 +01:00
Max Fedotov 3b1989a9d9
GTK*: add gamepad hotplug support (#855)
* add gamepad hotplug support
* Get rid of nbr_joy
2024-11-04 19:32:07 +01:00
zeromus f51e19b19b
Merge pull request #860 from En-En-Code/oglgetdriverversion-fix
fix: null-terminate versionSubstring in OGLGetDriverVersion
2024-11-02 22:24:35 -04:00
En-En 6f1d4e1d5c fix: null-terminate versionSubstring in OGLGetDriverVersion 2024-11-02 18:09:49 +00:00
rogerman 6690a8cedd posix: Update the Code::Blocks project file to include the new files that commit efdd938 added. 2024-10-28 14:39:17 -07:00
rofl0r 7d6f0982c8 gtk2: add some more presets to winsize menu 2024-10-28 19:16:45 +00:00
rofl0r 0ec9d74c39 gtk2: allow 0.5 increments on gpu scale
since the window size menu offers those as presets, and at least a 0.5
fraction on the scale doesn't seem to cause any problems in my testing.
2024-10-28 19:14:08 +00:00
rofl0r 76a6935dc8 gtk2: backport GPU scaling feature
feature was originally added via PR #764 to the gtk3 frontend.

this makes it possible to run the scaling on the GPU, avoiding the
incredibly slow software scaling that's otherwise done via cairo
when view->window size is set to anything > 1.0.
note that the window size "scale" needs to be identical to the
chosen GPU scale factor, otherwise software scaling kicks in again.

unlike the scale setting in the CLI port, which simply upscales the
native NDS framebuffer in hardware, this setting scales up even
the actual 3D textures, resulting in a sharper image, at the cost
of higher CPU/GPU usage. a game using demanding 3D scenes, like
zelda phantom hourglass' intro scene, may be able to still trash
the FPS.

the original PR also reported issues when setting the GPU scale to
a fraction, therefore the increments are currently locked to 1.0.
2024-10-28 13:50:27 +01:00
rofl0r 3ddb2669a9 cli: fix boost input detection
until now, the boost key was hardcoded to 'o' even when the config
said otherwise, and not treated in case of a joypad at all.
when triggered with the o key, it even behaved differently than
the gtk ui - the boost wasn't released together with the key,
but only when pressed again, so it was more like a shortcut for
"disable fps limiter".

this change implements the desired outcome of the second part of PR #822,
but without introducing more hacks and relying on magic values.

closes #822
2024-10-28 11:32:43 +01:00
rofl0r 58bbe693e1 cli: fix joypad and keyboard config retrieval
because the GTK frontends use GDK keysyms, not SDL ones, - the former
are being stored in the config file and used by the GTK ui) -  a temporary
workaround was put into place 14 years ago: the loaded config values
were simply being overwritten with the hardcoded defaults.

this commit removes the overriding of the config, and introduces
a cli frontend specific section "SDLKEYS", which is written by the
GTK2 frontend upon a configuration change.
it tries to convert the GDK keycodes into SDL2 ones while doing so.

an alternative solution (involving less code changes) would have been
to do the conversion in the cli frontend, but that would require having
the gdk header available for compilation, which may not be the case
if the user only wants the cli frontend. such a user could now create
the config file on another machine with the GTK frontend, or simply
manually take the desired values from the SDL_keycode.h header.

this change is instigated by one of the changes in PR #822, which simply
removed the workaround and kept parsing on error, which mitigated the
problem for some keys, but not all.
2024-10-28 11:32:43 +01:00
rofl0r 0a36e96f66
Merge pull request #845 from thesourcehim/master
[GTK*] Some gamepad input rework

- Unbind gamepad keys by default. The default bindings may fit one gamepad model but work weirdly with another causing issues like [LINUX/GTK3] Whitescreen freeze when pressing square on ds4 #834
- Use non-blocking method to obtain gamepad keys/axes during configuration to avoid visible emulator freeze and possible deadlock (see [linux] editing controlls sometimes (often) freezes the emulator #843)

closes #834
closes #843
2024-10-27 11:51:24 +01:00
thesource 5d498a97c4 Port previous two changes to gtk2 frontend. Add meson option to build
gtk2 frontend (disabled by default). Fix meson.build dependency for
gtk2.
2024-10-26 13:29:48 +03:00
zeromus fff5659879
Merge pull request #851 from dlbuhtig4096/master
Fix ensata sound register emulation.
2024-10-26 02:27:43 -04:00
En-En efdd938dc3
GTK*: Action Replay cheat menu (+ other cheat improvements) (#847)
* GTK cheats UI inputs/displays hex for address (offset)

* Added range bound to keep internal cheat data within specified size
The decision to change the value column to store G_TYPE_UINT is purely pragmatic--having all data be treated and displayed as unsized is simpler than writing a custom display to handle signedness and cleaner than 1-3 byte ints appearing unsigned and 4 byte int appearing signed.

* Added index and cheat type data to ListStore
My implementation plan is to use a GtkTreeModelFilter to create separate section for internal and ActionReplay cheats, but I was not convinced the indices in the tree path would correspond to the indices in , hence the additional column.

* Filter raw and AR cheats, display both filters in UI, patch up raw update/delete

* Action Replay UI elements [GTK]

* Memory leak fixes
+ some additional clean-up comments and small bug patches

* Backport to GTK2
2024-10-25 20:32:03 +02:00
dlbuhtig4096 ff84815acb Improve console allocation. 2024-10-24 19:20:24 +08:00
dlbuhtig4096 28f5c76035 Proper ensata handshake on reconnection. 2024-10-20 21:27:03 +08:00
dlbuhtig4096 7984eae357 Fix ensata sound register emulation. 2024-10-20 13:03:03 +08:00
Roger Manuel 2bc5b0d86b
Merge pull request #846 from BayLee4/fix_retina
Cocoa Port: Fix mixed retina/non-retina display touchscreen bug
2024-10-10 12:48:59 -07:00
BayLee4 a0386e535c Cocoa Port: Fix mixed retina/non-retina displays bug 2024-10-10 17:57:21 +02:00
thesource 72315fa339 Make gamepad key configuration non-blocking 2024-10-10 11:42:27 +03:00
thesource 1cf7c37896 Unbind joypad keys by default 2024-10-10 09:44:09 +03:00
zeromus 8fa0affab1
Merge pull request #839 from intra0/master
Update org.desmume.DeSmuME.metainfo.xml
2024-10-04 21:31:38 -04:00
zeromus e7442cc999
Merge pull request #841 from lifehackerhansol/cmdline-misleading-indentation
commandline: avoid misleading indentation
2024-10-01 05:43:24 -04:00
lifehackerhansol fa1879f9a7
commandline: avoid misleading indentation 2024-09-29 13:45:34 -07:00
intra0 bb1b6a1c80
Update org.desmume.DeSmuME.metainfo.xml
the current flatpack version is commit 640a1fdd93

was 2 years ago but is a 9.14 version
2024-09-25 21:54:14 -05:00
zeromus 91196788eb fix more screw-ups in unicode support. fixes #828 2024-08-31 22:34:38 -04:00
rogerman 8f9c6892d5 OpenGL Renderer: Fix an initialization issue with the clear image shader program when running the 3.2 Core Profile renderer for a driver that only supports OpenGL v3.2. (Regression from commit e2a25e2. Fixes #827.) 2024-08-28 10:33:27 -07:00
zeromus 42667020d8 fix ensata emulation? (re: #184) 2024-08-27 04:15:00 -04:00
rogerman 64132f765a OpenGL Renderer: Fix a bug where having Edge Mark enabled could cause fragments to disappear. (Regression from commit f910c61.) 2024-08-22 19:26:39 -07:00
rogerman 00b8df1b00 OpenGL Renderer: Add entry point for glClientWaitSync, fixing compiling on Windows. (Regression from commit f910c61.) 2024-08-15 17:50:53 -07:00
rogerman f910c6197c OpenGL Renderer: Add new rendering resource classes, and do some misc. refactoring.
- Using the new OpenGLGeometryResource and OpenGLRenderStatesResource classes, the 3.2 Core Profile and ES renderers now use triple-buffering for all geometry rendering resources and framebuffer constants.
- Delete the InitFinalRenderStates() method, which has been obsoleted over the years. Its functionality has been rolled into the InitExtensions() and _RenderGeometryLoopBegin() methods.
2024-08-15 16:49:42 -07:00
rogerman f84a804499 OpenGL Renderer: Fix bug where clear images were Y-flipped. (Regression from commit 3db6d56.) 2024-08-13 19:49:34 -07:00
rogerman 8197174d69 OpenGL ES Renderer: Fix a bug where the final output framebuffer is Y-flipped. (Regression from commit 3db6d56.) 2024-08-12 13:44:58 -07:00
rogerman 3db6d5676c OpenGL Renderer: Do some more code cleanup and tune-ups.
- In the 3.2 Core Profile and ES renderers, synchronization of vertex info uploads now occurs at a more reasonable time.
- Geometry rendering is now Y-flipped by default, eliminating the need to Y-flip the final output framebuffer under all conditions.
- Legacy OpenGL no longer needs to perform any color conversion of the final output framebuffer if FBOs are supported.
- Rename some functions and variables to better describe what things are doing now.
2024-08-12 11:23:23 -07:00
rogerman 9bbfca527a Remove redundant and currently unused Makefile. 2024-08-10 15:53:25 -07:00
rogerman 04f97d5755 OpenGL ES Renderer: Fix a major performance bug on many ARM-based mobile devices with integrated GPUs. 2024-08-10 15:06:30 -07:00
rogerman ea648f7110 OpenGL Renderer: Do some minor tune-ups.
- Remove some methods in OpenGLRenderer_2_0 and OpenGLRenderer_2_1 that have negligible contribution to either performance or code simplicity.
- OpenGLRenderer_1_2, OpenGLRenderer_2_0, and OpenGLRenderer_2_1 are now instantiated with their specific variant IDs.
- Calls to malloc_alignedCacheLine() have been replaced with the more appropriate malloc_alignedPage().
- Do some misc. code cleanup.
2024-08-10 13:48:13 -07:00
rogerman c75c1ce2c3 Linux Ports (All): Update Autotools and Meson scripts to add JIT support for ARM targets.
- Also fixes build errors related to explicitly building SIMD files for colorspacehandler. Don't do it! The proper way is to simply include "colorspacehandler.cpp" alone and let the compiler's preprocessor macros determine which SIMD file to use.
2024-08-09 12:55:13 -07:00
rogerman 2e01c0a840 Linux Ports (All): Update the Code::Blocks project file to add build targets for AArch64. Also do some other misc. updates.
- Release builds now use -Ofast optimization instead of -O3.
- Release builds no longer strip their symbols. This will be needed for profiling and debugging.
2024-08-08 17:34:26 -07:00
rogerman b799d94762 Colorspace Handler: Fix compiling for strict NEON.
- We could always use -flax-vector-conversions, but let's try to stay disciplined for now.
2024-08-08 12:11:20 -07:00
rogerman 176e38ce2f OpenGL Renderer: Simplify the code by removing the references to multiple output shaders, since commit 0c7cb99 has obsoleted them. 2024-08-07 12:20:35 -07:00
rogerman c5ab8a6ef6 OpenGL ES Renderer: Fix a bug where RGBA6665 color output would fail. (Regression from commit de9fc5a.)
- Also update some comments.
2024-08-06 23:48:54 -07:00
rogerman de9fc5ab75 OpenGL Renderer: Remove the additional FBOs that were introduced in commits 60385bd, 8b5ac56, and 3ef9271 in an attempt to fix rendering on old GPUs like the Intel HD 4000. (Fixes #820.) 2024-08-06 21:54:39 -07:00
rogerman 5baeb02754 Cocoa Port: Fix OpenGL context creation on older macOS. 2024-08-03 16:15:02 -07:00
rogerman d7dcc85d87 GTK / GTK2 Ports: EGL contexts running legacy OpenGL no longer require the EGL_KHR_surfaceless_context extension. 2024-08-03 11:14:55 -07:00
rogerman 79f3f94099 GTK2 Port: Set the audio volume in the same way as the GTK port so that the audio volume is consistent between the two ports. 2024-08-03 10:13:41 -07:00
rogerman 9aa2ddfc88 Linux Port (GTK/GTK2): Remove the requirement for libGLX.so when requesting a GLX context since libGL.so is all we need here.
- Also do some minor code cleanup in glx_3Demu.cpp
2024-08-02 12:10:21 -07:00
rogerman 4427b863ad Linux Port (GTK/GTK2): Fix compiling in glx_3Demu.cpp.
- Also fix a typo in egl_3Demu.cpp
2024-08-01 23:02:58 -07:00
rogerman 15f5b169cc Video Filters: Improve performance of Deposterize and XBRZ CPU-based filters. (Based on PR #631.)
- Special thanks to @m42a for the inspiration on this code!
2024-08-01 21:07:24 -07:00
rogerman be51e41c04 Ugh, let's try fixing the last stubborn Meson build script... 2024-08-01 18:00:54 -07:00
rogerman 46990f2d85 Fix some issues with Meson build scripts. (Regression from commit ca566eb.) 2024-08-01 17:51:12 -07:00
rogerman ca566eb11b OpenGL Renderer: Finalize all renderer-client integration to "just work".
- These changes now presume that standard OpenGL and OpenGL ES are mutually exclusive. We will NOT support running a standard OpenGL context and an OpenGL ES context in the same process.
- Clients must explicitly request supporting the OpenGL 3D renderer in their build configuration. Build configurations must define ENABLE_OPENGL_STANDARD (replacing the HAVE_OPENGL macro) or ENABLE_OPENGL_ES. If neither macro is defined, then the OpenGL 3D renderer will be assumed unavailable.
- Meson and Autotools now use better header/library checks for OpenGL functionality with their associated context type.
- Add a new Code::Blocks project file that can make builds for CLI, GTK, and GTK2.
- GTK and GTK2 ports now have the option to run a legacy OpenGL context, a 3.2 Core Profile context, or simply choosing the best context automatically like before.
- GTK and GTK2 ports have GLX and EGL as new context types. OSMesa and SDL have been updated to the latest design pattern.
- GTK and GTK2 ports can now be configured (via Meson or Autotools) to use a GLX, OSMesa, EGL, or SDL context.
- OSMesa contexts are now marked as deprecated. I don't know of anyone who still uses them, and I've never been able to get it to work correctly for years. Now that we have GLX contexts for compatibility purposes, OSMesa contexts are now completely redundant.
- Fix a bug with the GTK port where ancient GPUs without FBO support can still run framebuffers at custom sizes.
- For POSIX ports, move all "avout" and context creation files to the "shared" directory for better file organization.
2024-08-01 17:08:01 -07:00
rogerman 0a78fa2a2b OpenGL Renderer: Fix a few bugs here and there.
- Fix a compiling bug for ES due to missing tokens.
- Fix Fog and Edge Mark feature availability when running legacy OpenGL. (Regressions from commit 0c7cb99 and commit 8b5ac56.)
- glDrawBuffer() now determines its own algorithm at runtime instead of at compile time. This change is being done to be consistent with all of the other Standard vs ES changes.
2024-08-01 00:11:05 -07:00
rogerman 2f177d19a2 Cocoa Port: Update OpenGL renderer integration code to reflect current design patterns. 2024-07-26 14:56:36 -07:00
rogerman 4c90c2d9ee OpenGL ES Renderer: Finalize the last remaining bug fixes so that the ES renderer can work "out of the box".
- Respect the draw buffers ordering rules that are unique to ES.
- Report the actual OpenGL variant being requested when initializing the renderer.
- Add oglrender_deinit() function pointer so that clients can properly handle the destruction of their associated context resources at the correct time.
- Certain internal OpenGL info is now assigned at run time instead of at compile time. This change now allows any of the OpenGL renderers to run side-by-side.
2024-07-26 11:10:50 -07:00
rogerman d6532b9e91 OpenGL ES Renderer: Fix TBO-based polygon state uploading. 2024-07-24 15:28:56 -07:00
rogerman d58c0e9331 OpenGL Renderer: Oops! Fix a compiling issue introduced in commit e2a25e2. 2024-07-23 21:39:07 -07:00
rogerman e2a25e2412 OpenGL Renderer: Fix various rendering bugs.
- Fix a potential unaligned access crashing bug in ES when clear images are to be rendered.
- Fix an ES bug where clear images would fail to render when MSAA is enabled.
- Fix a legacy OpenGL bug where toon table colors were not ignoring their alpha bit, according to GBATEK.
2024-07-23 21:28:15 -07:00
rogerman f323dc464f Windows Port: Fix bug where the OpenGL 3D renderer would fail to initialize at program startup. (Regression from commit 76fe5f7. Fixes #815.) 2024-07-22 22:47:29 -07:00
zeromus 8e77a8d9f1
Merge pull request #818 from cyanea-bt/windows_paths
Windows Port: Fix empty defaults for path settings
2024-07-22 19:43:37 -05:00
cyanea-bt 5754425458 Windows Port: Fix empty defaults for path settings.
(Regression from commit 3511e14. Fixes #817.)
2024-07-23 01:57:59 +02:00
rogerman 12ed7dd054 Colorspace Handler: Fix alpha detection logic in ColorspaceConvert5551To8888_*() and ColorspaceConvert5551To6665_*(). 2024-07-21 21:02:50 -07:00
rogerman 368cd49fb6 OpenGL Renderer: Tighten up some code related to clear image. 2024-07-20 22:54:44 -07:00
rogerman 3ef927100b OpenGL Renderer: Fix some longstanding graphical glitches related to running Edge Mark and Fog with MSAA.
- These graphical glitches are resolved only when running 3.2 Core Profile with the GL_ARB_sample_shading extension, available on all modern GPUs.
- Do some minor optimizations to the Edge Mark and Fog shaders.
- Also fix an FBO attachment bug in legacy OpenGL that was introduced in commit 8b5ac56.
2024-07-20 20:49:44 -07:00
rogerman 8b5ac56d66 OpenGL Renderer: More FBO rework. 2024-07-19 14:38:05 -07:00
rogerman 60385bd099 OpenGL Renderer: Rework how the output framebuffers work.
- The output framebuffers now bind their own FBOs rather than changing draw targets with glDrawBuffer().
- Rework the general FBO management.
- Legacy OpenGL now outputs native RGBA color if FBOs are supported. This should give a minor performance increase on older GPUs.
- The fixed-function pipeline can now flip the framebuffer on GPU. This greatly reduces the CPU usage when doing the final color conversion and gives a significant performance increase on ancient GPUs.
2024-07-18 21:45:00 -07:00
rogerman 811e1de45e OpenGL Renderer: Oops! Roll back some internal test code that accidentally slipped into commit 0c7cb99. 2024-07-18 12:46:11 -07:00
rogerman 3e650f2f73 OpenGL Renderer: Add entry point for glBlendColor, fixing compiling on Windows. (Regression from commit 0c7cb99.) 2024-07-18 12:26:53 -07:00
rogerman 0c7cb99d78 OpenGL Renderer: Greatly simplify the fog rendering pass.
- There is no more need to switch to the working texture as the destination for the fog output. This change will be essential for future commits.
- The dual-source blending method has been obsoleted and removed.
- FBOs are no longer required for the fog feature, easing requirements for ancient GPUs.
- Ancient GPUs may see a small performance benefit due to shader simplification.
2024-07-18 12:17:25 -07:00
rogerman 70fef83ded OpenGL Renderer: Fix bug when the screen wasn't being cleared properly when no polygons are being sent to the renderer. (Regression from commit 241ca96.) 2024-07-16 16:15:47 -07:00
rogerman ff9231bb34 OpenGL Renderer: 16-bit texture data that is converted to 32-bit is now byte-swapped correctly on big endian systems. 2024-07-15 23:09:53 -07:00
rogerman ab1d37a44f Colorspace Handler: Fix compiling on AltiVec systems. (Regression from commit 586aea5.) 2024-07-15 23:07:24 -07:00
rogerman cc0b3ed00d Cocoa Port: Update the OpenGL blitter code to reflect the current code pattern in OGLRender.h.
- Centralize all header includes into OGLDisplayOutput.h.
- Update all extension versions of OpenGL functions/tokens that would be core in OpenGL v1.5.
2024-07-15 16:52:43 -07:00
rogerman 80694cd966 OpenGL ES Renderer: More ES fixes.
- Change the remaining FBO attachments that I missed the last time to use RGBA8 internal format.
- Fix picky ancient drivers that won't accept GL_RED as a texture internal format. It has been changed to GL_LUMINANCE.
- Fix picky ES drivers that demand that the external format used in both glTexImage2D() and glTexSubImage2D() are exactly the same.
- OpenGL ES doesn't support GL_UNSIGNED_SHORT_1_5_5_5_REV for texture data, and GL_UNSIGNED_SHORT_5_5_5_1 is incompatible with our data. So instead, all 16-bit data will be converted to 32-bit LE before uploading it via the textures, and such ES textures will now take GL_UNSIGNED_BYTE format.
- Remove the #include for EGL/egl.h in OGLRender.h, since EGL shouldn't exist at this level of the code stack.
2024-07-15 16:45:21 -07:00
rogerman 586aea5310 Colorspace Handler: Add new functions for 16-bit to 18-bit and 32-bit color conversion, now respecting the 16-bit color's alpha bit.
- ColorspaceConvert5551To8888()
- ColorspaceConvert5551To6665()
- ColorspaceConvertBuffer5551To8888()
- ColorspaceConvertBuffer5551To6665()
- Also rename the existing 16-bit color conversion functions to help further distinguish the functions from one another.
2024-07-15 16:24:02 -07:00
Roger Manuel 4b0805e139
Windows Port: Fix yet another compiling issue related to the OpenGL context. (Fixes #811.) 2024-07-15 10:00:38 -07:00
rogerman 15a6e51739 OpenGL Renderer: Add support for Fog, Edge Mark, and on-GPU framebuffer color conversion for ancient GPUs that have support for shaders and FBOs, but lack support for GL_EXT_framebuffer_blit. 2024-07-14 19:38:29 -07:00
rogerman de62116cc8 Windows Port: Fix OpenGL renderer init failure. (Regression from commit 76fe5f7. Fixes #810.) 2024-07-14 17:22:47 -07:00
rogerman 241ca96cf1 OpenGL Renderer: Fix issues that would throw a GL error.
- glTexParameteri() with GL_TEXTURE_2D_MULTISAMPLE throws INVALID_ENUM when trying to assign a sampler-related state, so these calls have been removed.
- glMapBufferRange() throws GL_INVALID_OPERATION if the buffer size is 0, so check for this condition first.
2024-07-13 10:43:04 -07:00
rogerman aaf88d9f14 OpenGL ES Renderer: More ES tune-ups.
- Any ES-specific error messages are now reported as "OpenGL ES" instead of "OpenGL".
- Explicitly declare the internal format of all textures and RBOs used as FBO attachments as "GL_RGBA8" instead of the generic "GL_RGBA". This may fix some extremely picky ES drivers that would throw GL_INVALID_ENUM if we don't use a sized internal format.
- Hard code the read pixels format as GL_RGBA and the read data type as GL_UNSIGNED_BYTE. It is meaningless to rely on GL_IMPLEMENTATION_COLOR_READ_FORMAT and GL_IMPLEMENTATION_COLOR_READ_TYPE since we are reading from our own FBOs that are hard coded to GL_RGBA8 format.
- Require that OpenGL ES contexts support the GL_OES_surfaceless_context extension, since we are doing offscreen rendering strictly on FBOs only. This extension has been around for a very long time, and so this serves as a kind of compatibility check.
2024-07-12 15:41:09 -07:00
rogerman d480f95d79 Cocoa Port: Fix yet another crash-on-exit bug that could happen when running on an older system. 2024-07-12 12:00:49 -07:00
SimonAfek dd88556d53
CI: update github workflows (#809)
* Update macOS version in build_interface.yml

* Typo fixes in build_interface.yml

* build.yml: Update runner images

* build.yml: Update deprecated actions

* build_interface.yml: Update runner images

* build_interface.yml: Update deprecated actions

* build_interface.yml: Remove unnecessary packages from macOS "brew install" line to address warnings

* build_win.yml: Update runner image + remove vs-version parameter from setup-msbuild action

* build_win.yml: Update deprecated actions
2024-07-11 17:38:52 +02:00
rogerman 00dd6fb97a OpenGL ES Renderer: Use the proper ES extension header, and also avoid double #defining some of the tokens. 2024-07-10 21:53:49 -07:00
rogerman bb3011c262 OpenGL Renderer: Return to a more traditional method of doing texture reads in shaders, effectively removing dependent texture reads where appropriate.
- This change won't affect standard OpenGL on a desktop PC, but may improve performance on lesser GPUs trying to run OpenGL ES.
2024-07-10 16:01:13 -07:00
rogerman 86a29d768a OpenGL ES Renderer: Do some minor changes/fixes.
- Fix a bug where _isShaderFixedLocationSupported wasn't being set to true, causing shaders to fail.
- OpenGL version checks now account for non-compliant ES drivers that contain text before the version number.
- Manually set the default read/draw buffers for all FBOs upon creation. We shouldn't need to do this, since they should always be set later, but just in case...
- Add missing GL_BGRA macro.
- Tidy up the OpenGL naming in some error strings.
2024-07-10 13:59:02 -07:00
rogerman 3a6f2f6dc5 OpenGL ES Renderer: Add a new OpenGL ES 3.0 renderer. 2024-07-09 23:00:27 -07:00
rogerman 0e88f9aa94 OpenGL Renderer: Final changes for OpenGL ES compatibility. 2024-07-09 22:03:33 -07:00
rogerman 384854f6e7 OpenGL Renderer: More updates to the 3.2 Core Profile renderer to be more cross-compatible with OpenGL ES 3.0.
- Add support for fixed locations in shaders for OpenGL 3.3 and later.
- The fog density table texture is now a 2D texture instead of a 1D texture.
- Fix a memory leak where the polygon state texture wasn't being deleted upon the destruction of the OpenGLRenderer object.
2024-07-09 01:18:50 -07:00
rogerman 7dbece1082 OpenGL: Do some minor changes to the 3.2 Core Profile renderer to make it more cross-compatible with OpenGL ES 3.0.
- PBO handling now works via glMapBufferRange() instead of glMapBuffer().
- Polygon states can now be uploaded using plain integer textures. 64k UBOs and TBOs are no longer required.
2024-07-06 16:20:53 -07:00
rogerman 09090e93f9 GFX3D: Change POLYLIST_SIZE to 16384 to ensure proper memory alignment with buffers based on CLIPPED_POLYLIST_SIZE and VERTLIST_SIZE. 2024-07-06 13:58:05 -07:00
rogerman c962c550e7 OpenGL: Handle legacy functions and tokens more gracefully for OpenGL variants that may not have them. 2024-07-05 18:13:43 -07:00
rogerman 76fe5f758c OpenGL: More changes in preparation of OpenGL ES.
- Slightly change the names of attachment defines so that they can be distinguished from the native OpenGL attachment defines.
- The minimum version driver check now accounts for OpenGL ES.
- OpenGLRendererCreate() can now handle any possible OpenGL variant, as declared in the OpenGLVariantID enum.
- Framebuffer read backs may now assigned their format and data type. (Legacy OpenGL assigns the format as GL_BGRA, while 3.2 Core Profile assigns the format as GL_RGBA.)
2024-07-03 16:55:47 -07:00
rogerman ba56bbc7c2 OGLRender_3_2.cpp... try again... 2024-07-03 13:05:43 -07:00
rogerman 3ec0b0c2e1 OpenGL: Continue preparation for adding OpenGL ES. (Related to commit 086980d.) 2024-07-03 13:01:17 -07:00
rogerman fc6ff8edbd GPU: Fix a bug on big-endian systems where setting the backdrop color could cause a crash. 2024-07-02 01:35:10 -07:00
rogerman fe0ae83c40 Cocoa Port: Fix a longstanding, yet rare, crash that may occur when quitting the app. 2024-07-02 00:16:46 -07:00
rogerman d4163a1893 OpenGL: Fix building on Windows and Linux. (Regression from commit 086980d.) 2024-07-01 16:26:46 -07:00
rogerman 086980deaf OpenGL: Start reorganizing stuff in preparation for adding new OpenGL variants, such as OpenGL ES.
- All platform-specific header includes are now centralized in OGLRender.h.
- Remove all ARB and EXT versions of legacy functions (everything pre 3.0). Legacy functions now only reference their core versions.
- Do a some minor code cleanup.
2024-07-01 16:19:05 -07:00
rogerman 76bd1a5e35 Change line-ending style in OGLRender.h from Windows-style CRLF to Unix-style LF. 2024-06-29 14:50:47 -07:00
rogerman 6309a9c6a7 libretro: So apparently, _XOPEN_SOURCE has to be at the top of the file. Hopefully this makes both GCC14 users and Mac users happy. (Related to commit 779606e. Based on PR #793.) 2024-06-07 17:16:53 -07:00
rogerman 779606ec2f libretro: Fix building on Mach-based operating systems, otherwise known as Mac OS X and modern macOS (regression from commit 90d0abd). Based on PR #793. 2024-06-07 16:33:13 -07:00
zeromus ffb8666a8f winport - plumb S9X_JOY_NEUTRAL through inifile:
[Controls]
DigitalizationThreshold=50
2024-06-07 00:24:55 -04:00
zeromus ff6c33a8d6 winport - reduce joystick digitalization threshold from 60% to a more normal 50%. With a too-high threshold, it's impossible to specify diagonals. This is preferable for games without diagonals (else you accidentally crouch when you just meant to walk to the side) instead of 8-way games, so we have to be pretty aggressive about the threshold. But 50 is the more normal choice. 2024-06-07 00:18:09 -04:00
zeromus 90d0abdae0
Merge pull request #792 from atsampson/xopen-strdup
libretro-common: fix implicit declarations
2024-05-13 07:59:48 -05:00
Adam Sampson 738298a9e8 libretro-common: fix implicit declarations
strdup and realpath are only declared by glibc's headers if
_XOPEN_SOURCE >= 500.
2024-05-13 12:47:10 +01:00
zeromus 4a53a30b91 winport - fix bug where desmume would create working directory using some wrong locale encoding and produce a Pok魯n directory instead of using the Pokémon that was already there (fixes #791) 2024-05-12 21:33:49 -04:00
rofl0r 9515af82b2
add an issue template for github (#784) 2024-04-12 21:39:12 +02:00
rogerman bae67e2d0c GPU: Implement the DISPCNT register's ForceBlank bit by clearing the line to white if the ForceBlank bit is set. (Fixes #775.) 2024-03-02 15:18:51 -08:00
Max Fedotov 0a6eca6dce
GTK: hybrid layout support (#773)
* GTK: hybrid layout support
* Fix HUD with new layouts
* Simplify rotoscaled_hudedit logic a bit
2024-02-26 19:12:50 +00:00
Max Fedotov 45738beb88
GTK: make OSD scalable (#769)
* gtk: make OSD scalable

* Scale save slot indicator (oops), make text outlines look smoother, use
larger font when not scaling

* Save and load HUD layout, prefer raster font on low resolution, select
vector font size close to raster one, make OSDCLASS::scale floating point

* Build fix

* Add reset HUD layout action, only require fontconfig if libagg is found.

* Try another font in case we could not locate monospace

* Detect screen bytes per pixel instead of hardcoding it, define
AGG2D_USE_VECTORFONTS if fontconfig is found.

* Different pixel formats are handled by different draw target
implementations
2024-02-14 08:20:57 +00:00
zeromus 6508c2b115 placate -Werror=format-security (probably) (re: #768) 2024-02-01 04:26:38 -05:00
Max Fedotov f2cfd23ef2
gtk: implement GPU scale factor feature (#764)
* [WIP] gtk: implement GPU scale factor feature

* Replace combobox with spin button, fix taking screenshot

* Fix distorted image, add some checks for scale factor value

* Make OSD at least properly visible
2024-01-25 14:28:46 +00:00
rogerman b06537cf51 Cocoa Port: Fix building on Cocoa port related to new files being added in commit 8be30fe.
- Note that this commit ONLY fixes building, but DOES NOT actually add barcode reader support to the Cocoa port just yet.
2023-10-10 13:45:07 -07:00
zeromus 0b027d8cc0
Merge pull request #735 from windwakr/hcv1000-fixes
Slot2: Sega Card Reader fixes
2023-10-07 11:04:03 -05:00
windwakr 8be30fe971 Slot2: Sega Card Reader fixes 2023-10-07 00:35:48 -04:00
zeromus f3dee5d7ac
Merge pull request #733 from windwakr/hcv1000
Slot2: Add Sega Card Reader(HCV-1000)
2023-10-04 20:04:39 -04:00
windwakr 0a34ef8e0b Slot2: Add Sega Card Reader(HCV-1000) 2023-10-04 17:05:01 -04:00
Roger Manuel 7a3b748d77
Fix erroneous copyright date in slot1_retail_auto.cpp (related to commit 8fefb4f) 2023-10-04 09:45:02 -07:00
zeromus 25cbcd255e fix buffer overflow (by one value only) in spu that happened basically 100% of the time a sample ended. whether it corrupted the heap or not is a matter of luck. should fix #717 2023-09-03 06:00:41 -04:00
zeromus 3955480674
Merge pull request #720 from mjunix/master-1
Fix potential index out of bounds
2023-08-05 15:46:28 -07:00
Johan Mattsson ca799e60b7
Fix potential index out of bounds 2023-08-06 00:35:40 +02:00
Johan Mattsson 357ff8a2c5
Fix potential index out of bounds 2023-08-06 00:20:22 +02:00
rogerman 402e9f0a31 Cocoa Port: Add two new Cheat Manager actions, "Enable All Cheats" and "Disable All Cheats", which do exactly as their descriptions would suggest. 2023-08-02 13:50:41 -07:00
rogerman 41e3401765 Cocoa Port: In the Cheat Database Viewer, add the option to ignore any game compatibility checks when adding new cheats.
- At their own risk, this option allows the user to add any cheat from the database to any game that they want, regardless of any potential dangers that may arise from doing so. Use this option responsibly.
2023-08-02 13:23:18 -07:00
rogerman 751ab0255b Cocoa Port: The Cheat Database Viewer now displays the current game's serial and CRC to help users verify the existence of a game in the database file. 2023-08-02 10:53:58 -07:00
rogerman 6c5941689f Cocoa Port: In the Cheat Manager, the "Remove All Cheats" button has been moved into an Actions pop-up menu.
- This change is to help avoid misclicks on the button that may instantly wipe out the user's cheat list.
- The new Actions pop-up menu also exists to incorporate some new cheat list operations that will be coming very soon.
2023-08-02 10:51:00 -07:00
rogerman 35976edb5f Cocoa Port: Conversions between Internal cheats and Action Replay cheats now respect the value length. 2023-08-01 15:18:44 -07:00
rogerman 586c7ee199 Cocoa Port: In the cheat database viewer, make the current game entry's font slightly larger to further differentiate it from the other games. 2023-08-01 10:03:48 -07:00
rogerman e3167110b2 Cocoa Port: Completely redesign the cheat database viewing system with a whole slew of new features!
- Multiple cheat database files may now be opened simultaneously, each in their own individual windows.
- Cheat database files are now fully browsable.
- Game entries are now searchable by game title, serial, and CRC.
- Cheat entries are now viewed in a hierarchical layout, better representing the FAT format of the database entries.
- All cheats within a directory can now be selected or deselected in just a single click.
- Error handling is now more robust, informative, and nicer looking.
- Cheat database files are no longer assigned in DeSmuME Preferences; they are now opened through the "File > Open Cheat Database File" menu.
- Recent cheat database files are now saved, and can be quickly accessed through the "File > Open Recent Cheat Database File" menu.
- It is now possible to remove all cheats at once from the Cheat Manager's cheat list.
2023-08-01 01:41:15 -07:00
rogerman 4e6a7f0424 Cheat System: Fix a couple bugs with CheatDBFile::LoadGameList() when reading the entire database's game list.
- Fix a bug where loading all database game entries from an encrypted database would result in reading gobbledygook.
- Fix a bug where calling CheatDBFile::LoadGameList() for all database game entries would always return 0 entries rather than the actual number of found entries.
2023-07-24 13:46:05 -07:00
rogerman 9bf090b309 Cheat System: Fix a bug where the underlying cheat data would get deallocated earlier than intended. (Regression from commit 0c90e8f.)
- In CheatDBGame, also differentiate between actual entry size vs. working entry size.
2023-07-19 12:22:06 -07:00
rogerman d08a5dc56c Cocoa Port: Update build optimization profiles in Xcode project. 2023-07-18 16:43:15 -07:00
rogerman 6ee942ca5f types.h: Remove an extraneous file inclusion. 2023-07-18 12:10:55 -07:00
rogerman 0c90e8f4e3 Cheat System: Rearchitect the system for loading cheat database files in preparation for adding new features to the database file presentation. Also do a bunch of code cleanup and fix multiple bugs.
- The file description is no longer limited to 16 characters.
- Folder notes are now included in the description strings of exported cheat items. These can be important for cheats that include operating instructions in their associated folder notes.
- Fix a bug where reading the last game entry of the database file would fail.
- Fix a potential bug where reading a game entry from an encrypted database file would fail if the initial entry data resides very close to a 512-byte boundary.
- Fix a bug where deleting a CHEATSEXPORT object without calling CHEATSEXPORT.close() would result in its associated file remaining open.
- Fix a bug where deleting a CHEATSEXPORT object without calling CHEATSEXPORT.close() would result in CHEATSEXPORT.cheats leaking memory.
2023-07-18 11:13:42 -07:00
SimonAfek 50f02ae172
Fix broken macOS interface build (#679)
* Update macOS version in build_interface.yml
* Typo fixes in build_interface.yml
2023-07-12 08:49:01 +00:00
rogerman 0fc3306bfc Cocoa Port: Standardize all Internal cheat direct memory writes (clicking the 'Write Once' button) to write to NDS memory before NDS_exec() is called. 2023-07-08 20:28:01 -07:00
rogerman f240472f5e Cheat System: Standardize memory writes for all cheat types. Most notably, Internal cheats now reset the JIT in the same way as Action Replay cheats do. 2023-07-08 19:52:10 -07:00
rogerman 12347c7cd9 Cocoa Port: Continue refactoring the cheat system code, Part IV.
- Add the following C++ classes: ClientCheatSearcher, ClientCheatDatabase
- Remove the following Obj-C classes: CocoaDSCheatSearch, CocoaDSCheatSearchParams
- Remove duplicate GUI code from EmuControllerDelegate.mm and preferencesWindowDelegate.mm
- All basic functionality for managing game session cheat items, the cheat database list, and cheat search are now managed through CocoaDSCheatManager.
2023-07-07 19:31:26 -07:00
rogerman d00e6355da Cocoa Port: Continue refactoring the cheat system code.
- Add ClientCheatManager C++ class, further reducing dependence on Objective-C code.
2023-07-02 22:54:13 -07:00
rogerman 946f7df9bc Cocoa Port: Continue refactoring the cheat system code.
- Add new ClientCheatList C++ class, further reducing dependence on Objective-C code.
- Making any changes to the cheat list or to any cheat items no longer requires the acquisition of an R/W lock.
2023-06-30 20:04:19 -07:00
rogerman 4e7926eaa1 Windows Port: Fix compiling issue that prevented building. (Regression from commit 7fb5a58.) 2023-06-30 15:58:22 -07:00
rogerman 7fb5a5871b Cheat System: Minor code cleanup and robustness improvements. 2023-06-30 15:13:35 -07:00
zeromus f48aee928c fix bug from 9767f79346 that made the cheat search results list produce strange cheats without 0x02xxxxxx prefix that don't work 2023-06-25 18:24:53 -04:00
rogerman ba83b68b7f Cocoa Port: Begin work on cleaning up and refactoring the cheat system. Also add some quality-of-life improvements to the GUI while I'm at it.
- Add new ClientCheatItem C++ class to handle cheat items, greatly reducing dependence on Objective-C code.
- Remove a bunch of methods from CocoaDSCheatItem and CocoaDSCheatManager that were never used and are no longer planned to ever be used in the new code refactor.
- The Cheat Manager window may now be resized.
- The Action Replay code editor now uses Monaco 13 font instead of the system default font.
- The command for "Enable/Disable Cheats" has been renamed to "Enable/Disable Cheat System" to help clarify that the command affects the entire cheat system as a whole, as opposed to enabling/disabling individual cheat items.
2023-06-23 14:18:02 -07:00
rogerman aeefd86f57 Cocoa Port: In the cheat system code, remove Obj-C dot syntax for object properties to avoid ambiguity with features from other languages. 2023-06-21 14:53:49 -07:00
rogerman b468aee01a Linux GTK Port: Fix compiling issues that prevented building. (Regression from commit aa21454.) 2023-06-20 17:12:53 -07:00
rogerman aa21454373 Cheat System: Do some code cleanup and silence all of the compiler warnings (on Windows and Cocoa ports only).
- Some minor API changes were made, but only Windows and Cocoa were actually tested. Tried to make sure that Linux ports were updated to the new API, but haven't tested it.
2023-06-20 16:44:30 -07:00
rogerman cedc1c9f38 Cocoa Port: Add option for Catmull-Rom sound interpolation in the GUI. Also update tooltips for all interpolation methods to better reflect how they compare to one another. 2023-06-20 14:06:04 -07:00
rogerman 8bba9dc955 Cocoa Port: Due to commit fac70ce fixing FBO issues with older GPUs, OpenGL rendering is now returning to PowerPC Macs. This change effectively reverts commit 4708404. 2023-06-19 18:44:14 -07:00
rogerman 5c805b2de0 Cocoa Port: Fix some compiler warnings. 2023-06-14 13:57:30 -07:00
zeromus 7c2f281d25
Merge pull request #674 from oheikk/fix-audio-volume-resetting
Fix audio volume resetting on posix/gtk
2023-06-08 16:46:43 -04:00
Oskari Heikkinen 941c2e39be Fix audio volume resetting on posix/gtk 2023-06-08 22:47:26 +03:00
zeromus 1bde1c28ac fix non-windows compilation, maybe. could be bugged, didnt test 2023-05-28 14:31:50 -04:00
zeromus 3511e14ac6 winport: path settings support unicode now (fixes #669). old ini files may malfunction since they're now expected to be written with unicode. old ones can't be effectively upgraded (consequence of using obsolete ini file apis). 2023-05-28 14:22:09 -04:00
SimonAfek 3cefa5d78e
Update deprecated GitHub actions v2 (#666)
* Windows CI: Update deprecated github actions

* build_interface.yml: Update actions

* release_tarball.yml: Update checkout action

* build.yml: Update actions
2023-05-20 16:33:23 +01:00
SimonAfek fadd3b6e63 Windows CI: Update deprecated github actions 2023-05-10 13:56:54 +01:00
rogerman bf344e9a3e SoftRasterizer: Perform all calculations using fixed-point math instead of float-based math.
- CommonSettings.GFX3D_TXTHack has been repurposed to switch between fixed-point math and float-based math.
- Fix various rendering bugs that were caused by a loss of Z precision introduced in commit 7751b59.
- In Pokemon Diamond/Pearl, the bug that caused random black dots to appear on the ground has been fixed.
2023-05-04 12:36:49 -07:00
zeromus 1dbbeba3a7 add another mic sample 2023-04-24 15:21:45 -04:00
zeromus 65ec088918 add mic samples. we're gonna start distributing these eventually. 2023-04-23 16:18:51 -04:00
zeromus 6b7559c71b fix alignment of tempMultiplyMatrix and currentMatrix[4] in GeometryEngineLegacySave. Fixes #657. It would be better to fix this perhaps by making NDSMatrix a type that has the alignas(16) put on it while inheriting from std::array<u32,16> perhaps, so this mistake is not possible? 2023-04-21 15:18:32 -04:00
zeromus c97ba8fb16 fix spurious RRX variant selection in several disassembly macros (fixes #652 maybe) 2023-04-10 11:43:46 -04:00
rogerman ab17945377 GFX3D: Obsolete and remove the VERT struct, since OpenGL, and SoftRasterizer are now both receiving their vertex data in fixed-point.
- Also remove the unused NDSVertexf struct. There shall be only one representation of the NDS vertex data, and that shall be the fixed-point values of NDSVertex.
2023-03-06 22:19:09 -08:00
rogerman 952585eaae SoftRasterizer: Read in vertex data data as fixed-point instead of as floating-point. 2023-03-06 21:39:57 -08:00
rogerman be88a0b4c3 Remove superfluous x/y/z names from Vector2s16, Vector2s32, Vector2s64, and Vector2f32 union data types, since it is extremely unlikely that these extra names will ever be used. Just use names "x" and "y", which are the most likely to be used for these kinds of 2-element vectors. 2023-03-06 21:27:47 -08:00
rogerman 4e1ce23982 SoftRasterizer: Do some minor refactoring and code cleanup, and also prepare SoftRasterizer to accept fixed-point vertex data. 2023-03-06 14:35:47 -08:00
rogerman 56251cafd1 GFX3D: Clean up the big-endian compatibility code. 2023-03-03 13:58:37 -08:00
rogerman 111292ff15 GFX3D / SoftRasterizer: Small refactor to use some of the new data types introduced in commit cda8cb5.
- Also make SoftRasterizer's framebuffer out-of-bounds width check more robust.
2023-03-03 13:02:04 -08:00
rogerman 90c8411cbf GFX3D: Fix clear color on big-endian systems. (Regression from commit 97848fc.) 2023-02-28 01:34:27 -08:00
rofl0r dcd1072800 CI: limit autoconf build to 8 processes
hopefully will prevent the OOM killer from kicking in.
2023-02-28 03:07:43 +00:00
rogerman 1daebcd670 Silence some compiler warnings. 2023-02-27 16:36:08 -08:00
rogerman cda8cb5686 Core: Move low-level vector, vertex coordinate, and color data type declarations into types.h so that they can be used universally. Also update the data type names to be more descriptive and have better consistency.
- Add SIMD-float32 data types, and also add macros to track SIMD data-type availability.
- Also fix some bugs where 3D would fail to render on big-endian systems. (Regression from commit a67e040.)
2023-02-27 15:39:17 -08:00
rogerman d9be9c6bf6 Cocoa Port: Silence some compiler warnings. 2023-02-25 12:11:22 -08:00
rogerman a7bdd1e3a9 GFX3D: Remove the mistaken addition of color clamping when converting fixed-point vertex colors into floating-point. Fixes the proper coloring of Princess Peach in the opening sequence of Super Mario 64 DS. (Regression from commit 7751b59.) 2023-02-24 16:01:14 -08:00
rogerman fac70ce98b OpenGL Renderer: Use the fixed-point vertex list data instead of the floating-point based one, alongside other tune-ups.
- To determine polygon facing, use GFX3D's CPoly.isPolyBackFacing instead of using GLSL's gl_FrontFacing. This eases OpenGL version requirements and improves older GPU compatibility a little.
- Also fix a bug where GPUs that support FBOs, but not shaders, were unable to read out their framebuffers properly.
2023-02-24 13:49:07 -08:00
rogerman 37683a708e GFX3D: Y-sorting and writing out vertices to a save state are now handled using fixed-point instead of floating-point, where appropriate. 2023-02-23 13:12:13 -08:00
rogerman 7751b59882 GFX3D: Polygon clipping, viewport transformation, perspective correction, and face calculations are now done in fixed-point instead of floating point. 2023-02-22 22:07:37 -08:00
rogerman e1969c470b GFX3D: Vertex post-processing has been moved from the 3D renderers to GFX3D.
- Specifically, viewport transformation, face calculation, and face culling are now handled in GFX3D, and are now standard behaviors for all 3D renderers. This reorganization makes more sense since the 3D renderers are primarily responsible for rasterization and framebuffer post-processing, rather than for processing geometry.
- As a positive side-effect, the OpenGL renderer gains a small performance improvement as well as better accuracy in face culling.
2023-02-19 20:23:44 -08:00
rogerman 5457932d75 OpenGL Renderer: Fix bug where the Depth L-Equal Polygon Facing option would fail to become enabled when running OpenGL 3.2 or later. (Regression from commit ab38d17. Note that this bug does affect the 0.9.13 release build.) 2023-02-18 16:31:38 -08:00
rogerman cf75e26353 OpenGL Renderer: Silence compiler warnings. 2023-02-18 16:21:44 -08:00
rogerman 97848fce8c GFX3D: Move some last bits of static data floating around in gfx3d.cpp into the GFX3D struct, and then make the instantiation of the struct itself static. 2023-02-18 13:37:17 -08:00
rogerman 92d662cb71 GFX3D: Fix longstanding potential overflows related to polygon lists by reducing POLYLIST_SIZE from 20000 to 16383.
- Historically (ever since commit b1e4934 and commit d5bb6fd), VERTLIST_SIZE (based on POLYLIST_SIZE) could reference an index over 66535, but POLY.vertIndexes has always been an unsigned 16-bit value with a max value of 66535, making for a potential overflow. In practice, an overflow has never happened in the past 15 years because a hardware NDS has a limit of 6144 polygons (or 24576 vertices), and that even a VERTLIST_SIZE of 80000 is way more than plenty to accommodate that. Rather than increasing POLY.vertIndexes to 32-bit, it makes more sense to reduce POLYLIST_SIZE to 16383 to keep VERTLIST_SIZE below 66536. Even with this change, POLYLIST_SIZE and VERTLIST_SIZE should be more than plenty in practice.
- Also, now that we're performing polygon clipping for all client 3D renderers (ever since commit e06d11f), we're finally accounting for the fact that the clipped polygon list size is larger than POLYLIST_SIZE. Client 3D renderers have been updated to now reflect this change and avoid theoretical overflow issues that have never actually happened in practice.
2023-02-18 10:54:02 -08:00
rogerman 86b990f68a GFX3D: The shininess table is no longer a part of SWAP_BUFFERS.
- Since the shininess table is only ever used for vertex generation, it makes no sense for the table to included for the rasterization step. The shininess table has been moved to the NDSGeometryEngine class, which is a class dedicated to just vertex and polygon generation. This reorganization seems more sensible.
2023-02-17 18:32:42 -08:00
rogerman 4a95e9b8d1 GFX3D: Reorder members of the GeometryEngineLegacySave struct to better reflect the actual order of data in the existing save state format.
- Also rename some matrix-related members for better clarity.
2023-02-17 14:01:24 -08:00
rogerman d0d23cce7e GFX3D: Attempt to fix an MSVC compiling issue. (Related to commit 5d6e866.) 2023-02-17 12:00:27 -08:00
rogerman 5d6e8663c4 GFX3D: Finish refactoring geometry engine related stuff into the new NDSGeometryEngine class.
- Also, the vector test has been changed so that the result vector accounts for the 4 sign bits and proper sign expansion on overflow.
2023-02-16 21:58:28 -08:00
rogerman db365e849f GFX3D: Clean up some lighting-related code. 2023-02-16 02:59:05 -08:00
rogerman 79aa5b558e GFX3D: Continue encapsulating stuff into the new NDSGeometryEngine class, mostly focusing on matrix-related things.
- There are two significant behavior changes in this commit that will require further testing.
- Behavior change: Before, MTX_LOAD_4x4 and MTX_LOAD_4x3 commands would update the individual values in the current matrix for each command. Now, these commands will batch the values into a temporary matrix until the temp matrix is complete, and then copy the temp matrix into the current matrix. This now matches the batching behavior that the other matrix commands already do.
- Behavior change: Before, there was a single shared temporary multiplication matrix used to batch the values of incoming MTX_MULT_4x4, MTX_MULT_4x3, and MTX_MULT_3x3 commands, theoretically allowing these commands to be used interchangeably and overwrite values from previous commands until the last command made a completed multiplier matrix. Now, there are 3 separate temporary multiplier matrices, one for each of the MTX_MULT_* commands, which means that each command type must now complete its own multiplier matrix before it can perform a matrix multiply.
2023-02-15 19:59:59 -08:00
rogerman 669f1b05f5 GFX3D: Begin encapsulating stuff into the new NDSGeometryEngine() class.
- Also do some minor misc. code cleanup.
2023-02-15 00:52:23 -08:00
rogerman d03e4a6886 Cocoa Port: In the OpenGL blitter, prevent FBO-related GL calls if FBOs are not available.
- Also silence some compiler warnings.
2023-02-14 23:30:22 -08:00
zeromus d0ed57d1b3 fixed: EMUFILE_FILE eof() on textmode failed on windows (caused .dct files from mac systems freeze process while loading) 2023-02-11 15:59:40 -05:00
rogerman 5831099ebc GFX3D: The Box Test is now performed with integer operations instead of with floating point.
- The integer-based Box Test should be just as good as the old float-based one, as tested by "American Girl: Julie Finds a Way". Of course, there are still bugs compared to a hardware NDS, but we haven't transitioned to rendering with integer-based vertices yet to make a meaningful test possible.
2023-02-10 19:01:16 -08:00
rogerman 624f649acb Oops! Forgot a file. (Related to commit a67e040.) 2023-02-10 18:38:21 -08:00
rogerman a67e040a57 GFX3D: Do some major code cleanup.
- Rename a bunch of variables to better reflect their intended usage.
- Add new data types for organizing 3D vectors and coordinates.
- C functions that are called in response to 3D commands now follow the exact same pattern: “static void gfx3d_glFuncName(const u32 param)”
- Be super explicit about the usage of numeric data types and their typecasts to improve their code visibility.
- Remove implementation-specific ambiguity of right bit-shifting signed numerics (Logical-Shift-Right vs Arithmetic-Shift-Right) in the following functions: gfx3d_glLightDirection_cache(), gfx3d_glNormal(), gfx3d_glTexCoord(), gfx3d_glVertex16b(), gfx3d_glVertex10b(), gfx3d_glVertex3_cord(), gfx3d_glVertex_rel(), gfx3d_glVecTest().
2023-02-10 18:25:21 -08:00
rogerman 242cb63327 GFX3D: Remove POLY struct members that don't need to be swapped. This results in less buffer copying for all POLY lists.
- Also remove Viewer3D_State.indexList. This member is obsolete since Viewer3D_State.gList.clippedPolyList is generated in the same order described by indexList.
- Encapsulate and rename some more lists to make their intended purpose more descriptive.
2023-02-09 00:27:45 -08:00
zeromus 23400431a1
Merge pull request #632 from hjung4/fix/strchr-oob-check
Fix out-of-bounds index access
2023-02-08 12:25:41 -06:00
Henry Jung 0e538b0931 fix: strchr check 2023-02-08 07:54:08 -05:00
rogerman d8ee3480df GFX3D: Clipping functions now take VERT parameters as non-nullable references instead of as nullable pointers where appropriate.
- GFX3D_ClipPoint() (formerly named clipPoint()) now writes directly to the target VERT rather than copying a return value back to the target.
2023-02-06 23:20:46 -08:00
rogerman 9554595948 GFX3D: Various minor tweaks and optimizations, plus code cleanup.
- Most importantly, refactor the GFX3D_Clipper::ClipPoly() method into the standalone GFX3D_GenerateClippedPoly() function, which drops all class member dependencies and is much more straightforward to use.
- Remove the GFX3D_Clipper class. It has been slowly gutted over the years, but the loss of the ClipPoly() method makes the class obsolete, putting the final nail in its coffin.
- Using the new GFX3D_GenerateClippedPoly() function, gfx3d_PerformClipping() operates on the unsorted clipped polygon list directly. This means that the polygon clipping step requires one less buffer copy.
- Clipped polygons no longer retain direct pointers to POLY structs, instead using their index member to reference a POLY struct at a POLY array location. All 3D renderers have been updated to reflect this change.
- Rename a bunch of variables that reference POLY, CPoly, and VERT structs to clearly differentiate them between raw NDS data and our own internally processed data.
- Fix a potential bug in GFX3D_GenerateRenderLists() where sorting clipped polygons would reorder their polygon indices without reordering their other data members along with the indices, causing the data members to desync. OpenGL rendering was immune to this bug, but SoftRasterizer might have possibly seen it. In any case, this fix is the correct behavior.
2023-02-06 17:50:42 -08:00
rogerman 628eb6596a Cocoa Port: Fix some random compiling issues. 2023-02-04 19:33:35 -08:00
rogerman cbbacdbf59 GFX3D: The POLY and VERT structs have been converted to POD-style structs for better data consistency. 2023-02-02 02:19:49 -08:00
rogerman 9273c9ab13 GFX3D: Encapsulate some data into the GFX3D struct, and also do some minor code cleanup. 2023-02-01 16:54:04 -08:00
rogerman a3e84e28c2 Save States: Oops! Fix a bug where 3D vertices were getting double-loaded, causing save state file reads to desync. Fixes #629. (Regression from commit 5426509e.)
- Problems only occurred when LOADING a save state. However, SAVING a save state on commit 5426509e should be okay, so such save states should not be broken.
2023-02-01 15:17:20 -08:00
zeromus 5bcfd2f022
Merge pull request #628 from radioactiveman/master
Fix a few compiler warnings
2023-01-30 16:53:26 -06:00
Thomas Lange ef3f285f95
Fix a few compiler warnings
warning: use of bitwise '&' with boolean operands [-Wbitwise-instead-of-logical]

Reported by clang 15.
2023-01-30 23:40:50 +01:00
rogerman c9a4d9c4b8 SoftRasterizer: Fix compiling issue for non-SSE2 systems. (Regression from commit 5426509e.) 2023-01-25 19:09:21 -08:00
rogerman 5426509ede GFX3D: Render states and geometry lists are now copied/swapped more consistently on flush. (Related to commit 8438a5a6.)
- Viewports are now processed on VIEWPORT register write instead of being processed at render time.
- CLEAR_DEPTH, CLRIMAGE_OFFSET, EDGE_COLOR, FOG_TABLE, and TOON_TABLE register writes are now handled more consistently.
- The fogDensityTable check for force-drawing clear images in gfx3d_VBlankEndSignal() has been removed. Changes done in commit 8438a5a6 will always causes this check to fail, and this commit will always cause this check to fail. Therefore, this check is now obsolete.
- Change a bunch of GFX3D-related structs from C++ style constructed structs into C-style POD structs.
2023-01-25 18:52:45 -08:00
zeromus be287de623
Merge pull request #627 from RainingChain/fwSettingsMacAddress
Add mac address setting
2023-01-21 16:59:18 -06:00
Raining Chain 9d2ddfa648 Add mac address setting 2023-01-21 17:32:05 -05:00
rogerman f0b0afe18b Colorspace Handler: FragmentColor may now be accessed through a 4-element array, in which elements 0-1-2-3 represent color components R-G-B-A, respectively. 2023-01-19 14:24:35 -08:00
rogerman 2b66e756da Add support for page-aligned variables/arrays.
- Better account for UltraSPARC's unique memory page size.
- malloc_alignedCacheLine() no longer returns 16-byte aligned memory if the architecture is neither 32-bit or 64-bit. Now, the function only returns 64-byte alignment for 64-bit architectures OR 32-byte alignment for 32-bit architectures.
2023-01-19 14:18:58 -08:00
zeromus 8438a5a647 crude hack to fix problem where loadstate could crash if the GPU hasn't ever booted up. see TODO TODO TODO TODO in gfx3d.cpp -- somebody needs to revise the tables so they arent memory mapped but so that they work rather like shininess tables. if they aren't truly latched when the gpu is flushed, then put them in a table anyway and simply reference the live values instead of the latched ones. How to keep from accidentally referencing the latched ones? perhaps the 3d state could be divided into a latched part and an unlatched part via base classes. Could also be done by embedding a "latched" and "unlatched" struct in the gpu but that would involve touching every line of code that used something from it. 2023-01-17 23:32:47 -06:00
zeromus 29c077c165 winport - fix issues with save/load state to japanese filename (fixes #615) 2022-12-05 15:54:38 -05:00
zeromus 91efef9346
Merge pull request #602 from KellanClark/master
Fix division edge cases and prevent crash
2022-10-23 21:07:41 -04:00
Kellan Clark b5b7f29255 Fix division edge cases and prevent crash 2022-10-23 20:22:21 -04:00
rogerman 739f3162d5 Cocoa Port: Fix HUD rendering on the OpenGL blitter for GPUs that don't support shaders. 2022-09-15 15:42:12 -07:00
rogerman 698139ed8e saves.cpp: Fix compiling issue for all non-Windows platforms. (Regression from commit 3a6c8cf9.) 2022-08-04 21:26:55 -07:00
zeromus 3a6c8cf9f8
Merge pull request #523 from Keppl/backup_saves_max_patch
Limit maximum number of backups files for load state backup
2022-08-04 17:33:43 -04:00
zeromus 3614b45a6c
Merge pull request #575 from janisozaur/update-default-joystick-size
Update default joystick cofiguration size in line with #567
2022-08-04 17:32:25 -04:00
Michał Janiszewski 83396a88c0 Update default joystick cofiguration size in line with #567 2022-08-04 20:52:15 +02:00
zeromus 35d7561fd7 make hud editor actually save position (fixes #572) 2022-07-30 16:47:43 -04:00
rogerman 5ab59eac86 FIFO.cpp: Code cleanup; remove AltiVec-specific code from display FIFO, as it is no longer needed.
- The new code works by pre-swapping big-endian words on disp_fifo.buf write, rather than swapping the big-endian words during disp_fifo.buf read.
- There is a behavior change here. Before, 8-bit and 16-bit writes to disp_fifo.buf would increment disp_fifo.tail. Now, 8-bit and 16-bit writes only increment disp_fifo.tail when the most significant bit within the FIFO value's 32-bit boundary is written to.
- Behavior is unchanged when doing 32-bit writes. In practice, the rare games that use display FIFO have only ever done 32-bit writes, so this scenario is well tested.
2022-07-21 15:31:40 -07:00
zeromus f8a7723e86
Merge pull request #569 from janisozaur/patch-3
Remove self-reference in variable declaration
2022-07-21 15:30:04 -04:00
Michał Janiszewski f07cd5bae2
Remove self-reference in variable declaration 2022-07-21 12:57:49 +02:00
rofl0r b7dadd1797 CI: also upload linux cli/gtk2 build artifact 2022-07-20 21:09:45 +01:00
rofl0r 2664b03d93 CI: add build job for linux/GTK2 2022-07-20 21:09:45 +01:00
rofl0r b27b31c57d posix: properly fix size mismatch of keyboard/joystick_cfg arrays
fixes #563

unlike #566, this also fixes the gtk2 frontend automatically.
2022-07-20 21:09:11 +01:00
zeromus 22fd8b231d
Merge pull request #566 from janisozaur/patch-1
Fix #563: mismatched buffer sizes for memcpy
2022-07-20 12:04:19 -04:00
zeromus 16e7c126e2
Merge pull request #564 from janisozaur/fix-use-of-internal-buffer
Fix use of internal storage of temporary buffer
2022-07-20 12:03:52 -04:00
Michał Janiszewski a84a48dc75 Fix #563: mismatched buffer sizes for memcpy 2022-07-20 14:53:55 +02:00
Michał Janiszewski d107562a16 Fix use of internal storage of temporary buffer
The entry index gets converted to a (temporary) string, from which a
pointer to internal data is taken and only consumed outside the loop,
where parent variable no longer exists.
2022-07-19 13:43:53 +02:00
rofl0r 677c6bb907 gtk3/gtk2: fix mismatched types for keyboard config temp storage
fallout from c68cc14, closes #558
2022-06-28 22:16:13 +00:00
rogerman 146a6ac655 Preemptively fix a compiling issue for AltiVec systems when using GCC without running keyword-and-predefine mode. 2022-06-27 12:10:56 -07:00
rogerman 640a1fdd93 Fix yet another compiling issue on GCC for AArch64. Fixes #556. 2022-06-25 15:01:21 -07:00
rogerman d4afd4977c libretro-common: Compiling tune-up for ARM architectures.
- Fixes a mismatched register warning in arm_enable_runfast_mode() when compiling for AArch64.
- Fix compiling check_arm_cpu_feature() on non-ARM architectures by being super explicit and pedantic about checking for __ARM_ARCH; none of this compiler-assumes-a-macro-equals-zero-if-undefined stuff.
2022-06-20 11:22:26 -07:00
rogerman a95e4c57c6 Remove AltiVec compiling for ppcle and ppc64le architectures, since our AltiVec code only works on big-endian systems anyways. Fixes #550. 2022-06-19 20:36:50 -07:00
rogerman 24eb5ed95c Fix compiling on GCC for AArch64. Fixes #548. 2022-06-18 21:56:25 -07:00
zeromus a3499803ac
Merge pull request #532 from Aikku93/patch-3
Check `gameCode==####` for homebrew
2022-06-17 14:28:27 -04:00
zeromus 1ccbf52246
Merge pull request #546 from Aikku93/spu-enhanced-interpolation
Enhanced interpolation, and fixed-point sample positions
2022-06-16 15:16:25 -04:00
Aikku93 09f7ab13c7 fix overflow problems
Catmull-Rom can give outputs greater than 16bit, so we must use 15bit precision. Also, ensure to use floor() to force a round-down regardless of host rounding behaviour.
2022-06-13 16:44:24 +10:00
Aikku93 aa25e1dd54 tighter bounds on interpolation accuracy 2022-06-13 15:14:54 +10:00
Aikku93 589084ec74 Split 64bit counters into 2x32bit
This appears to generate slightly saner code
2022-06-13 14:28:44 +10:00
Aikku93 41edf7be5e fix broken adpcm 2022-06-12 20:10:26 +10:00
Aikku93 235d9efea7 attempt to fix for macos 2022-06-12 19:33:09 +10:00
Aikku93 b2c4d449ca fix PSG square wave
Was reading the wrong part of GBATek
2022-06-12 19:03:48 +10:00
Aikku93 6215418dc7 sampcnt/sampinc as .32fxp, add catmull-spline interpolation 2022-06-12 18:36:37 +10:00
zeromus 48f5a8289d attempt to fix some problems caused by users running desmume out of directories with non-english characters (could manifest as "could not get read/write access to the battery save file") 2022-06-04 20:35:53 -04:00
Lino5000 b2ad722473 CLI: Re-work KEYDOWN handling to allow both shift keys as control inputs
Right Shift is the default for Select key.
2022-05-31 11:37:54 +00:00
Lino5000 c68cc14f16 Fix Linux CLI keyboard input bug due to mismatched types 2022-05-31 11:37:48 +00:00
rogerman ba05516b7d Cocoa Port: When dealing with file paths, replace instances of [NSString cStringUsingEncoding:NSUTF8StringEncoding] with [NSString fileSystemRepresentation] and [NSFileManager stringWithFileSystemRepresentation:].
- This commit doesn't actually do anything, but it is the "proper" way for Apple OSes to deal with file paths that interact with lower-level C file functions.
2022-05-30 13:25:20 -07:00
zeromus 416b08d6f7
Merge pull request #537 from colton5007/patch-1
Fixed GBA SRAMPath in posix CLI
2022-05-29 02:45:25 -04:00
colton5007 bc85e0b165 Fixed GBA SRAMPath in posix CLI 2022-05-29 01:04:42 -05:00
rogerman b82c3d7bce GFX3D: The box test now partially works in fixed-point.
- Specifically, the vertex calculations are performed using fixed-point. However, clipping still occurs using floating-point.
2022-05-24 12:02:27 -07:00
rogerman 3632142547 JIT (ARM): Make the code a little more portable, and also silence a couple compiler warnings. 2022-05-23 16:08:06 -07:00
rogerman 356fe47df7 GFX3D: GEM_TransformVertex() now uses the SIMD-optimized generic matrix functions instead of using its own scalar-only version.
- This change results in a small, yet measurable, performance improvement.
- Note that this change has the side-effect of enabling saturation logic for the following functions: MatrixMultVec3x3(), MatrixTranslate(), MatrixScale(). This is a change in their behavior, since these functions did not perform saturation logic before. This will need additional testing.
2022-05-23 15:53:05 -07:00
rogerman d757d83b3d GFX3D: The position test and the vector test are now performed using fixed-point instead of floating-point. 2022-05-23 15:29:57 -07:00
rogerman 95b824b541 Cocoa Port: Update version number to support version bump from commit 60714f6d. 2022-05-23 15:19:55 -07:00
zeromus 60714f6d22 bump version to 0.9.14 for future interim builds. 2022-05-23 18:10:07 -04:00
zeromus d9479cd6d3 update make_scmrev.h.js for modern times by searching for 64bit git on 32bit msbuild/devenv 2022-05-23 18:03:42 -04:00
zeromus 75230bfe0a fix support link in help menu 2022-05-23 18:03:18 -04:00
Aikku93 aa2a5f2a34 check `gameCode==####` for homebrew 2022-05-23 18:35:25 +10:00
rogerman 08b6fade0b Documentation: Update all URLs to match.
- Also fix a bug in the Cocoa port with copying the troubleshooting info to the Clipboard.
2022-05-22 21:37:41 -07:00
zeromus b66ac3b1db update README 2022-05-23 00:20:22 -04:00
Roger Manuel bfb693ff75
Update Cocoa section of ChangeLog 2022-05-22 21:03:39 -07:00
rofl0r 00684566dd changelog: update linux notes 2022-05-22 23:28:03 +00:00
zeromus c48583675b take a stab at a core and windows changelog 2022-05-22 17:23:19 -04:00
zeromus 0193ba3b02 windows - bump version number to 0.9.13 2022-05-22 17:20:53 -04:00
zeromus 0140eceabd
Merge pull request #531 from Aikku93/patch-2
Decide `hasSecureArea` from `DecryptSecureArea()`
2022-05-22 15:09:35 -04:00
zeromus 8940b33c9c
Merge pull request #529 from Aikku93/patch-1
Allow scanDir() to operate when fatDir is empty
2022-05-22 15:09:00 -04:00
Aikku93 669783439f decide hasSecureArea from DecryptSecureArea()
This avoids some issues when loading homebrew that has CRC16 != 0.
2022-05-22 21:16:45 +10:00
Ruben f769f439dd
Allow scanDir() to operate when fatDir is empty
The only time we need fatDir to be not-empty is when we are using a custom FAT directory (ie. `slot1_R4_path_type/sameAsRom == false`). When we are using the ROM path (`slot1_R4_path_type/sameAsRom == true`), fatDir is not even used, and we should be able to load the FAT image.
2022-05-22 17:50:22 +10:00
zeromus 76357662be delete this old retroarch-provided arm-arm jit. nobody can build it. we have officially supported arm jits now, years newer vintage. use those instead. 2022-05-22 01:10:13 -04:00
rogerman 0346f7b946 Cocoa Port: Bump version number to 0.9.13. 2022-05-21 19:41:57 -07:00
zeromus 105a7f639d
Merge pull request #527 from rofl0r/release_action
CI: add action to create release tarball
2022-05-19 16:24:08 -04:00
rofl0r 8c26417d49 CI: fix tag naming scheme in release 2022-05-19 20:20:23 +00:00
rofl0r 204c58d81f CI: add action to create release tarball 2022-05-19 20:02:45 +00:00
rogerman 0c568fd6ac MMU: BGnX and BGnY registers written in 16-bit mode now write to the correct byte locations on big-endian systems.
- Fixes the Y-offset of drawn levels in Bubble Bobble Revolution classic mode on big-endian systems.
2022-05-19 00:19:30 -07:00
rogerman a5860aae8e GPU: Fix more rotation-scaling bugs on big-endian systems. 2022-05-18 18:12:23 -07:00
rogerman 92aab4834b matrix.h: Fix some non-working AltiVec functions. This fixes setting the 2D layer's clear color and also setting an all-white/all-black master brightness level for AltiVec systems. 2022-05-18 16:26:08 -07:00
rogerman c904706a6b Cocoa Port: If default.metallib is missing or corrupted in the app bundle, then fail running Metal video output and fall back to using OpenGL instead. 2022-05-18 12:44:00 -07:00
rogerman 183dd57136 GPU: Fix a long-standing bug with 2D rotation-scale rendering on big-endian systems. 2022-05-18 10:32:06 -07:00
rogerman 9f6ee8c55a Cocoa Port: Fix a rare crash with debug and profiling builds (but not release builds) where Metal display views running CPU-based pixel scalers can make the Metal debugger assert if the pixel scalers are switched very very quickly under low frame rate conditions (less than 30 FPS). 2022-05-17 04:10:27 -07:00
rogerman 1bbb065786 Firmware: Fix a data corruption bug with firmware.dfc that could occur with a rare and specific sequence of events. 2022-05-16 01:30:31 -07:00
rogerman 7cccf90976 Cocoa Port: Fix a crash that can occur when taking a display window full screen while running macOS El Capitan. (Regression from commit ebc39eae.) 2022-05-15 08:21:29 -07:00
rogerman 07aefbd02c Cocoa Port: Fix a possible crash when performing Copy-Framebuffer-To-Clipboard operations on Metal display views. 2022-05-13 18:17:13 -07:00
rogerman 9ed9c0a9e4 Cocoa Port: Use MTLPixelFormatBGRA8Unorm pixel format for all Metal display view pipeline descriptors in order to stop dev+ builds from assert crashing themselves under some very rare and specific situations. 2022-05-13 15:53:13 -07:00
rogerman b565073299 GPU: Fix a drawing bug with display capture when the GPU scaling factor is 4x while running on an SSE2 system without SSSE3. 2022-05-13 02:04:44 -07:00
rogerman cdc1b5bc6d Cocoa Port: Final updates to the Read Me for Macintosh.
- Replace all references to "OS X" with "macOS".
- Make the example bug report reflect a user running Monterey instead of Mojave.
- Simplify the notes regarding a Penryn-era Core 2 Duo as the minimum recommended processor. I forgot that release builds drop the CPU instruction set from SSE4.1 to SSSE3, and so a 2.4GHz Penryn with SSSE3 isn't that much faster than a 2.4GHz Santa Rosa.
2022-05-11 03:15:21 -07:00
rogerman 1fc64eb4fd Cocoa Port: Resort to a more traditional method of performing texture sampling for Metal display view output filters, since the "Metal way" can result in GPU incompatibilities. (Related to commit 56473033 and #476.) 2022-05-10 09:52:56 -07:00
rogerman 5647303305 Cocoa Port: Do a quick-and-dirty attempt at fixing an issue with some output filters when using Metal display views. (Related to #476.) 2022-05-10 04:10:24 -07:00
rogerman 0f6cbffe77 Cocoa Port: Fix a bug where repeatedly using save states in quick succession can cause intermittent failures with HUD rendering when using OpenGL display views. (Regression from commit 3c04e8f4.) 2022-05-09 23:54:28 -07:00
rogerman 6f8c085890 Cocoa Port: Take a shot in the dark at fixing a bug where the video output could intermittently persist after a ROM is unloaded. 2022-05-09 21:59:57 -07:00
rogerman 9a5596ce54 Cocoa Port: Add a quick Troubleshooting section in the Read Me for Macintosh. 2022-05-09 15:58:18 -07:00
rogerman 8fbced9c85 Cocoa Port: Rename the "Intel32 Intel64" build schemes from "Xcode 9" to "Xcode 8" to help reduce confusion in the build documentation and to make things more consistent. 2022-05-09 15:43:26 -07:00
rogerman 38634a7e5c Cocoa Port: Separate the 32-bit Intel and 64-bit Intel Release build targets, and also reenable PGO for all Release build targets. 2022-05-08 00:59:27 -07:00
rogerman d9c912d7fd Cocoa Port: Fix a bug where mipmapped HUD font rendering would fail on very small non-Retina displays. (Regression from commit 180df28c.)
- As a positive side-effect, this fix also allows mipmapped HUD font rendering to work on the OpenEmu plug-in, so that capability has now been enabled.
2022-05-08 00:12:20 -07:00
rogerman 25643e5f82 Cocoa Port: Fix a compiliing issue with Xcode 3. (Regression from commit ebc39eae.) 2022-05-08 00:05:04 -07:00
rogerman 4976f57b0c Cocoa Port: Update Read Me for Macintosh. 2022-05-07 16:35:49 -07:00
rogerman 069b26aa4c Cocoa Port (OpenEmu Plug-in): Remove a now defunct comment. 2022-05-07 13:51:06 -07:00
rogerman 75e9697c5d Cocoa Port: Update copyright year. 2022-05-07 12:10:45 -07:00
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
rogerman 2113af2994 Cocoa Port: Update the microphone level once every 4 frames instead of once every 8 frames. This makes the level indicator appear smoother. 2022-04-13 17:24:23 -07:00
rogerman 7c90bc592f Cocoa Port: Fix broken settings sheets for Input Preferences when running on pre-Mavericks macOS. (Regression from commit e9b3998f, also related to commit 8f20237c.) 2022-04-13 15:42:25 -07:00
rogerman 46a8c2385a Cocoa Port: Rename one more instance of "OS X Core Audio" to "macOS Core Audio". (Related to commit 62f78f2f.) 2022-04-13 11:42:40 -07:00
rogerman 8d1188f552 matrix.cpp: Add NEON versions of geometry engine math functions.
- Also do some minor bug fixes with some floating-point functions.
- Also remove __vec4_dotproduct_vec4_fixed_SSE4() since the function didn't work anyways, and since we now have __vec4_dotproduct_vec4_fixed_NEON() to use as an actual working reference.
2022-04-13 02:03:12 -07:00
rogerman b608a62cd0 matrix.cpp: Major cleanup and refactor. All previous functionality and behavior should be retained.
- This refactor was done to support future additions of SIMD functions using ISAs other than SSE / SSE4.1.
- Add support for fixed-point math functions using accumulators that saturate, following the GEM_TransformVertex() function. This feature requires new testing, and has been disabled for now in order to retain the previous behavior.
- Remove the obsolete and unused functions _MatrixMultVec4x4_NoSIMD() and vector_fix2float(). If non-SIMD testing is required, it should be easy enough to comment out the SIMD code paths in the appropriate function in favor of the plain C code path.
2022-04-12 17:33:20 -07:00
Keppl 631f2a265e Added check that index file was actually openned for writing.
If not, skip creating backup part of loading.
2022-04-12 19:07:06 -04:00
Keppl dec93fecfa Added configuration option to define number of max number of backups. Windows only at the moment. 2022-04-11 22:26:16 -04:00
Keppl 970663bf71 Fixed bug when writing index, set default max to 200 2022-04-11 17:59:17 -04:00
Keppl 53be5f6968 Changed loadstate_slot function to keep only 5 latest backups when saving curring state before loading.
Once more than 5 exist, oldest one will be overwritten.
2022-04-10 22:36:10 -04:00
rogerman 2e6b938378 Render3D / SoftRasterizer: Add some more NEON optimizations. 2022-04-08 03:43:07 -07:00
rogerman e8de3db99c Cocoa Port: If OpenGL is the Video Output Engine, then drop the revision number from the engine name in the troubleshooting forms.
- The only OpenGL version with a revision number is v1.2.1, but the Cocoa port will always use v2.0 or higher. So let's remove the revision number to make things look cleaner.
- Also change the tags "DESMUME RUNTIME INFORMATION" to "DESMUME TROUBLESHOOTING INFORMATION", which is more explanatory when the information is copy/pasted into whatever text field it appears in.
2022-04-08 01:27:08 -07:00
rogerman 1490a19ad1 Cocoa Port: Fix a GUI bug where adding or removing an input mapping in Input Preferences may occasionally cause its outline view to fail to update under certain OS/build combinations.
- I solved it by simply reloading the entire outline view instead of picking and choosing specific items to reload. Due to the relatively few amount of items in the outline view (less than 1000 items), reloading the entire outline view is still very fast, even on a PowerPC Mac.
2022-04-07 18:21:30 -07:00
rogerman ed52d0e093 Cocoa Port: dev+ builds from the "DeSmuME (Latest).xcodeproj" file no longer generate MainMenu.strings files.
- MainMenu.strings files can still be generated from builds from the "DeSmuME (XCode 3).xcodeproj" file, which does result in a cleaner file to begin with.
2022-04-07 17:15:00 -07:00
rogerman 62f78f2f24 Cocoa Port: Rename the "OS X Core Audio" audio output engine to "macOS Core Audio". 2022-04-07 17:02:47 -07:00
rogerman 4df869c309 Cocoa Port: Fix a potential crash on startup if Metal is not available. (Regression from commit 6833e315.)
- Also change one of Apple's Metal enums to an older version to fix a compiling issue with Xcode 8.
2022-04-07 16:28:50 -07:00
rogerman 6833e3159d Cocoa Port: Tune up the DeSmuME runtime information in the troubleshooting forms.
- Add line for the Video Output Engine. Backend type (OpenGL or Metal), version, and renderer information are all reported.
- Remove section breaking dashes, as this causes GitHub's comment parser to reformat the runtime info in unpredictable ways.
- To compensate for removing the section breaking dashes, add delimiters for the beginning and the ending of the runtime information.
- If the Active Cheat Count is 0, then just report "NO" for Cheats, as this is functionally equivalent, but less confusing to read.
2022-04-07 13:29:30 -07:00
rogerman 2efb260b44 GPU: Client fetch objects can now have names and descriptions. 2022-04-07 13:17:34 -07:00
rogerman 7c036c1d50 Cocoa Port: Fix bug where Apple Silicon dev+ builds didn't include "dev+" in their app name. 2022-04-07 00:08:03 -07:00
rogerman 31225d0ed1 texcache.cpp: Oops! This file accidentally got sent with the last commit before I could clean it up. All unused development/debugging code has now been removed.
- Here's what the notes should have said: Add SIMD optimized versions of texture unpacking functions. AVX2, NEON, and AltiVec are now supported.
2022-04-06 23:59:56 -07:00
rogerman 28f12cf088 Colorspace Handler: Further optimize NEON code.
- Commit 9ccc791 was, more or less, a straight port of the SSE2 code, making it less than ideal. This updated version uses more NEON-only instructions to further improve performance.
2022-04-06 23:51:29 -07:00
rogerman 27a32d6262 Sigh... partially revert commit e8328ed to make Linux builds happy. 2022-04-06 10:34:26 -07:00
rogerman 42c59d9257 Minor correction related to commit e8328eda.
- If this doesn't fix Linux builds (it probably won't), then I will partially revert commit e8328eda to make it work.
2022-04-06 10:16:49 -07:00
rogerman e8328eda33 GPU: Clean up some old header stuff now that the SIMD code has been factored out. 2022-04-05 23:15:51 -07:00
rogerman c5c9e2d3a7 Colorspace Handler: Pad out some small arrays so that they can be useful for SIMD vector loads. Up to 512-bit vector loads are supported.
- For practical reasons, we shouldn't need to pad out any arrays past 64 bytes any time soon.
2022-04-05 22:28:43 -07:00
rogerman b1d49d14ec matrix.h: Fix compiling on AltiVec-enabled systems. (Regression from commit 8a9fec43.) 2022-04-05 22:12:05 -07:00
rogerman 74cdfeea32 Colorspace Handler: Fix some bugs with NEON.
- These changes shouldn't change existing functionality, but are more to document what the code should actually be doing. Regardless, these changes are truly correct.
2022-04-03 15:34:15 -07:00
rogerman 9ccc791e32 Colorspace Handler: Add support for NEON-A64.
Signed-off-by: rogerman <rogerman@users.noreply.github.com>
2022-04-02 23:47:21 -07:00
rogerman 8a9fec431a matrix.h: stream_copy_fast() for AltiVec and NEON now mirror their associated buffer_copy_fast() functions, replacing memcpy().
- Since stream_copy_fast() and buffer_copy_fast() are intended for small finite-sized buffers only, we shouldn't need a full memcpy() call with these.
2022-04-02 23:43:46 -07:00
rogerman 7e85253ebb Core: Add preliminary support for ARM NEON-A64. The generic memset and buffer_copy functions are now supported.
- Note that NEON support is assuming the A64 instruction set. But if there is enough user demand for running the A32 instruction set, and if it is feasible to backport the NEON code to A32, then this may be explored at a later date. But for now, we are sticking with A64.
2022-04-02 21:33:14 -07:00
Roger Manuel 03be21608e
Update build.yml for macOS nightlies (regression from commit e9b3998f) 2022-04-02 17:36:25 -07:00
rogerman 1f377be17b Core: Do some minor header cleanup. 2022-04-02 17:28:02 -07:00
rogerman a9706059e0 Cocoa Port: Fix AltiVec vec_perm() related bugs if building for ppc64.
- Apparently, vec_perm() on ppc32 assumes that vec_perm() will always use vectors with 8-bit elements. However, ppc64 vec_perm() can use elements of different sizes, and so we need to typecast every single case of this so that the correct vec_perm() is called on ppc64.
2022-04-02 15:57:38 -07:00
rogerman a677ffd168 videofilter.cpp: Silence a compiler warning by initializing the entire SSurface struct instead of just a part of it. 2022-04-02 15:53:03 -07:00
rogerman 8f20237c04 Cocoa Port: Fixes the use of macOS GUI sheets in Lion and Mountain Lion. (Regression from commit e9b3998f.) 2022-04-02 15:40:23 -07:00
rogerman e9b3998fe8 Cocoa Port: Add new build targets for Apple Silicon, and also clean up Release Build targets.
- Apple Silicon builds target macOS 11.0 SDK, so almost all deprecation warning associated with this have also been fixed. (The remaining deprecation warnings in preferencesWindowDelegate.mm still need to be fixed in some other way.)
- Intel 64-bit developer builds now require macOS 10.12 SDK (Xcode 8 or later). Of note, this produces faster SSE4.1 code by default, but also requires a Penryn-era Core2Duo CPU or later. (Note that Intel 64-bit non-Haswell in release builds still use SSSE3.)
- Improves overall stability when running DeSmuME on macOS 10.5 Leopard.
- In addition, release builds running Intel 64-bit non-Haswell no longer require macOS 10.7 Lion. They can run on Leopard again!
- Finally fix some GUI issues in the About box when running Dark Mode on macOS 10.14 Mojave or later.
2022-04-02 13:52:17 -07:00
rogerman 407931288a WiFi: Fix compiling for compilers not running C++11 language features. 2022-04-02 13:25:29 -07:00
Marco Köpcke b86a7748b1
Interface: Added a function to get/set the ARM9 next instruction (#517)
* Interface: Added a function to set the ARM9 next instruction

* Comment about potential JIT issues

* Interface: Made setting next instructions no-op with JIT
2022-03-31 18:06:37 -04:00
tech-ticks 1cec82613b
interface: Fix macOS build (#485)
* Compile macOS interface with clang

* Fix OpenGL dependency on macOS
2022-03-30 20:21:00 -04:00
zeromus 599c981481
Merge pull request #516 from SkyTemple/fix-register-read-write-hooks
Fix register read/write hooks (potentially) using wrong integers sizes
2022-03-15 13:33:39 -05:00
Parakoopa 61036472b5 Fix register read/write hooks (potentially) using wrong integers sizes 2022-03-15 17:48:47 +01:00
zeromus 96b1150558
Merge pull request #515 from SkyTemple/update-interface-build-instructions
Update build instructions for the DLL/SO
2022-03-12 15:33:11 -06:00
Marco Köpcke 666c1ef455 Update build instructions for the DLL/SO 2022-03-12 16:47:58 +01:00
zeromus 95c44e389c
Merge pull request #512 from SimonAfek/feature/fix_msbuild_warning
Fix build action warning + use 64-bit build tools
2022-03-01 16:27:05 -06:00
SimonAfek b143ed6544
Use setup-msbuild v1.1 2022-03-01 13:12:19 +01:00
zeromus 8fd322e817
Merge pull request #469 from TornaxO7/reference_fixes
Fixing urls
2022-02-12 17:45:09 -06:00
rofl0r bd9dcc558f CI: fix mac os interface build, to make everything green again
it's highly annoying to get the red X for any push or pull request
because mac os x interface build is broken since december.
fix it by installing glib which meson complains about.
2022-02-11 20:55:26 +00:00
zeromus 0e83bd5000
Merge pull request #505 from rofl0r/winbuild3
add github workflow to build win64 artifact
2022-02-11 13:06:28 -06:00
rofl0r 9e0aed2267 add github workflow to build win64 artifact
special thanks to @SimonAfek who figured out some nitty-gritty stuff
to make this work.
2022-02-11 18:57:28 +00:00
zeromus f52eed131a fix msvc-clang errors 2022-02-10 14:50:11 -05:00
zeromus 5e48c9c44a fix clang errors 2022-02-10 14:49:42 -05:00
zeromus b2c2e8f5ee try fixing clang compiling another way 2022-02-09 22:52:21 -05:00
zeromus 1770d0a232 try to fix xaudio compiling on clang 2022-02-09 18:37:43 -05:00
rofl0r 6f66e09d82 fix build with clang-cl
clang-cl is the MSVC's recent included clang compiler, which has some
different defaults regarding narrowing and preprocessor.
2022-02-09 21:00:22 +00:00
zeromus 7e787700e7
Merge pull request #502 from algoRhythm99/vs2022
Visual Studio 2022 build support
2022-02-01 21:58:45 -06:00
algoRhythm99 258adbcfca Visual Studio 2022 build support
Bare minimum changes to get it building out of the box in Visual Studio 2022 community
2022-01-31 21:47:37 -06:00
zeromus 747f369483 third unicode fix for issue #496. please go away. 2022-01-11 22:32:57 -05:00
zeromus af06cc4aca fix window title on non-english locales (probably, but not tested)
fixes #496 addendum
2022-01-11 20:29:05 -05:00
zeromus 81573818a9 Revert "WiFi: Fix compiling for Cocoa port by eliminating typed enums. (Regression from commit 43b00fb2, for which the regression was caused by commit 5f76ba8b.)"
This reverts commit 9f82cea20b.

If cocoa compiling is broken let's discuss it instead of reverting work
2022-01-11 19:12:37 -05:00
zeromus 8510948f6c fix game info text fields on non-english locales (probably, but not tested)
fixes #496
2022-01-11 19:09:34 -05:00
zeromus 3ba3821228
Merge pull request #495 from rinsuki/ci/macos-app
ci: Add macOS app Build
2021-12-14 15:26:28 -06:00
rinsuki e344b4ce2a ci: Add macOS app Build 2021-12-14 21:02:07 +00:00
Ingo Saitz b4080b2cae Linux: Call NDS_Init() early
Since NDS_Init takes no arguments, it should not hurt to call it early
in the gtk frontend, too.

This fixes the segfault in issue #415, although I could not get it to
run a r4 kernel in a quick test.
2021-11-19 16:52:44 +01:00
Ingo Saitz f827be2e0f Linux: Add pop-up menu back
This adds the view menu back as pop-up menu, which was disabled by the
gtk2 port.

This fixes issue #407.
2021-11-19 16:51:44 +01:00
Ingo Saitz 327dcd3d7b Linux: Fix recent entries with quote in filename
According to RFC 2396, the single quote character (') is allowed in uri
strings and is not escaped by gtk, so the action string constructed for
the recent files menu must be quoted with " instead of '.

This fixes issue #437
2021-11-19 16:49:36 +01:00
zeromus 629724d865
Merge pull request #489 from Salz/pullreq/openal-linux-01
Pullreq/openal linux 01
2021-11-18 12:47:28 -05:00
Ingo Saitz 6aa320aa0a [Linux] OpelAL: Initialize the Mic_Buffer with silence data 2021-11-18 13:38:01 +01:00
Ingo Saitz 9f19d681de [Linux] OpenAL: fix mic data
The data returned by Mic_ReadSample() must be transfered in 2 parts.
This must be done by every microphone driver.

I did test with Lunar: Dragon Song which values are considered loud,
since you can run away by screaming/blowing into the microphone. Values
from 33-223 don't trigger the escape, values from 0-32 and from 224-255
trigger an escape attempt. Thus 128 would be considered silence.
2021-11-18 13:15:52 +01:00
rogerman 0b4b58f3b4 GPU: Remove a now defunct check that could cause the window test buffer to fail to update. This fixes a graphical issue in Pokemon Black 2 when watching movies at the Pokestar Studios. (Regression from commit 7fc2e4b6. Fixes #486.) 2021-11-12 16:27:11 -08:00
rogerman 9f82cea20b WiFi: Fix compiling for Cocoa port by eliminating typed enums. (Regression from commit 43b00fb2, for which the regression was caused by commit 5f76ba8b.) 2021-11-12 16:16:37 -08:00
rofl0r f000d1a9c0 gtk2: fix build with fresh clone
this was overlooked as my copy already contained a generated Makefile.in.
2021-11-07 16:23:31 +00:00
rofl0r d1d626f221 GTK2: add crude 'dump memory' button to tools
the offsets in the dump file are as follows (code snippet taken
from the dump function and annotated with locations from gbatek:

                0x2000000
        fp.fseek(0x000000,SEEK_SET); fp.fwrite(MMU.MAIN_MEM,0x800000); //arm9 main mem (8192K)

  4       DTCM            027C0000h 16KB   -     -    -    R/W
or 0x800000 or 0xb000000 . DTCM location in real NDS varies, as the program can select where
it's mapped to, apparently.

        fp.fseek(0x900000,SEEK_SET); fp.fwrite(MMU.ARM9_DTCM,0x4000); //arm9 DTCM (16K)
        fp.fseek(0xA00000,SEEK_SET); fp.fwrite(MMU.ARM9_ITCM,0x8000); //arm9 ITCM (32K)
        fp.fseek(0xB00000,SEEK_SET); fp.fwrite(MMU.ARM9_LCD,0xA4000); //LCD mem 656K

  0       I/O and VRAM    04000000h 64MB   -     -    R/W  R/W

        fp.fseek(0xC00000,SEEK_SET); fp.fwrite(MMU.ARM9_VMEM,0x800); //OAM
                 0xc000bc

        fp.fseek(0xD00000,SEEK_SET); fp.fwrite(MMU.ARM7_ERAM,0x10000); //arm7 WRAM (64K)
        fp.fseek(0xE00000,SEEK_SET); fp.fwrite(MMU.ARM7_WIRAM,0x10000); //arm7 wifi RAM ?
        fp.fseek(0xF00000,SEEK_SET); fp.fwrite(MMU.SWIRAM,0x8000); //arm9/arm7 shared WRAM (32KB)
2021-11-03 22:07:52 +00:00
rofl0r b1ffe0ae76 GTK2: add crude "import backup" dialog to File menu
this is necessary to load saves from other devices or emulators,
as desmume uses its own incompatible format.

it works for importing .sav files from flashcarts, but only if the
file extension is .sav or .SAV - if using .dsv desmume guesses it's
of its own type and looks for a specific string, then fails.

the right code was taken from windows/importSave.cpp - it might make
sense to add the export item at some point too, however that will
probably require some more effort.
2021-11-03 22:07:52 +00:00
rofl0r da75178fd6 update README.LIN 2021-11-03 22:07:52 +00:00
rofl0r 2bd5f2804f configure.ac: switch gtk dir to gtk2 2021-11-03 22:07:52 +00:00
rofl0r c2d7a8a643 revert autoconf-part of ba92804d9f 2021-11-03 22:07:52 +00:00
rofl0r 03e14584f6 re-add gtk+2 frontend in gtk2 directory 2021-11-03 22:07:52 +00:00
rofl0r 54f3549108 fix implicit declaration of pthread_setname_np on musl 2021-11-03 22:07:52 +00:00
rofl0r f9393ab57c fixup build sys for GLX removal
the cli frontend still doesn't build, but gtk does
2021-11-03 22:07:52 +00:00
rofl0r d5e9df3691 fixup build system for SDL2
doesn't build yet (at least with --enable-glx - this will be fixed later)
2021-11-03 22:07:52 +00:00
rofl0r 4cef851cbf Revert "Linux: Remove the autotools build system"
This reverts commit 19147a8457.
2021-11-03 22:07:52 +00:00
zeromus 83a3d30fa8
Merge pull request #484 from Minabsapi/master-fix-interface_memory_leak_mitigation
Hotfix: fixed memory leak in binary interface
2021-11-03 14:14:45 -04:00
Minabsapi 00ab686625 Hotfix: fixed memory leak in binary interface's draw_sdl_window.cpp `sdl_draw_no_opengl` method
A call to the `SDL_DestroyTexture` method was forgotten, resulting in all the textures created to render the game's frames being stored indefinitely until running out of memory
This is a temporary fix so anyone using the interface (mainly `py-desmume` users) can have it working correctly again. Next step is to mirror the changes from POSIX CLI's main.cpp `Draw` method, if stable
2021-11-03 16:47:06 +01:00
zeromus 2468b1dbbe
Merge pull request #482 from rofl0r/pr481new
PR 481 redone
2021-11-02 10:37:13 -04:00
rofl0r 2153e53012 frameskip log update: use snprintf, remove gratuitous memset 2021-11-01 21:48:50 +00:00
thesource 79abd40913 Update menu state on setting frameskip value and also print new value 2021-11-01 21:46:18 +00:00
zeromus 8461e2f08d fix bug where windows frontend stopped processing hotkey input from gamepads while paused (fixes #479) 2021-10-28 03:15:15 -04:00
zeromus 021fcdd0de
Merge pull request #478 from rofl0r/cli_fix
fix/improve CLI frontend
2021-10-27 10:06:40 -04:00
rofl0r 7db8f4fcd6 sdl: use emu_halt before loading savestates, just like win32 2021-10-26 16:56:42 +00:00
rofl0r d3dee7ce9c cli: disable jit when using gdb stub 2021-10-26 16:56:42 +00:00
rofl0r 65a280618b cli: turn off sound when entering gdb stub 2021-10-26 16:56:42 +00:00
rofl0r 9f4e6992fb simplify/fix sdl2 sound backend, fixes no audio in CLI
- simplified ring-buffer mechanism
- added proper locking for all variables accessed by 2 different threads
- fixed oob writes that occassionally crashed SDL's "Alsa Hotplug thread"
- make buffer sufficiently large to prebuffer enough samples to survive
  the occassional SDL_Delay(1) in the frontend.
- fixed ignoring volume set by the SPU.
- improved speed and robustness by not calling malloc over and over in
  SDL callback, and copying directly to the SDL buffer if volume is max
  (no need to use mixer to lower the volume in that case).
2021-10-26 16:56:42 +00:00
rofl0r 09506c9a19 cli: add fullscreen toggle with alt-enter 2021-10-26 16:56:42 +00:00
rofl0r 9868c00fca cli: add --horizontal command line option
this option puts the touchscreen to the right, allowing higher scales
on widescreen monitors.
2021-10-26 16:56:42 +00:00
rofl0r 90326ea1f9 cli: add scaling
the new command line parameter --scale allows to scale the window by
a floating point factor. SDL2 stretches it in hardware to the desired
size, which makes the scaled window run at almost identical speed to
1x scale.
2021-10-26 16:56:42 +00:00
rofl0r b685818413 cli: fix FPS display
1) the float format displayed like 50.123456789123456 wouldn't fit
   into the window title bar, and
2) most likely not into the char buffer of length 20, of which half
   was already used for the desmume string.
2021-10-26 16:56:42 +00:00
rofl0r 699f63d688 cli: user proper SDL2 OpenGL-accelerated rendering primitives
additionally:
- don't allocate memory for surfaces and textures over and over
- use one texture for each NDS screen - this allows to easily
  add support for horizontal screen layout.
2021-10-26 16:56:42 +00:00
rofl0r 7e0336d57d cli: re-add ability to set frameskip
the command line option existed once, but was turned off when a
new generic commandline parser class was introduced. the entire
array in main.cpp using custom commandline options is currently
unused.
2021-10-26 16:56:42 +00:00
rofl0r d07bdedbd6 cli: remove unused and broken OPENGL2D code
this code was broken since the switch to SDL2, but nobody noticed
because the new meson build system doesn't set HAVE_GL_GL_H.
2021-10-26 16:56:42 +00:00
rofl0r a2c6a789ad cli frontend: fix mouse input
there were 2 logical issues which caused reproducible misbehaviour.
for example when starting up pokemon soulsilver, one can click away
the intro, but it's not possible to click on the "load savegame"
icon.
the issues were:

1) failure to record whether the down event has been
passed to the emulator before abandoning it and turning it into
a click event (on a fast click, both events would happen during
the same SDL_Pollevent loop), and
2) mouse coordinates were discarded and unless the mouse down
event was registered. that means if the down and up events happen
on the exact same coordinate, the .x and .y of the mouse weren't
updated at all.
2021-10-26 16:56:42 +00:00
zeromus 086112c4b5 isSwapBuffers is savestated with a size set to 4, so it needs to be a u32 and not a BOOL 2021-10-25 23:00:25 -04:00
zeromus 43b00fb2a0 fix some sloppy stuff in wifi that made its savestates unreliable 2021-10-25 20:07:51 -04:00
zeromus fe8c424c4a fix gdbstub compiling on windows 2021-10-25 20:04:35 -04:00
zeromus b8bed7082b
Merge pull request #477 from rofl0r/gdbstub_block
Gdbstub improvement, fix 100% cpu use in cli frontend
2021-10-24 21:07:12 -04:00
rofl0r 339ea16b15 gdbstub_wait(): add timeout parameter
this is probably helpful for frontends other than cli that have to repaint
and react on events in the user interface, so they can set a timeout like
100 ms, or simply poll whether the stub is active using timeout 0.
2021-10-24 15:39:01 +00:00
rofl0r ed5ff51c0c gdb stub: since debug info is printed anyway, show the actual command 2021-10-24 15:38:55 +00:00
rofl0r d5693c54cf cli frontend: fix 100% cpu when using gdb stub
the emulator thread was consuming 100% cpu even when the debugger was
active and execution paused.

a second pipe was added to gdb stub, which allows communication in
direction stub -> emulator/frontend, and also to infinitely block
in the frontend until the debugger returns control, for example
by typing "c" (continue) in gdb.

the other frontends use an inefficient method of running usleep(1000)
or similar in a loop, which will cause high cpu usage too, albeit not
a full 100% but more like 10-20%.

in order not to fill up the pipe with data for frontends that don't use
this mechanism, the functionality needs to be explicitly enabled.
(see functions added to gdbstub.h)

the functions added could in theory also be used to communicate
other data to the frontend, and optimally even replace all the locking
between the 2 sides.
2021-10-24 15:38:50 +00:00
rofl0r dbc1f06662 gdbstub: remove more WIN32 ifdefs, refactor pipe setup code to be re-usable 2021-10-24 15:38:44 +00:00
rofl0r 747f7b114b NDSSystem: replace GDB_STUB ifdefs with macro 2021-10-24 15:38:38 +00:00
rofl0r 70a1727bd5 gdbstub: improve readability by using less ifdef WIN32 2021-10-24 15:38:31 +00:00
rogerman 7fc2e4b6b6 GPU: Only perform window testing when the relevant window states actually change. 2021-09-22 13:24:05 -07:00
zeromus 2fb06cf4cc
Merge pull request #472 from MathyFurret/patch-1
Disassembler: Fix LDR/STR immediate offset
2021-09-21 15:52:18 -04:00
rogerman f42975aa4d GPU: Remove some dubious or now obsolete templates for OUTPUTFORMAT. Shouldn't affect performance, but does slightly decrease the code size. 2021-09-21 11:40:09 -07:00
Alexander B db7bfdb185
Disassembler: Fix LDR/STR immediate offset 2021-09-21 12:10:58 -05:00
rogerman b02dd3afaf GPU: Do some more refactoring, mostly related to applying the master brightness. 2021-09-20 23:14:49 -07:00
rogerman 173e2ae6e7 GPU: Do some code refactoring. 2021-09-20 19:10:29 -07:00
rogerman 4afbb18eab GPU: Correctly resolve the 18-bit and 24-bit colorspaces to 32-bit when auto-resolving is enabled. Fixes #471.
- Also revert commits e1cadfe and 77d38b1. Using masterNativeBuffer16 was the correct choice here after all.
2021-09-20 15:06:34 -07:00
rogerman d6e80e7864 OpenEmu Plug-in: This frame buffer also needs to use masterCustomBuffer because it's running 18-bit color space. 2021-09-20 11:12:19 -07:00
rogerman e1cadfe112 Linux Port (CLI): Oops! Wrong buffer... 2021-09-20 11:04:12 -07:00
rogerman 77d38b15b1 Linux Port (CLI): Take a shot in the dark at #471, but I have no way to test it.
- It's a regression from commit 4578728. I'm suspecting that this particular buffer is to be read as 32-bit since all of the other Linux frontends explicitly used 16-bit except for this one.
2021-09-20 11:02:24 -07:00
rogerman 004ec526aa GPU: Completely revert commit a948838. I forgot that Zelda PH and Zelda ST could use both GPU engines for the same display when moving the map to and from the touch screen, and so native line tracking MUST be performed at the display level in order to account for this.
- Added some additional comments so that I'm not tempted to change the native line tracking paradigm ever again.
- Do some refactoring to make GPUEngineBase::_targetDisplay handle more buffer associations itself instead of relying on GPUEngineBase's copies of the associations.
2021-09-20 01:23:06 -07:00
TornaxO7 4e96d07678 Fixing urls 2021-09-19 22:28:44 +02:00
rogerman d626bad6bd Fix broken builds due to commit 45787281. 2021-09-18 23:01:20 -07:00
rogerman 4578728120 GPU: Change the rendering paradigm where, rather than performing inline colorspace conversions during rendering, all rendering is performed at 15-bit until 3D rendering or 24-bit custom VRAM creates the need for a color space conversion.
- For purposes of maintaining a record and make for easier reversions, the code has NOT been fully optimized or cleaned up. This will happen over a period of time as the code settles down through testing.
- All "native" buffers are no longer assumed to be in any color space and are now assumed to always be 15-bit. The native buffers are now referenced using uint16_t pointers and are now suffixed with "16" in order to reflect this change.
- Of note, all clients that reference masterNativeBuffer or nativeBuffer via NDSDisplayInfo must now assume that these native buffers will always be in the 16-bit color space.
- Any 18-bit and 24-bit rendering now happens in the custom buffers.
2021-09-18 22:36:40 -07:00
rogerman c082782fa9 GPU: Fix main memory capture on big-endian systems when running 15-bit and 18-bit mode.
- 24-bit mode is still bugged on big-endian systems. This will be fixed at a later date.
2021-09-18 20:35:51 -07:00
rogerman 7dd98ddb45 GPU Operations: Fix a bug where running 18-bit color, 24-bit color, or a custom framebuffer size would cause a crash on systems without SSE2 or AVX2. (Regression from commit 0db9872.) 2021-09-18 15:44:42 -07:00
rogerman 5b1eb55351 GPU Operations (SSE2): Apply the same code optimizations to the PixelOperation_SSE2::_unknownEffectMask16() and PixelOperation_SSE2::_unknownEffectMask32() methods as their corresponding AVX2 versions.
- Also fixes a bug in PixelOperation_SSE2::_unknownEffectMask32() that would cause 3D layers to appear black if the user was running 15-bit color mode. (Regression from commit 0db9872.)
2021-09-18 13:57:07 -07:00
rogerman 9ace87207d FIFO: Fix a bug where running 18-bit or 24-bit color depth would cause a buffer overrun. (Regression from commit 329eade.) 2021-09-16 18:36:42 -07:00
rogerman 07aadb462e GPU: Partially revert commit a948838. It still bothered me that native line tracking wasn't individually handled for rendered lines and displayed lines, and so this paradigm has been restored. However, native line tracking continues to be handled purely with GPUEngineBase.
- GPUSubsystem::ClearWithColor() also now handles clearing the master framebuffer with better specificity.
2021-09-16 15:24:23 -07:00
rogerman c6d35f9894 Cocoa Port: Metal display views can now handle the possibility where the fetched main and touch display framebuffers are in different colorspaces. 2021-09-16 15:16:37 -07:00
zeromus ff28ca6df5
Merge pull request #468 from anlsh/master
Enable "Save state to" and "Load state from" functionality in GTK
2021-09-14 23:16:48 -04:00
Anish Moorthy 4754987279 Suggest proper file extension for save dialog 2021-09-14 23:11:49 -04:00
Anish Moorthy 71ed1ca073 Redraw screen in after loading state from file 2021-09-14 23:11:49 -04:00
Anish Moorthy fffd574aae Disable save/load actions when there is no ROM, but menu is still clickable 2021-09-14 23:11:49 -04:00
Anish Moorthy 98a1c58db7 Make "Load state from" pressable on linux 2021-09-14 23:11:49 -04:00
Anish Moorthy 91b2e22894 Make "Save State To" pressable, even if sometimes broken 2021-09-14 23:11:49 -04:00
zeromus db6e978276
Merge pull request #466 from anlsh/master
Change background color on Linux
2021-09-14 18:38:35 -04:00
Anish Moorthy 19b081c8b8 Fix second layer of toolbar 2021-09-14 18:05:58 -04:00
rogerman d60684ce4d GPU Operations: Fix bug where generic calls to CopyLine*<>() caused certain compilers to interpret 0xFFFF as -1 in all cases.
- This fix has the side effect of greatly increasing the code size.
- Quick testing shows that this fix increases overall graphics performance by 2% - 3%. But is this small performance gain worth the massive increase in code size? Hmmm....
2021-09-14 14:49:31 -07:00
rogerman a948838c16 GPU: Native lines are no longer tracked through NDSDisplay. Native lines are now only tracked through GPUEngineBase.
- While this is technically incorrect according to object roles, tracking native lines this way makes it a bit easier to manage them.
2021-09-14 01:53:05 -07:00
Anish Moorthy 5057299fa5 Change background color on Linux 2021-09-13 23:40:18 -04:00
rogerman 7bac2ce759 GPU: Standardize all aligned memory block allocations to be page-aligned. 2021-09-13 19:36:27 -07:00
rogerman 8a610234c5 GPU: Simplify GPUSubsystem::PostprocessDisplay(). 2021-09-13 19:31:31 -07:00
rogerman a5b25313f8 GPU: The internal buffer for custom-sized layer IDs is now cleared in its entirety, rather than just most of it. 2021-09-13 19:30:47 -07:00
rogerman fffa7ebb8c FIFO: Oops! Fix a bug that snuck in from commit 31851c2.
- In practice, no games seemed to be affected by this bug, but even so, this fix is correct.
- While technically unnecessary, when the index is singly incremented, it's better to hard reset an overrunning index to zero in order to improve the theoretical stability of the code.
2021-09-13 10:42:39 -07:00
rogerman ad64e73bb2 Colorspace Handler: Colorspace conversions no longer do big-endian byte swapping by default. Instead, byte swapping must be explicitly requested.
- Byte swapping can now be independently controlled for both input and output data.
- As an application to this new API, VRAM display mode now shows the correct colors on big-endian systems.
2021-09-11 20:59:41 -07:00
rogerman 329eade565 FIFO: Simplify _DISP_FIFOrecv_LineOpaque32_vec() code paths for non-AltiVec systems. 2021-09-11 11:50:53 -07:00
rogerman bf71da494e Colorspace Handler: Make the ColorspaceConvert555To*_AltiVec() functions behave consistently with their scalar counterparts by byte swapping the result. Fixes SoftRasterizer's toon table colors on AltiVec-enabled systems. 2021-09-11 11:49:07 -07:00
rogerman 3dabb10145 OpenGL Renderer: The fog density table is now sampled as a 1D texture instead of being indexed as a uniform array. Should yield a performance improvement on older GPUs.
- Even if the new fog rendering yields no performance improvement on newer GPUs, at least the new code is MUCH cleaner and simpler.
2021-09-10 10:13:11 -07:00
rogerman df18eda84f OpenGL Renderer / SoftRasterizer: Properly handle cases where FogShiftSHR is greater than 10. Related to commit 9f4f3ec. 2021-09-09 19:54:06 -07:00
rogerman 9f4f3ecf95 GFX3D: Oops, I misread GBATEK. It actually meant that the Fog Step (not the Fog Shift) would become zero if Fog Shift was greater than 10. So set Fog Shift to 11 in this case.
- This also discovers an existing issue with the fog weight calculation code in both OpenGL and SoftRasterizer, since Fog Shift could be zero and thereby cause the calculations to divide by zero. This issue will have to be dealt with at a later time.
2021-09-09 13:59:25 -07:00
rogerman d9fabf6347 GFX3D: So apparently, GBATEK says that, instead of clamping the FogShiftSHR value to 10, the FogShiftSHR value should reset to 0 if it goes above 10. Hmm, okay. 2021-09-09 13:34:47 -07:00
rogerman c0552cab6d OpenGL Renderer: Do a micro-optimization when NDS-style Depth Calculation is used. 2021-09-08 23:42:29 -07:00
rogerman 506128760a Do some minor fixes in preparation for making an Apple Silicon build. 2021-09-08 15:07:02 -07:00
rogerman 9e79b1dcb3 OpenGL Renderer: Fog rendering now works like how SoftRasterizer does it. (3.2 only)
- Also rework SoftRasterizerRenderer::_UpdateFogTable() to use the same variable naming scheme as OpenGL. This is done for better code consistency.
- In reality, I'm already looking to scrapping this algorithm in OpenGL for something that could be better in every possible way, but I want to commit this SoftRasterizer-esque algorithm first so that we have a working version of it on record.
2021-09-08 12:54:35 -07:00
zeromus 8c4e42f98d fix bug that made desmume get a random MAC address on each boot without anybody knowing it or asking for it. this triggered time-travel protections in games. 2021-09-08 04:17:57 -04:00
rogerman f3c3228c70 Windows Port: Fix Windows build. (Regression from commit 037d328.) 2021-09-07 02:13:35 -07:00
rogerman 037d3285a9 Cocoa Port: Update project files to accommodate new GPU_Operation_* files. Also updates builds for AVX2. 2021-09-06 19:46:53 -07:00
rogerman 0db98725dc GPU: Do a massive refactor of the manually vectorized code and add full support for AVX2.
- Most notably, each version of the manually vectorized code now resides in their own files.
- Depending on the rendering situation, the new AVX2 code may increase rendering performance by 5% to up to 50%.
- Certain functions automatically gain manual vectorization support since the new GPU code makes use of the new general-purpose copy functions that were added in commit e991b16. In other words, AVX-512 and AltiVec builds also benefit from this.
2021-09-06 18:00:38 -07:00
rogerman 4226fa7ab2 SPU.cpp: More silencing of compiler warnings, code cleanup, and consistency improvements. 2021-09-06 15:10:05 -07:00
rogerman 207e93b8ae mc.cpp: Silence a whole bunch of compiler warnings and improve code consistency. 2021-09-06 14:28:11 -07:00
rogerman 620d3b3a26 Render3D: Fix clear image on big-endian systems.
- Also renames "Altivec" to "AltiVec" to remain consistent with Colorspace Handler's naming.
- Also adds an AltiVec accelerated version of the clear image parser.
2021-09-05 01:25:13 -07:00
rogerman c49a480d51 SoftRasterizer: Due to how the class inheritance works, SoftRasterizer_AVX actually requires AVX2 instead of just AVX. And in reality, AVX2 is just more practical than AVX for what we're doing here.
- Also do some minor refactoring of Render3D.
2021-09-04 19:31:55 -07:00
rogerman 92fcd1313e OpenGL Renderer: Do a minor optimization when running NDS-Style Depth Calculation.
- As a positive side-effect, generating the geometry shaders now runs quicker too.
2021-09-04 17:50:10 -07:00
rogerman ef35f72172 FIFO: Fix buffer copying for AltiVec. 2021-09-04 17:42:56 -07:00
rogerman 192e0f88b2 Cocoa Port: Perform post-build code signing for final stage of Release build. 2021-09-03 12:03:06 -07:00
rogerman 777329a993 Cocoa Port: Fix the OpenGL renderer on macOS v10.7 Lion. 2021-09-03 02:20:07 -07:00
rogerman 22801dac3c Cocoa Port: Delete now defunct Xcode 9 build scheme. 2021-09-03 01:07:57 -07:00
rogerman 2b3a7a7e50 Cocoa Port: Update Final Release builds to split 32-bit and 64-bit binaries between Xcode 9 and Xcode 12, respectively.
- Final Release builds still remain as PowerPC 32-bit, Intel 32-bit, and Intel 64-bit. ARM64 is not supported yet.
- PowerPC 32-bit and Intel 32-bit continue to require macOS v10.5 Leopard like before, but the Intel 64-bit binary now requires macOS v10.7 Lion or later. (Now, the Intel 64-bit binary will simply fail to run on Leopard and Snow Leopard.)
2021-09-02 22:53:45 -07:00
rogerman e775f17c87 OpenGL Renderer: Fix some issues where shaders wouldn't work on older/stricter video drivers.
- Specifically, we're now respecting uniform control flow for texture lookups, for which older/stricter drivers will silently fail because they consider texture lookups within conditional blocks to be undefined.
2021-09-02 22:44:12 -07:00
rogerman ea02efda78 Alright, fix the Windows build for real. 2021-09-01 02:54:20 -07:00
rogerman 379af45813 Did this fix it? 2021-09-01 01:18:00 -07:00
rogerman 7eabbb8ea6 Silence a whole lot of longstanding compiler warnings. 2021-09-01 00:49:50 -07:00
rogerman 0df858f2e8 Cocoa Port: Add the ability for the user to set a fixed frame skip value, just like in the Windows port. This is in addition to the existing automatic frame skip setting. 2021-08-31 13:56:07 -07:00
rogerman 67fa412144 gdbstub.cpp: Fix compiling for builds that use GDB stub. (Regression from commit cfe88ce.) 2021-08-31 11:06:22 -07:00
rogerman cfe88ce0d7 Core: Silence the 1000+ compiler warnings about using offsetof() on a non-POD type... again. 2021-08-31 10:23:04 -07:00
rogerman 3f47c4ad7d Cocoa Port: Fix building for Xcode 3. (Regression from commit 03b9481.) 2021-08-30 20:34:42 -07:00
rogerman 4a9c71b988 Cocoa Port: Also add command queue names for Metal display views. 2021-08-30 20:07:58 -07:00
rogerman 03b9481095 Cocoa Port: Add thread names for this port's own threads too. 2021-08-30 20:06:42 -07:00
rogerman 4f8ba2beb9 task.cpp: Support thread naming on macOS.
- Related to commit 11fe823 and commit e70e065.
2021-08-30 20:02:49 -07:00
rogerman 0d51b40479 Do some minor changes to support compilers running strict C++17 conventions. 2021-08-30 12:50:15 -07:00
rogerman 3b06be0d07 FIFO.cpp: For AVX-512 built targets only, correct _DISP_FIFOrecv_LineOpaque32_vec() to require Tier-1 support instead of Tier-0. 2021-08-30 12:44:30 -07:00
rogerman 479c404b60 Core: Fix compiling for AltiVec build targets. 2021-08-30 12:42:48 -07:00
rogerman 63702ff6bd task: Change to C++03 conventions to support older compilers. Related to commit 5428763. 2021-08-30 12:39:28 -07:00
rogerman ac472c13ef encrypt.h: Change to C++03 conventions to support older compilers.
- This change partially reverts commit 87cb2f6, but still preserves the elimination of the destructor, which is probably the code simplification that was originally wanted, I guess.
2021-08-30 12:29:09 -07:00
rogerman 9ac09387e3 Cocoa Port: Fix a bug where changing the GPU Scaling Factor or GPU Color Depth while the emulator is paused would cause the program to freeze upon restarting the emulation via Run, Frame Advance, or Frame Jump. 2021-08-27 14:48:22 -07:00
rogerman b7c9b6b614 Cocoa Port: Fix a bug where the Frame Advance and Frame Jump buttons in the Execution Control panel would cause the other buttons to enable/disable themselves inconsistently, but only if the .app was built on Xcode 10 or later.
- Apparently, KVO-based UI updates being made across threads are a big no-no in the macOS v10.14 SDK and later. So now we need to make sure that ALL KVO-based UI updates are done on the main thread only.
2021-08-27 13:35:10 -07:00
rogerman c7f85ba00a Cocoa Port: Fix a bug where the video filter preview in Preferences would display a black box if the .app was built using Xcode 10 or later.
- Also make OGLImage run a little more efficiently.
2021-08-27 03:03:44 -07:00
rogerman 31851c2524 FIFO.cpp: Add new manually vectorized versions of FIFO buffer line copies for AVX2, AVX-512, and AltiVec. 2021-08-26 18:05:53 -07:00
rogerman 79437371e3 Render 3D: In the vectorized code, tweak how memory is indexed. Not only does this make the code more consistent, but it might make some subtle code generation improvements in the compiled code (depending on compiler and optimization settings). 2021-08-26 17:08:10 -07:00
rogerman e991b16ec1 matrix.h: Add more general-purpose vectorized fixed copy functions. (They don't actually do anything as of this commit, but they will be used in future commits.) 2021-08-26 16:36:54 -07:00
rogerman 64cbba2e24 Cocoa Port: Fix crashes and improve stability.
- Fixes a crash that can occur on startup or when modifying the Video Pixel Scaler in Preferences. Fixes #321. (Regression from commit 0663661.)
- Fixes a crash on startup where write+execute privileges returned by mprotect() are not supported when compiled against the macOS v10.15 SDK or later. Fixes #335.
- Fixes a possible crash that can occur if an invalid ID is sent when trying to set the 3D Rendering Engine. Maybe fixes #342.
2021-08-26 16:09:50 -07:00
rogerman 92cb90f433 Cocoa Port: Fix build errors that can occur when building on Xcode versions later than 10.3.
- The script that renames the DeSmuME.app package with the git version now runs as a Build Post-Action script rather than as the last build rule. This is to fix an incompatibility with code signing, which is now forced in Xcode 11 and later.
- Update some variables to comply with newer and stricter compiler rules.
2021-08-26 14:32:25 -07:00
zeromus e8f619c44a winport: fix #442 2021-04-09 11:43:20 -04:00
zeromus 9d8332d671 winport - fix #441 (nonsense japanese directory creation on open rom file dialog and other cases probably) 2021-04-06 15:09:48 -04:00
zeromus 42093b4929 fix #423 more 2021-04-06 01:12:18 -04:00
zeromus 4b77e9b77a winport - fix file creation time not shown in file menu when filename has moonrunes, fixes #440 2021-04-05 22:59:02 -04:00
zeromus 84e8508520 fix WIN32_FRONTEND (broken by PR #350)
fixes #432
2021-04-05 22:43:33 -04:00
thesource 85a2674eb5 GTK: fix freeze when editing joystick controls 2021-03-13 14:10:31 +01:00
Emmanuel Gil Peyrot 445579b053 GTK: Use the correct hyphenation for properties 2021-03-11 16:53:22 +01:00
zeromus 67f30f4023
Merge pull request #350 from SkyTemple/binary-interface
DeSmuME as a shared object / dynamic library
2021-03-07 19:49:00 -05:00
Parakoopa 8e7af8ada8 Github action for interface build -- Corrected windows path 2021-03-07 12:03:52 +01:00
Parakoopa c135751ded Github action for interface build 2021-03-07 11:59:10 +01:00
Parakoopa 37ed174621 Fix libdesmume name in meson build 2021-03-05 13:05:31 +01:00
Parakoopa 1455b830c5 Interface: Windows: Switched to SDL2 2021-03-05 11:23:52 +01:00
Parakoopa 34b4fc3d72 Interface: Posix: Switched to SDL2 and Meson 2021-03-05 10:28:28 +01:00
zeromus 600d159427
Merge pull request #432 from thesourcehim/master
Update menu and config upon save type change
2021-02-27 14:43:22 -05:00
thesource d3fda11a0e Update menu and config upon save type change 2021-02-27 18:49:58 +03:00
Parakoopa f62318ced4 Fix wrong type in interface after SDL2 migration 2021-02-21 14:24:15 +01:00
zeromus 6ef876b217 fix 1 pixel rounding oopsie in horizontal odd-ratio'd layout case 2021-02-05 14:09:16 -05:00
Parakoopa 1809c0a17e Added documenation, removed unimplemented API functions 2021-01-31 14:15:36 +01:00
Parakoopa 6be61e4a42 Support for making Joystick processing optional 2021-01-31 14:15:36 +01:00
Parakoopa 3d198fcb9b MacOS compatibility 2021-01-31 14:15:36 +01:00
Parakoopa 4917d177cc Binary interface: Removed lua support from Windows 2021-01-31 14:15:36 +01:00
Parakoopa f7bada2526 Flag to disable AVX512 2021-01-31 14:15:36 +01:00
Parakoopa 651cb53fbe Binary interface: Memory and register access & hooks 2021-01-31 14:15:34 +01:00
Parakoopa b18e2058cb Binary interface: Removed some unused functions 2021-01-31 14:15:03 +01:00
Parakoopa 283f31cf87 Binary interface: Movie recording and playback 2021-01-31 14:15:03 +01:00
Parakoopa 7b3da44f5a ABI: Changes to the core and other modules to be buildable on Win32 2021-01-31 14:15:03 +01:00
Parakoopa c7426e24b7 Binary interface: Windows: Newer SDL 1.2 version 2021-01-31 14:15:03 +01:00
Parakoopa 10414b1f1d Binary interface: Windows building 2021-01-31 14:15:03 +01:00
Parakoopa 1f37dcc0a0 Binary interface: Posix building 2021-01-31 14:15:03 +01:00
Parakoopa 97d1613421 First incomplete version of a binary interface 2021-01-31 14:15:03 +01:00
zeromus bb5849abec
Merge pull request #421 from MaddTheSane/patch-1
Add aarch64 string
2021-01-25 20:45:48 -05:00
zeromus 0942fb5c5b
Merge pull request #422 from MaddTheSane/patch-2
Update rthreads.c
2021-01-25 17:18:34 -05:00
C.W. Betts 11fe823bbd Update rthreads.c
Make it build again on macOS.
2021-01-25 14:50:44 -07:00
C.W. Betts 7f035acdaa
Add aarch64 string
Adds aarch64 to the lists of available DESMUME_PLATFORM_STRINGs.
Cherry-picked from 0d763b350a3ce0de7ee4d965ca54c5f3af4373f8.
2021-01-25 14:12:55 -07:00
zeromus 44282bc151
Merge pull request #367 from linkmauve/thread-names
Give thread names to ease debugging
2021-01-21 11:06:28 -05:00
zeromus a04ebb8743
Merge pull request #419 from nicegamer7/github-actions
Fix GitHub Actions
2021-01-21 10:42:00 -05:00
nicegamer7 b873f898c0
fix github actions 2021-01-21 10:10:47 -05:00
zeromus 21af401263 make cheat database lookup based on crc instead of game ID, which locates the wrong file half the time when the cheat DB contains two entries with the same game ID (but differing crc). Left the serial check ADDITIONALLY as a backup in case of a crc collision 2021-01-19 22:46:00 -05:00
zeromus 9836f56312 change readme.md link to downloads since by far the most important single piece of information about desmume in 2021 is that you should download it. 2021-01-12 22:09:12 -05:00
zeromus dbff32fdaa dive into the N-layer muck of zip file opening and try to run amok on filenames with weird characters in them (should fix #412) 2021-01-07 16:53:59 -05:00
Emmanuel Gil Peyrot aeaf404177 Posix: Fix a few warnings in ctrlssdl.cpp 2020-12-25 03:08:16 +01:00
Emmanuel Gil Peyrot ac507ebdc0 GTK: Move more of the graphics dialog into its .ui file 2020-12-19 04:07:07 +01:00
Emmanuel Gil Peyrot 0e5dec143f GTK: Move emulation settings to a .ui file 2020-12-19 04:04:02 +01:00
Emmanuel Gil Peyrot b4b2781826 GTK: Move the menu into its .ui file 2020-12-19 03:23:54 +01:00
Emmanuel Gil Peyrot 5e051a981d GTK: Move graphics settings into its own .ui file 2020-12-19 01:44:05 +01:00
Emmanuel Gil Peyrot 21276a5a07 GTK: Move the main window into an .ui file 2020-12-19 01:35:28 +01:00
Emmanuel Gil Peyrot b568fbc5dc GTK: Move .ui string into a GResource
This makes it easier to edit those files in Glade or such, while keeping
it inside the final binary.

As a bonus, XML data is getting minified at the packing step.
2020-12-19 01:11:07 +01:00
Emmanuel Gil Peyrot 02e49123da CLI frontend: Add missing name to gdb thread
This broke in 101fa1ef58.
2020-12-16 21:55:52 +01:00
Emmanuel Gil Peyrot d503376558 filters: Fix warnings on gcc 2020-12-16 21:21:11 +01:00
zeromus 50a24fbbd7 fixed y-sorting that was messed up by the more convoluted multi-purpose indirect clipping approach that was added in early 2019 (e.g. 4cd19ce522 and e06d11f6df )
fixes SF bug 1724 (7th dragon HP renderer) but this was probably affecting many other games.
2020-12-15 00:58:19 -05:00
zeromus b138666bf6 fix misuse of SetWindowLongPtr 2020-12-14 22:32:31 -05:00
zeromus e5a7fbe634 add a log note when creating a backup state 2020-12-09 23:09:32 -05:00
Emmanuel Gil Peyrot dc60f82ace slot2: Remove bogus const on integer return type 2020-11-27 20:29:19 +01:00
Emmanuel Gil Peyrot 4d86151839 MMU: Use correct size_t type for iterations 2020-11-27 20:20:35 +01:00
Emmanuel Gil Peyrot baccf00674 Remove bogus static function declaration in header 2020-11-27 20:18:10 +01:00
Emmanuel Gil Peyrot eab1fb9583 GTK: Add debug logging on OpenGL initialisation issues
Thanks @thesourcehim for the suggestion!
2020-11-26 19:48:17 +01:00
Emmanuel Gil Peyrot 6e35440436 GTK: Set GL attributes before creating the SDL window
This apparently helps on the proprietary Nvidia driver.

Thanks @thesourcehim for debugging that!

Fixes #399.

Fixes #400.
2020-11-26 19:48:13 +01:00
Emmanuel Gil Peyrot 91f6e4a9ef Revert "Posix: Remove X11 dependencies"
This reverts commit 48d0717f82.

It was causing crashes when running on Xorg…

Fixes #398.
2020-11-20 22:01:57 +01:00
Emmanuel Gil Peyrot 49fda66b3b CI: Install SDL2 instead of SDL 1.2 2020-11-19 02:10:01 +01:00
Emmanuel Gil Peyrot 48d0717f82 Posix: Remove X11 dependencies
There is no code specific to X11 anymore, we can stop linking to it.
2020-11-19 02:05:34 +01:00
Emmanuel Gil Peyrot d319d2c6fb GTK: Use SDL2 instead of GLX for OpenGL context creation
GLX is tied to X11, while SDL2 works on many other platforms (including
native Wayland).
2020-11-19 02:04:57 +01:00
Emmanuel Gil Peyrot 101fa1ef58 Posix: Replace SDL 1.2 with SDL2
This is required for DeSmuME to start without X11, for instance on a
pure Wayland system.
2020-11-19 01:25:47 +01:00
Emmanuel Gil Peyrot 72386f28de GTK: Remove the libglade interface
It was unmaintained anyway, and the other one is a better base to start
from.  And if someone ever needs one of these files, they are preserved
in the git history anyway.
2020-11-18 23:38:29 +01:00
Emmanuel Gil Peyrot a5f13edb7f saves: Remove unused variable 2020-11-18 23:13:03 +01:00
Emmanuel Gil Peyrot c3ea512a0b saves: Remove redundant break 2020-11-18 23:12:42 +01:00
Emmanuel Gil Peyrot 02c0553977 saves: Remove noop allocation/deallocation
Compilers (at least gcc 10) were already reaching that conclusion, so
this shouldn’t change code generation at all.

This piece of code got introduced in commit
3eb9de4614 when upgrading to save state
version 1 (we’re at version 12), and commit
64073a2558 added some OOP on top of it so
that cp15 was in charge of handling that memory.  The code never got
cleaned until now.
2020-11-18 23:08:04 +01:00
Emmanuel Gil Peyrot 87cb2f648f encrypt: Simplify initialization code
This avoids destructors being even needed.
2020-11-18 22:38:36 +01:00
Emmanuel Gil Peyrot 7de7d6c1c5 GTK: Use correct icon name
a8e581dcf3 renamed it, but it never got
updated in the UI.
2020-11-18 21:28:45 +01:00
Emmanuel Gil Peyrot 8708460666 GTK: Remove unused static variable 2020-11-18 21:28:18 +01:00
Emmanuel Gil Peyrot 19147a8457 Linux: Remove the autotools build system
Fixes #394.
2020-11-07 21:02:00 +01:00
Dan Church 7ec93bce63 GTK: Use standard meson to install man pages 2020-11-07 20:52:16 +01:00
Emmanuel Gil Peyrot 25d7194779 GTK: Install the icon at its correct location 2020-11-04 12:41:11 +01:00
Emmanuel Gil Peyrot a8e581dcf3 GTK: Also rename the icon like the desktop file 2020-11-04 11:42:38 +01:00
Emmanuel Gil Peyrot 907cbf8308 Improve ARM runtime feature detection on Linux
getauxval(AT_HWCAP) is the best way to check for features on ARM and
AArch64, as it doesn’t require parsing a file, instead it just returns a
value provided by the kernel in our address space.

This commit should be synchronised with
https://github.com/libretro/libretro-common/pull/176
2020-11-04 00:34:25 +00:00
Emmanuel Gil Peyrot 7a7c1fbfc3 GTK: Add a metainfo file for Flathub 2020-11-04 01:31:17 +01:00
zeromus 79515e978e change "freeze value" checkbox in windows internal cheats add dialog to say "Enabled" because that's what it really means 2020-11-03 12:50:33 -05:00
Emmanuel Gil Peyrot b400093e3c Linux: Make all frontends optional 2020-11-03 18:08:28 +01:00
Emmanuel Gil Peyrot 0479afb877 GTK: Remove unused GLU header 2020-11-03 17:34:37 +01:00
Emmanuel Gil Peyrot df91fe9e00 Try GitHub Actions for Linux CI 2020-11-02 17:56:52 +01:00
Emmanuel Gil Peyrot cabb0eb327 Lower meson version requirement to 0.45 2020-11-02 17:41:23 +01:00
prg318 cec553f4b9
gtk: add import/export memory menu items (#391)
GTK: Add import/export memory menu items
2020-10-29 21:59:07 +01:00
Emmanuel Gil Peyrot 64da66f37b GTK: Disable deprecated symbols altogether 2020-10-29 20:56:11 +01:00
zeromus 0d65ea6050 add code to make a backup savestate every time a slot savestate is loaded. I don't need to spell out for you which users this is for, and why they need it. 2020-10-15 16:46:16 -04:00
Emmanuel Gil Peyrot d854909b04 GTK: Fix opening a ROM from the command line
Only the first of the positional arguments is interpreted as the ROM’s
filename, because we don’t emulate multiple ROMs at once.

Fixes #382.
2020-10-03 12:37:43 +02:00
Emmanuel Gil Peyrot cb49416952 GTK: Fix gdb stub support
I never tried to build this codepath, this is now done.

Fixes #381.
2020-10-03 12:36:56 +02:00
zeromus e07e5e5db4
Merge pull request #380 from thesourcehim/master
GTK: fixed LCD layout switching
2020-09-27 14:23:35 -04:00
thesource 905de91c96 Fixed LCD layout switching 2020-09-27 11:10:14 +03:00
Emmanuel Gil Peyrot 8aaabb9b05 meson: Fix building with -Dwifi=true 2020-09-25 21:52:41 +02:00
Emmanuel Gil Peyrot 59c2b8a990 meson: Add back forgotten manpages
Thanks @dantob for noticing that on the AUR package.
2020-09-25 21:48:24 +02:00
Emmanuel Gil Peyrot 626d5b4d36 GTK: Replace the logo with a SVG version
This makes it render crisp on desktop environments which use an icon
size bigger than 32×32, such as GNOME.
2020-09-25 21:38:18 +02:00
Emmanuel Gil Peyrot 0896b99b49 README.LIN: Direct to release builds by default
Fixes #376.
2020-09-22 12:04:24 +02:00
zeromus e38e98714e
Merge pull request #378 from thesourcehim/master
Add missing libsoundtouch define for meson
2020-09-21 14:44:48 -04:00
thesource 50abbbafa7 Add missing libsoundtouch define for meson 2020-09-21 21:13:15 +03:00
Emmanuel Gil Peyrot 5552ef11c0 GTK: Add missing guards for HUD actions
Fixes #377.
2020-09-21 14:55:44 +02:00
Emmanuel Gil Peyrot 35c44285a8 README.LIN: Update from autotools to meson 2020-09-20 22:49:40 +00:00
davg-qqq ba92804d9f GTK: Update autotools config to use gtk3
This will depend on 3.24 as this is the only version I have available.
If someone else confirms it works on an older version we can lower it.
2020-09-20 22:42:48 +00:00
Emmanuel Gil Peyrot 0abe38ce76 GTK: Fix build with AGG
This was prevending HUD from building.  Note that this doesn’t make it
work fully yet, as the pixel format seems wrong, as if AGG was assuming
RGB888 while the buffer is actually RGBx8888 or something like that.

Fixes #375.
2020-09-20 22:39:25 +00:00
Emmanuel Gil Peyrot 383e315b21 meson: Downgrade minimum version to 0.53
I tested it on Ubuntu 20.04 and it works properly.
2020-09-20 21:01:31 +00:00
Emmanuel Gil Peyrot 46c7e34439 meson: Add missing dependency on threads
Thanks @davg-qqq for noticing, I could reproduce on Ubuntu 20.04, but
not on ArchLinux, where I originally wrote this code.
2020-09-20 21:01:17 +00:00
zeromus 2ac787a855
Merge pull request #370 from linkmauve/fixup
Fix two issues in the recent GTK+ move
2020-09-09 18:05:53 -04:00
Emmanuel Gil Peyrot bfeff3fe66 GTK: Restore content scaling
It had been broken in eabfcb71be when
moving from GtkVBox to GtkBox removed homogeneous=false.
2020-09-09 23:54:06 +02:00
Emmanuel Gil Peyrot 3ecbb29863 GTK: Fix a build issue in a lambda
It wasn’t correctly capturing its outer variable.
2020-09-09 23:53:20 +02:00
zeromus 5dd62b214b
Merge pull request #368 from linkmauve/gtk3
Port DeSmuME to GTK+ 3.24
2020-09-09 17:20:13 -04:00
Emmanuel Gil Peyrot a1ea27d7f9 GTK: Restore the open recent submenu
This now only uses GtkRecentManager to populate the menu.
2020-09-09 23:17:43 +02:00
Emmanuel Gil Peyrot 7435ffaefd GTK: Restore savestate menu
This is now using an action parameter to send the slot to save to/load
from.

There was a previous comment about Shift-Fn being broken and a
workaround using Key_Press(), but it doesn’t seem to be broken anymore
so we can use the accelerators instead and remove a static variable.
2020-09-09 22:46:39 +02:00
Emmanuel Gil Peyrot 5629855183 GTK: Properly guard HUD function when AGG isn’t found 2020-09-04 14:40:51 +02:00
Emmanuel Gil Peyrot 74cd070e61 GTK: Reimplement the toolbar using GtkBuilder 2020-09-04 14:40:50 +02:00
Emmanuel Gil Peyrot ef0e3b3adf GTK: Migrate from GtkAction to GAction 2020-09-04 14:40:32 +02:00
Emmanuel Gil Peyrot 0c9a8a5282 GTK: Replace deprecated gdk_window_get_pointer() with gdk_window_get_device_position() 2020-09-01 20:47:44 +02:00
Emmanuel Gil Peyrot 3c32aeb0f5 GTK: Replace deprecated GtkHButtonBox with horizontal GtkButtonBox 2020-09-01 20:47:44 +02:00
Emmanuel Gil Peyrot ad9e7e8be1 GTK: Replace deprecated GtkHRange with horizontal GtkRange 2020-09-01 20:47:44 +02:00
Emmanuel Gil Peyrot 2423a9bb5e GTK: Replace stock texts with their actual string 2020-09-01 20:47:44 +02:00
Emmanuel Gil Peyrot 96bc8977bd GTK: Replace GtkTable with GtkGrid, in a UI string 2020-09-01 20:47:44 +02:00
Emmanuel Gil Peyrot d680c4be51 GTK: Use modern GDK accessors to its Cairo context 2020-09-01 20:47:44 +02:00
Emmanuel Gil Peyrot 13b5c0fd01 GTK: Migrate from gtk_main() to GtkApplication
This will make it possible to use GAction to replace the deprecated
GtkAction and GtkToggleAction and such.
2020-09-01 20:47:44 +02:00
Emmanuel Gil Peyrot cc9d7a1450 GTK: Replace GtkFileChooserDialog with GtkFileChooserNative
This one uses the native file chooser the user is used to, which can be
GTK’s on Linux but a more familiar one on other OSes.  If
xdg-desktop-portal is installed, it can even use the DE’s native one on
Linux.
2020-09-01 20:47:44 +02:00
Emmanuel Gil Peyrot c1efe4f475 GTK: Remove usage of deprecated GtkMisc 2020-09-01 20:47:44 +02:00
Emmanuel Gil Peyrot eabfcb71be GTK: Replace deprecated GtkVBox/GtkHBox with GtkBox 2020-09-01 20:47:44 +02:00
Emmanuel Gil Peyrot e4b07d2f4d Name various threads to ease debugging 2020-09-01 00:05:27 +02:00
Emmanuel Gil Peyrot 5428763559 task: Add the ability to name threads 2020-08-31 23:56:14 +02:00
Emmanuel Gil Peyrot e70e065ffe rthreads: Add the ability to name threads 2020-08-31 23:56:14 +02:00
Emmanuel Gil Peyrot 917db3ecac rthreads: Fix documentation (void function doesn’t return) 2020-08-31 23:56:14 +02:00
Emmanuel Gil Peyrot 4c53f62967 GTK: Remove deprecated gtk_widget_modify_bg()
If we want to change the style of a widget, we should use CSS nowadays.
2020-08-29 23:13:24 +02:00
Emmanuel Gil Peyrot e808897c47 GTK: Reenable deprecation warnings
At this point we got a fully (?) functional gtk3 port, but it uses a ton
of deprecated functions that will be removed in gtk4.  Better enable the
warnings so that we know what to fix before then.
2020-08-29 20:53:15 +02:00
Emmanuel Gil Peyrot 81f0ded5b6 GTK: Restore drawing capability
The expose_event signal has been renamed draw.
2020-08-29 20:53:15 +02:00
Emmanuel Gil Peyrot 89f5e50039 GTK: Use accessor to retrieve GtkAdjustment value 2020-08-29 20:53:15 +02:00
Emmanuel Gil Peyrot 87c2377c6a GTK: Fetch widget’s window with the relevant function
At this point, this version builds.  It is full of deprecated widgets
and functions though, which will have to be cleaned over time.  It also
doesn’t display any visuals in the DS emulation part yet.
2020-08-29 20:53:15 +02:00
Emmanuel Gil Peyrot cdbad3d05a GTK: Fetch dialogs’ content area with the relevant function 2020-08-29 20:53:15 +02:00
Emmanuel Gil Peyrot 3927aa4422 GTK: Rename GDK keys to their new name 2020-08-29 20:53:15 +02:00
Emmanuel Gil Peyrot 70733a55b4 GTK: Switch to gtk3 instead of gtk2
All deprecation warnings are disabled for now, they will be reenabled at
a later point.
2020-08-29 20:53:15 +02:00
Emmanuel Gil Peyrot 6823aed6dd GTK: Add a meson build system 2020-08-29 20:53:15 +02:00
Emmanuel Gil Peyrot 2a5150ff7d GTK: Add missing include when neither OSMesa nor GLX are enabled 2020-08-29 04:06:56 +02:00
Emmanuel Gil Peyrot 8e31ecd9c4 Remove executable bit from source files 2020-08-29 01:31:52 +02:00
zeromus f6064006d2 re-add windows specific stuff, properly ifdefing it? (should fix #360) 2020-08-19 17:11:27 -04:00
zeromus 79c6ab430a
Merge pull request #357 from Yackerw/master
Add many debugging features
2020-08-19 00:39:22 -04:00
zeromus e654d1e7e9 winport - fix OamView bug (proper obj priority wasn't being used when rendering it, causing many composite sprites to be rendered more or less in the opposite Z-order due to LATER obj drawing on top (whereas lower obj are supposed to draw on top). fixes #358 2020-08-16 19:38:58 -04:00
Yackerw 7591028509 Removed Windows specific stuff 2020-08-15 20:07:34 -04:00
Yackerw 5bd5c630f1 Added debugging tools
Breakpoints, memory breakpoints, made disassembler better in general
2020-08-15 16:02:38 -04:00
zeromus 316103d2ec
Merge pull request #352 from PypeBros/master
Fix directory crawling on symlink-capable systems
2020-08-06 14:47:48 -04:00
PypeBros 5a368922c9 Fix directory crawling on symlink-capable systems 2020-08-06 18:34:14 +02:00
zeromus 209dfca35f fix chinese filenames in savestates and dct files (fixes #343) 2020-07-12 14:33:26 -04:00
zeromus fc3d81e73a cleanups related to prior commits 2020-06-18 15:58:16 -04:00
Mattia Rombi 622b763bf1 Use DeSmuME name - but not in firmware.cpp
1. didn't like every line in the file being touched
2. DESMUME_NAME is cosmetic; it may have had special meaning in this file. I didnt feel like investigating it any more
2020-06-18 15:53:21 -04:00
Mattia Rombi ebf073e5c0 Update .gitignore for Visual Studio 2020-06-18 21:14:50 +02:00
Mattia Rombi 357843c543 winport: add title size check and fixed code style/typo 2020-06-18 21:14:50 +02:00
Mattia Rombi 3466c7f69a winport: update main window title with current game 2020-06-18 21:14:50 +02:00
zeromus 3ec927de75
Merge pull request #331 from thesourcehim/master
GTK: fix audio interpolation mode not being saved or loaded from config
2020-05-10 09:32:05 -04:00
thesource f007ef655e GTK: fix audio interpolation mode not being saved or loaded from config 2020-05-10 16:29:01 +03:00
zeromus 255f5c8b91
Merge pull request #330 from davg-qqq/feat-linux-msaa-ui
Linux GTK Port: Fix config for new MSAA options
2020-05-08 18:18:27 -04:00
davg-qqq 4186c33745 Linux GTK Port: Fix config for new MSAA options
a289055e removed the code that updated the old "multisampling enabled"
config. This fix adds a new config value for the multisampling size and
updates the old config in sync. When loading the config, the new
multisampling size value is prioritized, but if it is 0 (possibly not set)
then it falls back to the previous logic using the old boolean config
value.
2020-05-09 00:07:38 +02:00
zeromus 1305dd1e49
Merge pull request #329 from davg-qqq/feat-linux-msaa-ui
Linux GTK Port: Add more detailed MSAA options
2020-05-08 16:36:14 -04:00
davg-qqq a289055e1c Linux GTK Port: Add more detailed MSAA options 2020-05-08 22:21:18 +02:00
zeromus 76fafe0230 winport - fix drag & drop and recent roms menu so I can verify whether any of that stuff works in chinese 2020-05-05 02:00:58 -04:00
zeromus d4c17e5f8d winport - fix some unicode file opening crap 2020-05-05 01:49:14 -04:00
zeromus 1cc14031c9
Merge pull request #327 from davg-qqq/fix-osmesa-crash
Fix unhandled null causing crash when using osmesa with nvidia driver
2020-05-03 16:52:43 -04:00
davg-qqq a1791a24f0 Fix unhandled null causing crash when using osmesa with nvidia driver 2020-05-03 19:34:49 +02:00
zeromus d556c99771 Merge branch 'master' of https://github.com/TASVideos/desmume 2020-04-27 20:29:05 -04:00
zeromus 55253504e3 fix spurious warning in exporting battery save memory even when it works (fixes #325) 2020-04-27 20:28:56 -04:00
zeromus 2d1eee284c
Merge pull request #323 from lucianposton/fix-glade
Fix glade UI file path in local builds
2020-04-23 07:27:27 -04:00
Lucian Poston 827af7a494
Update GLADEUI_UNINSTALLED_DIR to current dir hierarchy 2020-04-23 05:21:15 -05:00
Lucian Poston bf5065859b
Add debug output when failing to find glade ui file 2020-04-23 05:19:50 -05:00
zeromus 7fdf800b58 fix ddraw HW breaking after windows lock screen 2020-04-22 15:47:31 -04:00
zeromus c52ee0386e remove accidental debug code ("DebugBreak") 2020-03-31 20:02:03 -04:00
zeromus 5f76ba8bb3 I couldn't make any sense out of the wifi saving code, and I was pretty sure I saw a variable not getting saved, so I redid it. Did I do it right? I don't know, you tell me. Also in this commit I reformatted all of wifi.cpp because I had lost 10 minutes or more to not being able to find `variable = value` or `variable=value` due to it being inexplicably `variable\t=value` all over that file and uhmmmmmmmmmmmm no. 2020-03-31 00:18:54 -04:00
zeromus 600957a840 fix compilation issue when logging is enabled 2020-03-31 00:17:19 -04:00
zeromus 347a3aa833 remove x86 from windows port since there are now known code generation bugs in the wifi which definitely pose user-facing problems 2020-03-31 00:16:57 -04:00
zeromus d787b737e3 winport: dont crash if hitting ctrl+r when no rom is loaded 2020-03-05 23:44:27 -05:00
zeromus bca921ddae
Merge pull request #316 from perallard/master
Issue: can't compile on Arch Linux #304
2020-01-20 16:15:36 -05:00
Per Allard f814164de2 Issue: can't compile on Arch Linux #304
The build failure(s) come from the fact that the posix frontends currently
use deprecated functions for multi-threading. The offending functions are:
g_thread_create and g_thread_supported, both deprecated since 2.32.
g_thread_create is replaced by g_thread_new and g_thread_supported is no
longer needed at all for glib >= 2.32 threading is automatically initialized
when the program starts.
2020-01-16 23:29:01 +01:00
zeromus ce2c1a6774
Merge pull request #312 from sietschie/master
set fullscreen background to black for gtk frontend
2019-12-11 10:54:15 -05:00
sietschie 25f7469920 set fullscreen background to black for gtk frontend 2019-12-11 14:18:51 +01:00
zeromus 7a3699aba6
Merge pull request #308 from astoliar/fix_to_compile_offsetof
Fix to compile with gcc
2019-11-20 14:58:02 -05:00
Andres Stoliar 3658f3c949 Fix to compile with gcc 2019-11-20 10:58:53 -03:00
zeromus 7df351850c
Merge pull request #306 from Aikku93/patch-1
Add interpolation at loop boundary
2019-10-28 01:08:46 -04:00
Ruben 0dc75ca089
add interpolation at loop boundary
Fixes crackling in small streams and correctly interpolates chip-style samples
2019-10-28 15:28:09 +11:00
zeromus 46980d7732 fix crc calculation method for cheats DB 2019-09-25 22:04:58 -04:00
zeromus 9e6b4f128f
Merge pull request #289 from YuGiOhJCJ/gtk-warning-fix-1
Move a statement later to avoid a GTK warning
2019-07-28 02:27:24 -04:00
Your Name b9317ad184 * desmume/src/frontend/posix/gtk/main.cpp(common_gtk_main): Modify a multiline comment to be a single line comment.
* desmume/src/frontend/posix/gtk/main.cpp(common_gtk_main): Add a comment to indicate that moving the following instruction implies that a GTK warning is shown.
* desmume/src/frontend/posix/gtk/main.cpp(common_gtk_main): Move a statement later to avoid a GTK warning.
2019-07-28 08:10:55 +02:00
zeromus 2185b6adfe
Merge pull request #288 from YuGiOhJCJ/gtk-firmware-language
Add the "Set firmware language" menu item
2019-07-26 08:50:05 -04:00
YuGiOhJCJ 07576fea31 * desmume/src/frontend/posix/gtk/config_opts.h: Add the "command_line_overriding_firmware_language" option.
* desmume/src/frontend/posix/gtk/config_opts.h: Add the "firmware_language" option.
* desmume/src/frontend/posix/gtk/main.cpp: Add the "setfirmwarelanguage" menu item.
* desmume/src/frontend/posix/gtk/main.cpp: Add the "setfirmwarelanguage" action entry.
* desmume/src/frontend/posix/gtk/main.cpp(CallbackSetAudioVolume): Fix its parameters ("*" attached to the name rather than the type).
* desmume/src/frontend/posix/gtk/main.cpp(SetAudioVolume): Fix its indentation (spaces replaced by a tab).
* desmume/src/frontend/posix/gtk/main.cpp(SetFirmwareLanguage): Add this function.
* desmume/src/frontend/posix/gtk/main.cpp(CallbackSetFirmwareLanguage): Add this function.
* desmume/src/frontend/posix/gtk/main.cpp(common_gtk_main): If the command line overriding is enabled, then use the language set on the GUI.
2019-07-26 08:48:18 +02:00
zeromus 1e0a29ee27
Merge pull request #287 from YuGiOhJCJ/gtk-audio-volume
Add the "Set audio volume" menu item
2019-07-24 03:09:57 -04:00
YuGiOhJCJ ac42f1d1bf * desmume/src/frontend/posix/gtk/config_opts.h: Add the "audio_volume" option.
* desmume/src/frontend/posix/gtk/main.cpp: Add the "setaudiovolume" menu item.
* desmume/src/frontend/posix/gtk/main.cpp: Add the "setaudiovolume" action entry.
* desmume/src/frontend/posix/gtk/main.cpp(SetAudioVolume): Add this function.
* desmume/src/frontend/posix/gtk/main.cpp(CallbackSetAudioVolume): Add this function.
* desmume/src/frontend/posix/gtk/main.cpp(common_gtk_main): Add the "SNDSDLSetAudioVolume" function call.
* desmume/src/frontend/posix/shared/sndsdl.cpp: Add the "audio_volume" global variable.
* desmume/src/frontend/posix/shared/sndsdl.cpp(MixAudio): Add the "SDL_MixAudio" function call.
* desmume/src/frontend/posix/shared/sndsdl.cpp(SNDSDLGetAudioVolume): Add this function.
* desmume/src/frontend/posix/shared/sndsdl.cpp(SNDSDLSetAudioVolume): Add this function.
* desmume/src/frontend/posix/shared/sndsdl.h: Add the "audio_volume" global variable.
* desmume/src/frontend/posix/shared/sndsdl.h(SNDSDLGetAudioVolume): Add this function.
* desmume/src/frontend/posix/shared/sndsdl.h(SNDSDLSetAudioVolume): Add this function.
2019-07-24 08:20:18 +02:00
rogerman de198c00a0 Colorspace Handler: Add support for AVX-512, new 16-bit to 32-bit alpha agnostic conversion functions, and minor optimizations to some functions.
- New 16-bit to 32-bit alpha agnostic conversion functions: ColorspaceConvert555XTo888X_*(), ColorspaceConvert555XTo666X_*().
- Minor optimizations to the following functions: ColorspaceConvert555To8888_*(), ColorspaceConvert555To6665_*(), ColorspaceApplyIntensity32_*().
2019-05-20 14:57:34 -07:00
zeromus 2d2320f4d1
Merge pull request #276 from fpscan/patch-4
typo related updates
2019-05-07 19:46:32 -04:00
Ömercan Kömür 8a826d4230
Update resources.rc 2019-05-08 00:38:15 +03:00
Ömercan Kömür 6cf9f1a98d
typo related updates
Since full text unable to read when it was 35, changed to 71, so its readable right now.
Typo corrected
Added Windows Border to sound setting to make it more important
“Wi-fi” is used to certify the interoperability of wireless computer networking devices. So Wifi changed to Wi-fi
2019-05-07 23:49:29 +03:00
zeromus 79633495c4
Merge pull request #275 from fpscan/patch-1
update reoursces.rc
2019-05-07 15:11:25 -04:00
Ömercan Kömür 85cb5b6c65
update reoursces.rc
Missed Caption added
2019-05-07 22:06:35 +03:00
zeromus 21df3059f4
Merge pull request #274 from awforsythe/master
Clarify parameter names for gui.setlayermask
2019-05-04 21:53:26 -04:00
Alex Forsythe 6e5c9dbaf8 Clarify parameter names for gui.setlayermask
This is a tiny follow-up to PR #273, with no actual changes in
functionality. In short:

- gui.setlayermask(top, bottom) -> gui.setlayermask(main, sub)

Display layers correspond to GPU (main or sub), not to screen (top or
bottom), so this change just updates the Lua parameter names to reflect
that.
2019-05-04 01:02:32 -05:00
zeromus be7f22a7f9
Merge pull request #273 from awforsythe/master
Add Lua function gui.setlayermask
2019-05-04 00:16:37 -04:00
Alex Forsythe cc9335eea6 Add Lua function gui.setlayermask
This change adds a Lua function called gui.setlayermask, which allows Lua
scripts to procedurally modify which render layers are visible. It takes
two arguments: one integer bitfield representing the visibility states for
the main GPU, and the other representing the sub GPU. For example: 0b11111
shows all layers, 0b00000 hides all layers, 0b00001 shows only layer 0
(BG0), 0b10000 shows only layer 5 (OBJ), etc.

Since display layer state is coupled to the frontend, and since frontends
are entirely separate between platforms (i.e., on Windows, toggling
display layer state requires updating the GUI state asl well), this
function is only supported and tested on the Windows build. On MacOS and
Linux, gui.setlayermask will simply return 0 without doing anything.
2019-05-03 21:51:07 -05:00
zeromus 851274b3e8
Merge pull request #269 from Prof9/master
Fix Action Replay DS code type 0x0E
2019-04-24 14:19:57 -04:00
Prof. 9 5c557440d7 Fix Action Replay DS code type 0x0E patch lines not being skipped over when execution status is false. 2019-04-24 20:05:49 +02:00
zeromus 463fc545b7
Merge pull request #268 from Jules-A/msvc2019
Fix MSVC2019 solution loading and compiling
2019-04-24 13:59:34 -04:00
Jules Anthony cc4446ab29 Fixes MSVC2019 solution loading and compiling. Due to 2019 dropping XP support by default, anyone needing XP compiles will need to download the v141 toolkit as an extra and manually configure TargetPlatform and PlatformToolset. 2019-04-24 18:35:44 +08:00
zeromus 55c158d305 fix lua random crash / unreliability introduced by commit 43fcaf68f1
fix strange non-functional static-assert-likes designed to prevent this problem, by turning them into actual static asserts
2019-04-19 16:18:29 -04:00
rogerman ce8275fca1 Render3D: Add an actual AVX2-accelerated code path for setting up clear images. 2019-03-22 00:25:38 -07:00
rogerman 331cfa3596 Render3D: Demote some functions and classes to only require AVX instead of AVX2 where appropriate. 2019-03-21 22:43:09 -07:00
rogerman 96df0343f7 GPU: The info for native lines and custom lines are now handled at the display level rather than at the engine level. By doing this, we no longer assume that engines will maintain a constant association to a particular display for all lines; rather, we now take into account that an engine/display association may change mid-frame. Fixes #132. 2019-03-21 21:18:50 -07:00
zeromus f0737b679f winport - change mic sequence loading to use _0 as a signal, and fix bug in paths with . earlier in the name before the extension 2019-03-19 14:18:02 -04:00
rogerman be2735b3c5 OpenGL Renderer: Fix bug where resizing the framebuffer may cause subsequent rendering to fail. This bug affected OpenGL 3.2 only. (Regression from commit fa8cf5a.) 2019-03-18 00:03:03 -07:00
rogerman fe428fdda0 Cocoa Port: Fix bug where the HUD would appear smaller than intended on Retina displays.
- Also make the HUD scaling curve more precise.
2019-03-17 23:32:01 -07:00
rogerman c6269ca7ff Firmware: Initializing the fake firmware and applying the firmware settings from an internal firmware config struct are now split into separate operations. This allows the user to freely choose between using internal firmware config or using an external firmware.dfc file for their firmware settings, regardless of whether or not they are booting from external firmware. Fixes #259.
- Also fixes a compiling issue with compilers that are not MSVC 2015 or later. (Regression from commit ac94244.)
2019-03-17 21:55:00 -07:00
zeromus 175a471e5e actually limit mic samples to 254 2019-03-17 23:38:34 -04:00
zeromus ac94244757 support recording mic samples in header and current mic sample selection. tested reading and writing, but no more thoroughly than that. this requires a new movie version (mic sample selection stored kind of like an analog coord, a 3-digit number in dsm) 2019-03-17 23:34:54 -04:00
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
zeromus b5477b608b
Merge pull request #236 from NetwideRogue/master
don't clobber existing screenshots
2018-12-06 08:08:40 -06: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
zeromus fe93b70de8
Merge pull request #233 from Jules-A/hideConsole
[Windows] Hide the console window in the current session when disabling in menu.
2018-12-02 11:00:52 -06: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
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
Jules.A 3fd42ae720 WIP Updates. 2018-10-24 04:41:15 +08:00
rogerman ff84420424 OpenGL Renderer: Improve robustness when changing the MSAA sample size. 2018-10-23 00:04:28 -07:00
rogerman d85f140b64 Cocoa Port: Sigh... let's try to fix building this time... 2018-10-22 13:17:31 -07:00
rogerman 0ef9543f87 Cocoa Port: Oops! Fix a compiling issue caused by commit 5d3e53d. 2018-10-22 13:01:42 -07:00
rogerman 5d3e53d804 Cocoa Port: Expose the new user-selectable MSAA sample size feature in the UI that was introduced in commit 94ddf1a.
- Also add some other future UI-related stuff that was already in-flight at the time of this commit.
2018-10-22 12:33:04 -07:00
rogerman 68174fb31f movie.cpp/movie.h: Fix compiling issues for old GCC 4.2, which doesn't allow for variable initialization in C++ class declarations. (Regression from commit e83ec89.) 2018-10-22 11:38:06 -07:00
Roger Manuel acf49dfa01
Merge branch 'master' into antialiasing_settings 2018-10-22 11:08:49 -07:00
rogerman 94ddf1a467 OpenGL Renderer: The MSAA sample size is no longer automatically selected and must now be manually selected via GFX3D_Renderer_MultisampleSize.
- All frontends will need to be updated to use the new GFX3D_Renderer_MultisampleSize setting.
- This change obsoletes GFX3D_Renderer_Multisample, which currently does nothing at the moment. It will be removed after all frontends are updated.
2018-10-22 10:32:16 -07:00
rogerman a894000333 matrix.cpp Fix a bug with _Vec3_MultiplyByMatrix() returning an incorrect value on SSE4.1. 2018-10-20 14:53:49 -07:00
matthias gatto 2dfc7866d0 dlditool: fix redefinition of VERSION 2018-10-20 07:30:22 +02:00
matthias gatto bf3e1b1cf3 posix: fix deprecated warning about g_thread_init
problems with the old if, is that the code still compiled(but optimised out)
as g_thread_supported is a macro, #if work well enouth and doesn't generate
warning
2018-10-20 07:27:28 +02:00
matthias gatto 50755c6a45 ROMReader: fix specified bound depends on the length of the source argument
It seems gcc have a (new ?) warning that doesn't allow *ncpy functions
to have any source length related value as len argument.

I've use strdunp to fix this, but I guess there is some other solutions
that doesn't require free.
use c++ strings ?
use strcpy(...); tmp1[strlen(filename) - 4] = 0; ... ?
remove the warning in the Makefile ?

but as the strdump solution is simple enouth I've keep this.
2018-10-20 07:15:48 +02:00
rogerman 68e91ec57f OpenGL Renderer: Fix a bug with the MSAA automatic selector where the MSAA sample size would be selected based on the PREVIOUSLY set framebuffer size, even though the selection should be based on the CURRENTLY set framebuffer size. 2018-10-19 16:33:37 -07:00
Jules.A 1010709de2 Fix #c65ec32 illogical operators (|| instead of &&), save to ini straight away to avoid wrong value being displayed there and don't bother creating another variable to try make a turd prettier. 2018-10-17 22:40:54 +08:00
Jules.A c65ec323ef Default to 8 if invalid uservalue is entered, add a check so it won't be set to 2x if limiting is disabled and clean up settings interface more. 2018-10-17 21:18:58 +08:00
Jules.A d818155e8e Fixed settings not getting instantly updated causing MSAA sample checkboxes to not be disabled. 2018-10-17 03:51:21 +08:00
Jules.A faeced5c66 Clean up interface. 2018-10-17 02:24:23 +08:00
Jules.A 118b629728 Be more specific for VS2017 ignores. 2018-10-17 01:21:25 +08:00
Jules.A c53f9632ed Change from "force" to "limit", half sample amount since x16 was pointless and remove some unneeded logic. 2018-10-17 01:01:45 +08:00
Jules.A d045b9fa34 Initial AntiAliasing Settings. 2018-10-16 20:39:12 +08:00
zeromus 01225c65ee
Merge pull request #203 from QueeferSutherland/master
added support for joystick axes to lua function, controller.get()
2018-10-12 00:46:28 -04:00
QueeferSutherland b9829ba349
added support for joystick axes to lua function, controller.get() 2018-10-12 00:19:39 -04:00
matthias gatto 8c6c2e8071 threads: fix implicit declaration of memset 2018-10-11 23:22:21 +02:00
rogerman da714ea719 WiFi: Standardize the handling of received packets for both Ad-hoc and Infrastructure modes.
- Received packets are now queued properly and should no longer be overwritten or lost.
- Received packets under Ad-hoc mode now use the same transfer delay as Infrastructure mode. (Read one halfword every 8 microseconds.)
- Received packet transfer delay only works when the emulation level is set to WifiEmulationLevel_Compatibility. Transfer delay can be disabled by setting the emulation level to WifiEmulationLevel_Normal, which will cause the entire received packet to be transferred immediately.
2018-10-09 15:32:11 -07:00
rogerman 4e92d24b14 WiFi: Some more minor code cleanup. 2018-10-08 13:50:25 -07:00
rogerman e3653b76ce WiFi: Clean up and refactor some more stuff, mostly related to LLC/SNAP encapsulated 802.11 frames. 2018-10-07 21:02:19 -07:00
rogerman 7fda7997b2 MMU.cpp: Only report a VCOUNT change if the new value differs from the existing value. 2018-10-07 14:35:25 -07:00
rogerman f67154484f WiFi: Do a whole bunch of code cleanup, as well as some minor behavioral changes which are listed below.
- If the WiFi emulation level is Off, then always set POWER_US.Disable = 1.
- If POWER_US.Disable == 1, then do not trigger any further WiFi actions.
- The name contained within DeSmuME's frame header has been changed from "NDSWIFI\0" to "DESMUME\0".
- DeSmuME's frame header size has been increased from 12 bytes to 16 bytes.
- Baseband data is now set to a default dataset on reset.
- Baseband data reads/writes now respect the actual R/W behavior of each data byte.
2018-10-05 18:31:55 -07:00
zeromus 5ebc0ca21d
Merge pull request #201 from cbranch/cbranch/fix-pos-test-arm64
Fix undefined behaviour converting 3D postest registers
2018-10-05 18:17:20 -04:00
Chris Branch af205cf582 Fix undefined behaviour converting 3D postest registers
If the position test register is negative, conversion to unsigned
integer is undefined. This breaks games on arm64 where the behaviour is
defined as 'truncate to zero'. Converting to a signed integer first
guarantees the intended behaviour.
2018-10-05 22:59:06 +01:00
zeromus c741f37c11 Merge branch 'newluastuff'
fixes #198

# Conflicts:
#	desmume/ChangeLog
#	desmume/src/Makefile.am
#	desmume/src/OGLRender.cpp
#	desmume/src/OGLRender.h
#	desmume/src/OGLRender_3_2.cpp
#	desmume/src/OGLRender_3_2.h
#	desmume/src/render3D.cpp
#	desmume/src/render3D.h
2018-10-04 22:52:31 -04:00
zeromus ad2dafe661 add lua apis for raw joystick input (on windows, anyway) 2018-10-04 22:43:21 -04:00
rogerman 151b577cc0 GFX3D: Fix compiling for ports that don't support Lua. (Regression from commit 43fcaf6.) 2018-10-03 01:06:42 -07:00
zeromus 43fcaf68f1 add "ability to move camera" (aka freelook). it requires use of a lua script to actually control the matrix switcheroo
re: #130
2018-10-03 03:18:16 -04:00
zeromus d6babce9b7 winport - add some kind of hack to exit the emulator better whenever a lua script is running 2018-10-03 03:13:48 -04:00
zeromus 0406828da2 winport - don't break build if git isn't found in environment
fixes #186
2018-10-03 00:55:51 -04:00
rogerman e6b3dfd5bd Cocoa Port: Sigh... replace the pipe character '|' with a double-dash '--' so that the generated .xcscheme file names won't screw up the file systems of lesser operating systems (cough... Windows... cough). 2018-09-26 02:44:39 -07:00
rogerman d9aa1ac31e Cocoa Port: Update all build schemes in "DeSmuME (Latest).xcodeproj" for compatibility with Xcode 10. 2018-09-26 02:26:19 -07:00
rogerman a857e0e65c ROMReader.cpp: Fix compiling on non-Windows systems. (Regression from commit 12c9323.) 2018-09-22 13:41:28 -07:00
zeromus 12c93232b9 winport - minimal work to get wacky characters filenames loading via file menu
fixes #192
2018-09-22 15:56:02 -04:00
zeromus 1b10b39603 fix bugs in utf8/utf16 string conversion functions dating back to libretro-common installation 2018-09-22 15:55:09 -04:00
rogerman acb140209a GPU: Make the overall functionality of CopyLineExpand() and CopyLineReduce() more complete. Also do some small optimizations to GPUEngineBase::_LineCopy() while I'm at it.
- GPUEngineBase::_LineCopy() optimizations only apply to 2x, 3x, and 4x scaling.
- Add SSE2 version of 3x CopyLineExpand() when using ELEMENTSIZE==1.
- Add SSE2 versions of CopyLineReduce() and add specific 2x/3x/4x versions of CopyLineReduce_*() algorithms.
- CopyLineExpand() now supports vertical scaling in addition to horizontal scaling.
- GPU buffers that were previously only cache-aligned are now page-aligned if appropriate.
2018-09-19 16:06:39 -07:00
rogerman 7c80205a40 Render3D: Small optimization to scrolling clear images on non-SSE2 systems.
- Also fix a depth bug for scrolling clear images on SSE2 systems by disabling the SSE2-specific code. This issue will need to be researched at a later date.
2018-09-19 15:51:58 -07:00
rogerman 1767651b19 Fix all current build issues for all non-Windows platforms. Truly fixes #191. (Regressions from commit e697391 and commit b8ebe97.) 2018-09-15 14:50:11 -07:00
zeromus 5bb4437720 fix movie.cpp 2018-09-15 17:21:06 -04:00
zeromus 1a34cfae5f fix posix build error in wifi.h. fixes #191 2018-09-15 16:59:18 -04:00
zeromus 0c6f18d5eb fix replay-related posix build error 2018-09-15 16:58:10 -04:00
zeromus e09f269914
Merge pull request #188 from SuuperW/paths
Paths
2018-09-13 18:44:47 -04:00
zeromus e828070d4d
Merge pull request #187 from SuuperW/movies
Movies
2018-09-13 18:44:28 -04:00
rogerman b8ebe973b9 WiFi: Huge code cleanup and refactor, mostly reworking register handling.
- Note that functionality should remain practically the same as before. Any actual functional changes are completely unintentional.
2018-09-12 16:54:33 -07:00
SuuperW 35337a562a fix commit 910661f 2018-09-07 16:34:31 -05:00
SuuperW 910661f982 (Windows) Switch Record WAV to use the same directory as Record AVI. 2018-09-07 16:24:02 -05:00
SuuperW 39f473c590 (Windows) Save selected WAV path 2018-09-07 16:14:00 -05:00
SuuperW 3b310082dc (Windows) Properly set ofn.lpstrFile for import/export sav and for recording AVI/WAV 2018-09-07 16:12:54 -05:00
SuuperW 0cb3bbe87d Format code. (mostly fixing indentation) 2018-09-05 00:39:12 -05:00
SuuperW aaad5e63c5 (Windows) Save and use all config paths.
Add StateSlots path to avoid losing saved slot states when user manually selects a file to load elsewhere.
2018-09-05 00:27:49 -05:00
SuuperW e2d83f99fe Support type string in setpath, use new method in several places.
Make SwitchPath check for all directory delimiters when removing trailing delimiter, remove redundant trailing delimiter logic in CFIRMWARE::GetExternalFilePath().
2018-09-04 12:14:02 -05:00
SuuperW 524997e406 clean up Path::IsPathRooted 2018-09-04 11:23:11 -05:00
SuuperW c9c6049892 Move PathInfo method definitions to .cpp file. 2018-09-04 00:26:34 -05:00
SuuperW 407b01b39d (Windows) Set default path for exporting a save to path.BATTERY (same as importing a save) 2018-09-03 06:02:01 -05:00
SuuperW 4c5842d2aa code cleanup 2018-09-03 05:42:30 -05:00
SuuperW 2a7103ec0b Save movie's savestate to a separate file instead of encoding it in the movie file. (This gives significantly faster performance, and will make it easier for the user to edit the starting savestate if need be.) 2018-09-03 05:35:05 -05:00
SuuperW e697391dfd Support recording/playing movies starting from a savestate. 2018-09-03 01:05:41 -05:00
SuuperW 484b062bf5 Add swiFromBios and bootFromFirmware to MovieData. 2018-09-02 10:52:53 -05:00
SuuperW 11e2448d1c Better loading of JIT settings from a movie. 2018-09-01 12:38:39 -05:00
SuuperW 3645ff4e77 Alert the user when opening emulation/firmware settings while they are set by a movie. 2018-09-01 12:34:17 -05:00
SuuperW 80047bff91 When closing or rebooting a ROM, reset emulation settings that were set by a movie. 2018-09-01 12:05:21 -05:00
SuuperW 4a844b2394 bugfix from last commit 2018-09-01 12:03:31 -05:00
SuuperW e83ec89578 Loading a movie now sets emulation/firmware settings. 2018-09-01 11:12:01 -05:00
SuuperW bd299672a1 Save jitBlockSize to movie files 2018-08-31 23:02:47 -05:00
SuuperW 10dc63abca Some more cleanup of movie.cpp LoadFM2 2018-08-31 21:30:13 -05:00
SuuperW a5d843e361 Rework MovieData::installValue to separate code for each key/value and to avoid using a long if else if chain. 2018-08-31 21:13:16 -05:00
SuuperW 491ee62754 Clean up movie.cpp LoadFM2. 2018-08-31 16:18:21 -05:00
zeromus c8ef38ad20
Merge pull request #185 from SuuperW/hotkeys
Hotkeys
2018-08-30 14:55:13 -05:00
zeromus 68d365c2f8
Merge pull request #181 from SuuperW/cheats
Cheats
2018-08-30 14:53:31 -05:00
SuuperW 57bfbb1562 Change implementation of moving a cheat in the cheat list. (originally implemented in commit 24cdbf0) 2018-08-30 11:49:11 -05:00
SuuperW dee24cdbc1 Print a message when a cheat code forces the JIT to reset. 2018-08-30 11:47:56 -05:00
SuuperW bbb190a136 bugfix (from commit 534cf251) 2018-08-30 11:47:35 -05:00
SuuperW 38b2039844 (Windows) Implement Ctrl+A shortcut for cheat list. 2018-08-30 11:45:57 -05:00
SuuperW 534cf2515b (Windows) Allow un/checking multiple cheats at once. (#178) 2018-08-30 11:45:57 -05:00
SuuperW 24cdbf0269 (Windows) Allow rearranging of cheats in the cheat list. (Requested by #178) 2018-08-30 11:45:56 -05:00
SuuperW 084a42a2f8 (Windows) Ask the user if they want to save changes to the Cheat list when the dialog's close/X button is clicked, if there are changes to save. 2018-08-30 11:45:31 -05:00
SuuperW 51303b9bc9 (Windows) Extend last column of Cheats list to fully show max-length descriptions, and shorten window/list view width. (Requested by #178) 2018-08-30 11:45:10 -05:00
SuuperW 80cfb59c2c (Windows) Clean up/combine string tables. 2018-08-30 11:27:25 -05:00
SuuperW 56477f0c5c (Windows) Add hotkeys for toggling display layers. 2018-08-30 11:14:44 -05:00
SuuperW 811d9a3c18 (Windows) Move TwiddleLayer from main.cpp to display.cpp (prepare for new hotkeys) 2018-08-30 11:01:57 -05:00
SuuperW 5cc49fe417 (Windows) Add hotkeys for cheat list and toggle cheats. 2018-08-30 10:35:29 -05:00
SuuperW 48414b144d (Windows) Reorganize some hotkeys code, and move Lua hotkeys to the Tools page. 2018-08-30 10:34:57 -05:00
SuuperW 16ea99e78c (Windows) Remove redundant hotkey initializing code. 2018-08-30 10:34:12 -05:00
zeromus b3a352a409
Merge pull request #176 from SuuperW/refactor
Refactor+Bugfixes
2018-08-28 13:50:27 -05:00
zeromus 77e05eb1f8 dont lose toon table when geometry engine is powered off (fixes #179) 2018-08-24 16:53:26 -05:00
rogerman 0aa8dad199 WiFi: Fix a bug where AdHoc connections would fail to read the socket on non-Windows systems. 2018-08-23 21:50:17 -07:00
rogerman 5d384f9eae Cocoa Port: Fix a bug in Metal display views where the internal V-sync would cause the total frame rate to be divided amongst multiple visible display views. 2018-08-23 09:56:23 -07:00
rogerman 5c85bcd732 Cocoa Port: Rework the auto-frameskip algorithm yet again. It should be more accurate this time. 2018-08-22 01:25:52 -07:00
SuuperW 8fa3c6f9ed fix regression from commit 17c30c48 2018-08-21 10:26:11 -05:00
SuuperW d671d0a888 minor cleanup 2018-08-20 10:23:10 -05:00
SuuperW 43d79393c7 Remove unused flags for display method, and remove OpenGL-specific display flag. 2018-08-20 10:23:10 -05:00
SuuperW c4ea4ad879 fix: DD_DoDisplay would not update the display if resolution had just been changed 2018-08-20 10:23:10 -05:00
SuuperW c9b41e3c53 Fix regression from commit 2acfdbe; setting display method to DDraw HW/SW did not actually set ddraw.systemMemory 2018-08-20 10:23:10 -05:00
SuuperW 2c8909ed3c Fix regression from commit 2acfdbe; the selected display method wasn't checked. 2018-08-20 10:23:10 -05:00
SuuperW 212f0a358f Only wait for the display thread if the previous frame was not skipped. 2018-08-20 10:23:09 -05:00
SuuperW 2890c4b075 Regression fix: Lua functions which draw to the screen work again. 2018-08-20 10:23:09 -05:00
SuuperW 17c30c48c5 more refactoring; created display.cpp and .h files 2018-08-20 10:23:09 -05:00
SuuperW 89fc0a12e3 move/refactor OpenGL code 2018-08-20 10:23:09 -05:00
SuuperW 4c83ec19e9 Move DirectDraw code to its own .h and .cpp files. 2018-08-20 10:23:09 -05:00
SuuperW 4357ba8f47 Am I doing this right? 2018-08-20 10:22:42 -05:00
retr0s4ge 6fa6467c5c
Merge pull request #175 from retr0s4ge/master
(Windows Frontend) Add Fullscreen Options And Window Sizing Fixes
2018-08-17 08:04:14 +02:00
retr0s4ge 7fa405b679 (Windows Frontend) Rename "Non-exclusive Mode" option to "Force Windowed Fullscreen" 2018-08-16 13:20:26 +02:00
rogerman c9a405e959 OpenGL Renderer: Use memcmp() to ensure that UploadClearImage() uploads clear image data only when necessary. Significantly improves the performance of games that use clear images. 2018-08-15 23:07:22 -07:00
retr0s4ge 9314fc2d5e (Windows Frontend) Ignore the menu key if the main window has no menu 2018-08-15 00:33:22 +02:00
rogerman 208f99f4a6 Cocoa Port: Fix a bug where HID devices would fail to be detected on startup when running on macOS High Sierra. 2018-08-13 23:33:24 -07:00
rogerman 8448b3ee10 Cocoa Port: Instead of using a single shared draw timing for all displays, use individualized draw timings for each display. 2018-08-13 23:32:31 -07:00
retr0s4ge 775e3ae91a (Windows Frontend) Fix the bug where cursor is auto-hidden even when over the menu
Also, changed the time before auto-hiding to 10 seconds.
2018-08-12 19:58:02 +02:00
rogerman c9009c9302 Linux Ports: Now require libpcap for all POSIX builds. (Related to commit 5e67e9c.) 2018-08-11 13:19:45 -07:00
retr0s4ge 36b97ada75 (Windows Frontend) Add Fullscreen Options And Several Window Sizing Fixes 2018-08-11 16:15:57 +02:00
retr0s4ge f2e43ca90b Add *.VC.opendb to gitignore 2018-08-11 15:23:50 +02:00
rogerman 6797f00d23 Windows Port: Oops! Fix a bug that will cause the app to crash on app exit. (Regression from commit 5e67e9c.) 2018-08-10 18:53:00 -07:00
rogerman 5e67e9ca7c WiFi: Do a big refactor of the client interface code for better code cleanliness, organization, and stability. There are also some minor behavior changes.
- EXPERIMENTAL_WIFI_COMM no longer disables all of the WiFi-related code. Instead, the WiFi code is always enabled and actually running the code is now controlled using WifiHandler::SetEmulationLevel().
- On the Windows port, EXPERIMENTAL_WIFI_COMM no longer hides all of the WiFi options. Instead, it only affects the user's ability to control the WiFi emulation. (Forces the WiFi emulation level to WifiEmulationLevel_Off if EXPERIMENTAL_WIFI_COMM is undefined.)
- The Cocoa port (and probably other POSIX-based ports) should now work better with the WiFi code.
- WiFi comm interfaces no longer initialize only once upon app startup. Instead, they initialize each time the emulator resets, and then uninitialize each time a ROM is unloaded. Now, users no longer have to restart the app in order to apply any changed WiFi settings. Instead, users only need to reset the emulator or load a new ROM.
- Previously, the SoftAP comm interface wouldn't run if libpcap was unavailable or if a network device wasn't found. Now, the SoftAP comm interface will now run without libpcap or a network device, albeit with significantly reduced functionality.
- Previously, saving pcap files required WIFI_LOGGING_LEVEL >= 3. Now, saving pcap files no longer relies on WIFI_LOGGING_LEVEL, instead relying on WIFI_SAVE_PCAP_TO_FILE to enable the functionality.
2018-08-10 18:36:33 -07:00
rogerman 65901c77c0 WiFi: Do some minor fixes. 2018-08-06 10:29:28 -07:00
rogerman 36ee2477b1 SoftRasterizer: Fix the animating characters in Customize status screen in Sands of Destruction by emulating a special LEQUAL depth test. (Fixes #41. Special thanks to StapleButter for his insight on this issue.) 2018-08-01 13:46:08 -07:00
rogerman c4317df76f Cocoa Port: Significantly boost the performance of the HQnX and xBRZ Metal shaders. 2018-07-31 21:55:56 -07:00
zeromus 637ad2ab18 revert pointless change to declaration of CommonSettings from 07d7588
(fixes #169)
2018-07-30 21:22:49 -05:00
rogerman ca6d8aaf73 WiFi: Initialize wifiEmulationLevel to WifiEmulationLevel_Off on startup. 2018-07-30 15:58:48 -07:00
retr0s4ge 07d75886bc
Merge pull request #166 from retr0s4ge/master
Implement basic support for multiple WiFi emulation levels
2018-07-30 23:48:52 +02:00
rogerman ad7083ea98 Cocoa Port: Do another UI bug fix on High Sierra, expanding the NSSegmentedControl element width even further so that all numbers appear as intended in all cases. (Related to commit 4913c0e.) 2018-07-30 13:50:38 -07:00
rogerman fad678c2b3 SoftRasterizer: Fix a bug for Altivec-enabled CPUs that caused multithreaded rendering to fail. (Related to commit 43d3883.) 2018-07-30 12:10:57 -07:00
retr0s4ge cf5ed05cab Replace scoped enum used for WifiEmulationLevel with unscoped enum for code compatibility with older compilers. 2018-07-30 06:26:49 +02:00
retr0s4ge 259ca8579f Implement basic support for multiple WiFi emulation levels 2018-07-30 00:17:44 +02:00
retr0s4ge 09a545902d Don't emulate wifi unless wifi.emulated flag is set in common settings.
Changes:
1- Add wifi.emulated flag to common settings
2- Don't emulate wifi unless wifi.emulated is set
3- Add a check box in windows frontend to toggle it, and read/write setting from/to ini file.
2018-07-28 05:40:44 +02:00
rogerman 232e3d6f51 Cocoa Port: Do a bunch of tweaks and fixes for an upcoming new feature. (Related to commit 932cdd6.) 2018-07-27 13:18:48 -07:00
rogerman bee3fd30ce Cocoa Port: Update the Metal blitter to support Y-flipping of the rendered video frame, matching the same feature that already exists in the OpenGL blitter. 2018-07-27 02:10:28 -07:00
rogerman 4913c0e7ae Cocoa Port: Fix a UI bug on macOS High Sierra where the dropdown sheet for configuring an NDS input's turbo pattern would fail to show the numbers in each NSSegmentedControl element. 2018-07-27 01:38:00 -07:00
zeromus d7c347d3ae set debug colors for DD area filling for new empty areas 2018-07-26 10:31:30 -05:00
rogerman 1e0e7f5e28 Cocoa Port: When running SoftRasterizer; for every 12 cores that would exist, reserve 1 core for the rest of the system. This should help maintain performance stability. 2018-07-25 20:46:42 -07:00
rogerman b0a6188902 SoftRasterizer: Fix a longstanding bug where using a thread count that was not a power-of-two would result in many threads remaining idle. 2018-07-25 20:44:30 -07:00
rogerman cbd488e157 SoftRasterizer: Force the number of rendering threads to be a power-of-two since any additional threads that are not power-of-two will be wasted. 2018-07-25 15:18:36 -07:00
rogerman b6072287c5 Cocoa Port: Improve SoftRasterizer multithreading and stabilize multithreaded performance.
- Automatic setting of the SoftRasterizer thread count (the most common use case) now takes into account systems with many CPU cores/hyperthreads. When using Automatic mode, SoftRasterizer will take advantage of more threads on machines like the Mac Pro and iMac Pro.
- Manually assign the thread priorities of the SoftRasterizer threads and other related high-priority threads to better ensure stable performance. Most importantly, the main emulation thread will no longer preempt any SoftRasterizer thread since the main emulation thread has to wait on the results of SoftRasterizer anyways.
- These changes aren't targeted for improving overall performance -- they help stabilize performance so that CPU cycles are used more consistently, which might translate into slightly improved performance, depending on hardware, as a byproduct of doing these changes.
2018-07-25 14:19:25 -07:00
zeromus fe851aa10c
Merge pull request #159 from SuuperW/display 2018-07-21 15:27:56 -05:00
rogerman ad5f5c24e6 Colorspace Handler: Fix bug where ColorspaceApplyIntensityToBuffer*() would not apply an R/B color swap when requested. 2018-07-20 18:45:44 -07:00
zeromus d869e6cb10
Merge pull request #162 from retr0s4ge/master
(Windows Frontend) Fix window size increase on startup
2018-07-20 17:17:33 -05:00
retr0s4ge 8cbdc339f2 (Windows Frontend) Fix window size increase on startup if screen size ratio > 1
Fix missing division in ScaleScreen function which caused window size to increase on each startup  if screen size ratio > 1.
2018-07-21 00:00:54 +02:00
SuuperW 9ccf9acea4 Revert commit 15957ba, and apply backlight effect regardless of whether using DirectDraw or OpenGL. 2018-07-18 14:51:45 -05:00
SuuperW 84e8057682 Resize the window when changing the screen gap. 2018-07-18 12:20:03 -05:00
SuuperW a4411086e0 Fix issue with resizing the window vertically. 2018-07-18 12:19:33 -05:00
SuuperW 842ed1b93c Put HUD drawing back to before applying the video filter. 2018-07-18 10:09:59 -05:00
SuuperW 77c0b6e702 Fix bug where OpenGL HUD would be stretched with 90 or 270 degree rotation. (regression from commit 6fc7161) 2018-07-18 01:58:56 -05:00
SuuperW 15957ba792 Remove use of backlight intensity when using DirectDraw. (previously removed it with OpenGL in commit 6fc7161) 2018-07-17 11:40:05 -05:00
SuuperW 60aedec5d2 Scale HUD when using DirectDraw. (fix regression from commit 5906d44) 2018-07-17 11:38:59 -05:00
zeromus 6fd23368ce
Merge pull request #158 from retr0s4ge/master
(Windows Frontend) Allow screen resizing in horizontal display layout.
2018-07-13 22:02:07 -04:00
retr0s4ge 43a9734ba2 Fill the areas above and below the resized screen with black when using DirectDraw display method.
This is needed to remove garbage from the window after resizing the screen. OpenGL display method already does this.
2018-07-13 16:43:43 +02:00
retr0s4ge d17a01d0c3 Center the resized screen vertically by default and add a check menu setting to change that if required. 2018-07-13 14:43:02 +02:00
SuuperW 6fc7161f19 Rework HUD rendering with OpenGL.
-Fixes regression from commit 5906d44 where HUD would appear smaller when using HD scaling. (only fixed with OpenGL for now)
-Remove use of backlightIntensity for displaying. Fixes bug where screen would appear dark on the first frame after loading a save state. Underlying cause should probably still be fixed, though. (Why would the backlight level affect the display anyway? That setting on the DS is only present because it has its own physical screens and makes no sense here.)
2018-07-12 11:23:23 -05:00
retr0s4ge 9dd7e0f451 Adjust the aspect ratio of the resized screen to follow the user setting, and modify input scaling accordingly. 2018-07-12 00:13:43 +02:00
SuuperW dc41f09189 some code cleanup; fix crash on changing to 15 bpp from a higher bpp 2018-07-09 11:41:46 -05:00
retr0s4ge 610caf0e45
Merge pull request #157 from retr0s4ge/master
Don't save ethernet packets to pcap files by default.
2018-07-09 02:07:35 +03:00
retr0s4ge 5ad5e16a40 (Windows Frontend) Allow screen resizing in horizontal display layout.
The right hand screen is allowed to be resized in horizontal screen layout to enable the window or full screen display to better utilize the screen area.

Changes:
1- Modify scaling, resizing and update functions to allow for new screen resizing ratio
2- Modify touch input scaling (incl. HUD editing) to adapt to different screen sizes
3- Add GUI menu for user to select the screen resizing ratio
4- Implement saving/loading settings from file similar to other settings
2018-07-09 01:03:35 +02:00
retr0s4ge 66062bca80 Don't save ethernet packets to pcap files by default.
Save only if the defined WIFI_LOGGING_LEVEL >= 3
2018-07-08 23:39:14 +02:00
SuuperW b95f58826e Fix ordering of fonts 2018-07-08 11:28:29 -05:00
zeromus 41104fd315 fiddle around with movie sram
re #152
2018-07-06 14:18:14 -04:00
zeromus f79e24dba8
Merge pull request #153 from Salz/pullreq/agg
revert to agg >= 2.4
2018-07-06 13:54:50 -04:00
zeromus a17bafa652
Merge pull request #154 from Salz/pullreq/gdb-stub
Pullreq/gdb stub
2018-07-06 13:54:23 -04:00
zeromus 9f7ed1aeeb
Merge pull request #155 from Salz/pullreq/commandline
Fix CommandLine initialization
2018-07-06 13:53:40 -04:00
zeromus 1065666997
Merge pull request #152 from SuuperW/master
Properly handle SRAM while playing movies.
2018-07-06 13:52:52 -04:00
SuuperW 5496c8e024 Remove the now unused firstTime parameter of DoDisplay. 2018-07-06 11:45:38 -05:00
SuuperW 5906d44c2d On Windows, draw HUD before the filter to avoid having to scale it separately. (significant performance boost when using a filter) 2018-07-06 11:45:07 -05:00
SuuperW e4d5da97c0 Add prefilterWidth/Height 2018-07-06 11:44:11 -05:00
Ingo Saitz cebbb262d1 revert to agg >= 2.4 2018-07-05 11:42:03 +02:00
Ingo Saitz 696135d712 Fix BaseDriver class
Commit 7548294333 broke compilation of
desmume/src/NDSSystem.cpp if DEVELOPER is defined by --enable-gdb-stub

Needs commit c9ad909a75b0ad89d0bd84829ed536c5ae0ffc93
2018-07-05 11:28:52 +02:00
Ingo Saitz b976584451 fix --enable-gdbstub 2018-07-05 11:28:46 +02:00
Ingo Saitz dd8d4e6715 Fix CommandLine initialization
Commit 7548294333 added _fw_boot and
_fw_path, need to make sure they are initialized, too.
2018-07-05 11:28:05 +02:00
SuuperW c64a556d82 Properly handle SRAM when playing movies, with or without starting from SRAM. 2018-07-04 11:11:57 -05:00
SuuperW 35ddbb341d Fix bug where movies starting from sram would crash. 2018-07-01 12:46:38 -05:00
zeromus 490c7e917c
Merge pull request #150 from retr0s4ge/master
Add WiFi fix from desmume-reloaded, tweak the wait for display thread added in commit ee8fdeb
2018-06-29 23:57:48 -04:00
retr0s4ge 411bcaa15d Forcibly wait for the display thread to draw each frame (never skip any frame) ONLY IF the user set frame skip to "0 (never skip)".
Current implementation causes significant display lag if any magnification filter is used while GPU scaling factor is >1.
2018-06-29 14:23:01 +02:00
retr0s4ge 7548294333 1- Apply WiFi-ONLY related fixes from desmume-reloaded project by Jackobo Le Chocobo to desmume project (code base 22/06/2018).
2-Add required include and define statement to aviout.h to fix build error.

(cherry picked from commit 470e54e361)
2018-06-29 09:31:30 +02:00
zeromus bd63ff1bd1
Merge pull request #148 from SuuperW/master
Do not allow skipping display frames (except in extreme lag).
2018-06-28 12:50:47 -04:00
SuuperW ee8fdebcf1 Do not allow skipping display frames (except in extreme lag), so that the user sees every emulated frame and the HUD updates every frame. 2018-06-28 11:34:38 -05:00
Ingo Saitz 0e86cf128d Call XInitThreads() in posix frontend
XInitThreads() is needed in multi-threading X applications when multiple
threads try to access the Xlib. Add the call to the three frontends in
posix/ and add the required autoconf-stuff, too.
2018-06-27 14:41:02 -05:00
zeromus 23f4dcc009
Merge pull request #147 from SuuperW/master
Reduce RAM usage
2018-06-27 12:59:03 -04:00
SuuperW a8fa8a44d6 Do not reset buffers when calling SetPrescale with the current scaling values. 2018-06-27 11:27:05 -05:00
SuuperW 35a2ca9721 Redraw display after changing video filter. (Regression from commit 8622a33.) 2018-06-27 11:25:48 -05:00
SuuperW 8622a334a2 Rework buffer size allocations to only allocate as much space as is actually required. 2018-06-27 11:23:36 -05:00
zeromus 0f4b3ead00 replace SMLAL_BB and friends with more clear logic that hopefully isnt bugged
but I couldnt find a game exercising it, so I dont know whether it's correct.

should fix #139
2018-06-15 17:48:28 -04:00
zeromus 022d24b5c2 gfx3d - savestate `renderState` along with `state`
there's really nothing more to it than this. it should have been done from the beginning.
you wouldn't notice this unless you had a game that stopped rendering 3d, though.
(re #141)
2018-05-25 11:39:58 -04:00
rogerman 932cdd6366 Cocoa Port:
- Do a bunch of code refactoring and cleanup.
- Add some new UI for an upcoming new feature.
2018-05-17 21:22:51 -07:00
rogerman c024a78a43 GPU / SoftRasterizer: Fix a build issue for Altivec-enabled code. (Related to commits c41a006 and 43d3883.) 2018-05-17 20:06:31 -07:00
zeromus 9c128460c4 winport - make it so you can only open one of each disassembler views at a time (reportedly theyre crashy if theres more than one of them open.. seems likely to be the case for any of our tool windows) 2018-04-18 13:14:01 -05:00
zeromus deffcaa075 added /LARGEADDRESSAWARE so we can get more than 6x or 7x scaling in 32bit builds 2018-04-12 21:48:22 -05:00
rogerman 24d941d02e Colorspace Handler: Fix some bugs in AVX2. (Regression from commit 858b05d. Fixes #131.) 2018-03-11 14:13:26 -07:00
rogerman ab3c221bf6 Windows Port: In Sound Settings, under the Interpolation menu, remove the obsolete performance notes, as these options do not actually affect performance. Instead, provide a better description of the effects caused by these options as experienced by the end-user. 2018-03-05 12:06:10 -08:00
rogerman 92924db136 Windows Port: Related to commit 8d011f8 -- check the flag first to try to avoid the more expensive system calls. 2018-03-04 17:39:27 -08:00
rogerman 42c0379cbb OpenGL Renderer: Fix one more possible crash that may occur if the 3D framebuffer is read before the 3D renderer has a chance to render at least once. (Related to commit f8bbbec.) 2018-03-04 17:20:21 -08:00
rogerman 8d011f8344 Windows Port: Optimize input handling, reducing CPU usage when the emulator is idle. (Related to commit 8fb0d6d.) 2018-03-04 17:17:26 -08:00
rogerman 8fb0d6ddc5 Windows Port: Reduce CPU usage while the emulator is idle. 2018-03-03 20:41:23 -08:00
rogerman e825cddbe5 Windows Port: Fix a rare and intermittent bug that could cause the AVI recording to accidentally stop in between AVI segments. (Regression from commit db1a19a.) 2018-03-02 15:59:37 -08:00
rogerman b8c006b0b5 Windows Port: Do some minor code cleanup related to commit 8763a61. 2018-03-02 14:00:52 -08:00
rogerman 8763a6169a Windows Port: AVI recording now maintains many more frames in memory. Also, the framebuffer color conversion threads and file writing thread are more free running threads.
- These changes help to stabilize the performance of AVI recording, making it less sensitive to sudden changes in disk writing speed.
- The maximum amount of frames maintained in memory will either be 1.5 GB worth or 180 frames (or 3 seconds) worth, whichever is less.
2018-03-02 13:09:39 -08:00
rogerman db1a19ad86 Windows Port: Do a complete code cleanup and refactor of aviout.cpp to use proper C++ objects.
- aviout.cpp now uses Windows-style line-endings instead of Unix-style line-endings.
- AVI segments now fill up much closer to the 2 GB file limit than before.
- Error handling in the file writing thread is much more robust.
2018-03-01 08:47:24 -08:00
rogerman cbe4717d2f Windows Port: When recording AVIs, video framebuffer conversions and file write operations are performed asynchronously with the main thread. This should greatly increase AVI recording performance. 2018-02-25 16:00:31 -08:00
rogerman c7ca122d95 Windows Port: Fix building on Windows. (Regression from commit c7bb41e.) 2018-02-19 12:46:41 -08:00
rogerman c7bb41e4b1 matrix.cpp: Rework all matrix function parameters for explicit array sizing in order to aid compiler optimization and (hopefully) aid in code readability. Also add SSE4.1 versions for the main matrix functions. 2018-02-19 11:43:55 -08:00
rogerman 5a61a08727 matrix.cpp: Do some more code cleanup. 2018-02-16 20:11:36 -08:00
rogerman 249afccfca matrix.cpp: Do a bunch of code cleanup. 2018-02-16 11:59:19 -08:00
rogerman c41a006b2a GPU: Add additional basic SIMD-accelerated functions for memset_u16(), memset_u16_fast(), memset_u32(), and memset_u32_fast() for AVX2 and Altivec. 2018-02-13 14:45:17 -08:00
rogerman 5fbaa53b46 GPU: If a custom-sized layer is to be rendered first, GPUEngineBase::_TransitionLineNativeToCustom() will do a line clear instead of an upscaled line copy.
- Since this is a very common occurrence in many games, and since doing a clear is faster than doing an upscaled copy, this should give a small performance improvement for the larger framebuffer sizes.
2018-02-13 13:54:10 -08:00
rogerman 43d3883986 SoftRasterizer: Framebuffer clears are now accelerated using AVX2 and Altivec. 2018-02-12 18:03:52 -08:00
rogerman ab18de05ef SoftRasterizer: Oops! Fix a performance regression in SoftRasterizerRenderer_SSE2::ClearUsingValues() where the framebuffer was accidentally being cleared twice. (Regression from commit 7509d46.) 2018-02-12 13:42:42 -08:00
rogerman 7509d469b9 SoftRasterizer: Do some multithreading improvements, and also clean up and refactor RasterizerUnit.
- Completely encapsulate all stray global variables into the SoftRasterizer class where they belong.
- Framebuffer clears are now fully multithreaded, significantly improving clearing performance.
- Doing multithreaded texture loads and vertex calculations now requires a minimum of 2 threads, down from 4 threads.
- The maximum amount of SoftRasterizer threads has been increased from 16 to 32.
2018-02-12 11:35:21 -08:00
rogerman 9e3b694ace Cocoa Port: Do some minor code cleanup. 2018-02-05 20:29:09 -08:00
rogerman d1dcbb8218 Cocoa Port: Fix a potential deadlock that may occur on emulation reset. 2018-02-04 13:07:59 -08:00
rogerman 9ee7cd8ec0 NDSSystem.cpp: Check for the GPU struct before calling GPUSubsystem::ForceFrameStop() in GameInfo::closeROM(). 2018-02-03 21:59:00 -08:00
rogerman 23be799a67 Cocoa Port: Metal display views no longer lose visible frames when running multiple display views. 2018-02-03 21:21:54 -08:00
rogerman 01c508f93a Cocoa Port: Remove and replace the high-overhead NSThread with the lower-overhead pthread_t. Improves video display performance when the frame rate is very high (greater than 600 FPS). 2018-02-03 11:31:41 -08:00
rogerman f9c32c9e79 Cocoa Port: Rework triple buffering for Metal display views yet again. This should fix the performance regression introduced in commit a65ceae9 for the larger custom framebuffer sizes. 2018-01-30 16:26:05 -08:00
zeromus 2a58246eb5
Merge pull request #123 from keelimeguy/master
Windows Port: Adding Pen and Touch support for touch screen devices
2018-01-08 16:04:11 -06:00
Keelin Wheeler b11bde4be4 Windows Port: Adding Pen and Touch support for touch screen devices 2018-01-08 16:37:20 -05:00
rogerman f2f3680a7c Cocoa Port: Fix a bug where Metal display view backing textures weren't updating their custom framebuffer sizes. (Regression from commit 4c01e66.) 2017-12-19 15:35:20 -08:00
rogerman 4c01e66a8a GPU: Instead of using fixed double-buffered output framebuffers, allow clients to request any number of framebuffer pages between 1 and 8.
- For all non-Cocoa ports, reduce the number of framebuffer pages from 2 to 1, reducing the memory usage for those ports.
- For the Cocoa port, increase the number of framebuffer pages from 2 to 3 in preparation for a new triple-buffered display scheme.
2017-12-19 14:33:48 -08:00
rogerman d3b628af47 Cocoa Port: Rework synchronization for Metal display views yet again. It should be a lot better now. 2017-12-17 20:35:00 -08:00
rogerman a65ceae98f Cocoa Port: For Metal display views, be much smarter about how we do synchronization. Should fix the performance issues introduced with commit 26ac91ed. 2017-12-11 16:28:42 -08:00
rogerman 1ea95cdde4 Cocoa Port: Do some minor code cleanup. 2017-12-11 16:17:02 -08:00
rogerman cd2f75e43a Cocoa Port: Replace all POSIX named semaphores with Mach semaphores and GCD semaphores, which are both faster than POSIX named semaphores. 2017-12-08 11:49:49 -08:00
rogerman 1e36b36bef Cocoa Port: Remove now obsolete locks from sound functions, since we now call SPU_Emulate_user() in the emulation thread again. 2017-12-07 23:00:28 -08:00
rogerman cee6867bd8 Cocoa Port: In RunCoreThread(), don’t use a potentially more expensive wait method before doing a cheaper time comparison first. 2017-12-07 21:01:59 -08:00
rogerman bac10c7618 Cocoa Port: OpenGL display views no longer use glFlush() when rendering for final flush, since glFlush() has been found to not actually be necessary. 2017-12-05 17:13:24 -08:00
rogerman 26ac91edd0 Cocoa Port: For Metal display views, replace all locks with semaphores, which are the correct synchronization primitive to use here.
- Also change the CocoaDSOutput list lock from a mutex to a rwlock, since testing has shown that there is more thread contention here than I previously thought.
2017-12-05 13:43:30 -08:00
rogerman f9109568b8 Cocoa Port: Improve stability of Metal display views when running CPU-based pixel scalers.
- Also fix a bug where restoring multiple display windows on startup would only have the last display window shown to work properly.
2017-12-03 00:18:30 -08:00
rogerman 39039f2396 Cocoa Port: Have the HUD Settings panel title show the number of the display window that is currently in focus, just like all the other panels. 2017-12-02 19:33:08 -08:00
rogerman b48666ea9c Cocoa Port: Add new HUD item, “Show Execution Speed”, which displays the emulator’s execution speed as a percentage. 2017-12-02 15:35:51 -08:00
zeromus 87335dd57a
Merge pull request #121 from spiveeworks/master
Update README.LIN (autogen.sh, dependencies)
2017-12-01 01:11:48 -06:00
Spivee 93d01f7bf5
Update README.LIN (autogen.sh, dependencies)
I found these dependencies harder to figure out than usual, 
since I'm used to installing packages with pregenerated `configure` scripts.
In particular if `glib` is missing then `configure` will generate with unexpanded macros, which is confusing.
This extra paragraph should be helpful for others. 

Thanks for a great program :)
2017-12-01 18:07:11 +11:00
rogerman 66e8a95657 Cocoa Port: Stability improvements for Metal display views. 2017-11-29 21:31:39 -08:00
rogerman 02a3b58edd Cocoa Port: Fix memory leaks with Metal display views.
- Also fix a bug where Metal display views fail on macOS High Sierra if a CPU-based pixel scaler was used.
2017-11-29 20:02:39 -08:00
rogerman c81df97a92 Cocoa Port: Restore the ability to use Metal display views on macOS High Sierra.
- Also rework the way the HQnx LUTs are loaded in Metal.
2017-11-28 14:06:34 -08:00
rogerman cd6fbcd5ea Cocoa Port: In the Metal framebuffer fetcher, further optimize 18-bit to 32-bit color conversions whenever the master brightness does not need to be applied, which is the most typical use case. 2017-11-28 00:53:50 -08:00
rogerman f0564cc4ac Cocoa Port: Fix a couple of rare edge-case bugs with Metal display views. 2017-11-27 22:53:18 -08:00
rogerman 258ebfd6ea Cocoa Port: Synchronously force a framebuffer fetch on startup to guarantee that all display windows will appear black. 2017-11-27 21:17:16 -08:00
rogerman e18dd27d30 Cocoa Port: Fix the Screenshot Capture Tool with running Metal. (Regression from commit f5ead86.) 2017-11-27 21:15:26 -08:00
rogerman 7213c6373b GPU: All fields for NDSDisplayInfo should be set consistently relative to the NDSDisplayID, not the GPUEngineID.
- In practice, this should change nothing, since all pointers somehow managed to point to the correct buffer locations. This should be nothing more than a programming consistency and readability improvement.
2017-11-27 21:07:14 -08:00
zeromus fa4b027dbd winport: add --windowed-fullscreen 2017-11-27 18:16:40 -06:00
rogerman d5b62d3d02 OpenGL Renderer: Improve the robustness of error-checking OpenGL drivers. 2017-11-24 02:02:05 -08:00
rogerman 010efff31b Linux Port (GTK): Fix OSMesa context creation. (Regression from r4905. Fixes #119.)
- Also do some code cleanup.
2017-11-24 00:28:49 -08:00
rogerman b9ada994df Linux Port (GTK): Remove and replace legacy colorspace handling routines with the new SIMD-optimized colorspace handling routines. 2017-11-22 17:43:17 -08:00
rogerman 96bd35517b Cocoa Port: Signal a fetch at startup, after reading the user defaults for GPU Scaling Factor and GPU Color Depth, in order to guarantee that the client-side fetch buffers will be cleared. 2017-11-21 19:05:11 -08:00
rogerman 5890540007 OpenGL: Maintain one more flag to ensure that textures are always initialized. (Fixes #116.) 2017-11-21 11:17:52 -08:00
rogerman 4269925258 GPU: Properly initialize the newer NDSDisplayInfo fields.
- This has the side-effect of having the Windows port’s display window
start up with a white screen and HUD showing (if enabled) just like
before, rather than a black screen and HUD possibly hidden.
2017-11-20 23:51:42 -08:00
rogerman 25eae6e1ed Cocoa Port (OpenEmu Plug-in): Change the video format to 18-bit RGB666, which matches a hardware NDS. 2017-11-20 21:04:50 -08:00
rogerman a7065311cc Core: Change some default settings to use more compatible and true-to-hardware settings.
- GPU Color Depth (from 24-bit to 18-bit), Advanced SPU Logic (from Disabled to Enabled), SPU Interpolation (from Linear to Cosine), Synchronization Mode (from Dual SPU Sync/Async to Synchronous)
- Just like the previous change to the default JIT block size, let the users themselves disable these settings so that they are more aware that they are sacrificing compatibility for speed.
2017-11-20 16:39:50 -08:00
rogerman 48fee8d590 Windows Port: Don't resize the display window after changing GPU Scaling Factor.
- Also remove TCommonSettings.GFX3D_PrescaleHD. It is a useless setting in core because the internal resolution is not limited to integer-multiplied scaling.
- Also fix spelling on the "Maintain Aspect Ratio" menu option.
2017-11-20 14:37:30 -08:00
rogerman 24108e35e2 Core: Change the default max. JIT block size from 100 to 12, since 12 has been tested to be more compatible and safer to use.
- There is only a negligible performance difference between 100 and 12.
- It is better for users to change the JIT block size from 12 to 100
themselves, since it might make them more aware that they are
sacrificing compatibility in favor of speed.
2017-11-20 12:57:24 -08:00
rogerman 6680577146 Render 3D: Handle RenderFinish() more consistently. Fixes 3D flushing issues when running single-threaded SoftRasterizer. 2017-11-20 10:58:27 -08:00
rogerman e5694abd63 SoftRasterizer: Tiny optimization to rasterization if a shadow polygon is used, taking advantage of an already existing hint. 2017-11-17 19:18:14 -08:00
rogerman d0c0a5641a Cocoa Port: Fix occasional screen flickering on Metal display views whenever a pixel scaler is used. (Regression from commit 7202fb8.) 2017-11-17 00:51:10 -08:00
rogerman 7202fb8d47 Cocoa Port: Fix a rare race condition that could cause Metal display views to crash if the GPU Scaling Factor very quickly and repeatedly changes. 2017-11-16 00:22:20 -08:00
rogerman bc7b03c3d5 Cocoa Port: Try to fix some more synchronization issues in Metal display views.
- Also remove the usage of _rwlockFrame and change it to a simple
pthread_mutex_t, since CocoaDSDisplay objects no longer have a need for
a full pthread_rwlock_t.
2017-11-15 21:25:21 -08:00
rogerman a481abebf9 Cocoa Port: Remove all fonts from all builds except for SourceSansPro-Bold. 2017-11-15 16:56:14 -08:00
rogerman d311517278 Cocoa Port: Remove extra underscore to make the .app bundle names consistent with the current naming scheme. 2017-11-15 16:44:15 -08:00
rogerman bfefaa7486 Cocoa Port: Remove --broken from the "OS X App" Release build target.
- Apparently, the —broken option isn’t available on all versions of git
describe. Remove it to avoid issues, since it isn’t really necessary.
2017-11-15 16:35:00 -08:00
rogerman 1373babe52 Cocoa Port: Update "DeSmuME (Latest).xcodeproj" to reflect the latest build procedures.
- Build artifacts are now created in the source code directory itself
instead of in DerivedData, just like how Xcode 3 does it.
- Making Profile builds using the “OS X App” build scheme now
automatically appends the git commit number to the .app bundle name.
2017-11-15 16:24:19 -08:00
rogerman 4457b95468 Cocoa Port (OpenEmu Plug-in): Update the microphone controls to use the latest CocoaDSController standards. Fixes both hardware and software mic modes. 2017-11-14 16:11:21 -08:00
Roger Manuel 16948fe8bd
Update .gitignore 2017-11-14 11:31:53 -08:00
rogerman 6c4e951e68 Cocoa Port: Only enable the "Use External Firmware Image" checkbox if the "Use External BIOS Images" checkbox is checked and only if both BIOS images are set. 2017-11-13 18:38:18 -08:00
rogerman 63a5cb90ae Windows Port: Fix compiling due to BackupDevice::_info name change. (Regression from commit 0907207.) 2017-11-13 14:43:41 -08:00
rogerman 0907207222 mc.cpp: It is now possible for DeSmuME to import its own battery save file format using the new method, BackupDevice::import_dsv(). 2017-11-13 14:13:09 -08:00
rogerman 3b2a9ededc Cocoa Port: The "File > Import ROM Save File" menu option now pauses the emulation when the NSOpenPanel is up.
- Also disable the "File > Export ROM Save File" menu option when there is no actual file to export.
2017-11-12 20:24:26 -08:00
rogerman 509d117f5f Cocoa Port (OpenEmu Plug-in): Update the OpenEmu plug-in to work using the latest version of the SDK. 2017-11-11 23:39:44 -08:00
rogerman 4abfa4466a Cocoa Port: Don't compile Lua-related files right now. Let's bring them back once there's an actual working prototype of this feature. 2017-11-11 17:24:10 -08:00
rogerman 128f9d0c96 Cocoa Port: As a small optimization, the MTLBuffers used in Metal display views should use MTLResourceCPUCacheModeWriteCombined wherever possible. 2017-11-11 16:16:17 -08:00
rogerman b03a799834 Linux Port (CLI and GTK): When building with --enable-hud, fix the segfault on startup that was caused by an uninitialized OSD object. (Fixes #107.) 2017-11-10 14:26:29 -08:00
rogerman 109dd6f373 Render3D: Change the Depth-Equal Test tolerance from +/-512 to +/-255.
- Special thanks to StapleButter for coming to us and informing us of this issue. 47a71941ac (commitcomment-25533528)
- This change does imply that GBATEK got this value wrong. http://problemkaputt.de/gbatek.htm#ds3dpolygonattributes
2017-11-10 09:43:54 -08:00
rogerman 89a74e5c3e Cocoa Port: Fix a whole slew of synchronization issues in the entire client display system, hopefully improving stability.
- Of special note, Metal display views aren't allowed to run on macOS High Sierra because of an assert bug in [id<MTLDevice> newBufferWithBytesNoCopy:length:options:deallocator:] in this particular version of macOS. Note that Metal display views will continue to work with macOS El Capitan and macOS Sierra.
2017-11-10 01:31:50 -08:00
zeromus 57f5fa0e6e Merge pull request #112 from atsampson/master
Linux Port: Fix missing semicolon.
2017-10-25 11:36:49 -04:00
Adam Sampson d74ab529a7 Linux Port: Fix missing semicolon.
This was lost in 0869afded6315fb14d2265e8b3872b36ccc3fdce's refactoring.
2017-10-25 14:40:28 +01:00
rogerman 0869afded6 GPU: All GPU settings are now staged. Pending settings are applied only right before the GPU actually renders.
- Of note, initialization of the 3D rendering engine is also staged, where the pending engine is initialized prior to applying the 3D rendering settings. However, only ports that support this behavior will do this. Ports that do not support this behavior will work the same way as before (initialize the 3D engine immediately).
2017-10-24 09:40:56 -07:00
rogerman 3ca9e871e8 Colorspace Handler: Fix some pixel alignment issues in ColorspaceConvertBuffer555XTo888_AVX2() and ColorspaceConvertBuffer888XTo888_AVX2(). (Related to commit 858b05d.)
- Also do some additional optimizations while we're at it.
2017-10-23 15:51:39 -07:00
rogerman 1be210271b Windows Port: AVI RGB888 color conversions are now multithreaded, and are also vectorized for SSSE3 and AVX2. (Fixes #105.) 2017-10-23 12:21:42 -07:00
rogerman 4c950d2a37 Colorspace Handler: Oops! Fix compiling in colorspacehandler_AVX2.cpp. (Related to commit 858b05d. Fixes #111.) 2017-10-23 11:11:49 -07:00
rogerman 8e16b618a7 Colorspace Handler: Fix bug where RB-swapping in ColorspaceConvert555XTo888() would cancel itself out, leaving RB unswapped in all cases. (Related to commit 858b05d.) 2017-10-22 23:31:24 -07:00
rogerman 858b05df79 Colorspace Handler: Add new functions for converting 16-bit RGBA5551 and 32-bit RGBA8888 color buffers to 24-bit RGB888.
- Also improve the performance of RGB555-to-RGBA6665 and RGB555-to-RGBA8888 conversions.
2017-10-22 22:14:05 -07:00
rogerman 2bc3be0711 Cocoa Port: Bottom-tier GPUs running an OpenGL display presenter now use faster (but less accurate) shaders for Bicubic B-Spline and Bicubic Michell-Netravali. 2017-10-22 22:08:41 -07:00
rogerman d9394594bf Cocoa Port: Fix bug where touch locations were being improperly calculated on Retina displays. (Regression from commit 059ea51. Fixes #110.) 2017-10-20 14:21:47 -07:00
rogerman 97525d94d7 Colorspace Handler: Properly maintain the alpha value when applying intensity to an RGBA5551 color buffer. 2017-10-20 13:03:03 -07:00
rogerman 64d32dca0e Cocoa Port: In the Screenshot Capture Tool, users can now assign the save directory by drag-and-dropping a folder onto the NSTextField. 2017-10-20 13:02:06 -07:00
rogerman 70d6df40d6 Cocoa Port: Enable Lua's ability to use dynamic-linked libraries. 2017-10-20 12:50:48 -07:00
rogerman 45572fb277 Render3D: Assume the initial states of the 3D rendering instead of initializing them with CommonSettings. Most notably, assume that _enableTextureDeposterize = false in order to force it to create its buffer later on. Fixes a potential crashing bug whenever Texture Deposterization is enabled. (Regression from commit 15a19ba. Fixes #109.) 2017-10-19 16:11:55 -07:00
rogerman 711115921b Cocoa Port: Begin setting up support for LUA. 2017-10-19 11:06:05 -07:00
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
rogerman 221fa5f72b Cocoa Port: Add support for reporting inputs in the HUD.
- Also do a bunch of code refactoring.
2017-09-11 09:41:54 -07:00
rogerman 17ff2b2d6e vfat.cpp: Silence a couple of compiler warnings. 2017-09-09 13:00:35 -07:00
rogerman 4cfa910e75 Cocoa Port: NEW FEATURE - Users can now apply custom colors to individual HUD line items. 2017-09-05 13:12:31 -07:00
rogerman 2b9bc2509a Cocoa Port: Additional tweaks to the new turbo settings UI. (Related to commit af22153.) 2017-09-04 09:54:35 -07:00
rogerman af22153f5c Cocoa Port: NEW FEATURE - Add the ability to set up custom frame-by-frame press/release state patterns for turbo. 2017-09-04 09:33:11 -07:00
rogerman d1ac719b5c Cocoa Port: Fix UI issue where status bar on display windows would no longer show the mic gain control. (Regression from commit 3bf295f.) 2017-09-04 08:09:48 -07:00
rogerman ccaefb18bc Cocoa Port: Fix UI issue where the Input Preferences window may not be automatically assigned as the first responder. (Regression from commit 1e9b179.) 2017-09-03 14:25:25 -07:00
rogerman f67f959fe3 Cocoa Port: Retrieve both pending and applied NDS inputs post-NDSExec().
- Also do some minor code cleanup on some input-related stuff.
2017-09-01 16:38:06 -07:00
rogerman a86539eb1c Cocoa Port: Do some refactoring on reading the client-side inputs.
- Also make calculating the mic level average more efficient, as well
as updating the mic level average every 8th frame instead of every
frame.
2017-09-01 00:33:54 -07:00
Roger Manuel b4650e4083 Merge pull request #94 from atsampson/master
Update remaining stub versions of mic_savestate/loadstate. Fixes #95.
2017-08-31 01:16:40 -07:00
rogerman fd6ed7b518 Cocoa Port: Synchronize access to ClientDisplayView._hudString. 2017-08-30 15:34:58 -07:00
rogerman db4982f4bc Cocoa Port: Continue refactoring cocoa_core.mm.
- Also fix a small off-by-one error in slot1_Change().
2017-08-30 15:20:08 -07:00
rogerman e29e825d27 Cocoa Port: Report newer options in the Support Requests and Bug Reports pages to reflect the current feature set.
- Also update the URL for the Bug Report webpage from sourceforge.net
to github.com.
2017-08-29 17:16:19 -07:00
rogerman abebaebdef Cocoa Port: Continue refactoring the emulation execution loop code to be less port-dependent. 2017-08-29 15:14:24 -07:00
rogerman 3bf295f4ce Cocoa Port: Fix bug where Lion-style full screen failed to work on OS X Mavericks and Yosemite. 2017-08-28 19:36:55 -07:00
rogerman 1e9b179bf4 Cocoa Port: Begin refactoring some of the emulation execution loop code to be less port-dependent.
- Also clean up some UI code with switching app preferences views when
running OS X Leopard.
2017-08-28 17:30:19 -07:00
rogerman a05e03e2cc OpenGL Renderer: When running a GPU Scaling Factor of 3x and 4x, increase the MSAA sample size limit from 8xMSAA to 16xMSAA. 2017-08-27 14:07:13 -07:00
rogerman 2379dc1e41 OpenGL Renderer: Make the MSAA sample size limit based on the framebuffer size instead of being fixed at 8xMSAA.
- The MSAA sample size limit is now based on the following sizes:
1x Native Resolution - 32xMSAA
2x Native Resolution - 16xMSAA
3x-8x Native Resolution - 8xMSAA
9x and greater Native Resolution - 4xMSAA
2017-08-26 22:41:53 -07:00
Adam Sampson e58fb84707 Update remaining stub versions of mic_savestate/loadstate.
11cf901336 changed most of these but
missed these three.
2017-08-26 15:32:14 +01:00
rogerman e6d5a8fbe1 Windows Port: Increase the maximum GPU Scaling Factor from 5x to 16x. (This should be safe on the vast majority of GPUs out there, but if we find out that this ends up being unsupported on many GPUs, the max scaling factor may have to be reduced back to 5x. This will need additional testing.)
- Also do some minor code cleanup here and there.
2017-08-25 18:53:07 -07:00
rogerman 823e9edf7f Windows Port: Fix compiling on Windows. (Regression from commit 11cf901.) 2017-08-24 15:28:46 -07:00
rogerman 11cf901336 Major code cleanup across the board, mostly involving interactions with EMUFILE.
- Function/method parameters for EMUFILE objects are now passed by
reference instead of passed by pointers, where appropriate. This is
true for the vast majority of EMUFILE usage.
- Eliminate duplicate little-endian read/write functions in
readwrite.cpp. Use the equivalent methods in EMUFILE instead.
- Completely standardize the design patterns and usage of the various
little-endian read/write methods. Should help stabilize interactions
with save state files, as well as try to make save states
cross-compatible between big-endian and little-endian systems.
- Replace EMUFILE fread()/fwrite()/fputc() calls with equivalent
size-specific methods where applicable.
- Misc. code readability and stability improvements.
2017-08-24 15:14:25 -07:00
rogerman e17e1bd0af Cocoa Port: Minor tweaks to some UI elements to eliminate some build warnings. 2017-08-23 02:37:37 -07:00
rogerman c52b5702ed Cocoa Port: Change InfoPlist.strings format from UTF-16LE to UTF-8.
- Also add macosx_10_5_compat.cpp back into the normal OS X build of
the Xcode Latest project. It’s still needed for compatibility on OS X
10.5 Leopard for x86/x86-64. (Don’t know how this got disabled — it
just somehow mysteriously did.)
2017-08-23 01:47:44 -07:00
rogerman 3a63db2086 Cocoa Port: Do some minor code cleanup. 2017-08-22 21:31:28 -07:00
rogerman 2746427dd7 Colorspace Handler: Fix more RGBA8888 and RGBA6665 conversions for Altivec. 2017-08-22 15:50:03 -07:00
rogerman c7b9ecfc52 Cocoa Port: Tiny code consistency change. 2017-08-22 13:57:12 -07:00
rogerman e4f935743c GPU: Clean up and optimize the BG mosaic code. 2017-08-21 19:31:41 -07:00
rogerman da6c79c6bd GPU: When calculating the VRAM pixel location using MMU_gpu_map(), replace division and mod instructions with bitshift and bitwise AND instructions. Should help older compilers that don't know how to optimize the division/mod instructions into bitshift/bitwise AND instructions. 2017-08-21 08:23:12 -07:00
rogerman f02210bfdb GPU: Try to clean up GPUEngineBase::_SpriteRenderPerform() a little bit. 2017-08-19 20:21:09 -07:00
rogerman a9f2e53c25 GPU: Be consistent with how we apply the sprite window flags.
- Now applies the sprite window flags consistently between rotozoomed
and non-rotozoomed modes.
- Applying the sprite window flags in rotozoomed modes now ignores
sprite priority as intended.
2017-08-19 12:07:48 -07:00
rogerman 48f0f69929 GPU: When compositing a sprite, remove the color effect enable test so that the enable test and the OBJ translucency test don't conflict whenever window testing is also enabled. Fixes the portal-in-the-horizon scene in Pokemon Mystery Dungeon: Explorers of Sky. (Fixes #92.)
- Also rename some variables for better code clarity.
2017-08-19 11:42:06 -07:00
rogerman c0a21a717d GPU.cpp/.h: Revert back to using Unix-style line-endings instead of Windows-style line-endings. 2017-08-19 11:04:45 -07:00
zeromus 222f5d8507 gpu - clean up sprite window rendering so it isn't a separate codepath but rather is identical to regular character OBJ until the very end. may fix subtle bugs, may do nothing, but it's cleaner now anyway 2017-08-18 22:44:56 -05:00
rogerman bf120f3c3e OpenGL Renderer: Fix one more compiling issue on Windows 32-bit. 2017-08-17 01:05:08 -07:00
rogerman 51a9e2b0ab OpenGL Renderer: The zero-dst-alpha-fragment pass for edge marking now works the same as the one for rendering the main geometry.
- Also fix a compiling issue in the Windows build. (Regression from
commit 6acf781.)
- Also fix an issue in the zero-dst-alpha-fragment pass while running
MSAA in legacy OpenGL. (Related to commit 6acf781.)
2017-08-17 00:51:30 -07:00
rogerman 6acf7818ea OpenGL Renderer: Translucent fragments now correctly overwrite zero-alpha destination fragments when running MSAA. (Related to commit 3b354a0.) 2017-08-16 22:27:38 -07:00
rogerman 3a11041ef0 GPU: Rename some stuff for better clarity. 2017-08-14 21:43:28 -07:00
rogerman 7487bf2295 GPU: Remove some assumptions with how OBJ layers will read custom VRAM, instead assigning the read location on a per-line basis based on the isLineCaptureNative flag. Fixes screen flickering in Kingdom Hearts: 358/2 Days. 2017-08-14 16:37:56 -07:00
rogerman 9a5e52a7fa Cocoa Port: New feature - The Main and Touch displays can now be individually assigned the engine that feeds them video. This can be done on a per-display window basis. 2017-08-12 23:04:53 -07:00
rogerman 623d490393 OpenGL Renderer: Use backface culling for whole-framebuffer processing steps.
- Also tidy a few things here and there.
2017-08-08 12:33:19 -07:00
rogerman 10d2776938 Colorspace Handler: Altivec conversion functions no longer use vec_splat*(), but instead use literals directly. Fixes compiling for ppc64 systems. 2017-08-07 18:23:44 -07:00
rogerman b9c6cd69a1 Cocoa Port: Tidy and tighten up the spacing of certain UI elements. 2017-08-07 17:50:24 -07:00
rogerman 7dbe1444c3 Cocoa Port: Fix a few more coloring issues on PowerPC Macs. 2017-08-07 15:47:04 -07:00
rogerman 8df7d15664 Cocoa Port: When the OpenGL blitter uses CPU-based pixel upscaling, framebuffer fetches no longer swap R and B colors.
- Also silence a compiler warning in DisplayWindowController.h.
2017-08-07 12:56:46 -07:00
rogerman 54f0e4b19b Colorspace Handler: When SWAP_RB is true, ColorspaceConvert555To8888_AltiVec() and ColorspaceConvert555To6665_AltiVec() will now swap R and B colors as intended. 2017-08-07 12:53:21 -07:00
rogerman 4fd39bac56 NDSSystem.cpp: Fix bug where certain inputs would fail to work on big-endian systems. (Regression from commit bcc7421.) 2017-08-07 12:51:50 -07:00
rogerman 4e1bdab8c7 Fix some graphical bugs on big-endian systems. (Regressions from commits f8d129b and f97283e.) 2017-08-05 22:45:38 -07:00
rogerman f377bfeb76 cheatSystem.cpp: Fix compiling on non-x86 systems. 2017-08-05 14:07:56 -07:00
rogerman 4473f5425d Cocoa Port: Fix compiling issues when building using Xcode 3. 2017-08-05 13:55:28 -07:00
rogerman 3b354a0096 OpenGL Renderer: Fix longstanding blending bug where zero-alpha destination fragments were being blended with instead of being overwritten. This fixes certain coloring bugs in many games. (Does not currently work with MSAA.) 2017-08-04 16:54:51 -07:00
rogerman d2b25360d5 OpenGL Renderer: Do some minor code cleanup. 2017-08-04 11:49:50 -07:00
rogerman eea54a753c OpenGL Renderer: Be a little more precise when doing polygon comparisons between opaque and translucent drawing modes. (Related to commit 5aeed21.) 2017-08-04 11:25:06 -07:00
rogerman f8ab45fc4b OpenGL Renderer: Fix bug where edge mark and fog would fail if MSAA is used. (Regression from commit fd5d882.) 2017-08-03 15:53:04 -07:00
zeromus b442998635 Merge pull request #87 from edbird/README_LIN_update
edited README.LIN
2017-08-03 16:45:31 -05:00
EdBird 5294ef1799 edited README.LIN 2017-08-03 18:55:56 +01:00
rogerman 5aeed2112b OpenGL Renderer: Maintain the continuity of polygon comparisons when transitioning between 'opaque polygon drawing mode' and 'translucent polygon drawing mode'. Fixes #85. (Regression from commit 1ff91b7.) 2017-08-03 00:08:08 -07:00
rogerman 87e52c334b OpenGL Renderer: Fix 3D rendering for builds using an an MSVC compiler. Fixes #81. (Regression from commit 1ff91b7.) 2017-08-02 15:12:40 -07:00
rogerman 1ff91b7841 OpenGL Renderer: The RenderGeometry() polygon drawing loop is now splits up the drawing of opaque polygons and transparent polygons. 2017-08-02 00:57:59 -07:00
rogerman 600ae21668 OpenGL Renderer: Do some minor code cleanup. 2017-08-01 13:02:50 -07:00
rogerman fd5d882fe1 OpenGL Renderer: Remove the working depth buffers, and read the default depth/stencil buffer directly. 2017-07-31 20:37:20 -07:00
rogerman 7a018eb9c6 OpenGL Renderer: Fix bug where rendering will fail for GPU drivers that support FBOs, but not Multisampled FBOs. (Regression from commit 5deec25.) 2017-07-31 07:03:27 -07:00
rogerman aead3f4109 GPU: Fix pixel alignment bug when the framebuffer is 3x sized, running on an SSE2 system. (Regression from commit 062c0ad.) 2017-07-31 06:56:16 -07:00
rogerman c0a2193290 OpenGL Renderer: Bring back OpenGLRenderer_2_0::InitFinalRenderStates(), fixing blending for the v3.2 renderer. (Regression from commit 8c37d4a.) 2017-07-31 05:11:37 -07:00
zeromus 4b8e7ceaef Merge pull request #80 from heftig/master
include string.h in all colorspacehandler implementations
2017-07-30 18:15:59 -05:00
Jan Alexander Steffens (heftig) 315320e0c1
include string.h in all colorspacehandler implementations 2017-07-31 01:10:19 +02:00
zeromus 368d785301 include string.h for memcpy. fixes #79 2017-07-30 11:51:17 -05:00
rogerman 917475b9cd OpenGL Renderer: Oops! Fix a bug where shaders would fail to work in legacy OpenGL, even when they are actually supported. (Regression from commit 8c37d4a.) 2017-07-29 20:34:32 -07:00
rogerman 69f97b056a OpenGL Renderer: Lower host GPU requirements for performing on-GPU final framebuffer conversions.
- Framebuffer conversion now occurs purely in shaders, and also
performs flipping along with conversion. FBOs and PBOs are no longer
required to do this.
- If shaders are not available, then framebuffer flipping will occur if
FBOs are available. PBOs are no longer required to do this.
- Also fix a minor framebuffer attachment bug in the v3.2 renderer.
2017-07-29 19:39:21 -07:00
rogerman 5deec25409 OpenGL Renderer: Eliminate two extraneous framebuffers, especially saving VRAM at the larger custom framebuffer sizes. 2017-07-29 17:47:53 -07:00
zeromus 353dcef3ec winport (aviout) - fix stuff 2017-07-29 16:45:22 -05:00
zeromus ef4b203064 winport (aviout) - make output end with less bugs when the disk is full 2017-07-29 13:48:01 -05:00
zeromus 153b3ed61b winport (aviout) - fix regressions in multipart naming; fix spurious "avi recording ended" message 2017-07-29 13:46:45 -05:00
rogerman d08dffd122 OpenGL Renderer: _FlushFramebufferFlipAndConvertOnCPU() now handles all 4 possible permutations of frame buffer flipping and color conversion.
- Also remove OpenGLRenderer_2_1::ReadBackPixels().
2017-07-28 18:41:49 -07:00
rogerman 8c37d4acd6 OpenGL Renderer: Remove extraneous OpenGL v1.x classes, and do more aggressive capabilities checks on init.
- Keep OpenGLRenderer_1_2 as the sole OpenGL v1.x class, and then
remove the following classes: OpenGLRenderer_1_3, OpenGLRenderer_1_4,
OpenGLRenderer_1_5.
2017-07-28 11:22:34 -07:00
rogerman 1938dc2eed Colorspace Handler: Fix the RGBA5551 color swapping lookup table. (Related to commit 8600466.) 2017-07-27 22:45:03 -07:00
rogerman 8600466498 OpenGL Renderer: Standardize 32-bit color red-blue swapping in OpenGLRenderer::_FlushFramebufferConvertOnCPU(). 2017-07-27 22:04:42 -07:00
zeromus d16785eba8 winport - fix avi segmenting (especially or exclusively when dumping with HD) 2017-07-27 22:16:15 -05:00
rogerman 740fb66ca5 OpenGL Renderer: Fix more possible red-blue color swapping issues in legacy OpenGL when the output color format is RGB888. 2017-07-26 23:21:05 -07:00
rogerman d2165f90fe Colorspace Handler: Fix ColorspaceConvert8888To6665_SSE2() for the SSE2 code path. 2017-07-26 22:57:07 -07:00
zeromus 5893dc78f3 action replay - attempt to avoid running off the end of cheat codes and crashing in case of invalid codes (fixes #78) 2017-07-26 23:48:50 -05:00
zeromus 1e5e47f75e winport - fix RGB/BGR of OSD rendering (all bpp's) 2017-07-26 23:13:01 -05:00
zeromus db16f2f888 winport - fix crash making PNG screenshots 2017-07-26 23:02:02 -05:00
rogerman 35e295e3dd OpenGL Renderer: Try and fix some recent issues with legacy OpenGL. 2017-07-26 15:42:30 -07:00
zeromus 679d5384e3 winport: fix some RGB/BGR orders in various displaymethod/gpu_bpp configurations. fixes #77 2017-07-25 13:06:54 -05:00
rogerman b96d2f01e1 GPU: When rendering at custom framebuffer sizes, initialize the deferred index buffer per layer so that previous layers won't corrupt the current layer. Fixes the score screen in Sonic Rush.
- Also do some minor code cleanup in
GPUEngineBase::_RenderPixelsCustom().
2017-07-25 10:43:20 -07:00
rogerman 062c0adef2 GPU: Unify line copying routines, and also make SSSE3-enhanced integer-scaled copying more available. 2017-07-24 23:35:40 -07:00
rogerman 654537a4fb GPU: Do some code cleanup. 2017-07-24 13:57:44 -07:00
rogerman 4ba36cbd1e Colorspace Handler: Fix pixel alignment bug in _ConvertColorBaseTo5551_AVX2(). (Related to commit de4f1c9.) 2017-07-24 13:33:03 -07:00
zeromus 5c983ede81 winport - support 15bpp as well 2017-07-24 13:47:30 -05:00
zeromus 46c28635ef winport - make 3d settings organization match cocoa UI's, and expose choice of 24/18 bpp GPU 2017-07-23 21:30:00 -05:00
zeromus a7ec7c9581 just a comment 2017-07-23 21:29:36 -05:00
zeromus 71eb37f44e gpu - small refinements to BPP-setting interfaces 2017-07-23 21:29:24 -05:00
zeromus 18f02cb7d3 winport - fix screenshot, aviout bugs due to 888 colorspace change 2017-07-23 20:42:27 -05:00
zeromus 918f45e7a4 libretro-common rbmp - add support for y-flipping 2017-07-23 20:42:27 -05:00
zeromus 6ced9e3942 update libretro-common rbmp 2017-07-23 20:42:27 -05:00
zeromus e620b15d3c Revert "Revert "winport: use 666 color". Now I know how to do it... but it wasn't 100% ready anyway, and it breaks avi/screenshot, so let's wait and fix those when the 666 color is finally 100% done."
This reverts commit 50390c6f4f.
2017-07-23 20:42:27 -05:00
rogerman 12a0c861a7 GPU: Add fast compositing paths for BrightnessUp/BrightnessDown color effects. 2017-07-22 13:00:15 -07:00
rogerman 250de64ee5 GPU: Unify the GPUEngineBase::_PixelEffect*() functions. 2017-07-21 15:49:01 -07:00
rogerman 301c875ecb GPU: For native-sized captures, always read from native VRAM -- never from custom VRAM. Should make captures a little faster when running a custom framebuffer and/or using RGB888 color format. 2017-07-21 12:49:57 -07:00
rogerman 1b483d266a GPU: Fix bug where sprite blending would no longer work. (Regression from commit 624dd57.) 2017-07-21 09:51:13 -07:00
rogerman 624dd5788c GPU: Another significant performance improvement to GPU compositing in many games.
- Now composites pixels using explicit functions for simple copy,
masked copy, and masked effect.
- On SSE2 systems, pixels composited using a simple copy no longer
require the destination pixels to be loaded first, since all the pixels
are guaranteed to be overwritten anyways.
- Try and move the window test as far up the pipeline as possible so
that pixel rendering can bail as soon as possible if the window test
fails.
- Clean up and further standardize the code for compositing BG layers,
OBJ layers, and 3D layers.
2017-07-20 23:45:41 -07:00
rogerman 80a4c3f071 GPU: Fix bug where 3D rendering sometimes does not appear correctly on SSE2 systems. (Regression from commit 5c6fcb0.) 2017-07-20 00:55:08 -07:00
rogerman 5c6fcb0f47 GPU: Significantly improve GPU compositing performance in many games.
- Adds more possible conditions for compositing to take the fast path
(simple pixel copying).
- Adds SSE2 optimizations for the 2x and 4x scaling cases in
GPUEngineBase::_LineColorCopy().
2017-07-19 23:41:43 -07:00
rogerman c3bce87556 Cocoa Port: Expose the new feature to change the GPU color depth in the UI. (Related to commit 3b37058.) 2017-07-18 20:57:55 -07:00
rogerman 3b37058cbc GPU: Custom VRAM now works with 24-bit color depth. It can be captured natively in 24-bit and used as a source buffer in 24-bit. (Related to r5433. This rework is now COMPLETE!)
- NEW FEATURE: Clients may now call GPUSubsystem::SetColorFormat() to
choose the color format of the GPU output, which can be RGB555
(15-bit), RGB666 (18-bit), or RGB888 (24-bit).
- On a special note, the Deposterize filter for 3D textures can now
show its true smoothing effect when clients run the GPU in 24-bit color
mode.
2017-07-18 20:56:11 -07:00
rogerman e7f1737bdb Cocoa Port: The Vertical Sync setting has been removed -- it is now automatically set.
- New behavior for layer-backed views (OpenGL on Mountain Lion and
later, or Metal): Vertical Sync is always enabled.
- New behavior for non-layer-backed views (OpenGL on Lion and earlier):
Vertical Sync is only enabled if frameskip is enabled or if the
execution speed is set to 1x or less while the speed limiter is engaged.
- Remove all associated UI for manually setting Vertical Sync.
- Also add a new menu option to the Tools menu for disabling Metal,
instead forcing display views to use OpenGL. (For developer builds
only.)
2017-07-18 17:10:26 -07:00
rogerman ddac7122d3 Cocoa Port: Ensure that display windows avoid drawing with uninitialized display info and possibly non-existent buffers on startup. 2017-07-18 01:26:42 -07:00
rogerman 7791f60495 Cocoa Port: Avoid sending a torrent of MESSAGE_RELOAD_REPROCESS_REDRAW messages whenever a new display window is created. 2017-07-18 01:24:08 -07:00
rogerman 68f201c3ce SoftRasterizer: Fix incorrect coloring when using an output format of RGB888. (Regression from commit eaa5210.) 2017-07-15 17:02:56 -07:00
rogerman eaa5210fb0 GPU: Finishing 3D rendering and flushing the 3D framebuffers are now split into separate operations.
- Fixes the background appearance when receiving items in Pokemon
Black/White 2. (Fixes SF bug #1624.)
2017-07-15 16:00:26 -07:00
rogerman 0f05656a17 Save States: Fix save state compatibility for files created between 32-bit and 64-bit systems. (Regression from r5363.) 2017-07-15 15:38:39 -07:00
rogerman 63b232c1b8 GPU: Fix possible crash by properly initializing working capture buffers. (Regression from commit 28f5c3a.) 2017-07-08 10:56:29 -07:00
rogerman 652af9ec71 Cocoa Port: Always allow client display views to process displays if the client did not request a custom framebuffer size.
- Also try to solve some synchronization issues with Metal display
views.
2017-07-07 13:13:29 -07:00
rogerman 1f60446f3f GPU: Fix bug on SSE2 builds where the window test mask would be undefined if the output color format is RGB666 or RGB888. 2017-07-05 23:30:31 -07:00
rogerman 28f5c3a895 GPU: Don't do ad-hoc allocations of working capture lines in GPUEngineA::_RenderLine_DisplayCapture(). Allocate the lines in GPUEngineA::SetCustomFramebufferSize() instead.
- Also do some minor refactoring and code cleanup.
2017-07-05 23:22:49 -07:00
zeromus ee235d2abc fix gdbstub compiling in posix frontend. didnt really test it... should fix #73 2017-07-03 09:37:51 -05:00
rogerman c37e892090 GPU: Partially reverts changes to the LCDC check, bringing back an optimization for display capture.
- Revert commit abe2e61997. (But retains
the comments about Mario Kart.)
- Partially revert adf682eb23. (But
retains the removal of the LCDC check in ResetDisplayCaptureEnable().)
2017-07-01 13:51:15 -07:00
rogerman 76063a389c Cocoa Port: Fix bug that causes building to fail. (Regression from commit c365617.)
- Also do some minor code cleanup to byteSizeStringWithLargerUnit:.
2017-07-01 13:44:52 -07:00
zeromus 73c8f8af37 Merge pull request #71 from kongfl888/screenshot
winport: fix the screenshot type is not saved.
2017-06-09 23:16:00 -05:00
kongfl888 65bd5b565c winport: fix the screenshot type is not saved. 2017-06-10 10:47:23 +08:00
zeromus d6872769ae cheats: fix bug in EXXXXXXX code eating one too many code lines 2017-05-29 10:05:22 -05:00
zeromus 50390c6f4f Revert "winport: use 666 color". Now I know how to do it... but it wasn't 100% ready anyway, and it breaks avi/screenshot, so let's wait and fix those when the 666 color is finally 100% done.
This reverts commit a0d42e1536.
2017-05-28 20:11:45 -04:00
zeromus 126db2d6de fix null assignments to std::strings the right way 2017-05-05 14:26:34 -05:00
zeromus 4707380746 Merge pull request #68 from klapeto/master
PosixGTK Graphics Dialog UI
2017-05-05 14:25:34 -05:00
klapeto a2527ef733 posixGTK: Additional graphic options added to Graphics Dialog 2017-05-05 21:42:51 +03:00
zeromus adf5151568 cheats: reset jit, sometimes, when it's needed 2017-05-05 00:45:28 -05:00
klapeto 08e2244cea posixGTK: Added Graphics Settings dialog and 3D core switch ui 2017-05-04 22:34:59 +03:00
klapeto b460d76698 Fixed segmentation faults caused by NULL assignments to std::strings 2017-05-04 16:16:12 +03:00
zeromus 58b69b912a winport: fix crash opening nonexistent recent rom (fixes #67) 2017-05-03 19:32:24 -05:00
zeromus 6b92b6fb2a Merge pull request #66 from np511/master
Add GUI to change JIT settings
2017-05-03 14:20:40 -05:00
np511 ff2ebe400d Add GUI to change JIT settings 2017-05-03 12:24:11 -04:00
zeromus e0945c362b fix booting from firmware since I broke it adding the new slot-1 timing (failed to support it on arm7). fixes #64 (broken by 281268e) 2017-05-02 17:59:33 -05:00
zeromus 09ffe3545e try to fix bad, bad, badness caused by running nitrofs tool in another thread (hopefully fixes #65) 2017-05-02 17:50:23 -05:00
zeromus 9357fd79e3 fix bug in fsnitro FAT reading; fixes #63 2017-04-28 20:53:40 -05:00
zeromus bc2e1d99d3 fix crash in slot1 retail(debug) when it's set while no game is loaded (fixes #63) 2017-04-27 20:37:40 -05:00
zeromus 281268e05f emulate slot-1 read timings (fixes SF bug 1258) 2017-04-26 18:34:07 -05:00
zeromus 6600a2c393 Merge pull request #61 from atsampson/master
fix: add missing comma in ZIPROMReader definition
2017-04-26 16:47:54 -05:00
Adam Sampson ebde061afe fix: add missing comma in ZIPROMReader definition
This was omitted in c365617ff737bdb3c06c307159078ca4e5f7e175; the other
ROMReader_structs it updated were correct.
2017-04-26 22:44:08 +01:00
zeromus 669515bf6e winport: fix OSD with prescale + single CPU 2017-04-26 15:02:46 -05:00
zeromus a0d42e1536 winport: use 666 color 2017-04-26 15:00:47 -05:00
zeromus 06f0bb492b winport: fix non-saving KillStylusOffScreen 2017-04-26 14:03:38 -05:00
zeromus 751987cb90 fsnitro: fix build error from recent commit (for some compilers, anyway). fixes commit c365617ff7 2017-04-12 10:31:13 -05:00
zeromus fbad56bd14 fix bugs in lingering rom reading cursor caching code that made the winport memview capable of ruining rom reads 2017-04-11 21:14:16 -05:00
zeromus 297449caa2 winport: fix mis-sorted full/cartrom memdomains 2017-04-11 21:13:17 -05:00
zeromus c365617ff7 take a stab at fixing the ram/streaming option so that there arent split codepaths everywhere. homebrew that is eligible for DLDI patching now switches entirely to load from memory, because we lack the facilities to patch the DLDI in flight (although we now have a point to hook it into). really, all this code should be torched, but it's less of a mess now. 2017-04-11 19:40:31 -05:00
zeromus e332e3df26 fix error in initialization of clear depth register - fixes #57 (cod3r colorz top screen) 2017-04-10 21:12:25 -05:00
zeromus abe2e61997 fix possibility for display capture to VRAM block not-mapped-to-LCDC doing something which I guess can clobber important memory. Mario kart does this after course demo during black screen transition if buttons are pressed (maybe programming error or emulation timing bug). The functionality that used to block this was lost during HD revisions. Fixes #54 2017-04-09 17:30:00 -05:00
zeromus e7d7c08455 Merge pull request #55 from BigBigos/rtc-override
Add rtc-day/hour options to override NDS clock
2017-04-09 12:51:44 -05:00
Gustaw Smolarczyk bc34bb457d Add rtc-day/hour options to override NDS clock
--rtc-day and --rtc-hour may be used to override the emulated time.
rtc-day is a day of week (0-6) rtc-hour is the hour (0-23). Time
difference is calculated at emulator start and the emulated RTC then
reports time from the future. This difference is then maintained so that
an hour after the emulator is started means an hour passes according
to the RTC.
2017-04-09 18:18:19 +02:00
zeromus d141d13705 add cheat code DFFFFFFF 77777777/99999999 for enabling emulator hacks and allowing access to the ARM9. I didn't test this, I may have broken some cheats 2017-04-08 00:57:19 -05:00
zeromus 5172e1c1f3 Merge pull request #51 from intact/fix-jit-size
fix jit-size command line option processing
2017-04-08 01:35:28 -04:00
zeromus 58b0adab4b fix a bunch of broken non-standard sized register IOs in the SPU. fixes #53 2017-04-08 00:33:19 -05:00
zeromus 8c1627b8c0 action replay: fix D8 codes (were writing 16 bits instead of 8) 2017-04-06 00:15:33 -05:00
intact bb1f34c287 fix jit-size command line option processing 2017-04-03 22:05:48 +02:00
zeromus d82110e99b Update desmume.props
fix linking on vs2017
2017-03-14 19:35:25 -05:00
zeromus 3b6a5168c2 Merge pull request #49 from pal1000/work
Autoretarget Visual Studio 2017. Compilation still fails though
2017-03-14 18:24:11 -05:00
prodea2 27ffdf2ee9 Autoretarget Visual Studio 2017. Compilation still fails though 2017-03-14 22:33:07 +02:00
zeromus 199c9fb90d winport: support vs2017 in msbuild file (fixes #48) 2017-03-13 18:39:43 -04:00
zeromus 363424baaa fix mirroring of bank I across BBG (fixes #46, corrupted pause screen in ultimate mortal kombat) 2017-03-05 17:55:43 -06:00
zeromus e74ef8d0c5 winport: remove accidental relic StylusJitter inifile read 2017-03-05 02:49:40 -06:00
rogerman e38246da31 Cocoa Port: Update the UI for the removal of GFX3D_Zelda_Shadow_Depth_Hack, the changes in StylusJitter, and the addition of gamehacks. 2017-03-05 00:22:28 -08:00
zeromus 5563d61f66 fix #25 (monster trucks) by adding some hacky logic to permit redrawing the scene (for an altered clear image) even when no geometry's been flushed recently 2017-03-04 04:11:00 -06:00
zeromus 66b5da1cdc clear contents of geometry engine ram when it's powered down. fixes #31 (imagine teacher black garbage on screen) 2017-03-04 03:34:20 -06:00
zeromus 51163c33a1 tidy win32 3d options box 2017-03-04 01:54:35 -06:00
zeromus 3c48d83376 remove obsolete zelda depth comparison threshold hack 2017-03-04 01:45:32 -06:00
zeromus 23c8955551 fix last commit not working at all, and also, move stylus jitter (for CSI: dark motives) into a game hack 2017-03-04 01:42:08 -06:00
zeromus c1e5a56233 add system for applying individual game hacks by gamecode 2017-03-04 01:31:14 -06:00
zeromus 7c9abef399 rename game hacks 2017-03-04 01:12:28 -06:00
zeromus 859d47e7ff make CPU freezing flags more flexible, then don't use that. shrink overclocking interval. 2017-03-04 01:09:02 -06:00
zeromus adf682eb23 gpu: remove LCDC check in capture reset 2017-03-04 01:07:09 -06:00
zeromus 9909f34a35 fix hacks not getting enabled properly 2017-03-04 00:37:15 -06:00
zeromus b5a4cf3bac swrast: tiny speedup to backface tests 2017-03-03 21:53:48 -06:00
rogerman 1e96e738d2 Cocoa Port: Correct the touch display location transformation for Retina displays. (Regression from commit ce494a2. Fixes #42.) 2017-03-01 23:09:52 -08:00
rogerman 5e06fbc547 GPU: Change how DISPCAPCNT's CaptureEnable flag is handled, fixing a graphical issue when starting a battle in Pokemon Black/White. (Regression from r5259.)
- To note: This fix to Pokemon Black/White does not require
CommonSettings.pokehax to be enabled.
- The CaptureEnable flag is now only read at the start of line 0,
instead of being read directly from the DISPCAPCNT register per line.
In addition, this same state is held all the way through line 192.
- The CaptureEnable flag is now reset at the start of line 192, instead
of near the end of line 191 H-blank. (This is the proper behavior
according to GBATEK.)
- The CaptureEnable flag is now only reset when the VRAM configuration
is LCDC, instead of always being reset. This makes it possible for this
flag to remain set on line 192 if the VRAM configuration is changed to
a non-LCDC configuration.
- CommonSettings.pokehax is now initialized to false.
- Fix a small bug when setting CommonSettings.pokehax via the command
line.
2017-03-01 18:02:20 -08:00
zeromus 8e18531784 add win32 ui for game-specific workarounds toggling 2017-03-01 00:34:31 -06:00
zeromus cfae9c7674 add logic and CLI for game-specific workarounds 2017-03-01 00:34:09 -06:00
zeromus 99f68c8a51 fix errors in rigorous-timing and advanced-timing and spu-advanced commandline options 2017-03-01 00:31:38 -06:00
rogerman be8530bc3d GPU: Fix graphical issue in Billiards Action when running at custom framebuffer sizes.
- Fixes custom VRAM reads for OBJ bitmap reads when the read location
doesn’t start at line 0. This behavior is now consistent with how BG
extended layers do it.
2017-02-28 22:04:36 -08:00
rogerman 65c5cdd712 GFX3D: Also treat wireframe polygons using A3I5/A5I3 textures as opaque if the polygon is a Decal or Shadow polygon.
- Also do a few readability improvements in the OpenGL renderer.
2017-02-28 14:48:42 -08:00
zeromus 4fb55bddb9 fix: trying to use a dldi-function without --load-type=1 would end up in desmume crashing 2017-02-28 16:31:51 -06:00
zeromus 8c8ba5e355 does github want me to add this? 2017-02-28 15:11:58 -06:00
zeromus 1f5ece6eeb Update README.md 2017-02-28 15:10:57 -06:00
zeromus 2cb8ce2c4f Create README.md 2017-02-28 15:10:29 -06:00
rogerman 68958a7a08 GFX3D: Opaque polygons using A3I5/A5I3 textures are no longer considered transparent if the polygon is a Decal or Shadow polygon.
- Fixes the edge marking of blocks in Picross 3D when running
SoftRasterizer.
2017-02-27 15:20:58 -08:00
rogerman 3b74861fc2 OpenGL Renderer: Edge marking now blends properly to zero-alpha pixels. 2017-02-27 13:13:37 -08:00
rogerman 0f70654dab SoftRasterizer: Fix bug where edge marking can accidentally cause pixels to become fully transparent.
- Fixes the edge marking rendering issue for the girls in the title
screen of Love Plus.
2017-02-24 12:48:21 -08:00
rogerman a2273b5eac OpenGL Renderer: Prevent applying edge marking on wireframe polygons. 2017-02-23 19:38:41 -08:00
rogerman c71da856f5 Render3D: Another rework on viewport transformations in SoftRasterizer and OpenGL. Completes fixes on #27.
- Also fixes major rendering regressions with SoftRasterizer in Metroid
Prime Hunters and Princess Debut. (Regressions from e02d134.)
2017-02-23 15:40:23 -08:00
zeromus 5335312704 fix little bug in prior (re #27) 2017-02-23 01:55:17 -06:00
zeromus e277fb2aed fix prior commit for HD 3d (re #27) 2017-02-23 01:08:08 -06:00
zeromus e02d134482 fix handling of invalid viewports. solves homie rollerz character select. only implemented in softrasterizer. re #27 2017-02-23 00:55:33 -06:00
rogerman 8dd7c9b924 GPU: No more need for clients to specify whether to apply the master brightness on a per-scanline basis or on a per-framebuffer basis; GPUSubsystem can now automatically switch between applying per-scanline or applying per-framebuffer. 2017-02-22 17:07:11 -08:00
zeromus 7031bd9c0c matrix stacks: fix new asserts in nanostray2 weapon shooting and dual strike combat anims (re #39) 2017-02-22 17:42:37 -06:00
rogerman 093ce4b05d Cocoa Port: The Metal blitter now performs its own display postprocessing instead of letting the GPUSubsystem do it.
- Display views now take the Deposterize filter into account when
determining the direct-to-CPU-filtering state.
- GPUSubsystem now combines the RGB666-to-RGB888 conversions and master
brightness steps into a single postprocessing step.
- Do some minor code cleanup.
2017-02-22 14:14:22 -08:00
zeromus b553ff917b fix matrix stacks better (re: #39). fixes broken mario 64 head 2017-02-22 00:26:03 -06:00
zeromus 1cc22ae2aa fix matrix stack error conditions and handling (fixes #39) (savestates are broken) 2017-02-20 23:26:51 -06:00
rogerman fb2cfc4e9c GPU: Better handle the NDSDisplayInfo flags for applying the master brightness. 2017-02-16 00:31:02 -08:00
rogerman 60ae4c8de3 matrix.h: Fix compiling on certain 32-bit systems. (Regression from commit fc3570a. Fixes issue #40.) 2017-02-14 14:52:42 -08:00
zeromus 6cd42cbfe4 stop printing garbage to osd due to bad stdarg forwarding (bug from osd refactoring) 2017-02-11 08:14:27 -06:00
rogerman 72fa455ca0 Cocoa Port: Display views now run using Apple Metal, if available.
- An Apple Metal display view requires macOS 10.11 El Capitan or later,
in addition to a Metal-compatible GPU.
- Apple Metal display views have significantly lower CPU usage then
OpenGL display views.
2017-02-10 12:33:34 -08:00
rogerman 3799af3a01 Cocoa Port: ClientDisplayView::FinishFrameAtIndex() is no longer abstract. 2017-02-10 12:28:11 -08:00
rogerman ff2e6cb220 Cocoa Port: Increment/decrement the number of display views in need of CPU filtering, instead of looping through all outputs to determine it. Prevents a possible deadlock when changing CPU-based pixel scalers.
- Also do some additional code cleanup.
2017-02-10 11:28:35 -08:00
rogerman 241f50ee7a Cocoa Port: Don't load framebuffers from the fetch object if the Deposterize filter is enabled. 2017-02-09 09:26:30 -08:00
rogerman 00b5ff70d0 Cocoa Port: Move the CPU pixel scaler object from OGLVideoOutput to ClientDisplayView. 2017-02-08 13:35:42 -08:00
rogerman fc9b4831a0 Cocoa Port: Do some code cleanup. 2017-02-07 18:50:13 -08:00
rogerman a09763f8c3 Video Filters: Reorganize the VideoFilter class and simplify RenderDeposterize(). 2017-02-07 15:19:32 -08:00
zeromus d9a0c0ef00 newer win32 scond stuff for bug smoking out 2017-02-04 16:33:55 -06:00
rogerman 6564827199 Cocoa Port: Move InitHQnxLUTs() out of OGLDisplayOutput.cpp into ClientDisplayView.cpp so that the code can be shared with other ClientDisplayView subclasses.
- Also make the HQnx LUT textures 32-bit instead of 24-bit.
2017-02-03 18:30:20 -08:00
rogerman 64d58b9b09 Cocoa Port: Oops! Forgot to take out a reference to the not-yet-released Apple Metal renderer.
- Fixes building of the Xcode project. (Regression from commit aff2d07.)
2017-02-01 16:09:12 -08:00
rogerman aff2d07146 Cocoa Port: Huge refactor to ClientDisplayView, now supporting the use of shared fetch objects and shared client objects in order to lower memory usage and CPU/GPU usage when many display views are running at the same time.
- OpenGL display views now use a shared fetch object to fetch the emulated GPU framebuffers and store them in shared textures within a shared context. In conjunction with the new double-buffering support from the last commit, this eliminates the copying between the framebuffers and each display view.
- OpenGL display views now use shared HQnx LUT textures, rather than having to initialize and maintain a copy of the LUT textures for each display view.
- OpenGL display views no longer perform any rendering while their associated NSView is hidden, improving the performance of creating new display views.
- OpenGL display views can now DMA directly from pinned-memory both custom-sized framebuffers and CPU-pixel-scaled native-sized framebuffers at the same time.
2017-02-01 15:56:54 -08:00
rogerman 08b8a1a62c GPU: The output framebuffers are now double-buffered and page-aligned.
- Framebuffers are now page-aligned on 4KB boundaries. This is to
improve performance when using the framebuffers directly as pinned AGP
memory.
- Framebuffers are now double-buffered. The target buffer index is now
tracked using the bufferIndex field of NDSDisplayInfo.
- Clients may no longer supply their own buffers to
SetCustomFramebufferSize(). Clients must use the pointers supplied by
NDSDisplayInfo.
- The frameskip flag is now set only on line 0 and remains consistent
for all 192 lines of rendering.
- GPUSubsystem no longer needs a special allocater/deallocator for
itself, so it has been reverted back to a standard C++ new/delete.
- Add a GPUClientFetchObject helper class as an aid to clients that
need to read out the framebuffers. (Should probably move to its own
file at some later date.)
2017-02-01 09:34:21 -08:00
rogerman fc3570a18a Revert "Fix buffer overrun issues with custom memset functions."
This reverts commit 53c4a27aef.

I forgot that these functions are based on element count, not based on
byte count. Rename “length” to “elementCount” for better clarification.
2017-01-26 01:23:42 -08:00
rogerman 62f230ef44 common.cpp: Add the convenience function malloc_alignedPage(), which returns a 4KB page-aligned (for most systems) block of memory. 2017-01-25 20:03:22 -08:00
rogerman 53c4a27aef Fix buffer overrun issues with custom memset functions. 2017-01-25 20:01:28 -08:00
rogerman b9a9b8e7b2 Cocoa Port: Another round of refactoring for ClientDisplayView.
- Fetching and loading of GPU frame data is now performed as two
separate operations.
- Display windows no longer draw concurrently on backgrounds threads;
instead they are updated synchronously.
- Associate the CALayer after the .xib completely loads the NSView for
better compatibility.
- MacOGLDisplayView now creates an NSOpenGLContext instead of a
CGLContextObj, bringing back compatibility with macOS 10.5 Leopard.
- Fix building with the Xcode 3 project.
2017-01-24 19:08:44 -08:00
rogerman 3b0920d7f0 Video Filters: Rework the Scanline and Nearest2X filters to modern standards, and also add an SSE2 version of the Scanline filter. 2017-01-23 12:31:52 -08:00
zeromus 48bef75fd9 sync with retroarch again -- new work to make scond_signal slightly more pthreads compliant (and other tidies) 2017-01-21 22:43:34 -06:00
zeromus e79b37dcb4 synchronize rthreads with libretro-common scond/slock cleanup and optimization for smoke testing 2017-01-21 17:12:50 -06:00
rogerman c7af5cbe11 Cocoa Port: Refactor ClientDisplayView to improve subclasses' ease-of-use for the HUD-related methods. 2017-01-20 16:44:44 -08:00
rogerman aa8069ce1a Cocoa Port: More refactoring work on ClientDisplayView.
- Most notably, HandleGPUFrameEndEvent() now sends the entirety of the
NDSDisplayInfo struct to the client.
- The OpenGL blitter now skips the loading, processing and rendering of
disabled screens.
- Begin preparing DisplayView to handle the upcoming Apple Metal
blitter.
- Do some misc. code cleanup and simplification.
2017-01-18 16:05:41 -08:00
zeromus e487193545 remove outdated information from linux readme (address #35) 2017-01-17 18:45:14 -06:00
rogerman 8aa066dffc GPU: Add some more properties to NDSDisplayInfo pertaining to auto-applying the master brightness. 2017-01-17 11:30:14 -08:00
rogerman 25c0232673 Cocoa Port: Fix some bugs with HUD font loading and HUD rendering on Retina displays. 2017-01-15 21:45:26 -08:00
rogerman 6756f41bdb Cocoa Port: Significantly increase the performance of the 4xBRZ, 5xBRZ and 6xBRZ shaders.
- Also disable the 4xBRZ shader for low-tier GPUs. (Testing has shown
that low-tier GPUs have no chance at running this shader in real-time
anyways.)
- Also do some misc. tweaks to other various shaders.
2017-01-15 20:36:13 -08:00
zeromus d33f2f095c change an `int` to `s32` which was being serialized as an s32 2017-01-13 18:41:31 -06:00
rogerman 019a959702 GPU: Silence compiler warnings about implicit 64-to-32 bit conversions. 2017-01-13 16:29:39 -08:00
Markus Kitsinger (SwooshyCueb) 125df2970e copy paths to variables rather than uninitialized data 2017-01-12 22:29:24 -06:00
rogerman 558cbf71d2 Cocoa Port: Also bring back setWantsBestResolutionOpenGLSurface: in order to support Retina displays on Macs running macOS 10.7 Lion. 2017-01-12 10:57:59 -08:00
rogerman 3af5423387 Cocoa Port: Bring back NSOpenGLContext for Macs running macOS 10.7 Lion or earlier.
Also do some misc. backwards compatibility fixes.
2017-01-11 17:56:21 -08:00
rogerman 07a68dbb7a Cocoa Port: Clean out utilities.c a little bit more. 2017-01-10 23:57:47 -08:00
rogerman 669487ff05 Cocoa Port: Eliminate the old colorspace conversion functions from utilities.c in favor of the new colorspace handler functions. 2017-01-10 23:45:06 -08:00
rogerman 858d14b5fe Cocoa Port: Transition display views from using an NSOpenGLContext to using a CAOpenGLLayer. 2017-01-10 21:45:09 -08:00
rogerman ee306a9f07 Cocoa Port: Disable the default clipping feature in display views as a micro optimization. 2017-01-10 10:42:08 -08:00
zeromus 522a4e25d1 merge latest rthreads.c from libretro-common, and improve sthread_isself to null check argument (fixes crash in winport's single-core codepaths when lua window is open) 2017-01-09 16:51:02 -06:00
rogerman 9c573370f3 Cocoa Port: Oops! Revert a little test code that snuck in from the last commit. 2017-01-09 14:00:20 -08:00
rogerman 34656d977c Cocoa Port: Simplify OpenGL context handling. 2017-01-09 13:57:59 -08:00
rogerman 91f2bb9ee5 Cocoa Port: Even more display view refactoring work.
- Move Mac-specific OpenGL code to its own file.
- Eliminate the CocoaDSDisplayDelegate and CocoaDSDisplayVideoDelegate
protocols. Instead, call ClientDisplay3DView class methods directly.
2017-01-09 11:20:25 -08:00
zeromus a5b4df2038 bring softrasterizer shadow rendering up to modern standards. 2017-01-08 15:25:47 -06:00
rogerman f1558bf4e6 Cocoa Port: More display view refactoring work. 2017-01-08 00:21:19 -08:00
rogerman c7c472673f Cocoa Port: Fix a few more issues caused by commit cffc343.
- Fix bug where restored windows would fail to update properly if the
window size would be the same as the one set in user defaults.
(Regression from commit cffc343.)
- Fix bug where changing the rotation to be exactly 180 degrees
different from the old rotation would cause the view to render the
screens with a vertical offset. (Regression from commit cffc343.)
- OGLDisplayLayer respects its own _needUpdateRotationScale and
_needUpdateVertices flags once again, preventing it from repeatedly
uploading already established data to the GPU. (Regression from commit
cffc343.)
2017-01-07 15:54:23 -08:00
rogerman 6eca2163f7 Cocoa Port: Fix bug where switching the display mode to Main or Touch would fail to work correctly.
Also do some misc. code cleanup.

(The bug is a regression from commit cffc343.)
2017-01-06 17:22:02 -08:00
rogerman 34df91f412 Merge remote-tracking branch 'origin/master' 2017-01-06 15:23:43 -08:00
rogerman cffc343496 Cocoa Port: Continue refactoring of the display view code to reduce port-specific dependence. 2017-01-06 15:23:26 -08:00
zeromus ce044f3700 remove rewind code completely (it wasnt hooked up to the UI and it was worthless anyway) 2017-01-06 16:53:46 -06:00
rogerman 616962f0b7 Cocoa Port: Standardize display rotations to always assume a left-handed Cartesian coordinate system (clockwise rotation). 2017-01-03 03:31:35 -08:00
rogerman a6cb37901f Cocoa Port: Eliminate dsPointFromEvent:inputID: method. 2017-01-03 00:25:24 -08:00
rogerman eed334f999 Cocoa Port: Change "Display Orientation" to "Display Layout".
Also change the name of “Hybrid (3:2)” to “Hybrid (2:1)”. The display
ratio was incorrectly identified as 3:2, when in fact it is 2:1.
2017-01-02 23:01:31 -08:00
rogerman ce494a2eaa Cocoa Port: Begin refactoring display view code to reduce the dependence on port-specific code. 2017-01-02 22:39:25 -08:00
rogerman 207a3b2e9e Cocoa Port: New feature -- add Hybrid display orientations.
- The new Hybrid display orientations show three NDS screens — the top
and bottom screens on the left side, and a larger major screen on the
right side. This feature is intended to better use the widescreen
resolution of most users’ host displays, which are usually 16:9 or
16:10. Three different Hybrid orientations are provided (3:2, 16:9, and
16:10) so that users can choose the display size ratio that they prefer.
- Horizontal display orientation no longer uses the display separation
setting.
- Do some additional code cleanup.
2016-12-31 18:10:48 -08:00
rogerman cf8f021b30 OpenGL Renderer: Don't force backface culling when drawing shadow polygons.
Do note that we need to do this for SoftRasterizer as well, but
SoftRasterizer will need some additional rework on shadow polygon
handling to get all the test cases to work.

Fixes issue #21.
2016-12-30 11:04:35 -08:00
rogerman c9d5d69c06 GPU: Fix graphical inconsistencies with BG extended layers using custom VRAM.
(Regression from commit 36e03fe.)
2016-12-29 17:36:31 -08:00
rogerman 000efb1095 GPU: Fix bug where native-sized lines would be improperly blended with non-native-sized lines during display capture.
Fixes a graphical issue in Golden Sun: Dark Dawn whenever a battle
sequence begins when using a custom framebuffer size.
2016-12-29 14:12:23 -08:00
rogerman 36e03fefa5 GPU: Disable the use of custom VRAM for extended BG layers whenever they are scaled or rotated.
Fixes the zoom-in effect whenever entering buildings in Pokemon
Black/White. (Regression from r5371.)
2016-12-29 10:26:24 -08:00
zeromus ae37e1259e winport: fix crash with HD prescale and --num-cores 1. OSD is messed up in this case. Not going to fix that now since --num-cores 1 is a very old quirks hack anyway. Fixes #20 2016-12-28 17:25:12 -06:00
rogerman 1213deb102 OpenGL Renderer: Fix various bugs when running OpenGL 2.1 and earlier.
Fixes regressions from commits 8fab805 and 7b13501.
2016-12-28 14:07:06 -08:00
zeromus 4710cf7e37 fix errors in ogl old 3d driver (recent changes from ogl 3.2 not fully ported) 2016-12-27 21:09:08 -06:00
rogerman 8159da3f0c GFX3D: Save the opaque polygon count in POLYLIST. 2016-12-26 14:19:45 -08:00
rogerman f50f9d38fd OpenGL Renderer: Reduce OGLRENDER_MAX_MULTISAMPLES from 16 to 8.
Now that framebuffer sizes can be greater than 256x192, using MSAAx16
is excessive and consumes too much bandwidth. We’re reducing the
maximum sample size of MSAA to 8 since it will significantly reduce
bandwidth consumption at the larger framebuffer sizes while remaining
mostly visually equivalent to MSAAx16.
2016-12-26 12:37:22 -08:00
rogerman 4e96cc8b6e Cocoa Port: Simplify some code in the OpenGL blitter. 2016-12-24 11:08:17 -08:00
rogerman fa971e3d63 GPU: Make updating the 3D renderer FPS into its own method. 2016-12-23 09:56:55 -08:00
rogerman 922a7ac6f6 GPU: Consolidate applying the master brightness into one place. 2016-12-22 22:16:56 -08:00
rogerman dfd23f6ba3 GPU: Fix bug where the master brightness would be incorrectly applied in some instances when a custom framebuffer size is used.
(Regression from commit 65d7568.)
2016-12-22 21:12:15 -08:00
rogerman 7b1350127d OpenGL Renderer: Fix instances where the transparent fragments of A3I5 and A5I3 textures would fail to render correctly.
Fixes issue #19.
2016-12-22 00:58:13 -08:00
rogerman 528513118a OpenGL Renderer: Greatly improve the accuracy of rendering shadow polygons. 2016-12-21 15:28:21 -08:00
rogerman 8fab80596b OpenGL Renderer: Minor rework on handling shadow polygons.
- Determining the depth write state is now handled purely within the
fragment shader.
- Color and depth write states are now handled more consistently across
fixed-function and fragment shader.
- Force backface culling when drawing shadow polygons.
2016-12-19 09:48:52 -08:00
rogerman 49309fb053 OpenGL Renderer: Allow all opaque non-shadow polygons to write to the depth buffer, making polygon opacity a priority state.
Fixes issue #13. (Regression from r5372.)
2016-12-16 13:00:32 -08:00
zeromus efcdd320f8 winport: attempt to make vsync work on opengl display method (see #14) 2016-12-16 01:00:47 -06:00
rogerman e6b352c73a GPU: When rendering the 3D layer, prioritize color blending over the window color effect flag.
Fixes color blending in the dialogue boxes of Front Mission.
(Regression from r5285.)
2016-12-14 17:04:07 -08:00
rogerman a80fa6d4de MMU: Only report writing to undefined registers when the value being written is non-zero. 2016-12-13 14:31:45 -08:00
rogerman ce4f61eaf6 texcache.cpp: Silence some compiler warnings. 2016-12-13 11:36:06 -08:00
rogerman 0628cb5756 Silence some debug messages related to the MASTER_BRIGHT register.
- Now that Mega Man Zero Collection has proven that it is perfectly
legal to set MASTER_BRIGHT within V-blank, remove the related debug
message.
- Properly silence the texture memory debug message when the
MASTER_BRIGHT intensity is 0.
2016-12-13 11:22:06 -08:00
zeromus f230067524 dont make tex deposterize and text smoothing default enabled on winport (bugged from e0f8e5a). fixes #10 2016-12-13 01:39:28 -06:00
rogerman de4f1c9c69 Colorspace Handler: Fix pixel alignment bug in ColorspaceConvert555To8888_AVX2() and ColorspaceConvert555To6665_AVX2().
Fixes issue #8.
2016-12-12 21:30:14 -08:00
zeromus 1cc8cb6fc6 fix lua print() on some systems, due to mistaken use of printf %Lg instead of just plain %g
(fix ported from fceux)
2016-12-12 16:26:21 -06:00
zeromus 5cfb407f35 winport: tidy some things required to make AVX2 support compile, apparently (see github #8) 2016-12-11 19:05:30 -06:00
rogerman 1787081fca GPU: Fix BG layer 3 when reading VRAM with a BMPAddress that maps exactly to the head of the VRAM blank region.
Fixes a possible graphical glitch during the Arangoa Prelude in Golden
Sun: Dark Dawn.
2016-12-10 21:26:30 -08:00
rogerman cf3758ff3f Command Line: Allow --disable-sound and --disable-limiter options on Windows.
These two options are, in fact, supported on Windows, so make them
universally available.
2016-12-10 13:39:29 -08:00
rogerman 1b3825a100 Command Line: Allow texture post-processing options on non-Windows platforms.
The —3d-texture-deposterize-enable, —3d-texture-upscale and —3d-texture-smoothing-enable options work independently of the frontend, and so it should be safe to make these options universally available.
2016-12-10 12:17:11 -08:00
rogerman 60e71ce823 Command Line: Add command line options for accessing the custom framebuffer sizing and texture postprocessing features.
--3d-texture-deposterize-enable
--3d-texture-upscale N [1|2|4]
--3d-texture-smoothing-enable
--gpu-resolution-multiplier N [1|2|3|4|5]
2016-12-09 16:52:56 -08:00
zeromus be11b35df9 winport: fix occasional garbage subscreen rect in one LCD mode (fix #6) 2016-12-09 05:56:06 -06:00
rogerman 36b192af00 SoftRasterizer: Fix bug where texture sampling coordinates were incorrectly calculated when texture upscaling is used with GFX3D_TXTHack enabled.
Fixes issue #5. (Related to commit a8c8a86.)
2016-12-08 01:18:41 -08:00
rogerman 7a573e75b5 NDSSystem: Fix bug where the X, Y, and Debug inputs were being read incorrectly, causing unintended behavior in many games.
Fixes issue #3 and issue #4. (Regression from commit bcc7421.)
2016-12-07 10:28:36 -08:00
zeromus 6b78dc1f12 since we have evidence (from cheaters) that 32bits should be supported: fix 8 and 32bit reads of timer registers. i probably messed something up since we have no proper systematic solution for doing this kind of stuff. 2016-12-06 01:45:01 -06:00
zeromus bcc7421be4 make EXTKEYIN register emulation more sensible, and possibly fix "0x04000134 activator" AR codes (due to the register formerly being readable only from 0x04000136 as a halfword) 2016-12-05 21:27:33 -06:00
zeromus bdf580036c fix fsnitro.cpp the way it was supposed to be fixed, without platform dependencies 2016-12-05 18:51:32 -06:00
rogerman 3b92f41b45 Windows Port: Fix compiling on Windows.
(Regression from commit 1d8bdd5.)
2016-12-05 16:02:27 -08:00
rogerman d2f054b5fb OpenGL Renderer: Fix bug where certain polygons would occasionally render their textures blank.
(Regression from commit 1368b2d).
2016-12-05 15:13:17 -08:00
zeromus 1d8bdd5b54 Merge pull request #1 from lefta/fix-linux-build
Fix linux build
2016-12-05 14:14:52 -06:00
zeromus 3498665e7b Merge pull request #2 from pal1000/work
gitignore: Visual Studio 2015 database
2016-12-05 14:14:16 -06:00
rogerman 9564097182 SoftRasterizer: Further cleanup following 7711f82. 2016-12-05 11:49:00 -08:00
rogerman 7711f8288b SoftRasterizer: Fix bug where the texture wrap mode would be applied inconsistently under multithreaded rendering.
(Regression from 032622e.)
2016-12-05 11:45:40 -08:00
pal1000 af1a77e294 gitignore: Visual Studio 2015 database
Visual Studio 2015 produces an extra .VC.db file when building any
solution
2016-12-05 19:22:33 +02:00
zeromus e767018e2a cheats: fix error in masked comparison functions 2016-12-05 05:32:59 -06:00
rogerman 65d7568259 GPU: Revert applying the master brightness as a framebuffer operation. It is now a scanline operation once again.
Fixes brightness issues in The Legend of Zelda: Spirit Tracks.
(Regression from #ac69f1e.)

The user may still choose to apply master brightness on a
per-framebuffer basis by passing ‘false’ to
GPUEngineBase::SetWillApplyMasterBrightnessPerScanline(). For better
consistency, this behavior has also been changed to only use the master
brightness settings as they were in line 0.
2016-12-04 00:59:36 -08:00
zeromus 5f1e50db69 cheats: fix Ex, DB, and Fx codes 2016-12-03 23:44:52 -06:00
Cédric Legrand 2f327c4af0 Fix glade frontend build 2016-12-03 22:58:02 +01:00
Cédric Legrand 5d10b8022a Fix linux build 2016-12-03 16:15:52 +01:00
rogerman 444b1f67db Texture Handler: TextureStore::VRAMCompareAndUpdate() now performs a single memcmp() on the packed data instead of performing each memcmp() separately. 2016-12-02 22:45:42 -08:00
rogerman c5678a6ba4 Render 3D: Whenever the texture deposterization or upscaling settings are changed, simply reload the existing textures instead of completely destroying and recreating them from scratch. 2016-12-02 22:08:21 -08:00
rogerman ac69f1e229 GPU: If a GPU engine has master brightness at full intensity , revert to filling the output framebuffer on line 0.
Fix bug where the screen may end up fully black or white if the master
brightness is modified in the middle of the frame. Fixes SourceForge
#1603. (Regression from r5538.)
2016-12-02 13:50:17 -08:00
rogerman a0f8b7a894 GPU: Fix crashing bug where target.lineLayerID can be overrun at custom framebuffer sizes.
Fixes SourceForge issue #1600. (Regression from r5512.)
2016-12-02 10:40:14 -08:00
rogerman 8821e7b162 Render3D: Make _textureList universal for all 3D renderers. 2016-11-29 17:09:25 -08:00
rogerman 1368b2d5c7 Render3D: Make the _isSamplingEnabled flag universal for all 3D renderers.
Also update the OpenGL renderer to use the new flag.
2016-11-29 16:49:52 -08:00
rogerman 032622e817 SoftRasterizer: Have texture setup within the main rendering loop be handled more like how OpenGLRenderer does it. 2016-11-29 16:31:38 -08:00
rogerman 2698993805 OpenGLRenderer: Rework texture loading to work at BeginRender(), just like how SoftRasterizer does it. 2016-11-29 13:34:08 -08:00
zeromus 3da9f273d2 cheats: add notes for C4 and C5 codes (won't be implemented until needed) and implement C6 code (only for v1.54 ARDS) 2016-11-29 14:40:14 -06:00
zeromus 6abf2b3454 completely rewrite ARDS processing. definitely fix some bugs. probably create some more. overall clarity level increased 2016-11-29 02:50:03 -06:00
zeromus 9d6e52acac winport: change labels to show texture scaling applies to all 3d renderers now 2016-11-28 22:28:24 -06:00
zeromus 1c36704633 winport: a bunch of other vcxproj path fixes. I don't know how this got so broken. there's probably still more broken 2016-11-28 22:22:41 -06:00
zeromus 5b1a034aa9 cleanup fsnitro (clean portability hazards and use libretro-common parts) 2016-11-28 21:44:32 -06:00
zeromus 1559f450fd winport: fix a bunch more paths in vcxproj 2016-11-28 21:21:58 -06:00
rogerman 6d1db6daae Render3D: Refactor common parts of OpenGLTexture and SoftRasterizerTexture into a new Render3DTexture class. 2016-11-28 15:08:24 -08:00
rogerman 031f677486 OpenGL Renderer: Refactor and use the same coding style for texture loading as SoftRasterizer. 2016-11-28 13:55:46 -08:00
rogerman b82f42dfde Cocoa Port: Update Xcode project files to reflect the current state of the file hierarchy. 2016-11-27 21:55:06 -08:00
rogerman 2f98c8b545 Merge remote-tracking branch 'origin/master' 2016-11-27 20:57:09 -08:00
rogerman b57f2dec12 Cocoa Port: Update GUI to reflect the new SoftRasterizer texture post-processing support.
Moves the Deposterize Textures and Texture Scaling Factor UI items from
OpenGL Options to General Settings in the 3D Rendering Settings panel
and DeSmuME Preferences.
2016-11-27 16:43:53 -08:00
rogerman a8c8a8665b SoftRasterizer: Texture deposterization and upscaling are now supported with this renderer. 2016-11-27 16:10:00 -08:00
zeromus 425ddecb8b cleanup: remove our own ConvertUTF8 file which was only being used by the movie code (which needs radical cleanup anyway); use libretro-common's isntead. however we're keeping our std::string wrappers which are convenient. 2016-11-27 16:19:15 -06:00
zeromus 9a613fb440 libretro-common: update UTF files from upstream 2016-11-27 16:04:43 -06:00
zeromus fb561adaad winport: fix a bunch of header paths in vcxproj 2016-11-27 15:20:59 -06:00
zeromus 574815124a cleanup: remove md5 (it was deactivated, and we should use libretro-common's if we readd it
cleanup: move valuearray into guid which was the only place using it. we should probably then move guid into movie later, since it's unlikely anything else will use it.
2016-11-27 15:13:33 -06:00
zeromus 4a922b927d winport: fix disassembler move, and other project tidy (rearrange sources to match source tree) 2016-11-27 14:54:41 -06:00
zeromus 297721b73d make disassembler a frontend module 2016-11-27 14:50:26 -06:00
zeromus 3e10928bf5 libretro-common: incorporate latest cpu_features (and merge with prior commit). rogerman please check. 2016-11-27 14:36:58 -06:00
rogerman 0a4635eb5b Texture Handler: Use the new TextureStore::Load() method instead of calling TextureStore::Unpack() directly. 2016-11-26 19:55:52 -08:00
rogerman 41e9b1680e Cocoa Port: Update Xcode project files and scripts for the GitHub transition. 2016-11-26 17:40:01 -08:00
rogerman 3612586e8b Ignore .xcscmblueprint files for now.
It doesn’t look like it’s really needed for commits, but if we find it
necessary in the future, we can always bring it back.
2016-11-26 17:39:24 -08:00
rogerman 7f77037c75 Cocoa Port: Update include paths due to commit #ed40663. 2016-11-26 17:21:13 -08:00
rogerman 2612484c54 Core: Update some include paths. 2016-11-26 17:11:39 -08:00
rogerman 183b41cb77 libretro-common: Update features_cpu.c to take macOS 10.12 Sierra into account when defining clock_gettime(). 2016-11-26 17:10:05 -08:00
rogerman 6744e162a8 Update .gitignore for Xcode 2016-11-26 17:06:45 -08:00
rogerman ed40663b1f Move Cocoa frontend files to the desmume/src/frontend/cocoa directory. 2016-11-26 16:01:57 -08:00
zeromus 2144f44c67 minimum work needed to get windows picking git's lamehash instead of svn's coolrev. thanks to dolphin for the script. other frontends shouldn't be affected. 2016-11-23 23:54:16 -06:00
zeromus e1d635c392 fix endian ifdefs to newer standard 2016-11-23 22:42:50 -06:00
zeromus e2d9626be9 fix windows build after merge grief 2016-11-23 22:42:40 -06:00
zeromus f97283e9bc Merge branch 'master' into round-1-start
# Conflicts:
#	desmume/src/frontend/windows/DeSmuME.vcxproj.filters
#	desmume/src/libretro-common/rthreads/rthreads.c
#	desmume/src/texcache.cpp
#	desmume/src/utils/vfat.cpp
2016-11-23 21:13:34 -06:00
twinaphex 1394197244 Silence more Clang warnings 2016-11-23 21:12:34 -06:00
twinaphex 559b4ad077 Prevent some Clang warnings 2016-11-23 21:12:34 -06:00
zeromus 81d1070d9a remove agg and osd stuff from emulator core to a frontend module 2016-11-23 21:11:58 -06:00
zeromus 012b8d9e19 goodbye PO files 2016-11-23 21:11:45 -06:00
zeromus 43d6e7f7e3 trying to merge some stuff 2016-11-23 21:11:38 -06:00
zeromus a8d04b5152 fixes related to building new colorspace handler 2016-11-23 21:11:15 -06:00
zeromus 9f91a14b7f fixes related to building new colorspace handler 2016-11-23 21:10:53 -06:00
zeromus 41d26c6bd7 fix some endian macro bugs in new code from last merge 2016-11-23 21:10:37 -06:00
zeromus ae64d4659b Merge commit '9c1f523a725abca2fcfbf07cd11d12077154a80c' into round-1-start
# Conflicts:
#	desmume/src/GPU.h
#	desmume/src/frontend/windows/DeSmuME.vcxproj
#	desmume/src/frontend/windows/DeSmuME.vcxproj.filters
#	desmume/src/types.h
2016-11-23 21:09:50 -06:00
zeromus 56083bcd1f move source files only used by posix frontends 2016-11-23 21:06:39 -06:00
zeromus 57f26cb716 fix little bug in cli building 2016-11-23 21:06:39 -06:00
zeromus 7a12d75529 .gitignore 2016-11-23 21:06:38 -06:00
zeromus 23ae2f8a60 move gtk,cli ports to frontend/posix directory 2016-11-23 21:06:38 -06:00
zeromus 602da31591 Revert "(MMU_timings.h) Style nits/cleanups"
This reverts commit 04c8b0915e85da85a8f08a7b2ad6814d95b6618f.
2016-11-23 21:06:38 -06:00
zeromus b554b05b00 Revert "(MMU.cpp) Cleanups/style nits"
This reverts commit 2d9d446a0fa845f895bcba61dcbd53af96521e39.
2016-11-23 21:06:38 -06:00
zeromus 9d63abca3f Revert "(MMU.cpp) Use retro_assert" (fine idea but unintentional functional changes) This reverts commit 2e8886adb041aa341f8eb214039ea887e8acdf39. 2016-11-23 21:06:38 -06:00
zeromus 8a23178d29 Revert "remove ConvertUTF (use libretro-common parts instead)" Yikes! I didn't realize this was going to be such a mess. Need stronger wchar_t-based fu in libretro-common This reverts commit 55e71006b04c824f7cd5f1f2f70a3ff9c9912c03. 2016-11-23 21:06:38 -06:00
twinaphex 7fac2b6e11 Move en/delsb functions to src/utils/guid.cpp 2016-11-23 21:06:38 -06:00
twinaphex 5d52b7a0af Don't need float to u32 and vice versa functions 2016-11-23 21:06:38 -06:00
twinaphex 2759834178 Move FlipByteOrder to saves.cpp 2016-11-23 21:06:38 -06:00
twinaphex 10b6b1e33a (MMU.cpp) Use retro_assert 2016-11-23 21:06:38 -06:00
twinaphex 6c4aa4571d (MMU.cpp) Cleanups/style nits 2016-11-23 21:06:38 -06:00
twinaphex 09879832b3 (MMU_timings.h) Style nits/cleanups 2016-11-23 21:06:38 -06:00
zeromus a5ab52c3fb remove some unused garbage from xstring, so we at least have an idea what garbage is actually in use 2016-11-23 21:06:37 -06:00
zeromus b40ae5699c remove ConvertUTF (use libretro-common parts instead). The results haven't been tested real well, but it's only used in movies.. could be cleaner with a few little changes to libretro-common parts but i'm too tired now 2016-11-23 21:06:37 -06:00
zeromus c61e44da34 libretro-common : fix extern C guards in encodings/utf.h 2016-11-23 21:06:37 -06:00
zeromus 1705b3eb21 remove a bunch of common.h includes, since that file's almost dead 2016-11-23 21:06:37 -06:00
zeromus 84e5c98ef0 move windows port into frontend directory 2016-11-23 21:06:37 -06:00
zeromus 63feee1190 remove some dependencies from xstring.h 2016-11-23 21:06:36 -06:00
zeromus 45d07d41de move bits.h to utils/bits.h. quite a lot of noise, but i tidied up some header dependencies while i was at it 2016-11-23 21:06:36 -06:00
twinaphex 632a322be9 Add arm_arm dynarec 2016-11-23 21:06:36 -06:00
twinaphex 75c9c6f5d2 Silence warning with Clang 2016-11-23 21:06:36 -06:00
twinaphex f54d68405f Use libretro-common's fxp.h header 2016-11-23 21:06:36 -06:00
zeromus d1dfb067bf .gitignore 2016-11-23 21:06:36 -06:00
zeromus ff2536aa0f create Database.cpp to contain game database-like things. Kind of a weak refactor, and doesnt have savedata records yet, but it helps me whittle common.cpp down to nothing. 2016-11-23 21:06:36 -06:00
zeromus b646efdd55 common.h/common.cpp garbage cleanup 2016-11-23 21:06:36 -06:00
zeromus ff3eb24e2a remove clunky, buggy, and memory-leaking bitwise instruction decoding only used during error messages pretty much for displaying the opcode part of the instruction. would be better implemented as an online utility anyway 2016-11-23 21:06:36 -06:00
zeromus 1303defe47 delete garbage 2016-11-23 21:06:36 -06:00
zeromus 21ddbb95eb fix windows building 2016-11-23 21:06:36 -06:00
zeromus 96143c293b .gitignore 2016-11-23 21:06:36 -06:00
twinaphex 9893afc59a Get rid of macro 2016-11-23 21:06:36 -06:00
twinaphex be01a89164 Get rid of emufile_types.h 2016-11-23 21:06:35 -06:00
twinaphex cf185123eb Reduce ifdef to what's necessary 2016-11-23 21:06:35 -06:00
twinaphex aab3a7d0a6 enums - last enum value should not have a comma 2016-11-23 21:06:35 -06:00
twinaphex a607264086 Start replacing getOnlinecores with libretro-common equivalent 2016-11-23 21:06:35 -06:00
twinaphex 2d0852aaf9 Update vfat.cpp so that it works again with new libretro-common code 2016-11-23 21:06:35 -06:00
twinaphex 3b0fc202b2 Update libretro-common 2016-11-23 21:06:35 -06:00
twinaphex f8d129b164 Use only MSB_FIRST for determining endianness 2016-11-23 21:06:35 -06:00
twinaphex 629681b094 Get rid of INLINE macro - handled by retro_inline.h 2016-11-23 21:06:35 -06:00
twinaphex 2a71c9c6fb Use retro_miscellaneous.h 2016-11-23 21:06:35 -06:00
zeromus 833ac7b658 remove locale crap, which probably breaks the glade port, but i dont care right now 2016-11-23 21:06:35 -06:00
zeromus 0e8265e911 root directory cleanup, move docs to doc dir 2016-11-23 21:06:35 -06:00
zeromus 6489452867 kill QT port 2016-11-23 21:06:34 -06:00
zeromus ac500c8249 gitignore 2016-11-23 21:06:34 -06:00
rogerman 02645310b4 Texture Handler:
- Finish refactoring and cleaning up TexCache (now renamed to “TextureCache”) and TexCacheItem (now renamed to “TextureStore”).
- TextureCache items are now evicted based on age and usage instead of arbitrarily.
2016-11-23 20:41:07 +00:00
zeromus c75b9ed62b oops, remove unneeded printf 2016-11-11 02:34:02 +00:00
zeromus 2801ee5d19 fix vfat (broken in r5438). file sizes weren't counted right. only ~36MB would get allocated and then it would get blown when loading the files. 2016-11-11 02:33:33 +00:00
zeromus 6e0077ecb9 fix retriggering sounds in AC:WW 2016-11-10 07:02:54 +00:00
rogerman 812cabb752 Texture Handler:
- The 3D renderers are now responsible for managing the texture unpack buffers instead of relying on the TexCacheItem itself to do it.
- The OpenGL 3D renderer now uses a fixed 4MB buffer for unpacking textures, instead of maintaining extra copies of each unpacked texture in main memory even after they’ve been uploaded to the GPU.
2016-11-03 00:39:02 +00:00
rogerman 158f0c561b Texture Handler:
- Increase TEXCACHE_MAX_SIZE to 32MB. Fixes severe performance problems with continuously evicting/reloading the texture cache in Umihara Kawase Shun.
2016-11-02 18:49:36 +00:00
rogerman b0e649c9bb Texture Handler:
- Fix a bug where 4x4 formatted textures were being read incorrectly. (Regression from r5569.)
2016-11-02 09:37:59 +00:00
rogerman df60214b26 Texture Handler:
- Rework TexCacheItem::GetTexture() so that instantiating a new object, dumping the packed data, and dumping the palette are performed as separate operations.
- Invalid OpenGL textures are now updated instead of being completely replaced.
- NDSTextureUnpack4x4() now uses the srcIndex pointer parameter instead of recalculating the palette address.
- Delete the now obsolete MemSpan-based texture unpacking functions.
2016-11-02 07:25:11 +00:00
rogerman 2c82d4b7b4 Texture Handler:
- Texture items in cache are now searched using std::map instead of std::multimap.
- Texture item search keys now ignore the render-specific bits of the texture attributes (repeat mode, flip mode, and coordinate transformation mode bits are ignored). This is to help reduce the number of duplicate textures in the cache.
- Searching a texture and unpacking a texture are now performed as separate operations.
- Texture unpacking functions now use restrict pointers instead of normal pointers.
2016-11-01 21:07:17 +00:00
rogerman 95db2317b9 Texture Handler:
- Do some heavy cleanup and code refactoring.
- Add SSE2-enabled unpacking function for direct 16-bit color textures.
2016-10-30 23:16:49 +00:00
zeromus 318613e783 add savetype hardcode for puzzler world 2016-10-25 06:02:33 +00:00
zeromus 77918f13ee fix support importing newer style ardsi duc files 2016-10-05 08:21:38 +00:00
zeromus 66613008f1 update path format tooltip 2016-10-03 01:48:05 +00:00
rogerman b9c33745c5 Filters:
- Simplify the functionality of the Deposterize filter by making the threshold a constant value.
- Increase the Deposterize threshold from 21 to 23.
2016-09-30 05:41:00 +00:00
zeromus 284119237e support importing newer style ardsi duc files 2016-09-30 05:08:23 +00:00
rogerman 4af90cd902 Filters:
- Remove the Deposterize texture filter from render3D.cpp and make it a general-purpose standalone filter.
2016-09-29 00:58:04 +00:00
zeromus b39f9ef9e4 fix bugs in MC import. I dont want to talk about it. 2016-09-25 22:09:13 +00:00
rogerman 59088e1ff8 Cocoa Port:
- OS X App Debug builds now use Xcode 8’s new Incremental LTO feature.
2016-09-14 21:49:47 +00:00
zeromus 14458da8f8 do a better job on the language setting, probably 2016-09-08 22:39:31 +00:00
zeromus ebff84cd45 try to apply patches from #1593 2016-09-08 22:31:31 +00:00
zeromus de91bcf369 winport: fix #1590 1 pixel black line on the right side of the emulator 2016-09-06 21:17:32 +00:00
zeromus df7f081cb5 placement of fastbuild hacks in gpu.cpp breaks some build types. tired of fixing it locally. not a safe hack anyway. 2016-09-06 18:09:00 +00:00
zeromus 8f6bfd2808 w32 scond: reorder variable declarations and statements for ancient compilers 2016-09-02 01:15:26 +00:00
rogerman 538442861b rthreads.c:
- In scond_wait(), make use of SignalObjectAndWait() as an optimization.
2016-08-29 20:08:07 +00:00
zeromus 5d66422b94 win32 scond: remove volatile, fix busy loops in some scenarios, tidy code. Except for scond_wait_timeout, this may be done 2016-08-29 04:54:30 +00:00
rogerman 386d9bad96 task.cpp:
- Revert the last resort execution of workFunc in Task::Impl::finish(). Windows now has much better compliance with the behavior of pthread_cond_wait(), so the last resort execution is no longer necessary.
2016-08-26 10:57:20 +00:00
rogerman 3ae591be7a task.cpp:
- Add additional checks for workFunc in Task::Impl::execute() and Task::Impl::finish() to make their reentrancy more robust on Windows.
- Add a last resort execution of workFunc in Task::Impl::finish() in the case where taskProc() misses the wake up signal from Task::Impl::execute() when running on Windows.
2016-08-26 03:45:42 +00:00
rogerman 212c23f30e task.cpp:
- EXPERIMENTAL: Revert task.cpp and pthreads.c to what they were back in r5538, but change scond_wait() to explicitly unlock the mutex before calling WaitForSingleObject().
2016-08-24 21:17:39 +00:00
zeromus 66bc2d1d71 etc 2016-08-23 23:35:06 +00:00
zeromus 166365ab0d task cleanup and add some volatiles which i reasoned were necessary 2016-08-23 23:32:44 +00:00
rogerman 07e3612e4d task.cpp:
- When shutting down, ensure that the existing task is finished if its running before continuing with the shutdown process.
- Explicitly declare thunkTaskProc() as static.
2016-08-23 23:17:10 +00:00
rogerman a1a6c47aac task.cpp:
- Fix compiling for non-MSVC compilers.
2016-08-23 21:55:59 +00:00
zeromus fc77539bda reimplement task to not be buggy 2016-08-23 21:13:29 +00:00
zeromus ae92918d27 fix bugs in libretro's scond for win32, hopefully. 2016-08-23 21:12:49 +00:00
rogerman b4759f854c GPU:
- Add some functions to control when master brightness and RGB666=to=RGB888 conversions occur internally or not.
2016-08-22 21:04:03 +00:00
jsteffens 701bfdde80 configure.ac: Add missing conditionals 2016-08-21 22:41:56 +00:00
jsteffens a7a9371b3a Makefile.am: Fix syntax errors 2016-08-21 21:52:29 +00:00
zeromus 5b2691b40e winport: experimental fix for hanging softrasterizer code. extremely finnicky and untested thread synchronization code in here! 2016-08-21 01:16:51 +00:00
rogerman 44b227d0b8 GPU:
- If a GPU engine is disabled or has master brightness at full intensity, fill the output framebuffer on line 191 instead of on line 0.
- Replace global variable Render3DFramesPerSecond with accessor method GPUSubsystem::GetFPSRender3D().
2016-08-20 19:20:27 +00:00
rogerman c5cae26246 GPU:
- Do some additional tweaks to how GPU events are handled. (Related to r5534.)
2016-08-18 04:38:59 +00:00
rogerman 84a007451a Colorspace Handler:
- Generic color conversion functions are now inlined at the header in order to keep up performance for compilers without LTO.
2016-08-18 04:14:45 +00:00
zeromus 9c1f523a72 support --3d-render in common commandline parsing and use in windows port as a demo 2016-08-16 22:00:27 +00:00
rogerman 8c60f5fdf3 GPU:
- Use more consistent behavior when forcing the 3D rendering to finish.
- Guarantee that 3D rendering will always be finished at the end of V-blank.
2016-08-16 20:00:36 +00:00
rogerman d8735a803b Colorspace Handler:
- Factor out the generic colorspace handling routines out of GPU.cpp/GPU.h into their own separate files.
- Add vectorized routines using AVX2 and AltiVec.
2016-08-16 06:47:22 +00:00
rogerman d837653b5f GFX3D:
- Fix 3D rendering on non-MSVC builds.
2016-08-16 00:12:34 +00:00
zeromus 7abca69750 better fix than r5529 for same bug (which fixes some regressions from that commit) 2016-08-15 07:10:42 +00:00
zeromus abbfa4a6b7 fix #1134 (american girls julie finds a way) by changing behaviour of box test busy flag relative to fifo 2016-08-13 23:50:25 +00:00
zeromus cc2c86cf11 fix #1555 (regression in Kingdom Hearts Re:coded caused by r5440) by changing how wacky nearly-out-of-limits geometry is handled to a possibly more plausible mechanism 2016-08-13 23:48:51 +00:00
zeromus d89fa0c761 winport: fix fastbuild flag 2016-08-13 18:24:45 +00:00
zeromus 17b7ebfa88 change backup memory whitelist application technique and fix SM64 (KOR) which needs an 0.5KB eeprom apparently (based on its use of WRHI and RDHI commands) 2016-08-13 18:24:33 +00:00
zeromus 02a5944a20 winport: allow sizing window under "minimum size". Unclear why we wanted this functionality to begin with, but probably predated view>window size multiples for more easy scaling. Other benefit: stops messing up the viewport determination when magnification overshoots window size (i.e. fullscreening a massive 5x filter applied by idiots) 2016-08-08 03:10:13 +00:00
rogerman a966765ae5 GPU:
- Display capture blending functions now support RGB888 color format. (Related to r5433. This rework is still incomplete.)
2016-08-07 00:26:31 +00:00
rogerman c7e3298b94 GPU:
- Fix compiling on systems that support SSE2 and not SSSE3. (Regression from r5524.)
2016-08-06 04:09:57 +00:00
rogerman 9ea82d913a GPU:
- Do some code cleanup.
2016-08-06 03:36:37 +00:00
rogerman e54a0eb3e4 GPU:
- Fix bug where the composited 3D layer could have incorrect colors on non-SSE2 systems. (Regression from r5509.)
2016-08-04 01:08:42 +00:00
rogerman cd7690730b GPU:
- For SSE2 systems, when reading graphics data from main memory, eliminate the extraneous pshufd instruction.
2016-08-03 18:14:44 +00:00
rogerman 2e2d02302b GPU:
- Fix compiling issue with non-SSE2. (Regression from r5512.)
2016-07-31 21:10:14 +00:00
rogerman 44ff1b077f Cocoa Port:
- Do some minor code cleanup.
2016-07-30 01:50:54 +00:00
rogerman b053c562d0 GPU:
- Do some minor code cleanup.
2016-07-30 01:49:47 +00:00
zeromus 7dae5d2206 fix #1570 better 2016-07-30 01:38:14 +00:00
rogerman 0ee96c0262 GPU:
- Fix bug where the OBJ layer wasn’t doing the window test. Fixes graphical issues in Mario Kart DS. (Regression from r5515. Fixes bug #1572 and #1574.)
- The NOWINDOWSENABLEDHINT template parameter is no longer an optional hint; it is now required functionality. It has been renamed to WILLPERFORMWINDOWTEST to reflect this change.
2016-07-28 19:34:12 +00:00
rogerman 687ddb39c2 GPU:
- Window testing is now a per-scanline operation instead of a per-pixel operation. Removes the performance penalty of window testing at larger framebuffer sizes.
2016-07-27 16:58:39 +00:00
zeromus d6677ef42f apply suggestions from #1570 2016-07-26 17:17:36 +00:00
zeromus 2d143a9147 fix infinite loop bugs in commandline parsing 2016-07-26 17:15:27 +00:00
rogerman b5519378e7 GPU:
- Use a GPUEngineCompositorInfo struct for managing compositor states, instead of using individual variables for everything.
2016-07-22 19:30:24 +00:00
rogerman cd07e14802 GPU:
- Fix bugs with window processing when rendering at the native resolution. (Regression from r5506.)
2016-07-22 18:32:31 +00:00
rogerman ebea960714 Cocoa Port:
- In the OpenGL blitter, replace some calls to glBufferSubDataARB() with glMapBufferARB(). This, maybe, possibly, fixes an intermittent crash that can occur with the Intel HD Graphics 3000 OpenGL driver.
2016-07-20 10:07:53 +00:00
rogerman ab874d0d5e GPU:
- Do some code cleanup.
2016-07-19 06:40:53 +00:00
zeromus d243063c2c add texture smoothing option to windows port 2016-07-16 22:21:22 +00:00
rogerman 7d58eb9885 GPU:
- Move towards completing support for changing the output framebuffer color format to RGB666 or RGB888. Significantly increases the generated code size, but this is necessary for performance. (Related to r5433. This rework is still incomplete.)
2016-07-15 20:30:05 +00:00
rogerman c5c9e14eb9 GPU:
- Parse and cache the WININ and WINOUT registers, instead of using them directly.
- Parse and cache the Target1 bits of the BLDCNT register.
- Remove some template parameters which are now suspected to no longer improve performance, most notably LAYERID. Should significantly reduce the generated code size.
2016-07-15 16:29:08 +00:00
rogerman 7ae811e5cf GPU:
- Do some refactoring and code cleanup.
2016-07-14 05:49:47 +00:00
rogerman 6530d35c3e GPU:
- Do some minor code cleanup.
2016-07-13 23:14:38 +00:00
rogerman 3a11617bed GFX3D:
- Do some minor code cleanup.
2016-07-13 23:13:14 +00:00
zeromus fedef6c842 apply patch #174 2016-07-12 17:50:24 +00:00
zeromus 07c08f03d2 remove non-OPTIMIZED_CLIPPING_METHOD which hasnt been used for 7 years. also remove the broken index_lookup_table which used it (reported by patch #173) 2016-07-12 17:48:53 +00:00
rogerman ae0023c5fd Linux Port (GTK-Glade):
- Fix bug where the NDS displays wouldn't draw in the window when GdkGL is enabled. (Regression from r5273.)
2016-07-12 01:18:01 +00:00
rogerman 8454c93fa3 Apply patch from [patches:#172]: “fix gcc compiler warning about pointer conversion in path.h” 2016-07-11 15:37:11 +00:00
zeromus a39d104d1b fix windows screenshots from r5458 / r5459 2016-07-11 01:36:34 +00:00
rogerman 11673c7a88 Render3D:
- Additional tweaks to texture upscaling on textures that are not A3I5 or A5I3. (Related to r5496.)
2016-07-10 07:02:08 +00:00
rogerman 8e08a92b9d Render3D:
- Improve texture upscaling smoothness for A3I5 and A5I3 textures.
2016-07-10 06:27:20 +00:00
rogerman 8be7dccdda GPU:
- Do a tiny optimization for GPUEngineBase::_RenderPixel16_SSE2().
- Fix a bug where the 3D layer would fail to draw correctly on non-SSE2 systems if the output framebuffer’s color format is RGB666 or RGB888. (Regression from r5492.)
- Do some minor code cleanup.
2016-07-10 03:38:22 +00:00
rogerman 3246953ca2 GPU:
- Oops! Fix a build issue where the code would fail to compile for architectures that support SSE2 but not SSSE3. (Regression from r5493.)
2016-07-08 18:51:28 +00:00
rogerman 1f0ca239bb GPU:
- 2D layer compositing now supports RGB666 and RGB888 color formats. (Related to r5433. This rework is still incomplete.)
- Fix a couple of bugs in GPUEngineBase::_ColorEffectBlend3D() when dealing with RGBA6665 or RGBA8888 color formats.
2016-07-08 18:45:13 +00:00
rogerman 6c78aa0520 GPU:
- Establish some assumptions about what the 3D layer’s color format will be with respect to the output framebuffer’s color format. This is being done in order to simplify the code.
- The new rules are as follows: If the output framebuffer’s color format is RGB666 or RGB888, then the 3D layer’s color format will be RGBA6665 and RGBA8888, respectively. If the output framebuffer’s color format is RGB555, then the 3D layer’s color format will be RGBA6665.
2016-07-07 00:57:26 +00:00
rogerman 1b93208782 GPU:
- 3D layer compositing now supports RGB666 and RGB888 color formats. (Related to r5433. This rework is still incomplete.)
- Fix a bug in GPUEngineBase::_ColorEffectBlend3D() where variables were left undefined when the source and destination color formats were mismatched.
2016-07-07 00:12:34 +00:00
rogerman 771ceee36b GPU:
- Partially fix a bug with affine and extended BG layers on big-endian systems. Such layers that perform rotation or scaling aren’t fixed yet.
- Loosen a restriction on taking the faster code path in GPUEngineBase::_RenderPixelIterate_Final().
- Silence a compiler warning on non-SSE2 systems.
2016-07-06 01:23:36 +00:00
rogerman b129392683 Render3D:
- Fix some coloring issues on big-endian systems brought about by the recent changes to the colorspace conversion code. (Regression from r5455.)
2016-07-04 00:13:36 +00:00
rogerman 68825ec961 Texture Handler:
- Fix unpacking 16-bit direct color textures on big-endian systems.
2016-07-03 21:58:42 +00:00
rogerman cab3408049 OpenGL Renderer:
- Fix a bug where if both flipping and colorspace conversion occur on the CPU, then the 3D framebuffer would flush incorrectly. (Regression from r5455.)
2016-07-03 07:56:59 +00:00
rogerman d50c8f8e3e GPU:
- Nope! Apparently, GPUEngineBase::_RenderPixel_CheckWindows16_SSE2() does need to be forced inline, or else performance will drop! (Regression from r5485.)
2016-07-03 02:17:42 +00:00
rogerman b314a49dee GPU:
- GPUEngineBase::_RenderPixel_CheckWindows16_SSE2() no longer need to be forced inline.
- Do some code cleanup.
2016-07-03 01:46:50 +00:00
rogerman a815b1c458 Cocoa Port:
- Fix another tiny blending bug in the 5xBRZ fragment shader. (Related to r5379.)
2016-07-02 22:07:26 +00:00
rogerman 2953799788 Linux Port (CLI / GTK / Glade):
- Fix builds that were broken due to new libretro-common API additions. (Regression from r5398.)
- KNOWN REGRESSION: In order to hasten the process of restoring the ability to build the Linux ports, the additional command-line options that are available in the Linux ports have been disabled. Maybe someone else can restore their functionality.
2016-07-02 20:23:56 +00:00
rogerman 3c5461e786 Core:
- Fix some issues with building on older compilers.
2016-07-02 19:47:13 +00:00
rogerman 9683b7e070 GPU:
- Once again, tell the 3D renderer which framebuffers need to be flushed per frame so that we can avoid flushing unneeded framebuffers. This fixes a performance regression with many 3D games. (Regression from r5383.)
2016-07-01 20:19:13 +00:00
rogerman e6dac5ec96 GPU:
- Further optimize the SSE2 versions of ConvertColor555To6665Opaque() and ConvertColor555To8888Opaque().
2016-07-01 18:32:10 +00:00
rogerman a05ddab710 Texture Handler:
- Include SSSE3 versions for unpacking the following texture types: I2, I4, and A5I3.
- As a side-effect of working on these optimizations, the SSE2 versions of ConvertColor555To6665Opaque() and ConvertColor555To8888Opaque() are now a little faster.
2016-07-01 10:15:57 +00:00
rogerman 0d9d59455f GPU:
- Remove GPUEngineBase::_RenderPixel_CheckWindows8_SSE2() and GPUEngineBase::_RenderPixel8_SSE2(). I don’t see us ever needing to use these methods in the future.
- Replace patterns of por(pand,pandn) with pblendvb where appropriate. (Requires SSE4.1)
2016-07-01 00:13:32 +00:00
rogerman a35edad4fc GPU:
- The need to read the 3D framebuffer is now checked on a per-line basis instead of solely at line 0. Once more, this fixes the map rendering in Advance Wars: Dual Strike during some conversations. (Regression from r5429.)
2016-06-29 19:16:23 +00:00
rogerman 031f65fe83 GPU:
- Fix a bug in window processing. Fixes the appearance of chips in the Gear Matrix of Kingdom Hearts Re:coded. (Regression from r5473.)
2016-06-29 16:13:34 +00:00
rogerman bce02d9cc8 Render3D:
- Remove duplicate lookup table.
- Better optimize Render3D_SSE2::ClearFramebuffer(). Should improve performance for games that do their clears using image buffers.
2016-06-29 06:29:11 +00:00
rogerman 558e405511 GPU:
- Ensure that window states are updated when the framebuffer size changes. (Regression from r5473.)
2016-06-29 01:03:11 +00:00
rogerman 8cfea593f8 GPU:
- Improve the SSE2 optimizations in the compositor.
2016-06-29 00:28:02 +00:00
rogerman 425643bf92 GPU:
- GPUEngineBase::_ColorEffectBlend() now supports RGB666 and RGB888 color formats.
- Use some SSSE3-specific optimizations in GPUEngineA::_RenderLine_DispCapture_BlendFunc_SSE2().
- Do some minor cleanup.
2016-06-27 06:11:39 +00:00
rogerman edf1d305d4 GPU:
- Fix a small bug where uninitialized variables were being used. (Related to r5470.)
2016-06-26 08:04:32 +00:00
rogerman d04c8eeae7 GPU:
- Continue rework towards supporting RGB666 and RGB888 color formats. (Related to r5433. This rework is still incomplete.)
- More basic blending methods now support RGB666 and RGB888 color formats.
- Don’t reset some sprite-related state buffers if the OBJ layer is disabled.
- Replace instances of std::min() with ternary operators.
- Better optimize SSE2 versions of ConvertColor8888To5551() and ConvertColor6665To5551().
- Use some SSSE3-specific optimizations in GPUEngineBase::_ColorEffectBlend() and GPUEngineBase::_ColorEffectBlend3D().
- Fix some compiling issues with some SSE2 color conversion functions on older compilers.
2016-06-26 05:46:42 +00:00
zeromus cdd5892c60 fix vs2010 compiling. gpu.cpp compling is slow... :( 2016-06-24 18:29:00 +00:00
rogerman dde0da24ab GPU:
- Avoid generating autovectorized SSE2 code for loops where a hand-coded SSE2 loop already exists. (MSVC and Clang only.)
2016-06-23 20:30:24 +00:00
rogerman 3f895b85fb Cocoa Port:
- Fix a performance issue where if the status bar is hidden while Vertical Sync is enabled, then status text updates will cause a severe slowdown due to conflicting vertical syncs. (Fixed by setting the ‘hidden’ flag of the statusText control to YES while the status bar is hidden.)
2016-06-23 01:37:07 +00:00
rogerman 051e58a4fd GPU:
- Reorder some functions to fix building on older compilers.
2016-06-23 01:32:53 +00:00
rogerman 314bb2130d OpenGL Renderer:
- Revert a change in setting the fog render bit for translucent fragments. Fixes the appearance of the Air Robo GP in Solatorobo: Red the Hunter. (Regression from r5464.)
2016-06-22 17:11:54 +00:00
rogerman 0cb3bd723f OpenGL Renderer:
- Fix a bug with depth writes, which also fixes bugs with fog and edge mark. (Fixes bug #1522.)
2016-06-22 09:27:52 +00:00
rogerman 4ae207fb03 GPU:
- Reduce overall register contention in some color blending methods.
2016-06-21 20:30:52 +00:00
rogerman 03d8ee62aa Cocoa Port:
- In the OpenGL blitter, only allow source filters (such as Deposterize) to run on native-sized framebuffers. This is being done since the visual impact on custom-sized framebuffers, even those at 2x size, is not enough to warrant the additional GPU load. This behavior is now consistent with the pixel scalers, which only run on native-sized framebuffers and not on custom-sized framebuffers.
- Fix a bug in the OpenGL blitter where the Deposterize filter wouldn’t run if the pixel scaler was set to None.
2016-06-20 21:22:51 +00:00
rogerman 4d2307538d GPU:
- Add 555-to-6665 opaque color conversion.
- Add UNALIGNED switch to 555-to-8888, 555-to-6665, 8888-to-5551, and 6665-to-5551 color buffer conversion functions, allowing clients to inform these functions that the incoming buffer pointers may not be 16-byte aligned.
- Rendered lines from GPUEngineBase::_HandleDisplayModeOff(), GPUEngineA::_HandleDisplayModeVRAM(), and GPUEngineA::_HandleDisplayModeMainMemory() now output colors with the alpha bits filled in. This is working towards a time when clients that work directly in 16-bit and 32-bit colorspaces don’t have to fill in the alpha bits themselves.
- Unify more color conversion code.
2016-06-20 18:47:45 +00:00
rogerman d1a8663acb GPU:
- In the SSE2 version of ConvertColor555To8888Opaque(), change the algorithm to use computation instead of memory lookups. Although memory lookups are faster on newer CPUs, computation is much faster on older CPUs, which have smaller caches and longer memory latencies. I believe this is the correct decision, since older CPUs are the ones that need as much performance as they can get.
2016-06-18 22:20:07 +00:00
rogerman 0110fe22d6 Windows Port:
- Oops! Missed a small typo that still caused compiling on Windows to fail. (Related to r5458.)
2016-06-18 01:44:15 +00:00
rogerman 9e07cc95b4 Windows Port:
- Fix compiling on Windows due to new color conversion code. (Regression from r5455.)

GPU:
- The SSE2 version of ConvertColor555To8888Opaque() now uses memory lookups instead of calculating things through.
2016-06-18 01:38:51 +00:00
rogerman 29ff68cda9 GPU:
- Add color 555 to 8888-opaque conversions.
- In the new color buffer conversion functions, change the FragmentColor data types to u32. (Related to r5455.)
2016-06-17 22:36:56 +00:00
rogerman 0d162bdb9f Cocoa Port:
- Change gpuColorFormat property data type from UInt32 to NSUInteger.
2016-06-17 21:33:43 +00:00
rogerman f8e0585d26 GPU:
- Unify all colorspace conversion code.
- Fix bug with VRAM-to-VRAM capture.

OpenGL Renderer:
- Try and fix a possible bug with applying fog to transparent fragments.
2016-06-17 04:22:51 +00:00
rogerman b543e309c5 Cocoa Port:
- Fix bug where the texture smoothing option was not getting saved to the user defaults file. (Related to r5451.)
2016-06-10 21:11:51 +00:00
rogerman 5d2b5054ba OpenGL Renderer:
- Remove some code duplication in OpenGLRenderer::SetupTexture().
2016-06-10 20:48:03 +00:00
rogerman 41d9061ce4 OpenGL Renderer:
- Fix building on platforms that aren’t OS X. (Regression from r5450. Fixes bug #1561.)
2016-06-10 18:20:55 +00:00
rogerman 490e34f81e Cocoa Port:
- Add support for texture smoothing. (Related to r5450.)
2016-06-10 04:16:28 +00:00
rogerman 9a9f006397 OpenGL Renderer:
- Texture sampling now works with bilinear filtering, mipmapping, and anisotropic filtering! These texture smoothing features can be used by enabling the new CommonSettings.GFX3D_Renderer_TextureSmoothing flag.
2016-06-10 03:57:32 +00:00
rogerman ce5765006f Cocoa Port:
- Fix some possible issues with HUD text rendering.
2016-06-09 18:47:54 +00:00
rogerman d682d15142 Cocoa Port:
- Fix builds that were broken due to new libretro-common API additions. (Regression from r5438.)
2016-06-09 18:46:55 +00:00
zeromus b157132dbc change build system to support dev+ with gdb stub enabled. I think that's basically where it was at historically 2016-06-02 18:17:22 +00:00
zeromus d24883ee85 more helpful --help for arm9gdb etc 2016-06-02 18:15:22 +00:00
zeromus 82904b4a74 fix bug entering cheats with values > 7FFFFFFF 2016-05-25 05:09:44 +00:00
zeromus 9767f79346 support cheats to any address, not just main memory. 2016-05-23 17:11:33 +00:00
zeromus 9b33859c68 fix a bug making vs2015 builds unable to open roms on XP systems 2016-05-14 05:00:39 +00:00
rogerman 45b559eae6 Cocoa Port:
- Simplify some drawing code in the OpenGL blitter.
2016-05-13 06:26:38 +00:00
zeromus afb63d0b2f fix crashes in bilinear final filter + HD prescaling (buffer overflows in sloppy filter code, as usual) 2016-05-09 22:23:54 +00:00
zeromus 13032f6712 fix garbage polygon rendering (error in gfx3d matrix math overflows) in spectrobes: beyond the portals 2016-04-24 19:14:07 +00:00
zeromus caec37ef25 fix newish crash on windows when shutting down with --num-cores 1 2016-04-24 19:13:07 +00:00
zeromus 73f5067ebc VFAT: use retro_dir and retro_stat instead of additional fs- layer 2016-04-22 01:38:45 +00:00
zeromus b03347dc48 retro_dirent and retro_stat tidy and bugfixes: windows retro_dir would have missed the first entry; retro_stat wasn't extern "C"'d; retro_dirent_is_dir didn't need a path argument (path can always be gotten from RDIR in a trivial operation) 2016-04-22 01:38:26 +00:00
zeromus cd702e32f3 fix vcxproj 2010/2015 selection better 2016-04-22 01:35:13 +00:00
zeromus 591f419ffe add .editorconfigs 2016-04-22 01:29:42 +00:00
zeromus b0f4989230 update libretro-common 2016-04-22 00:34:34 +00:00
rogerman 3685c6e1f6 GPU:
- Begin rework for supporting RGB666 and RGB888 color formats. (This rework is still incomplete.)
2016-04-16 20:36:20 +00:00
rogerman 9a2bc94fc9 Render3D:
- 3D renderers can now be requested to output their framebuffers in RGBA6665 (SoftRasterizer and OpenGL) or RGBA8888 (OpenGL only) color formats.
2016-04-09 07:47:53 +00:00
rogerman f036f26310 Cocoa Port:
- Add property methods for setting the GPU color format.
2016-04-05 17:41:17 +00:00
jsteffens 0ce1df58c5 Some build fixes for Linux (but still doesn't build) 2016-04-03 23:16:56 +00:00
rogerman 549079cb95 GPU:
- Fix the random battle transition in Final Fantasy III. (Regression from r5344. Fixes bug #1548.)
2016-04-03 06:26:02 +00:00
zeromus aba30866b1 fix crash in gbagame slot2 addon when gba rom doesn't exist 2016-03-30 23:50:54 +00:00
zeromus bf911bf571 winport: add options for killing stylus off-screen 2016-03-29 22:52:44 +00:00
zeromus f22f05959d zero out capture buffer in case advanced spu logic is disabled (prevents noise in savestates taken with a different advanced spu logic setting) 2016-03-29 07:12:26 +00:00
zeromus 660248816e winport: add note to sound config gui that advanced spu logic is a sync setting 2016-03-29 07:11:33 +00:00
zeromus fbb564db25 fix vcxproj in 2010 (ctrl+f7 building and resource editing) 2016-03-29 06:52:39 +00:00
zeromus 6e88f8e5dc update libretro-common 2016-03-29 06:10:12 +00:00
zeromus 7e43d12cc7 winport: don't spew /arch:SSE2 warnings compiling x64 on vs2015 2016-03-22 15:59:55 +00:00
zeromus 60ba992495 forgot to commit two files 2016-03-22 15:53:13 +00:00
zeromus 9766d2d8a6 winport: remove userconfig, replace with msbuild-based system. easily support newer SSE versions while we're at it 2016-03-22 06:27:58 +00:00
rogerman 8e7c58e11f Cocoa Port:
- Fix builds that were broken due to new libretro-common API additions. (Regression from r5398.)
2016-03-21 21:29:57 +00:00
zeromus f6d8a4a0c4 fix errors and tidiness in commandline help 2016-03-21 08:45:49 +00:00
zeromus 0a5f63c0f1 fix bin output filename 2016-03-21 08:30:51 +00:00
zeromus 4a6ea70c94 fix commandline processing (none of the no-args were working) 2016-03-21 08:30:19 +00:00
zeromus 08383c8195 yes, still wrestling with EOLs 2016-03-21 02:21:31 +00:00
zeromus cb2e219470 fix vcxproj for libretro-common update 2016-03-21 02:19:30 +00:00
zeromus a0e0aed5a4 remove a bunch of eol-style properties... again.. bear with me. 2016-03-21 02:15:01 +00:00
zeromus 7f0c1276d4 update libretro-common. lots of noisy EOL changes because originally I screwed up and changed them. 2016-03-21 02:12:11 +00:00
zeromus 655dd15cc1 remove a bunch of eol-style properties 2016-03-21 02:02:11 +00:00
zeromus 6724231a2d rebuild vcxproj and sln to use a handcrafted props file and share a vcxproj. launch in 2010 through batchfile; launch in 2015 through sln 2016-03-21 01:33:13 +00:00
zeromus 708a2cfef5 vs2015 fixes 2016-03-21 01:33:13 +00:00
zeromus a0ea0b258d fix bug in rthreads resource creation on win32 (spurious failures) 2016-03-21 01:33:13 +00:00
zeromus 0e346c62be fix glib deps in main.cpp 2016-03-21 01:33:12 +00:00
zeromus 60d5004d14 add sthread_isself 2016-03-21 01:33:12 +00:00
zeromus 4d1374a675 remove glib 2016-03-21 01:33:12 +00:00
zeromus 3785435414 use getopt for commandline, to remove glib dependency 2016-03-21 01:33:12 +00:00
zeromus 6851ff2737 define no_argument and friends if needed in compat/getopt 2016-03-21 01:33:12 +00:00
zeromus 86fe433eed fix C++ comments
vc2010 build fixes for new libretro-common
2016-03-21 01:33:12 +00:00
zeromus a009d2ac13 vc2010 workarounds for libretro-common 2016-03-21 01:33:12 +00:00
zeromus 2c127b73b0 merge latest libretro-common 2016-03-21 01:27:43 +00:00
zeromus c4d7e476c5 1st pass using libretro-common 2016-03-19 10:21:30 +00:00
zeromus ac26660c86 delete vio2sf; kode54 decided to maintain it. see https://bitbucket.org/kode54/vio2sf 2016-03-19 07:37:36 +00:00
rogerman da90bfec30 GPU:
- Fix crash that can occur when changing the framebuffer size. (Regression from r5395.)
2016-03-19 02:58:09 +00:00
rogerman d8a6112049 GPU:
- The framebuffer pointers in NDSDisplayInfo are no longer assumed to be 16-bits per pixel in size. This is being done now in preparation for higher color depth processing. (This feature is not yet implemented.)
- Instead, clients should be reading NDSDisplayInfo.colorFormat to determine the color format of the framebuffers. NDSDisplayInfo.pixelBytes is a convenience field that reports the number of bytes per pixel (either 2 or 4 bytes).
- By default, the framebuffers will continue to be in 16-bit BGR555_Rev format for backwards compatibility.
2016-03-19 02:22:03 +00:00
rogerman fbf2b970a1 GFX3D:
- If GPU engine A is disabled, then continue respecting the 3D rendering order when blanking out the 3D framebuffer.
2016-03-18 21:25:46 +00:00
zeromus a0f207c66a cleanup vc2010 vcxproj 2016-03-18 09:15:56 +00:00
rogerman c9ad78971c crc.h:
- Fix building for non-MSVC compilers. (Regression from r5391.)
2016-03-18 07:56:08 +00:00
zeromus 40d4d80c25 (winport) fix: #1543 fex identifying ROMs as compressed archives, causing crash (added a method to attempt to ID any kind of NDS rom before even passing it to FEX) 2016-03-18 00:36:55 +00:00
zeromus e0f8e5a82a vs2010 - add fastbuild configuration, hookup texture upscaling options 2016-03-16 06:47:46 +00:00
zeromus 9af7c039e4 fix loading DQ5 2016-03-15 05:48:44 +00:00
rogerman 07d9613295 OpenGL Renderer:
- Fix compiling for Linux/GCC. (Regressions from r5359 and r5372. Addresses bug #1541.)
2016-03-12 18:45:37 +00:00
rogerman 344290283a GPU:
- The DidFrameBegin callback now reports whether frameskip was requested or not.
2016-03-10 19:46:37 +00:00
rogerman e73e60cb02 GPU:
- Fix compiling on non-SSE2 systems. (Regressions from r5370, r5371).
2016-03-09 06:16:45 +00:00
rogerman a213a7aba7 Cocoa Port:
- Add support for automatic texture upscaling and deposterization. (Related to r5384.)
2016-03-09 06:04:20 +00:00
rogerman 485e2cc254 OpenGL Renderer:
- Textures can now be automatically upscaled using the xBRZ filter. Textures can be upscaled to 2x or 4x.
- Textures can now be smoothed using a deposterization filter. This can be helpful in smoothing some of the hard color banding that sometimes occurs with xBRZ.
2016-03-09 05:25:18 +00:00
rogerman e0a139aeda GPU:
- Only flush the 3D rendering buffers and update the rendering properties if the frame is not skipped.
- Be more accurate when using callbacks for DidRender3DBegin and DidRender3DEnd.
- Make the 3D rendering stage more multithreading friendly.
2016-03-08 01:57:08 +00:00
rogerman 7b84225fa4 Cocoa Port:
- Fix occasional crash that can occur when switching 3D rendering engines. (Regression from r5288.)
2016-03-06 01:52:28 +00:00
rogerman 4c9a50ae91 Cocoa Port:
- Fix freezing bug that can occur when switching the 3D rendering engine while the emulation is paused. (Regression from r5288.)
2016-03-05 03:33:16 +00:00
rogerman 4f8a16d980 Cocoa Port:
- Oops! Forgot to add the 6xBRZ menu item to the View > Video Pixel Scaler menu.. (Related to r5379.)
2016-03-05 02:13:12 +00:00
rogerman d4ff390287 Cocoa Port:
- Expose 6xBRZ pixel scaler in the UI. (Related to r5377.)
- Fix a tiny blending bug in the 5xBRZ fragment shader.
2016-03-05 01:45:54 +00:00
zeromus 86eff9d3f0 fix xbrz on msvc 2010 2016-03-04 20:02:39 +00:00
rogerman 313dd2932f Video Filter:
- Upgrade xBRZ to v1.4.
- Add 6xBRZ pixel scaler.
2016-03-04 19:32:06 +00:00
rogerman 6b5aff79ad GPU:
- Remove now obsolete template parameter from GPUEngineA::_RenderLine_DisplayCapture().
2016-03-03 19:57:36 +00:00
zeromus 8a4813b6ff winport: fix directdraw display method screen rotation 2016-03-03 15:18:39 +00:00
rogerman 04e06869d9 GPU:
- Fix bug where the background would blink in The Wizard of Oz: Beyond the Yellow Brick Road when frameskip is enabled. (Regression from r5368).
2016-03-03 01:27:23 +00:00
rogerman 34ec6bb985 MMU:
- HACK: Drop the acknowledgment bits when writing the DISP3DCNT register. Fixes the title screen in “Planet Rescue: Animal Emergency”. (Regression from r5259. Fixes bug #1538.)
2016-03-02 21:01:00 +00:00
rogerman 2f473cd113 OpenGL Renderer:
- Fix some rendering issues with shadow polygons. As a byproduct, this also fixes the drawing of certain missing polygons.
2016-03-02 05:30:40 +00:00
rogerman 891fd01f82 GPU:
- Custom rendering is now determined on a per-scanline basis rather than on a per-framebuffer basis. This greatly improves rendering accuracy and fixes any remaining graphical glitches associated with rendering at custom sizes.
2016-03-01 01:39:38 +00:00
rogerman c5f950d1aa GPU:
- Fix crashing bug that can occur if BMPAddress maps exactly to the head of the custom VRAM blank region, such as in Hotel Dusk: Room 215. (Regression from r5366.)
- Do some code cleanup.
2016-02-27 18:17:35 +00:00
rogerman dcb2c5fa05 GPU:
- Fix crashing bug that can occur if BMPAddress maps into the custom VRAM blank region. (Regression from r5366.)
- Fix bug where a 128-width display capture would actually perform a 256-width capture in custom VRAM. (Regression from r5243.)
- Fix bug where if the display mode is Off or MainMemory, then the destination buffer may not always be the native buffer.
- Remove VRAM display mode’s dependence on the isCustomRenderingNeeded flag.
2016-02-24 21:09:47 +00:00
rogerman ee5fcf6bd2 GPU:
- Fix possible memory corruption with display capture, at the cost of some performance. (Regression from r5243.)
- Add a couple more rules for determining if the 3D framebuffer will be read directly for display capture.
- Keep track of render states that are updated while rendering, even when the frame isn’t rendered.
2016-02-24 07:33:42 +00:00
rogerman 45f6ca71cc GPU:
- Fix possible crash that can occur when switching off the 3D renderer after changing the framebuffer size.
2016-02-23 19:31:50 +00:00
rogerman dc53f97d17 GPU:
- Use the proper address when reading custom VRAM during a BG layer affine extended direct render. Fixes the pencil drawing background in the title screen of Super Mario 64 DS when rendering at a custom resolution.
2016-02-23 07:26:44 +00:00
rogerman c98e669d74 GPU:
- Improve the heuristics in determining when custom-sized rendering and custom-sized output is needed.
2016-02-23 03:52:27 +00:00
rogerman 782b60b824 SoftRasterizer:
- Revert the z-depth calculation in r5191, since this fails to draw units properly in Advance Wars: Days of Ruin when running on big-endian systems.
2016-02-18 22:55:19 +00:00
rogerman 3c710f33dd Render3D:
- In the OpenGL renderer, fix framebuffer color conversions on big-endian systems.
- In SoftRasterizer, fix toon table coloring on big-endian systems.
2016-02-18 20:38:48 +00:00
rogerman 532f78740a Cocoa Port:
- Silence a bunch of console warnings.
2016-02-18 07:35:07 +00:00
rogerman 8f01207e9d Cocoa Port:
- Fix display window restoration on startup if building the app with an OS X SDK earlier than v10.7. (Regression from r5349.)
2016-02-18 04:34:15 +00:00
rogerman b849c5b1c3 OpenGL Renderer:
- Fix bug where if converting the framebuffer on GPU is not supported, but PBO is still supported, then the resulting framebuffer would be flipped with incorrect colors. (Regression from r5359.)
- Read back the pixels in RGBA format instead of BGRA on OpenGL 3.2 devices, since such devices should natively support that type of pixel transfer.
2016-02-18 02:13:47 +00:00
rogerman d6ae36e068 OpenGL Renderer:
- Perform the RGBA6665 color space conversion of the 3D framebuffer on the GPU before pixel read back, and then read that 3D framebuffer directly.
2016-02-17 10:33:44 +00:00
zeromus 9346ced34c commit patch #170 "load gzip/zip compressed files" 2016-02-15 19:13:10 +00:00
rogerman 07031ea621 Cocoa Port:
- In the OpenGL blitter, eliminate the need for fences. Just test the finishing of texture objects directly.
2016-02-15 06:44:28 +00:00
rogerman f985f40ba8 Render3D:
- By default, do not create a separate RGBA6665 buffer for rendering. Instead, directly render to GPUEngineA’s RGBA6665 buffer.
- SoftRasterizer no longer needs to flush the RGBA6665 buffer now that it is rendered to directly.
- Fix the OpenGL renderer’s RGBA5551 buffer flushing on big-endian systems.
2016-02-15 05:25:45 +00:00
rogerman 607c3687ca Cocoa Port:
- Fix bug where the HUD wouldn’t report the correct FPS if more than one display window is in use.
2016-02-14 07:44:01 +00:00
rogerman 86f84fa21c Cocoa Port:
- Change the HUD font from Source Sans Pro Semibold to Source Sans Pro Bold.
- HUD text rendering is now more crisp and handles scaling better.
- HUD objects are now clamped to a minimum size.
2016-02-14 05:26:55 +00:00
rogerman ef376a5426 Cocoa Port:
- HUD objects now scale with the display window instead of remaining at a fixed size. Scaling is linear up to 2x, and then logarithmic up to 3x.
- HUD text now looks sharper on Retina displays.
2016-02-13 00:42:49 +00:00
rogerman 549f754be2 Cocoa Port:
- Fix bug where restoring full screen windows on startup would fail. (Regression from r5349.)
- Fix bug where the dock would fail to reappear when the last window exited full screen mode. (Regression from r5349.)
2016-02-12 08:50:35 +00:00
rogerman e8f660b381 Cocoa Port:
- Add the following toolbar items: Frame Advance, Enable/Disable HUD, Toggle Displays
2016-02-12 06:51:34 +00:00
rogerman 25f33c54ba GPU:
- Fix compiling for non-SSE2 builds.
2016-02-12 06:13:34 +00:00
rogerman a6ad4e04a8 Cocoa Port:
- Fix full screen behavior when running on OS X Mavericks or later.
2016-02-12 01:22:12 +00:00
rogerman fd4d3b19dd Cocoa Port:
- Fix HUD layer scaling on Retina displays.
- Have the HUD layer dynamically change the size of the text box as necessary.
2016-02-10 08:29:06 +00:00
rogerman d565d07841 Cocoa Port:
- The OpenGL blitter now respects if client storage is disabled.
- The HUD layer now scales properly on Retina displays.
2016-02-10 02:10:16 +00:00
rogerman f553d50e97 Wi-Fi:
- Disable logging when EXPERIMENTAL_WIFI_COMM is disabled.
- Now that Nintendo has discontinued their WFC service, we will no longer block users from trying to connect to it.
2016-02-09 23:16:18 +00:00
rogerman 65c0eec884 Cocoa Port:
- Optimize VBO uploading of the HUD layer.
2016-02-08 23:53:05 +00:00
rogerman f68df5b976 Render3D:
- Provide a means of specifying which specific framebuffers need to be flushed for each frame.
2016-02-08 21:20:13 +00:00
rogerman ed1879dc8f GPU:
- Fix bug where a swapped screen state was not being properly reset. (Regression from r5340.)
2016-02-07 07:12:16 +00:00
rogerman ac07bc2639 OpenGL Renderer:
- If PBOs are supported, avoid doing an extra framebuffer copy and read the PBO directly.
2016-02-07 02:30:57 +00:00
rogerman a5c102540f Cocoa Port:
- In the OpenGL blitter, use DMA texture uploads for all possible video source cases. Doing this removes a longstanding MAJOR performance bottleneck.
- Native-sized video sees up to a 15% performance improvement, while higher-resolution video can see up to a 100% performance improvement!!!!!
2016-02-07 01:34:52 +00:00
rogerman f22fd97d28 GPU:
- Allow clients to specify their own framebuffer storage when calling GPUSubsystem::SetCustomFramebufferSize().
2016-02-07 01:15:55 +00:00
rogerman fa898fcf76 GPU:
- Apply SSE2 optimizations to all of the BG layer modes. (Related to r5332.)
- Do some code refactoring and cleanup.
2016-02-03 04:41:54 +00:00
rogerman 2823f599ba Render3D:
- Revert r5331, since it results in incorrect alpha testing. Add additional notes to remind myself why I wrote the code that way in the first place.
2016-02-01 22:28:38 +00:00
rogerman 7542718cde GPU:
- Optimize the loading of destination blending masks if SSSE3 is available.
2016-01-31 22:09:23 +00:00
rogerman 67989f5260 Cocoa Port:
- Return to using Snow Leopard style Audio Components. Requires building with Xcode v7.2 or later, since Xcode v7.0 and v7.1 have bugs that will cause AudioUnits to crash. (Related to r5280.)
2016-01-31 22:06:40 +00:00
rogerman b695f1596f GPU:
- Remove the other reference to the DISPCNT.BG0_Enable flag for determining when 3D rendering is enabled. Fixes minimap rendering at custom resolutions in Advance Wars: Dual Strike during some conversations. (Related to r5334.)
2016-01-31 06:00:03 +00:00
rogerman ea4d0960a0 GPU:
- Fix bug where 3D layers still needed to be rendered even when the DISPCNT.BG0_Enable flag is disabled. Fixes minimap rendering in Advance Wars: Dual Strike during some conversations. (Regression from r5255.)
2016-01-31 03:37:40 +00:00
rogerman 0cb3bf1d2f GPU:
- Fix Windows compiling. (Regression from r5332.)
2016-01-30 11:17:17 +00:00
rogerman 3771d2a76d GPU:
- Begin the process of applying SSE2 optimizations to BG layer compositing.
- In this revision, only Text mode layers use the new SSE2 optimizations. Other BG layer modes have yet to be implemented.
2016-01-30 03:07:11 +00:00
rogerman f1172fe5c8 Render3D:
- Further optimize SSE2 versions of FlushFramebuffer().
2016-01-21 02:47:56 +00:00
rogerman 90e9947da9 GPU:
- When compositing the BG layers, provide a hint for when blending is disabled.
2016-01-18 19:21:06 +00:00
rogerman 0ff9773eaf GPU:
- Replace _mm_set1_epi64x() with _mm_set1_epi32() where appropriate.
- Complete GPUEngineBase::_RenderPixel_SSE2() method.
- Fix potential bug with window checks in GPUEngineBase::_RenderPixel3D_SSE2().
- Do some minor code cleanup.
2016-01-09 23:12:41 +00:00
rogerman a1280789db GPU:
- Avoid doing scalar lookups in the SSE2 portion of GPUEngineBase::ApplyMasterBrightness().
2016-01-05 22:06:55 +00:00
rogerman 76ba4e164d GPU:
- Do SSE2 optimization when compositing the 3D layer.
- Add SSE2 optimized version of GPUEngineBase::_RenderPixel() for future use (currently inactive).
2016-01-05 04:12:36 +00:00
rogerman a4972abe61 Linux Port:
- Fix compiling for GTK and Glade ports.
2016-01-04 23:12:40 +00:00
rogerman abd4704711 GPU:
- Do some code cleanup.
2016-01-04 21:54:00 +00:00
zeromus 69ee626639 winport - fix crash on startup with clean ini file 2015-12-11 01:22:00 +00:00
zeromus bc84d6930b fix DD display method bombing when using high prescale and magnification filter levels 2015-12-09 06:25:11 +00:00
rogerman a738364416 Cocoa Port:
- Fix crash when loading invalid ROM header data.
2015-11-15 06:08:32 +00:00
rogerman 4d32f051ab Render3D:
- Explicitly make the Render3D class allocate itself with a cache-aligned base pointer. Fixes SSE2-related alignment crashes with OS/compiler combinations that don’t 16-byte align the base pointer for you.
2015-11-09 03:46:14 +00:00
zeromus af00e3b3f3 clarify how a jit function table is declared, which has implications on whether a giant 256MB static buffer is allocated, which is causing problems when desmume is loaded as a DLL in 32bit systems. shouldnt affect the main windows or cocoa ports, but will cause other ports to take a different (safer and speed indeterminate) codepath. Build scripts must now make a choice to opt into the riskier behaviour. 2015-11-08 08:09:54 +00:00
zeromus dc3d1945af win32 - fix crash in some display methods when emulator boots up 2015-11-06 01:57:46 +00:00
zeromus 40fd9c2385 winport - fix bug in AR during fullscreen, and fix long-standing bug with white rectangle in bottom right of DD display method when letterbox area is shown 2015-11-01 14:29:42 +00:00
rogerman c40374df16 Cocoa Port:
- When clicking one of the Save Settings as Default buttons in one of the settings panels, force the user defaults file to synchronize immediately. This fixes updating the user defaults file on OS X v10.11 El Capitan.
- Fix bug where video settings wouldn’t update immediately while the emulation is paused. (Regression from r5310).
- Fix bug where if a ROM is unloaded, the previous video frame would remain instead of blacking out as intended. (Regression from r5310).
2015-10-29 06:40:54 +00:00
rogerman 2fbd0685d1 Cocoa Port:
- Add support for displaying the CPU load average in the HUD.
2015-10-28 05:29:17 +00:00
rogerman bb6fe7d06b Cocoa Port:
- Fix bug where using Frame Jump or executing the emulation faster than 1.00x would cause the execution speed to be limited by Vertical Sync.
- Do some code cleanup on CocoaDSOutput.
- Expand the text box further when the RTC is shown.
2015-10-25 02:11:09 +00:00
rogerman 11403180db Windows Port:
- Fix crashing bug with the OAM Viewer tool.
- Improve the sprite drawing performance of the OAM Viewer tool.
2015-10-21 06:09:52 +00:00
zeromus 3c85700c5c fix error in arm7 memorymap mask for IO regs (permitted errant register accesses from clobbering outside the regs buffer) 2015-10-21 04:34:30 +00:00
rogerman 3eb0585129 Cocoa Port (OpenEmu Plug-in):
- Fix crashing bug when initializing the plug-in.
- Update to the latest version of the OpenEmu SDK.
2015-10-20 07:01:07 +00:00
rogerman dd305b36d9 Cocoa Port:
- Add support for displaying the Real-Time Clock in the HUD.
2015-10-16 21:26:52 +00:00
rogerman a6a1875e05 Cocoa Port:
- New feature: Add OpenGL-based Heads-Up Display.
2015-10-16 07:28:42 +00:00
rogerman 57929ed232 Cocoa Port:
- Fix compiling by removing some future code that accidentally snuck into r5306.
2015-10-14 18:08:36 +00:00
zeromus 5b1a6e2cd9 fix vc2015 build flag on x64 dev+ 2015-10-14 07:52:07 +00:00
rogerman 9988ed1293 Cocoa Port:
- Fix bug where using one of the View > Display Size menu options would fail to work if the window’s resize grip was used previously.
2015-10-13 19:43:40 +00:00
rogerman 793f19d47e Cocoa Port:
- Fix some compiler warnings.
- Delete some legacy strings which are no longer used.
2015-10-12 20:06:33 +00:00
rogerman 4eedbca3d9 GPU:
- Fix display capture copy mode colors on big-endian systems.
2015-10-10 22:56:28 +00:00
rogerman 21d9294697 Cocoa Port:
- Fix some compatibility issues with OS X v10.5 Leopard.
2015-10-10 20:16:46 +00:00
rogerman d9cc320c4e GPU:
- Fix bug with horizontal offsets. (Regression from r5295.)
- Fix display capture blend mode colors on big-endian systems.
2015-10-10 19:53:29 +00:00
zeromus 1fc6cbdec2 split processing of internal cheats from AR cheats, and process AR cheats more correctly when an ARM7 IRQ happens 2015-10-10 09:55:06 +00:00
rogerman 18caac989b MMU:
- Fix writing to the sub engine’s MASTER_BRIGHT register. Fixes the touch screen display output for “Pirates of the Caribbean: At World’s End”. (Regression from r5261.)
2015-10-10 02:19:51 +00:00
rogerman f05eb523c1 GPU:
- Loosen the restriction on what constitutes “set mosaic values”, just to be safe. (Related to r5299.)
2015-10-09 21:00:01 +00:00
rogerman d885c383b2 GPU:
- Also skip mosaic rendering if the mosaic values themselves aren’t set.
2015-10-09 20:45:49 +00:00
zeromus f69a3738ae move AR cheats to arm7 bus 2015-10-09 10:01:16 +00:00
rogerman 9cd43cc115 GPU:
- Use restrict pointers where appropriate.
2015-10-08 01:15:12 +00:00
rogerman 61e8cfb063 GPU:
- Account for the fact that extended palette mappings can change independently of the BGnCNT register. Fixes the BG3 layer in Phoenix Wright: Ace Attorney. (Regression from r5286.)
2015-10-06 17:13:24 +00:00
rogerman ec539cba02 GPU:
- Fix a bunch of graphical corruption regressions on big-endian systems.
- Also fix rotation/scale sprite colors and the 3D clear color on big-endian systems.
2015-10-06 01:14:44 +00:00
zeromus 3308d5b28e winport - fix bugs in fullscreen viewport sizing 2015-10-04 18:12:14 +00:00
rogerman 60ea6fe7d5 GPU:
- Fix compiling issue with non-SSE2 builds.
2015-10-03 17:59:20 +00:00
zeromus 216d36d292 winport - dump avis with selected prescaleHD 2015-09-30 23:30:44 +00:00
zeromus b0131342d4 winport - fix a bunch of sloppy broken stuff related to runtime changing of prescale and filtering 2015-09-28 08:34:21 +00:00
zeromus 15b6e7dbea fix crashing of some magnification filters by allocation way too much memory. why wasn't this done long ago? 2015-09-27 22:15:25 +00:00
rogerman 6536230867 Cocoa Port:
- In the Support Request Form and Bug Report Form, update the reported configuration to reflect the current 3D rendering features.
- Do some minor code cleanup.
2015-09-24 21:45:53 +00:00
rogerman 9f04d9076a GPU:
- Auto-resolving the native framebuffer is now only performed if the frame isn’t skipped.
- Add some callback routines for the beginning and ending of rendering a frame, and for the beginning and ending of rendering the 3D layer.
2015-09-24 05:05:06 +00:00
rogerman f3fd4e2ebc GPU:
- Autoresolving the native framebuffer is now performed at the end of line 191 instead of at the end of V-Blank.
- Do misc. code cleanup.
2015-09-23 21:22:25 +00:00
rogerman 9c5f355d00 GPU:
- Better organize BG layer states.
- Do a bunch of other code cleanup.
2015-09-22 22:45:20 +00:00
rogerman d5cf747ce4 GPU:
- Begin unifying pixel rendering. Rendering the BG and OBJ layers now use the same method.
- Pass the destination buffer pointer and line index by means of function parameters, instead of using object variables.
- Rendering a BG layer (for debugging purposes) is now completely handled in the core code.
- Do some other code cleanup.
2015-09-22 01:00:37 +00:00
zeromus e4195c9277 try to fix some gfx3d savestate bugs, but its all kind of a mess. 2015-09-21 21:51:36 +00:00
zeromus 0535b9f874 winport - fix layout/scaling of HD windows in some cases 2015-09-21 21:13:13 +00:00
zeromus 584c334c08 gfx3d - optimize texCoordinateTransform==1 a little bit, while I was looking at it anyway 2015-09-21 21:12:46 +00:00
rogerman 76ce2107fa GPU:
- Clearing to the backdrop color has been changed from a pixel operation to a scanline operation.
- Clearing to black when the GPU engine is disabled has been changed from a scanline operation to a framebuffer operation.
- Applying the master brightness has been changed from a scanline operation to a framebuffer operation.
- Resetting the BGnX and BGnY registers now occurs at the end of line 191 instead of at the start of line 0.
2015-09-18 22:14:59 +00:00
rogerman 574e6a2640 Cocoa Port:
- Fix AudioUnit crash when building against the OS X 10.11 SDK.
2015-09-18 19:33:56 +00:00
zeromus 2336008f73 wimport - oops, cleanup some junk and also some old language junk 2015-09-18 17:37:47 +00:00
zeromus 81d5f697c1 winport - fix hd prescale vs gap (#1505) 2015-09-18 17:34:55 +00:00
rogerman 81dae68652 GPU:
- Do some minor code cleanup.
2015-09-15 20:20:13 +00:00
zeromus 1bce1f1811 fix parsing of december dates 2015-09-15 06:49:35 +00:00
rogerman 8441e6e833 Cocoa Port / Cocoa Port (OpenEmu Plug-in):
- Fix compiling, incorporating the API changes from r5273.
2015-09-15 06:25:33 +00:00
rogerman fe97b5bbef Windows Port:
- Fix compiling, incorporating the API changes from r5273.
2015-09-15 06:19:06 +00:00
rogerman 444c4fcc0c GPU:
- Per zeromus’ suggestion, remove GetNativeFramebuffer() and GetCustomFramebuffer() from the GPUSubsystem class. Users must parse the NDSDisplayInfo struct returned from GetDisplayInfo() instead.
- Per zeromus’ suggestion, rename Get/SetWillAutoBlitNativeToCustomBuffer() to Get/SetWillAutoResolveToCustomBuffer().
- Add some more notes to the NDSDisplayInfo struct to help clarify the meaning of each field.
2015-09-15 01:13:48 +00:00
zeromus c389bc7301 winport - fix clipboard printscreens 2015-09-14 19:11:50 +00:00
rogerman adc64a1c61 SLOT-2:
- When loading Metroid Prime Hunters, set automatic SLOT-2 selection to select the Rumble Pak.
2015-09-14 18:37:00 +00:00
rogerman da132f1f1c GPU:
- More code cleanup.
2015-09-14 18:33:33 +00:00
zeromus f36f5b5627 fix file-based screenshot methods for HD 2015-09-14 18:20:11 +00:00
zeromus 8c00e2c676 winport - preliminary work on binding HD rendering 2015-09-14 09:13:57 +00:00
zeromus 601b86c78a fix more SSE buffer alignment problems, and solve a crash dependent on uninitialized memory 2015-09-14 07:49:09 +00:00
zeromus 386bbd6544 ok, change the GPU buffer back to an embedded array, and change how it's allocated to ensure that it isnt allocated misaligned 2015-09-14 04:38:30 +00:00
zeromus 60f2d5d9cf remove vs2012 support, add vs2015 support. update the zlib version winport uses. 2015-09-14 03:47:44 +00:00
zeromus 74a13d55ff some biz work and cleanup 2015-09-14 03:46:41 +00:00
zeromus 58732d31b4 some portability fixes for gpu work 2015-09-14 03:45:53 +00:00
rogerman 5e8b836e83 GPU:
- Parse necessary registers upon loading state to ensure that internal variables get set properly.
2015-09-13 03:01:56 +00:00
rogerman 20dc706c68 GPU / MMU:
- Further cleanup display I/O register handling.
- Do some misc. code cleanup.
2015-09-11 22:51:24 +00:00
rogerman 73d1a89d21 Windows Port:
- Fix Windows compiling.
2015-09-11 05:15:59 +00:00
rogerman 760b5a61d6 GPU / MMU:
- Begin standardizing how the display I/O registers are handled.
- Do other heavy code cleanup.
2015-09-11 05:15:07 +00:00
rogerman 07e56b07c5 GPU:
- Fix bug where 3D rendering may not always finish on line 0, causing lingering 3D artifacts in certain games. Now it is always forced to finish. (Regression from r5255.)
- Bring back the backdrop clearing optimization from r5198 when rendering in the native resolution.
- Do some minor code cleanup.
2015-09-07 15:19:34 +00:00
rogerman 8038e559fe GPU:
- Fix possible crash when doing a direct-color sprite render due to aligned access, since incoming sprite coordinates can cause access to become unaligned. (Regression from r5256.)
2015-09-05 23:21:26 +00:00
rogerman 7e3f1d85ae GPU / MMU:
- Do SSE2 optimization for direct-color sprite renders.
- Make ARM9_LCD cache-aligned. Allows for SSE2 to perform aligned load/stores on certain operations, improving performance.
- Further templatize some methods.
- Do some misc. code cleanup.
2015-09-05 22:35:34 +00:00
rogerman ced0d3986d GPU:
- Do heavy code cleanup.
- Split the engine-specific functionality of the main and sub engines into the new GPUEngineA and GPUEngineB subclasses.
- Templatize some parameters. Greatly increases the generated code size, but restores (and possibly improves) performance from r5251.
2015-09-04 02:05:50 +00:00
rogerman 88006197b9 GPU:
- Do heavy code cleanup.
- Encapsulate higher level GPU functions into the new GPUSubsystem class.
2015-09-01 00:13:02 +00:00
rogerman d5280f82b0 GPU:
- Do heavy code cleanup.
- Encapsulate GPU-related functions into the new GPUEngineBase class.
2015-08-28 17:45:12 +00:00
rogerman 5a6590ff49 Windows Port:
- Fix compiling issues on Visual Studio 2015.
2015-08-26 03:06:37 +00:00
rogerman 2967cd2c62 GPU:
- Be smarter about manually inlining functions. Greatly reduces the generated code size, and fixes making optimized builds on MSVC. (Regression from r5248.)
- This change may affect performance. This will need additional testing.
2015-08-26 01:27:24 +00:00
rogerman c36c379e1f Cocoa Port:
- Fix drawing bug where the wrong texture coordinates were being used when a display window is in Touch mode. (Regression from r5249.)
2015-08-25 23:44:19 +00:00
rogerman e344486e8a Cocoa Port:
- Add support for handling combination native/custom rendering sizes.
- As a side-effect of supporting this feature, pixel scalers now work as intended when high-resolution rendering is enabled (but only if the incoming display framebuffer is at the native size).
2015-08-25 18:56:03 +00:00
rogerman e8cd47acf0 GPU:
- Finish support for combination native/custom rendering sizes. Can give a significant performance improvement when running the GPUs at a custom size, but only for frontends that support this feature.
2015-08-25 17:57:00 +00:00
rogerman bccbae0df9 GPU:
- Begin refactoring work in order to support combination native/custom rendering sizes.
2015-08-24 22:12:18 +00:00
rogerman bf5b1505c8 GFX3D:
- Fix bug where the 3D framebuffer didn’t clear properly if the main GPU is disabled. (Regression from r5190 and r5212.)
2015-08-24 19:40:37 +00:00
rogerman 7bc5aca100 Cocoa Port:
- Expose feature for resolution-independent 3D rendering. Currently, 3D rendering may be scaled anywhere from 1x - 16x of the native NDS resolution.
2015-08-20 19:58:40 +00:00
rogerman be5615b477 GPU:
- Fix compiling on WIN32.
2015-08-20 18:57:24 +00:00
rogerman 5cfa2b4797 GPU:
- Rework display capture and the NDS VRAM buffers to support non-native resolutions.
2015-08-20 18:12:25 +00:00
rogerman e1f7039f1b Core:
- Do more explicit casting to fix build errors on C++11 compilers.
- Fix bug with libfat string handling.
2015-08-17 21:15:04 +00:00
rogerman 0fc37d2c06 GPU:
- Fix possible crash during display capture due to aligned access on an unaligned memory block. (Regression from r5239.)
2015-08-10 19:12:53 +00:00
zeromus 76c390b17a fix bug in sndxa2 driver that made it chow major cpu in a busy loop 2015-08-10 15:54:47 +00:00
rogerman 8e3ff3c708 GPU:
- Cleanup and optimize OAM attributes handling. (Special thanks to Twinaphex from libretro for pointing this out to us.)
- Add SSE2 optimizations to display capture operations.
- Do a whole bunch more code cleanup.
2015-08-09 04:32:53 +00:00
rogerman a30ca9e350 Cocoa Port:
- Expose stylus pressure and stylus jitter settings in Emulation > Show Stylus Settings.
2015-08-07 19:37:53 +00:00
rogerman d9bb1f30e2 NDSSystem.cpp:
- Also update stylus jitter setting per frame instead of only on reset.
2015-08-07 19:35:34 +00:00
rogerman 33d69b27f5 Cocoa Port:
- Delete HQ3x LUTs when we’re done using them. (Recommits what was once r5226 before SourceForge screwed it up.)
2015-08-07 19:27:38 +00:00
rogerman a7b62386a7 Cocoa Port:
- Also load/save external firmware settings if Use External Firmware Image is enabled.
- Do some minor code cleanup.
2015-08-07 00:16:35 +00:00
zeromus e0d2567e6c fix #1492 RAM Watch editing problem (dont reorder entries when editing them) 2015-08-06 21:46:35 +00:00
rogerman f06c81d671 SoftRasterizer Renderer:
- Don’t evict the texture cache in the middle of geometry rendering! Fixes app crashing with games like Advance Wars: Days of Ruin that actually need to evict the texture cache. (Regression from r5175.)
- Do some minor code cleanup.
2015-08-06 21:15:26 +00:00
zeromus 761834948d fix r5031 gxfifo regression 2015-08-04 23:11:53 +00:00
rogerman 96c47d6734 OpenGL Renderer:
- Revert r5176 until polygon IDs can be handled correctly in one go. Fixes missing polygon issues in certain games such as missing rings in Sonic Chronicles: The Dark Brotherhood and missing loop traces in the Pokemon Ranger: Shadows of Almia title screen. (Addresses one of the issues noted in bug #1253.)
2015-08-02 06:01:50 +00:00
rogerman ee1a489dc7 OpenGL Renderer:
- Change toon highlight blending to match SoftRasterizer. Fixes the “Shadows of Almia” logo in the Pokemon Ranger: Shadows of Almia title screen. (Addresses one of the issues noted in bug #1253.)
2015-07-31 20:46:00 +00:00
rogerman 8c68f22165 SoftRasterizer:
- Minor tweaks and code cleanup.
2015-07-31 05:54:27 +00:00
rogerman e41857fa82 Render3D:
- Revert the SSE2 bit shift optimizations that were done in r5216. Fixes a regression related to fog, as well as a regression that caused a flickering problem in the title screen of Pokemon Ranger: Shadows of Almia. (Fixes bug #1487.)
2015-07-27 05:06:53 +00:00
rogerman e9d6cc3611 GTK Port:
- Fix crash that occurs after the GTK file chooser is used to load a ROM. (Fixes bug #1486.)
2015-07-25 23:51:45 +00:00
zeromus 5a55349155 support trimmed roms to non 4-aligned sizes (supposedly a regression from 0.9.10) 2015-07-25 23:46:58 +00:00
rogerman 9b370cd602 Render3D:
- Fix possible crash due to aligned access.
2015-07-15 04:34:23 +00:00
rogerman 3c9931b1c8 Cocoa Port:
- In addition to the UI controls in the Show Video Settings panel, also add the “Use Vertical Sync” and “Run Filters on GPU” options to the View menu.
- Disable UI controls for Depth Comparison Threshold, since the setting is now obsolete. (Will need to delete UI controls before release.)
- Also add HQ3x/HQ3xS filters to the Pixel Scaler menu in Display Preferences.
- Fix bug where the HQ3x/HQ3xS filters running on the GPU sometimes wouldn’t draw correctly.
2015-07-15 01:36:48 +00:00
rogerman 7daab3d784 Windows Port:
- Oops! Missed a file that should’ve been committed in r5222.
2015-07-15 00:23:59 +00:00
rogerman 47adbc5455 GPU:
- More code cleanup.
2015-07-15 00:22:49 +00:00
zeromus adae275e16 (windows) fix big fail in auto-selection of .duc import size 2015-07-14 01:11:23 +00:00
zeromus 4a128f946c someone ran static analysis on our code, I guess I should fix what it reported 2015-07-13 03:23:28 +00:00
rogerman 4d77617e3e Cocoa Port:
- Add high-resolution UI artwork for Retina displays.
2015-07-09 08:31:41 +00:00
rogerman 04cbc13a6d Cocoa Port:
- Enable Retina displays to draw video frames at their native resolution. (Tested on the iMac 5K Retina and MacBook Pro Retina.)
2015-07-08 06:49:37 +00:00
rogerman a8ffd1e40c GPU:
- Fix compiling on Windows. Looks like vector intrinsics are mandatory on MSVC. (Regression from r5216.)
2015-07-07 22:39:09 +00:00
rogerman 55516fc20e GPU:
- Do some code cleanup, especially with the SSE2-related code.
- Fix potential crash in the OpenGL renderer when changing the framebuffer size.
2015-07-07 22:16:34 +00:00
rogerman e53e289e77 Cocoa Port:
- Add some additional locks when reading the GPU framebuffer.
2015-07-07 21:24:19 +00:00
rogerman fbda969347 Render3D:
- SSSE3-specific optimizations now only require SSE2.
- Better optimize clear image operations.
2015-07-01 21:24:49 +00:00
rogerman 611d0c9036 Core:
- Fix compiling issues on some platforms. (Regression from r5212.)
2015-06-30 20:09:03 +00:00
rogerman d1db3dd7ef GPU:
- Add new malloc_alignedN() functions for easier dynamic allocation of aligned memory blocks.
- Rework buffer allocations using the new malloc_alignedN() functions.
- To enable SSSE3, also require ENABLE_SSE2 and ENABLE_SSE3.
- Add some more SSE2/SSSE3 optimizations.
- CACHE_ALIGN and malloc_alignedCacheLine() now set 64 byte alignment on 64-bit systems.
- Do a bunch more code cleanup.
2015-06-30 19:25:00 +00:00
rogerman 3b332f3a12 GPU:
- Fix HOFS bug when reading back the 3D framebuffer. Tested in Nanostray 2 by explosions that cause the screen to shake. (Regression from r5210.)
2015-06-20 01:32:32 +00:00
rogerman d28e49dd2b GPU:
- Last major round of code cleanup as a set up for future rework.
2015-06-19 20:13:27 +00:00
rogerman 54fc839208 GPU:
- Revert VRAM readback optimization. Fixes the battle sequence in Golden Sun: Dark Dawn. (Regression from r5208.)
2015-06-17 08:18:00 +00:00
rogerman d3ec1dedfb GPU:
- More code cleanup, and various small optimizations.
- Optimize the OpenGL 3D renderer’s framebuffer flush. (Requires SSSE3.)
2015-06-17 07:15:22 +00:00
zeromus ccf2e76c32 fix windows compiling 2015-06-14 21:07:45 +00:00
zeromus c7cbf47472 fix allocations of formerly 32-byte aligned buffers to once more be 32-byte aligned. not 100% sure I did this right... 2015-06-14 21:07:20 +00:00
rogerman e95c176f82 Render3D:
- Fix bug where using the Null 3D renderer would greatly reduce performance, instead of improving performance as intended. (Regression from r5198.)
2015-06-14 04:35:21 +00:00
rogerman 4f3990245d GPU:
- Do a whole bunch of code cleanup.
2015-06-14 00:52:53 +00:00
rogerman 6673298c1e GTK/CLI Ports:
- Fix compiling for CLI port. (Regression from r5198.)
- Fix issue with GTK port where the video output framebuffer wasn't getting cleared on reset. (Regression from r5198.)
2015-06-13 23:23:56 +00:00
rogerman 11a8221856 GTK/Glade/Qt Ports:
- Fix compiling issues. (Regression from r5196.)
- On Qt port, use -Ofast and -ffast-math optimizations.
2015-06-13 20:54:47 +00:00
rogerman d2a0307431 Windows Port:
- Fix compiling issues. (Regression from r5198.)
2015-06-10 04:58:59 +00:00
rogerman 70cb9375cc Cocoa Port:
- Add shader-based equivalents to the following pixel scalers: HQ3x, HQ3xS
2015-06-10 04:28:47 +00:00
rogerman db06a04d73 Cocoa Port:
- Give the video blitter the ability to handle any arbitrary dimensions of video input.
2015-06-10 03:53:19 +00:00
rogerman 12342e21cc GPU:
- Do a whole bunch of code cleanup.
2015-06-10 03:45:58 +00:00
rogerman 1648b5f74d Render3D:
- Hack: Fix bug where the overworld map in Dragon Quest IV wouldn't draw correctly. (Regression from r5191. Addresses bug #1477.)
2015-06-08 04:36:19 +00:00
rogerman 947adcd956 Video Filters:
- Add HQ3x and HQ3xS pixel scalers.
- Delete unused hq4x.h file.
2015-06-05 20:08:55 +00:00
rogerman fec691bd26 Render3D:
- Add the ability to set the size of the output framebuffer.
- Do some more code cleanup.
2015-05-20 23:39:43 +00:00
rogerman afba637244 Cocoa Port:
- Silence some compiler warnings.
2015-05-14 20:56:00 +00:00
rogerman 5215efe844 Windows Port:
- Fix compiling issue. (Regression from r5192.)
2015-05-11 18:35:08 +00:00
rogerman b41c194c10 GFX3D:
- The code cleanup continues.
2015-05-11 08:54:01 +00:00
rogerman 28d40ffcf5 GFX3D:
- Fix bug where the depth LUT wasn’t being generated correctly, causing the clear image depth buffer to malfunction. (Regression from r5187.)
- In SoftRasterizer, obsolete GFX3D_Zelda_Shadow_Depth_Hack for depth-equals tests. We’re now using a fixed tolerance of +/-0x200, according to GBATEK.
- In SoftRasterizer, z-depth is now calculated using the depth LUT instead of with << 9. This spreads the depth value more evenly across the range of [0 - 0x00FFFFFF]. This change will need additional testing.
- Do some small optimizations to SoftRasterizer.
- Do more code cleanup.
2015-05-10 23:38:35 +00:00
rogerman 9d6f284681 GFX3D:
- Do more code cleanup and refactoring.
2015-05-08 22:45:09 +00:00
rogerman dcbe28c94e Render3D:
- In SoftRasterizer, do multithreading optimization for the fog and edge mark pass. This involved a change to the edge marking algorithm, so this will need additional testing.
- Fix bug where a SoftRasterizer renderer object wouldn’t get destroyed properly. (Regression from r5187.)
- Fix bug where the user wasn’t able to switch between different threaded versions of SoftRasterizer. (Regression from r5187.)
- Fix a potential bug that might occur if an OpenGL renderer object failed to create. (Regression from r5188.)
2015-05-07 19:06:13 +00:00
rogerman c36b8cbebb Render3D:
- Get rid of annoying flickering when switching 3D renderers.
- More code cleanup and refactoring.
2015-05-07 05:49:53 +00:00
rogerman 0c0f968d01 Render3D:
- Do some code cleanup and refactoring.
2015-05-07 00:42:28 +00:00
rogerman f56e15da02 OpenGL Renderer:
- Upload the toon table through the render state UBO instead of through a 1D texture. (OpenGL 3.2 only.)
- Small optimization in the edge mark fragment shader.
2015-05-06 04:48:33 +00:00
rogerman c5350f6247 OpenGL Renderer:
- Remove even more extraneous binds.
- Do some misc. optimizations.
2015-05-05 23:58:38 +00:00
zeromus e527ed1e37 im tired of seeing the 2005 and 2008 projects. 2010 is the end of the line, the others arent needed 2015-05-05 03:59:27 +00:00
zeromus 6461b474bc apply patch from bug #1468 to fix vs2012 x64 building 2015-05-05 03:56:28 +00:00
rogerman 42a1f7b9f5 Windows Port:
- Fix compiling issues. (Regression from r5162. Fixes bug #1468.)
- Fix crashing issue when selecting the OpenGL 3.2 renderer. Failure to init should now fallback properly. (Regression from r5180. Fixes bug #1470.)
2015-05-04 22:52:32 +00:00
rogerman d5bb6fd79e Render3D:
- In the OpenGL renderer, do better handling of the geometry index buffer, and also load its data in OpenGLRenderer::BeginRender().
- In the OpenGL renderer, remove a bunch of extraneous binds.
- Fix bug in SoftRasterizer where clear-image depth wasn’t being written correctly. (Regression from r5176.)
- Reduce the buffer sizes in the core 3D engine.
- Do even more refactoring.
2015-05-04 18:30:09 +00:00
rogerman 7dd90c9948 OpenGL Renderer:
- Optimize the uploading of all rendering and polygon states, moving all state uploads to OpenGLRenderer::BeginRender(). (OpenGL 3.2 only)
2015-05-01 23:40:59 +00:00
rogerman 15f9d3ee6b OpenGL Renderer:
- Fix compiling for platforms that aren't OS X. (Regression from r5178.)
2015-04-30 16:48:01 +00:00
rogerman 80ac952e9e Render3D:
- In the OpenGL renderer, optimize framebuffer clearing (OpenGL v3.2 only).
- In SoftRasterizer, multithread the rendering state setup (requires at least 4 threads).
- Do more code refactoring.
2015-04-30 08:39:10 +00:00
rogerman 5c64a3858f Render3D:
- In the OpenGL renderer, optimize edge marking performance.
- In SoftRasterizer, fix a bug where edge marking and fog weren’t being drawn if multithreading was off.
2015-04-29 17:35:50 +00:00
rogerman 8f38fb38e8 OpenGL Renderer:
- Clear the stencil buffer with a value of 0 instead of with the polygon ID.
2015-04-29 09:14:32 +00:00
rogerman f48ed9fb89 SoftRasterizer:
- Refactor SoftRasterizer to use Render3D as the base class.
2015-04-29 04:50:23 +00:00
rogerman d627a5b6aa OpenGL Renderer:
- Fix bug where certain scenes would fail to draw when edge marking is enabled.
2015-04-28 00:39:48 +00:00
rogerman e89544aa7b OpenGL Renderer:
- Fix some more graphical bugs with fog and translucent fragments.
- Do some small optimizations to the fragment shaders.
2015-04-27 21:18:48 +00:00
rogerman ecc22fb24d OpenGL Renderer:
- Don’t output the depth to the secondary depth buffer if depth writing is disabled.
2015-04-25 19:07:54 +00:00
rogerman 74dbe2efdd OpenGL Renderer:
- Fix compiling for platforms that aren't OS X. (Regression from r5169.)
2015-04-25 03:08:20 +00:00
rogerman 398cd31bf3 Cocoa Port:
- In the 3D Rendering Settings panel in the DeSmuME Preferences view, move the Enable Edge Marking and Enable Fog checkboxes to the General Settings section.
- Update tooltips to reflect the new behavior.
2015-04-25 02:52:57 +00:00
rogerman d652249c34 OpenGL Renderer:
- Add support for edge marking.
2015-04-25 02:04:13 +00:00
rogerman 629da9c8e2 OpenGL Renderer:
- Fix compiling for platforms that aren't OS X. (Regression from r5166.)
2015-04-24 09:00:54 +00:00
rogerman f66287d0e0 OpenGL Renderer:
- Fix some graphical bugs with fog and translucent fragments.
2015-04-23 22:46:37 +00:00
rogerman 2ae84828e5 OpenGL Renderer:
- Add fog support.
2015-04-23 20:01:51 +00:00
rogerman 4fdcffa126 OpenGL Renderer:
- Do a bunch of code cleanup.
- Prepare the code for doing multipass rendering for the implementation of fog and edge mark.
2015-04-22 21:38:31 +00:00
zeromus db5b63fc2e fix vs2012 vcxproj 2015-04-18 16:17:49 +00:00
rogerman 21fce2cab0 OpenGL Renderer:
- Bring back vertex draw batching from r4522, fixing the bug that caused it to fail on Metroid Prime Hunters. This gives a small performance improvement for users with older drivers.
2015-04-16 21:55:57 +00:00
zeromus e0aa9eb56b update to fex github.com/kode54/File_Extractor/commit/e9e7560df9ca9b25348e0bfb4012f6e570711bb3
should fix new format RARs that dont work, but havent tested it
2015-04-15 06:04:46 +00:00
zeromus 66e314ec65 add a stdint for old visualstudios 2015-04-15 06:00:23 +00:00
zeromus c767066858 Merged revision(s) 5157-5158 from branches/release_0_9_11/desmume:
fix files missing from Makefile.am
........
oops this should probably be tabs
........
2015-04-14 23:57:20 +00:00
zeromus 7c7fd242c2 oops this should probably be tabs 2015-04-14 23:42:15 +00:00
zeromus d1e7a1ba41 fix files missing from Makefile.am 2015-04-14 23:41:43 +00:00
zeromus 6ca691914e png crunch 2015-04-14 22:58:23 +00:00
rogerman 0b4fd3cb5e OpenGL Renderer (v0.9.11):
- Backport changes from r5154 to the 0.9.11 branch.
2015-04-07 22:34:29 +00:00
rogerman e526546bc0 OpenGL Renderer:
- Remove all of the state caching code. Things actually run a little faster without it.
- Do a bunch of other code cleanup.
2015-04-07 22:26:39 +00:00
zeromus 4fe116b423 Merged revision(s) 5152 from trunk/desmume/src:
fix small mistake in r5121 that whacks all battery saves when making a savestate
........
2015-04-05 18:35:43 +00:00
zeromus 6af7350461 fix small mistake in r5121 that whacks all battery saves when making a savestate 2015-04-05 18:13:43 +00:00
rogerman 207c00df6b Cocoa Port:
- Update all info .plist files to v0.9.12 for future SVN builds.
2015-03-31 01:34:11 +00:00
zeromus e973f53e52 bump version number for trunk svn builds 2015-03-29 09:12:27 +00:00
zeromus 95ba5d8a97 clarify new version changelog 2015-03-29 09:11:11 +00:00
zeromus 5bfe553a8b set final revision in changelog 2015-03-29 09:10:03 +00:00
zeromus f6f1ba423a make 0.9.11 release branch 2015-03-29 09:08:22 +00:00
rogerman ccbf85ed42 Cocoa Port:
- Have SoftRasterizer’s Fragment Sampling Hack be disabled by default.
2015-03-29 01:14:03 +00:00
rogerman d5565bad72 SoftRasterizer:
- Do some code cleanup around GFX3D_TXTHack. Also make this check a little more robust.
2015-03-29 01:12:47 +00:00
zeromus 6697c7c0db fix nand more 2015-03-28 20:26:47 +00:00
zeromus c325eac5e3 winport - remove glitchy save type advanced menu thingy 2015-03-28 00:16:41 +00:00
zeromus 3289a3aecc clean formatting of r4800, messing up otherwise clean code 2015-03-28 00:10:53 +00:00
zeromus 6fadb2c07f improve previous commit 2015-03-28 00:05:29 +00:00
zeromus b79bd5fd33 fix " #1454 NAND games won't save " by continuing my sloppy fixes from r5052 and r5053 while also removing some of r4880 "optimize read/writes to NAND" since that kind of logic should be handled in the file IO layer even if it isn't now, otherwise the logic is too redundant and complicated spread around the codebase. In the future we need to evaluate using EnablePositionCache() on all the mc.cpp operations 2015-03-27 23:46:53 +00:00
rogerman 0161ced7ff OGLRender:
- When doing the depth buffer calculation, clamp the depth value to GL_DEPTH_RANGE {0.0, 1.0} in the fragment shader itself. Fixes 3D rendering on older drivers that won’t do the clamp for you. (Regression from r5133.)
2015-03-27 21:45:43 +00:00
rogerman 8a9295796d Documentation:
- Add one more note to the Cocoa port changes in ChangeLog.
2015-03-27 20:28:43 +00:00
rogerman 16bfa74d9f Documentation:
- Update release date for README.
- Update Read Me for Macintosh to reflect the current feature set.
2015-03-27 19:59:31 +00:00
rogerman 75bdce0942 OGLRender:
- Force cache alignment on the 5-bit LUT.
- Better localize OpenGL-specific LUTs.
2015-03-27 19:52:31 +00:00
zeromus e9b919d792 update changelog 2015-03-27 05:21:40 +00:00
rogerman 4031ee211a OGLRender:
- Revert depth buffer calculation change in r5133 for the z-buffer mode. Keep the w-buffer mode change, since that’s the one that works. Fixes the buttons in Blazer Drive. (Regression from r5133.)
2015-03-26 11:01:27 +00:00
rogerman 69ec85e624 OGLRender:
- Fix depth buffer calculations. Fixes lots of graphical glitches in “Harry Potter and the Order of the Phoenix” and many other 3D rendering cases.
2015-03-26 10:30:44 +00:00
rogerman 9b2d36df0c GFX3D:
- Do workaround for possible NaN comparisons being done when Y-sorting. (Addresses bug #1461.)
2015-03-26 09:49:56 +00:00
rogerman 2fc39e3c3e Documentation:
- Note Cocoa port changes in the ChangeLog.
2015-03-25 06:12:03 +00:00
zeromus 61df0246e6 add comments about y-sorting 2015-03-25 06:04:23 +00:00
rogerman 3a747f85ce GFX3D:
- Fix bug where 4x4 compressed textures in Mode 2 would mix the incorrect colors. (Regression from r5128.)
- Do some minor code cleanup.
2015-03-25 03:48:15 +00:00
rogerman 59d33fddb7 GFX3D:
- Fix texture coloring bugs with 4x4 compressed textures on big-endian systems. (This should be the last of the texture coloring bugs.)
- Do small optimization to 4x4 compressed texture conversion.
- Do some minor code cleanup.
2015-03-23 20:58:37 +00:00
rogerman b253fc44a7 Video Filters:
- Do some minor code cleanup on the xBRZ filter.
2015-03-23 17:52:33 +00:00
rogerman 4db72d4254 Cocoa Port:
- Fix bug when using dual display mode with a screen separation where the displays could mistakenly draw ghost lines at the top or bottom of each screen. (Partially addresses bug #1435.)
2015-03-23 07:57:18 +00:00
rogerman f0e8760dc4 Cocoa Port:
- Fix compiling when using Xcode 3.
- Don’t set the output frame size with multiple glViewport() calls per frame. Just set it once for the output.
- Do some minor code cleanup.
2015-03-21 21:18:00 +00:00
rogerman b906b233c5 Cocoa Port:
- Fix bug where the user can force activate the mic while the emulator is idle by manipulating its mute control.
- Fix bug where the mic icon remains black if the emulator resets while in execute.
- Further optimize mic icon updates.
2015-03-20 08:48:40 +00:00
rogerman 3088fd581e Cocoa Port:
- Run the Display Preferences preview inside a single-buffered context.
- Do some minor code cleanup.
2015-03-20 07:42:13 +00:00
rogerman 1674170370 mc.cpp:
- Handle the case where the EMUFILE size is less than the DeSmuME footer size. Allows an in-memory BackupDevice to work with NAND flash saves.
2015-03-19 22:06:26 +00:00
rogerman 3331fb1890 Windows Port:
- Fix crashing bug where the app would crash if the SaveRam path is invalid or does not allow for read/write access. (Fixes bugs #1394 and #1426.)
- New behavior: If the SaveRam path is invalid or does not allow for read/write access, warn the user. After the warning, continue emulation as normal.

mc.cpp:
- Allow backup memory to operate inside RAM if read/write file access is unavailable.
2015-03-19 01:50:15 +00:00
rogerman bfe105a188 GFX3D:
- Workaround a bug specific to GCC v4.9 where allocating the VERTLIST blocks would cause a std::bad_alloc exception. (Fixes bug #1438.)
2015-03-18 03:25:14 +00:00
rogerman 5bab1a14f3 Windows Port:
- Fix bug where using the 5xBRZ filter through the DirectDraw HW/SW display method would cause a crash. (Fixes bug #1444.)
2015-03-15 22:40:29 +00:00
rogerman 0ac489ade1 Cocoa Port:
- Fall back to using a legacy OpenGL context if the GPU driver rejects initializing a 3.2 Core Profile context.
2015-03-15 06:46:49 +00:00
rogerman d59ead2b51 Cocoa Port:
- Update UI tooltips to reflect current knowledge of DeSmuME’s behavior.
- Move the 3D Rendering Settings tab in DeSmuME Preferences from Display to Emulation.
2015-03-14 21:11:40 +00:00
rogerman 60d0726a2a Cocoa Port:
- Fix bug where the mic level value wasn’t being displayed correctly on OS X v10.5 Leopard.
- Remember the sound output volume setting between app launches.
2015-03-12 23:01:00 +00:00
rogerman e3fdd8f7f2 Cocoa Port:
- Update copyright year.
2015-03-11 07:28:15 +00:00
rogerman 2cee9a1eb9 Cocoa Port:
- Fix bug where the frame wouldn’t update itself when starting/stopping GDB stub, frame advance, or frame jump under certain conditions.
2015-03-11 06:36:33 +00:00
rogerman af1c434727 Cocoa Port:
- Fix bug where the mic level thresholds were based on the peak value instead of the average value.
2015-03-11 04:55:24 +00:00
rogerman 76b9689bf2 Cocoa Port:
- All display window settings panels now show the window number of the corresponding display window.
2015-03-11 03:45:51 +00:00
rogerman e893c4eab5 Cocoa Port:
- Include SoftRasterizer’s Fragment Sampling Hack setting in the troubleshooting report.
- Misc. UI changes/fixes.
2015-03-10 19:41:04 +00:00
rogerman fa4d2cb58f Cocoa Port:
- Add the Microphone Settings panel for easier control and more verbose info. The new panel also allows the user to change and monitor mic settings without needing a display window's status bar.
- Implement a more proper mic level UI that reports the level per frame instead of per sample. This should improve UI performance.
- Make all methods in the CocoaDSControllerDelegate protocol optional and remove all related protocol methods from the OpenEmu plug-in.
- Try attaching a new hardware input device on startup.
- Remove debug printf stuff when attaching a new hardware input device. The new Microphone Settings panel makes the extra printf stuff unnecessary.
- Remember the hardware mic mute setting between app launches.
2015-03-10 08:53:59 +00:00
rogerman d0ec648952 Cocoa Port:
- Fix some UI bugs with mic level checks where the mic status icon wasn't showing the correct color under certain conditions.
- Fix UI bug where the mic mute control wasn't being respected under certain conditions.
- The mic status icon now includes a tooltip that reports the name and sample rate of the current input device.
- Handle mic hardware state changes more gracefully when the input device is changed externally.
2015-03-09 21:49:22 +00:00
rogerman 381324ca09 Cocoa Port:
- Add full support for using hardware microphones on the host machine for emulating the NDS microphone. Finally, mic driven games, such as Nintendogs, are fully playable on the Mac!
- Display windows no longer include an output volume slider directly in the status bar. Instead, the slider has been moved inside a popup button, which now behaves just like OS X's volume menu. This was done for better space efficiency.
- Display windows now include a microphone icon alongside the output volume icon. Like the output volume, there is a slider control to adjust microphone gain and also a mute control.
- The microphone icon changes color depending the microphone's state (as seen by the NDS, not the host).
- Replace the existing microphone icon with one that looks better and is more modern.
- Adjust the size of the output volume icon from 20x20 pixels to 16x16 pixels.
- Fix yet another font rendering bug in the Input Profile viewer on OS X Yosemite.
2015-03-08 09:41:19 +00:00
rogerman 64ea7591ab Cocoa OpenEmu Plug-in:
- Update to SDK v1.0.4.
- Change the SPU sync method to N-method.
- Fix bug where the enable state of cheats could not be toggled.
2015-02-25 05:50:15 +00:00
rogerman 7d87434a21 Cocoa Port:
- Max out the core emulation thread's priority. This improves the overall timing accuracy of the emulator.
2015-02-24 21:33:11 +00:00
rogerman df96846915 Cocoa OpenEmu Plug-in:
- Fix compiling issue.
2015-02-21 20:37:55 +00:00
rogerman 83578add74 Cocoa Port:
- Completely revamp the ROM Info panel to have a more modern and mainstream look and feel.
- The ROM Info panel can now be resized and scrolled through.
- Each individual info section in the ROM Info panel can now be expanded or collapsed.
- Fix bugs where the ROM capacity and ROM used capacity info weren't being calculated correctly.
- Do a bunch of random UI text clipping fixes when running on OS X Yosemite.
2015-02-20 22:18:08 +00:00
rogerman 06ece0cb07 Cocoa Port:
- Do a major revamp of the File Migration Assistant. It has been renamed "Game Data Migration Assistant". All following notes will pertain to the new Game Data Migration Assistant.
- Files no longer appear in a single list. They are now organized by app version and file type.
- Users can now select multiple files at once by clicking the checkbox of their corresponding app version or file type.
- File selection is much smarter. If the same file exists in multiple versions, then if the user selects one version of a file, all other versions of that same file are automatically deselected. This also works in multiple selection cases.
- Remove the Select All and Select None buttons. With the smarter selection UI, these buttons are no longer necessary.
- Provide better user feedback when no files need to be migrated.
- Rework the outline view to be more space efficient.
2015-02-18 05:48:25 +00:00
rogerman 634d1ba89b Cocoa Port:
- Fix font rendering weight of the Input Preferences view when running on OS X Yosemite.
2015-02-17 19:52:44 +00:00
rogerman 697c91d99a Cocoa Port:
- Fix bug where changing a display window's pixel scaler while in Touch mode would sometimes cause a crash.
- Do some minor code cleanup.
2015-02-15 09:00:45 +00:00
rogerman cfb408d63b Cocoa Port:
- Fix bug where switching between CPU-based and GPU-based filters in the DeSmuME Preferences display preview would sometimes fail.
- Fix bug where the DeSmuME Preferences display preview would show incorrect colors when using a CPU-based filter on PowerPC Macs.

Video Filters:
- Fix bug where the Scanline filter would show incorrect colors on big-endian systems.
2015-02-15 02:14:29 +00:00
rogerman 5254d7143a Cocoa Port:
- Fix some compiling issues if the C++ standard library is set to libc++ w/ C++11 support instead of libstdc++.
- Fix some compiling issues if compiling on OS X Leopard w/ Xcode 3.1.4.
2015-02-14 02:26:02 +00:00
rogerman d83b1a260c Cocoa Port:
- Fix another freeze on app exit when running on OS X v10.5 Leopard.
2015-02-12 09:02:04 +00:00
rogerman 782447e115 Cocoa Port:
- Fix the behavior of the Display Preferences filter preview.
- Fix an intermittent crash that sometimes occurs when creating a new display window.
- Fix a rare and mysterious crashing bug that sometimes occurs when initializing the HQ4x LUT.
2015-02-11 12:03:47 +00:00
rogerman afa4d57545 Cocoa Port:
- Fix a longstanding bug where audio frames were accidentally getting dropped when using N-sync and Z-sync methods. Greatly improves the audio quality of the N-sync method.
- Now that N-sync actually works as intended, it is now the default sync method. (N-sync has much better latency compared to the other sync methods, especially compared to P-sync, which was the previous default.)
- Update sync method tooltips to better reflect their actual behavior.
- Fix UI bug where the Advanced SPU Logic control text would get truncated on OS X Yosemite.
2015-02-11 01:47:31 +00:00
rogerman 2ff7821e85 Cocoa Port:
- Update the SLOT-1 Manager UI to be more consistent with the SLOT-2 Manager.
- Add some more options to the SLOT-1 Manager's ROM action menu.
2015-02-08 05:44:47 +00:00
rogerman a8ef76f07b Cocoa Port:
- Store the HQnx LUTs on the heap instead of on the stack. Fixes app builds from the Xcode 3 project, where the default stack size is smaller than when using the latest Xcode. (Regression for r5087.)
- Update Xcode 3 project so that builds actually work. (Regression from r5070.)
2015-02-06 19:40:41 +00:00
rogerman 453baff89c Cocoa Port:
- Refactor the OpenGL blitter to work with 3.2 Core Profile contexts.
- Simplify some of the init code.
2015-02-05 21:36:13 +00:00
rogerman baeb5313d2 Cocoa Port:
- Add shader-based equivalents to the following pixel scalers: 2xBRZ, 3xBRZ, 4xBRZ, 5xBRZ. (And yes, these are exact GLSL ports of Zenju's xBRZ scalers, not Hyllian's xBR scalers. These shaders are very demanding on your GPU, so users with older GPUs may want to continue using the CPU-based versions instead.)
- Add a preliminary GPU tiering system to help detect GPU capabilities and allow for better optimizations to be used on newer GPUs.
- Do some optimizations to the following shaders: Bicubic B-Spline, Bicubic Mitchell-Netravali, Lanczos3, EPX.
- Change the shader-based EPX+ color comparisons to be more true to the original CPU-based algorithm.
- Improve color blending on the Deposterize shader.
2015-02-04 01:22:13 +00:00
zeromus f0bef635c2 try to fix some winport joystick hotkey bullcrap for >1 attached joysticks 2015-02-02 19:16:34 +00:00
rogerman 928004e13e GFX3D:
- Fix possible invalid memory access crashes when Y-sorting, most notably, in Super Mario 64 adventure mode. Using std::stable_sort() instead of std::sort() should have little to no performance impact since we're not sorting a lot of elements here. (Regression from r2436.)
2015-01-26 19:46:34 +00:00
rogerman 3abfa637b4 Cocoa Port:
- Initialize the HQnx LUTs only once, instead of doing it per display window.
- Fix issue where the HQnx LUT init code was causing extremely long compile times. (Regression from r5087.)
2015-01-26 05:22:43 +00:00
rogerman c233b1c14f Cocoa Port:
- Add shader-based equivalents to the following pixel scalers: LQ2x, LQ2xS, HQ2x, HQ2xS, HQ4x, HQ4xS
2015-01-25 01:43:37 +00:00
rogerman 1041fe8e3a Video Filters:
- Fix bug where the LQ2xS pixel scaler was using the same code as LQ2x.
- Change LQ2xS brightness thresholds so that LQ2xS actually works as intended.
2015-01-23 18:34:51 +00:00
rogerman 9849a88269 Cocoa Port:
- Fix bug where using Deposterize with a CPU-based pixel scaler would make the video fail to update. (Regression from r5083.)
2015-01-21 02:53:45 +00:00
rogerman 81772f1906 Cocoa Port:
- Oops! Missed some files that should've been committed in r5083. (Regression from r5083.)
2015-01-21 02:15:38 +00:00
rogerman d880c58f75 Cocoa Port:
- Read the GPU_screen buffer directly and avoid making multiple copies of it. Improves performance when many display windows are used.
2015-01-21 02:09:59 +00:00
yki 245586a978 gtk-glade port: Added gdbstub_mutex_init() and destroy() to src/gtk-glade/main.cpp. Now it should be in all ports. 2015-01-17 21:38:06 +00:00
rogerman 6724ce53e3 Cocoa Port:
- Fix crashes from illegal memory accesses when a display window is set to Touch mode. (Regression from r5079.)
2015-01-17 19:51:04 +00:00
yki e714ce9e20 GDB stub:
- Added CPU mutex functions gdbstub_mutex_init/destroy/lock/unlock, which govern access to NDS_ARM9 and NDS_ARM7 structs.
- Added locking and unlocking of the mutex to gdbstub.cpp/processPacket_gdb() and NDSSystem.cpp/NDS_exec()
Cocoa, CLI, GTK, Windows ports:
- Added mutex initialization and destruction to main() functions (cocoa/cocoa_core.mm, cli/main.cpp, gtk/main.cpp, windows/main.cpp)
2015-01-17 15:37:33 +00:00
rogerman 0754569c17 Cocoa Port:
- Have video from CPU-based pixel scalers transfer to GPU via DMA. Should improve performance on pixel scalers with large scaling sizes, such as HQ4xS and 5xBRZ.
2015-01-17 00:53:25 +00:00
rogerman 9329a961f2 Video Filters:
- Add method VideoFilter::SetDstBufferPtr() - allows users to use their own destination buffer instead of having to use the VideoFilter object's internal buffer.
2015-01-17 00:16:29 +00:00
rogerman 433d263b4e Qt Port:
- Fix compiling issues. (Regression from r5068.)
2015-01-16 22:06:11 +00:00
zeromus 37ee317415 clean up sleep hack 2015-01-15 21:48:27 +00:00
rogerman d0aeee71dd Cocoa Port:
- Fix GDB stub functionality in the optimized dev+ build.
2015-01-15 01:18:33 +00:00
rogerman 7b096b400f Glade Port:
- Fix compiling issues. Updates to latest code structure changes. (Regressions from r1031, r5061, r5068.)
2015-01-14 21:02:00 +00:00
rogerman aef36c1949 Cocoa Port:
- Silence some compiler warnings.
- Do some tiny code cleanup.
2015-01-13 05:17:39 +00:00
rogerman acc22b29cb Cocoa Port:
- Fix Latest build. (Regression from r5070.)
2015-01-13 05:10:29 +00:00
rogerman 402434fe19 Cocoa Port:
- Delete the Legacy Cocoa port. (Not only was the Tiger build broken in several ways, but all features from the Legacy port have been subsumed into the main Cocoa port now. Therefore, the Legacy port is no longer necessary.)
- Remove the "Xcode 4" and "Xcode 5" project files. These files have been superseded by the one project file "Xcode (Latest)".
2015-01-13 04:15:07 +00:00
rogerman 3e96459aea Cocoa Port:
- Fix building for the OpenEmu Plug-in build target.
- Enable PGO. (Xcode 6 and later only.)
- Do some misc. build tweaks.
2015-01-13 03:52:49 +00:00
rogerman 8fefb4fb7a Core:
- Do a massive cleanup of the #include and header structure.
- Remove a lot of unnecessary dependencies in the headers.
- Make headers responsible for including what they need for themselves. This makes the headers more independent of where they are in the #include order.
- Relocate some structs/classes to more logical locations.
- Clean up some platform-specific #ifdef stuff.
2015-01-10 02:04:18 +00:00
rogerman d5ab656090 GTK Port:
- Fix compiling issue. (Regression from r5061.)
2015-01-04 21:18:48 +00:00
rogerman bf413dc443 Windows Port:
- Fix compiling issue. (Regression from r5065.)
2015-01-04 05:46:27 +00:00
rogerman 9273aa58cd GDB Stub:
- Fix bug where set breakpoints were being ignored. (Regression from r5061.)
- Do some more cleanup on the GDB stub init code.
2015-01-04 04:45:53 +00:00
rogerman a987ce8ad2 CLI Port:
- Fix compiling issue. (Regression from r5061.)
2015-01-02 22:31:08 +00:00
rogerman c0a710fadb Windows Port:
- Fix compiling issue. (Regression from r5061.)
2015-01-02 09:48:39 +00:00
rogerman 5b9061264b Cocoa Port:
- Oops! Needed to add the .xcscheme files to the Xcode projects. Fixes build issues from r5061.
2015-01-02 09:11:01 +00:00
rogerman 32d9abebbc Cocoa Port:
- Add a new developer-oriented build scheme called "OS X App; dev+" to the Xcode4 and Xcode5 projects.
- Add preliminary GDB stub support to the dev+ build. (Use the menu option Tools > Show GDB Stub Control.)

GDB Stub:
- Do some minor cleanup on the GDB stub init code.
2015-01-02 09:08:50 +00:00
zeromus b7273762fb windows - rename Zup and Zdown to Z+ and Z- and straighten them out 2014-12-17 21:17:01 +00:00
zeromus 64ce4799fd add a vs2015 sln and stuff, but it only uses the vs2010 toolset. thats the lazy way. works ok though. 2014-12-15 03:33:37 +00:00
rogerman 878649a0a8 Cocoa Port:
- Remove the extra mutex from NDS_exec() in the main emulation loop. Have all consumers use the rwlock instead.
2014-11-27 05:36:45 +00:00
rogerman f17312c91d GFX3D:
- Clean up magic numbers related to the 3D framebuffer size.
2014-11-26 23:17:34 +00:00
zeromus fb2e4730e3 revert r5043. this revision quite unexpectedly broke about 8000 games. 2014-11-24 20:38:58 +00:00
rogerman 588744d323 Video Filters:
- Update XBRZ filters to v1.1 (thanks Zenju!) Addresses feature request #160 - https://sourceforge.net/p/desmume/feature-requests/160/
2014-11-19 23:00:19 +00:00
zeromus 16f9140960 fix regression within past 2 commits of launching any game from firmware 2014-09-16 04:42:38 +00:00
zeromus 66e6ba9497 improve previous commit, which was just plain buggy. now card is detected again. but... the game crashes when trying to boot. 2014-09-16 04:30:55 +00:00
zeromus dd13e33401 fix obvious crashy bug in NAND cards when booting from firmware, but for some reason the card isn't detected still. 2014-09-16 03:53:58 +00:00
zeromus b781234576 fix bug loading gba roms with no .sav file (fixes bug #1431) 2014-09-14 17:36:25 +00:00
zeromus 6ab5ff5917 savestate gamecode printing was endian-wrong 2014-09-05 03:28:08 +00:00
zeromus 51e478e66a fix bugs from r4926 (off-by-one error in out-of-range rom-reading check). possibly broke the last u32 in the rom. fixes bug #1406 (phantasy star 0 CHS translation black screen freeze) 2014-09-01 23:20:20 +00:00
zeromus e24720f69d apply patch #164 to screenshot path building format 2014-08-21 16:17:21 +00:00
normmatt234 b95380054e Fix Action Replay DS code type 0xE (Patch #163) 2014-08-17 06:57:10 +00:00
zeromus 204e9b46e5 block reading of BGxHOFS and BGxVOFS registers. fixes some ratatouille stages 2014-08-10 04:42:33 +00:00
zeromus bbc1517cc8 fix ancient errors in instruction decode table created by r3504 and r3510. not known to fix anything, but might be hg/ss related. 2014-07-30 22:20:25 +00:00
zeromus dabca07a9e add comments to instruction_tabdef.inc to salvage r3504 which modified the formatting as well as the contents 2014-07-30 20:56:43 +00:00
zeromus 0c54127f59 fix #1134 - american girl games (need system jamming when sending 3d commands with pending flush)
TODO - check #1428 (reportedly it affects PMD somehow)
2014-06-17 05:46:49 +00:00
alvinwong fca4afd7ce Fix file seeking of gba ROM and fix seeking behaviour of EMUFILE_FILE 2014-05-26 09:50:11 +00:00
zeromus 262fc4f14a apply alvinhochun's gbagame patches
--- 
add system in EMUFILE_FILE to switch correctly between read/write modes; add system in EMUFILE_FILE to (optionally) track current file position and avoid redundant fseeks - this code is UNTESTED.
 --- 
add better console feedback when gbagame .sav is being scanned, to make developers less likely to think the emulator is frozen
2014-05-26 06:23:56 +00:00
thelemonman fc6930c2e1 Fix JIT profiler compilation on linux 2014-05-03 15:52:20 +00:00
thelemonman 23955ff791 Remove the useless include 2014-04-23 18:16:20 +00:00
thelemonman 85c1c3c39d Acquire an OGL3.2 core profile when available 2014-04-23 18:14:20 +00:00
thelemonman f4cf398962 Fix the include guard 2014-04-23 09:53:05 +00:00
thelemonman 03edf63c31 Backport the w-buffer fix to the OGL 3.2 renderer. Delete the useless and misleading third copy of the same shaders. 2014-04-19 07:16:16 +00:00
thelemonman ce96c060f5 w-buffer support for OGL renderer. Remove the broken and silly i965 hack. 2014-04-18 17:14:13 +00:00
rogerman f02a1e83ee Cocoa Port:
- Fix bug where video filters weren't preferring to use the GPU by default.
- Display threads now each pull a copy of the video frame from the emulation thread, rather than the emulation thread pushing copies of the video frame to each display thread. (Slight performance improvement when many display threads are used.)
2014-04-13 00:23:52 +00:00
zeromus 608b9b3986 overhaul GXFIFO again, maybe better this time. 2014-04-06 01:44:49 +00:00
zeromus ef212121bf win32-apply patch #156 Win32:Expose AntiAliasing in 3D settings 2014-04-05 01:18:01 +00:00
zeromus a51fb22a40 overhaul GXFIFO packed-command handling to more closely resemble a reasonable hardware behaviour. this is unlikely to have fixed anything, since previous revisions had somehow smashed their way through most of the bugs; however, the previous revision did have a tiny potential bug which might have been fixed by this (array out of bounds access). the code is so pretty now, I think it must be right, but there's a chance that I have created a new bug. 2014-03-30 21:32:53 +00:00
rogerman 2873d83de4 Core:
- Fix some graphical glitches on big-endian systems.
- Do some minor code cleanup.
2014-03-25 22:17:02 +00:00
rogerman db358049b9 Cocoa Port:
- Do a huge refactor of the display code.
- Add support for shader-based filters.
- New feature: The display pipeline has been separated into three parts - Source --> Pixel Scale --> Output. Different sets of filters may be applied to each part of the pipeline.
- Add the following source filters: Deposterize
- Add the following output filters: Bicubic (B-Spline), Bicubic (Mitchell-Netravali), Lanczos2, Lanczos3.
- Add shader-based equivalents to the following pixel scalers: Nearest 2x, Scanline, EPX, EPX+, Super Eagle, 2xSaI, Super 2xSaI. These will be used instead of the CPU-based scalers if "Run filters on GPU if possible" is enabled (default is enabled).
- Remove the following pixel scalers from the UI: Nearest 1.5x, Nearest+ 1.5x, Bilinear 2x, EPX 1.5x, EPX+ 1.5x. The reasoning behind this is because these pixel scalers aren't necessary due to the automatic sizing of display view to window. Also, the new output filters make it so that running similar pixel scalers along with an output filter will always yield superior results.
2014-03-24 18:19:11 +00:00
alvinwong d16070ecb4 Qt: Implement control config dialog. 2014-03-20 15:09:28 +00:00
alvinwong 83ebb04cc2 Qt:
- Add fps counter
- Minor code cleanup
- Linux: DEFINES cleanup
2014-03-18 13:19:23 +00:00
alvinwong f09b93c62a Set eol style on Qt frontend files 2014-03-18 05:26:44 +00:00
alvinwong 9fdb1d26bb Initial Qt frontend code commit. 2014-03-18 05:14:22 +00:00
rogerman 73f44f0aeb Video Filters:
- Do some minor code cleanup.
2014-03-15 17:48:54 +00:00
rogerman dca852468c Cocoa Port:
- Fix intermittent freeze on app exit when running on OS X v10.5 Leopard.
2014-03-14 21:27:42 +00:00
alvinwong 2b3198e392 Linux: Fix compilation errors if HUD support not enabled 2014-03-13 12:32:34 +00:00
alvinwong 5c3c1f14d9 Linux (gtk): Actually change filter when loading options. 2014-03-08 10:23:35 +00:00
alvinwong 84460eeb5a Linux (gtk): Remove an unused option. 2014-03-08 08:39:13 +00:00
alvinwong 3f9de84fb1 Linux (gtk): Add option saving. 2014-03-08 08:34:31 +00:00
zeromus 8de0c23924 dont crash if save/loadstating 0 bytes of backup memory 2014-03-06 14:47:16 +00:00
alvinwong b7e996218b Linux (gtk): Change pause/resume to Pause button. 2014-03-06 14:15:06 +00:00
alvinwong 34b9cf1c0f Linux (gtk): Initialize VideoFilter with the number of CPU cores instead of hard-coded to 4 threads. 2014-03-06 08:01:45 +00:00
rogerman 560b23103c Video Filters:
- When using multiple threads, ensure that all lines are accounted for when the line count isn't evenly divisible by the thread count.
- Add static method VideoFilter::GetAttributesByID().
- Reallocating the destination buffers now uses its own method. Reverts the changes from r5000.
- Prepare the code for the use of multi-pass filters.
2014-03-05 18:20:00 +00:00
rogerman e23beb8630 Cocoa Port:
- Fix building of the Legacy project.
- In the Legacy and Xcode 3 projects, make the default C language GNU99.
2014-03-05 04:47:34 +00:00
rogerman 4d50b396dd Cocoa Port:
- If a video filter is used, upload textures in BGRA8888 instead of RGBA8888 format.
- Do some cleanup of the OpenGL display code.
2014-03-05 04:26:08 +00:00
rogerman 48f20e49f7 Cocoa Port:
- Fix intermittent bugs with loading user defaults on app startup.
2014-03-04 18:49:51 +00:00
alvinwong 11ff936fa1 Linux (cli): Fix HUD rendering (regression in [r5004]). 2014-03-04 10:07:33 +00:00
alvinwong 2ac5065fb4 Linux (gtk): Run video filter before fps limiter to make better use of time (and hopefully more accurate frame timing...). 2014-03-04 04:28:41 +00:00
alvinwong 037cf4e065 Linux (gtk): Clear screen after reset. 2014-03-03 08:50:33 +00:00
alvinwong 443cef56be Change a few places to use DESMUME_SAMPLE_RATE instead of hard-coding 44100. 2014-03-03 08:36:08 +00:00
alvinwong 6b8a1b979b NDSSystem.cpp:
- "Fix" opening ROM files of unknown file extension.
- Fix buffer overflow when last character of ROM game code is not a recognized country code.
- Add country code Chinese (iQue DS).
2014-03-01 14:39:37 +00:00
alvinwong 12f5776a3f Linux (gtk):
- Add HUD editor mode.
- Small changes.
2014-03-01 07:53:24 +00:00
zeromus 9295bb5f73 set eol-style on aggdraw.cpp 2014-03-01 06:21:33 +00:00
alvinwong 041941876d Linux (gtk):
- Don't render HUD directly to gpu screen.
- Redraw display for some operations which updates HUD display.
- Make HUD aware of swapped screen and/or single screen.
2014-03-01 06:13:30 +00:00
alvinwong 8b8e7b1648 Linux (gtk):
- Fix possible stack overflow if video filter resolution is high enough.
- Fix not being able to toggle HUD when paused.
- Fix HUD 3d fps display when there is frameskip.
2014-02-28 15:33:26 +00:00
alvinwong 2fe8cb330d Linux (gtk):
- Remove gtk pixbuf usage on drawing DS screens, use only Cairo.
- Use transformation matrix to handle touchscreen coordinates.
- Adapt RGB555-to-RGBA8888 conversion code from Cocoa port, should result in brighter colour.
- Re-enable fullscreen menu item on start.
2014-02-28 07:52:39 +00:00
rogerman 4fec0a060e Cocoa Port:
- 16-bit to 32-bit color space conversions no longer darken images.
2014-02-27 05:56:32 +00:00
alvinwong e9da2c318c Video Filter:
- When changing source image size, force the construction of a new buffer. Fixes [bugs:#1384] introduced in [r4987].
2014-02-26 14:32:01 +00:00
alvinwong 4e5b6e6d6f Linux (gtk, glade, cli):
- Add control for Lid (defaults to Backspace).
- Disallow Left+Right or Up+Down, acts like Windows port.
- Show correct button state on HUD.
2014-02-26 11:29:53 +00:00
alvinwong fed37e55d3 Windows:
- Fix a possible (but slim) buffer overflow caused by the usage of sprintf.

Linux (gtk):
- Show error instead of warning if --enable-hud is configured but libagg not found.
- Change F10 to use savestate slot 0 instead of 10.
- Show savestate time on savestate menu.
- Change startup window size back to resizable.
2014-02-26 09:52:06 +00:00
alvinwong ae36159259 Linux (gtk): Add fixed window size options. 2014-02-25 14:13:40 +00:00
zeromus 513370ca21 fix bug that made 5x filters crash in windows 2014-02-22 20:48:14 +00:00
rogerman 823d99c73a task.cpp:
- Have CPU core detect on OS X use sysctl() instead of sysconf().
2014-02-21 21:15:25 +00:00
alvinwong 76732a03ed Linux (gtk): Add sound interpolation option. 2014-02-20 13:58:00 +00:00
alvinwong f71fe6e108 Linux (gtk): Fix foolish typos. 2014-02-17 05:36:24 +00:00
alvinwong 6f91e947c3 Linux (gtk): Add preliminary AV recording with x264 and flac. 2014-02-17 04:02:42 +00:00
rogerman a15e6cee10 Video Filters:
- Have the Bilinear filter use the same SSurface struct as all the others.
2014-02-15 20:35:54 +00:00
rogerman 98713caf4b Cocoa Port:
- Fix potential crashing bug when changing the video filter from None to a different video filter with 1x scaling.
2014-02-15 06:40:55 +00:00
rogerman def065be97 Video Filters:
- Fix compiling of videofilter.cpp if compiled on Windows.
2014-02-14 01:09:30 +00:00
rogerman 9d44ca55f6 Video Filters:
- Have the xBRZ filter handle the alpha channel.
- Minor code cleanup of video filter managing code.
2014-02-13 23:30:01 +00:00
rogerman 9a642be896 Video Filter:
- When changing filters, skip the costly construction of a new destination buffer if the new surface size will be the same.
2014-02-13 04:49:00 +00:00
rogerman d1c6c6e3ac Cocoa Port:
- On startup, expand all items in the Input Preferences control list by default.
2014-02-13 02:43:08 +00:00
rogerman cf109b69dd Cocoa Port:
- Add SoftRasterizer hack from r4984.
- Update UI to reflect the current feature set.
- Do some code cleanup.
2014-02-10 07:14:05 +00:00
zeromus 443b24cac2 apply patch #159 from tracker to add hack for softrasterizer text rendering improvement in some games 2014-02-09 08:28:48 +00:00
alvinwong fd3b89bac2 Linux (gtk): Minor change to HUD toggle code 2014-02-09 08:17:51 +00:00
alvinwong 04d0faa240 Linux (gtk):
- Add HUD display toggle menu (require --enable-hud on configure)
- Reorganize menu items to be more alike the Windows port
- Change fullscreen hotkey to F11
- Change default video filter to None (user can still switch via menu)
2014-02-09 08:11:33 +00:00
alvinwong 249059e9c0 Linux (gtk):
- Fix DesMuME name case inconsistency
- Make title and status bar more informative in some situations
2014-02-08 15:23:09 +00:00
rogerman 2a85d684eb Cocoa Port:
- Disable replay related UI elements whenever a ROM is not loaded or if the save state sheet is shown.
2014-02-08 03:32:45 +00:00
rogerman f2cd7ad4b0 Cocoa Port:
- Add preliminary replay support.
2014-02-07 21:40:21 +00:00
alvinwong 74b7993d1a Linux (gtk): Fix screen gap bug 2014-02-07 14:13:08 +00:00
alvinwong 675e3424b3 Linux (gtk):
- Rewrite fps limiter and frame skipping code.
- Decrease EmuLoop priority to force screen redraw at maximum rate.
- Add menu option for fps limiter.
- Support boost button.
- Force disable Ubuntu's global menu.
2014-02-07 09:18:01 +00:00
alvinwong 895be3efec Linux (gtk):
- Support xBRZ filters (and fixed build error)
2014-02-07 08:17:53 +00:00
zeromus 0bcf4eaf59 actually make the filters work in windows 2014-02-07 07:44:22 +00:00
squall-leonhart 73bc032c1c just adding a couple of files missing from the VS2010 project file 2014-02-07 06:57:54 +00:00
zeromus c76469cbc1 update vcproj with xbrz files 2014-02-07 04:41:25 +00:00
rogerman 875ae2cc4b Video Filters:
- Add new xBRZ family of filters.

Cocoa Port:
- Refactor all display code. OpenGL code is pushed to a lower level and filter code is pushed towards the UI level.
- Add support for the new xBRZ filters.
- The Execution Control panel no longer always appears on app startup.
2014-02-07 04:34:32 +00:00
rogerman 2c3db349c3 Cocoa Port:
- Don't completely block output threads when they are set to idle, since we need to assume that messages will be passed to them at any time. It seems like NSRunLoop is smart enough not to unnecessarily wake the CPU on idle, so the thread block was not necessary.
- Fix bug where user settings were not being applied while the emulator was paused. (Regression from r4970.)
2014-02-05 19:38:39 +00:00
rogerman 9f6f8c1cfd Cocoa Port:
- Optimize the emulator idle state to achieve 0% CPU usage. This greatly reduces the app's energy usage when the emulator is idle.

Cocoa Port (OpenEmu Plug-in):
- Remove some dependencies needed to compile the OpenEmu plug-in.
2014-01-31 08:31:20 +00:00
rogerman 8e3198436b Cocoa Port:
- Update status text when the autohold state changes.
2014-01-31 03:28:37 +00:00
rogerman 491a978f31 Cocoa Port:
- Add support for .dss Action Replay save files.
2014-01-31 02:08:33 +00:00
rogerman 7fa5f7763e Cocoa Port:
- The input handler now supports autohold.
- NDS inputs in the input handler now support turbo.
2014-01-31 01:30:52 +00:00
rogerman 71c196b920 Cocoa Port:
- Fix building when using the Xcode 5 project. (Regression from r4965.)
2014-01-29 18:04:20 +00:00
rogerman 47b2b6eac6 Cocoa Port:
- Add controls for frame advance, frame jump, and display mode toggle.
- Add new execution control panel. (Emulation > Show Execution Control)
- Reorganize several menu items in the Emulation and View menus.
2014-01-29 08:36:47 +00:00
rogerman db94b7c8a6 movie.cpp:
- Do some preliminary cleanup of the code.
- Fix bug where firmware nicknames and messages weren't being saved properly.
2014-01-25 00:39:52 +00:00
rogerman 088495f0cd Cocoa Port:
- Change DefaultUserPrefs.plist from binary format to XML format.
- Update copyright year in plist files.
2014-01-09 08:37:26 +00:00
zeromus 0c99529409 etc 2014-01-08 16:36:58 +00:00
zeromus 0983a34bd4 same for CLI 2014-01-08 16:28:14 +00:00
zeromus c88a2071a7 try to fix GTK port compilation after gbagame configuration changes. i havent tried compiling this yet 2014-01-08 16:20:28 +00:00
rogerman b93e53ac1a Cocoa Port:
- Add support for the Guitar Grip and the Easy Piano.
- Fix minor alignment issues with some UI elements.
- Do some random code cleanup.
2014-01-08 09:16:24 +00:00
rogerman 0ec2b21a20 Cocoa Port:
- Do a bunch of optimization and cleanup of the input handler.
- Add support for using analog inputs in their native format.
- The paddle controller now supports native analog control.
- NOTE: Due to the changes in the input handler, users will need to rebind any hatswitch inputs that were previously used. Only hatswitch inputs were affected by these changes.
2014-01-07 18:35:40 +00:00
rogerman ac146b26d2 Cocoa Port:
- Add preliminary support for SLOT-2 devices. (Guitar Grip and Piano remain unsupported, but all other devices work.) Happy New Year, folks!
2014-01-02 03:13:44 +00:00
rogerman e568f8c4fd Slot-2:
- Clean up GBA Cartridge device code, and also add the ability to have the SRAM file be on a different file path from the ROM file.
- Force Rumble Pak to turn off rumble upon disconnect.
- Fix file path issue when trying to use a disk image file for an MPCF device.
2014-01-02 01:29:31 +00:00
rogerman 38f02e0804 Slot-2 Rumble Pak:
- The use of the BOOL datatype in a function pointer for front-ends is not as portable as one might think. Switch to using a standard C++ bool datatype instead.
- Add auto-selection to Rumble Pak for Metroid Prime Pinball.
2013-12-31 04:49:37 +00:00
rogerman 2b633d1cb3 Windows Port:
- Fix compiling for Windows port. (Regression from r4952.)
2013-12-30 06:38:54 +00:00
rogerman dd09eb888d Cocoa Port:
- Fix a possible crashing bug that was exposed by the changes from r4952.
2013-12-24 07:38:15 +00:00
rogerman c95eba3901 Slot-2:
- Fix SLOT-2 connect/disconnect behaviors when switching in and out of auto-detect mode.
- Do some cleanup on the auto-detect code.
2013-12-24 07:35:46 +00:00
rogerman c7c3662ed2 Slot-2:
- Fix possible crash on init when using expansion memory.
2013-12-24 00:22:31 +00:00
rogerman c2a4da43c3 Cocoa Port:
- Update all info .plist files to v0.9.11 for future SVN builds.
2013-12-21 08:32:53 +00:00
zeromus 76f83f2bf6 make some tweaks for netbsd compiling 2013-12-19 05:40:16 +00:00
rogerman 995459dc92 Core:
- Fix ROM reading on big-endian systems.
2013-12-18 08:05:32 +00:00
zeromus bc7e3bf00f speedfix for speedtyporeport 2013-12-16 05:25:55 +00:00
zeromus a8d01255ed add warning when booting homebrew game while using "stream rom from disk" since it doesnt work right now, and it essentially breaks most homebrew apps by default. 2013-12-16 05:22:49 +00:00
zeromus 0445bcc9ee fix crashy bug in slot2_gbagame and also change it to use EMUFILE while I was at it, like it shouldve been in the first place. but.. i didnt really test it. 2013-12-16 05:17:34 +00:00
zeromus f94727dc1e win32-remove libdwarf etc link deps from 2005 vcproj 2013-12-14 03:35:38 +00:00
mtabachenko acaa4e85d2 winport:
- now VS2012 build works on Windows XP/2003 64;
2013-12-09 11:03:25 +00:00
mtabachenko 074c9881ae winport:
- now VS2012 build works on Windows XP 32 bit;
- update svn tools to 1.8.4;
2013-12-09 10:45:25 +00:00
jsteffens fd55e1af4d fix include case 2013-12-09 07:54:40 +00:00
zeromus fcccf48307 fix potential but unlikely bug in advanscene import 2013-12-09 01:31:50 +00:00
zeromus 6caeb38edc add --advanscene-import <infile> commandline option which reads <infile> and writes to <infile>.ddb. (and then exits) its not completely clear whether this would work on ports other than windows due to completely disorganized emulator initialization logic between different frontends, but it should be easy to resolve. 2013-12-09 01:26:08 +00:00
zeromus da4b6487e2 win32-use the same method for displaying colors in the palette tool as is used for converting 555 to 888 in the frontend, so they match 2013-12-08 23:41:37 +00:00
rogerman 82f9342a5b Cocoa Port:
- Make frame rate transitions more smooth. This has the effect of making video much smoother, with only a negligible effect on execution speed accuracy.
- Make auto frame skip slightly less aggressive.
2013-12-07 22:21:52 +00:00
mtabachenko 72c34257a6 winport:
- fixed the path of directories in VS2012 project;
2013-12-07 18:36:33 +00:00
mtabachenko c8586c1241 buildfix VS2008 project 2013-12-05 23:22:39 +00:00
mtabachenko 285c4d567f core:
- add import Action Replay .dss save file;
2013-12-04 14:43:03 +00:00
mtabachenko 4c8e70acd9 winport:
- fix multiselect rows in Cheats List dialog;
2013-12-03 18:41:59 +00:00
mtabachenko 702879c848 core:
- add autofix the device capacity value in broken header (fix bug [#1353]);
2013-12-02 12:49:36 +00:00
zeromus d2ed4ca30e make the engineering around kUninitializedSaveDataValue not so horrible; affects "Daigassou! Band Brothers DX" but not tested (make the slot1comp_mc configure the BackupDevice with the appropriate uninitializedValue since it is a property of the physical backup memory hardware) 2013-12-01 07:06:56 +00:00
zeromus 912355488e fix new bugs in save code which broke some games in sneaky ways. fixes apollo justice, although reportedly it was broken for other reasons in previous releases. also might have fixed a regression in tomb raider underworld 2013-12-01 06:52:14 +00:00
mtabachenko 0191b680c4 core:
- fixed a bug in SPU when total length of the samples is less than 16 bytes (fixed issue [#1357])
2013-11-30 12:48:25 +00:00
zeromus dba7e21423 revert a little bit of r4815. it seems wrong, or needs more documentation: the rom header should not be consulted when deciding whether to return 0xFFFFFFF for out of range cart rom data. did dsi have something to do with this? please explain or comment. 2013-11-30 05:07:58 +00:00
mtabachenko f9eb416311 core:
- optimize SPU and fix bug [#1356];
winport:
- optimize Sound View Tool;
2013-11-30 03:15:42 +00:00
mtabachenko 02701e48d9 the BIAS register set to 0x200 on fake boot. 2013-11-28 14:40:14 +00:00
mtabachenko cc13d8f6d4 bump version number in trunk for future SVN builds. 2013-11-28 09:19:19 +00:00
rogerman dbcbeedd8a Cocoa Port (OpenEmu Plug-in):
- Fix compiling issues.
- Fix bug where sound wasn't working.
- Add cheat system support.
- Implement changeDisplayMode method.
2013-11-28 08:55:08 +00:00
rogerman ddf957fcf7 Cocoa Port:
- Load cheat item icons higher up in the front-end code.
- Remove CocoaDSCheatManager's and CocoaDSCheatSearch's dependence on CocoaDSCore. Just use basic mutex pointers instead.
2013-11-28 08:51:43 +00:00
yabause f9f6a74a72 deinit_glx_3Demu is not a void function anymore. 2013-11-28 00:46:17 +00:00
yabause 3b0797a21d We need to use a modern tar format for those very long
file paths in the repository.
2013-11-28 00:45:23 +00:00
rogerman fc733b695f Documentation:
- Update Read Me for Macintosh.
2013-11-27 20:38:43 +00:00
rogerman 432a56ec95 Cocoa Port:
- Update Bug Report URL to the current one.
- Silence some compiler warnings.
2013-11-27 20:36:39 +00:00
mtabachenko ea6ad164db - comment out print log in RLUnCompWram;
- applied changes from thunk to 0.9.10 branch.
2013-11-27 12:09:40 +00:00
mtabachenko 7b48e7f650 sorry, my silly brain; 2013-11-26 22:57:42 +00:00
zeromus 0fbe77a9a8 add some notes to self 2013-11-26 22:37:17 +00:00
zeromus 9815ef3cab authors and changelog updated for 0.9.10 2013-11-26 22:37:01 +00:00
mtabachenko 5e5e56df87 winport:
- move "Show Console" parameter in ini-file for [Display] to [Console] section and renamed to "Show";
2013-11-25 13:48:27 +00:00
jsteffens eee29ace05 error: return-statement with a value, in function returning 'void' 2013-11-25 12:52:22 +00:00
thelemonman 0e9766f096 Deinit the opengl context before exiting. 2013-11-24 22:21:58 +00:00
rogerman 50dbb2aee5 Cocoa Port:
- Add AppleScript for deleting the user defaults files.
2013-11-24 01:01:50 +00:00
rogerman a8b27aeb66 Cocoa Port:
- The Support Request and Bug Report forms now report more application states.
2013-11-23 21:18:47 +00:00
mtabachenko d6db1f7e96 - fix path to firmware settings file (fix [#1354]); 2013-11-23 14:34:27 +00:00
mtabachenko 3d8f138874 core:
- set ROM Loading to "Stream from Disk" by default;
2013-11-23 11:49:40 +00:00
mtabachenko 5e3aae6b9f update AUTHORS list 2013-11-22 23:35:52 +00:00
mtabachenko 6db2459178 revert GNU license 2013-11-22 23:13:08 +00:00
mtabachenko 3c03def68f - update GNU license;
- update bug tracker URL in the README file;
2013-11-22 23:04:26 +00:00
mtabachenko 3a88139f99 core:
- added copying logo data from ROM header into ARM9 BIOS memory area when not using the external BIOS;
2013-11-22 21:40:36 +00:00
rogerman e52511502e Cocoa Port:
- Remember the emulation speed setting between app runs.
2013-11-22 19:36:14 +00:00
mtabachenko b85d168f9a tools:
- add slot2 dumper, for debug Slot2 Option Paks;
2013-11-22 10:30:29 +00:00
mtabachenko e5eb8918d4 winport:
- fixed the icon for file association.
2013-11-22 09:52:20 +00:00
rogerman 5f44858edd Cocoa Port:
- Fix bug where SPU settings were not properly being set. (Regression from r4882.)
2013-11-21 20:41:54 +00:00
mtabachenko e05ef815ce core:
- fix export backup.
2013-11-21 18:12:57 +00:00
mtabachenko bdd4f2e3f5 core:
- fix bug in backup savestate.
2013-11-21 18:00:17 +00:00
mtabachenko 1fa0886fe7 - fix import save; 2013-11-21 09:03:02 +00:00
rogerman 9e45290c47 Cocoa Port:
- Fix bug where the "Automatically load this ROM on startup" pop-up menu wouldn't update properly if the same option is chosen.
2013-11-20 22:59:37 +00:00
mtabachenko 63406703aa fix auto import raw (uncompressed) no$gba saves; 2013-11-19 10:32:58 +00:00
mtabachenko b3586a0a98 fix auto import no$gba saves; 2013-11-19 09:24:17 +00:00
mtabachenko b05fe32a44 winport: add wiki and faq links to menu; 2013-11-17 19:03:32 +00:00
mtabachenko ebfe8a312c - add SPU synchronization mode and method to command line; 2013-11-16 15:04:32 +00:00
mtabachenko c6d959ea53 fix write backup bug introduced by [r4880]; 2013-11-16 13:19:45 +00:00
mtabachenko b5f78e2652 - optimizing reads/writes NAND backup data. 2013-11-16 12:30:47 +00:00
mtabachenko 88e34db3e7 fix import backup memory 2013-11-16 10:56:39 +00:00
mtabachenko 6cdd10b84a - rewrite IO backup memory. now reading/writing direct from/to file without temporary buffer in memory. 2013-11-15 15:08:15 +00:00
rogerman 2db8779e08 Cocoa Port:
- Remove embedded scripts for generating SVN_REV from Xcode projects; move the script to a single common script file.
- Make the SVN_REV generation script a bit more robust. Building no longer fails if svnrevision doesn't support SVN 1.7.
2013-11-13 19:33:33 +00:00
mtabachenko 7e176d1998 Slot1:
- add Slot1 NAND savestate;
2013-11-13 17:33:08 +00:00
normmatt234 59d8d798ef Fix save corruption bug in retail nand slot1. 2013-11-13 08:18:34 +00:00
normmatt234 5b6d16da87 Fix initializer-list bug reported by VS2013. 2013-11-13 08:16:52 +00:00
mtabachenko 1c49c3daf5 slot2:
- fix crash Memory Expansion Pak;
2013-11-13 08:12:55 +00:00
jsteffens 3233bf9c86 SVN revision fixes, mostly for linux 2013-11-12 16:50:40 +00:00
mtabachenko 31d2679e07 fix linux build 2013-11-12 15:31:32 +00:00
mtabachenko a61e91a078 savestates:
- fix write Slot1/Slot2 device ID;
- write more info in savestate;
2013-11-12 14:51:38 +00:00
mtabachenko ed85c3df12 Slot2:
- implement save state of "Memory Expansion Pak";
2013-11-12 11:08:23 +00:00
mtabachenko 429afd87f6 core:
- fix load slot2 savestate from old savestates created before [r4867]
2013-11-12 10:32:51 +00:00
mtabachenko 2f094cf11d core:
- add slot2 to savestate;
2013-11-12 09:55:14 +00:00
thelemonman f838938887 Fix r4862 and make the input system a bit saner. 2013-11-12 02:41:02 +00:00
rogerman 6ea032a191 Cocoa Port:
- Integrate new SLOT-2 code with all projects.
2013-11-11 20:46:03 +00:00
mtabachenko 3ee1fe0d4b winport:
- fix initialize slot2;
2013-11-11 20:25:33 +00:00
mtabachenko b4e1286dd3 slot2:
- added new games to auto-selection list;
winport:
- added customizing the keys for Taito Paddle Controller;
- now don't need reset DS when you change the slot2 device;
2013-11-11 19:47:59 +00:00
thelemonman a57bf33472 Reset the keypad status before reading. Fixes spurious keys being pressed at startup. 2013-11-11 18:06:26 +00:00
thelemonman b4c243fade Integrate the new slot2 system in gtk/cli frontends. 2013-11-11 17:28:25 +00:00
mtabachenko 3cd1e909fc Slot1:
- add device ID code;
2013-11-11 10:04:10 +00:00
mtabachenko 94aac3fccd Slot1:
- add ID code to Slot2 devices;
2013-11-11 09:19:20 +00:00
mtabachenko 69f5f165e2 slot2:
- add more games to autodetect list;
2013-11-11 07:51:42 +00:00
mtabachenko ec07d6bd55 Slot2:
- add new "PassME" stuff;
2013-11-11 00:17:13 +00:00
mtabachenko e5b34983a9 winport:
- Slot2 device set to Auto by default;
2013-11-11 00:07:33 +00:00
mtabachenko 61124f6551 Slot2:
- add auto-detection device;
2013-11-11 00:01:22 +00:00
mtabachenko 2d93fc7901 Slot2:
- add new "GBA Cartridge" stuff;
2013-11-10 23:08:25 +00:00
mtabachenko 41fe58e0f8 Slot2:
- add new MPCF Flash Card Device code;
- add new paddle code (untested);
2013-11-10 21:05:11 +00:00
mtabachenko 08c66df12b Slot2:
- rewrite all slot2 code, not finished yet;
2013-11-10 20:20:46 +00:00
mtabachenko 0cc53ad207 core:
- fake boot: read secure area before boot and remove this from readROM function (fixed);
2013-11-09 23:57:23 +00:00
mtabachenko 40b58be6ba revert my last commit, this is wrong way; 2013-11-09 23:08:44 +00:00
mtabachenko 4c50354b0e core:
- fake boot: read secure area before boot and remove this from readROM function;
2013-11-09 22:51:52 +00:00
mtabachenko 95d32bc4d2 core:
- don't read from secure area buffer for ROMs with GBA Loader;
- fix declare importData function in BackupDevice class;
2013-11-09 20:49:42 +00:00
rogerman 4700d63db8 Cocoa Port:
- Add slot2_passme.cpp to all projects.
- Fix compiling. (Regression from r4843.)
2013-11-09 20:22:55 +00:00
mtabachenko 742bc11da3 core:
- fix load ROM with GBA Loader (*.ds.gba);
2013-11-09 17:20:35 +00:00
jsteffens 0fdac4d989 linux compile fix (missing include) 2013-11-09 14:22:37 +00:00
mtabachenko 5d671b8b92 GBA slot:
- add emulation PassME (required for old Homebrew libs);
2013-11-09 13:34:11 +00:00
mtabachenko b4765567ad - moved import/export backup code from NDSystem into MC;
- moved write BMP/PNG code from NDSSystem into common;
- removed old GC log;
2013-11-09 11:42:54 +00:00
zeromus caf8d336e7 nobody is allowed to set alignments on typedefs without testing on linux and windows simultaneously. its only known to work on data declarations. in the meantime, sort all this crap out hopefully. 2013-11-08 19:19:49 +00:00
thelemonman dae13c04b1 Fix what r4840 was meant to fix but didn't. 2013-11-08 17:19:37 +00:00
mtabachenko 44051ee09f - fix application crash introduced by [r4838]; 2013-11-08 15:32:22 +00:00
thelemonman 589960f91b Make VERT coord field aligned to 16 bytes. 2013-11-08 15:14:37 +00:00
thelemonman 79cd1fc354 Use SSE matrix multiplication in box testing. 2013-11-08 14:33:30 +00:00
mtabachenko 4d79e39f36 core:
- implemented mc write status command;
- add feature custom initial value mc data on reset; (fix bug #1325 Daigassou! Band Brothers DX - JP)
2013-11-07 02:27:20 +00:00
mtabachenko cb5e9df984 addons:
- add lock/unlock control bit in Memory Expansion Pack;
2013-11-06 08:53:10 +00:00
mtabachenko c2e9dbb126 core:
- add R4 DLDI autopatcher;
2013-11-06 00:15:02 +00:00
mtabachenko 8d4390bace core:
- fix R4 path;
2013-11-06 00:01:38 +00:00
mtabachenko 11be795869 winport:
- fix bug in slot1 R4 dialog;
2013-11-05 23:10:29 +00:00
thelemonman b41dd28132 Silence autoconf errors. Fix the svn revision retrieval in the autoconf script. 2013-11-05 22:09:47 +00:00
mtabachenko e2f2bf6bb3 core:
- fix R4 (now scan directory on reset);
- add R4 new path type. now can select youself a directory to scan or auto select same as ROM;
winport:
- now in select Slot1 dialog (folder dialog) cursor autosets to current selected directory;
2013-11-05 11:13:39 +00:00
mtabachenko da29c3f483 core:
- fix touch screen calibrate when use external firmware;
2013-11-05 09:23:36 +00:00
thelemonman 7f88812fa9 Add license headers. 2013-11-04 17:07:19 +00:00
thelemonman 5faea57f2c New GLX-based 3D renderer. Linux users can now enjoy hw accelerated rendering. 2013-11-04 17:02:43 +00:00
rogerman 8c2fb6e44e types.h
- Explicitly use CPU architecture detection only for platforms that don't use autoconf. Fixes Linux build warnings. (Regression from r4824.)
2013-11-04 16:37:00 +00:00
zeromus 5f1d7492cc clean up english text for new rom streaming options 2013-11-03 21:52:18 +00:00
zeromus 7f8d2e4028 change resources.rc to ascii, since we took out the other languages. maybe this will avoid some of the problems with merging edits to the .rc file 2013-11-03 18:29:30 +00:00
rogerman b2b3a14b63 - Fix compiling for OS X Cocoa port and some other platforms. (Regression from r4821.)
- Since DeSmuME on OS X can be built for both Cocoa and CLI, revert some naming changes from r4821 for the Cocoa port specific features.
2013-11-03 03:21:26 +00:00
zeromus 79e97e339e fix windows compiling 2013-11-02 19:31:26 +00:00
thelemonman 7c62880b00 Oops, that was unintended. 2013-11-02 19:29:23 +00:00
thelemonman 4de7a417a9 Detect the host system and architecture at configure time, makes conditional compiling easier. Start the platform defines cleanup, there's still much left. Autodetect the number of cores for every platform (BSD is untested), the port mantainers should drop their own implementations. 2013-11-02 19:24:26 +00:00
rogerman 981dac038f Cocoa Port:
- Add support for the new stream loaded ROM feature.
- Update ROM loading code to latest core code.
2013-10-30 20:23:59 +00:00
thelemonman e692e05e94 Make streamed roms working for non-windows systems. 2013-10-30 11:32:11 +00:00
mtabachenko 8edec83002 core:
- add streaming ROM data from disk. I was broke all ports except windows, on linux/mac ports need fix rom_init_path in NDSSystem.cpp but i can't test this;
2013-10-28 13:18:37 +00:00
mtabachenko 76de7fc3ec - typo fix, sorry (fix NDS header and savestates works again); 2013-10-28 08:21:54 +00:00
mtabachenko cc923dc444 core:
- fix ROM serial info for DSi Enhanced ROMs;
- add some new country codes;
2013-10-28 07:53:17 +00:00
mtabachenko b782e366e2 core:
- fix ROM mask (use card size from header instead file size);
- fix read range from DS card (real DS can't read data from ROM for DSi console);
- temporary fix "write enable/disable" mc command;
2013-10-28 00:42:41 +00:00
mtabachenko c9507d2e8e core:
- remove double load/reset backup memory;
2013-10-25 22:55:50 +00:00
mtabachenko 3384b93c4a core:
- more work on backup memory handler (not finished yet, i'll be finished this coming soon);
2013-10-25 18:58:48 +00:00
mtabachenko 4ce78d5e49 core:
- more work on a backup memory stuff (fix Fokemons :) broken by me on r4807)
2013-10-23 19:00:12 +00:00
mtabachenko 68525db6d9 typo fix, sorry 2013-10-22 21:58:15 +00:00
mtabachenko f9b4229fd5 core:
- add backup size hack for Dementium II;
2013-10-20 17:19:25 +00:00
mtabachenko de36370a91 core:
- add DSi Enhanced ROM detection;
- add new country code info (O - USA);
2013-10-20 16:56:14 +00:00
mtabachenko 338077614a core:
- fix backup memory hacks;
2013-10-20 15:47:35 +00:00
mtabachenko 3dc14e59da core:
- more accurate emulation of backup chips (add emulation aux HOLD bit);
2013-10-20 12:20:44 +00:00
mtabachenko 22f814672d windows:
- fix cursor position set in memviewer;
2013-10-17 18:25:07 +00:00
mtabachenko 80547ca877 revert to 4803 2013-10-17 18:06:12 +00:00
mtabachenko 4cb1a99474 core:
- move auxspi code into slot1 device stuff;
2013-10-17 10:49:29 +00:00
mtabachenko bf58a880d1 core (slot1):
- fix typo;
2013-10-17 07:58:34 +00:00
thelemonman 0d8fc520c4 Add a post_fakeboot hook for the mcrom_debug addon too. 2013-10-15 20:57:54 +00:00
thelemonman 35706cbd97 Make libnds detect no SD in the R4 when no FAT image is selected or fails to get created. 2013-10-15 20:40:22 +00:00
thelemonman 4033c0e470 Introduce post_fakeboot hook. Switch card to normal mode after NDS_FakeBoot in a cleaner way. R4 is usable again. 2013-10-13 21:56:47 +00:00
thelemonman 960a9774e3 Don't segfault when trying to change the slot1 cart type in the cli frontend. 2013-10-13 17:46:50 +00:00
thelemonman d0e44dbaf3 Fixed a typo. 2013-10-13 10:47:33 +00:00
thelemonman fd424a1e3a Don't segfault if the specified bios files aren't found. 2013-10-12 20:29:43 +00:00
zeromus f8778ef3f2 add something, at least, in place of the deleted memset code 2013-10-08 16:53:09 +00:00
thelemonman 09ea476892 Don't memset the structures as it invaludates the string pointers. 2013-10-08 15:14:55 +00:00
zeromus b947fb3563 change sprite blending again to fix some broken scenarios in the firmware and probably others. 2013-10-05 17:56:25 +00:00
thelemonman 3acf4eb496 Jit: Take into account ofs displacement. Fixes a handful of games on Linux. 2013-10-05 13:31:34 +00:00
zeromus 7b78be0382 spriteblend test also tests whether window or bg priority logic applies first. 2013-10-03 18:24:58 +00:00
zeromus 6b8b766211 fix some sprite blending cases, regression post 0.9.9. fixes bug #1338 2013-10-03 16:52:06 +00:00
zeromus 927189550a add test for sprite blending 2013-10-03 16:50:30 +00:00
zeromus c33a11ac03 remove logic from mmu.cpp which might have been interfering MMU_VRAMmapControl() 2013-10-02 22:04:47 +00:00
zeromus 39f1b7260e revert r4787. this was already supposedly handled by MMU_VRAMmapControl(). there may still be bugs in mmu.cpp which blocked that from working 2013-10-02 22:02:52 +00:00
zeromus bc79ca81c6 add vram control register read handling 2013-10-02 20:27:24 +00:00
mtabachenko 20c2810f85 core:
- fix validate MMU registers;
2013-09-29 22:31:41 +00:00
normmatt234 04761fed6c Correctly fix the negative value in "Made In Ore". 2013-09-28 09:07:55 +00:00
mtabachenko 624252bf05 core - retail NAND:
- remove "Daigassou! Band Brothers DX (J)" from Slot1 autodetection, doesn't use then NAND flash;
2013-09-28 08:54:20 +00:00
normmatt234 36ae91938b Revert r4782 because "Daigassou! Band Brothers DX" doesn't use the nand save type. 2013-09-28 08:47:20 +00:00
mtabachenko 07d60c9da1 core - retail NAND:
- add autodetection "Daigassou! Band Brothers DX";
2013-09-28 08:20:18 +00:00
mtabachenko 274907e9b2 core - retail NAND:
- fix crash when save address is negative; (fix Made in Ore);
2013-09-28 07:42:53 +00:00
normmatt234 31697c68f8 Add "Jam with the Band" and remove region check on "WarioWare DIY" in Slot1 Retail Auto detection. 2013-09-28 06:22:23 +00:00
normmatt234 eb1f462016 Fixed writes to GCDATAIN.
Added proper NAND save emulation.
2013-09-28 06:13:04 +00:00
mtabachenko 81c063bec9 JIT:
- remove debug assertion from sync_r15 function;
2013-09-26 16:25:10 +00:00
rogerman d221b1d3d5 Cocoa Port:
- Condense the UI in DeSmuME Preferences for autoloading ROMs on startup.
- Rename the "Combo" display mode to "Dual Screen" display mode.
- Do some minor code cleanup.
2013-09-24 05:15:41 +00:00
mtabachenko 5ea6410107 winport:
- buildfix;
2013-09-21 15:06:03 +00:00
zeromus 188c53d46c fix string check in win32 cheat code 2013-09-18 21:29:18 +00:00
mtabachenko fcb8551d4f - revert some part to r4771; 2013-09-18 19:59:22 +00:00
mtabachenko 7d6b1db97b fix typos 2013-09-16 17:43:21 +00:00
mtabachenko 1cde7d498d - fix warnings; 2013-09-16 17:10:51 +00:00
mtabachenko 4d95474f92 JIT:
- merge OP_BL in thumb mode;

winport:
- update SVN tools;
2013-09-16 08:03:52 +00:00
mtabachenko 45658d4543 core:
- add more info when write to undefined Registers;
2013-09-15 16:52:19 +00:00
mtabachenko e0a2a6f8a2 core:
- discard writings to undefined MMU registers;
2013-09-15 14:35:08 +00:00
jsteffens 7a5efe8828 purge WX from the project 2013-09-14 19:49:03 +00:00
zeromus b39a54ab57 goodbye, wxdlg 2013-09-14 19:37:36 +00:00
zeromus 07a3cd6483 gpu-low impact bugfix to coloreffect up/down. just a tweak to the previous re-engineering which seems to still be holding up. 2013-09-14 18:22:33 +00:00
mtabachenko 24c2460715 winport - nitroFS viewer:
- add simply quick viewer selected file;
2013-09-13 22:00:47 +00:00
mtabachenko 4772a0b427 - suppress MC command messages; 2013-09-13 09:11:18 +00:00
zeromus baaddef970 remove wx and libelf/libdwarf code which wasnt going anywhere 2013-09-11 20:47:16 +00:00
mtheall bb40b69791 add intltoolize as a prereq before running autogen.sh on Linux 2013-09-11 19:24:18 +00:00
mtabachenko 249691f817 winport:
- fix typo in slot1 dialog config;
2013-09-10 17:46:55 +00:00
mtabachenko 7be35134be JIT:
- fix flags bug in MULxx instructions (fix bug #1333);
2013-09-10 10:22:25 +00:00
mtabachenko 2c7b47be4e - fix wrong file names in NitroFS (fix bug#1337) 2013-09-10 09:11:52 +00:00
rogerman 3cff5390f8 Cocoa Port:
- New feature: If the user quits DeSmuME while display windows remain, the user has the option to restore the display windows on app launch.
2013-09-07 23:03:42 +00:00
rogerman d9d41b5a96 videofilter:
- Add one layer of abstraction to the thread synchronization code.
- By doing this abstraction, this code has been made compatible with Windows.
2013-09-04 05:11:49 +00:00
rogerman 5d26046bc6 videofilter:
- Minor code refactoring and cleanup.
2013-09-03 20:24:56 +00:00
rogerman e339d4c767 Cocoa Port:
- Fix building for all Xcode projects. (Regression from r4739).
2013-09-03 18:40:50 +00:00
zeromus 8d45169345 boot processors into thumb mode correctly; fixes some games that hang immediately after loading 2013-09-02 20:42:28 +00:00
jsteffens 7d359a2be5 Fix linux build 2013-09-01 14:01:15 +00:00
mtabachenko c19e4d2b94 winport - NitroFS viewer:
- fix double click bug on folders;
2013-09-01 11:53:00 +00:00
mtabachenko 966f44785b winport:
- fix typo (allow edit ROM in Memory Viewer);
2013-09-01 09:35:28 +00:00
mtabachenko 0794fc29fa winport - NitroFS viewer:
- add file viewer;
2013-09-01 09:02:13 +00:00
zeromus 0da83b5a4a fix fsnitroView building on old SDK versions 2013-08-31 20:01:54 +00:00
mtabachenko 9ac50c5b85 winport:
- fix application icon;
2013-08-31 19:54:12 +00:00
mtabachenko 8dc662eb8b winport:
- forgot .ico files on my latest commit;
2013-08-31 19:40:39 +00:00
mtabachenko ddc10231ef winport:
- add NitroFS viewer;
2013-08-31 19:34:10 +00:00
zeromus bc61000d9a some cleanup in boot process 2013-08-31 19:23:28 +00:00
zeromus 4baad291dc clarify chipId checks and fake booting 2013-08-31 18:51:09 +00:00
zeromus dd56e6c231 slot-1 savestates 2013-08-31 18:30:09 +00:00
mtabachenko 7555d69e9e winport:
- added selecting a path to internal files in ROM on PC disk for Slot1 Debug;
2013-08-31 09:14:23 +00:00
mtabachenko 9935052acc - linux buildfix;
- add game code of "Made in Ore" for Slot1 auto selection;
2013-08-31 07:31:08 +00:00
jsteffens 85675ca0ab Fix linux build 2013-08-31 07:25:40 +00:00
mtabachenko 89606483cc core:
- first implementation a slot1 debugger (for debug reading files from game card, romhacking and fan-made translations);
2013-08-31 00:32:59 +00:00
rogerman e62995291a Cocoa Port:
- Fix building for all Xcode projects. (Regression from r4731).

Core:
- Fix include path in slot1comp_protocol.cpp. (Regression from r4731).
- Remove strongly-typed enum in MMU.h for compilers configured to build for (or can only support) C99. (Regression from r4731).
2013-08-28 23:08:51 +00:00
mtabachenko 7b9e626597 winport:
- fix bug on save console position;
- add pause key handler in console;
- add skip "Ctrl+C", "Ctrl+Break" events in console;
2013-08-28 20:33:46 +00:00
zeromus f237eeb0f7 fix mess in GC controllers.. apparently more of it than i thought is duplicated across the two CPUs. games and banners properly booting now. 2013-08-28 18:25:38 +00:00
zeromus b18a4af885 a bit of slot-1 stuff cleanup.. things are still pretty broken though. 2013-08-28 15:26:01 +00:00
zeromus 0ec8ea7282 fix some assorted slot-1 stuff 2013-08-28 08:01:47 +00:00
zeromus d9f04eae64 remove my little RTC hack 2013-08-28 07:10:33 +00:00
zeromus 2ddb2daf3c reinstall the R4 device. its probably severely broken. need to rehabilitate it more. 2013-08-28 07:06:12 +00:00
zeromus e0d02ddda2 massive slot-1 reorganization and code cleanup 2013-08-28 06:48:05 +00:00
mtabachenko b464ea0461 winport:
- add save console window position;
2013-08-26 23:43:32 +00:00
mtabachenko 31a9cb55de winport:
- reorganize about dialog, again :)
- remove "view 3D" from menu;
- fix slot1 dialog OK button;
2013-08-26 20:20:26 +00:00
pengvado 04b78849b7 JIT x86_32 linux:
fix calling convention when calling ordinary C functions from asm
2013-08-25 16:24:10 +00:00
mtabachenko d5ccf2939c core:
- add hack for firmware boot in JIT mode (JIT block size change to 12 until finish firmware boot process);
2013-08-23 14:31:06 +00:00
rogerman c739c7ab32 Cocoa Port:
- Fix building for all Xcode projects. (Regression from r4723).
- Add support for "Retail (Auto-detect) and "Standard Retail Memory Card + ROM" devices in the SLOT-1 Manager.

General:
- Fix compiler warnings in bios.cpp. (Regression from r4722).
- Fix include path in advanscene.cpp. (Regression from r4723).
- Fix compiling when using GCC and Clang. (Regression from r4692).
2013-08-22 07:20:28 +00:00
mtabachenko f95635f998 - added list of games with NAND Flash (in slot1_retail_nand.cpp); 2013-08-21 12:02:42 +00:00
mtabachenko 58483225d0 - linux buildfix; 2013-08-20 12:40:05 +00:00
zeromus 0924555303 reorganize slot-1, firmware, MC, advanscene code to provide a more modular and less crufty development environment 2013-08-20 06:57:03 +00:00
mtabachenko 4238ad7e97 core:
- add size of ROM to chipID;
2013-08-17 14:49:13 +00:00
mtabachenko 8814b24a48 firmware:
- add save WiFi settings;
2013-08-12 20:56:44 +00:00
mtabachenko 93b1192365 core:
- fix save firmware user settings;
2013-08-12 18:15:17 +00:00
zeromus bff45b34f8 bios-fix bugs in huffman HLE 2013-08-12 17:18:21 +00:00
mtabachenko 68be9026c0 core:
- fix boot games without real firmware (tested on Contra 4);
2013-08-12 16:13:31 +00:00
mtabachenko 3a3179a1b3 core:
- now firmware boot works when enabled JIT (JIT max block should be less 13);
2013-08-12 15:45:38 +00:00
zeromus a850bc64d3 fix HLE BitUnPack and clarify historical crc16 bugs. 2013-08-12 06:08:57 +00:00
zeromus b18f284799 clarification to chipId in retail slot-1 device 2013-08-12 05:44:05 +00:00
zeromus 03bdecc899 clean up fake bios definition (add some asm comments and merge old codepaths); fix SWI3 patch on arm7; fix disassembler to be able to view arm7 bios (bios protection logic had crept in to interfere) 2013-08-11 20:38:40 +00:00
zeromus d4bc8227a4 fix SWI HLE fail to boot from firmware regression from r4705 2013-08-11 19:20:53 +00:00
zeromus 590acba412 refactor slot-1 to object oriented interface; clean up and clarify a lot of firmware boot process and card-eject handling stuff. I probably broke some things, but I'm in the mood lately to tidy it up as soon as anyone notices 2013-08-11 19:06:27 +00:00
mtabachenko 5e0b720c9d fix linux build 2013-08-11 16:55:39 +00:00
mtabachenko 8248128cde core:
- remove old boot code
2013-08-11 16:46:33 +00:00
zeromus c8a4dd3037 bios cleanup 2013-08-11 06:17:18 +00:00
mtabachenko 57ae659145 core:
- rewrite load/save firmware User Settings from/to external file (.dfc);
2013-08-10 19:56:23 +00:00
mtabachenko 44898881ca new boot:
- now boot unencrypted ROMs from firmware;
2013-08-10 18:35:56 +00:00
mtabachenko 6ff5f84243 new boot:
- fix some bugs and removed DMA hack. now games boot fine from firmware, but supported only ROMs with encrypted Secure Area (i will fix it later);
2013-08-10 18:09:16 +00:00
zeromus b64746f7a4 cleanup bios Diff functions a little bit and fix some errors 2013-08-10 17:25:12 +00:00
mtabachenko d9fd89c4f8 fix linux build 2013-08-10 17:09:36 +00:00
mtabachenko 7a28e26a98 opps, forget a file 2013-08-09 23:13:40 +00:00
mtabachenko 243cadb4cd JIT:
- fix OP_MCR (fix a delay boot M&L:PiT and SPP on x64 PGO build);
2013-08-09 23:08:13 +00:00
zeromus 8184770cd5 gpu-fix a little bug from last commit 2013-08-07 04:46:43 +00:00
zeromus 99add0a870 gpu-fix some bugs in sprite blending. fixes much ui in fossil fighters. 2013-08-06 18:36:49 +00:00
mtabachenko f8f19fd419 winport:
- upgrade SVN utils to 1.8.1.24570 (SubWCRev);
2013-07-31 17:05:26 +00:00
mtabachenko 82cae0c168 new boot:
- fix command "get secure area" from DS card to RAM;
2013-07-31 16:45:32 +00:00
rogerman 7f1805dcc7 NDSSystem:
- Fix compiler error for Clang (and possibly others): "goto into protected scope". (Regression from r4696.)
2013-07-30 00:09:55 +00:00
mtabachenko bce045de58 new boot:
- refactoring old boot code;
2013-07-29 10:16:34 +00:00
mtabachenko 42705efde7 new boot:
- forgot file;
2013-07-28 23:36:36 +00:00
mtabachenko 075131da3a new boot:
- remove hack in halt mode;
- some work on secure area decrypt;
2013-07-28 23:34:17 +00:00
mtabachenko 0468380d12 new boot:
- refactoring code;
2013-07-26 08:24:38 +00:00
mtabachenko ef6daf9c10 core:
- added part a new boot code (not finished yet and disabled by default).
entry point ARM CPUs set to xxxx0000h and now booting a firmware from BIOS as on a real DS.
all versions iQue and DS (patched with FlashME too) firmware works now, but can't run a games from firmware yet.
2013-07-26 01:31:58 +00:00
mtabachenko 06a70e4b0a JIT:
- a bit optimized OP_BX_THUMB (with Rm=R15);
2013-07-18 12:56:30 +00:00
mtabachenko 42f5338e56 JIT:
- fix firmware boot broken in r4689;
2013-07-18 08:16:26 +00:00
mtabachenko 53ff80b635 JIT:
- fix bug in OP_BX_THUMB when Rm=15 (fix bug #1310 "Shiren the Wanderer 4: crashed");
2013-07-18 06:45:09 +00:00
mtabachenko 98d9290a22 core:
- fix typo;
2013-07-17 09:43:21 +00:00
rogerman e7c4293591 Cocoa Port:
- Fix Cocoa port builds. (Regression from r4685.)
2013-07-09 21:24:59 +00:00
mtabachenko c97207b8d4 core:
- fix boot firmware when no cartridge in slot1;
2013-07-09 07:54:51 +00:00
mtabachenko 822cf3d289 core:
- refactoring for new boot code;
2013-07-08 18:53:10 +00:00
mtabachenko 65af9c2df5 winport:
- change url to new cheats database updates;
2013-07-06 16:07:34 +00:00
mtabachenko 0e7a62002c winport:
- add range checks for cheats database mode when it load from config file;;
2013-07-06 14:34:36 +00:00
mtabachenko 6c3b7c1762 - fix x64 build; 2013-07-05 13:13:53 +00:00
zeromus dd36fd2d3a win32-fix more screen layout errors, this time in horizontal lcd layout 2013-06-30 03:09:54 +00:00
zeromus 0a6ccebaf7 texcache-fix bug which made stale 4x4 textures stick around when the palette memory had changed 2013-06-28 19:39:28 +00:00
zeromus 8b4b729d07 fix bugs in savestate header checks; refactor how header is loaded from rom to be less offensive. 2013-06-28 18:02:57 +00:00
rogerman 56130bec27 Cocoa Port:
- Actually use -Ofast and -fvectorize in the Xcode 5 project.
- Replace data type unsigned int with size_t where appropriate.
- Do some minor code cleanup.
2013-06-26 04:53:22 +00:00
zeromus 2469ecb419 change something about edge marking which made no sense to me, re: picross edge marking #1301. if we can find more evidence about this topic, write it in the comments 2013-06-20 15:49:07 +00:00
rogerman 593d82ca2b videofilter.cpp:
- Replace data type unsigned int with size_t where appropriate.
- In the VideoFilter ctor, now require srcWidth and srcHeight to be specified.
- Be more conservative when generating SSurface structs.
2013-06-19 15:54:59 +00:00
rogerman 5e18fe732d Cocoa Port:
- Add Xcode 5 project, based on the Xcode 5 Developer Preview.
- This project is identical with the Xcode 4 project, except that it now uses -Ofast instead of -O3, and also adds the -fvectorize optimization.
2013-06-19 04:12:53 +00:00
rogerman cf9a25a8ba Cocoa Port:
- Use Relax IEEE Compliance (-ffast-math) optimization for all builds on all projects.
- Use Enforce Strict Aliasing (-fstrict-aliasing) optimization for all Debug builds on the Xcode 3 and Legacy projects.
2013-06-19 02:47:45 +00:00
mtabachenko c1cfbe4556 JIT:
- fix bug in SMLAL instruction (fix Diddy Kong Racing DS player falls);
- fix bug in LDR instruction when Rd=15 (fix boot GTA Chinatown wars);
2013-06-17 13:04:06 +00:00
zeromus 2bd54afffb win32-when being run from a subdirectory of %temp%, store user files in local appdata, in effort to shut up remaining pokemon gamers running desmume from zipfiles. 2013-06-08 06:01:17 +00:00
zeromus fa5d62b740 change the way paths are generated for roms contained in subdirectories of archives so that the battery data etc. doesnt get lost 2013-06-08 02:29:53 +00:00
zeromus 60d899b335 win32- revert r4666 (remove FEX to static library), since it isnt working right at all. In fact, it is very difficult to get working. We probably need to build a vc10 and vc7 version independently, or remove std::string use from Zip_Extractor; or, have a good reason for doing any of this work to begin with. 2013-06-04 16:28:36 +00:00
mtabachenko f1d7c895c6 winport:
- removing duplicate addresses from list in memview tool;
2013-05-29 15:09:32 +00:00
mtabachenko 392715f053 winport:
- fixed sort saved address in memview tool;
2013-05-29 13:14:40 +00:00
mtabachenko 5aa87df570 winport:
- typo fix in memview tool;
2013-05-29 13:02:06 +00:00
mtabachenko 0b84b68b4b winport:
- moved file extractor from projects to VS .lib;
2013-05-29 11:46:17 +00:00
mtabachenko 0bdfe338b7 core:
- initialize fake firmware user settings on NDS reset when not using external firmware;
winport:
- using global structure for fake firmware user settings;
2013-05-29 10:13:06 +00:00
mtabachenko abd0aef26f winport:
- small optimization memview tool;
2013-05-28 18:31:30 +00:00
mtabachenko d7b92c0840 winport:
- add memory viewer features (navigate using a keyboard, toggle view all ASCII chars, saving latest 20 addresses to ini-file, go to address on [ENTER] key hit..)
2013-05-28 17:58:33 +00:00
mtabachenko 0567969202 - fix bugs in import save; 2013-05-27 18:37:40 +00:00
mtabachenko eb3831d4fe - fix another bug in import save dialog; 2013-05-27 17:31:04 +00:00
mtabachenko 672f466fef winport:
- fixed advanscene info in import save dialog;
2013-05-27 17:23:10 +00:00
mtabachenko 3e0452053a 2013-05-27 16:38:13 +00:00
mtabachenko 98c0065807 - typo fix, sorry 2013-05-27 16:27:17 +00:00
mtabachenko 59bac06efe - revert r4643 2013-05-27 16:25:35 +00:00
mtabachenko 65b31c7ad6 - fix advanscene save size detect and description in console; 2013-05-27 16:04:14 +00:00
mtabachenko 3896bf18c8 core:
- fix SPI bug. allow 8bit write to data/command;
2013-05-27 13:26:12 +00:00
zeromus 69edb2cb7f dont emit giant data tables of std::strings into 100% of source files 2013-05-27 07:22:42 +00:00
mtabachenko 26db9ee640 winport:
- revert application main icon removed in r4647;
2013-05-26 07:55:42 +00:00
zeromus 8462ea6618 win32-fix various bugs when fullscreen mode toggles off which leave the window in a different size than the original 2013-05-24 09:29:52 +00:00
zeromus a093258ec2 win32-add Pad To Integer view menu option, for help when maximizing or fullscreening to keep from distorting the image non-integerly 2013-05-24 08:47:31 +00:00
yabause 7a160accc7 Added missing stdarg.h include 2013-05-22 19:59:48 +00:00
rogerman 0e4e74d8f7 Cocoa Port (OpenEmu Plug-in):
- Fix possible crash on emulation reset.
2013-05-22 01:09:17 +00:00
zeromus 3835544919 add hacks for certain games whose save size autodetection is always doomed to fail 2013-05-21 20:07:47 +00:00
zeromus bea761c04e win32-remove some crap about alternate ui languages which was left in. the translated uis are doomed to be stale forever. history has proven it. the win32 resource system of making translated uis is a poor fit for the open source development model, designed instead of businesses taking things seriously. 2013-05-21 02:08:36 +00:00
rogerman 1b5d34dedb Cocoa Port:
- Fix bug where HID analog inputs would fail to off-state in the upper value range.
2013-05-17 17:06:25 +00:00
mtabachenko 01756f15f4 winport:
- fix app. crash on some systems introduced in r4643;
2013-05-15 18:03:31 +00:00
mtabachenko 42b51f4e45 - add checks savestate ROM header data with loaded ROM header; 2013-05-13 08:08:19 +00:00
mtabachenko 997be2f2a2 winport:
- disable render screen when emulation is paused;
- add loading screen;
2013-05-12 18:05:28 +00:00
rogerman 23b2f9b693 Cocoa Port:
- Use game developer names instead of raw maker codes.
2013-05-11 18:52:08 +00:00
rogerman e0f7643648 Cocoa Port:
- Fix compiling on Xcode 3 build targets.
2013-05-11 18:38:34 +00:00
mtabachenko 0444abb7b3 - add game developer codes; 2013-05-11 13:48:18 +00:00
mtabachenko be8d5288ee - add platform independent message dialog; 2013-05-11 11:53:21 +00:00
mtabachenko 09c8027d69 - write rom header to savestate; 2013-05-11 11:05:54 +00:00
rogerman 41f4653ea0 Cocoa Port:
- New feature: Displays can be individually set to full screen mode or windowed mode. This feature is multiple monitor aware.
2013-05-10 06:38:39 +00:00
rogerman bd55aae699 Cocoa Port:
- Fix bug where using an input mapped Set Speed control did not properly reset the execution speed if the Set Speed Limit slider was previously used.
- Move the display window related methods from the EmuControllerDelegate to DisplayWindowController.
2013-05-05 05:44:47 +00:00
rogerman 5b6ab8049e Cocoa Port:
- Fix bug where the SLOT-1 R4 directory path wasn't being saved properly.
- Fix bug where loading an external audio file with a sample rate less than 16000 Hz would cause a crash.
- Fix bug where creating a new display window with a default display mode of Main or Touch would cause the display window to draw incorrectly.
2013-05-05 00:57:04 +00:00
zeromus bf35d0af3f win32-save opengl filter option 2013-05-03 20:29:14 +00:00
yabause a0adb77ed5 Fixed make distcheck 2013-05-01 21:15:11 +00:00
rogerman 75827a1700 Cocoa Port:
- Update all info .plist files to v0.9.10 for future SVN builds.
2013-04-30 20:58:05 +00:00
zeromus 61544e807e next version is 0.9.10. get over it. 2013-04-30 18:45:52 +00:00
zeromus 66a9a09483 re-fix advanscene import to use the file that was intended, which always has serial numbers 2013-04-30 17:53:58 +00:00
zeromus faf39c8f52 fix advanscene import 2013-04-28 05:48:15 +00:00
zeromus 2a71904419 fix changelog 2013-04-28 05:47:27 +00:00
mtabachenko 142cd2e31a - typo fix in changelog; 2013-04-27 20:23:15 +00:00
mtabachenko 4739cf9a38 - update change log; 2013-04-27 19:29:37 +00:00
3552 changed files with 612175 additions and 587210 deletions

View File

@ -0,0 +1,19 @@
---
name: New Issue, Bug report, Question
about: New Issue, Bug report, Question
title: ''
labels: ''
assignees: ''
---
## State your operating system:
Windows/Mac/Linux. in case of linux, whether you use CLI, gtk2, or gtk3 version.
## DesMuME version
e.g. 0.9.13 or git master
## Isse
type here what's bothering you, in a detailed manner.

80
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,80 @@
name: DeSmuME
on:
- push
- pull_request
jobs:
build:
name: Build DeSmuME (Linux)
runs-on: ubuntu-24.04
steps:
- name: checkout
uses: actions/checkout@v4
- name: install dependencies
run: sudo apt update && sudo apt install meson libsdl2-dev libpcap-dev libgtk-3-dev
- name: meson
run: |
cd desmume/src/frontend/posix/
meson build
- name: ninja
run: ninja -C desmume/src/frontend/posix/build
build_gtk2:
name: Build DeSmuME (Linux/GTK+2)
runs-on: ubuntu-24.04
steps:
- name: checkout
uses: actions/checkout@v4
- name: install dependencies
run: sudo apt update && sudo apt install autoconf libglu1-mesa-dev libsdl2-dev libpcap-dev libgtk2.0-dev
- name: buildit
run: |
cd desmume/src/frontend/posix/
autoreconf -i
./configure --prefix=/usr --enable-gdb-stub --enable-wifi
make -j8
make DESTDIR=/tmp/DeSmuME install
- name: Pack artifact
run: |
cd /tmp
tar cJf DeSmuME.tar.xz DeSmuME/
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: desmume-linux-gtk2-cli-x86_64
path: /tmp/DeSmuME.tar.xz
build_macos:
name: Build DeSmuME (macOS)
runs-on: macos-14
steps:
- name: checkout
uses: actions/checkout@v4
- name: xcodebuild
run: |
cd desmume/src/frontend/cocoa/
xcodebuild archive -project "DeSmuME (Latest).xcodeproj" -scheme "DeSmuME (macOS App; Intel64 -- Latest Xcode)" -arch x86_64 -archivePath "$(pwd)/desmume.xcarchive" | xcpretty -c
- name: make zip
run: |
cd desmume/src/frontend/cocoa/desmume.xcarchive/Products/Applications/
7z a DeSmuME.app.zip DeSmuME.app
- name: Upload artifict
uses: actions/upload-artifact@v4
with:
name: macos
path: desmume/src/frontend/cocoa/desmume.xcarchive/Products/Applications/DeSmuME.app.zip
if-no-files-found: error

87
.github/workflows/build_interface.yml vendored Normal file
View File

@ -0,0 +1,87 @@
name: DeSmuME Interface (DLL/SO)
on:
- push
- pull_request
jobs:
build_linux:
runs-on: ubuntu-24.04
name: Build Linux
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt update && sudo apt install meson libsdl2-dev libpcap-dev
- name: Build - Meson
run: |
cd desmume/src/frontend/interface/
meson build
- name: Build - ninja
run: ninja -C desmume/src/frontend/interface/build
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: linux
path: desmume/src/frontend/interface/build/libdesmume.so
build_macos:
runs-on: macos-14
name: Build MacOS
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install MacOS build deps
run: brew install coreutils sdl2 meson
- name: Build - Meson
run: |
cd desmume/src/frontend/interface/
meson build
env:
CC: clang
CXX: clang++
- name: Build - ninja
run: ninja -C desmume/src/frontend/interface/build
env:
CC: clang
CXX: clang++
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: macos
path: desmume/src/frontend/interface/build/libdesmume.dylib
build_windows:
runs-on: windows-2022
name: Build Windows
strategy:
fail-fast: false
matrix:
arch: [ 'x64', 'x86' ]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
with:
msbuild-architecture: ${{ matrix.arch }}
- name: Build
run: |
cd desmume\src\frontend\interface\windows
MSBuild.exe DeSmuME_Interface.vcxproj /p:configuration="Release Fastbuild" /p:Platform=${{ matrix.arch }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: win-${{ matrix.arch }}
path: desmume/src/frontend/interface/windows/__bins/*.dll

30
.github/workflows/build_win.yml vendored Normal file
View File

@ -0,0 +1,30 @@
name: DeSmuME Windows build
on:
- push
- pull_request
jobs:
build-sln:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v2
with:
msbuild-architecture: x64
- name: Build solution
run: |
SET CL=-Wno-c++11-narrowing
msbuild 'desmume/src/frontend/windows/DeSmuME.sln' /p:configuration="Release" /p:platform=x64 /p:CL_cgthreads=1 /p:CLToolExe=clang-cl.exe
cmd /c desmume\src\frontend\windows\ci_postbuild.bat
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: desmume-win-x64
path: desmume/src/frontend/windows/__bins/*.exe

43
.github/workflows/release_tarball.yml vendored Normal file
View File

@ -0,0 +1,43 @@
name: Generate Source Tarball
# Trigger whenever a release is created
on:
release:
types:
- created
jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: archive
id: archive
run: |
THISDIR="$PWD"
cd desmume/src/frontend/posix
autoreconf -i
cd "$THISDIR"
VERSION=$(printf "%s\n" ${{ github.event.release.tag_name }} | sed -e 's/^release_//' -e 's/_/./g')
PKGNAME="desmume-$VERSION"
mkdir -p /tmp/$PKGNAME
mv * /tmp/$PKGNAME
mv /tmp/$PKGNAME .
TARBALL=$PKGNAME.tar.xz
tar cJf $TARBALL $PKGNAME
echo "::set-output name=tarball::$TARBALL"
- name: upload tarball
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./${{ steps.archive.outputs.tarball }}
asset_name: ${{ steps.archive.outputs.tarball }}
asset_content_type: application/x-xz

77
.gitignore vendored Normal file
View File

@ -0,0 +1,77 @@
/desmume/src/scmrev.h
/desmume/src/frontend/windows/defaultconfig/scmrev.h
/desmume/src/frontend/windows/.libs
/desmume/src/frontend/windows/.obj
/desmume/src/frontend/windows/__bins
/desmume/src/frontend/windows/*.tlog
/desmume/src/frontend/windows/*.aps
.vs/
*.user
*.suo
*.VC.db
*.VC.opendb
*.o
*.ipch
.deps
*.dirstamp
Makefile.in
/desmume/src/frontend/posix/missing
/desmume/src/frontend/posix/*.a
/desmume/src/frontend/posix/autom4te.cache
/desmume/src/frontend/posix/Makefile
/desmume/src/frontend/posix/aclocal.m4
/desmume/src/frontend/posix/configure
/desmume/src/frontend/posix/cli/Makefile
/desmume/src/frontend/posix/cli/desmume-cli
/desmume/src/frontend/posix/cli/doc/Makefile
/desmume/src/frontend/posix/compile
/desmume/src/frontend/posix/config.guess
/desmume/src/frontend/posix/config.log
/desmume/src/frontend/posix/config.status
/desmume/src/frontend/posix/config.sub
/desmume/src/frontend/posix/depcomp
/desmume/src/frontend/posix/gtk/Makefile
/desmume/src/frontend/posix/gtk/desmume
/desmume/src/frontend/posix/gtk/doc/Makefile
/desmume/src/frontend/posix/gtk-glade/Makefile
/desmume/src/frontend/posix/gtk-glade/desmume-glade
/desmume/src/frontend/posix/gtk-glade/doc/Makefile
/desmume/src/frontend/posix/install-sh
/desmume/src/frontend/cocoa/openemu/OpenEmuBase.framework/
/desmume/src/frontend/cocoa/OptimizationProfiles/
# Xcode
## Build generated
build/
DerivedData/
## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/
.vs/ProjectSettings.json
## Other
*.moved-aside
*.xcuserstate
*.xcscmblueprint
## Obj-C/Swift specific
*.hmap
*.ipa
*.dSYM.zip
*.dSYM
## Eclipse CDT generated files
/.autotools
/.cproject
/config.log
/.project
.DS_Store

6
README.md Normal file
View File

@ -0,0 +1,6 @@
# DeSmuME
[![AppVeyor CI Build Status](https://ci.appveyor.com/api/projects/status/abfd7jm09wnmxyvu?svg=true)](https://ci.appveyor.com/project/zeromus/desmume)
DeSmuME is a Nintendo DS emulator.
http://desmume.org/download

View File

@ -6,15 +6,12 @@ Current team
------------
Guillaume Duhamel
Normmatt
Bernat Muñoz (shash)
Riccardo Magliocchetti
Max Tabachenko (CrazyMax)
zeromus
rogerman
Luigi__
Contributors
------------
Bernat Muńoz (shash)
Allustar
amponzi
Anthony Molinaro
@ -40,9 +37,14 @@ WinterMute
pengvado
dormito
ldesnogue
Thanks to our super testers for this release
------------
mtheall
thelemonman
nash679
pokefan999
dottorleo
yki
Luigi__
CrazyMax
Riccardo Magliocchetti
CyberWarriorX
mic

View File

@ -1,4 +1,203 @@
0.9.8 -> 0.9.9 (r4228-r4591-r4xxx)
0.9.12 -> 0.9.13
In this version we have added support for high-resolution 3D rendering. Try the new "GPU Scaling Factor" feature to
increase the 3D resolution beyond the native resolution of 256x192 pixels. Also, the Cocoa frontend sees continued
radical enhancements and while the Windows frontend sees some new incremental enhancements.
General/Core:
bug: numerous host compatibility and accuracy improvements to OpenGL renderer, tho off-by-1 sampling bugs will remain.
bug: fixes to 'edge marking', shadows, box tests, maths & depths precision, and some other rarer 3d rendering usecases
bug: fixes to AR cheat processing
bug: fixes to cheat database game identification
bug: fix interpolation at SPU loop points, emulation of SPU half/byte size registers & others
bug: backlight emulation added (for fade effects)
bug: other small ongoing fixes to 2d rendering and GPU memory maps
bug: emulate slot-1 read timings, probably for AP-related purposes
bug: general improvement to hardware component power-off state handling, especially 3d engine
bug: fix virtual fat (homebrew) building in environment with symlinks
bug: fix some rarely-bugged CPU instructions
bug: fix bugs in homebrew filesystems
bug: fix bugs in big-endian hosts
bug: fix loading gzipped files and some newer rars
bug: fix inconsistencies and omissions in command-line processing
bug: extensive improvement to wifi emulation, though wifi is still not supported.
bug: firmware file settings/management now behaves more or less sensibly as advertised
bug: fix movie (dsm) being bitrotted and failing to sync settings or manage sram properly
enh: movie (dsm) add record from state feature
enh: high-resolution 3d rendering, from 1x-16x the native resolution of 256x192 pixels
enh: texture upscaling for 3d rendering, from 1x-4x the native texture size
enh: texture smoothing option for OpenGL renderer
enh: user-selectable internal GPU bpp 15/18/24 to change from accuracy to attractiveness
enh: game-specific hacks library finally implemented internally, user-selectable.
enh: game-specific hack for popular games that randomly corrupt their sprites when going in and out of doors
enh: officially supported arm and arm64 jits and overall improvements on arm hosts
enh: emulator now makes "(backups)" states on every loadstate, for in case you hit loadstate on accident
enh: User-selectable MSAA level for OpenGL renderer.
enh: "interface" for dll/so control of a desmume core
enh: optimizations, cpu arch-specific, and otherwise, to all 3d and 2d rendering, ranging from SSE to AVX2
enh: lua - Add raw joystick API and setlayermask API (windows only)
enh: lua - Add gamecode APU for game-specific hacks in scripts and 'freelook' script functionality
enh: add options to emulate game cards more badly, to trip AP on purpose
enh: fix some save type / slot type autodetections and save memory import codepaths
enh: add fake impossible debug AR code to select CPU: DFFFFFFF 77777777/99999999
enh: add --rtc-day and --rtc-hour to specify an offset from host RTC
enh: support newer duc files
enh: upgrade and add some upscalers, hq3x, 6xBRZ, etc.
enh: add "interface" frontend for use via dll/so
Windows:
note: windows xp and x86 support is dropped for official builds. windows 7 support will be dropped over my dead body.
bug: fix numerous bugs involving filenames and path with non-latin characters
bug: fix bugs in various display layout, rotate, vsync, gaps, and display method configurations
bug: fix bugs in user configured paths
bug: aviout/wavout is now more robust
bug: fix bugs in window clearing and various display method configurations which leave garbage on screen
enh: add fullscreen display options
enh: major revisions to mic sample feature, loaded as a bunch and rotated with hotkeys
enh: add user-facing option to control console window visibility
enh: add some crude capability for breakpoints to cpu debugger and memory viewer, and other bugfixes
enh: add "screen size ratio" for smaller sub-screens, etc.
enh: add some hotkeys
enh: add option to kill stylus input when outside the NDS screen
enh: improve cheat list UX
enh: optimizations to reduce cpu usage overall and during idle especially for high resolutions, scalers, etc.
enh: improve pen&touch support
Cocoa:
bug: fix issues with v-sync causing frame rate issues under various circumstances
bug: fix issues when running a display window in fullscreen
enh: add native binary support for Apple Silicon CPUs
enh: Macs with an Intel Haswell or later CPU now benefit from the new AVX2 optimizations
enh: add support for Apple's Dark Mode user interface introduced in macOS Mojave
enh: add some new toolbar items for the following: Frame Advance, Enable/Disable HUD, Toggle Displays
enh: turbo inputs can now be configured with a frame-by-frame press/release pattern
enh: display windows now run their video output using Metal, if available
enh: display windows now support HiDPI monitors like Apple's Retina monitors
enh: display windows have new "Hybrid" layouts for better fit on modern widescreen monitors (View > Display Layout)
enh: display windows can now change the video source going to each individual DS screen (View > Display Video Source)
enh: display windows can now run a Heads-Up Display for reporting useful info (View > Show HUD Settings)
enh: add support for changing the NDS stylus pressure (Emulation > Show Stylus Settings)
enh: screenshots can now be captured using a dedicated tool for it (Tools > Show Screenshot Capture Tool)
enh: lots of miscellaneous stability and performance improvements
Linux:
note: SDL2 now employed
note: GTK3 port added, built with meson
note: CLI and GTK ports improved, according to their respective niche (gaming vs functionality)
note: CLI: added horizontal screen layout
note: CLI: added floating-point scale factor support with HW stretching
note: CLI/GTK2: improved gdb stub for game debugging
note: CLI/GTK2/GTK3: various other improvements
0.9.11 -> 0.9.12
We decided to start skipping even versions to disambiguate official releases from several years of interim builds,
and to insulate ourselves from consideration for world record of "longest time between consecutive releases" by
creating confusion as to what constitutes a consecutive release.
0.9.10 -> 0.9.11 (r4908-r5146)
In this version, we have focused on the Cocoa frontend, but there have been some good core fixes over so long.
Notably, the save-related issues resulting in the advice "dont use 0.9.10" have been resolved.
General/Core:
bug: fix large numbers of games not being able to save anymore
bug: fix some missing sound effects due to wrong volumes in some boot scenarios and other things
bug: fix freezes due to tiny looping sounds
bug: fix many big endian issues
bug: fix some apparently rarely-used CPU instructions, no known consequences
bug: fix (block) reading of some GPU registers
bug: fix action replay code type 0xE
bug: fix reading of last 4 bytes of rom
bug: large improvements to stability of GDB stub
bug: support w-buffer support in OpenGL renderers
bug: fix unpredictable crashes in some 3d scenes from w=0
enh: better loading of roms (bad patches) with wrong size info in header
enh: warn user sometimes when 'stream rom from disk' will create malfunctions
enh: add xBRZ filters
enh: add "TXT Hack" for software rasterizer to improve text rendering in some games
Windows:
bug: fix 5x filters
enh: support import of action replay save files (.dss)
enh: add antialiasing option for OpenGL renderers
enh: don't malfunction if saveram is unavailable or read-only
Cocoa:
bug: 16-bit to 32-bit color space conversions no longer darken video or images
bug: fix intermittent issues with loading user defaults on app startup
bug: fix rendering inaccuracies of the video preview in the app display preferences
bug: fix various UI font rendering and text alignment issues on OS X Yosemite
bug: fix crackly sound from N-sync and Z-sync methods
enh: make N-sync method the default sound sync method since it has much lower latency than P-sync method
enh: add support for gdbstub (Tools > Show GDB Stub Control) (only available on custom builds using the dev+ build target)
enh: optimize input handling to use less CPU
enh: add support for App Nap when the app is in an idle state (only supported on OS X Mavericks and later)
enh: add Execution Control panel (Emulation > Show Execution Control), now with frame advance and frame jump controls
enh: auto frame skip is now smoother
enh: further improve execution timing accuracy
enh: improve overall video performance
enh: render video through a 3-stage filtering pipeline, (Video Source)-->(Pixel Scaler)-->(Video Output)
enh: add the following video source filters - Deposterize
enh: add the following video output filters - Bicubic B-Spline, Bicubic Mitchell-Netravali, Lanczos2, Lanczos3
enh: add ability to run all existing pixel scalers on either the CPU or the GPU
enh: add ability to toggle the main and touch display positions (View > Toggle All Displays)
enh: add preliminary support for replay playback and recording
enh: add support for turbo and autohold
enh: add support for the entire suite of slot-2 devices (Emulation > Show SLOT-2 Manager)
enh: add support for using the host machine's audio input device for emulating the NDS microphone (Emulation > Show Microphone Settings)
enh: change the sine wave tone generator's range from 100Hz-5000Hz to 40Hz-4000Hz
enh: reorganize the menu options to more logical locations
enh: greatly improve the File Migration Assistant (now renamed Game Data Migration Assistant) and ROM Info panel with a more modern and space efficient look and feel
enh: miscellaneous user interface improvements
Linux:
bug: fix screen gap bug
bug: workaround for std::bad_alloc exceptions compiler bugs
enh: add experimental AV recording
enh: generally improve main loop throttling and skipping
enh: massive improvements to HUD and menu layout
enh: add window sizing options and sound interpolation options
enh: add Lid button; disallow U+D, L+R; manual option saving
0.9.9 -> 0.9.10 (r4623-r4908)
In this version, we have focused on trying to clean up some complexities in the user experience and emulator internals. Pretty unglamorous stuff, but some games are newly compatible.
General/Core:
enh: break savestate back-compatibility
bug: improve save size autodetection for some games
bug: cpu: fix many basic jit cpu bugs
bug: 3d: tweak softrasterizer edge marking
bug: 3d: fix stale 4x4 texture palettes
bug: fix some GPU sprite blending scenarios
bug: fix bios HLE BitUnPack, UnCompHuffman
enh: modular slot-1 device system, emulate GC bus more faithfully
enh: support NAND slot-1 device
enh: auto-detect appropriate slot-1 and slot-2 device
enh: many revisions to firmware boot process for more authenticity. iQue and FlashME versions function, .dfc rewritten.
enh: support streaming NDS file from disk (like an ISO, to avoid long initial load time)
enh: run .dsv directly on disk, to save long flushing times. should speed backup operations.
enh: spu synch mode and method on commandline
Windows:
bug: fixes to advanscene DB import
bug: save opengl display method filter option
bug: general bugfixes to various screen layout modes
enh: add option to stop non-integer scaling during fullscreen or maximize
enh: improvements to save import dialog
enh: improved memory viewer tool
enh: operate better when run, against our advice, from a zipfile
enh: add slot-1 Nitro Filesystem viewer tool
Cocoa:
bug: fix slot1-R4 path saving
bug: fix bug with mic samples < 16khz
bug: fix bugs and enhancements in multi display windows
bug: fix handling of some joystick analog inputs
enh: save display windows configuration and emulation speed on app exit
0.9.8 -> 0.9.9 (r4228-r4623)
Yes, it's been a while since the last release, but we haven't been completely idle. There's a brand new jit cpu core which yields some impressive speedups!
@ -17,7 +216,6 @@ Graphics:
bug: 3d: fix some polygon and texture coloring bugs on big-endian systems
Windows:
bug: fixes to advanscene DB import
bug: fix some full screen stretching bugs
enh: add xaudio2 output driver
enh: add opengl display method (as opposed to directdraw), with controllable bilinear filter
@ -130,8 +328,8 @@ Linux:
enh: cli: better fps limiting (Thomas Jones)
Wx:
bug: some small fixes here and there (Jan Bücken)
enh: lot of code cleanup (Jan Bücken)
bug: some small fixes here and there (Jan Bücken)
enh: lot of code cleanup (Jan Bücken)
0.9.6 -> 0.9.7 (r3493-r3812)
@ -516,7 +714,7 @@ CPU/MMU:
bug: Fixed Thumb LDMIA (fixes ingame Dead'n'Furious) [shash]
bug: Fix repeating DMA (fixes NSMB parallax BG) [zeromus]
bug: Proper handling for unaligned CPU accesses [luigi__]
bug: Proper handling for undefined instruction exceptions [Salva Peiró]
bug: Proper handling for undefined instruction exceptions [Salva Peiró]
bug: correctly return vram control register values (fixes homebrew 3d games) [zeromus]
enh: Remove 16MB of WRAM at 0x01****** from arm9. Mapped to unused instead. Nobody knows what this was. [zeromus]
enh: Changed instruction execution to 16 at a time blocks (tested and stable) [shash]
@ -562,8 +760,8 @@ Mac OS X port:
bug: Fixed: Frozen video output (and/or messed 3d emulation) after loading a state. [Jeff]
bug: Added option to load the most recent file upon launching the program. [Jeff]
enh: Added French translation (thanks to Pierre Rudloff). [Jeff]
enh: Added basic key mapping configuration to application preferences (thanks to Julio GorgŽ). [Jeff]
enh: Added keyboard shortcuts for Execute, Pause and Reset command (thanks to Julio GorgŽ). [Jeff]
enh: Added basic key mapping configuration to application preferences (thanks to Julio GorgŽ). [Jeff]
enh: Added keyboard shortcuts for Execute, Pause and Reset command (thanks to Julio GorgŽ). [Jeff]
enh: Default key mappings are no longer case sensitive. [Jeff]
enh: Added ability to limit speed. [Jeff]
enh: Fixed: Video output should work on software-only 3D renderers. [Jeff]

View File

@ -1,5 +0,0 @@
EXTRA_DIST = README.LIN README.MAC README.WIN dsm.txt dsv.txt autogen.sh \
$(PO_FILES_IN)
DISTCLEANFILES = $(PO_FILES)
SUBDIRS = $(PO_DIR) src

View File

@ -1,8 +1,8 @@
DeSmuME
_________________________________________
Copyright (C) 2006 yopyop
Copyright (C) 2006-2012 DeSmuME team
Last Updated: March 31, 2012
Copyright (C) 2006-2022 DeSmuME team
Last Updated: May 23, 2022
Contents:
1) About ................................................................... 14
@ -23,7 +23,7 @@ For information on how to install or operate DeSmuME for your operating system,
please see the README file that should be present with your installation.
Port-specific README files:
* README.LIN for the Linux port
* README.LIN for the Linux ports
* README.WIN for the Windows port
* README.MAC for the Macintosh port
@ -34,23 +34,23 @@ developing DeSmuME.
You can find our documentation on our online Wiki page. The major pages of
interest are:
* Official Documentation: http://wiki.desmume.org/index.php?title=Main_Page
* Official Documentation: https://wiki.desmume.org/index.php?title=Main_Page
This is the main Wiki page that contains all of our official documentation.
* Manuals: http://wiki.desmume.org/index.php?title=Manual
* Manuals: https://wiki.desmume.org/index.php?title=Manual
The manuals contain detailed information about how to operate DeSmuME for each
port.
* FAQ: http://wiki.desmume.org/index.php?title=Faq
* FAQ: https://wiki.desmume.org/index.php?title=Faq
The Frequently Asked Questions (FAQ) page has a lot of useful general
information about DeSmuME. Do note that some of the information may be platform
specific, and may not directly apply to your version of DeSmuME.
* Build Instructions:
http://wiki.desmume.org/index.php?title=Installing_DeSmuME_from_source
https://wiki.desmume.org/index.php?title=Installing_DeSmuME_from_source
This page contains detailed port-specific instructions about how to make your
own build of DeSmuME directly from the source code.
@ -71,10 +71,10 @@ Special thanks go to:
3) Contact Information ________________________________________________________
Official Website: http://desmume.org
Public Forum: http://forums.desmume.org
Developer Chat: irc://irc.freenode.net/desmume
Bug Reports: http://sourceforge.net/tracker/?group_id=164579&atid=832291
Official Website: https://desmume.org
Public Forum: https://forums.desmume.org
Developer Chat: irc://irc.libera.chat:6697/desmume
Source & Bug Reports: https://github.com/TASEmulators/desmume
Please don't ask for ROMs, BIOS files, or any other copyrighted stuff.
@ -91,7 +91,7 @@ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this software. If not, see <http://www.gnu.org/licenses/>.
this software. If not, see <https://www.gnu.org/licenses/>.
* See the GNU General Public License details in COPYING.

441
desmume/README.INT Normal file
View File

@ -0,0 +1,441 @@
DeSmuME DLL/SO
DeSmuME is written in C++ using the SDL libraries.
* http://www.libsdl.org/
Reference Usage
===============
A Python library using the DLL/SO interface can be found at
`https://github.com/SkyTemple/py-desmume/blob/master/desmume/emulator.py`.
Build Linux & Mac
=================
DeSmuME uses the Meson build system to the shared object under Linux and MacOS:
* https://mesonbuild.com/
To build, first cd to src/frontend/interface and then run `meson build`
Then build the library by running `ninja -C build`
It will generate a shared object under `build/libdesmume.so`.
Build Windows
=============
To build open and build the Visual Studio solution at
`src/frontend/interface/windows/DeSmuME_Interface.sln`.
Interface
=========
The interface has the following API functions exposed in the DLL/SO.
Emulator key indices
--------------------
Internal ID numbers for emulator keys (used for some functions):
#define KEY_NONE 0
#define KEY_A 1
#define KEY_B 2
#define KEY_SELECT 3
#define KEY_START 4
#define KEY_RIGHT 5
#define KEY_LEFT 6
#define KEY_UP 7
#define KEY_DOWN 8
#define KEY_R 9
#define KEY_L 10
#define KEY_X 11
#define KEY_Y 12
#define KEY_DEBUG 13
#define KEY_BOOST 14
#define KEY_LID 15
int desmume_init(void);
-----------------------
Initializes the emulator. Needs to be called before any other API functions.
void desmume_free(void);
------------------------
Destroys the emulator, needs to be called to free memory. After this no API
functions must be called.
void desmume_set_language(unsigned char language);
--------------------------------------------------
Sets the firmware language. Valid values:
0 = Japanese, 1 = English, 2 = French, 3 = German, 4 = Italian, 5 = Spanish
int desmume_open(const char *filename);
---------------------------------------
Loads a ROM into the emulator. Returns 0 on success and another number on error.
void desmume_set_savetype(int type);
------------------------------------
Sets the type of SRAM save. 0 for auto.
void desmume_pause(void);
-------------------------
Pauses the emulator.
void desmume_resume(void);
--------------------------
Resumes the emulator.
void desmume_reset(void);
-------------------------
Resets the emulator and resumes.
BOOL desmume_running(void);
---------------------------
Returns 0 if the emulator is not running and 1 if it is.
void desmume_skip_next_frame(void);
-----------------------------------
Instructs the emulator to not draw the next frame.
void desmume_cycle(BOOL with_joystick);
---------------------------------------
Runs one loop iteration (tick) of the emulation.
The parameter must be 1 if `desmume_input_joy_init` was called before and
joystick input should be processed
and 0 otherwise.
int desmume_sdl_get_ticks();
----------------------------
Get the current tick number as reported by SDL.
void desmume_draw_opengl(GLuint *texture);
------------------------------------------
Only available if INCLUDE_OPENGL_2D was defined.
Draws the current tick onto the provided OpenGL texture.
BOOL desmume_has_opengl();
--------------------------
Returns whether or not OpenGL support is available.
int desmume_draw_window_init(BOOL auto_pause, BOOL use_opengl_if_possible);
---------------------------------------------------------------------------
Opens an SDL-powered window for drawing the emulator on and processing input.
If `auto_pause` is >0, the emulator is paused when the window is not in focus.
If `use_opengl_if_possible` is >0, OpenGL-based drawing is used
if OpenGL is available.
void desmume_draw_window_input();
---------------------------------
Process user input on the SDL window for this tick.
Requires `desmume_draw_window_init` to be called first.
void desmume_draw_window_frame();
---------------------------------
Draw the SDL window for this tick. Requires `desmume_draw_window_init` to be called first.
BOOL desmume_draw_window_has_quit();
------------------------------------
Returns 1 if the SDL window was closed by the user and 0 if not.
Requires `desmume_draw_window_init` to be called first.
void desmume_draw_window_free();
--------------------------------
Destroys the SDL window and frees memory. Requires `desmume_draw_window_init` to be called first.
No other SDL window functions must be called after this.
unsigned short *desmume_draw_raw();
-----------------------------------
Returns the content of the raw framebuffer of the emulator.
void desmume_draw_raw_as_rgbx(unsigned char *buffer);
-----------------------------------------------------
Fills the provided buffer as an RGBx formatted version of the emulator's framebuffer.
void desmume_savestate_clear();
-------------------------------
Deletes all savestates stored on slots.
BOOL desmume_savestate_load(const char *file_name);
---------------------------------------------------
Loads a savestate from a file. Returns 1 on success, 0 on failure.
BOOL desmume_savestate_save(const char *file_name);
---------------------------------------------------
Saves a savestate to a file. Returns 1 on success, 0 on failure.
void desmume_savestate_scan();
------------------------------
Scans the savestate slots for data. Required for `desmume_savestate_slot_exists` and
`desmume_savestate_save_slot` to return the correct data.
void desmume_savestate_slot_load(int index);
--------------------------------------------
Loads the savestate from slot `index`.
void desmume_savestate_slot_save(int index);
--------------------------------------------
Saves the current state to the savestate in slot `index`.
BOOL desmume_savestate_slot_exists(int index);
----------------------------------------------
Returns whether or not the savetstate at slot `index` exists.
char* desmume_savestate_slot_date(int index);
---------------------------------------------
Returns the date (as string) that the savestate at slot `index` was saved.
BOOL desmume_gpu_get_layer_main_enable_state(int layer_index);
--------------------------------------------------------------
Returns whether or not the layer with the given index for the main GPU is enabled.
BOOL desmume_gpu_get_layer_sub_enable_state(int layer_index);
-------------------------------------------------------------
Returns whether or not the layer with the given index for the sub GPU is enabled.
void desmume_gpu_set_layer_main_enable_state(int layer_index, BOOL the_state);
------------------------------------------------------------------------------
Disables or enables the layer with the given index for the main GPU.
Disabled layers are not drawn.
void desmume_gpu_set_layer_sub_enable_state(int layer_index, BOOL the_state);
-----------------------------------------------------------------------------
Disables or enables the layer with the given index for the sub GPU.
Disabled layers are not drawn.
int desmume_volume_get();
-------------------------
Returns the current emulator volume in a range from 0-100.
void desmume_volume_set(int volume);
------------------------------------
Sets the current emulator volume in a range from 0-100.
unsigned char desmume_memory_read_byte(int address);
signed char desmume_memory_read_byte_signed(int address);
unsigned short desmume_memory_read_short(int address);
signed short desmume_memory_read_short_signed(int address);
unsigned long desmume_memory_read_long(int address);
signed long desmume_memory_read_long_signed(int address);
-----------------------------------------------------------
Read the emulated memory at `address` with different sizes and sign settings.
void desmume_memory_write_byte(int address, unsigned char value);
void desmume_memory_write_short(int address, unsigned short value);
void desmume_memory_write_long(int address, unsigned long value);
-------------------------------------------------------------------
Write the value `value` as bytes/shorts/longs to `address` in the emulated memory.
int desmume_memory_read_register(char* register_name);
void desmume_memory_write_register(char* register_name, long value);
--------------------------------------------------------------------
Read or write the value of the specified register.
Valid register names:
- arm9.r0 - arm9.r15 : Registers r0 - r15 on the ARM9 processor.
- arm9.cpsr
- arm9.spsr
- arm7.r0 - arm7.r15 : Registers r0 - r15 on the ARM7 processor.
- arm7.cpsr
- arm7.spsr
`main` may be used as an alias for `arm9` and `sub` for `arm7`.
If the prefix is omitted, `arm9` is used.
typedef BOOL (*memory_cb_fnc)(unsigned int, int);
void desmume_memory_register_write(int address, int size, memory_cb_fnc cb);
void desmume_memory_register_read(int address, int size, memory_cb_fnc cb);
void desmume_memory_register_exec(int address, int size, memory_cb_fnc cb);
----------------------------------------------------------------------------
Register a callback function to execute when the emulator writes/reads or executes
an instruction at `address`. `size` is the size in bytes to monitor for that location
(should always be 2 to exec).
The passed callback function gets to arguments when called. The first argument
is the address the callback was triggered for, the second the size.
Only one callback can be specified per address and type (write/read/exec).
Pass 0 instead for `cb` to unregister previously registered callbacks.
void desmume_screenshot(char *screenshot_buffer);
-------------------------------------------------
Fills the 98304*3 bytes long `screenshot_buffer` with an RGB snapshot of
the framebuffer.
BOOL desmume_input_joy_init(void);
----------------------------------
Initialize SDL joypad handling. Returns 1 on success, 0 otherwise.
Must be called before any other joypad operation.
void desmume_input_joy_uninit(void);
------------------------------------
Destroys the joypad functionality. After calling this, no other joypad
operations must be called.
unsigned short desmume_input_joy_number_connected(void);
--------------------------------------------------------
Returns the number of connected joypads.
unsigned short desmume_input_joy_get_key(int index);
----------------------------------------------------
Returns the joypad key assigned to the specified emulator key.
unsigned short desmume_input_joy_get_set_key(int index);
--------------------------------------------------------
Pause and wait for the user to press a button on a joypad.
This button will be assigned to the specified emulator key.
void desmume_input_joy_set_key(int index, int joystick_key_index);
------------------------------------------------------------------
Sets the emulator key `index` to the specified joypad key `joystick_key_index`.
void desmume_input_keypad_update(unsigned short keys);
------------------------------------------------------
Update the currently pressed emulator keys. This is a bitmask where each bit
is one of the emulator's keys. See:
#define ADD_KEY(keypad,key) ( (keypad) |= (key) )
#define RM_KEY(keypad,key) ( (keypad) &= ~(key) )
#define KEYMASK_(k) (1 << (k))
unsigned short desmume_input_keypad_get(void);
----------------------------------------------
Get the currently pressed emulator keys. This is a bitmask where each bit is
one of the emulator's keys.
void desmume_input_set_touch_pos(unsigned short x, unsigned short y);
---------------------------------------------------------------------
Register a touch input at the specified location on the bottom screen.
Use `desmume_input_release_touch` to release.
void desmume_input_release_touch();
-----------------------------------
Release the current touch.
BOOL desmume_movie_is_active();
BOOL desmume_movie_is_recording();
BOOL desmume_movie_is_playing();
BOOL desmume_movie_is_finished();
----------------------------------
Returns whether the movie system is active/recording/playing/finished.
int desmume_movie_get_length();
-------------------------------
Returns the size of the movie records.
char *desmume_movie_get_name();
-------------------------------
Returns the name of the movie.
int desmume_movie_get_rerecord_count();
---------------------------------------
Returns the current rerecount counter value of the movie.
void desmume_movie_set_rerecord_count(int count);
-------------------------------------------------
Sets the current rerecount counter value of the movie.
BOOL desmume_movie_get_readonly();
----------------------------------
Returns 1 if the movie can only be read, 0 if it can also be modified.
void desmume_movie_set_readonly(BOOL state);
--------------------------------------------
Change whether or not the movie is only read-only (can not be modified).
// Returns NULL on success, error message otherwise.
const char *desmume_movie_play(const char *file_name);
------------------------------------------------------
Play the movie from the file `file_name`. Returns NULL on success, otherwise
an error message.
enum START_FROM {START_BLANK = 0, START_SRAM, START_SAVESTATE};
struct SimpleDate {int year; int month; int day; int hour; int minute; int second; int millisecond;};
void desmume_movie_record_simple(const char *save_file_name, const char *author_name);
void desmume_movie_record(const char *save_file_name, const char *author_name,
START_FROM start_from, const char* sram_file_name);
void desmume_movie_record_from_date(const char *save_file_name, const char *author_name,
START_FROM start_from, const char* sram_file_name,
SimpleDate date);
----------------------------------------------------------------------------------------
Record a movie.
- `save_file_name`: The name of the file to save the movie to.
- `author_name`: The name of the author of the movie.
- `start_from`: Where to start from:
- START_BLANK (0): Reset the emulator, start without SRAM (no savefile).
- START_SRAM (1): Reset the emulator, start using the SRAM loaded from `sram_file_name`.
- START_SAVESTATE (2): Not supported.
- `sram_file_name`: Name of the SRAM to load, if `start_from` == 1. NULL otherwise.
- `date`: Date to set the emulated device's clock to.
void desmume_movie_replay();
----------------------------
Restart playback of the current movie.
void desmume_movie_stop();
----------------------------
Stop playback/recording of the current movie.
Visit us on the web at http://www.desmume.org

View File

@ -1,74 +1,66 @@
DeSmuME
_________________________________________
Copyright (C) 2006 yopyop
Copyright (C) 2006-2007 DeSmuME team
DeSmuME is written in C++ using the GTK+ and SDL2 libraries.
1) Compiling instructions...................................13
2) How to use DeSmuME.......................................53
3) Contact information......................................142
4) Disclaimer...............................................160
* https://gtk.org/
* https://libsdl.org/
It uses the Meson build system to build the GTK+3 and SDL2 port:
1 Compiling instructions______________________________________
* https://mesonbuild.com/
DeSmuME is written in C using the gtk+ and SDL libraries.
So you need a working C compiler, such as gcc and
the above libraries runtime and development packages:
... and the autotools build system for the GTK+2 and SDL2 port.
* http://www.gtk.org
to build GTK+2 or SDL2 frontend with autotools, cd to src/frontend/posix, then
* http://www.libsdl.org/
autoreconf -i (or alternatively: ./autogen.sh)
./configure
make -jN (where N is the number of CPU cores to use).
Once these libraries are installed, you should be ready to
install DeSmuME.
DeSmuME provides another interface based on libglade, to use
it, you'll need glade:
, you'll need glade:
* http://glade.gnome.org/
* http://glade.gnome.org/
1.1 From a release archive____________________________________
To build, first cd to src/frontend/posix and run
`meson build --buildtype=release`
Then build the program by running `ninja -C build`
Uncompress the DeSmuME archive, move to the newly created
directory, type "./configure", then "make".
It will generate three programs:
1) "desmume" in the "src/gtk" directory;
2) "desmume-cli" in the "src/cli" directory.
1) "desmume" in the "build/gtk" directory;
2) "desmume-cli" in the "build/cli" directory.
If glade is installed on your system, you'll get a third
binary:
3) "desmume-glade" in the "src/gtk-glade" directory.
You can even type "make install" to install those programs on
your system (in /usr/local/ by default), then uninstalling is
done by typing "make uninstall".
3) "desmume-glade" in the "build/gtk-glade" directory.
1.2 From a CVS copy___________________________________________
You can even type "ninja -C build install" to install those programs on
your system (in /usr/local/ by default); then uninstalling is
done by typing "ninja -C build uninstall".
Move to the toplevel directory (the one that contains the
configure.ac file). Type "./autogen.sh" to generate the
configure/install scripts and needed Makefiles. Then you can follow the
same procedure as in 1.1 .
For more information on the available commandline options,
check the other README files which will be more up to date.
2 How to use DeSmuME__________________________________________
There are three versions of DeSmuME under Linux. These are a
Gtk+ build, a Glade build and a CLI SDL build. All these builds
have some common command line options:
The following options specially are available on these posix ports:
--disable-limiter Disables the 60 fps limiter
--soft-convert Use software colour conversion during OpenGL
screen rendering. May produce better or worse
frame rates depending on hardware.
--arm9gdb=PORT_NUM Enable the ARM9 GDB stub on the given port
--arm7gdb=PORT_NUM Enable the ARM7 GDB stub on the given port
The following options specially are available on the Gtk+ port:
--cflash=PATH_TO_DISK_IMAGE
Enable disk image GBAMP compact flash emulation
--opengl-2d Enables using OpenGL for screen rendering
--disable-sound Disables the sound emulation
--disable-3d Disables the 3D emulation
--help Display this message
The following options specially are available on the CLI port:
--opengl-2d Enables using OpenGL for screen rendering
--disable-sound Disables the sound emulation
NOTE:
The Gtk+ and Glade builds use gtkGLext to handle the OpenGL
@ -77,100 +69,4 @@ also passing the argument --gdk-gl-force-indirect. This has
been seen to improve things for Nvidia based graphics cards
under Linux.
GDB Debugger Stubs:
Source level debugging of ARM9 and/or ARM7 code is supported
using a GDB/Insight debugger.
The GDB stubs are enabled from the command line using the
following options:
--arm9gdb=<PORT_NUM> (for the ARM9)
--arm7gdb=<PORT_NUM> (for the ARM7)
The PORT_NUM is the TCP port upon which the stub will listen for
connections. Once enabled you can connect to the stub using the
following command at the GDB debugger prompt (assuming GDB and
DeSmuME are running on the same machine):
target remote :<PORT_NUM>
NOTE: there are problems with the ARM support when stepping code
with GDB versions prior to version 6.6. It is recommended that
you use at least version 6.6 if possible.
GBAMP compact flash emulation:
The default behaviour of DeSmumME is to attempt to emulate the
FAT image for the contents of the directory where the running
.nds file was located.
This behaviour can be altered using the
--cflash=<DISK_IMAGE_FILE> command line option. Using this
option DeSmuME will emulation a GBAMP and read and write sectors
from/to the disk image file.
The disk image file must be created and populated with files
using some external tool.
NOTE: currently if desmume fails to open the disk image file it
will silently continue minus a working GBAMP emulation.
2.1 Gtk+ version______________________________________________
Type "desmume" in a shell, a window should appear, then open
a rom file using the "open" button, next use the "run" button
to start emulation.
The following command line options are specific to the Gtk+
build:
--opengl-2d Enables using OpenGL for screen rendering
--disable-sound Disables the sound emulation
--disable-3d Disables the 3D emulation
2.2 CLI SDL version_______________________________________________
Just type "desmume-cli path-to-a-rom" in a shell.
The following command line options are specific to the CLI
build:
--opengl-2d Enables using OpenGL for screen rendering
--disable-sound Disables the sound emulation
3 Contact information_________________________________________
General inquiries should go to:
E-mail: guillaume@desmume.org
Linux Port-related inquiries should go to:
E-mail: guillaume@desmume.org
Web: http://desmume.org
Please don't ask for roms, bios files or any other copyrighted
stuff.
If you want to submit a bug report, please run desmume, go into
the "Help" menu, and click on "Submit a bug report". If you're
having trouble with it, please feel free to email.
4 Disclaimer__________________________________________________
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
See the GNU General Public License details in COPYING.
Visit us on the web at http://www.desmume.org

View File

@ -1,49 +1,71 @@
DeSmuME
_________________________________________
Copyright (C) 2006 yopyop
Copyright (C) 2006-2013 DeSmuME team
Last Updated: April 16, 2013
Copyright (C) 2006-2022 DeSmuME team
Last Updated: May 23, 2022
Contents:
1) System Requirements ..................................................... 15
2) Quick Start Guide for Using DeSmuME for OS X ............................ 36
3) Additional Documentation ............................................... 137
4) Contact Information .................................................... 167
5) License ................................................................ 269
1) System Requirements ..................................................... 17
2) Quick Start Guide for Using DeSmuME for macOS ........................... 58
3) Improving Emulation Performance ........................................ 204
4) Troubleshooting ........................................................ 230
5) Additional Documentation ............................................... 245
6) Contact Information .................................................... 275
7) License ................................................................ 377
1) System Requirements ________________________________________________________
DeSmuME is a very demanding app, especially for CPU usage. Before you begin,
make sure that your Mac meets the listed system requirements.
If your Mac meets only the minimum requirements, then you should expect to run
most simple 2D-only games with some frameskip, but you will be unable to run
complex 2D games or any 3D-heavy games. However, if your Mac meets the
recommended requirements, then you should expect to run almost every game,
including very complex 3D-heavy games, with minimal to no frameskip.
Operating System: OS X v10.5 (Leopard) or later
Operating System: macOS v10.5 (Leopard) or later
CPU: Can run on any PowerPC G4, G5, or Intel processor
2.1 GHz Intel Core 2 Duo (minimum)
3.0 GHz Intel Core 2 Duo or faster (recommended)
Minimum Recommended: 2.4 GHz Intel Core 2 Duo
Best Experience Recommended: 2.4 GHz Intel i5 (Haswell)
RAM: 512 MB (minimum)
2 GB (recommended)
Before you begin, make sure that your Mac meets the listed system requirements.
In general, any Mac with an Intel Core 2 Duo processor (from Mid-2007) should
be sufficient for basic gaming. However, it is possible to run DeSmuME with
even older hardware than that. In this case, you will need to use the settings
listed in the section "Improving Emulation Performance" to make things usable.
With this level of hardware, running any additional graphics enhancing features
will result in a poor experience. Some frameskip will also be necessary in
order maintain your execution speed.
2) Quick Start Guide for Using DeSmuME for OS X _______________________________
If your Mac meets the minimum recommended requirements, then you should be able
to run all games at full speed without any frameskip. You may need to use some
of the settings listed in the section "Improving Emulation Performance" for
certain games, but they should not be required for most games. You will also be
able to use some basic graphical enhancements, such as using some of the
display filters. However, increased 3D rendering resolution may not be possible
for all games for this level of hardware.
However, if your Mac has an Intel Haswell (from late 2013) or an Apple Silicon
processor (from 2020), you will be able to run all games with all of DeSmuME's
features without any performance problems. Graphics enhancements, such as
increased 3D rendering resolution, can be adjusted as needed to fit the
performance level of your hardware.
Please note that running DeSmuME on a PowerPC, while possible, is not fully
supported. The PowerPC binary exists mostly for testing and development
purposes, and also just because we can. Most games don't work well on PowerPC,
and so you will be limited to running only the most basic of games, such as
"Phoenix Wright: Ace Attorney" or "Picross DS."
2) Quick Start Guide for Using DeSmuME for macOS ______________________________
Installing DeSmuME is as easy as copying DeSmuME.app to your Applications
folder (or other folder of your choice). Double-click the app to start DeSmuME.
Note that DeSmuME for OS X may have a different feature set than DeSmuME for
Note that DeSmuME for macOS may have a different feature set than DeSmuME for
Windows and DeSmuME for Linux. As of this writing, some features that are
present in DeSmuME for Windows are not present in DeSmuME for OS X.
present in DeSmuME for Windows are not present in DeSmuME for macOS.
The rest of this section will be a guide to help you quickly get started using
DeSmuME for OS X.
DeSmuME for macOS.
Loading a ROM and Starting the Emulator:
Simply double-click the desired ROM from the Finder to play the game. By
@ -51,13 +73,13 @@ default, DeSmuME will load the ROM and start emulation. Also, there are
additional ROM loading options that you can change in DeSmuME > Preferences if
you need them.
Using the DS Controller:
Each DS controller button can be mapped to a button of your choice on your
Using the NDS Controller:
Each NDS controller button can be mapped to a button of your choice on your
keyboard, gamepad, or joystick. You can view the mappings by clicking on Input
in DeSmuME > Preferences. To change a mapping, click on the DS control that you
want to change, then press the button on your input device to map it.
in DeSmuME > Preferences. To change a mapping, click on the NDS control that
you want to change, then press the button on your input device to map it.
By default, the DS controller is mapped to the following keys on your keyboard:
By default, the NDS controller is mapped to the following keys on your keyboard:
Up - Up Arrow
Down - Down Arrow
Left - Left Arrow
@ -71,25 +93,94 @@ By default, the DS controller is mapped to the following keys on your keyboard:
Start - Return
Select - Tab
Lid - Delete (Backspace)
Microphone - ` (Accent)
Microphone (Internal Noise Samples) - ` (Accent)
The NDS can support a variety of SLOT-2 devices. Some devices, such as the
Guitar Grip, EasyPiano, and Taito Paddle have inputs, which are mapped to your
keyboard using these defaults:
Guitar Grip:
Green - E
Red - R
Yellow - T
Blue - Y
EasyPiano:
C - C
C# - F
D - V
D# - G
E - B
F - N
F# - J
G - M
G# - K
A - , (Comma)
A# - L
B - . (Period)
High C - / (Forward Slash)
Paddle:
Paddle Adjust -5 - O
Paddle Adjust +5 - P
In addition, the following emulator functions are mapped to your keyboard by
default:
Execute/Pause - Forward Delete
Reset - Page Down
Rotate Display Left - [ (Left Bracket)
Rotate Display Right - ] (Right Bracket)
Set Speed to Half - - (Dash)
Set Speed to Double - =
Set Speed to Double - = (Equal)
Using the DS Touch Pad:
Touch pad input is emulated using the left mouse button by default. Simply click
in the touch pad area of the DS display window to use the DS touch pad.
Using the NDS Touch Pad:
Touch pad input is emulated using the left mouse button by default. Simply
click in the touch pad area of the NDS display window to use the NDS touch pad.
Rotating the DS Display:
Some games require that the DS display be at a certain rotation in order to
Using the NDS Microphone:
Some games make use of the NDS microphone. DeSmuME emulates the NDS microphone
by using the default audio input device selected in your System Preferences.
You can choose Emulation > Show Microphone Settings to view the audio input
device that DeSmuME is currently using, as well as setting its gain.
DeSmuME will track the audio input level on the meter as the NDS reads the
microphone. The meter reflects the audio input level as seen by the NDS, not
the host. Note that some games ignore the microphone, and therefore will not
register on the meter. If you need to view the audio input level from the host
machine's perspective, you can view the host's audio input level in your System
Preferences.
Finally, you can generate audio samples in software by using one of DeSmuME's
audio generators, and send those audio samples to the NDS. This is what the
Microphone command in your Input Preferences does. As long as the Microphone
command is engaged, the host input device will be ignored. When you disengage
the Microphone command, DeSmuME will automatically return to reading the host
input device.
The microphone icon serves to indicate the current status of the NDS
microphone, and will change color for each status:
Black - The microphone is inactive due to the emulation being paused.
Dark Gray - The host audio input is inactive because the user has muted it
or because the user never authorized its usage. The emulation
is currently only accepting software-generated sources.
Bright Gray - A software-generated source is being used for the microphone
input. This overrides any host audio input.
Dark Green - The host audio input is active. However, the input level is
too low to be meaningful, or the game is ignoring the
microphone.
Bright Green - The microphone is active and the game is reading a
meaningful input level from the host audio input.
Bright Red - The microphone is active and the game is reading a clipped
input level. Depending on the situation, this may or may not
be desirable. Use the gain slider to influence the host audio
input level if needed.
Rotating the NDS Display:
Some games require that the NDS display be at a certain rotation in order to
look correct. Rotation options can be found by choosing
View > Display Rotation. You can also use the toolbar buttons Rotate Left and
Rotate Right to rotate the display by 90 degrees counterclockwise or clockwise,
respectively.
respectively. Finally, you can assign inputs to Rotate Left and Rotate Right in
your Input Preferences.
Freezing and Restoring the Emulation State:
Save states are a powerful feature that allows you to freeze the emulation
@ -108,8 +199,10 @@ use to quickly freeze/restore the emulation state.
The default hotkey for this is (Shift-#).
- To quick restore the emulation state, choose File > Load State Slot > Slot #.
The default hotkey for this is (#).
3) Improving Emulation Performance ____________________________________________
Improving Emulation Performance:
There are many settings you can change in order to improve DeSmuME's emulation
performance. All of the settings listed below affect performance the most. Use
the settings as shown for the best possible performance. All of these settings
@ -117,54 +210,69 @@ may be found in DeSmuME > Preferences.
- WARNING: Changing any Emulation setting may cause emulation glitches in
certain ROMs. Do not change these settings unless you are willing to
accept reduced ROM compatibility.
Display:
Video Output:
Use Vertical Sync - Off
Video Filter - None
3D Rendering:
3D Rendering Engine - SoftRasterizer
Rendering Threads - Automatic
accept reduced emulation accuracy or ROM compatibility.
Emulation:
Advanced Bus Level Timing - Off (May cause glitches)
Rigourous 3D Rendering Timing - On (May cause graphical glitches)
3D Rendering Engine - Dynamic Recompiler (May reduce ROM compatibility)
Rigorous 3D Rendering Timing - On (May cause graphical glitches)
CPU Emulation Engine - Dynamic Recompiler (Reduces ROM compatibility)
Dynamic Recompiler Block Size - 100 (May cause glitches)
Use External BIOS Images - Off (May reduce ROM compatibility)
3D Rendering:
3D Rendering Engine - SoftRasterizer (or OpenGL if GPU Scaling Factor
is greater than 4)
GPU Scaling Factor - 1
GPU Color Depth - 15-bit (Reduces color accuracy of 3D rendering)
Texture Scaling Factor - 1
3) Additional Documentation ___________________________________________________
4) Troubleshooting ____________________________________________________________
The vast majority of problems can be resolved by simply resetting DeSmuME's
settings back to their defaults. The easiest way to do this is to delete the
org.desmume.DeSmuME.plist file in your ~/Library/Preferences folder. There is
also a DeleteUserDefaults.applescript script that is included with your DeSmuME
installation that will do this for you.
If you are still experiencing problems after restoring your DeSmuME settings to
their defaults, then you may want to post your issue on our DeSmuME forum. Your
post may gain the attention of another user, or even a DeSmuME developer, to
help assist you with your issue. See the section "Contact Information" for how
to contact us on the forum.
5) Additional Documentation ___________________________________________________
The quick start guide in this Read Me is by no means a complete reference to
everything that DeSmuME can do! If you need any additional information about
DeSmuME, then you can reference our online Wiki pages for up-to-date
information.
* Official Documentation: http://wiki.desmume.org/index.php?title=Main_Page
* Official Documentation: https://wiki.desmume.org/index.php?title=Main_Page
This is the main Wiki page that contains all of our official documentation.
* FAQ: http://wiki.desmume.org/index.php?title=Faq
* FAQ: https://wiki.desmume.org/index.php?title=Faq
The Frequently Asked Questions (FAQ) page has a lot of useful general
information about DeSmuME. Do note that some of the information may be platform
specific, and may not directly apply to the OS X version of DeSmuME.
specific, and may not directly apply to the macOS version of DeSmuME.
* DeSmuME Manual for OS X:
http://wiki.desmume.org/index.php?title=DeSmuME_Manual_for_the_Macintosh_port
* DeSmuME Manual for macOS:
https://wiki.desmume.org/index.php?title=DeSmuME_Manual_for_the_Macintosh_port
This page contains complete and detailed information about how to operate
DeSmuME for OS X.
DeSmuME for macOS.
* DeSmuME Build Instructions for OS X:
http://wiki.desmume.org/index.php?title=Installing_DeSmuME_from_source_on_OS_X
* DeSmuME Build Instructions for macOS:
https://wiki.desmume.org/index.php?title=Installing_DeSmuME_from_source_on_OS_X
This page contains complete and detailed instructions about how to make your
own build of DeSmuME for OS X directly from the source code.
own build of DeSmuME for macOS directly from the source code.
4) Contact Information ________________________________________________________
6) Contact Information ________________________________________________________
Thank you for you interest in DeSmuME! If you want to tell us how useful
DeSmuME is in your life, your love (or hate) of certain NDS games, your passion
@ -187,14 +295,14 @@ However, keep in mind that there are a few of rules that you need to follow:
go to the Support forum. In short, use the appropriate contact method. That's
why the different methods exist!
* Official Website: http://desmume.org
* Official Website: https://desmume.org
Our official website has the latest news on DeSmuME releases, and also has a
lot of other useful information about DeSmuME. You can comment on different
posts telling us how you feel about DeSmuME. Is DeSmuME the best thing in your
life? Is it making you cry? Or is it a bunch of blah? Let us know here!
* Public Forum: http://forums.desmume.org
* Public Forum: https://forums.desmume.org
If you have a question about DeSmuME, then this is the place to ask it. But
before you ask it, be aware that your question may have already been answered
@ -208,9 +316,9 @@ If you still need to ask a question, choose Help > Submit a Support Request in
the DeSmuME application. Follow the onscreen instructions on the Support
Request Form.
* Live Developer Chat Channel: irc://irc.freenode.net/desmume
* Live Developer Chat Channel: irc://irc.libera.chat:6697/desmume
We have a live developer chatline on Freenode IRC at #desmume. This channel
We have a live developer chatline on Libera IRC at #desmume. This channel
is meant for discussing the development of DeSmuME, and shows the real work
that goes on behind the scenes. If you are interested in doing any sort of
software programming, software testing, documentation, or graphics work, then
@ -245,12 +353,12 @@ from Help > Submit a Bug Report.
When you write your description, make sure that they are as detailed as
possible. The better your descriptions are, the faster we can test and fix
bugs. For example, if you observed a bug in the game Golden Sun: Dark Dawn, then
the bug report could look something like this:
bugs. For example, if you observed a bug in the game "Golden Sun: Dark Dawn,"
then the bug report could look something like this:
App Version: v0.9.9
Operating System: OS X v10.8.3 (12D78)
Mac Model Identifier: iMac11,2
App Version: 0.9.13
Operating System: macOS v12.4 (21F79)
Mac Model Identifier: MacBookPro15,1
ROM Name: GOLDENSUN_DD
ROM Serial: NTR-BO5E-USA
Observed Behavior: I tried to load a save state using the
@ -266,7 +374,7 @@ logs. For the above example, we would probably ask you for your save states to
help us track down the bug.
5) License ____________________________________________________________________
7) License ____________________________________________________________________
This file is free software: you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
@ -278,7 +386,7 @@ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this software. If not, see <http://www.gnu.org/licenses/>.
this software. If not, see <https://www.gnu.org/licenses/>.
* See the GNU General Public License details in COPYING.

View File

View File

@ -1,14 +0,0 @@
#!/bin/sh
# intltoolize is optionnal as it's only required for the gtk-glade UI.
if test ! "x$(which intltoolize)" = "x"; then
echo "Running intltoolize"
intltoolize --copy --force --automake
else
if test ! "x$(which gintltoolize)" = "x"; then
echo "Running gintltoolize"
gintltoolize --copy --force --automake
fi
fi
autoreconf --install --force --verbose

View File

@ -1,39 +0,0 @@
# -*-shell-script-*-
[Meta]
RootName: @desmume.sf.net/desmume:$SOFTWAREVERSION
DisplayName: DeSmuME Nintendo DS Emulator
ShortName: desmume
Maintainer: Guillaume Duhamel <guillaume.duhamel@gmail.com>
Packager: Guillaume Duhamel <guillaume.duhamel@gmail.com>
Summary: DeSmuME is a Nintendo DS emulator.
URL: http://desmume.sf.net/
License: GNU General Public License, Version 2
SoftwareVersion: @VERSION@
AutopackageTarget: 1.0
[Description]
This is a Nintendo DS emulator.
[BuildPrepare]
prepareBuild
[BuildUnprepare]
unprepareBuild
[Imports]
echo '*' | import
[Prepare]
# Dependency checking
require @gtk.org/gtk 2.4
[Install]
# Put your installation script here
installExe bin/desmume
installExe bin/desmume-cli
installExe bin/desmume-glade
[Uninstall]
# Usually just the following line is enough to uninstall everything
uninstallFromLog

View File

@ -1,142 +0,0 @@
#! /bin/sh
# Wrapper for compilers which do not understand `-c -o'.
scriptversion=2005-05-14.22
# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
case $1 in
'')
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]
Wrapper for compilers which do not understand `-c -o'.
Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.
If you are trying to build a whole package this is not the
right script to run: please start by reading the file `INSTALL'.
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "compile $scriptversion"
exit $?
;;
esac
ofile=
cfile=
eat=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as `compile cc -o foo foo.c'.
# So we strip `-o arg' only if arg is an object.
eat=1
case $2 in
*.o | *.obj)
ofile=$2
;;
*)
set x "$@" -o "$2"
shift
;;
esac
;;
*.c)
cfile=$1
set x "$@" "$1"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -z "$ofile" || test -z "$cfile"; then
# If no `-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
# `.c' file was seen then we are probably linking. That is also
# ok.
exec "$@"
fi
# Name of file we expect compiler to create.
cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
# Create the lock directory.
# Note: use `[/.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
while true; do
if mkdir "$lockdir" >/dev/null 2>&1; then
break
fi
sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir '$lockdir'; exit 1" 1 2 15
# Run the compile.
"$@"
ret=$?
if test -f "$cofile"; then
mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
mv "${cofile}bj" "$ofile"
fi
rmdir "$lockdir"
exit $ret
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

View File

@ -1,369 +0,0 @@
dnl --- Package name is first argument to AC_INIT
dnl --- Release version is second argument to AC_INIT
AC_INIT(desmume, [svn])
dnl -- find host architecture for some os specific libraries
AC_CANONICAL_HOST
case $host in
*linux*) desmume_arch=linux;;
*mingw*) desmume_arch=windows;;
*darwin*) desmume_arch=linux;;
*bsd*) desmume_arch=linux;;
esac
AC_SUBST(desmume_arch)
AM_INIT_AUTOMAKE([1.10])
dnl -- make sure we have a c++ compiler
AC_PROG_CXX
dnl -- use ranlib for libraries
AC_PROG_RANLIB
dnl -- check for endianess
AC_C_BIGENDIAN
# took this from geany, hope it works
REVISION="r0"
SVN=`which svn 2>/dev/null`
if test -d ".svn" -a "x${SVN}" != "x" -a -x "${SVN}" ; then
REVISION=r`$SVN info|grep 'Last Changed Rev'|cut -d' ' -f4`
fi
AC_DEFINE_UNQUOTED([SVN_REV], "$REVISION", [subversion revision number])
dnl - Check for intltool/gettext macros
IT_PROG_INTLTOOL
dnl - Check for zlib
AC_CHECK_LIB(z, gzopen, [], [AC_MSG_ERROR([zlib was not found, we can't go further. Please install it or specify the location where it's installed.])])
dnl - Check for zziplib
AC_CHECK_LIB(zzip, zzip_open, [
LIBS="-lzzip $LIBS"
AC_DEFINE([HAVE_LIBZZIP])
AC_MSG_CHECKING([[whether zzip use void * as second parameter]])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <zzip/lib.h>]], [[
void * v;
zzip_read(NULL, v, 0);]])],
AC_MSG_RESULT(yes),
AC_DEFINE([ZZIP_OLD_READ])
AC_MSG_RESULT(no))
])
dnl - Check for SDL
AC_PATH_PROGS(SDLCONFIG, [sdl-config sdl11-config])
if test ! "x$SDLCONFIG" = "x" ; then
SDL_CFLAGS=`$SDLCONFIG --cflags`
SDL_LIBS=`$SDLCONFIG --libs`
AC_SUBST(SDL_CFLAGS)
AC_SUBST(SDL_LIBS)
else
AC_MSG_ERROR([sdl is required to build desmume])
fi
dnl - Check for the OpenGL includes
AC_CHECK_HEADERS([GL/gl.h],
[AC_CHECK_HEADERS([GL/glu.h], [have_gl_h=yes LIBS="$LIBS -lGLU"], [have_gl_h=no])],
[have_gl_h=no])
if test "have_gl_h" = "no" ; then
AC_MSG_WARN([Building without GL support because of missing headers.])
fi
AM_CONDITIONAL([HAVE_GL], [test "${have_gl_h}" = "yes"])
dnl - if --enable-osmesa is used, check for it
AC_ARG_ENABLE([osmesa],
[AC_HELP_STRING([--enable-osmesa], [use off-screen mesa])],
[osmesa=$enableval],
[osmesa=yes])
if test "x$osmesa" = "xyes" ; then
AC_CHECK_LIB(dl, main)
AC_CHECK_LIB([GL], main)
AC_CHECK_LIB(OSMesa, main,[
useosmesa=yes
AC_DEFINE(HAVE_LIBOSMESA)
OSMESA_LIBS="-lOSMesa"
AC_SUBST(OSMESA_LIBS)
])
fi
AM_CONDITIONAL([HAVE_LIBOSMESA], [test "${useosmesa}" = "yes"])
dnl - make the usage of libagg for HUD rendering configurable
AC_ARG_ENABLE([hud],
[AC_HELP_STRING([--enable-hud], [Enable HUD rendering, requires libagg])],
[libagg=yes])
HAVE_OPENAL=no
dnl - openal support
AC_ARG_ENABLE(openal,
[AC_HELP_STRING(--enable-openal, enable experimental OpenAL microphone input)],
[openal=yes])
if test "x$openal" = "xyes" ; then
AC_CHECK_LIB([openal], [main],[
HAVE_OPENAL=yes
LIBS="$LIBS -lopenal"
])
fi
AM_CONDITIONAL([HAVE_OPENAL], [test "${HAVE_OPENAL}" = "yes"])
dnl - Check for GTK and/or libglade
FOUND_GLIB=no
HAVE_ALSA=no
GLIB_VER=2.8
GTK_VER=2.14
PKG_CHECK_MODULES(GLIB,
glib-2.0 >= $GLIB_VER,
FOUND_GLIB=yes,
FOUND_GLIB=no)
PKG_CHECK_MODULES(GTK,
gtk+-2.0 >= $GTK_VER,
HAVE_GTK=yes,
HAVE_GTK=no)
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
PKG_CHECK_MODULES(GTHREAD,
"gthread-2.0",
HAVE_GTHREAD=yes,
HAVE_GTHREAD=no)
AC_SUBST(GTHREAD_CFLAGS)
AC_SUBST(GTHREAD_LIBS)
AC_ARG_ENABLE([glade],
[AC_HELP_STRING([--enable-glade], [enable glade frontend])],
[glade=$enableval],
[glade=no])
if test "x$glade" = "xyes" ; then
PKG_CHECK_MODULES(LIBGLADE,
"libglade-2.0",
HAVE_LIBGLADE=yes,
HAVE_LIBGLADE=no)
AC_SUBST(LIBGLADE_CFLAGS)
AC_SUBST(LIBGLADE_LIBS)
dnl uninstalled glade ui dir
AC_DEFINE_UNQUOTED(GLADEUI_UNINSTALLED_DIR,"`pwd`/src/gtk-glade/glade/",[path to glade ui dir])
AC_SUBST(GLADEUI_UNINSTALLED_DIR)
PKG_CHECK_MODULES(GTKGLEXT,
"gtkglext-1.0",
AC_DEFINE([GTKGLEXT_AVAILABLE], [1])
[])
AC_SUBST(GTKGLEXT_CFLAGS)
AC_SUBST(GTKGLEXT_LIBS)
fi
AC_PATH_PROG(UPDATEDESKTOP, [update-desktop-database])
# Need check for both lua and lua5.1 to run on debian, see mysql bug #29945
PKG_CHECK_MODULES(LUA,
lua >= 5.1,
HAVE_LUA=yes,
HAVE_LUA=no)
PKG_CHECK_MODULES(LUA,
lua5.1 >= 5.1,
HAVE_LUA=yes,
HAVE_LUA=no)
AC_SUBST(LUA_CFLAGS)
AC_SUBST(LUA_LIBS)
dnl -- force lua disabled
AM_CONDITIONAL([HAVE_LUA], [test "${HAVE_LUA}x" = "yes"])
if test ! "x$HAVE_OPENAL" = "xyes" ; then
PKG_CHECK_MODULES(ALSA, alsa >= 1.0, HAVE_ALSA=yes, HAVE_ALSA=no)
AC_SUBST(ALSA_CFLAGS)
AC_SUBST(ALSA_LIBS)
fi
AM_CONDITIONAL([HAVE_ALSA], [test "${HAVE_ALSA}" = "yes"])
PKG_CHECK_MODULES(LIBAGG, libagg >= 2.5.0, FOUND_LIBAGG=yes, FOUND_LIBAGG=no)
AM_CONDITIONAL([HAVE_LIBAGG], [test "x$libagg" = "xyes" -a "${FOUND_LIBAGG}" = "yes"])
if test "x$libagg" = "xyes" ; then
if test "x$FOUND_LIBAGG" = "xyes" ; then
AC_SUBST(LIBAGG_CFLAGS)
AC_SUBST(LIBAGG_LIBS)
AC_DEFINE([HAVE_LIBAGG])
else
AC_MSG_WARN([HUD rendering enabled, but libagg not found])
fi
fi
PKG_CHECK_MODULES(LIBSOUNDTOUCH, soundtouch >= 1.5.0, HAVE_LIBSOUNDTOUCH=yes, HAVE_LIBSOUNDTOUCH=no)
AC_SUBST(LIBSOUNDTOUCH_CFLAGS)
AC_SUBST(LIBSOUNDTOUCH_LIBS)
AM_CONDITIONAL([HAVE_LIBSOUNDTOUCH], [test "${HAVE_LIBSOUNDTOUCH}" = "yes"])
if test "x$HAVE_LIBSOUNDTOUCH" = "xyes"; then
AC_DEFINE([HAVE_LIBSOUNDTOUCH])
else
AC_MSG_WARN([SoundTouch library not found, pcsx2 resampler will be disabled])
fi
if test "x$HAVE_ALSA" = "xno"; then
if test "x$HAVE_OPENAL" = "xno"; then
AC_DEFINE([FAKE_MIC])
fi
fi
dnl - Check for wxWidgets
dnl - if --enable-wxwidgets is used, check for it
AC_ARG_ENABLE([wxwidgets],
[AC_HELP_STRING([--enable-wxwidgets], [Enable cross platform wx widgets frontend])],
[wxwidgets=$enableval],
[wxwidgets=no])
if test "x$wxwidgets" = "xyes" ; then
m4_include(wxwin.m4)
AM_PATH_WXCONFIG([2.4.0], wxwin=yes)
if test "x$wxwin" = "xyes"; then
AC_SUBST(WX_CPPFLAGS)
AC_SUBST(WX_LIBS)
AC_DEFINE([WANT_WX])
fi
fi
AM_CONDITIONAL([HAVE_WX], [test "x$wxwidgets" = "xyes"])
dnl - Determine which UIs to build and if po/ should be included
PO_DIR="po"
PO_MAKEFILE="po/Makefile.in"
UI_DIR="cli $UI_DIR"
if test "x$HAVE_GTK" = "xyes"; then
UI_DIR="gtk $UI_DIR"
fi
if test "x$wxwin" = "xyes"; then
UI_DIR="wx $UI_DIR"
fi
if test "x$HAVE_LIBGLADE" = "xyes"; then
UI_DIR="gtk-glade $UI_DIR"
dnl -- localization for gtk-glade UI
GETTEXT_PACKAGE=desmume
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Define to the gettext package name])
AC_SUBST(GETTEXT_PACKAGE)
ALL_LINGUAS="fr nb pt_BR sv zh_CN zh_TW"
AM_GLIB_GNU_GETTEXT
fi
dnl - jit support
case $host_cpu in
x86|x86_64|i386|i486|i586|i686)
HAVE_JIT=yes
AC_DEFINE(HAVE_JIT)
;;
esac
AM_CONDITIONAL([HAVE_JIT], [test "x$HAVE_JIT" = "xyes"])
dnl - wifi support
AC_ARG_ENABLE(wifi,
[AC_HELP_STRING(--enable-wifi, enable experimental wifi comm support)],
[
AC_CHECK_LIB(pcap, main,[
AC_DEFINE(EXPERIMENTAL_WIFI_COMM)
LIBS="$LIBS -lpcap"],
[AC_MSG_WARN([pcap library not found, wifi will not work])])
])
dnl Set compiler library flags per host architecture
case $host in
*mingw*)
LIBS="$LIBS -ldxguid -ldxerr8 -ldsound -lopengl32 -lws2_32 -mwindows"
UI_DIR="windows"
;;
*darwin*)
dnl - openal is required on mac os x and we are not able to figure out if it's installed or not
AC_DEFINE(HAVE_OPENAL)
LIBS="$LIBS -framework OpenGL -framework OpenAL"
CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/OpenAL.framework/Headers"
AC_SUBST(CPPFLAGS)
dnl - extra hackery needed for X includes
AC_PATH_XTRA
;;
esac
AC_SUBST(UI_DIR)
AC_SUBST(PO_DIR)
dnl - Gdb stub
AC_ARG_ENABLE(gdb-stub,
[AC_HELP_STRING(--enable-gdb-stub, enable gdb stub)],
[
AC_DEFINE(GDB_STUB)
wantgdbstub=yes
])
AM_CONDITIONAL([HAVE_GDB_STUB], [test "${wantgdbstub}" = "yes"])
dnl - Compiler warnings
# for developer use, enable lots of compile warnings,
# but don't require this generally, because some system's
# header files (BSD) can't handle it
#
# NB: must add -Werror after AC_PROG_CC, etc., so do this last
AC_ARG_ENABLE(hardcore,
[AC_HELP_STRING(--enable-hardcore, turn on -W -Wall -Werror)],
[case "${enableval}" in
yes) ENABLE_HARDCORE=1 ;;
no) ENABLE_HARDCORE=0 ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-hardcore) ;; esac],
[ENABLE_HARDCORE=0])
if test "x[$]ENABLE_HARDCORE" = "x1"; then
AC_MSG_WARN(enable hardcore compile warnings)
if test "x$CXX" = "x"; then
dnl - only valid for C with newer gcc's
CPPFLAGS="[$]CPPFLAGS -Wmissing-prototypes"
fi
dnl - -Wshadow
CPPFLAGS="[$]CPPFLAGS -Wall -Wextra -D_FORTIFY_SOURCE=2 -Wno-missing-field-initializers -Wpointer-arith -Wcast-align -Wwrite-strings -Wno-unused-parameter -Wmissing-declarations -Wundef -Wmissing-noreturn -Wredundant-decls -Wformat-nonliteral -Wformat-security -Winit-self -Wno-reorder"
fi
dnl - Enable debug mode
AC_ARG_ENABLE(debug,
AC_HELP_STRING(--enable-debug, enable debug information),
AC_DEFINE(DEBUG))
AC_ARG_ENABLE(gpu-debug,
AC_HELP_STRING(--enable-gpu-debug, enable gpu debug information),
AC_DEFINE(GPUDEBUG))
AC_ARG_ENABLE(div-debug,
AC_HELP_STRING(--enable-div-debug, enable div debug information),
AC_DEFINE(DIVDEBUG))
AC_ARG_ENABLE(sqrt-debug,
AC_HELP_STRING(--enable-sqrt-debug, enable sqrt debug information),
AC_DEFINE(SQRTDEBUG))
AC_ARG_ENABLE(dma-debug,
AC_HELP_STRING(--enable-dma-debug, enable dma debug information),
AC_DEFINE(DMADEBUG))
dnl - Enable memory profiling (disabled)
dnl - AC_ARG_ENABLE(memory-profiling,
dnl - AC_HELP_STRING(--enable-memory-profiling, enable memory profiling information),
dnl - AC_DEFINE(PROFILE_MEMORY_ACCESS))
dnl -- set maintainer mode
AM_MAINTAINER_MODE
AC_SUBST(USE_MAINTAINER_MODE)
dnl --- Finally, output all the makefiles
AC_CONFIG_FILES([Makefile
${PO_MAKEFILE}
src/Makefile
src/cli/Makefile
src/cli/doc/Makefile
src/gtk/Makefile
src/gtk/doc/Makefile
src/gtk-glade/Makefile
src/gtk-glade/doc/Makefile
src/wx/Makefile
src/gdbstub/Makefile
autopackage/default.apspec
])
AC_OUTPUT

View File

@ -1 +0,0 @@
./configure CFLAGS="-arch i386" CXXFLAGS="-arch i386"

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,8 @@
Tips:
* Set hotkeys for "Mic Prev Sample" and "Mic Next Sample" in the "Main" section of hotkey configuration (suggest [ and ])
* This will rotate through all the provided desmume_N.wav. You can add your own in the series, just pick the next number.
* Keep the microphone hotkey held down for as long as you want the noise to play! Just tapping it will make a very short sound indeed.
desmume_0.wav was formerly "PERFECT BLOW FOR DS EMULATORS.wav"
desmume_1.wav was formerly "noise_loud.wav"
desmume_4.wav came to us as "pcm0822m.wav"; these are alleged to work well for Giant Bowser fights in Bowser's Inside Story.

Binary file not shown.

View File

@ -1,7 +0,0 @@
fr
nb
pt_BR
sv
zh_CN
zh_TW
es

View File

@ -1,17 +0,0 @@
# Makefile snippet that holds all package-dependent information.
# Add more languages here! Beware that this is a makefile snippet and
# you have to adhere to make syntax.
LINGUAS = fr pt_BR sv zh_CN
# Textdomain for our package.
TEXTDOMAIN = desmume
# Initial copyright holder added to pot and po files.
COPYRIGHT_HOLDER = Pascal Giard
#COPYRIGHT_HOLDER = Edit the file PACKAGE to change this.
# Where to send msgid bugs?
MSGID_BUGS_ADDRESS = Desmume Team <desmume-devel@lists.sourceforge.net>
#MSGID_BUGS_ADDRESS = Edit the file PACAKGE to change this.

View File

@ -1,8 +0,0 @@
[encoding: UTF-8]
src/gtk-glade/callbacks.cpp
src/gtk-glade/gdk_3Demu.cpp
src/gtk-glade/glade-xml.cpp
src/gtk-glade/keyval_names.cpp
src/gtk-glade/main.cpp
src/gtk-glade/glade/DeSmuMe.glade
src/gtk-glade/glade/DeSmuMe_Dtools.glade

View File

@ -1,7 +0,0 @@
src/wx/PadSimple/GUI/ConfigDlg.cpp
src/wxdlg/wxdlg3dViewer.cpp
src/wxdlg/wxcontrolsconfigdialog.cpp
src/windows/libelf_libdwarf/libelf/errors.h
src/windows/wx/include/wx/msw/ole/oleutils.h
src/windows/wx/include/wx/unix/pipe.h
src/windows/wx/include/wx/xti.h

View File

@ -1,645 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-28 15:37+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../src/gtk-glade/callbacks.cpp:53
#, c-format
msgid "State %d (empty)"
msgstr ""
#. Creating the selection window
#: ../src/gtk-glade/callbacks.cpp:166
msgid "Open..."
msgstr ""
#: ../src/gtk-glade/callbacks.cpp:175
msgid "Nds binary (.nds)"
msgstr ""
#: ../src/gtk-glade/callbacks.cpp:176
msgid "Nds binary with loader (.ds.gba)"
msgstr ""
#: ../src/gtk-glade/callbacks.cpp:177
msgid "All files"
msgstr ""
#: ../src/gtk-glade/callbacks.cpp:192 ../src/gtk-glade/main.cpp:553
#, c-format
msgid ""
"Unable to load :\n"
"%s"
msgstr ""
#: ../src/gtk-glade/callbacks.cpp:408
msgid "You don't have any joystick!"
msgstr ""
#: ../src/gtk-glade/callbacks.cpp:410
msgid "Can't configure joystick while the game is running!"
msgstr ""
#: ../src/gtk-glade/gdk_3Demu.cpp:66
#, c-format
msgid "*** Cannot get %s attribute value\n"
msgstr ""
#: ../src/gtk-glade/gdk_3Demu.cpp:164
#, c-format
msgid "*** Failed to create pixmap.\n"
msgstr ""
#: ../src/gtk-glade/gdk_3Demu.cpp:174
#, c-format
msgid "*** No appropriate OpenGL-capable visual found.\n"
msgstr ""
#: ../src/gtk-glade/gdk_3Demu.cpp:187
#, c-format
msgid "Failed to create the GdkGLPixmap\n"
msgstr ""
#: ../src/gtk-glade/gdk_3Demu.cpp:197
#, c-format
msgid "Connot create the OpenGL rendering context\n"
msgstr ""
#: ../src/gtk-glade/glade-xml.cpp:58
#, c-format
msgid "could not find signal handler '%s'."
msgstr ""
#: ../src/gtk-glade/main.cpp:132
#, c-format
msgid "USAGE: %s [OPTIONS] [nds-file]\n"
msgstr ""
#: ../src/gtk-glade/main.cpp:133
#, c-format
msgid "OPTIONS:\n"
msgstr ""
#: ../src/gtk-glade/main.cpp:134
#, c-format
msgid ""
" --load-slot=NUM Load game saved under NUM position.\n"
"\n"
msgstr ""
#: ../src/gtk-glade/main.cpp:137
#, c-format
msgid ""
" --soft-convert Use software colour conversion during OpenGL\n"
" screen rendering. May produce better or worse\n"
" frame rates depending on hardware.\n"
"\n"
msgstr ""
#: ../src/gtk-glade/main.cpp:142
#, c-format
msgid ""
" --3d-engine=ENGINE Selects 3D rendering engine\n"
" 0 = disabled\n"
" 1 = internal desmume rasterizer (default)\n"
msgstr ""
#: ../src/gtk-glade/main.cpp:147
#, c-format
msgid ""
" 2 = gtkglext off-screen 3d opengl\n"
"\n"
msgstr ""
#: ../src/gtk-glade/main.cpp:150
#, c-format
msgid ""
" --disable-limiter Disables the 60 fps limiter\n"
"\n"
msgstr ""
#: ../src/gtk-glade/main.cpp:152
#, c-format
msgid ""
" --save-type=TYPE Selects savetype:\n"
" 0 = Autodetect (default)\n"
" 1 = EEPROM 4kbit\n"
" 2 = EEPROM 64kbit\n"
" 3 = EEPROM 512kbit\n"
" 4 = FRAM 256kbit\n"
" 5 = FLASH 2mbit\n"
" 6 = FLASH 4mbit\n"
" \n"
msgstr ""
#: ../src/gtk-glade/main.cpp:162
#, c-format
msgid ""
" --fwlang=LANG Set the language in the firmware, LANG as follows:\n"
" 0 = Japanese\n"
" 1 = English\n"
" 2 = French\n"
" 3 = German\n"
" 4 = Italian\n"
" 5 = Spanish\n"
"\n"
msgstr ""
#: ../src/gtk-glade/main.cpp:171
#, c-format
msgid ""
" --arm9gdb=PORT_NUM Enable the ARM9 GDB stub on the given port\n"
" --arm7gdb=PORT_NUM Enable the ARM7 GDB stub on the given port\n"
"\n"
msgstr ""
#: ../src/gtk-glade/main.cpp:175
#, c-format
msgid " --help Display this message\n"
msgstr ""
#: ../src/gtk-glade/main.cpp:188
#, c-format
msgid "I only know how to load from slots 1-10.\n"
msgstr ""
#: ../src/gtk-glade/main.cpp:212
#, c-format
msgid ""
"Supported 3d engines: 0, 1, and on some machines 2; use --help option for "
"details\n"
msgstr ""
#: ../src/gtk-glade/main.cpp:224
#, c-format
msgid "select savetype from 0 to 6; use --help option for details\n"
msgstr ""
#: ../src/gtk-glade/main.cpp:236
#, c-format
msgid "Firmware language must be set to a value from 0 to 5.\n"
msgstr ""
#: ../src/gtk-glade/main.cpp:249
#, c-format
msgid "ARM9 GDB stub port must be in the range 1 to 65535\n"
msgstr ""
#: ../src/gtk-glade/main.cpp:261
#, c-format
msgid "ARM7 GDB stub port must be in the range 1 to 65535\n"
msgstr ""
#: ../src/gtk-glade/main.cpp:274
#, c-format
msgid "NDS file (\"%s\") already set\n"
msgstr ""
#: ../src/gtk-glade/main.cpp:287
#, c-format
msgid "USAGE: %s [options] [nds-file]\n"
msgstr ""
#: ../src/gtk-glade/main.cpp:288
#, c-format
msgid "USAGE: %s --help - for help\n"
msgstr ""
#: ../src/gtk-glade/main.cpp:466
#, c-format
msgid "Failed to create ARM9 gdbstub on port %d\n"
msgstr ""
#: ../src/gtk-glade/main.cpp:477
#, c-format
msgid "Failed to create ARM7 gdbstub on port %d\n"
msgstr ""
#: ../src/gtk-glade/main.cpp:486
#, c-format
msgid "Error trying to initialize SDL: %s\n"
msgstr ""
#: ../src/gtk-glade/main.cpp:569
#, c-format
msgid "Failed to initialise openGL 3D emulation; removing 3D support\n"
msgstr ""
#: ../src/gtk-glade/main.cpp:576
#, c-format
msgid "Failed to setup 3D engine; removing 3D support\n"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:1
msgid "0"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:2
msgid "1"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:3
msgid "1x"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:4
msgid "2"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:5
msgid "2x"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:6
msgid "3"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:7
msgid "3D operation detected"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:8
msgid "3D rom"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:9
msgid "3x"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:10
msgid "4"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:11
msgid "5"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:12
msgid "6"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:13
msgid "7"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:14
msgid "8"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:15
msgid "9"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:16
msgid "?"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:17
msgid "A : "
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:18
msgid "Audio On"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:19
msgid "Axis :"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:20
msgid "B : "
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:21
msgid "BG0"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:22
msgid "BG1"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:23
msgid "BG2"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:24
msgid "BG3"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:25
msgid "Boost : "
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:26
msgid "Config"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:27
msgid "DeSmuME"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:28
msgid "Debug : "
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:29
msgid "Down : "
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:30
msgid "FrameSkip"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:31
msgid "IO regs"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:32
msgid "Joystick Config"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:33
msgid "Joystick controls"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:34
msgid "Key definition"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:35
msgid "Keyboard Config"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:36
msgid "Keyboard controls"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:37
msgid "L : "
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:38
msgid "Layers"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:39
msgid "Left : "
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:40
msgid "Load State"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:41
msgid "Nintendo DS emulator based on work by Yopyop"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:42
msgid "No Gap"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:43
msgid "OBJ"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:44
msgid "Press a button..."
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:45
msgid "Press a key..."
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:46
msgid "R : "
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:47
msgid "Reset"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:48
msgid "Right : "
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:49
msgid "Right Screen"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:50
msgid "Rotate Screen 0"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:51
msgid "Rotate Screen 180"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:52
msgid "Rotate Screen 270"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:53
msgid "Rotate Screen 90"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:54
msgid "Save State"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:55
msgid "Select : "
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:56
msgid "Size"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:57
msgid "Start : "
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:58
msgid "State 1"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:59
msgid "State 10"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:60
msgid "State 2"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:61
msgid "State 3"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:62
msgid "State 4"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:63
msgid "State 5"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:64
msgid "State 6"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:65
msgid "State 7"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:66
msgid "State 8"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:67
msgid "State 9"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:68
msgid "TYPE: Auto (1B)"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:69
msgid "TYPE: EEPROM1 (4kB)"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:70
msgid "TYPE: EEPROM2 (512kB)"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:71
msgid "TYPE: EEPROM2 (64kB)"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:72
msgid "TYPE: FLASH (256kB)"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:73
msgid "TYPE: FRAM (2MB)"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:74
msgid "TYPE: FRAM (4MB)"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:75
msgid "Tools"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:76
msgid "True Gap"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:77
msgid "Up : "
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:78
msgid "View Memory"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:79
msgid "View Palette"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:80
msgid "View Tiles"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:81
msgid "X : "
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:82
msgid "Y : "
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:83
msgid "_Emulation"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:84
msgid "_File"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:85
msgid "_PrintScreen"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:86
msgid "_Saves"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:87
msgid "http://desmume.org"
msgstr ""
#. TRANSLATORS: Replace this string with your names, one name per line.
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:89
msgid "translator-credits"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:1
msgid " GoTo: "
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:2
msgid " Palette : "
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:3
msgid "16 bit"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:4
msgid "16c"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:5
msgid "256c"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:6
msgid "32 bit"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:7
msgid "8 bit"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:8
msgid ""
"ARM9 cpu\n"
"ARM7 cpu"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:10
msgid "BMP"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:11
msgid "Go!"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:12
msgid ""
"cpu : ARM9\n"
"cpu : ARM7"
msgstr ""

View File

@ -1,684 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-04-07 14:37+0000\n"
"PO-Revision-Date: 2012-09-13 01:16-0000\n"
"Last-Translator: Tim Roden <othyro@freeshell.org>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../src/gtk-glade/callbacks.cpp:53
#, c-format
msgid "State %d (empty)"
msgstr "Estado %d (vacío)"
#. Creating the selection window
#: ../src/gtk-glade/callbacks.cpp:166
msgid "Open..."
msgstr "Abre..."
#: ../src/gtk-glade/callbacks.cpp:175
msgid "Nds binary (.nds)"
msgstr "Binario Nds (.nds)"
#: ../src/gtk-glade/callbacks.cpp:176
msgid "Nds binary with loader (.ds.gba)"
msgstr "Binario Nds con cargador (.ds.gba)"
#: ../src/gtk-glade/callbacks.cpp:177
msgid "All files"
msgstr "Todos los archivos"
#: ../src/gtk-glade/callbacks.cpp:192
#: ../src/gtk-glade/main.cpp:488
#, c-format
msgid ""
"Unable to load :\n"
"%s"
msgstr ""
"No pudo cargar :\n"
"%s"
#: ../src/gtk-glade/callbacks.cpp:408
msgid "You don't have any joystick!"
msgstr "¡No tienes ningún palanca de juego!"
#: ../src/gtk-glade/callbacks.cpp:410
msgid "Can't configure joystick while the game is running!"
msgstr "¡No se puede configurar palanca de juego mientras está funcionando el juego!"
#: ../src/gtk-glade/gdk_3Demu.cpp:66
#, c-format
msgid "*** Cannot get %s attribute value\n"
msgstr "*** No puede sacar valor atributo %s\n"
#: ../src/gtk-glade/gdk_3Demu.cpp:164
#, c-format
msgid "*** Failed to create pixmap.\n"
msgstr "*** Falló en crear el pixmap.\n"
#: ../src/gtk-glade/gdk_3Demu.cpp:174
#, c-format
msgid "*** No appropriate OpenGL-capable visual found.\n"
msgstr "*** Visual OpenGL-capaz apropiado no encontrado.\n"
#: ../src/gtk-glade/gdk_3Demu.cpp:187
#, c-format
msgid "Failed to create the GdkGLPixmap\n"
msgstr "Falló a crear el GdkGLPixmap\n"
#: ../src/gtk-glade/gdk_3Demu.cpp:197
#, c-format
msgid "Connot create the OpenGL rendering context\n"
msgstr "No puede crear el contexto de sintesis de imágenes OpenGL\n"
#: ../src/gtk-glade/glade-xml.cpp:58
#, c-format
msgid "could not find signal handler '%s'."
msgstr "no pudo encontrar manipulador de señal '%s'."
#: ../src/gtk-glade/main.cpp:133
#, c-format
msgid "USAGE: %s [OPTIONS] [nds-file]\n"
msgstr "SE USA: %s [OPCIONES] [archivo-nds]\n"
#: ../src/gtk-glade/main.cpp:134
#, c-format
msgid "OPTIONS:\n"
msgstr "OPCIONES:\n"
#: ../src/gtk-glade/main.cpp:135
#, c-format
msgid ""
" --load-slot=NUM Load game saved under NUM position.\n"
"\n"
msgstr ""
" --load-slot=NÚM Carga el juego guardado en posición NÚM.\n"
"\n"
#: ../src/gtk-glade/main.cpp:138
#, c-format
msgid ""
" --soft-convert Use software colour conversion during OpenGL\n"
" screen rendering. May produce better or worse\n"
" frame rates depending on hardware.\n"
"\n"
msgstr ""
" --soft-convert Usa conversión color software durante sintesis\n"
" de imágenes en pantalla OpenGL. Puede producir\n"
" mejor o peor velocidades de fotograma\n"
" dependiendo en hardware.\n"
"\n"
#: ../src/gtk-glade/main.cpp:143
#, c-format
msgid ""
" --3d-engine=ENGINE Selects 3D rendering engine\n"
" 0 = disabled\n"
" 1 = internal desmume rasterizer (default)\n"
msgstr ""
" --3d-engine=MOTOR Selecciona motor de sintesis de imágenes 3D\n"
" 0 = inutilizado\n"
" 1 = rasterizador desmume internal (opción por defecto)\n"
#: ../src/gtk-glade/main.cpp:148
#, c-format
msgid ""
" 2 = gtkglext off-screen 3d opengl\n"
"\n"
msgstr ""
" 2 = opengl 3d fuera de pantalla gtkglext\n"
"\n"
#: ../src/gtk-glade/main.cpp:151
#, c-format
msgid ""
" --disable-limiter Disables the 60 fps limiter\n"
"\n"
msgstr ""
" --disable-limiter Inutiliza el limitador 60 fps\n"
"\n"
#: ../src/gtk-glade/main.cpp:153
#, c-format
msgid ""
" --save-type=TYPE Selects savetype:\n"
" 0 = Autodetect (default)\n"
" 1 = EEPROM 4kbit\n"
" 2 = EEPROM 64kbit\n"
" 3 = EEPROM 512kbit\n"
" 4 = FRAM 256kbit\n"
" 5 = FLASH 2mbit\n"
" 6 = FLASH 4mbit\n"
" \n"
msgstr ""
" --save-type=TIPO Selecciona tipo de parada:\n"
" 0 = Autodetecta (opción por defecto)\n"
" 1 = EEPROM 4kbit\n"
" 2 = EEPROM 64kbit\n"
" 3 = EEPROM 512kbit\n"
" 4 = FRAM 256kbit\n"
" 5 = FLASH 2mbit\n"
" 6 = FLASH 4mbit\n"
" \n"
#: ../src/gtk-glade/main.cpp:163
#, c-format
msgid ""
" --fwlang=LANG Set the language in the firmware, LANG as follows:\n"
" 0 = Japanese\n"
" 1 = English\n"
" 2 = French\n"
" 3 = German\n"
" 4 = Italian\n"
" 5 = Spanish\n"
"\n"
msgstr ""
" --fwlang=LENG Pone el idioma en el microprograma, LENG a continuación:\n"
" 0 = japonés\n"
" 1 = inglés\n"
" 2 = francés\n"
" 3 = alemán\n"
" 4 = italiano\n"
" 5 = español\n"
"\n"
#: ../src/gtk-glade/main.cpp:172
#, c-format
msgid ""
" --arm9gdb=PORT_NUM Enable the ARM9 GDB stub on the given port\n"
" --arm7gdb=PORT_NUM Enable the ARM7 GDB stub on the given port\n"
"\n"
msgstr ""
" --arm9gdb=NÚM_PTO Admite el fragmento GDB ARM9 en el puerto dado\n"
" --arm7gdb=NÚM_PTO Admite el fragmento GDB ARM7 en el puerto dado\n"
"\n"
#: ../src/gtk-glade/main.cpp:176
#, c-format
msgid " --help Display this message\n"
msgstr " --help Visualiza este mensaje\n"
#: ../src/gtk-glade/main.cpp:189
#, c-format
msgid "I only know how to load from slots 1-10.\n"
msgstr "Sólo yo sé como cargar desde espacios 1-10.\n"
#: ../src/gtk-glade/main.cpp:213
#, c-format
msgid "Supported 3d engines: 0, 1, and on some machines 2; use --help option for details\n"
msgstr "Motores 3D admitidos: 0, 1 y en algunas máquinas 2; usa la opción --help para detalles\n"
#: ../src/gtk-glade/main.cpp:225
#, c-format
msgid "select savetype from 0 to 6; use --help option for details\n"
msgstr "selecciona tipo de parada desde 0 a 6; usa la opción --help para detalles\n"
#: ../src/gtk-glade/main.cpp:237
#, c-format
msgid "Firmware language must be set to a value from 0 to 5.\n"
msgstr "El idioma de microprograma tiene que ser puesto a un valor entre 0 a 5.\n"
#: ../src/gtk-glade/main.cpp:250
#, c-format
msgid "ARM9 GDB stub port must be in the range 1 to 65535\n"
msgstr "El puerto fragmento de código GDB ARM9 tiene que ser entre el rango de 1 a 65535\n"
#: ../src/gtk-glade/main.cpp:262
#, c-format
msgid "ARM7 GDB stub port must be in the range 1 to 65535\n"
msgstr "El puerto fragmento de código GDB ARM7 tiene que ser entre el rango de 1 a 65535\n"
#: ../src/gtk-glade/main.cpp:275
#, c-format
msgid "NDS file (\"%s\") already set\n"
msgstr "Ya puesto el archivo NDS (\"%s\") \n"
#: ../src/gtk-glade/main.cpp:288
#, c-format
msgid "USAGE: %s [options] [nds-file]\n"
msgstr "SE USA: %s [opciones] [archivo-nds]\n"
#: ../src/gtk-glade/main.cpp:289
#, c-format
msgid "USAGE: %s --help - for help\n"
msgstr "SE USA: %s --help -para ayuda\n"
#: ../src/gtk-glade/main.cpp:402
#, c-format
msgid "Failed to create ARM9 gdbstub on port %d\n"
msgstr "Falló en crear el gdbstub ARM9 en puerto %d\n"
#: ../src/gtk-glade/main.cpp:413
#, c-format
msgid "Failed to create ARM7 gdbstub on port %d\n"
msgstr "Falló en crear el gdbstub ARM7 en puerto %d\n"
#: ../src/gtk-glade/main.cpp:422
#, c-format
msgid "Error trying to initialize SDL: %s\n"
msgstr "Error probando a iniciar SDL: %s\n"
#: ../src/gtk-glade/main.cpp:504
#, c-format
msgid "Failed to initialise openGL 3D emulation; removing 3D support\n"
msgstr "Falló en inicializar la emulación 3D OpenGL; sacando apoyo 3D\n"
#: ../src/gtk-glade/main.cpp:511
#, c-format
msgid "Failed to setup 3D engine; removing 3D support\n"
msgstr "Falló en montar el motor 3D; sacando apoyo 3D\n"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:1
msgid "0"
msgstr "0"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:2
msgid "1"
msgstr "1"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:3
msgid "1x"
msgstr "1x"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:4
msgid "2"
msgstr "2"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:5
msgid "2x"
msgstr "2x"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:6
msgid "3"
msgstr "3"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:7
msgid "3D operation detected"
msgstr "Detectado la operación 3D"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:8
msgid "3D rom"
msgstr "ROM 3D"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:9
msgid "3x"
msgstr "3x"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:10
msgid "4"
msgstr "4"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:11
msgid "5"
msgstr "5"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:12
msgid "6"
msgstr "6"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:13
msgid "7"
msgstr "7"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:14
msgid "8"
msgstr "8"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:15
msgid "9"
msgstr "9"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:16
msgid "?"
msgstr "¿?"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:17
msgid "A : "
msgstr "A :"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:18
msgid "Audio On"
msgstr "Audio encendido"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:19
msgid "Axis :"
msgstr "Eje :"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:20
msgid "B : "
msgstr "B :"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:21
msgid "BG0"
msgstr "F0"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:22
msgid "BG1"
msgstr "F1"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:23
msgid "BG2"
msgstr "F2"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:24
msgid "BG3"
msgstr "F3"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:25
msgid "Boost : "
msgstr "Aumenta : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:26
msgid "Config"
msgstr "Config"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:27
msgid "DeSmuME"
msgstr "DeSmuME"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:28
msgid "Debug : "
msgstr "Depura : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:29
msgid "Down : "
msgstr "Bajo :"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:30
msgid "FrameSkip"
msgstr "SáltateFotograma"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:31
msgid "IO regs"
msgstr "Regs IO"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:32
msgid "Joystick Config"
msgstr "Config de palanca de juego"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:33
msgid "Joystick controls"
msgstr "Controles de palanca de juego"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:34
msgid "Key definition"
msgstr "Definición de tecla"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:35
msgid "Keyboard Config"
msgstr "Config de teclado"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:36
msgid "Keyboard controls"
msgstr "Controles de teclado"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:37
msgid "L : "
msgstr "L :"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:38
msgid "Layers"
msgstr "Capas"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:39
msgid "Left : "
msgstr "Izquierda :"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:40
msgid "Load State"
msgstr "Carga estado"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:41
msgid "Nintendo DS emulator based on work by Yopyop"
msgstr "Emulador de Nintendo DS basado en trabajo hecho por Yopyop"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:42
msgid "No Gap"
msgstr "No espacio"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:43
msgid "OBJ"
msgstr "OBJ"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:44
msgid "Press a button..."
msgstr "Presiona un botón..."
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:45
msgid "Press a key..."
msgstr "Presiona una tecla..."
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:46
msgid "R : "
msgstr "R :"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:47
msgid "Reset"
msgstr "Reinicia"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:48
msgid "Right : "
msgstr "Derecha :"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:49
msgid "Right Screen"
msgstr "Pantalla derecha"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:50
msgid "Rotate Screen 0"
msgstr "Rota la pantalla 0"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:51
msgid "Rotate Screen 180"
msgstr "Rota la pantalla 180"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:52
msgid "Rotate Screen 270"
msgstr "Rota la pantalla 270"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:53
msgid "Rotate Screen 90"
msgstr "Rota la pantalla 90"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:54
msgid "Save State"
msgstr "Guarda parada"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:55
msgid "Select : "
msgstr "Selecciona : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:56
msgid "Size"
msgstr "Tamaño"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:57
msgid "Start : "
msgstr "Empieza : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:58
msgid "State 1"
msgstr "Estado 1"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:59
msgid "State 10"
msgstr "Estado 10"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:60
msgid "State 2"
msgstr "Estado 2"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:61
msgid "State 3"
msgstr "Estado 3"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:62
msgid "State 4"
msgstr "Estado 4"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:63
msgid "State 5"
msgstr "Estado 5"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:64
msgid "State 6"
msgstr "Estado 6"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:65
msgid "State 7"
msgstr "Estado 7"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:66
msgid "State 8"
msgstr "Estado 8"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:67
msgid "State 9"
msgstr "Estado 9"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:68
msgid "TYPE: Auto (1B)"
msgstr "TIPO: Auto (1B)"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:69
msgid "TYPE: EEPROM1 (4kB)"
msgstr "TIPO: EEPROM1 (4kB)"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:70
msgid "TYPE: EEPROM2 (512kB)"
msgstr "TIPO: EEPROM2 (512kB)"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:71
msgid "TYPE: EEPROM2 (64kB)"
msgstr "TIPO: EEPROM2 (64kB)"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:72
msgid "TYPE: FLASH (256kB)"
msgstr "TIPO: FLASH (256kB)"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:73
msgid "TYPE: FRAM (2MB)"
msgstr "TIPO: FRAM (2MB)"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:74
msgid "TYPE: FRAM (4MB)"
msgstr "TIPO: FRAM (4MB)"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:75
msgid "Tools"
msgstr "Herramientas"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:76
msgid "True Gap"
msgstr "Espacio verdadero"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:77
msgid "Up : "
msgstr "Arriba :"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:78
msgid "View Memory"
msgstr "Ve memoria"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:79
msgid "View Palette"
msgstr "Ve gama"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:80
msgid "View Tiles"
msgstr "Ve losas"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:81
msgid "X : "
msgstr "X :"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:82
msgid "Y : "
msgstr "Y :"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:83
msgid "_Emulation"
msgstr "_Emulación"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:84
msgid "_File"
msgstr "_Archivo"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:85
msgid "_PrintScreen"
msgstr "_ImprimePantalla"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:86
msgid "_Saves"
msgstr "_Paradas"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:87
msgid "http://desmume.org"
msgstr "http://desmume.org"
#. TRANSLATORS: Replace this string with your names, one name per line.
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:89
msgid "translator-credits"
msgstr "creditos-de-traductor"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:1
msgid " GoTo: "
msgstr " VeA: "
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:2
msgid " Palette : "
msgstr " Gama : "
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:3
msgid "16 bit"
msgstr "16 bit"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:4
msgid "16c"
msgstr "16c"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:5
msgid "256c"
msgstr "256c"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:6
msgid "32 bit"
msgstr "32 bit"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:7
msgid "8 bit"
msgstr "8 bit"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:8
msgid ""
"ARM9 cpu\n"
"ARM7 cpu"
msgstr ""
"cpu ARM9\n"
"cpu ARM7"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:10
msgid "BMP"
msgstr "BMP"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:11
msgid "Go!"
msgstr "¡Ve!"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:12
msgid ""
"cpu : ARM9\n"
"cpu : ARM7"
msgstr ""
"cpu : ARM9\n"
"cpu : ARM7"

View File

@ -1,592 +0,0 @@
# French translation for the desmume-glade UI.
# Copyright (C) 2007 The DeSmuME Team.
# Pascal Giard <evilynux@gmail.com>, 2007.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-07-17 01:38-0400\n"
"PO-Revision-Date: 2007-07-17 05:27-0400\n"
"Last-Translator: Pascal Giard <evilynux@gmail.com>\n"
"Language-Team: DeSmuME Team <desmume-devel@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
#. Creating the selection window
#: ../src/gtk-glade/callbacks.c:91
msgid "Open..."
msgstr "Ouvrir..."
#: ../src/gtk-glade/callbacks.c:100
msgid "Nds binary (.nds)"
msgstr "Binaire NDS (.nds)"
#: ../src/gtk-glade/callbacks.c:101
msgid "Nds binary with loader (.ds.gba)"
msgstr "Binaire NDS avec lanceur (.ds.gba)"
#: ../src/gtk-glade/callbacks.c:102
msgid "All files"
msgstr "Tous les fichiers"
#: ../src/gtk-glade/callbacks.c:117 ../src/gtk-glade/main.c:532
#, c-format
msgid ""
"Unable to load :\n"
"%s"
msgstr ""
"Impossible de charger:\n"
"%s"
#: ../src/gtk-glade/callbacks.c:291
msgid "You don't have any joystick!"
msgstr "Aucune manette de jeu n'est connectée!"
#: ../src/gtk-glade/callbacks.c:293
msgid "Can't configure joystick while the game is running!"
msgstr "Vous ne pouvez pas configurer la manette de jeux pendant l'exécution du jeu!"
#: ../src/gtk-glade/gdk_3Demu.c:64
#, c-format
msgid "*** Cannot get %s attribute value\n"
msgstr "*** Impossible d'obtenir la valeur de l'attribut %s\n"
#: ../src/gtk-glade/gdk_3Demu.c:158
msgid "*** Failed to create pixmap.\n"
msgstr "*** Échec lors de la création du pixmap.\n"
#: ../src/gtk-glade/gdk_3Demu.c:168
msgid "*** No appropriate OpenGL-capable visual found.\n"
msgstr "*** Aucun affichage supportant OpenGL n'est détecté.\n"
#: ../src/gtk-glade/gdk_3Demu.c:181
msgid "Failed to create the GdkGLPixmap\n"
msgstr "Échec lors de la création du GdkGLPixmap\n"
#: ../src/gtk-glade/gdk_3Demu.c:191
msgid "Connot create the OpenGL rendering context\n"
msgstr "Impossible de créer le contexte d'affichage OpenGL\n"
#: ../src/gtk-glade/glade-xml.c:113
#, c-format
msgid "could not find signal handler '%s'."
msgstr "impossible de trouver la fonction associé au signal '%s'."
#: ../src/gtk-glade/main.c:106
#, c-format
msgid "USAGE: %s [OPTIONS] [nds-file]\n"
msgstr "UTILISATION: %s [OPTIONS] [fichier-nds]\n"
#: ../src/gtk-glade/main.c:107
msgid "OPTIONS:\n"
msgstr "OPTIONS:\n"
#: ../src/gtk-glade/main.c:109
msgid ""
" --soft-convert Use software colour conversion during OpenGL\n"
" screen rendering. May produce better or worse\n"
" frame rates depending on hardware.\n"
" \n"
" --disable-3d Disables the 3D emulation\n"
"\n"
msgstr ""
" --soft-convert Utiliser la conversion logiciel des couleurs lors de\n"
" l'affichage OpenGL. Peut améliorer ou détériorer les\n"
" performances dépendamment de la carte vidéo.\n"
"\n"
" --disable-3d Désactiver l'émulation 3D.\n"
"\n"
#: ../src/gtk-glade/main.c:116
msgid ""
" --disable-limiter Disables the 60 fps limiter\n"
" \n"
" --fwlang=LANG Set the language in the firmware, LANG as follows:\n"
" 0 = Japanese\n"
" 1 = English\n"
" 2 = French\n"
" 3 = German\n"
" 4 = Italian\n"
" 5 = Spanish\n"
"\n"
" --arm9gdb=PORT_NUM Enable the ARM9 GDB stub on the given port\n"
" --arm7gdb=PORT_NUM Enable the ARM7 GDB stub on the given port\n"
" \n"
" --help Display this message\n"
msgstr ""
" --disable-limiter Désactiver la limitation de 60 images/seconde.\n"
" \n"
" --fwlang=LANG Configurer la langue du firmware où LANG est:\n"
" 0 = Japanais\n"
" 1 = Anglais\n"
" 2 = Français\n"
" 3 = Allemand\n"
" 4 = Italien\n"
" 5 = Espagnol\n"
"\n"
" --arm9gdb=PORT_NUM Activer le stub GDB du ARM9 sur le port PORT_NUM.\n"
" --arm7gdb=PORT_NUM Activer le stub GDB du ARM7 sur le port PORT_NUM.\n"
" \n"
" --help Afficher ce message d'aide.\n"
#: ../src/gtk-glade/main.c:149
msgid "Firmware language must be set to a value from 0 to 5.\n"
msgstr "La langue du firmware doit être une valeur entre 0 et 5.\n"
#: ../src/gtk-glade/main.c:161
msgid "ARM9 GDB stub port must be in the range 1 to 65535\n"
msgstr "Le numéro de port du stub GDB du ARM9 doit être entre 1 et 65535\n"
#: ../src/gtk-glade/main.c:173
msgid "ARM7 GDB stub port must be in the range 1 to 65535\n"
msgstr "Le numéro de port du stub GDB du ARM7 doit être entre 1 et 65535\n"
#: ../src/gtk-glade/main.c:185
#, c-format
msgid "NDS file (\"%s\") already set\n"
msgstr "Fichier NDS (\"%s\") déjà configuré\n"
#: ../src/gtk-glade/main.c:198
#, fuzzy, c-format
msgid "USAGE: %s [options] [nds-file]\n"
msgstr "UTILISATION: %s [OPTIONS] [fichier-nds]\n"
#: ../src/gtk-glade/main.c:199
#, c-format
msgid "USAGE: %s --help - for help\n"
msgstr "UTILISATION: %s --help - pour l'aide\n"
#: ../src/gtk-glade/main.c:332
#, c-format
msgid "State %d (empty)"
msgstr "État %d (vide)"
#: ../src/gtk-glade/main.c:459
#, c-format
msgid "Failed to create ARM9 gdbstub on port %d\n"
msgstr ""
#: ../src/gtk-glade/main.c:470
#, c-format
msgid "Failed to create ARM7 gdbstub on port %d\n"
msgstr ""
#: ../src/gtk-glade/main.c:479
#, c-format
msgid "Error trying to initialize SDL: %s\n"
msgstr ""
#: ../src/gtk-glade/main.c:551
#, c-format
msgid "Failed to initialise openGL 3D emulation; removing 3D support\n"
msgstr ""
#: ../src/gtk-glade/main.c:557
#, c-format
msgid "Failed to setup openGL 3D emulation; removing 3D support\n"
msgstr ""
#: ../src/gtk-glade/main.c:584
#, c-format
msgid "Error trying to start FPS limiter timer: %s\n"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:1
msgid "0"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:2
msgid "1"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:3
msgid "1x"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:4
msgid "2"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:5
msgid "2x"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:6
msgid "3"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:7
msgid "3D operation detected"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:8
msgid "3D rom"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:9
msgid "3x"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:10
msgid "4"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:11
msgid "5"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:12
msgid "6"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:13
msgid "7"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:14
msgid "8"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:15
msgid "9"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:16
msgid "?"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:17
msgid "A : "
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:18
msgid "Audio On"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:19
msgid "Axis :"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:20
msgid "B : "
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:21
msgid "BG0"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:22
msgid "BG1"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:23
msgid "BG2"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:24
msgid "BG3"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:25
msgid "Boost : "
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:26
msgid "Config"
msgstr "_Config."
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:27
msgid "DeSmuME"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:28
msgid "DeSmuMe"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:29
msgid "Debug : "
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:30
msgid "Down : "
msgstr "Bas: "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:31
msgid "FrameSkip"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:32
msgid "IO regs"
msgstr "Registres d'E/S"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:33
msgid "Joystick Config"
msgstr "Configuration de la manette de jeu"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:34
msgid "Joystick controls"
msgstr "Manette de jeu"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:35
msgid "Key definition"
msgstr "Valeur de la touche"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:36
msgid "Keyboard Config"
msgstr "Configuration du clavier"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:37
msgid "Keyboard controls"
msgstr "Clavier"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:38
msgid "L : "
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:39
msgid "Layers"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:40
msgid "Left : "
msgstr "Gaucher: "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:41
msgid "Load State"
msgstr "Chargement d'un état"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:42
msgid "Nintendo DS emulator based on work by Yopyop"
msgstr "Émulateur de Nintendo DS basé sur le travail de Yopyop"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:43
msgid "OBJ"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:44
msgid "Press a button..."
msgstr "Appuyez sur un bouton..."
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:45
msgid "Press a key..."
msgstr "Appuyez sur une touche..."
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:46
msgid "R : "
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:47
msgid "Reset"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:48
msgid "Right : "
msgstr "Droite: "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:49
msgid "Right Screen"
msgstr "Écran à droite"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:50
msgid "Rotate Screen 0"
msgstr "Rotation de l'écran 0"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:51
msgid "Rotate Screen 180"
msgstr "Rotation de l'écran 180"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:52
msgid "Rotate Screen 270"
msgstr "Rotation de l'écran 270"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:53
msgid "Rotate Screen 90"
msgstr "Rotation de l'écran 90"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:54
msgid "Save State"
msgstr "Sauvegarder l'état"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:55
msgid "Select : "
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:56
msgid "Size"
msgstr "Taille"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:57
msgid "Start : "
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:58
msgid "State 1"
msgstr "État 1"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:59
msgid "State 10"
msgstr "État 10"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:60
msgid "State 2"
msgstr "État 2"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:61
msgid "State 3"
msgstr "État 3"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:62
msgid "State 4"
msgstr "État 4"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:63
msgid "State 5"
msgstr "État 5"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:64
msgid "State 6"
msgstr "État 6"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:65
msgid "State 7"
msgstr "État 7"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:66
msgid "State 8"
msgstr "État 8"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:67
msgid "State 9"
msgstr "État 9"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:68
msgid "TYPE: Auto (1B)"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:69
msgid "TYPE: EEPROM1 (4kB)"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:70
msgid "TYPE: EEPROM2 (512kB)"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:71
msgid "TYPE: EEPROM2 (64kB)"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:72
msgid "TYPE: FLASH (256kB)"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:73
msgid "TYPE: FRAM (2MB)"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:74
msgid "Tools"
msgstr "Outils"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:75
msgid "True Gap"
msgstr "Espace entre les écrans"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:76
msgid "Up : "
msgstr "Haut: "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:77
msgid "View Memory"
msgstr "Afficher la mémoire"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:78
msgid "View Palette"
msgstr "Afficher la palette de couleur"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:79
msgid "View Tiles"
msgstr "Afficher les tuiles"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:80
msgid "X : "
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:81
msgid "Y : "
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:82
msgid "_Emulation"
msgstr "_Émul."
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:83
msgid "_File"
msgstr "_Fichier"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:84
msgid "_PrintScreen"
msgstr "_Capture d'écran"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:85
msgid "_Saves"
msgstr "_Sauv."
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:86
msgid "http://desmume.sf.net"
msgstr ""
#. TRANSLATORS: Replace this string with your names, one name per line.
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:88
msgid "translator-credits"
msgstr "fr: Pascal Giard"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:1
msgid " GoTo: "
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:2
msgid " Palette : "
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:3
msgid "16 bit"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:4
msgid "16c"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:5
msgid "256c"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:6
msgid "32 bit"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:7
msgid "8 bit"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:8
msgid ""
"ARM9 cpu\n"
"ARM7 cpu"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:10
msgid "BMP"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:11
msgid "Go!"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:12
msgid ""
"cpu : ARM9\n"
"cpu : ARM7"
msgstr ""

View File

@ -1,437 +0,0 @@
# Norwegian translation for desmume.
# Copyright (C) 2007 Free Software Foundation, Inc.
# This file is distributed under the same license as the desmume package.
# Stian Drøbak <sum41rules4@hotmail.com>, 2009.
#
msgid ""
msgstr ""
"Project-Id-Version: desmume\n"
"Report-Msgid-Bugs-To: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:1
msgid "0"
msgstr "0"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:2
msgid "1"
msgstr "1"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:3
msgid "1x"
msgstr "1x"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:4
msgid "2"
msgstr "2"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:5
msgid "2x"
msgstr "2x"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:6
msgid "3"
msgstr "3"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:7
msgid "3D operation detected"
msgstr "3D operasjon oppdaget"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:8
msgid "3D rom"
msgstr "3D ROM"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:9
msgid "3x"
msgstr "3x"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:10
msgid "4"
msgstr "4"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:11
msgid "5"
msgstr "5"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:12
msgid "6"
msgstr "6"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:13
msgid "7"
msgstr "7"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:14
msgid "8"
msgstr "8"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:15
msgid "9"
msgstr "9"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:16
msgid "?"
msgstr "?"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:17
msgid "A : "
msgstr "A : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:18
msgid "Audio On"
msgstr "Lyd På"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:19
msgid "Axis :"
msgstr "Akse :"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:20
msgid "B : "
msgstr "B : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:21
msgid "BG0"
msgstr "BG0"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:22
msgid "BG1"
msgstr "BG1"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:23
msgid "BG2"
msgstr "BG2"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:24
msgid "BG3"
msgstr "BG3"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:25
msgid "Boost : "
msgstr "Boost : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:26
msgid "Config"
msgstr "Konfigurer"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:27
msgid "DeSmuME"
msgstr "DeSmuME"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:28
msgid "DeSmuMe"
msgstr "DeSmuMe"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:29
msgid "Debug : "
msgstr "Feilsøk : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:30
msgid "Down : "
msgstr "Ned : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:31
msgid "FrameSkip"
msgstr "Ramme Hopp"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:32
msgid "IO regs"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:33
msgid "Joystick Config"
msgstr "Konfigurer Joystick"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:34
msgid "Joystick controls"
msgstr "Joystick kontroller"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:35
msgid "Key definition"
msgstr "Tastdefinisjon"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:36
msgid "Keyboad Config"
msgstr "Tastaturkonfigurasjon"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:37
msgid "Keyboard controls"
msgstr "Tastaturkontroller"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:38
msgid "L : "
msgstr "V : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:39
msgid "Layers"
msgstr "Lag"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:40
msgid "Left : "
msgstr "Venstre : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:41
msgid "Load State"
msgstr "Last Status"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:42
msgid "Nintendo DS emulator based on work by Yopyop"
msgstr "Nintendo DS-emulator basert på Yopyops arbeid"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:43
msgid "OBJ"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:44
msgid "Press a button..."
msgstr "Trykk på en knapp..."
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:45
msgid "Press a key..."
msgstr "Trykk på en tast..."
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:46
msgid "R : "
msgstr "H : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:47
msgid "Reset"
msgstr "Restart"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:48
msgid "Right : "
msgstr "Høyre : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:49
msgid "Right Screen"
msgstr "Høyre Skjerm"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:50
msgid "Rotate Screen 0"
msgstr "Roter Skjermen 0"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:51
msgid "Rotate Screen 180"
msgstr "Roter Skjermen 180"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:52
msgid "Rotate Screen 270"
msgstr "Roter Skjermen 270"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:53
msgid "Rotate Screen 90"
msgstr "Roter Skjermen 90"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:54
msgid "Save State"
msgstr "Lagre State"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:55
msgid "Select : "
msgstr "Select : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:56
msgid "Size"
msgstr "Størrelse"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:57
msgid "Start : "
msgstr "Start : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:58
msgid "State 1"
msgstr "Plass 1"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:59
msgid "State 10"
msgstr "Plass 10"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:60
msgid "State 2"
msgstr "Plass 2"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:61
msgid "State 3"
msgstr "Plass 3"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:62
msgid "State 4"
msgstr "Plass 4"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:63
msgid "State 5"
msgstr "Plass 5"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:64
msgid "State 6"
msgstr "Plass 6"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:65
msgid "State 7"
msgstr "Plass 7"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:66
msgid "State 8"
msgstr "Plass 8"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:67
msgid "State 9"
msgstr "Plass 9"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:68
msgid "TYPE: Auto (1B)"
msgstr "TYPE: Auto (1B)"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:69
msgid "TYPE: EEPROM1 (4KB)"
msgstr "TYPE: EEPROM1 (4KB)"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:70
msgid "TYPE: EEPROM2 (512KB)"
msgstr "TYPE: EEPROM2 (512KB)"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:71
msgid "TYPE: EEPROM2 (64KB)"
msgstr "TYPE: EEPROM2 (64KB)"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:72
msgid "TYPE: FLASH (256KB)"
msgstr "TYPE: FLASH (256KB)"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:73
msgid "TYPE: FRAM (2MB)"
msgstr "TYPE: FRAM (2MB)"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:74
msgid "Tools"
msgstr "Verktøy"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:75
msgid "True Gap"
msgstr "Virkelig Mellomrom"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:76
msgid "Up : "
msgstr "Opp : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:77
msgid "View Memory"
msgstr "Vis Minne"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:78
msgid "View Palette"
msgstr "Vis Palett"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:79
msgid "View Tiles"
msgstr "Se Plater"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:80
msgid "X : "
msgstr "X : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:81
msgid "Y : "
msgstr "Y : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:82
msgid "_Emulation"
msgstr "_Emulering"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:83
msgid "_File"
msgstr "_Fil"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:84
msgid "_PrintScreen"
msgstr "_Skjermdump"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:85
msgid "_Saves"
msgstr "_Lagringsplasser"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:86
msgid "http://desmume.sf.net"
msgstr "http://desmume.sf.net"
#. TRANSLATORS: Replace this string with your names, one name per line.
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:88
msgid "translator-credits"
msgstr "Onizuka89 <sum41rules4@hotmail.com>"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:1
msgid " GoTo: "
msgstr " GåTil:"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:2
msgid " Palette : "
msgstr " Palett : "
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:3
msgid "0x00000000"
msgstr "0x00000000"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:4
msgid "16 bit"
msgstr "16 bit"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:5
msgid "16c"
msgstr "16 farger"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:6
msgid "256c"
msgstr "256 farger"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:7
msgid "32 bit"
msgstr "32 bit"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:8
msgid "8 bit"
msgstr "8 bit"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:9
msgid ""
"ARM9 cpu\n"
"ARM7 cpu"
msgstr ""
"ARM9-processor\n"
"ARM7-processor"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:11
msgid "BMP"
msgstr "BMP"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:12
msgid "Go!"
msgstr "Kjør!"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:13
msgid "IO registers"
msgstr "IO-register"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:14
msgid "Palette Viewer"
msgstr "Palettviser"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:15
msgid "Tile viewer"
msgstr "Plateviser"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:16
msgid ""
"cpu : ARM7\n"
"cpu : ARM9"
msgstr ""
"processor : ARM7\n"
"processor : ARM9"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:18
msgid "memory viewer"
msgstr "minnesviser"

View File

@ -1,601 +0,0 @@
# BRAZILIAN PORTUGUESE TRANSLATION
# Copyright (C) 2007
# This file is distributed under the same license as the PACKAGE package.
# Dreampeppers99 <EMAIL@ADDRESS>, 2007.
#
msgid ""
msgstr ""
"Project-Id-Version: Desmume 0.9.5\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-09-11 01:38-0400\n"
"PO-Revision-Date: 2009-10-18 13:01-0300\n"
"Last-Translator: Felipe <felipefpl@ig.com.br>\n"
"Language-Team: Felipe\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Language: Portuguese\n"
"X-Poedit-Country: BRAZIL\n"
"X-Poedit-SourceCharset: utf-8\n"
#. Creating the selection window
#: ../src/gtk-glade/callbacks.c:91
msgid "Open..."
msgstr "Abrir..."
#: ../src/gtk-glade/callbacks.c:100
msgid "Nds binary (.nds)"
msgstr "Binário nds (.nds)"
#: ../src/gtk-glade/callbacks.c:101
msgid "Nds binary with loader (.ds.gba)"
msgstr "Binário nds com o loader (.ds.gba)"
#: ../src/gtk-glade/callbacks.c:102
msgid "All files"
msgstr "Todos os arquivos"
#: ../src/gtk-glade/callbacks.c:117
#: ../src/gtk-glade/main.c:532
#, c-format
msgid ""
"Unable to load :\n"
"%s"
msgstr ""
"Incapaz de carregar :\n"
"%s"
#: ../src/gtk-glade/callbacks.c:291
msgid "You don't have any joystick!"
msgstr "Você não tem nenhum joystick!"
#: ../src/gtk-glade/callbacks.c:293
msgid "Can't configure joystick while the game is running!"
msgstr "Não pode configurar o joystick enquanto o jogo está rodando!"
#: ../src/gtk-glade/gdk_3Demu.c:64
#, c-format
msgid "*** Cannot get %s attribute value\n"
msgstr "*** Não consegue obter o valor do atributo %s\n"
#: ../src/gtk-glade/gdk_3Demu.c:158
msgid "*** Failed to create pixmap.\n"
msgstr "*** Falhou em criar o pixmap.\n"
#: ../src/gtk-glade/gdk_3Demu.c:168
msgid "*** No appropriate OpenGL-capable visual found.\n"
msgstr "*** Nenhum visual -capaz do OpenGL encontrado.\n"
#: ../src/gtk-glade/gdk_3Demu.c:181
msgid "Failed to create the GdkGLPixmap\n"
msgstr "Falhou em criar o GdkGLPixmap\n"
#: ../src/gtk-glade/gdk_3Demu.c:191
msgid "Cannot create the OpenGL rendering context\n"
msgstr "Não pôde criar o contexto de renderização do OpenGL\n"
#: ../src/gtk-glade/glade-xml.c:113
#, c-format
msgid "could not find signal handler '%s'."
msgstr "não pôde achar o manejador do sinal '%s'."
#: ../src/gtk-glade/main.c:106
#, c-format
msgid "USAGE: %s [OPTIONS] [nds-file]\n"
msgstr "USO: %s [OPÇÕES] [arquivo-nds]\n"
#: ../src/gtk-glade/main.c:107
msgid "OPTIONS:\n"
msgstr "OPÇÕES:\n"
#: ../src/gtk-glade/main.c:109
msgid ""
" --soft-convert Use software colour conversion during OpenGL\n"
" screen rendering. May produce better or worse\n"
" frame rates depending on hardware.\n"
" \n"
" --disable-3d Disables the 3D emulation\n"
"\n"
msgstr ""
" --soft-convert Usa conversão de cor via software durante a\n"
" renderização da tela em OpenGl. Pode produzir melhores ou piores\n"
" taxas de frames dependendo do hardware.\n"
" \n"
" --disable-3d Desativa a emulação 3D\n"
"\n"
#: ../src/gtk-glade/main.c:116
msgid ""
" --disable-limiter Disables the 60 fps limiter\n"
" \n"
" --fwlang=LANG Set the language in the firmware, LANG as follows:\n"
" 0 = Japanese\n"
" 1 = English\n"
" 2 = French\n"
" 3 = German\n"
" 4 = Italian\n"
" 5 = Spanish\n"
"\n"
" --arm9gdb=PORT_NUM Enable the ARM9 GDB stub on the given port\n"
" --arm7gdb=PORT_NUM Enable the ARM7 GDB stub on the given port\n"
" \n"
" --help Display this message\n"
msgstr ""
" --disable-limiter Desativa o limitador de 60 fps\n"
" \n"
" --fwlang=LANG Defina o idioma no firmware, LANG como segue:\n"
" 0 = Japonês\n"
" 1 = Inglês\n"
" 2 = Francês\n"
" 3 = Alemão\n"
" 4 = Italiano\n"
" 5 = Espanhol\n"
"\n"
" --arm9gdb=PORT_NUM Ativa o stub ARM9 GDB na porta dada\n"
" --arm7gdb=PORT_NUM Ativa o stub ARM7 GDB na porta dada\n"
" \n"
" --help Exibir esta mensagem\n"
#: ../src/gtk-glade/main.c:149
msgid "Firmware language must be set to a value from 0 to 5.\n"
msgstr "O idioma do firmware deve ser definido em um valor de 0 a 5.\n"
#: ../src/gtk-glade/main.c:161
msgid "ARM9 GDB stub port must be in the range 1 to 65535\n"
msgstr "A porta stub ARM9 GDB deve estar no alcance de 1 a 65535\n"
#: ../src/gtk-glade/main.c:173
msgid "ARM7 GDB stub port must be in the range 1 to 65535\n"
msgstr "A porta stub ARM7 GDB deve estar no alcance de 1 a 65535\n"
#: ../src/gtk-glade/main.c:185
#, c-format
msgid "NDS file (\"%s\") already set\n"
msgstr "Arquivo NDS (\"%s\") já definido\n"
#: ../src/gtk-glade/main.c:198
#, c-format
msgid "USAGE: %s [options] [nds-file]\n"
msgstr "USO: %s [opções] [arquivo-nds]\n"
#: ../src/gtk-glade/main.c:199
#, c-format
msgid "USAGE: %s --help - for help\n"
msgstr "USO: %s --help - para ajuda\n"
#: ../src/gtk-glade/main.c:332
#, c-format
msgid "State %d (empty)"
msgstr "Estado %d (vazio)"
#: ../src/gtk-glade/main.c:459
#, c-format
msgid "Failed to create ARM9 gdbstub on port %d\n"
msgstr "Falhou em criar o gdbstub ARM9 na porta %d\n"
#: ../src/gtk-glade/main.c:470
#, c-format
msgid "Failed to create ARM7 gdbstub on port %d\n"
msgstr "Falhou em criar o gdbstub ARM7 na porta %d\n"
#: ../src/gtk-glade/main.c:479
#, c-format
msgid "Error trying to initialize SDL: %s\n"
msgstr "Erro ao tentar inicializar o SDL: %s\n"
#: ../src/gtk-glade/main.c:551
#, c-format
msgid "Failed to initialise openGL 3D emulation; removing 3D support\n"
msgstr "Falhou em inicializar a emulação 3D no openGL; removendo o suporte 3D\n"
#: ../src/gtk-glade/main.c:557
#, c-format
msgid "Failed to setup openGL 3D emulation; removing 3D support\n"
msgstr "Falhou em configurar a emulação 3D no openGL; removendo o suporte 3D\n"
#: ../src/gtk-glade/main.c:584
#, c-format
msgid "Error trying to start FPS limiter timer: %s\n"
msgstr "Erro ao tentar iniciar o timer limitador de FPS: %s\n"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:1
msgid "0"
msgstr "0"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:2
msgid "1"
msgstr "1"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:3
msgid "1x"
msgstr "1x"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:4
msgid "2"
msgstr "2"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:5
msgid "2x"
msgstr "2x"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:6
msgid "3"
msgstr "3"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:7
msgid "3D operation detected"
msgstr "Operação 3D detectada"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:8
msgid "3D rom"
msgstr "Rom 3D"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:9
msgid "3x"
msgstr "3x"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:10
msgid "4"
msgstr "4"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:11
msgid "5"
msgstr "5"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:12
msgid "6"
msgstr "6"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:13
msgid "7"
msgstr "7"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:14
msgid "8"
msgstr "8"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:15
msgid "9"
msgstr "9"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:16
msgid "?"
msgstr "?"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:17
msgid "A : "
msgstr "A : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:18
msgid "Audio On"
msgstr "Áudio Ligado"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:19
msgid "Axis :"
msgstr "Eixos : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:20
msgid "B : "
msgstr "B : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:21
msgid "BG0"
msgstr "BG0"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:22
msgid "BG1"
msgstr "BG1"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:23
msgid "BG2"
msgstr "BG2"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:24
msgid "BG3"
msgstr "BG3"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:25
msgid "Boost : "
msgstr "Aumentar : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:26
msgid "Config"
msgstr "Configurar"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:27
msgid "DeSmuME"
msgstr "DeSmuME"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:28
msgid "DeSmuMe"
msgstr "DeSmuMe"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:29
msgid "Debug : "
msgstr "Debug : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:30
msgid "Down : "
msgstr "Baixo : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:31
msgid "FrameSkip"
msgstr "FrameSkip"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:32
msgid "IO regs"
msgstr "IO regs"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:33
msgid "Joystick Config"
msgstr "Configurar Joystick"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:34
msgid "Joystick controls"
msgstr "Controles do joystick"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:35
msgid "Key definition"
msgstr "Definição das teclas"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:36
msgid "Keyboard Config"
msgstr "Configurar o Teclado"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:37
msgid "Keyboard controls"
msgstr "Controles do teclado"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:38
msgid "L : "
msgstr "L : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:39
msgid "Layers"
msgstr "Camadas"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:40
msgid "Left : "
msgstr "Esquerda : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:41
msgid "Load State"
msgstr "Carregar State"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:42
msgid "Nintendo DS emulator based on work by Yopyop"
msgstr "Emulador de Nintendo DS baseado no trabalho do Yopyop"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:43
msgid "OBJ"
msgstr "OBJ"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:44
msgid "Press a button..."
msgstr "Pressione um botão..."
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:45
msgid "Press a key..."
msgstr "Pressione uma tecla..."
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:46
msgid "R : "
msgstr "R : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:47
msgid "Reset"
msgstr "Resetar"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:48
msgid "Right : "
msgstr "Direita : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:49
msgid "Right Screen"
msgstr "Tela Direita"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:50
msgid "Rotate Screen 0"
msgstr "Rotacionar a Tela 0"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:51
msgid "Rotate Screen 180"
msgstr "Rotacionar a Tela 180"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:52
msgid "Rotate Screen 270"
msgstr "Rotacionar a Tela 270"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:53
msgid "Rotate Screen 90"
msgstr "Rotacionar a Tela 90"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:54
msgid "Save State"
msgstr "Save State"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:55
msgid "Select : "
msgstr "Selecione : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:56
msgid "Size"
msgstr "Tamanho"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:57
msgid "Start : "
msgstr "Iniciar : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:58
msgid "State 1"
msgstr "Estado 1"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:59
msgid "State 10"
msgstr "Estado 10"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:60
msgid "State 2"
msgstr "Estado 2"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:61
msgid "State 3"
msgstr "Estado 3"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:62
msgid "State 4"
msgstr "Estado 4"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:63
msgid "State 5"
msgstr "Estado 5"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:64
msgid "State 6"
msgstr "Estado 6"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:65
msgid "State 7"
msgstr "Estado 7"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:66
msgid "State 8"
msgstr "Estado 8"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:67
msgid "State 9"
msgstr "Estado 9"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:68
msgid "TYPE: Auto (1B)"
msgstr "TIPO: Auto (1B)"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:69
msgid "TYPE: EEPROM1 (4kB)"
msgstr "TIPO: EEPROM1 (4kB)"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:70
msgid "TYPE: EEPROM2 (512kB)"
msgstr "TIPO: EEPROM2 (512kB)"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:71
msgid "TYPE: EEPROM2 (64kB)"
msgstr "TIPO: EEPROM2 (64kB)"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:72
msgid "TYPE: FLASH (256kB)"
msgstr "TIPO: FLASH (256kB)"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:73
msgid "TYPE: FRAM (2MB)"
msgstr "TIPO: FRAM (2MB)"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:74
msgid "Tools"
msgstr "Ferramentas"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:75
msgid "True Gap"
msgstr "Lacuna Real"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:76
msgid "Up : "
msgstr "Cima : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:77
msgid "View Memory"
msgstr "Visualizar a Memória"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:78
msgid "View Palette"
msgstr "Visualizar a Paleta"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:79
msgid "View Tiles"
msgstr "Visualizar os Tiles"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:80
msgid "X : "
msgstr "X :"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:81
msgid "Y : "
msgstr "Y :"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:82
msgid "_Emulation"
msgstr "_Emulação"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:83
msgid "_File"
msgstr "_Arquivo"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:84
msgid "_PrintScreen"
msgstr "_PrintScreen"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:85
msgid "_Saves"
msgstr "_Saves"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:86
msgid "http://desmume.sf.net"
msgstr "http://desmume.sf.net"
#. TRANSLATORS: Replace this string with your names, one name per line.
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:88
msgid "translator-credits"
msgstr "Dreampeppers99\nFelipe"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:1
msgid " GoTo: "
msgstr " IrPara: "
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:2
msgid " Palette : "
msgstr " Paleta : "
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:3
msgid "16 bit"
msgstr "16 bits"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:4
msgid "16c"
msgstr "16c"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:5
msgid "256c"
msgstr "256c"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:6
msgid "32 bit"
msgstr "32 bits"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:7
msgid "8 bit"
msgstr "8 bits"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:8
msgid ""
"ARM9 cpu\n"
"ARM7 cpu"
msgstr ""
"cpu ARM9\n"
"cpu ARM7"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:10
msgid "BMP"
msgstr "BMP"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:11
msgid "Go!"
msgstr "Ir!"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:12
msgid ""
"cpu : ARM9\n"
"cpu : ARM7"
msgstr ""
"cpu : ARM9\n"
"cpu : ARM7"

View File

@ -1,440 +0,0 @@
# Swedish translation for desmume.
# Copyright (C) 2007 Free Software Foundation, Inc.
# This file is distributed under the same license as the desmume package.
# Daniel Nylander <po@danielnylander.se>, 2007.
#
msgid ""
msgstr ""
"Project-Id-Version: desmume\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-05-12 01:00+0200\n"
"PO-Revision-Date: 2007-05-12 01:08+0100\n"
"Last-Translator: Daniel Nylander <po@danielnylander.se>\n"
"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:1
msgid "0"
msgstr "0"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:2
msgid "1"
msgstr "1"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:3
msgid "1x"
msgstr "1x"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:4
msgid "2"
msgstr "2"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:5
msgid "2x"
msgstr "2x"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:6
msgid "3"
msgstr "3"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:7
msgid "3D operation detected"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:8
msgid "3D rom"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:9
msgid "3x"
msgstr "3x"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:10
msgid "4"
msgstr "4"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:11
msgid "5"
msgstr "5"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:12
msgid "6"
msgstr "6"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:13
msgid "7"
msgstr "7"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:14
msgid "8"
msgstr "8"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:15
msgid "9"
msgstr "9"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:16
msgid "?"
msgstr "?"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:17
msgid "A : "
msgstr "A : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:18
msgid "Audio On"
msgstr "Ljud på"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:19
msgid "Axis :"
msgstr "Axel :"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:20
msgid "B : "
msgstr "B : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:21
msgid "BG0"
msgstr "BG0"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:22
msgid "BG1"
msgstr "BG1"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:23
msgid "BG2"
msgstr "BG2"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:24
msgid "BG3"
msgstr "BG3"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:25
msgid "Boost : "
msgstr "Boost : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:26
msgid "Config"
msgstr "Konfiguration"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:27
msgid "DeSmuME"
msgstr "DeSmuME"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:28
msgid "DeSmuMe"
msgstr "DeSmuMe"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:29
msgid "Debug : "
msgstr "Felsökning : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:30
msgid "Down : "
msgstr "Ner : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:31
msgid "FrameSkip"
msgstr "Hoppa över bildrutor"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:32
msgid "IO regs"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:33
msgid "Joystick Config"
msgstr "Styrspakskonfiguration"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:34
msgid "Joystick controls"
msgstr "Styrspakskontroller"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:35
msgid "Key definition"
msgstr "Tangentdefinition"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:36
msgid "Keyboad Config"
msgstr "Tangentbordskonfiguration"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:37
msgid "Keyboard controls"
msgstr "Tangentbordskontroller"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:38
msgid "L : "
msgstr "V : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:39
msgid "Layers"
msgstr "Lager"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:40
msgid "Left : "
msgstr "Vänster : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:41
msgid "Load State"
msgstr "Läs in"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:42
msgid "Nintendo DS emulator based on work by Yopyop"
msgstr "Nintendo DS-emulator baserad på Yopyops arbete"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:43
msgid "OBJ"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:44
msgid "Press a button..."
msgstr "Tryck på en knapp..."
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:45
msgid "Press a key..."
msgstr "Tryck på en tangent..."
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:46
msgid "R : "
msgstr "H : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:47
msgid "Reset"
msgstr "Nollställ"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:48
msgid "Right : "
msgstr "Höger : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:49
msgid "Right Screen"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:50
msgid "Rotate Screen 0"
msgstr "Rotera skärmen 0"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:51
msgid "Rotate Screen 180"
msgstr "Rotera skärmen 180"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:52
msgid "Rotate Screen 270"
msgstr "Rotera skärmen 270"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:53
msgid "Rotate Screen 90"
msgstr "Rotera skärmen 90"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:54
msgid "Save State"
msgstr "Spara"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:55
msgid "Select : "
msgstr "Välj : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:56
msgid "Size"
msgstr "Storlek"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:57
msgid "Start : "
msgstr "Start : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:58
msgid "State 1"
msgstr "Plats 1"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:59
msgid "State 10"
msgstr "Plats 10"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:60
msgid "State 2"
msgstr "Plats 2"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:61
msgid "State 3"
msgstr "Plats 3"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:62
msgid "State 4"
msgstr "Plats 4"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:63
msgid "State 5"
msgstr "Plats 5"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:64
msgid "State 6"
msgstr "Plats 6"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:65
msgid "State 7"
msgstr "Plats 7"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:66
msgid "State 8"
msgstr "Plats 8"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:67
msgid "State 9"
msgstr "Plats 9"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:68
msgid "TYPE: Auto (1B)"
msgstr "TYP: Auto (1B)"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:69
msgid "TYPE: EEPROM1 (4KB)"
msgstr "TYP: EEPROM1 (4KB)"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:70
msgid "TYPE: EEPROM2 (512KB)"
msgstr "TYP: EEPROM2 (512KB)"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:71
msgid "TYPE: EEPROM2 (64KB)"
msgstr "TYP: EEPROM2 (64KB)"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:72
msgid "TYPE: FLASH (256KB)"
msgstr "TYP: FLASH (256KB)"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:73
msgid "TYPE: FRAM (2MB)"
msgstr "TYP: FRAM (2MB)"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:74
msgid "Tools"
msgstr "Verktyg"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:75
msgid "True Gap"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:76
msgid "Up : "
msgstr "Upp : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:77
msgid "View Memory"
msgstr "Visa minne"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:78
msgid "View Palette"
msgstr "Visa palett"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:79
msgid "View Tiles"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:80
msgid "X : "
msgstr "X : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:81
msgid "Y : "
msgstr "Y : "
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:82
msgid "_Emulation"
msgstr "_Emulering"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:83
msgid "_File"
msgstr "_Arkiv"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:84
msgid "_PrintScreen"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:85
msgid "_Saves"
msgstr "_Sparningar"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:86
msgid "http://desmume.sf.net"
msgstr "http://desmume.sf.net"
#. TRANSLATORS: Replace this string with your names, one name per line.
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:88
msgid "translator-credits"
msgstr "Daniel Nylander <po@danielnylander.se>"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:1
msgid " GoTo: "
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:2
msgid " Palette : "
msgstr " Palett : "
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:3
msgid "0x00000000"
msgstr "0x00000000"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:4
msgid "16 bit"
msgstr "16 bitar"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:5
msgid "16c"
msgstr "16 färger"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:6
msgid "256c"
msgstr "256 färger"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:7
msgid "32 bit"
msgstr "32 bitar"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:8
msgid "8 bit"
msgstr "8 bitar"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:9
msgid ""
"ARM9 cpu\n"
"ARM7 cpu"
msgstr ""
"ARM9-processor\n"
"ARM7-processor"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:11
msgid "BMP"
msgstr "BMP"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:12
msgid "Go!"
msgstr "Kör!"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:13
msgid "IO registers"
msgstr "IO-register"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:14
msgid "Palette Viewer"
msgstr "Palettvisare"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:15
msgid "Tile viewer"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:16
msgid ""
"cpu : ARM7\n"
"cpu : ARM9"
msgstr ""
"processor : ARM7\n"
"processor : ARM9"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:18
msgid "memory viewer"
msgstr "minnesvisare"

View File

@ -1,270 +0,0 @@
# French translation for the desmume windows UI.
# Copyright (C) 2007 The DeSmuME Team.
# Luigi__, 2007.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-07-17 01:38-0400\n"
"PO-Revision-Date: 2007-07-17 05:27-0400\n"
"Last-Translator: Luigi__\n"
"Language-Team: DeSmuME Team <desmume-devel@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
#, c-format
#: File menu
msgid "File"
msgstr ""
msgid "Open ROM..."
msgstr ""
msgid "Recent ROM"
msgstr ""
msgid "None"
msgstr ""
msgid "Clear"
msgstr ""
msgid "ROM info"
msgstr ""
msgid "Save state as..."
msgstr ""
msgid "Load state as..."
msgstr ""
msgid "Save state"
msgstr ""
msgid "Load state"
msgstr ""
msgid "Import backup memory"
msgstr ""
msgid "Save screenshot as..."
msgstr ""
msgid "Quick screenshot"
msgstr ""
msgid "Record AVI"
msgstr ""
msgid "Stop AVI"
msgstr ""
msgid "Quit"
msgstr ""
#: Emulation menu
msgid "Emulation"
msgstr ""
msgid "Pause"
msgstr ""
msgid "Reset"
msgstr ""
msgid "Shut up"
msgstr ""
msgid "GBA slot"
msgstr ""
msgid "Cheats"
msgstr ""
msgid "List"
msgstr ""
msgid "Search"
msgstr ""
#: View menu
msgid "View"
msgstr ""
msgid "Rotation"
msgstr ""
msgid "Window size"
msgstr ""
msgid "Screen separation"
msgstr ""
msgid "None\t(0 px)"
msgstr ""
msgid "Narrow border\t(5 px)"
msgstr ""
msgid "DS\t(64 px)"
msgstr ""
msgid "Force maintain ratio"
msgstr ""
msgid "Default size"
msgstr ""
msgid "Display frame counter"
msgstr ""
msgid "Display FPS"
msgstr ""
msgid "Display input"
msgstr ""
msgid "Display lag counter"
msgstr ""
#: Config menu
msgid "Config"
msgstr ""
msgid "Save type"
msgstr ""
msgid "Autodetect"
msgstr ""
msgid "EEPROM 4kbit"
msgstr ""
msgid "EEPROM 64kbit"
msgstr ""
msgid "EEPROM 512kbit"
msgstr ""
msgid "FRAM 256kbit"
msgstr ""
msgid "FLASH 2mbit"
msgstr ""
msgid "FLASH 4mbit"
msgstr ""
msgid "3D settings"
msgstr ""
msgid "Control config"
msgstr ""
msgid "Hotkey config"
msgstr ""
msgid "Sound settings"
msgstr ""
msgid "Wifi settings"
msgstr ""
msgid "Firmware settings"
msgstr ""
msgid "Emulation settings"
msgstr ""
msgid "Frameskip"
msgstr ""
msgid "Limit framerate"
msgstr ""
msgid "Auto"
msgstr ""
msgid "Language"
msgstr ""
#: Tools menu
msgid "Disassembler"
msgstr ""
msgid "View memory"
msgstr ""
msgid "View registers"
msgstr ""
msgid "View palettes"
msgstr ""
msgid "View tiles"
msgstr ""
msgid "View maps"
msgstr ""
msgid "View OAMs"
msgstr ""
msgid "View matrices"
msgstr ""
msgid "View lights"
msgstr ""
msgid "View layers"
msgstr ""
msgid "Main BG 0"
msgstr ""
msgid "Main BG 1"
msgstr ""
msgid "Main BG 2"
msgstr ""
msgid "Main BG 3"
msgstr ""
msgid "Sub BG 0"
msgstr ""
msgid "Sub BG 1"
msgstr ""
msgid "Sub BG 2"
msgstr ""
msgid "Sub BG 3"
msgstr ""
#: Help menu
msgid "Help"
msgstr ""
msgid "Website"
msgstr ""
msgid "Forums"
msgstr ""
msgid "Submit a bug report"
msgstr ""
msgid "About"
msgstr ""

View File

@ -1,263 +0,0 @@
# French translation for the desmume windows UI.
# Copyright (C) 2007 The DeSmuME Team.
# Luigi__, 2007.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-07-17 01:38-0400\n"
"PO-Revision-Date: 2009-04-03 23:53+0100\n"
"Last-Translator: Luigi__\n"
"Language-Team: DeSmuME Team <desmume-devel@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
#: File menu
#, c-format
msgid "File"
msgstr "Fichier"
msgid "Open ROM..."
msgstr "Ouvrir une ROM..."
msgid "Recent ROM"
msgstr "ROMs récentes"
msgid "None"
msgstr "Aucune"
msgid "Clear"
msgstr "Vider"
msgid "ROM info"
msgstr "Info ROM"
msgid "Save state as..."
msgstr "Save state as..."
msgid "Load state as..."
msgstr "Load state as..."
msgid "Save state"
msgstr "Save state"
msgid "Load state"
msgstr "Load state"
msgid "Import backup memory"
msgstr "Importer une sauvegarde"
msgid "Save screenshot as..."
msgstr "Capture d'écran..."
msgid "Quick screenshot"
msgstr "Capture d'écran rapide"
msgid "Record AVI"
msgstr "Record AVI"
msgid "Stop AVI"
msgstr "Stop AVI"
msgid "Quit"
msgstr "Quitter"
#: Emulation menu
msgid "Emulation"
msgstr "Emulation"
msgid "Pause"
msgstr "Pause"
msgid "Reset"
msgstr "Reset"
msgid "Shut up"
msgstr "Shut up"
msgid "GBA slot"
msgstr "Slot GBA"
msgid "Cheats"
msgstr "Codes de triche"
msgid "List"
msgstr "Liste"
msgid "Search"
msgstr "Recherche"
#: View menu
msgid "View"
msgstr "Affichage"
msgid "Rotation"
msgstr "Rotation"
msgid "Window size"
msgstr "Taille fenêtre"
msgid "Screen separation"
msgstr "Séparation écrans"
msgid "None\t(0 px)"
msgstr "Aucune\t(0 px)"
msgid "Narrow border\t(5 px)"
msgstr "Bordure fine\t(5 px)"
msgid "DS\t(64 px)"
msgstr "DS\t(64 px)"
msgid "Force maintain ratio"
msgstr "Conserver le ratio"
msgid "Default size"
msgstr "Taille par défaut"
msgid "Display frame counter"
msgstr "Afficher compteur d'images"
msgid "Display FPS"
msgstr "Afficher FPS"
msgid "Display input"
msgstr "Afficher input"
msgid "Display lag counter"
msgstr "Afficher compteur de lag"
#: Config menu
msgid "Config"
msgstr "Config"
msgid "Save type"
msgstr "Type sauvegarde"
msgid "Autodetect"
msgstr "Autodétection"
msgid "EEPROM 4kbit"
msgstr "EEPROM 4kbit"
msgid "EEPROM 64kbit"
msgstr "EEPROM 64kbit"
msgid "EEPROM 512kbit"
msgstr "EEPROM 512kbit"
msgid "FRAM 256kbit"
msgstr "FRAM 256kbit"
msgid "FLASH 2mbit"
msgstr "FLASH 2mbit"
msgid "FLASH 4mbit"
msgstr "FLASH 4mbit"
msgid "3D settings"
msgstr "Config. 3D"
msgid "Control config"
msgstr "Config. contrôles"
msgid "Hotkey config"
msgstr "Config. hotkeys"
msgid "Sound settings"
msgstr "Config. son"
msgid "Wifi settings"
msgstr "Config. wifi"
msgid "Firmware settings"
msgstr "Config. firmware"
msgid "Emulation settings"
msgstr "Config émulation"
msgid "Frameskip"
msgstr "Frameskip"
msgid "Limit framerate"
msgstr "Limiter framerate"
msgid "Auto"
msgstr "Auto"
msgid "Language"
msgstr "Langage"
#: Tools menu
msgid "Disassembler"
msgstr "Désassembleur"
msgid "View memory"
msgstr "Visualiser la mémoire"
msgid "View registers"
msgstr "Visualiser les registres"
msgid "View palettes"
msgstr "Visualiser les palettes"
msgid "View tiles"
msgstr "Visualiser les tiles"
msgid "View maps"
msgstr "Visualiser les maps"
msgid "View OAMs"
msgstr "Visualiser les OAMs"
msgid "View matrices"
msgstr "Visualiser les matrices"
msgid "View lights"
msgstr "Visualiser les lights"
msgid "View layers"
msgstr "Voir couches"
msgid "Main BG 0"
msgstr "Main BG 0"
msgid "Main BG 1"
msgstr "Main BG 1"
msgid "Main BG 2"
msgstr "Main BG 2"
msgid "Main BG 3"
msgstr "Main BG 3"
msgid "Sub BG 0"
msgstr "Sub BG 0"
msgid "Sub BG 1"
msgstr "Sub BG 1"
msgid "Sub BG 2"
msgstr "Sub BG 2"
msgid "Sub BG 3"
msgstr "Sub BG 3"
#: Help menu
msgid "Help"
msgstr "?"
msgid "Website"
msgstr "Site web"
msgid "Forums"
msgstr "Forums"
msgid "Submit a bug report"
msgstr "Soumettre un report de bug"
msgid "About"
msgstr "A propos"

View File

@ -1,265 +0,0 @@
# French translation for the desmume windows UI.
# Copyright (C) 2009 The DeSmuME Team.
# F.E.Nebula, 2009.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-07-17 01:38-0400\n"
"PO-Revision-Date: 2009-06-24 11:00+0800\n"
"Last-Translator: F.E.Nebula <FENebula@gmail.com>\n"
"Language-Team: DeSmuME Team <desmume-devel@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Language: Chinese\n"
"X-Poedit-Country: CHINA\n"
#: File menu
#, c-format
msgid "File"
msgstr "文件"
msgid "Open ROM..."
msgstr "打开ROM..."
msgid "Recent ROM"
msgstr "最近的ROM"
msgid "None"
msgstr "空"
msgid "Clear"
msgstr "清空"
msgid "ROM info"
msgstr "ROM信息"
msgid "Save state as..."
msgstr "即时存档为..."
msgid "Load state as..."
msgstr "即时读档为..."
msgid "Save state"
msgstr "即时存档"
msgid "Load state"
msgstr "即时读档"
msgid "Import backup memory"
msgstr "导入后备内存"
msgid "Save screenshot as..."
msgstr "另存屏幕截图为"
msgid "Quick screenshot"
msgstr "快速截图"
msgid "Record AVI"
msgstr "录制AVI"
msgid "Stop AVI"
msgstr "停止录制AVI"
msgid "Quit"
msgstr "退出"
#: Emulation menu
msgid "Emulation"
msgstr "模拟"
msgid "Pause"
msgstr "暂停"
msgid "Reset"
msgstr "复位"
msgid "Shut up"
msgstr "静音"
msgid "GBA slot"
msgstr "GBA插槽"
msgid "Cheats"
msgstr "金手指"
msgid "List"
msgstr "列表"
msgid "Search"
msgstr "搜索"
#: View menu
msgid "View"
msgstr "查看"
msgid "Rotation"
msgstr "旋转"
msgid "Window size"
msgstr "窗口大小"
msgid "Screen separation"
msgstr "分割窗口"
msgid "None\t(0 px)"
msgstr "无\t(0 px)"
msgid "Narrow border\t(5 px)"
msgstr "窄线\t(5 px)"
msgid "DS\t(64 px)"
msgstr "DS实际宽度\t(64 px)"
msgid "Force maintain ratio"
msgstr "强制保持比例"
msgid "Default size"
msgstr "默认大小"
msgid "Display frame counter"
msgstr "显示帧计数器"
msgid "Display FPS"
msgstr "显示FPS"
msgid "Display input"
msgstr "显示输入"
msgid "Display lag counter"
msgstr "显示标志计数器"
#: Config menu
msgid "Config"
msgstr "设置"
msgid "Save type"
msgstr "存档类型"
msgid "Autodetect"
msgstr "自动选择"
msgid "EEPROM 4kbit"
msgstr ""
msgid "EEPROM 64kbit"
msgstr ""
msgid "EEPROM 512kbit"
msgstr ""
msgid "FRAM 256kbit"
msgstr ""
msgid "FLASH 2mbit"
msgstr ""
msgid "FLASH 4mbit"
msgstr ""
msgid "3D settings"
msgstr "3D设置"
msgid "Control config"
msgstr "控制器设置"
msgid "Hotkey config"
msgstr "热键设置"
msgid "Sound settings"
msgstr "声音设置"
msgid "Wifi settings"
msgstr "Wifi设置"
msgid "Firmware settings"
msgstr "固件设置"
msgid "Emulation settings"
msgstr "模拟选项设置"
msgid "Frameskip"
msgstr "跳帧"
msgid "Limit framerate"
msgstr "限制帧率"
msgid "Auto"
msgstr "自动"
msgid "Language"
msgstr "语言"
#: Tools menu
msgid "Disassembler"
msgstr "反汇编"
msgid "View memory"
msgstr "查看内存"
msgid "View registers"
msgstr "查看寄存器"
msgid "View palettes"
msgstr "查看调色板"
msgid "View tiles"
msgstr "查看Tile"
msgid "View maps"
msgstr "查看映射"
msgid "View OAMs"
msgstr "产看OAM"
msgid "View matrices"
msgstr "查看矩阵"
msgid "View lights"
msgstr "查看光照"
msgid "View layers"
msgstr "查看图层"
msgid "Main BG 0"
msgstr ""
msgid "Main BG 1"
msgstr ""
msgid "Main BG 2"
msgstr ""
msgid "Main BG 3"
msgstr ""
msgid "Sub BG 0"
msgstr ""
msgid "Sub BG 1"
msgstr ""
msgid "Sub BG 2"
msgstr ""
msgid "Sub BG 3"
msgstr ""
#: Help menu
msgid "Help"
msgstr "帮助"
msgid "Website"
msgstr "主页"
msgid "Forums"
msgstr "论坛"
msgid "Submit a bug report"
msgstr "提交BUG报告"
msgid "About"
msgstr "关于"

View File

@ -1,676 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: desmume\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-28 15:37+0100\n"
"PO-Revision-Date: \n"
"Last-Translator: Ronmi Ren <ronmi@rmi.twbbs.org>\n"
"Language-Team: DeSmuME Team <desmume-devel@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Language: Chinese\n"
"X-Poedit-Country: TAIWAN\n"
"X-Poedit-SourceCharset: iso-8859-1\n"
#: ../src/gtk-glade/callbacks.cpp:53
#, c-format
msgid "State %d (empty)"
msgstr "存檔 %d (空的)"
#. Creating the selection window
#: ../src/gtk-glade/callbacks.cpp:166
msgid "Open..."
msgstr "開啟..."
#: ../src/gtk-glade/callbacks.cpp:175
msgid "Nds binary (.nds)"
msgstr "NDS遊戲 (.nds)"
#: ../src/gtk-glade/callbacks.cpp:176
msgid "Nds binary with loader (.ds.gba)"
msgstr "NDS遊戲與載入器 (.ds.gba)"
#: ../src/gtk-glade/callbacks.cpp:177
msgid "All files"
msgstr "所有檔案"
#: ../src/gtk-glade/callbacks.cpp:192
#: ../src/gtk-glade/main.cpp:553
#, c-format
msgid ""
"Unable to load :\n"
"%s"
msgstr ""
"載入失敗:\n"
"%s"
#: ../src/gtk-glade/callbacks.cpp:408
msgid "You don't have any joystick!"
msgstr "沒有偵測到搖桿"
#: ../src/gtk-glade/callbacks.cpp:410
msgid "Can't configure joystick while the game is running!"
msgstr "在遊戲執行時不可以調整搖桿設定"
#: ../src/gtk-glade/gdk_3Demu.cpp:66
#, c-format
msgid "*** Cannot get %s attribute value\n"
msgstr "*** 無法取得屬性 %s 的值\n"
#: ../src/gtk-glade/gdk_3Demu.cpp:164
#, c-format
msgid "*** Failed to create pixmap.\n"
msgstr "*** 創造點陣圖失敗\n"
#: ../src/gtk-glade/gdk_3Demu.cpp:174
#, c-format
msgid "*** No appropriate OpenGL-capable visual found.\n"
msgstr "*** 找不到與 OpenGL 相容的可用視覺效果\n"
#: ../src/gtk-glade/gdk_3Demu.cpp:187
#, c-format
msgid "Failed to create the GdkGLPixmap\n"
msgstr "創造 GdkGLPixmap 失敗\n"
#: ../src/gtk-glade/gdk_3Demu.cpp:197
#, c-format
msgid "Connot create the OpenGL rendering context\n"
msgstr "創造 OpenGL rendering context 失敗\n"
#: ../src/gtk-glade/glade-xml.cpp:58
#, c-format
msgid "could not find signal handler '%s'."
msgstr "找不到 signal handler '%s'"
#: ../src/gtk-glade/main.cpp:132
#, c-format
msgid "USAGE: %s [OPTIONS] [nds-file]\n"
msgstr "使用方式: %s [選項] [nds檔]\n"
#: ../src/gtk-glade/main.cpp:133
#, c-format
msgid "OPTIONS:\n"
msgstr "可用選項:\n"
#: ../src/gtk-glade/main.cpp:134
#, c-format
msgid ""
" --load-slot=NUM Load game saved under NUM position.\n"
"\n"
msgstr ""
" --load-slot=存檔編號 讀取第幾號的即時存檔\n"
"\n"
#: ../src/gtk-glade/main.cpp:137
#, c-format
msgid ""
" --soft-convert Use software colour conversion during OpenGL\n"
" screen rendering. May produce better or worse\n"
" frame rates depending on hardware.\n"
"\n"
msgstr ""
" --soft-convert 在 OpenGL 模式中使用軟體轉換色彩。\n"
" 在不同的硬體下,效能可能更好也可能更壞。\n"
" \n"
#: ../src/gtk-glade/main.cpp:142
#, c-format
msgid ""
" --3d-engine=ENGINE Selects 3D rendering engine\n"
" 0 = disabled\n"
" 1 = internal desmume rasterizer (default)\n"
msgstr ""
" --3d-engine=3D引擎 選擇3D引擎\n"
" 0 = 不使用3D\n"
" 1 = desmume內建的軟體模擬引擎 (預設值)\n"
#: ../src/gtk-glade/main.cpp:147
#, c-format
msgid ""
" 2 = gtkglext off-screen 3d opengl\n"
"\n"
msgstr ""
" 2 = gtkglext 於幕後演算的 OpenGL 3D 支援\n"
"\n"
#: ../src/gtk-glade/main.cpp:150
#, c-format
msgid ""
" --disable-limiter Disables the 60 fps limiter\n"
"\n"
msgstr ""
" --disable-limiter 取消畫面更新率最高60的上限\n"
"\n"
#: ../src/gtk-glade/main.cpp:152
#, c-format
msgid ""
" --save-type=TYPE Selects savetype:\n"
" 0 = Autodetect (default)\n"
" 1 = EEPROM 4kbit\n"
" 2 = EEPROM 64kbit\n"
" 3 = EEPROM 512kbit\n"
" 4 = FRAM 256kbit\n"
" 5 = FLASH 2mbit\n"
" 6 = FLASH 4mbit\n"
" \n"
msgstr ""
" --save-type=類型 選擇記憶卡類型:\n"
" 0 = 自動選擇 (default)\n"
" 1 = EEPROM 4kbit\n"
" 2 = EEPROM 64kbit\n"
" 3 = EEPROM 512kbit\n"
" 4 = FRAM 256kbit\n"
" 5 = FLASH 2mbit\n"
" 6 = FLASH 4mbit\n"
" \n"
#: ../src/gtk-glade/main.cpp:162
#, c-format
msgid ""
" --fwlang=LANG Set the language in the firmware, LANG as follows:\n"
" 0 = Japanese\n"
" 1 = English\n"
" 2 = French\n"
" 3 = German\n"
" 4 = Italian\n"
" 5 = Spanish\n"
"\n"
msgstr ""
" --fwlang=LANG 設定韌體的語言, 可用的 LANG 設定有:\n"
" 0 = 日文\n"
" 1 = 英文\n"
" 2 = 法文\n"
" 3 = 德文\n"
" 4 = 義大利文\n"
" 5 = 西班牙文\n"
"\n"
#: ../src/gtk-glade/main.cpp:171
#, c-format
msgid ""
" --arm9gdb=PORT_NUM Enable the ARM9 GDB stub on the given port\n"
" --arm7gdb=PORT_NUM Enable the ARM7 GDB stub on the given port\n"
"\n"
msgstr ""
#: ../src/gtk-glade/main.cpp:175
#, c-format
msgid " --help Display this message\n"
msgstr " --help 顯示這份幫助訊息\n"
#: ../src/gtk-glade/main.cpp:188
#, c-format
msgid "I only know how to load from slots 1-10.\n"
msgstr "即時存檔的編號只能介於 1 到 10 之間\n"
#: ../src/gtk-glade/main.cpp:212
#, c-format
msgid "Supported 3d engines: 0, 1, and on some machines 2; use --help option for details\n"
msgstr "可用的3D引擎有: 0, 1, 在某些機器上可能可以用2; 你可以用 --help 選項查看詳細說明\n"
#: ../src/gtk-glade/main.cpp:224
#, c-format
msgid "select savetype from 0 to 6; use --help option for details\n"
msgstr "記憶卡的類型只能介於 0 到 6之間; 你可以用 --help 選項查看詳細說明\n"
#: ../src/gtk-glade/main.cpp:236
#, c-format
msgid "Firmware language must be set to a value from 0 to 5.\n"
msgstr "韌體語言必須設定 0 到 5 之間的值\n"
#: ../src/gtk-glade/main.cpp:249
#, c-format
msgid "ARM9 GDB stub port must be in the range 1 to 65535\n"
msgstr ""
#: ../src/gtk-glade/main.cpp:261
#, c-format
msgid "ARM7 GDB stub port must be in the range 1 to 65535\n"
msgstr ""
#: ../src/gtk-glade/main.cpp:274
#, c-format
msgid "NDS file (\"%s\") already set\n"
msgstr "NDS檔 (\"%s\") 已經設定\n"
#: ../src/gtk-glade/main.cpp:287
#, c-format
msgid "USAGE: %s [options] [nds-file]\n"
msgstr "使用方式: %s [選項] [nds檔]\n"
#: ../src/gtk-glade/main.cpp:288
#, c-format
msgid "USAGE: %s --help - for help\n"
msgstr "使用方式: %s --help - 顯示幫助訊息\n"
#: ../src/gtk-glade/main.cpp:466
#, c-format
msgid "Failed to create ARM9 gdbstub on port %d\n"
msgstr ""
#: ../src/gtk-glade/main.cpp:477
#, c-format
msgid "Failed to create ARM7 gdbstub on port %d\n"
msgstr ""
#: ../src/gtk-glade/main.cpp:486
#, c-format
msgid "Error trying to initialize SDL: %s\n"
msgstr "SDL 初始化錯誤: %s\n"
#: ../src/gtk-glade/main.cpp:569
#, c-format
msgid "Failed to initialise openGL 3D emulation; removing 3D support\n"
msgstr "無法初始化 OpenGL 3D 模擬。取消 3D 支援\n"
#: ../src/gtk-glade/main.cpp:576
#, c-format
msgid "Failed to setup 3D engine; removing 3D support\n"
msgstr "無法設定 OpenGL 3D 模擬; 取消 3D 支援\n"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:1
msgid "0"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:2
msgid "1"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:3
msgid "1x"
msgstr "原始大小"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:4
msgid "2"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:5
msgid "2x"
msgstr "2倍"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:6
msgid "3"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:7
msgid "3D operation detected"
msgstr "偵測到 3D 操作"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:8
msgid "3D rom"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:9
msgid "3x"
msgstr "3倍"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:10
msgid "4"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:11
msgid "5"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:12
msgid "6"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:13
msgid "7"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:14
msgid "8"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:15
msgid "9"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:16
msgid "?"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:17
msgid "A : "
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:18
msgid "Audio On"
msgstr "開啟音效"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:19
msgid "Axis :"
msgstr "方向軸 :"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:20
msgid "B : "
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:21
msgid "BG0"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:22
msgid "BG1"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:23
msgid "BG2"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:24
msgid "BG3"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:25
msgid "Boost : "
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:26
msgid "Config"
msgstr "設定"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:27
msgid "DeSmuME"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:28
msgid "Debug : "
msgstr "除錯 :"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:29
msgid "Down : "
msgstr "下 :"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:30
msgid "FrameSkip"
msgstr "畫面跳過"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:31
msgid "IO regs"
msgstr "IO 暫存器"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:32
msgid "Joystick Config"
msgstr "搖桿設定"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:33
msgid "Joystick controls"
msgstr "搖桿控制"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:34
msgid "Key definition"
msgstr "按鍵定義"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:35
msgid "Keyboard Config"
msgstr "鍵盤設定"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:36
msgid "Keyboard controls"
msgstr "鍵盤控制"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:37
msgid "L : "
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:38
msgid "Layers"
msgstr "圖層"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:39
msgid "Left : "
msgstr "左 :"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:40
msgid "Load State"
msgstr "讀取即時存檔"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:41
msgid "Nintendo DS emulator based on work by Yopyop"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:42
msgid "No Gap"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:43
msgid "OBJ"
msgstr "物件"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:44
msgid "Press a button..."
msgstr "請按一個按鈕..."
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:45
msgid "Press a key..."
msgstr "請按一個按鍵..."
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:46
msgid "R : "
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:47
msgid "Reset"
msgstr "重新啟動"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:48
msgid "Right : "
msgstr "右 :"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:49
msgid "Right Screen"
msgstr "視窗水平排列"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:50
msgid "Rotate Screen 0"
msgstr "螢幕旋轉 0 度"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:51
msgid "Rotate Screen 180"
msgstr "螢幕旋轉 180 度"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:52
msgid "Rotate Screen 270"
msgstr "螢幕旋轉 270 度"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:53
msgid "Rotate Screen 90"
msgstr "螢幕旋轉 90 度"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:54
msgid "Save State"
msgstr "即時存檔"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:55
msgid "Select : "
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:56
msgid "Size"
msgstr "大小"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:57
msgid "Start : "
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:58
msgid "State 1"
msgstr "存檔 1"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:59
msgid "State 10"
msgstr "存檔 10"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:60
msgid "State 2"
msgstr "存檔 2"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:61
msgid "State 3"
msgstr "存檔 3"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:62
msgid "State 4"
msgstr "存檔 4"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:63
msgid "State 5"
msgstr "存檔 5"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:64
msgid "State 6"
msgstr "存檔 6"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:65
msgid "State 7"
msgstr "存檔 7"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:66
msgid "State 8"
msgstr "存檔 8"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:67
msgid "State 9"
msgstr "存檔 9"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:68
msgid "TYPE: Auto (1B)"
msgstr "TYPE: 自動選擇 (1B)"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:69
msgid "TYPE: EEPROM1 (4kB)"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:70
msgid "TYPE: EEPROM2 (512kB)"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:71
msgid "TYPE: EEPROM2 (64kB)"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:72
msgid "TYPE: FLASH (256kB)"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:73
msgid "TYPE: FRAM (2MB)"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:74
msgid "TYPE: FRAM (4MB)"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:75
msgid "Tools"
msgstr "工具"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:76
msgid "True Gap"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:77
msgid "Up : "
msgstr "上 :"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:78
msgid "View Memory"
msgstr "檢視記憶體"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:79
msgid "View Palette"
msgstr "檢視調色盤"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:80
msgid "View Tiles"
msgstr "檢視物件"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:81
msgid "X : "
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:82
msgid "Y : "
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:83
msgid "_Emulation"
msgstr "模擬器 (_E)"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:84
msgid "_File"
msgstr "檔案 (_F)"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:85
msgid "_PrintScreen"
msgstr "截圖 (_P)"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:86
msgid "_Saves"
msgstr "存檔 (_S)"
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:87
msgid "http://desmume.org"
msgstr ""
#. TRANSLATORS: Replace this string with your names, one name per line.
#: ../src/gtk-glade/glade/DeSmuMe.glade.h:89
msgid "translator-credits"
msgstr "Ronmi Ren <ronmi@rmi.twbbs.org>"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:1
msgid " GoTo: "
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:2
msgid " Palette : "
msgstr "調色盤:"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:3
msgid "16 bit"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:4
msgid "16c"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:5
msgid "256c"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:6
msgid "32 bit"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:7
msgid "8 bit"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:8
msgid ""
"ARM9 cpu\n"
"ARM7 cpu"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:10
msgid "BMP"
msgstr ""
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:11
msgid "Go!"
msgstr "執行"
#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:12
msgid ""
"cpu : ARM9\n"
"cpu : ARM7"
msgstr ""
#~ msgid "Error trying to start FPS limiter timer: %s\n"
#~ msgstr "無法啟始 fps 限制的計時器: %s\n"

View File

@ -0,0 +1,4 @@
root = true
[*]
indent_style = tab

392
desmume/src/Database.cpp Normal file
View File

@ -0,0 +1,392 @@
/*
Copyright (C) 2008-2021 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with the this software. If not, see <http://www.gnu.org/licenses/>.
*/
#include <string.h>
#include "types.h"
#include "Database.h"
#include "retro_miscellaneous.h"
//------------------------------------------------------------
//large databases are first. scroll down to ENDLARGE to find the code
struct MAKER
{
u16 code;
const char* name;
};
static const char regions_index[] = "JPFSEODIRKHXVWUC";
static const char *regions[] = {
"JPN", // J
"EUR", // P
"FRA", // F
"ESP", // S
"USA", // E
"INT", // O
"NOE", // D
"ITA", // I
"RUS", // R
"KOR", // K
"HOL", // H
"EUU", // X
"EUU", // V
"EUU", // W
"AUS", // U
"CHN", // C
};
static MAKER makerCodes[] = {
{ 0x3130, "Nintendo" },
{ 0x3230, "Rocket Games, Ajinomoto" },
{ 0x3330, "Imagineer-Zoom" },
{ 0x3430, "Gray Matter?" },
{ 0x3530, "Zamuse" },
{ 0x3630, "Falcom" },
{ 0x3730, "Enix?" },
{ 0x3830, "Capcom" },
{ 0x3930, "Hot B Co." },
{ 0x4130, "Jaleco" },
{ 0x4230, "Coconuts Japan" },
{ 0x4330, "Coconuts Japan/G.X.Media" },
{ 0x4430, "Micronet?" },
{ 0x4530, "Technos" },
{ 0x4630, "Mebio Software" },
{ 0x4730, "Shouei System" },
{ 0x4830, "Starfish" },
{ 0x4A30, "Mitsui Fudosan/Dentsu" },
{ 0x4C30, "Warashi Inc." },
{ 0x4E30, "Nowpro" },
{ 0x5030, "Game Village" },
{ 0x3031, "?????????????" },
{ 0x3231, "Infocom" },
{ 0x3331, "Electronic Arts Japan" },
{ 0x3531, "Cobra Team" },
{ 0x3631, "Human/Field" },
{ 0x3731, "KOEI" },
{ 0x3831, "Hudson Soft" },
{ 0x3931, "S.C.P." },
{ 0x4131, "Yanoman" },
{ 0x4331, "Tecmo Products" },
{ 0x4431, "Japan Glary Business" },
{ 0x4531, "Forum/OpenSystem" },
{ 0x4631, "Virgin Games" },
{ 0x4731, "SMDE" },
{ 0x4A31, "Daikokudenki" },
{ 0x5031, "Creatures Inc." },
{ 0x5131, "TDK Deep Impresion" },
{ 0x3032, "Destination Software, KSS" },
{ 0x3132, "Sunsoft/Tokai Engineering??" },
{ 0x3232, "POW, VR 1 Japan??" },
{ 0x3332, "Micro World" },
{ 0x3532, "San-X" },
{ 0x3632, "Enix" },
{ 0x3732, "Loriciel/Electro Brain" },
{ 0x3832, "Kemco Japan" },
{ 0x3932, "Seta" },
{ 0x4132, "Culture Brain" },
{ 0x4332, "Palsoft" },
{ 0x4432, "Visit Co.,Ltd." },
{ 0x4532, "Intec" },
{ 0x4632, "System Sacom" },
{ 0x4732, "Poppo" },
{ 0x4832, "Ubisoft Japan" },
{ 0x4A32, "Media Works" },
{ 0x4B32, "NEC InterChannel" },
{ 0x4C32, "Tam" },
{ 0x4D32, "Jordan" },
{ 0x4E32, "Smilesoft ???, Rocket ???" },
{ 0x5132, "Mediakite" },
{ 0x3033, "Viacom" },
{ 0x3133, "Carrozzeria" },
{ 0x3233, "Dynamic" },
{ 0x3433, "Magifact" },
{ 0x3533, "Hect" },
{ 0x3633, "Codemasters" },
{ 0x3733, "Taito/GAGA Communications" },
{ 0x3833, "Laguna" },
{ 0x3933, "Telstar Fun & Games, Event/Taito" },
{ 0x4233, "Arcade Zone Ltd" },
{ 0x4333, "Entertainment International/Empire Software?" },
{ 0x4433, "Loriciel" },
{ 0x4533, "Gremlin Graphics" },
{ 0x4633, "K.Amusement Leasing Co." },
{ 0x3034, "Seika Corp." },
{ 0x3134, "Ubi Soft Entertainment" },
{ 0x3234, "Sunsoft US?" },
{ 0x3434, "Life Fitness" },
{ 0x3634, "System 3" },
{ 0x3734, "Spectrum Holobyte" },
{ 0x3934, "IREM" },
{ 0x4234, "Raya Systems" },
{ 0x4334, "Renovation Products" },
{ 0x4434, "Malibu Games" },
{ 0x4634, "Eidos (was U.S. Gold <=1995)" },
{ 0x4734, "Playmates Interactive?" },
{ 0x4A34, "Fox Interactive" },
{ 0x4B34, "Time Warner Interactive" },
{ 0x5134, "Disney Interactive" },
{ 0x5334, "Black Pearl" },
{ 0x5534, "Advanced Productions" },
{ 0x5834, "GT Interactive" },
{ 0x5934, "RARE?" },
{ 0x5A34, "Crave Entertainment" },
{ 0x3035, "Absolute Entertainment" },
{ 0x3135, "Acclaim" },
{ 0x3235, "Activision" },
{ 0x3335, "American Sammy" },
{ 0x3435, "Take 2 Interactive (before it was GameTek)" },
{ 0x3535, "Hi Tech" },
{ 0x3635, "LJN LTD." },
{ 0x3835, "Mattel" },
{ 0x4135, "Mindscape, Red Orb Entertainment?" },
{ 0x4235, "Romstar" },
{ 0x4335, "Taxan" },
{ 0x4435, "Midway (before it was Tradewest)" },
{ 0x4635, "American Softworks" },
{ 0x4735, "Majesco Sales Inc" },
{ 0x4835, "3DO" },
{ 0x4B35, "Hasbro" },
{ 0x4C35, "NewKidCo" },
{ 0x4D35, "Telegames" },
{ 0x4E35, "Metro3D" },
{ 0x5035, "Vatical Entertainment" },
{ 0x5135, "LEGO Media" },
{ 0x5335, "Xicat Interactive" },
{ 0x5435, "Cryo Interactive" },
{ 0x5735, "Red Storm Entertainment" },
{ 0x5835, "Microids" },
{ 0x5A35, "Conspiracy/Swing" },
{ 0x3036, "Titus" },
{ 0x3136, "Virgin Interactive" },
{ 0x3236, "Maxis" },
{ 0x3436, "LucasArts Entertainment" },
{ 0x3736, "Ocean" },
{ 0x3936, "Electronic Arts" },
{ 0x4236, "Laser Beam" },
{ 0x4536, "Elite Systems" },
{ 0x4636, "Electro Brain" },
{ 0x4736, "The Learning Company" },
{ 0x4836, "BBC" },
{ 0x4A36, "Software 2000" },
{ 0x4C36, "BAM! Entertainment" },
{ 0x4D36, "Studio 3" },
{ 0x5136, "Classified Games" },
{ 0x5336, "TDK Mediactive" },
{ 0x5536, "DreamCatcher" },
{ 0x5636, "JoWood Produtions" },
{ 0x5736, "SEGA" },
{ 0x5836, "Wannado Edition" },
{ 0x5936, "LSP" },
{ 0x5A36, "ITE Media" },
{ 0x3037, "Infogrames" },
{ 0x3137, "Interplay" },
{ 0x3237, "JVC" },
{ 0x3337, "Parker Brothers" },
{ 0x3537, "Sales Curve" },
{ 0x3837, "THQ" },
{ 0x3937, "Accolade" },
{ 0x4137, "Triffix Entertainment" },
{ 0x4337, "Microprose Software" },
{ 0x4437, "Universal Interactive, Sierra, Simon & Schuster?" },
{ 0x4637, "Kemco" },
{ 0x4737, "Rage Software" },
{ 0x4837, "Encore" },
{ 0x4A37, "Zoo" },
{ 0x4B37, "BVM" },
{ 0x4C37, "Simon & Schuster Interactive" },
{ 0x4D37, "Asmik Ace Entertainment Inc./AIA" },
{ 0x4E37, "Empire Interactive?" },
{ 0x5137, "Jester Interactive" },
{ 0x5437, "Scholastic" },
{ 0x5537, "Ignition Entertainment" },
{ 0x5737, "Stadlbauer" },
{ 0x3038, "Misawa" },
{ 0x3138, "Teichiku" },
{ 0x3238, "Namco Ltd." },
{ 0x3338, "LOZC" },
{ 0x3438, "KOEI" },
{ 0x3638, "Tokuma Shoten Intermedia" },
{ 0x3738, "Tsukuda Original" },
{ 0x3838, "DATAM-Polystar" },
{ 0x4238, "Bulletproof Software" },
{ 0x4338, "Vic Tokai Inc." },
{ 0x4538, "Character Soft" },
{ 0x4638, "I'Max" },
{ 0x4738, "Saurus" },
{ 0x4A38, "General Entertainment" },
{ 0x4E38, "Success" },
{ 0x5038, "SEGA Japan" },
{ 0x3039, "Takara Amusement" },
{ 0x3139, "Chun Soft" },
{ 0x3239, "Video System, McO'River???" },
{ 0x3339, "BEC" },
{ 0x3539, "Varie" },
{ 0x3639, "Yonezawa/S'pal" },
{ 0x3739, "Kaneko" },
{ 0x3939, "Victor Interactive Software, Pack in Video" },
{ 0x4139, "Nichibutsu/Nihon Bussan" },
{ 0x4239, "Tecmo" },
{ 0x4339, "Imagineer" },
{ 0x4639, "Nova" },
{ 0x4739, "Den'Z" },
{ 0x4839, "Bottom Up" },
{ 0x4A39, "TGL" },
{ 0x4C39, "Hasbro Japan?" },
{ 0x4E39, "Marvelous Entertainment" },
{ 0x5039, "Keynet Inc." },
{ 0x5139, "Hands-On Entertainment" },
{ 0x3041, "Telenet" },
{ 0x3141, "Hori" },
{ 0x3441, "Konami" },
{ 0x3541, "K.Amusement Leasing Co." },
{ 0x3641, "Kawada" },
{ 0x3741, "Takara" },
{ 0x3941, "Technos Japan Corp." },
{ 0x4141, "JVC, Victor Musical Indutries" },
{ 0x4341, "Toei Animation" },
{ 0x4441, "Toho" },
{ 0x4641, "Namco" },
{ 0x4741, "Media Rings Corporation" },
{ 0x4841, "J-Wing" },
{ 0x4A41, "Pioneer LDC" },
{ 0x4B41, "KID" },
{ 0x4C41, "Mediafactory" },
{ 0x5041, "Infogrames Hudson" },
{ 0x5141, "Kiratto. Ludic Inc" },
{ 0x3042, "Acclaim Japan" },
{ 0x3142, "ASCII (was Nexoft?)" },
{ 0x3242, "Bandai" },
{ 0x3442, "Enix" },
{ 0x3642, "HAL Laboratory" },
{ 0x3742, "SNK" },
{ 0x3942, "Pony Canyon" },
{ 0x4142, "Culture Brain" },
{ 0x4242, "Sunsoft" },
{ 0x4342, "Toshiba EMI" },
{ 0x4442, "Sony Imagesoft" },
{ 0x4642, "Sammy" },
{ 0x4742, "Magical" },
{ 0x4842, "Visco" },
{ 0x4A42, "Compile " },
{ 0x4C42, "MTO Inc." },
{ 0x4E42, "Sunrise Interactive" },
{ 0x5042, "Global A Entertainment" },
{ 0x5142, "Fuuki" },
{ 0x3043, "Taito" },
{ 0x3243, "Kemco" },
{ 0x3343, "Square" },
{ 0x3443, "Tokuma Shoten" },
{ 0x3543, "Data East" },
{ 0x3643, "Tonkin House (was Tokyo Shoseki)" },
{ 0x3843, "Koei" },
{ 0x4143, "Konami/Ultra/Palcom" },
{ 0x4243, "NTVIC/VAP" },
{ 0x4343, "Use Co.,Ltd." },
{ 0x4443, "Meldac" },
{ 0x4543, "Pony Canyon" },
{ 0x4643, "Angel, Sotsu Agency/Sunrise" },
{ 0x4A43, "Boss" },
{ 0x4743, "Yumedia/Aroma Co., Ltd" },
{ 0x4B43, "Axela/Crea-Tech?" },
{ 0x4C43, "Sekaibunka-Sha, Sumire kobo?, Marigul Management Inc.?" },
{ 0x4D43, "Konami Computer Entertainment Osaka" },
{ 0x5043, "Enterbrain" },
{ 0x3044, "Taito/Disco" },
{ 0x3144, "Sofel" },
{ 0x3244, "Quest, Bothtec" },
{ 0x3344, "Sigma, ?????" },
{ 0x3444, "Ask Kodansha" },
{ 0x3644, "Naxat" },
{ 0x3744, "Copya System" },
{ 0x3844, "Capcom Co., Ltd." },
{ 0x3944, "Banpresto" },
{ 0x4144, "TOMY" },
{ 0x4244, "LJN Japan" },
{ 0x4444, "NCS" },
{ 0x4544, "Human Entertainment" },
{ 0x4644, "Altron" },
{ 0x4744, "Jaleco???" },
{ 0x4844, "Gaps Inc." },
{ 0x4C44, "????" },
{ 0x4E44, "Elf" },
{ 0x3045, "Jaleco" },
{ 0x3145, "????" },
{ 0x3245, "Yutaka" },
{ 0x3345, "Varie" },
{ 0x3445, "T&ESoft" },
{ 0x3545, "Epoch" },
{ 0x3745, "Athena" },
{ 0x3845, "Asmik" },
{ 0x3945, "Natsume" },
{ 0x4145, "King Records" },
{ 0x4245, "Atlus" },
{ 0x4345, "Epic/Sony Records" },
{ 0x4545, "IGS" },
{ 0x4745, "Chatnoir" },
{ 0x4845, "Right Stuff" },
{ 0x4C45, "Spike" },
{ 0x4D45, "Konami Computer Entertainment Tokyo" },
{ 0x4E45, "Alphadream Corporation" },
{ 0x3046, "A Wave" },
{ 0x3146, "Motown Software" },
{ 0x3246, "Left Field Entertainment" },
{ 0x3346, "Extreme Ent. Grp." },
{ 0x3446, "TecMagik" },
{ 0x3946, "Cybersoft" },
{ 0x4246, "Psygnosis" },
{ 0x4546, "Davidson/Western Tech." },
{ 0x3147, "PCCW Japan" },
{ 0x3447, "KiKi Co Ltd" },
{ 0x3547, "Open Sesame Inc???" },
{ 0x3647, "Sims" },
{ 0x3747, "Broccoli" },
{ 0x3847, "Avex" },
{ 0x3947, "D3 Publisher" },
{ 0x4247, "Konami Computer Entertainment Japan" },
{ 0x4447, "Square-Enix" },
{ 0x4849, "Yojigen" },
};
//------------------------------------------------------------
//ENDLARGE
//------------------------------------------------------------
namespace Database
{
const char* RegionXXXForCode(char code, bool unknownAsString)
{
size_t regions_num = ARRAY_SIZE(regions);
const char* found = strchr(regions_index,code);
if(found && found-regions_index < strlen(regions_index)) return regions[found-regions_index];
else return unknownAsString ? "???" : NULL;
}
const char *MakerNameForMakerCode(u16 id, bool unknownAsString)
{
//too bad these aren't sorted
for (size_t i = 0; i < ARRAY_SIZE(makerCodes); i++)
{
if (makerCodes[i].code == id)
return makerCodes[i].name;
}
return unknownAsString ? "Unknown" : NULL;
}
}

10
desmume/src/Database.h Normal file
View File

@ -0,0 +1,10 @@
#ifndef DESMUME_DATABASE_H_
#define DESMUME_DATABASE_H_
namespace Database
{
const char* RegionXXXForCode(char code, bool unknownAsString);
const char* MakerNameForMakerCode(u16 id, bool unknownAsString);
};
#endif

244
desmume/src/FIFO.cpp Normal file → Executable file
View File

@ -1,7 +1,7 @@
/*
Copyright 2006 yopyop
Copyright 2007 shash
Copyright 2007-2012 DeSmuME team
Copyright 2007-2024 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -18,14 +18,39 @@
*/
#include "FIFO.h"
#include <string.h>
#include "armcpu.h"
#include "debug.h"
#include "mem.h"
#include "MMU.h"
#include "registers.h"
#include "NDSSystem.h"
#include "gfx3d.h"
#if defined(ENABLE_AVX512_1)
#define USEVECTORSIZE_512
#define VECTORSIZE 64
#elif defined(ENABLE_AVX2)
#define USEVECTORSIZE_256
#define VECTORSIZE 32
#elif defined(ENABLE_SSE2)
#define USEVECTORSIZE_128
#define VECTORSIZE 16
#elif defined(ENABLE_NEON_A64)
#define USEVECTORSIZE_128
#define VECTORSIZE 16
#elif defined(ENABLE_ALTIVEC)
#define USEVECTORSIZE_128
#define VECTORSIZE 16
#endif
#if defined(USEVECTORSIZE_512) || defined(USEVECTORSIZE_256) || defined(USEVECTORSIZE_128)
#define USEMANUALVECTORIZATION
#endif
// ========================================================= IPC FIFO
IPC_FIFO ipc_fifo[2];
@ -234,6 +259,15 @@ void GFX_FIFOsend(u8 cmd, u32 param)
if(IsMatrixStackCommand(cmd))
gxFIFO.matrix_stack_op_size++;
//along the same lines:
//american girls julie finds a way will put a bunch of stuff and then a box test into the fifo and then immediately test the busy flag
//so we need to set the busy flag here.
//does it expect the fifo to be running then? well, it's definitely jammed -- making it unjammed at one point did fix this bug.
//it's still not clear whether we're handling the immediate vs fifo commands properly at all :(
//anyway, here we go, similar treatment. consider this a hack.
if(cmd == 0x70) MMU_new.gxstat.tb = 1; //just set the flag--youre insane if you queue more than one of these anyway
if(cmd == 0x71) MMU_new.gxstat.tb = 1;
if(gxFIFO.size>=HACK_GXIFO_SIZE) {
printf("--FIFO FULL-- : %d\n",gxFIFO.size);
}
@ -294,32 +328,222 @@ void GFX_FIFOcnt(u32 val)
// val &= 0xFFFF5FFF; // clear reset (bit15) & stack level (bit13)
//}
T1WriteLong(MMU.MMU_MEM[ARMCPU_ARM9][0x40], 0x600, val);
T1WriteLong(MMU.ARM9_REG, 0x600, val);
}
// ========================================================= DISP FIFO
DISP_FIFO disp_fifo;
DISP_FIFO disp_fifo;
void DISP_FIFOinit()
{
memset(&disp_fifo, 0, sizeof(DISP_FIFO));
}
void DISP_FIFOsend(u32 val)
template <typename T, size_t ADDROFFSET>
void DISP_FIFOsend(const T val)
{
//INFO("DISP_FIFO send value 0x%08X (head 0x%06X, tail 0x%06X)\n", val, disp_fifo.head, disp_fifo.tail);
disp_fifo.buf[disp_fifo.tail] = val;
disp_fifo.tail++;
if (disp_fifo.tail > 0x5FFF)
const size_t numBytes = sizeof(T);
const size_t baseWriteAddress = disp_fifo.tail * sizeof(u32);
const size_t finalWriteAddress = baseWriteAddress + ADDROFFSET;
switch (numBytes)
{
case 1:
{
#ifndef MSB_FIRST
HostWriteByte((u8 *)disp_fifo.buf, (u32)finalWriteAddress, val);
#else
switch (ADDROFFSET)
{
case 0:
HostWriteByte((u8 *)disp_fifo.buf, (u32)baseWriteAddress + 2, val);
break;
case 1:
HostWriteByte((u8 *)disp_fifo.buf, (u32)baseWriteAddress + 3, val);
break;
case 2:
HostWriteByte((u8 *)disp_fifo.buf, (u32)baseWriteAddress + 0, val);
break;
case 3:
HostWriteByte((u8 *)disp_fifo.buf, (u32)baseWriteAddress + 1, val);
break;
default:
break;
}
#endif
#ifndef MSB_FIRST
if (ADDROFFSET == 3)
#else
if (ADDROFFSET == 1)
#endif
{
disp_fifo.tail++;
}
break;
}
case 2:
{
#ifndef MSB_FIRST
HostWriteWord((u8 *)disp_fifo.buf, (u32)finalWriteAddress, val);
#else
switch (ADDROFFSET)
{
case 0:
HostWriteWord((u8 *)disp_fifo.buf, (u32)baseWriteAddress + 2, val);
break;
case 2:
HostWriteWord((u8 *)disp_fifo.buf, (u32)baseWriteAddress + 0, val);
break;
default:
break;
}
#endif
#ifndef MSB_FIRST
if (ADDROFFSET == 2)
#else
if (ADDROFFSET == 0)
#endif
{
disp_fifo.tail++;
}
break;
}
case 4:
HostWriteTwoWords((u8 *)disp_fifo.buf, (u32)finalWriteAddress, val);
disp_fifo.tail++;
break;
default:
break;
}
if (disp_fifo.tail >= 0x6000)
{
disp_fifo.tail = 0;
}
}
u32 DISP_FIFOrecv()
u32 DISP_FIFOrecv_u32()
{
//if (disp_fifo.tail == disp_fifo.head) return (0); // FIFO is empty
u32 val = disp_fifo.buf[disp_fifo.head];
disp_fifo.head++;
if (disp_fifo.head > 0x5FFF)
if (disp_fifo.head >= 0x6000)
{
disp_fifo.head = 0;
return (val);
}
return val;
}
static void _DISP_FIFOrecv_LineAdvance()
{
disp_fifo.head += (GPU_FRAMEBUFFER_NATIVE_WIDTH * sizeof(u16)) / sizeof(u32);
if (disp_fifo.head >= 0x6000)
{
disp_fifo.head -= 0x6000;
}
}
void DISP_FIFOrecv_Line16(u16 *__restrict dst)
{
#ifdef USEMANUALVECTORIZATION
if ( (disp_fifo.head + (GPU_FRAMEBUFFER_NATIVE_WIDTH * sizeof(u16)) / sizeof(u32) <= 0x6000) && (disp_fifo.head == (disp_fifo.head & ~(VECTORSIZE - 1))) )
{
buffer_copy_fast<GPU_FRAMEBUFFER_NATIVE_WIDTH * sizeof(u16)>(dst, disp_fifo.buf + disp_fifo.head);
_DISP_FIFOrecv_LineAdvance();
}
else
#endif // USEMANUALVECTORIZATION
{
for (size_t i = 0; i < GPU_FRAMEBUFFER_NATIVE_WIDTH * sizeof(u16) / sizeof(u32); i++)
{
const u32 src = DISP_FIFOrecv_u32();
((u32 *)dst)[i] = src;
}
}
}
template <NDSColorFormat OUTPUTFORMAT>
void DISP_FIFOrecv_LineOpaque(u32 *__restrict dst)
{
#ifdef USEMANUALVECTORIZATION
if ( (disp_fifo.head + (GPU_FRAMEBUFFER_NATIVE_WIDTH * sizeof(u16)) / sizeof(u32) <= 0x6000) && (disp_fifo.head == (disp_fifo.head & ~(VECTORSIZE - 1))) )
{
if (OUTPUTFORMAT == NDSColorFormat_BGR555_Rev)
{
buffer_copy_or_constant_s16_fast<GPU_FRAMEBUFFER_NATIVE_WIDTH * sizeof(u16), false>(dst, disp_fifo.buf + disp_fifo.head, 0x8000);
}
else if (OUTPUTFORMAT == NDSColorFormat_BGR666_Rev)
{
ColorspaceConvertBuffer555xTo6665Opaque<false, false, BESwapDst>((u16 *)(disp_fifo.buf + disp_fifo.head), dst, GPU_FRAMEBUFFER_NATIVE_WIDTH);
}
else if (OUTPUTFORMAT == NDSColorFormat_BGR888_Rev)
{
ColorspaceConvertBuffer555xTo8888Opaque<false, false, BESwapDst>((u16 *)(disp_fifo.buf + disp_fifo.head), dst, GPU_FRAMEBUFFER_NATIVE_WIDTH);
}
_DISP_FIFOrecv_LineAdvance();
}
else
#endif // USEMANUALVECTORIZATION
{
if (OUTPUTFORMAT == NDSColorFormat_BGR555_Rev)
{
for (size_t i = 0; i < GPU_FRAMEBUFFER_NATIVE_WIDTH * sizeof(u16) / sizeof(u32); i++)
{
const u32 src = DISP_FIFOrecv_u32();
dst[i] = src | 0x80008000;
}
}
else
{
for (size_t i = 0; i < GPU_FRAMEBUFFER_NATIVE_WIDTH; i+=2)
{
const u32 src = DISP_FIFOrecv_u32();
if (OUTPUTFORMAT == NDSColorFormat_BGR666_Rev)
{
dst[i+0] = LE_TO_LOCAL_32( ColorspaceConvert555To6665Opaque<false>((src >> 0) & 0x7FFF) );
dst[i+1] = LE_TO_LOCAL_32( ColorspaceConvert555To6665Opaque<false>((src >> 16) & 0x7FFF) );
}
else if (OUTPUTFORMAT == NDSColorFormat_BGR888_Rev)
{
dst[i+0] = LE_TO_LOCAL_32( ColorspaceConvert555To8888Opaque<false>((src >> 0) & 0x7FFF) );
dst[i+1] = LE_TO_LOCAL_32( ColorspaceConvert555To8888Opaque<false>((src >> 16) & 0x7FFF) );
}
}
}
}
}
void DISP_FIFOreset()
{
disp_fifo.head = 0;
disp_fifo.tail = 0;
}
template void DISP_FIFOsend< u8, 0>(const u8 val);
template void DISP_FIFOsend< u8, 1>(const u8 val);
template void DISP_FIFOsend< u8, 2>(const u8 val);
template void DISP_FIFOsend< u8, 3>(const u8 val);
template void DISP_FIFOsend<u16, 0>(const u16 val);
template void DISP_FIFOsend<u16, 2>(const u16 val);
template void DISP_FIFOsend<u32, 0>(const u32 val);
template void DISP_FIFOrecv_LineOpaque<NDSColorFormat_BGR555_Rev>(u32 *__restrict dst);
template void DISP_FIFOrecv_LineOpaque<NDSColorFormat_BGR666_Rev>(u32 *__restrict dst);
template void DISP_FIFOrecv_LineOpaque<NDSColorFormat_BGR888_Rev>(u32 *__restrict dst);

View File

@ -1,91 +1,98 @@
/*
Copyright 2006 yopyop
Copyright 2007 shash
Copyright 2007-2011 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with the this software. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef FIFO_H
#define FIFO_H
#include "types.h"
//=================================================== IPC FIFO
typedef struct
{
u32 buf[16];
u8 head;
u8 tail;
u8 size;
} IPC_FIFO;
extern IPC_FIFO ipc_fifo[2];
extern void IPC_FIFOinit(u8 proc);
extern void IPC_FIFOsend(u8 proc, u32 val);
extern u32 IPC_FIFOrecv(u8 proc);
extern void IPC_FIFOcnt(u8 proc, u16 val);
//=================================================== GFX FIFO
//yeah, its oversize for now. thats a simpler solution
//moon seems to overdrive the fifo with immediate dmas
//i think this might be nintendo code too
#define HACK_GXIFO_SIZE 200000
typedef struct
{
u8 cmd[HACK_GXIFO_SIZE];
u32 param[HACK_GXIFO_SIZE];
u32 head; // start position
u32 tail; // tail
u32 size; // size FIFO buffer
u32 matrix_stack_op_size; //number of matrix stack items in the fifo (stack is busy when this is nonzero)
} GFX_FIFO;
typedef struct
{
u8 cmd[4];
u32 param[4];
u8 head;
u8 tail;
u8 size;
} GFX_PIPE;
extern GFX_PIPE gxPIPE;
extern GFX_FIFO gxFIFO;
extern void GFX_PIPEclear();
extern void GFX_FIFOclear();
extern void GFX_FIFOsend(u8 cmd, u32 param);
extern BOOL GFX_PIPErecv(u8 *cmd, u32 *param);
extern void GFX_FIFOcnt(u32 val);
//=================================================== Display memory FIFO
typedef struct
{
u32 buf[0x6000]; // 256x192 32K color
u32 head; // head
u32 tail; // tail
} DISP_FIFO;
extern DISP_FIFO disp_fifo;
extern void DISP_FIFOinit();
extern void DISP_FIFOsend(u32 val);
extern u32 DISP_FIFOrecv();
#endif
/*
Copyright 2006 yopyop
Copyright 2007 shash
Copyright 2007-2022 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with the this software. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef FIFO_H
#define FIFO_H
#include "types.h"
#include "./utils/colorspacehandler/colorspacehandler.h"
//=================================================== IPC FIFO
typedef struct
{
u32 buf[16];
u8 head;
u8 tail;
u8 size;
} IPC_FIFO;
extern IPC_FIFO ipc_fifo[2];
extern void IPC_FIFOinit(u8 proc);
extern void IPC_FIFOsend(u8 proc, u32 val);
extern u32 IPC_FIFOrecv(u8 proc);
extern void IPC_FIFOcnt(u8 proc, u16 val);
//=================================================== GFX FIFO
//yeah, its oversize for now. thats a simpler solution
//moon seems to overdrive the fifo with immediate dmas
//i think this might be nintendo code too
#define HACK_GXIFO_SIZE 200000
typedef struct
{
u8 cmd[HACK_GXIFO_SIZE];
u32 param[HACK_GXIFO_SIZE];
u32 head; // start position
u32 tail; // tail
u32 size; // size FIFO buffer
u32 matrix_stack_op_size; //number of matrix stack items in the fifo (stack is busy when this is nonzero)
} GFX_FIFO;
typedef struct
{
u8 cmd[4];
u32 param[4];
u8 head;
u8 tail;
u8 size;
} GFX_PIPE;
extern GFX_PIPE gxPIPE;
extern GFX_FIFO gxFIFO;
void GFX_PIPEclear();
void GFX_FIFOclear();
void GFX_FIFOsend(u8 cmd, u32 param);
BOOL GFX_PIPErecv(u8 *cmd, u32 *param);
void GFX_FIFOcnt(u32 val);
//=================================================== Display memory FIFO
typedef struct
{
CACHE_ALIGN u32 buf[0x6000]; // 256x192 32K color
u32 head; // head
u32 tail; // tail
} DISP_FIFO;
extern DISP_FIFO disp_fifo;
void DISP_FIFOinit();
template<typename T, size_t ADDROFFSET> void DISP_FIFOsend(const T val);
u32 DISP_FIFOrecv_u32();
void DISP_FIFOrecv_Line16(u16 *__restrict dst);
template<NDSColorFormat OUTPUTFORMAT> void DISP_FIFOrecv_LineOpaque(u32 *__restrict dst);
void DISP_FIFOreset();
#endif

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,96 @@
/*
Copyright (C) 2021-2023 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with the this software. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GPU_OPERATIONS_H
#define GPU_OPERATIONS_H
#include <stdio.h>
#include "types.h"
#include "./utils/colorspacehandler/colorspacehandler.h"
#include "GPU.h"
template <s32 INTEGERSCALEHINT, bool SCALEVERTICAL, bool USELINEINDEX, bool NEEDENDIANSWAP, size_t ELEMENTSIZE>
void CopyLineExpandHinted(const void *__restrict srcBuffer, const size_t srcLineIndex,
void *__restrict dstBuffer, const size_t dstLineIndex, const size_t dstLineWidth, const size_t dstLineCount);
template <s32 INTEGERSCALEHINT, bool SCALEVERTICAL, bool USELINEINDEX, bool NEEDENDIANSWAP, size_t ELEMENTSIZE>
void CopyLineExpandHinted(const GPUEngineLineInfo &lineInfo, const void *__restrict srcBuffer, void *__restrict dstBuffer);
template <s32 INTEGERSCALEHINT, bool USELINEINDEX, bool NEEDENDIANSWAP, size_t ELEMENTSIZE>
void CopyLineReduceHinted(const void *__restrict srcBuffer, const size_t srcLineIndex, const size_t srcLineWidth,
void *__restrict dstBuffer, const size_t dstLineIndex);
template <s32 INTEGERSCALEHINT, bool USELINEINDEX, bool NEEDENDIANSWAP, size_t ELEMENTSIZE>
void CopyLineReduceHinted(const GPUEngineLineInfo &lineInfo, const void *__restrict srcBuffer, void *__restrict dstBuffer);
class ColorOperation
{
public:
ColorOperation() {};
FORCEINLINE u16 blend(const u16 colA, const u16 colB, const u16 blendEVA, const u16 blendEVB) const;
FORCEINLINE u16 blend(const u16 colA, const u16 colB, const TBlendTable *blendTable) const;
template<NDSColorFormat COLORFORMAT> FORCEINLINE Color4u8 blend(const Color4u8 colA, const Color4u8 colB, const u16 blendEVA, const u16 blendEVB) const;
FORCEINLINE u16 blend3D(const Color4u8 colA, const u16 colB) const;
template<NDSColorFormat COLORFORMAT> FORCEINLINE Color4u8 blend3D(const Color4u8 colA, const Color4u8 colB) const;
FORCEINLINE u16 increase(const u16 col, const u16 blendEVY) const;
template<NDSColorFormat COLORFORMAT> FORCEINLINE Color4u8 increase(const Color4u8 col, const u16 blendEVY) const;
FORCEINLINE u16 decrease(const u16 col, const u16 blendEVY) const;
template<NDSColorFormat COLORFORMAT> FORCEINLINE Color4u8 decrease(const Color4u8 col, const u16 blendEVY) const;
};
class PixelOperation
{
private:
template<GPULayerType LAYERTYPE> FORCEINLINE void __selectedEffect(const GPUEngineCompositorInfo &compInfo, const u8 &dstLayerID, const bool enableColorEffect, const u8 spriteAlpha, const OBJMode spriteMode, ColorEffect &selectedEffect, TBlendTable **selectedBlendTable, u8 &blendEVA, u8 &blendEVB) const;
protected:
template<NDSColorFormat OUTPUTFORMAT, bool ISDEBUGRENDER> FORCEINLINE void _copy16(GPUEngineCompositorInfo &compInfo, const u16 srcColor16) const;
template<NDSColorFormat OUTPUTFORMAT, bool ISDEBUGRENDER> FORCEINLINE void _copy32(GPUEngineCompositorInfo &compInfo, const Color4u8 srcColor32) const;
template<NDSColorFormat OUTPUTFORMAT> FORCEINLINE void _brightnessUp16(GPUEngineCompositorInfo &compInfo, const u16 srcColor16) const;
template<NDSColorFormat OUTPUTFORMAT> FORCEINLINE void _brightnessUp32(GPUEngineCompositorInfo &compInfo, const Color4u8 srcColor32) const;
template<NDSColorFormat OUTPUTFORMAT> FORCEINLINE void _brightnessDown16(GPUEngineCompositorInfo &compInfo, const u16 srcColor16) const;
template<NDSColorFormat OUTPUTFORMAT> FORCEINLINE void _brightnessDown32(GPUEngineCompositorInfo &compInfo, const Color4u8 srcColor32) const;
template<NDSColorFormat OUTPUTFORMAT, GPULayerType LAYERTYPE> FORCEINLINE void _unknownEffect16(GPUEngineCompositorInfo &compInfo, const u16 srcColor16, const bool enableColorEffect, const u8 spriteAlpha, const OBJMode spriteMode) const;
template<NDSColorFormat OUTPUTFORMAT, GPULayerType LAYERTYPE> FORCEINLINE void _unknownEffect32(GPUEngineCompositorInfo &compInfo, const Color4u8 srcColor32, const bool enableColorEffect, const u8 spriteAlpha, const OBJMode spriteMode) const;
public:
static CACHE_ALIGN u8 BlendTable555[17][17][32][32];
static CACHE_ALIGN u16 BrightnessUpTable555[17][0x8000];
static CACHE_ALIGN Color4u8 BrightnessUpTable666[17][0x8000];
static CACHE_ALIGN Color4u8 BrightnessUpTable888[17][0x8000];
static CACHE_ALIGN u16 BrightnessDownTable555[17][0x8000];
static CACHE_ALIGN Color4u8 BrightnessDownTable666[17][0x8000];
static CACHE_ALIGN Color4u8 BrightnessDownTable888[17][0x8000];
static void InitLUTs();
PixelOperation() {};
template <GPUCompositorMode COMPOSITORMODE, NDSColorFormat OUTPUTFORMAT, GPULayerType LAYERTYPE> FORCEINLINE void Composite16(GPUEngineCompositorInfo &compInfo, const u16 srcColor16, const bool enableColorEffect, const u8 spriteAlpha, const u8 spriteMode) const;
template <GPUCompositorMode COMPOSITORMODE, NDSColorFormat OUTPUTFORMAT, GPULayerType LAYERTYPE> FORCEINLINE void Composite32(GPUEngineCompositorInfo &compInfo, Color4u8 srcColor32, const bool enableColorEffect, const u8 spriteAlpha, const u8 spriteMode) const;
};
#endif // GPU_OPERATIONS_H

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,122 @@
/*
Copyright (C) 2021 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with the this software. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GPU_OPERATIONS_AVX2_H
#define GPU_OPERATIONS_AVX2_H
#include "GPU_Operations.h"
#ifndef ENABLE_AVX2
#warning This header requires AVX2 support.
#else
class ColorOperation_AVX2
{
public:
ColorOperation_AVX2() {};
FORCEINLINE v256u16 blend(const v256u16 &colA, const v256u16 &colB, const v256u16 &blendEVA, const v256u16 &blendEVB) const;
template<NDSColorFormat COLORFORMAT, bool USECONSTANTBLENDVALUESHINT> FORCEINLINE v256u32 blend(const v256u32 &colA, const v256u32 &colB, const v256u16 &blendEVA, const v256u16 &blendEVB) const;
FORCEINLINE v256u16 blend3D(const v256u32 &colA_Lo, const v256u32 &colA_Hi, const v256u16 &colB) const;
template<NDSColorFormat COLORFORMAT> FORCEINLINE v256u32 blend3D(const v256u32 &colA, const v256u32 &colB) const;
FORCEINLINE v256u16 increase(const v256u16 &col, const v256u16 &blendEVY) const;
template<NDSColorFormat COLORFORMAT> FORCEINLINE v256u32 increase(const v256u32 &col, const v256u16 &blendEVY) const;
FORCEINLINE v256u16 decrease(const v256u16 &col, const v256u16 &blendEVY) const;
template<NDSColorFormat COLORFORMAT> FORCEINLINE v256u32 decrease(const v256u32 &col, const v256u16 &blendEVY) const;
};
class PixelOperation_AVX2
{
protected:
template<NDSColorFormat OUTPUTFORMAT, bool ISDEBUGRENDER> FORCEINLINE void _copy16(GPUEngineCompositorInfo &compInfo, const v256u8 &srcLayerID, const v256u16 &src1, const v256u16 &src0) const;
template<NDSColorFormat OUTPUTFORMAT, bool ISDEBUGRENDER> FORCEINLINE void _copy32(GPUEngineCompositorInfo &compInfo, const v256u8 &srcLayerID, const v256u32 &src3, const v256u32 &src2, const v256u32 &src1, const v256u32 &src0) const;
template<NDSColorFormat OUTPUTFORMAT, bool ISDEBUGRENDER> FORCEINLINE void _copyMask16(GPUEngineCompositorInfo &compInfo, const v256u8 &passMask8, const v256u8 &srcLayerID, const v256u16 &src1, const v256u16 &src0) const;
template<NDSColorFormat OUTPUTFORMAT, bool ISDEBUGRENDER> FORCEINLINE void _copyMask32(GPUEngineCompositorInfo &compInfo, const v256u8 &passMask8, const v256u8 &srcLayerID, const v256u32 &src3, const v256u32 &src2, const v256u32 &src1, const v256u32 &src0) const;
template<NDSColorFormat OUTPUTFORMAT> FORCEINLINE void _brightnessUp16(GPUEngineCompositorInfo &compInfo, const v256u16 &evy16, const v256u8 &srcLayerID, const v256u16 &src1, const v256u16 &src0) const;
template<NDSColorFormat OUTPUTFORMAT> FORCEINLINE void _brightnessUp32(GPUEngineCompositorInfo &compInfo, const v256u16 &evy16, const v256u8 &srcLayerID, const v256u32 &src3, const v256u32 &src2, const v256u32 &src1, const v256u32 &src0) const;
template<NDSColorFormat OUTPUTFORMAT> FORCEINLINE void _brightnessUpMask16(GPUEngineCompositorInfo &compInfo, const v256u8 &passMask8, const v256u16 &evy16, const v256u8 &srcLayerID, const v256u16 &src1, const v256u16 &src0) const;
template<NDSColorFormat OUTPUTFORMAT> FORCEINLINE void _brightnessUpMask32(GPUEngineCompositorInfo &compInfo, const v256u8 &passMask8, const v256u16 &evy16, const v256u8 &srcLayerID, const v256u32 &src3, const v256u32 &src2, const v256u32 &src1, const v256u32 &src0) const;
template<NDSColorFormat OUTPUTFORMAT> FORCEINLINE void _brightnessDown16(GPUEngineCompositorInfo &compInfo, const v256u16 &evy16, const v256u8 &srcLayerID, const v256u16 &src1, const v256u16 &src0) const;
template<NDSColorFormat OUTPUTFORMAT> FORCEINLINE void _brightnessDown32(GPUEngineCompositorInfo &compInfo, const v256u16 &evy16, const v256u8 &srcLayerID, const v256u32 &src3, const v256u32 &src2, const v256u32 &src1, const v256u32 &src0) const;
template<NDSColorFormat OUTPUTFORMAT> FORCEINLINE void _brightnessDownMask16(GPUEngineCompositorInfo &compInfo, const v256u8 &passMask8, const v256u16 &evy16, const v256u8 &srcLayerID, const v256u16 &src1, const v256u16 &src0) const;
template<NDSColorFormat OUTPUTFORMAT> FORCEINLINE void _brightnessDownMask32(GPUEngineCompositorInfo &compInfo, const v256u8 &passMask8, const v256u16 &evy16, const v256u8 &srcLayerID, const v256u32 &src3, const v256u32 &src2, const v256u32 &src1, const v256u32 &src0) const;
template<NDSColorFormat OUTPUTFORMAT, GPULayerType LAYERTYPE>
FORCEINLINE void _unknownEffectMask16(GPUEngineCompositorInfo &compInfo,
const v256u8 &passMask8,
const v256u16 &evy16,
const v256u8 &srcLayerID,
const v256u16 &src1, const v256u16 &src0,
const v256u8 &srcEffectEnableMask,
const v256u8 &dstBlendEnableMaskLUT,
const v256u8 &enableColorEffectMask,
const v256u8 &spriteAlpha,
const v256u8 &spriteMode) const;
template<NDSColorFormat OUTPUTFORMAT, GPULayerType LAYERTYPE>
FORCEINLINE void _unknownEffectMask32(GPUEngineCompositorInfo &compInfo,
const v256u8 &passMask8,
const v256u16 &evy16,
const v256u8 &srcLayerID,
const v256u32 &src3, const v256u32 &src2, const v256u32 &src1, const v256u32 &src0,
const v256u8 &srcEffectEnableMask,
const v256u8 &dstBlendEnableMaskLUT,
const v256u8 &enableColorEffectMask,
const v256u8 &spriteAlpha,
const v256u8 &spriteMode) const;
public:
PixelOperation_AVX2() {};
template <GPUCompositorMode COMPOSITORMODE, NDSColorFormat OUTPUTFORMAT, GPULayerType LAYERTYPE, bool WILLPERFORMWINDOWTEST>
FORCEINLINE void Composite16(GPUEngineCompositorInfo &compInfo,
const bool didAllPixelsPass,
const v256u8 &passMask8,
const v256u16 &evy16,
const v256u8 &srcLayerID,
const v256u16 &src1, const v256u16 &src0,
const v256u8 &srcEffectEnableMask,
const v256u8 &dstBlendEnableMaskLUT,
const u8 *__restrict enableColorEffectPtr,
const u8 *__restrict sprAlphaPtr,
const u8 *__restrict sprModePtr) const;
template <GPUCompositorMode COMPOSITORMODE, NDSColorFormat OUTPUTFORMAT, GPULayerType LAYERTYPE, bool WILLPERFORMWINDOWTEST>
FORCEINLINE void Composite32(GPUEngineCompositorInfo &compInfo,
const bool didAllPixelsPass,
const v256u8 &passMask8,
const v256u16 &evy16,
const v256u8 &srcLayerID,
const v256u32 &src3, const v256u32 &src2, const v256u32 &src1, const v256u32 &src0,
const v256u8 &srcEffectEnableMask,
const v256u8 &dstBlendEnableMaskLUT,
const u8 *__restrict enableColorEffectPtr,
const u8 *__restrict sprAlphaPtr,
const u8 *__restrict sprModePtr) const;
};
#endif // ENABLE_AVX2
#endif // GPU_OPERATIONS_AVX2_H

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,122 @@
/*
Copyright (C) 2025 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with the this software. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GPU_OPERATIONS_NEON_H
#define GPU_OPERATIONS_NEON_H
#include "GPU_Operations.h"
#ifndef ENABLE_NEON_A64
#warning This header requires ARM64 NEON support.
#else
class ColorOperation_NEON
{
public:
ColorOperation_NEON() {};
FORCEINLINE v128u16 blend(const v128u16 &colA, const v128u16 &colB, const v128u16 &blendEVA, const v128u16 &blendEVB) const;
template<NDSColorFormat COLORFORMAT, bool USECONSTANTBLENDVALUESHINT> FORCEINLINE v128u32 blend(const v128u32 &colA, const v128u32 &colB, const v128u16 &blendEVA, const v128u16 &blendEVB) const;
FORCEINLINE v128u16 blend3D(const v128u32 &colA_Lo, const v128u32 &colA_Hi, const v128u16 &colB) const;
template<NDSColorFormat COLORFORMAT> FORCEINLINE v128u32 blend3D(const v128u32 &colA, const v128u32 &colB) const;
FORCEINLINE v128u16 increase(const v128u16 &col, const v128u16 &blendEVY) const;
template<NDSColorFormat COLORFORMAT> FORCEINLINE v128u32 increase(const v128u32 &col, const v128u16 &blendEVY) const;
FORCEINLINE v128u16 decrease(const v128u16 &col, const v128u16 &blendEVY) const;
template<NDSColorFormat COLORFORMAT> FORCEINLINE v128u32 decrease(const v128u32 &col, const v128u16 &blendEVY) const;
};
class PixelOperation_NEON
{
protected:
template<NDSColorFormat OUTPUTFORMAT, bool ISDEBUGRENDER> FORCEINLINE void _copy16(GPUEngineCompositorInfo &compInfo, const v128u8 &srcLayerID, const v128u16 &src1, const v128u16 &src0) const;
template<NDSColorFormat OUTPUTFORMAT, bool ISDEBUGRENDER> FORCEINLINE void _copy32(GPUEngineCompositorInfo &compInfo, const v128u8 &srcLayerID, const v128u32 &src3, const v128u32 &src2, const v128u32 &src1, const v128u32 &src0) const;
template<NDSColorFormat OUTPUTFORMAT, bool ISDEBUGRENDER> FORCEINLINE void _copyMask16(GPUEngineCompositorInfo &compInfo, const v128u8 &passMask8, const v128u8 &srcLayerID, const v128u16 &src1, const v128u16 &src0) const;
template<NDSColorFormat OUTPUTFORMAT, bool ISDEBUGRENDER> FORCEINLINE void _copyMask32(GPUEngineCompositorInfo &compInfo, const v128u8 &passMask8, const v128u8 &srcLayerID, const v128u32 &src3, const v128u32 &src2, const v128u32 &src1, const v128u32 &src0) const;
template<NDSColorFormat OUTPUTFORMAT> FORCEINLINE void _brightnessUp16(GPUEngineCompositorInfo &compInfo, const v128u16 &evy16, const v128u8 &srcLayerID, const v128u16 &src1, const v128u16 &src0) const;
template<NDSColorFormat OUTPUTFORMAT> FORCEINLINE void _brightnessUp32(GPUEngineCompositorInfo &compInfo, const v128u16 &evy16, const v128u8 &srcLayerID, const v128u32 &src3, const v128u32 &src2, const v128u32 &src1, const v128u32 &src0) const;
template<NDSColorFormat OUTPUTFORMAT> FORCEINLINE void _brightnessUpMask16(GPUEngineCompositorInfo &compInfo, const v128u8 &passMask8, const v128u16 &evy16, const v128u8 &srcLayerID, const v128u16 &src1, const v128u16 &src0) const;
template<NDSColorFormat OUTPUTFORMAT> FORCEINLINE void _brightnessUpMask32(GPUEngineCompositorInfo &compInfo, const v128u8 &passMask8, const v128u16 &evy16, const v128u8 &srcLayerID, const v128u32 &src3, const v128u32 &src2, const v128u32 &src1, const v128u32 &src0) const;
template<NDSColorFormat OUTPUTFORMAT> FORCEINLINE void _brightnessDown16(GPUEngineCompositorInfo &compInfo, const v128u16 &evy16, const v128u8 &srcLayerID, const v128u16 &src1, const v128u16 &src0) const;
template<NDSColorFormat OUTPUTFORMAT> FORCEINLINE void _brightnessDown32(GPUEngineCompositorInfo &compInfo, const v128u16 &evy16, const v128u8 &srcLayerID, const v128u32 &src3, const v128u32 &src2, const v128u32 &src1, const v128u32 &src0) const;
template<NDSColorFormat OUTPUTFORMAT> FORCEINLINE void _brightnessDownMask16(GPUEngineCompositorInfo &compInfo, const v128u8 &passMask8, const v128u16 &evy16, const v128u8 &srcLayerID, const v128u16 &src1, const v128u16 &src0) const;
template<NDSColorFormat OUTPUTFORMAT> FORCEINLINE void _brightnessDownMask32(GPUEngineCompositorInfo &compInfo, const v128u8 &passMask8, const v128u16 &evy16, const v128u8 &srcLayerID, const v128u32 &src3, const v128u32 &src2, const v128u32 &src1, const v128u32 &src0) const;
template<NDSColorFormat OUTPUTFORMAT, GPULayerType LAYERTYPE>
FORCEINLINE void _unknownEffectMask16(GPUEngineCompositorInfo &compInfo,
const v128u8 &passMask8,
const v128u16 &evy16,
const v128u8 &srcLayerID,
const v128u16 &src1, const v128u16 &src0,
const v128u8 &srcEffectEnableMask,
const v128u8 &dstBlendEnableMaskLUT,
const v128u8 &enableColorEffectMask,
const v128u8 &spriteAlpha,
const v128u8 &spriteMode) const;
template<NDSColorFormat OUTPUTFORMAT, GPULayerType LAYERTYPE>
FORCEINLINE void _unknownEffectMask32(GPUEngineCompositorInfo &compInfo,
const v128u8 &passMask8,
const v128u16 &evy16,
const v128u8 &srcLayerID,
const v128u32 &src3, const v128u32 &src2, const v128u32 &src1, const v128u32 &src0,
const v128u8 &srcEffectEnableMask,
const v128u8 &dstBlendEnableMaskLUT,
const v128u8 &enableColorEffectMask,
const v128u8 &spriteAlpha,
const v128u8 &spriteMode) const;
public:
PixelOperation_NEON() {};
template <GPUCompositorMode COMPOSITORMODE, NDSColorFormat OUTPUTFORMAT, GPULayerType LAYERTYPE, bool WILLPERFORMWINDOWTEST>
FORCEINLINE void Composite16(GPUEngineCompositorInfo &compInfo,
const bool didAllPixelsPass,
const v128u8 &passMask8,
const v128u16 &evy16,
const v128u8 &srcLayerID,
const v128u16 &src1, const v128u16 &src0,
const v128u8 &srcEffectEnableMask,
const v128u8 &dstBlendEnableMaskLUT,
const u8 *__restrict enableColorEffectPtr,
const u8 *__restrict sprAlphaPtr,
const u8 *__restrict sprModePtr) const;
template <GPUCompositorMode COMPOSITORMODE, NDSColorFormat OUTPUTFORMAT, GPULayerType LAYERTYPE, bool WILLPERFORMWINDOWTEST>
FORCEINLINE void Composite32(GPUEngineCompositorInfo &compInfo,
const bool didAllPixelsPass,
const v128u8 &passMask8,
const v128u16 &evy16,
const v128u8 &srcLayerID,
const v128u32 &src3, const v128u32 &src2, const v128u32 &src1, const v128u32 &src0,
const v128u8 &srcEffectEnableMask,
const v128u8 &dstBlendEnableMaskLUT,
const u8 *__restrict enableColorEffectPtr,
const u8 *__restrict sprAlphaPtr,
const u8 *__restrict sprModePtr) const;
};
#endif // ENABLE_NEON_A64
#endif // GPU_OPERATIONS_NEON_H

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,122 @@
/*
Copyright (C) 2021 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with the this software. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GPU_OPERATIONS_SSE2_H
#define GPU_OPERATIONS_SSE2_H
#include "GPU_Operations.h"
#ifndef ENABLE_SSE2
#warning This header requires SSE2 support.
#else
class ColorOperation_SSE2
{
public:
ColorOperation_SSE2() {};
FORCEINLINE v128u16 blend(const v128u16 &colA, const v128u16 &colB, const v128u16 &blendEVA, const v128u16 &blendEVB) const;
template<NDSColorFormat COLORFORMAT, bool USECONSTANTBLENDVALUESHINT> FORCEINLINE v128u32 blend(const v128u32 &colA, const v128u32 &colB, const v128u16 &blendEVA, const v128u16 &blendEVB) const;
FORCEINLINE v128u16 blend3D(const v128u32 &colA_Lo, const v128u32 &colA_Hi, const v128u16 &colB) const;
template<NDSColorFormat COLORFORMAT> FORCEINLINE v128u32 blend3D(const v128u32 &colA, const v128u32 &colB) const;
FORCEINLINE v128u16 increase(const v128u16 &col, const v128u16 &blendEVY) const;
template<NDSColorFormat COLORFORMAT> FORCEINLINE v128u32 increase(const v128u32 &col, const v128u16 &blendEVY) const;
FORCEINLINE v128u16 decrease(const v128u16 &col, const v128u16 &blendEVY) const;
template<NDSColorFormat COLORFORMAT> FORCEINLINE v128u32 decrease(const v128u32 &col, const v128u16 &blendEVY) const;
};
class PixelOperation_SSE2
{
protected:
template<NDSColorFormat OUTPUTFORMAT, bool ISDEBUGRENDER> FORCEINLINE void _copy16(GPUEngineCompositorInfo &compInfo, const v128u8 &srcLayerID, const v128u16 &src1, const v128u16 &src0) const;
template<NDSColorFormat OUTPUTFORMAT, bool ISDEBUGRENDER> FORCEINLINE void _copy32(GPUEngineCompositorInfo &compInfo, const v128u8 &srcLayerID, const v128u32 &src3, const v128u32 &src2, const v128u32 &src1, const v128u32 &src0) const;
template<NDSColorFormat OUTPUTFORMAT, bool ISDEBUGRENDER> FORCEINLINE void _copyMask16(GPUEngineCompositorInfo &compInfo, const v128u8 &passMask8, const v128u8 &srcLayerID, const v128u16 &src1, const v128u16 &src0) const;
template<NDSColorFormat OUTPUTFORMAT, bool ISDEBUGRENDER> FORCEINLINE void _copyMask32(GPUEngineCompositorInfo &compInfo, const v128u8 &passMask8, const v128u8 &srcLayerID, const v128u32 &src3, const v128u32 &src2, const v128u32 &src1, const v128u32 &src0) const;
template<NDSColorFormat OUTPUTFORMAT> FORCEINLINE void _brightnessUp16(GPUEngineCompositorInfo &compInfo, const v128u16 &evy16, const v128u8 &srcLayerID, const v128u16 &src1, const v128u16 &src0) const;
template<NDSColorFormat OUTPUTFORMAT> FORCEINLINE void _brightnessUp32(GPUEngineCompositorInfo &compInfo, const v128u16 &evy16, const v128u8 &srcLayerID, const v128u32 &src3, const v128u32 &src2, const v128u32 &src1, const v128u32 &src0) const;
template<NDSColorFormat OUTPUTFORMAT> FORCEINLINE void _brightnessUpMask16(GPUEngineCompositorInfo &compInfo, const v128u8 &passMask8, const v128u16 &evy16, const v128u8 &srcLayerID, const v128u16 &src1, const v128u16 &src0) const;
template<NDSColorFormat OUTPUTFORMAT> FORCEINLINE void _brightnessUpMask32(GPUEngineCompositorInfo &compInfo, const v128u8 &passMask8, const v128u16 &evy16, const v128u8 &srcLayerID, const v128u32 &src3, const v128u32 &src2, const v128u32 &src1, const v128u32 &src0) const;
template<NDSColorFormat OUTPUTFORMAT> FORCEINLINE void _brightnessDown16(GPUEngineCompositorInfo &compInfo, const v128u16 &evy16, const v128u8 &srcLayerID, const v128u16 &src1, const v128u16 &src0) const;
template<NDSColorFormat OUTPUTFORMAT> FORCEINLINE void _brightnessDown32(GPUEngineCompositorInfo &compInfo, const v128u16 &evy16, const v128u8 &srcLayerID, const v128u32 &src3, const v128u32 &src2, const v128u32 &src1, const v128u32 &src0) const;
template<NDSColorFormat OUTPUTFORMAT> FORCEINLINE void _brightnessDownMask16(GPUEngineCompositorInfo &compInfo, const v128u8 &passMask8, const v128u16 &evy16, const v128u8 &srcLayerID, const v128u16 &src1, const v128u16 &src0) const;
template<NDSColorFormat OUTPUTFORMAT> FORCEINLINE void _brightnessDownMask32(GPUEngineCompositorInfo &compInfo, const v128u8 &passMask8, const v128u16 &evy16, const v128u8 &srcLayerID, const v128u32 &src3, const v128u32 &src2, const v128u32 &src1, const v128u32 &src0) const;
template<NDSColorFormat OUTPUTFORMAT, GPULayerType LAYERTYPE>
FORCEINLINE void _unknownEffectMask16(GPUEngineCompositorInfo &compInfo,
const v128u8 &passMask8,
const v128u16 &evy16,
const v128u8 &srcLayerID,
const v128u16 &src1, const v128u16 &src0,
const v128u8 &srcEffectEnableMask,
const v128u8 &dstBlendEnableMaskLUT,
const v128u8 &enableColorEffectMask,
const v128u8 &spriteAlpha,
const v128u8 &spriteMode) const;
template<NDSColorFormat OUTPUTFORMAT, GPULayerType LAYERTYPE>
FORCEINLINE void _unknownEffectMask32(GPUEngineCompositorInfo &compInfo,
const v128u8 &passMask8,
const v128u16 &evy16,
const v128u8 &srcLayerID,
const v128u32 &src3, const v128u32 &src2, const v128u32 &src1, const v128u32 &src0,
const v128u8 &srcEffectEnableMask,
const v128u8 &dstBlendEnableMaskLUT,
const v128u8 &enableColorEffectMask,
const v128u8 &spriteAlpha,
const v128u8 &spriteMode) const;
public:
PixelOperation_SSE2() {};
template <GPUCompositorMode COMPOSITORMODE, NDSColorFormat OUTPUTFORMAT, GPULayerType LAYERTYPE, bool WILLPERFORMWINDOWTEST>
FORCEINLINE void Composite16(GPUEngineCompositorInfo &compInfo,
const bool didAllPixelsPass,
const v128u8 &passMask8,
const v128u16 &evy16,
const v128u8 &srcLayerID,
const v128u16 &src1, const v128u16 &src0,
const v128u8 &srcEffectEnableMask,
const v128u8 &dstBlendEnableMaskLUT,
const u8 *__restrict enableColorEffectPtr,
const u8 *__restrict sprAlphaPtr,
const u8 *__restrict sprModePtr) const;
template <GPUCompositorMode COMPOSITORMODE, NDSColorFormat OUTPUTFORMAT, GPULayerType LAYERTYPE, bool WILLPERFORMWINDOWTEST>
FORCEINLINE void Composite32(GPUEngineCompositorInfo &compInfo,
const bool didAllPixelsPass,
const v128u8 &passMask8,
const v128u16 &evy16,
const v128u8 &srcLayerID,
const v128u32 &src3, const v128u32 &src2, const v128u32 &src1, const v128u32 &src0,
const v128u8 &srcEffectEnableMask,
const v128u8 &dstBlendEnableMaskLUT,
const u8 *__restrict enableColorEffectPtr,
const u8 *__restrict sprAlphaPtr,
const u8 *__restrict sprModePtr) const;
};
#endif // ENABLE_SSE2
#endif // GPU_OPERATIONS_SSE2_H

View File

@ -1,749 +0,0 @@
/*
Copyright (C) 2006 yopyop
Copyright (C) 2006-2011 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with the this software. If not, see <http://www.gnu.org/licenses/>.
*/
#include "GPU_osd.h"
#include "GPU.h"
#include "mem.h"
#include <string.h> //mem funcs
#include <stdarg.h> //va_start, etc
#include <sstream>
#include <stdio.h>
#include <time.h>
#include <glib.h>
#include "debug.h"
#include "aggdraw.h"
#include "movie.h"
#include "rtc.h"
#include "NDSSystem.h"
#include "mic.h"
#include "saves.h"
bool HudEditorMode = false;
OSDCLASS *osd = NULL;
HudStruct Hud;
//contains a timer to be used for well-timed hud components
static s64 hudTimer;
static void SetHudDummy (HudCoordinates *hud)
{
hud->x=666;
hud->y=666;
}
static bool IsHudDummy (HudCoordinates *hud)
{
return (hud->x == 666 && hud->y == 666);
}
template<typename T>
static T calcY(T y) // alters a GUI element y coordinate as necessary to obey swapScreens and singleScreen settings
{
if(osd->singleScreen)
{
if(y >= 192)
y -= 192;
if(osd->swapScreens)
y += 192;
}
else if(osd->swapScreens)
{
if(y >= 192)
y -= 192;
else
y += 192;
}
return y;
}
void EditHud(s32 x, s32 y, HudStruct *hudstruct) {
u32 i = 0;
while (!IsHudDummy(&hudstruct->hud(i))) {
HudCoordinates &hud = hudstruct->hud(i);
//reset
if(!hud.clicked) {
hud.storedx=0;
hud.storedy=0;
}
if((x >= hud.x && x <= hud.x + hud.xsize) &&
(calcY(y) >= calcY(hud.y) && calcY(y) <= calcY(hud.y) + hud.ysize) && !hudstruct->clicked ) {
hud.clicked=1;
hud.storedx = x - hud.x;
hud.storedy = y - hud.y;
}
if(hud.clicked) {
hud.x = x - hud.storedx;
hud.y = y - hud.storedy;
}
//sanity checks
if(hud.x < 0) hud.x = 0;
if(hud.y < 0) hud.y = 0;
if(hud.x > 245)hud.x = 245; //margins
if(hud.y > 384-16)hud.y = 384-16;
if(hud.clicked)
{
hudstruct->clicked = true;
break;//prevent items from grouping together
}
i++;
}
}
void HudClickRelease(HudStruct *hudstruct) {
u32 i = 0;
while (!IsHudDummy(&hudstruct->hud(i))) {
HudCoordinates &hud = hudstruct->hud(i);
hud.clicked=0;
i++;
}
hudstruct->clicked = false;
}
void HudStruct::reset()
{
FpsDisplay.x=0;
FpsDisplay.y=5;
FpsDisplay.xsize=166;
FpsDisplay.ysize=10;
FrameCounter.x=0;
FrameCounter.y=25;
FrameCounter.xsize=60;
FrameCounter.ysize=10;
InputDisplay.x=0;
InputDisplay.y=45;
InputDisplay.xsize=220;
InputDisplay.ysize=10;
GraphicalInputDisplay.x=8;
GraphicalInputDisplay.y=328;
GraphicalInputDisplay.xsize=102;
GraphicalInputDisplay.ysize=50;
LagFrameCounter.x=0;
LagFrameCounter.y=65;
LagFrameCounter.xsize=30;
LagFrameCounter.ysize=10;
Microphone.x=0;
Microphone.y=85;
Microphone.xsize=20;
Microphone.ysize=10;
RTCDisplay.x=0;
RTCDisplay.y=105;
RTCDisplay.xsize=220;
RTCDisplay.ysize=10;
SavestateSlots.x = 8;
SavestateSlots.y = 160;
SavestateSlots.xsize = 240;
SavestateSlots.ysize = 24;
SetHudDummy(&Dummy);
clicked = false;
}
static void joyFill(int n) {
bool pressedForGame = NDS_getFinalUserInput().buttons.array[n];
bool physicallyPressed = NDS_getRawUserInput().buttons.array[n];
if(pressedForGame && physicallyPressed)
aggDraw.hud->fillColor(0,0,0,255);
else if(pressedForGame)
aggDraw.hud->fillColor(255,0,0,255);
else if(physicallyPressed)
aggDraw.hud->fillColor(0,255,0,255);
else
aggDraw.hud->fillColor(255,255,255,255);
}
static void joyEllipse(double ex, double ey, int xc, int yc, int x, int y, double ratio, double rad, int button) {
joyFill(button);
aggDraw.hud->lineWidth(rad);
aggDraw.hud->ellipse(x+((xc*ex)*ratio), y+((yc*ey)*ratio), rad*ratio, rad*ratio);
}
static void joyRoundedRect(double x1, double y1, int x2, int y2, int alpha1, int alpha2, int button)
{
bool pressedForGame = NDS_getFinalUserInput().buttons.array[button];
bool physicallyPressed = NDS_getRawUserInput().buttons.array[button];
if(pressedForGame && physicallyPressed)
aggDraw.hud->fillLinearGradient(x1,y1,x2,y2,agg::rgba8(0,0,0,alpha1), agg::rgba8(0,0,0,alpha2));
else if(pressedForGame)
aggDraw.hud->fillLinearGradient(x1,y1,x2,y2,agg::rgba8(255,0,0,alpha1), agg::rgba8(255,0,0,alpha2));
else if(physicallyPressed)
aggDraw.hud->fillLinearGradient(x1,y1,x2,y2,agg::rgba8(0,255,0,alpha1), agg::rgba8(0,255,0,alpha2));
else
return; //aggDraw.hud->fillLinearGradient(x1,y1,x2,y2,agg::rgba8(255,255,255,alpha1), agg::rgba8(255,255,255,alpha2));
aggDraw.hud->roundedRect(x1,y1,x2,y2,1);
}
static void drawPad(double x, double y, double ratio) {
// you might notice black/red/green colors used to show what buttons are pressed.
// the logic is roughly:
// RED == PAST (the button was held last frame)
// GREEN == FUTURE (the button is physically held now)
// BLACK == PRESENT (the button was held last frame and is still physically held now)
// aligning to odd half-pixel boundaries prevents agg2d from blurring thin straight lines
x = floor(x) + 0.5;
y = floor(calcY(y)) + 0.5;
double xc = 41 - 0.5;
double yc = 20 - 0.5;
aggDraw.hud->lineColor(128,128,128,255);
aggDraw.hud->fillLinearGradient(x, y, x+(xc*ratio), y+(yc*ratio), agg::rgba8(222,222,222,128), agg::rgba8(255,255,255,255));
aggDraw.hud->roundedRect (x, y, floor(x+(xc*ratio))+0.5, floor(y+(yc*ratio))+0.5, 1);
double screenLeft = x+(xc*.25*ratio);
double screenTop = y+(yc*.1*ratio);
double screenRight = x+(xc*.745*ratio);
double screenBottom = y+(yc*.845*ratio);
aggDraw.hud->fillLinearGradient(screenLeft, screenTop, screenRight, screenBottom, agg::rgba8(128,128,128,128), agg::rgba8(255,255,255,255));
aggDraw.hud->roundedRect (screenLeft, screenTop, screenRight, screenBottom, 1);
joyEllipse(.89,.45,xc,yc,x,y,ratio,1,6);//B
joyEllipse(.89,.22,xc,yc,x,y,ratio,1,3);//X
joyEllipse(.83,.34,xc,yc,x,y,ratio,1,4);//Y
joyEllipse(.95,.34,xc,yc,x,y,ratio,1,5);//A
joyEllipse(.82,.716,xc,yc,x,y,ratio,.5,7);//Start
joyEllipse(.82,.842,xc,yc,x,y,ratio,.5,8);//Select
double dpadPoints [][2] = {
{.04,.33}, // top-left corner of left button
{.08,.33},
{.08,.24}, // top-left corner of up button
{.13,.24}, // top-right corner of up button
{.13,.33},
{.17,.33}, // top-right corner of right button
{.17,.43}, // bottom-right corner of right button
{.13,.43},
{.13,.516}, // bottom-right corner of down button
{.08,.516}, // bottom-left corner of down button
{.08,.43},
{.04,.43}, // bottom-left corner of left button
};
static const int numdpadPoints = sizeof(dpadPoints)/sizeof(dpadPoints[0]);
for(int i = 0; i < numdpadPoints; i++)
{
dpadPoints[i][0] = x+(xc*(dpadPoints[i][0]+.01)*ratio);
dpadPoints[i][1] = y+(yc*(dpadPoints[i][1]+.00)*ratio);
}
// dpad outline
aggDraw.hud->fillColor(255,255,255,200);
aggDraw.hud->polygon((double*)dpadPoints, numdpadPoints);
aggDraw.hud->noLine();
// left
joyRoundedRect(dpadPoints[0][0], dpadPoints[0][1], dpadPoints[7][0], dpadPoints[7][1], 255, 0, 11);
// right
joyRoundedRect(dpadPoints[1][0], dpadPoints[1][1], dpadPoints[6][0], dpadPoints[6][1], 0, 255, 12);
// up
joyRoundedRect(dpadPoints[2][0], dpadPoints[2][1], dpadPoints[7][0], dpadPoints[7][1], 255, 0, 9);
// right
joyRoundedRect(dpadPoints[1][0], dpadPoints[1][1], dpadPoints[8][0], dpadPoints[8][1], 0, 255, 10);
// left shoulder
joyRoundedRect(x+(xc*.00*ratio), y+(yc*.00*ratio), x+(xc*.15*ratio), y+(yc*.07*ratio), 255, 200, 2);
// right shoulder
joyRoundedRect(x+(xc*.85*ratio), y+(yc*.00*ratio), x+(xc*1.0*ratio), y+(yc*.07*ratio), 200, 255, 1);
// lid...
joyRoundedRect(x+(xc*.4*ratio), y+(yc*.96*ratio), x+(xc*0.6*ratio), y+(yc*1.0*ratio), 200, 200, 13);
// touch pad
{
BOOL gameTouchOn = nds.isTouch;
double gameTouchX = screenLeft+1 + (nds.scr_touchX * 0.0625) * (screenRight - screenLeft - 2) / 256.0;
double gameTouchY = screenTop+1 + (nds.scr_touchY * 0.0625) * (screenBottom - screenTop - 2) / 192.0;
bool physicalTouchOn = NDS_getRawUserInput().touch.isTouch;
double physicalTouchX = screenLeft+1 + (NDS_getRawUserInput().touch.touchX * 0.0625) * (screenRight - screenLeft - 2) / 256.0;
double physicalTouchY = screenTop+1 + (NDS_getRawUserInput().touch.touchY * 0.0625) * (screenBottom - screenTop - 2) / 192.0;
if(gameTouchOn && physicalTouchOn && gameTouchX == physicalTouchX && gameTouchY == physicalTouchY)
{
aggDraw.hud->fillColor(0,0,0,255);
aggDraw.hud->ellipse(gameTouchX, gameTouchY, ratio*0.37, ratio*0.37);
}
else
{
if(physicalTouchOn)
{
aggDraw.hud->fillColor(0,0,0,128);
aggDraw.hud->ellipse(physicalTouchX, physicalTouchY, ratio*0.5, ratio*0.5);
aggDraw.hud->fillColor(0,255,0,255);
aggDraw.hud->ellipse(physicalTouchX, physicalTouchY, ratio*0.37, ratio*0.37);
}
if(gameTouchOn)
{
aggDraw.hud->fillColor(255,0,0,255);
aggDraw.hud->ellipse(gameTouchX, gameTouchY, ratio*0.37, ratio*0.37);
}
}
}
}
struct TouchInfo{
u16 X;
u16 Y;
};
static int touchalpha[8]= {31, 63, 95, 127, 159, 191, 223, 255};
static TouchInfo temptouch;
static const bool touchshadow = false;//true; // sorry, it's cool but also distracting and looks cleaner with it off. maybe if it drew line segments between touch points instead of isolated crosses...
static std::vector<TouchInfo> touch (8);
static void TextualInputDisplay() {
// drawing the whole string at once looks ugly
// (because of variable width font and the "shadow" appearing over blank space)
// and can't give us the color-coded effects we want anyway (see drawPad for info)
const UserButtons& gameButtons = NDS_getFinalUserInput().buttons;
const UserButtons& physicalButtons = NDS_getRawUserInput().buttons;
double x = Hud.InputDisplay.x;
// from order FRLDUTSBAYXWEG where G is 0
static const char* buttonChars = "<^>vABXYLRSsgf";
static const int buttonIndex [14] = {11,9,12,10,5,6,3,4,2,1,7,8,0,13};
for(int i = 0; i < 14; i++, x+=11.0)
{
bool pressedForGame = gameButtons.array[buttonIndex[i]];
bool physicallyPressed = physicalButtons.array[buttonIndex[i]];
if(pressedForGame && physicallyPressed)
aggDraw.hud->lineColor(255,255,255,255);
else if(pressedForGame)
aggDraw.hud->lineColor(255,48,48,255);
else if(physicallyPressed)
aggDraw.hud->lineColor(0,192,0,255);
else
continue;
// cast from char to std::string is a bit awkward
std::string str(buttonChars+i, 2);
str[1] = '\0';
aggDraw.hud->renderTextDropshadowed(x, calcY(Hud.InputDisplay.y), str);
}
// touch pad
{
char str [32];
BOOL gameTouchOn = nds.isTouch;
int gameTouchX = nds.adc_touchX >> 4;
int gameTouchY = nds.adc_touchY >> 4;
bool physicalTouchOn = NDS_getRawUserInput().touch.isTouch;
int physicalTouchX = NDS_getRawUserInput().touch.touchX >> 4;
int physicalTouchY = NDS_getRawUserInput().touch.touchY >> 4;
if(gameTouchOn && physicalTouchOn && gameTouchX == physicalTouchX && gameTouchY == physicalTouchY)
{
sprintf(str, "%d,%d", gameTouchX, gameTouchY);
aggDraw.hud->lineColor(255,255,255,255);
aggDraw.hud->renderTextDropshadowed(x, calcY(Hud.InputDisplay.y), str);
}
else
{
if(gameTouchOn)
{
sprintf(str, "%d,%d", gameTouchX, gameTouchY);
aggDraw.hud->lineColor(255,48,48,255);
aggDraw.hud->renderTextDropshadowed(x, calcY(Hud.InputDisplay.y)-(physicalTouchOn?8:0), str);
}
if(physicalTouchOn)
{
sprintf(str, "%d,%d", physicalTouchX, physicalTouchY);
aggDraw.hud->lineColor(0,192,0,255);
aggDraw.hud->renderTextDropshadowed(x, calcY(Hud.InputDisplay.y)+(gameTouchOn?8:0), str);
}
}
}
}
static void TouchDisplay() {
// note: calcY should not be used in this function.
aggDraw.hud->lineWidth(1.0);
temptouch.X = NDS_getRawUserInput().touch.touchX >> 4;
temptouch.Y = NDS_getRawUserInput().touch.touchY >> 4;
if(touchshadow) {
touch.push_back(temptouch);
if(touch.size() > 8) touch.erase(touch.begin());
for (int i = 0; i < 8; i++) {
temptouch = touch[i];
if(temptouch.X != 0 || temptouch.Y != 0) {
aggDraw.hud->lineColor(0, 255, 0, touchalpha[i]);
aggDraw.hud->line(temptouch.X - 256, temptouch.Y + 192, temptouch.X + 256, temptouch.Y + 192); //horiz
aggDraw.hud->line(temptouch.X, temptouch.Y - 256, temptouch.X, temptouch.Y + 384); //vert
aggDraw.hud->fillColor(0, 0, 0, touchalpha[i]);
aggDraw.hud->rectangle(temptouch.X-1, temptouch.Y + 192-1, temptouch.X+1, temptouch.Y + 192+1);
}
}
}
else
if(NDS_getRawUserInput().touch.isTouch) {
aggDraw.hud->lineColor(0, 255, 0, 128);
aggDraw.hud->line(temptouch.X - 256, temptouch.Y + 192, temptouch.X + 256, temptouch.Y + 192); //horiz
aggDraw.hud->line(temptouch.X, temptouch.Y - 256, temptouch.X, temptouch.Y + 384); //vert
}
if(nds.isTouch)
{
temptouch.X = nds.scr_touchX / 16;
temptouch.Y = nds.scr_touchY / 16;
aggDraw.hud->lineColor(255, 0, 0, 128);
aggDraw.hud->line(temptouch.X - 256, temptouch.Y + 192, temptouch.X + 256, temptouch.Y + 192); //horiz
aggDraw.hud->line(temptouch.X, temptouch.Y - 256, temptouch.X, temptouch.Y + 384); //vert
}
}
static int previousslot = 0;
static char number[10];
static s64 slotTimer=0;
static void DrawStateSlots(){
const int yloc = calcY(Hud.SavestateSlots.y); //160
const int xloc = Hud.SavestateSlots.x; //8
s64 fadecounter = 512 - (hudTimer-slotTimer)/4; //change constant to alter fade speed
if(fadecounter < 1) fadecounter = 0;
if(fadecounter>255) fadecounter = 255;
int alpha = (int)fadecounter;
if(HudEditorMode)
alpha = 255;
if(alpha!=0)
{
aggDraw.hud->lineWidth(1.0);
aggDraw.hud->lineColor(0, 0, 0, alpha);
aggDraw.hud->fillColor(255, 255, 255, alpha);
for ( int i = 0, xpos=0; i < 10; xpos=xpos+24) {
int yheight=0;
aggDraw.hud->fillLinearGradient(xloc + xpos, yloc - yheight, xloc + 22 + xpos, yloc + 20 + yheight+20, agg::rgba8(100,200,255,alpha), agg::rgba8(255,255,255,0));
if(lastSaveState == i) {
yheight = 5;
aggDraw.hud->fillLinearGradient(xloc + xpos, yloc - yheight, 22 + xloc + xpos, yloc + 20 + yheight+20, agg::rgba8(100,255,255,alpha), agg::rgba8(255,255,255,0));
}
aggDraw.hud->rectangle(xloc + xpos , yloc - yheight, xloc + 22 + xpos , yloc + 20 + yheight);
snprintf(number, 10, "%d", i);
aggDraw.hud->renderText(xloc + 1 + xpos + 4, yloc+4, std::string(number));
i++;
}
}
if(lastSaveState != previousslot)
slotTimer = hudTimer;
previousslot = lastSaveState;
}
static void DrawEditableElementIndicators()
{
u32 i = 0;
while (!IsHudDummy(&Hud.hud(i))) {
HudCoordinates &hud = Hud.hud(i);
aggDraw.hud->fillColor(0,0,0,0);
aggDraw.hud->lineColor(0,0,0,64);
aggDraw.hud->lineWidth(2.0);
aggDraw.hud->rectangle(hud.x,calcY(hud.y),hud.x+hud.xsize+1.0,calcY(hud.y)+hud.ysize+1.0);
aggDraw.hud->lineColor(255,hud.clicked?127:255,0,255);
aggDraw.hud->lineWidth(1.0);
aggDraw.hud->rectangle(hud.x-0.5,calcY(hud.y)-0.5,hud.x+hud.xsize+0.5,calcY(hud.y)+hud.ysize+0.5);
i++;
}
}
void DrawHUD()
{
GTimeVal time;
g_get_current_time(&time);
hudTimer = ((s64)time.tv_sec * 1000) + ((s64)time.tv_usec/1000);
if (HudEditorMode)
{
DrawEditableElementIndicators();
}
if (CommonSettings.hud.ShowInputDisplay)
{
TextualInputDisplay();
TouchDisplay();
}
if (CommonSettings.hud.FpsDisplay)
{
osd->addFixed(Hud.FpsDisplay.x, Hud.FpsDisplay.y, "Fps:%02d/%02d (%02d%%/%02d%%)%s", Hud.fps, Hud.fps3d, Hud.cpuload[0], Hud.cpuload[1], driver->EMU_IsEmulationPaused() ? " (paused)" : "");
}
if (CommonSettings.hud.FrameCounterDisplay)
{
if(movieMode == MOVIEMODE_RECORD)
osd->addFixed(Hud.FrameCounter.x, Hud.FrameCounter.y, "%d",currFrameCounter);
else if (movieMode == MOVIEMODE_PLAY)
osd->addFixed(Hud.FrameCounter.x, Hud.FrameCounter.y, "%d/%d",currFrameCounter,currMovieData.records.size());
else if (movieMode == MOVIEMODE_FINISHED)
osd->addFixed(Hud.FrameCounter.x, Hud.FrameCounter.y, "%d/%d (finished)",currFrameCounter,currMovieData.records.size());
else
osd->addFixed(Hud.FrameCounter.x, Hud.FrameCounter.y, "%d (no movie)",currFrameCounter);
}
if (CommonSettings.hud.ShowLagFrameCounter)
{
osd->addFixed(Hud.LagFrameCounter.x, Hud.LagFrameCounter.y, "%d",TotalLagFrames);
}
if (CommonSettings.hud.ShowGraphicalInputDisplay)
{
drawPad(Hud.GraphicalInputDisplay.x, Hud.GraphicalInputDisplay.y, 2.5);
}
#if defined(WIN32) && !defined(WXPORT)
if (CommonSettings.hud.ShowMicrophone)
{
osd->addFixed(Hud.Microphone.x, Hud.Microphone.y, "%03d [%07d]",MicDisplay, Hud.cpuloopIterationCount);
}
#endif
if (CommonSettings.hud.ShowRTC)
{
DateTime tm = rtcGetTime();
static const char *wday[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
osd->addFixed(Hud.RTCDisplay.x, Hud.RTCDisplay.y, "%04d-%03s-%02d %s %02d:%02d:%02d", tm.get_Year(), DateTime::GetNameOfMonth(tm.get_Month()), tm.get_Day(), wday[tm.get_DayOfWeek()%7], tm.get_Hour(), tm.get_Minute(), tm.get_Second());
}
DrawStateSlots();
}
OSDCLASS::OSDCLASS(u8 core)
{
memset(name,0,7);
mode=core;
offset=0;
lastLineText=0;
lineText_x = 5;
lineText_y = 120;
lineText_color = AggColor(255, 255, 255);
for (int i=0; i < OSD_MAX_LINES+1; i++)
{
lineText[i] = new char[1024];
memset(lineText[i], 0, 1024);
lineTimer[i] = 0;
lineColor[i] = lineText_color;
}
rotAngle = 0;
singleScreen = false;
swapScreens = false;
needUpdate = false;
if (core==0)
strcpy(name,"Core A");
else
if (core==1)
strcpy(name,"Core B");
else
{
strcpy(name,"Main");
mode=255;
}
//border(false);
LOG("OSD_Init (%s)\n",name);
}
OSDCLASS::~OSDCLASS()
{
LOG("OSD_Deinit (%s)\n",name);
for (int i=0; i < OSD_MAX_LINES+1; i++)
{
if (lineText[i])
delete [] lineText[i];
lineText[i] = NULL;
}
}
void OSDCLASS::setOffset(u16 ofs)
{
offset=ofs;
}
void OSDCLASS::setRotate(u16 angle)
{
rotAngle = angle;
}
void OSDCLASS::clear()
{
needUpdate=false;
}
bool OSDCLASS::checkTimers()
{
if (lastLineText == 0) return false;
time_t tmp_time = time(NULL);
for (int i=0; i < lastLineText; i++)
{
if (tmp_time > (lineTimer[i] + OSD_TIMER_SECS) )
{
if (i < lastLineText)
{
for (int j=i; j < lastLineText; j++)
{
strcpy(lineText[j], lineText[j+1]);
lineTimer[j] = lineTimer[j+1];
lineColor[j] = lineColor[j+1];
}
}
lineTimer[lastLineText] = 0;
lastLineText--;
if (lastLineText == 0) return false;
}
}
return true;
}
void OSDCLASS::update()
{
if ( (!needUpdate) && (!lastLineText) ) return; // don't update if buffer empty (speed up)
if (lastLineText)
{
if (checkTimers())
{
for (int i=0; i < lastLineText; i++)
{
aggDraw.hud->lineColor(lineColor[i]);
aggDraw.hud->renderTextDropshadowed(lineText_x,lineText_y+(i*16),lineText[i]);
}
}
else
{
if (!needUpdate) return;
}
}
}
void OSDCLASS::setListCoord(u16 x, u16 y)
{
lineText_x = x;
lineText_y = y;
}
void OSDCLASS::setLineColor(u8 r=255, u8 g=255, u8 b=255)
{
lineText_color = AggColor(r,g,b);
}
void OSDCLASS::addLine(const char *fmt, ...)
{
va_list list;
if (lastLineText > OSD_MAX_LINES) lastLineText = OSD_MAX_LINES;
if (lastLineText == OSD_MAX_LINES) // full
{
lastLineText--;
for (int j=0; j < lastLineText; j++)
{
strcpy(lineText[j], lineText[j+1]);
lineTimer[j] = lineTimer[j+1];
lineColor[j] = lineColor[j+1];
}
}
va_start(list,fmt);
#if defined(_MSC_VER) || defined(__INTEL_COMPILER)
_vsnprintf(lineText[lastLineText],1023,fmt,list);
#else
vsnprintf(lineText[lastLineText],1023,fmt,list);
#endif
va_end(list);
lineColor[lastLineText] = lineText_color;
lineTimer[lastLineText] = time(NULL);
needUpdate = true;
lastLineText++;
}
void OSDCLASS::addFixed(u16 x, u16 y, const char *fmt, ...)
{
va_list list;
char msg[1024];
va_start(list,fmt);
vsnprintf(msg,1023,fmt,list);
va_end(list);
aggDraw.hud->lineColor(255,255,255);
aggDraw.hud->renderTextDropshadowed(x,calcY(y),msg);
needUpdate = true;
}
void OSDCLASS::border(bool enabled)
{
//render51.setTextBoxBorder(enabled);
}

View File

@ -1,141 +0,0 @@
/*
Copyright (C) 2006 yopyop
Copyright (C) 2008-2012 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with the this software. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GPU_OSD_
#define __GPU_OSD_
#include "types.h"
#ifdef HAVE_LIBAGG
#include <stdlib.h>
#include <time.h>
#include "aggdraw.h"
#define OSD_MAX_LINES 4
#define OSD_TIMER_SECS 2
struct HudCoordinates{
int x;
int y;
int xsize;
int ysize;
int storedx;
int storedy;
int clicked;
};
struct HudStruct
{
public:
HudStruct()
{
resetTransient();
}
void resetTransient()
{
fps = 0;
fps3d = 0;
cpuload[0] = cpuload[1] = 0;
cpuloopIterationCount = 0;
clicked = false;
}
HudCoordinates SavestateSlots;
HudCoordinates FpsDisplay;
HudCoordinates FrameCounter;
HudCoordinates InputDisplay;
HudCoordinates GraphicalInputDisplay;
HudCoordinates LagFrameCounter;
HudCoordinates Microphone;
HudCoordinates RTCDisplay;
HudCoordinates Dummy;
HudCoordinates &hud(int i) { return ((HudCoordinates*)this)[i]; }
void reset();
int fps, fps3d, cpuload[2], cpuloopIterationCount;
bool clicked;
};
void EditHud(s32 x, s32 y, HudStruct *hudstruct);
void HudClickRelease(HudStruct *hudstruct);
void DrawHUD();
extern HudStruct Hud;
extern bool HudEditorMode;
class OSDCLASS
{
private:
u64 offset;
u8 mode;
u16 rotAngle;
u16 lineText_x;
u16 lineText_y;
AggColor lineText_color;
u8 lastLineText;
char *lineText[OSD_MAX_LINES+1];
time_t lineTimer[OSD_MAX_LINES+1];
AggColor lineColor[OSD_MAX_LINES+1];
bool needUpdate;
bool checkTimers();
public:
char name[7]; // for debuging
bool singleScreen;
bool swapScreens;
OSDCLASS(u8 core);
~OSDCLASS();
void setOffset(u16 ofs);
void setRotate(u16 angle);
void update();
void clear();
void setListCoord(u16 x, u16 y);
void setLineColor(u8 r, u8 b, u8 g);
void addLine(const char *fmt, ...);
void addFixed(u16 x, u16 y, const char *fmt, ...);
void border(bool enabled);
};
extern OSDCLASS *osd;
#else /* HAVE_LIBAGG */
void DrawHUD();
class OSDCLASS {
public:
OSDCLASS(u8 core);
~OSDCLASS();
void update();
void clear();
void setLineColor(u8 r, u8 b, u8 g);
void addLine(const char *fmt, ...);
};
extern OSDCLASS *osd;
#endif
#endif

View File

@ -1,30 +0,0 @@
/*
Copyright (C) 2010 DeSmumE team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with the this software. If not, see <http://www.gnu.org/licenses/>.
*/
#include "types.h"
#include "GPU_osd.h"
OSDCLASS *osd;
OSDCLASS::OSDCLASS(u8 core) {}
OSDCLASS::~OSDCLASS() {}
void OSDCLASS::update() {}
void OSDCLASS::clear() {}
void OSDCLASS::setLineColor(u8 r, u8 b, u8 g) {}
void OSDCLASS::addLine(const char *fmt, ...) {}
void DrawHUD() {}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
/*
Copyright (C) 2006 yopyop
Copyright (C) 2007 shash
Copyright (C) 2007-2011 DeSmuME team
Copyright (C) 2007-2017 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -28,6 +28,7 @@
#include "readwrite.h"
#include "debug.h"
#include "NDSSystem.h"
#include "emufile.h"
////////////////////////////////////////////////////////////////
// MEMORY TIMING ACCURACY CONFIGURATION
@ -104,24 +105,24 @@ public:
Reset();
}
void savestate(EMUFILE* os, int version)
void savestate(EMUFILE &os, int version)
{
write32le(m_cacheCache, os);
for(int i = 0; i < NUMBLOCKS; i++)
os.write_32LE(m_cacheCache);
for (int i = 0; i < NUMBLOCKS; i++)
{
for(int j = 0; j < ASSOCIATIVITY; j++)
write32le(m_blocks[i].tag[j],os);
write32le(m_blocks[i].nextWay,os);
for (int j = 0; j < ASSOCIATIVITY; j++)
os.write_32LE(m_blocks[i].tag[j]);
os.write_32LE(m_blocks[i].nextWay);
}
}
bool loadstate(EMUFILE* is, int version)
bool loadstate(EMUFILE &is, int version)
{
read32le(&m_cacheCache, is);
for(int i = 0; i < NUMBLOCKS; i++)
is.read_32LE(m_cacheCache);
for (int i = 0; i < NUMBLOCKS; i++)
{
for(int j = 0; j < ASSOCIATIVITY; j++)
read32le(&m_blocks[i].tag[j],is);
read32le(&m_blocks[i].nextWay,is);
for (int j = 0; j < ASSOCIATIVITY; j++)
is.read_32LE(m_blocks[i].tag[j]);
is.read_32LE(m_blocks[i].nextWay);
}
return true;
}
@ -155,8 +156,8 @@ private:
enum { ASSOCIATIVITY = 1 << ASSOCIATIVESHIFT };
enum { BLOCKSIZE = 1 << BLOCKSIZESHIFT };
enum { TAGSHIFT = SIZESHIFT - ASSOCIATIVESHIFT };
enum { TAGMASK = (u32)(~0 << TAGSHIFT) };
enum { BLOCKMASK = ((u32)~0 >> (32 - TAGSHIFT)) & (u32)(~0 << BLOCKSIZESHIFT) };
enum { TAGMASK = (u32)(~0U << TAGSHIFT) };
enum { BLOCKMASK = ((u32)~0U >> (32 - TAGSHIFT)) & (u32)(~0U << BLOCKSIZESHIFT) };
enum { WORDSIZE = sizeof(u32) };
enum { WORDSPERBLOCK = (1 << BLOCKSIZESHIFT) / WORDSIZE };
enum { DATAPERWORD = WORDSIZE * ASSOCIATIVITY };
@ -228,13 +229,13 @@ public:
}
FetchAccessUnit() { this->Reset(); }
void savestate(EMUFILE* os, int version)
void savestate(EMUFILE &os, int version)
{
write32le(m_lastAddress,os);
os.write_32LE(m_lastAddress);
}
bool loadstate(EMUFILE* is, int version)
bool loadstate(EMUFILE &is, int version)
{
read32le(&m_lastAddress,is);
is.read_32LE(m_lastAddress);
return true;
}

View File

@ -1,198 +0,0 @@
include $(top_srcdir)/src/desmume.mk
AM_CPPFLAGS += $(SDL_CFLAGS) $(GTHREAD_CFLAGS) $(X_CFLAGS) $(ALSA_CFLAGS) $(LIBAGG_CFLAGS) $(LIBSOUNDTOUCH_CFLAGS)
EXTRA_DIST = build.bat instruction_tabdef.inc thumb_tabdef.inc fs-linux.cpp fs-windows.cpp cocoa
if HAVE_GDB_STUB
SUBDIRS = . gdbstub $(UI_DIR)
else
SUBDIRS = . $(UI_DIR)
endif
DIST_SUBDIRS = . gdbstub cli gtk gtk-glade wx
noinst_LIBRARIES = libdesmume.a
libdesmume_a_SOURCES = \
armcpu.cpp armcpu.h \
arm_instructions.cpp arm_instructions.h \
agg2d.h agg2d.inl \
bios.cpp bios.h bits.h cp15.cpp cp15.h \
commandline.h commandline.cpp \
common.cpp common.h \
debug.cpp debug.h \
Disassembler.cpp Disassembler.h \
emufile.h emufile.cpp emufile_types.h FIFO.cpp FIFO.h \
firmware.cpp firmware.h GPU.cpp GPU.h \
fs.h \
GPU_osd.h \
mem.h mc.cpp mc.h \
path.cpp path.h \
readwrite.cpp readwrite.h \
wifi.cpp wifi.h \
mic.h \
MMU.cpp MMU.h MMU_timing.h NDSSystem.cpp NDSSystem.h registers.h \
OGLRender.h \
ROMReader.cpp ROMReader.h \
render3D.cpp render3D.h \
rtc.cpp rtc.h \
saves.cpp saves.h \
slot1.cpp slot1.h \
SPU.cpp SPU.h \
matrix.cpp matrix.h \
gfx3d.cpp gfx3d.h \
thumb_instructions.cpp thumb_instructions.h types.h \
shaders.h \
movie.cpp movie.h \
PACKED.h PACKED_END.h \
utils/datetime.cpp utils/datetime.h \
utils/ConvertUTF.c utils/ConvertUTF.h utils/guid.cpp utils/guid.h \
utils/emufat.cpp utils/emufat.h utils/emufat_types.h \
utils/md5.cpp utils/md5.h utils/valuearray.h utils/xstring.cpp utils/xstring.h \
utils/decrypt/crc.cpp utils/decrypt/crc.h utils/decrypt/decrypt.cpp \
utils/decrypt/decrypt.h utils/decrypt/header.cpp utils/decrypt/header.h \
utils/task.cpp utils/task.h \
utils/vfat.h utils/vfat.cpp \
utils/dlditool.cpp \
utils/libfat/bit_ops.h \
utils/libfat/cache.cpp \
utils/libfat/cache.h \
utils/libfat/common.h \
utils/libfat/directory.cpp \
utils/libfat/directory.h \
utils/libfat/disc.cpp \
utils/libfat/disc.h \
utils/libfat/disc_io.h \
utils/libfat/fat.h \
utils/libfat/fatdir.cpp \
utils/libfat/fatdir.h \
utils/libfat/fatfile.cpp \
utils/libfat/fatfile.h \
utils/libfat/filetime.cpp \
utils/libfat/filetime.h \
utils/libfat/file_allocation_table.cpp \
utils/libfat/file_allocation_table.h \
utils/libfat/libfat.cpp \
utils/libfat/libfat_pc.h \
utils/libfat/libfat_public_api.cpp \
utils/libfat/libfat_public_api.h \
utils/libfat/lock.cpp \
utils/libfat/lock.h \
utils/libfat/mem_allocate.h \
utils/libfat/partition.cpp \
utils/libfat/partition.h \
utils/tinyxml/tinystr.cpp \
utils/tinyxml/tinystr.h \
utils/tinyxml/tinyxml.cpp \
utils/tinyxml/tinyxml.h \
utils/tinyxml/tinyxmlerror.cpp \
utils/tinyxml/tinyxmlparser.cpp \
addons.cpp addons.h \
addons/slot2_mpcf.cpp addons/slot2_paddle.cpp addons/slot2_gbagame.cpp addons/slot2_none.cpp addons/slot2_rumblepak.cpp addons/slot2_guitarGrip.cpp addons/slot2_expMemory.cpp addons/slot2_piano.cpp addons/slot1_none.cpp addons/slot1_r4.cpp addons/slot1_retail.cpp addons/slot1_retail_nand.cpp \
cheatSystem.cpp cheatSystem.h \
texcache.cpp texcache.h rasterize.cpp rasterize.h \
metaspu/metaspu.cpp metaspu/metaspu.h \
version.cpp version.h \
desmume_config.cpp desmume_config.h
if HAVE_JIT
libdesmume_a_SOURCES += \
arm_jit.cpp arm_jit.h instruction_attributes.h \
utils/AsmJit/AsmJit.h \
utils/AsmJit/config.h \
utils/AsmJit/core.h \
utils/AsmJit/x86.h \
utils/AsmJit/core/apibegin.h \
utils/AsmJit/core/apiend.h \
utils/AsmJit/core/assembler.cpp \
utils/AsmJit/core/assembler.h \
utils/AsmJit/core/assert.cpp \
utils/AsmJit/core/assert.h \
utils/AsmJit/core/buffer.cpp \
utils/AsmJit/core/buffer.h \
utils/AsmJit/core/build.h \
utils/AsmJit/core/compiler.cpp \
utils/AsmJit/core/compiler.h \
utils/AsmJit/core/compilercontext.cpp \
utils/AsmJit/core/compilercontext.h \
utils/AsmJit/core/compilerfunc.cpp \
utils/AsmJit/core/compilerfunc.h \
utils/AsmJit/core/compileritem.cpp \
utils/AsmJit/core/compileritem.h \
utils/AsmJit/core/context.cpp \
utils/AsmJit/core/context.h \
utils/AsmJit/core/cpuinfo.cpp \
utils/AsmJit/core/cpuinfo.h \
utils/AsmJit/core/defs.cpp \
utils/AsmJit/core/defs.h \
utils/AsmJit/core/func.cpp \
utils/AsmJit/core/func.h \
utils/AsmJit/core/intutil.h \
utils/AsmJit/core/lock.h \
utils/AsmJit/core/logger.cpp \
utils/AsmJit/core/logger.h \
utils/AsmJit/core/memorymanager.cpp \
utils/AsmJit/core/memorymanager.h \
utils/AsmJit/core/memorymarker.cpp \
utils/AsmJit/core/memorymarker.h \
utils/AsmJit/core/operand.cpp \
utils/AsmJit/core/operand.h \
utils/AsmJit/core/podvector.h \
utils/AsmJit/core/stringbuilder.cpp \
utils/AsmJit/core/stringbuilder.h \
utils/AsmJit/core/stringutil.cpp \
utils/AsmJit/core/stringutil.h \
utils/AsmJit/core/virtualmemory.cpp \
utils/AsmJit/core/virtualmemory.h \
utils/AsmJit/core/zonememory.cpp \
utils/AsmJit/core/zonememory.h \
utils/AsmJit/x86/x86assembler.cpp \
utils/AsmJit/x86/x86assembler.h \
utils/AsmJit/x86/x86compiler.cpp \
utils/AsmJit/x86/x86compiler.h \
utils/AsmJit/x86/x86compilercontext.cpp \
utils/AsmJit/x86/x86compilercontext.h \
utils/AsmJit/x86/x86compilerfunc.cpp \
utils/AsmJit/x86/x86compilerfunc.h \
utils/AsmJit/x86/x86compileritem.cpp \
utils/AsmJit/x86/x86compileritem.h \
utils/AsmJit/x86/x86cpuinfo.cpp \
utils/AsmJit/x86/x86cpuinfo.h \
utils/AsmJit/x86/x86defs.cpp \
utils/AsmJit/x86/x86defs.h \
utils/AsmJit/x86/x86func.cpp \
utils/AsmJit/x86/x86func.h \
utils/AsmJit/x86/x86operand.cpp \
utils/AsmJit/x86/x86operand.h \
utils/AsmJit/x86/x86util.cpp \
utils/AsmJit/x86/x86util.h
endif
if HAVE_GL
libdesmume_a_SOURCES += OGLRender.cpp
endif
if HAVE_OPENAL
libdesmume_a_SOURCES += mic_openal.cpp
else
if HAVE_ALSA
libdesmume_a_SOURCES += mic_alsa.cpp
else
libdesmume_a_SOURCES += mic.cpp
endif
endif
if HAVE_LIBSOUNDTOUCH
libdesmume_a_SOURCES += metaspu/SndOut.cpp metaspu/SndOut.h metaspu/Timestretcher.cpp
endif
if HAVE_LIBAGG
libdesmume_a_SOURCES += aggdraw.cpp aggdraw.h GPU_osd.cpp
else
libdesmume_a_SOURCES += GPU_osd_stub.cpp
endif
if HAVE_LUA
AM_CPPFLAGS += $(LUA_CFLAGS)
libdesmume_a_SOURCES += lua-engine.cpp
endif
if HAVE_GDB_STUB
libdesmume_a_SOURCES += gdbstub.h
endif
libdesmume_a_LIBADD = fs-$(desmume_arch).$(OBJEXT)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1148
desmume/src/OGLRender.h Normal file → Executable file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
/*
Copyright (C) 2006 yopyop
Copyright (C) 2006-2007 shash
Copyright (C) 2008-2013 DeSmuME team
Copyright (C) 2008-2024 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -20,67 +20,157 @@
#ifndef OGLRENDER_3_2_H
#define OGLRENDER_3_2_H
#if defined(_WIN32) && !defined(WXPORT)
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <GL/gl.h>
#include <GL/glcorearb.h>
#define OGLEXT(procPtr, func) procPtr func = NULL;
#define INITOGLEXT(procPtr, func) func = (procPtr)wglGetProcAddress(#func);
#define EXTERNOGLEXT(procPtr, func) extern procPtr func;
#elif defined(__APPLE__)
#include <OpenGL/gl3.h>
#include <OpenGL/gl3ext.h>
// Ignore dynamic linking on Apple OS
#define OGLEXT(procPtr, func)
#define INITOGLEXT(procPtr, func)
#define EXTERNOGLEXT(procPtr, func)
#else
#include <GL/gl.h>
#include <GL/glcorearb.h>
#include <GL/glx.h>
#define OGLEXT(procPtr, func) procPtr func = NULL;
#define INITOGLEXT(procPtr, func) func = (procPtr)glXGetProcAddress((const GLubyte *) #func);
#define EXTERNOGLEXT(procPtr, func) extern procPtr func;
#endif
// Check minimum OpenGL header version
#if !defined(GL_VERSION_3_2)
#error OpenGL requires v3.2 headers or later.
#endif
#include "OGLRender.h"
#define MAX_CLIPPED_POLY_COUNT_FOR_UBO 16384
extern const char *GeometryVtxShader_150;
extern const char *GeometryFragShader_150;
extern const char *GeometryZeroDstAlphaPixelMaskVtxShader_150;
extern const char *GeometryZeroDstAlphaPixelMaskFragShader_150;
extern const char *MSGeometryZeroDstAlphaPixelMaskFragShader_150;
extern const char *ClearImageVtxShader_150;
extern const char *ClearImageFragShader_150;
extern const char *EdgeMarkVtxShader_150;
extern const char *EdgeMarkFragShader_150;
extern const char *FogVtxShader_150;
extern const char *FogFragShader_150;
extern const char *FramebufferOutputVtxShader_150;
extern const char *FramebufferOutput6665FragShader_150;
// A port that wants to use the OpenGL 3.2 renderer must assign the two following functions
// to OGLLoadEntryPoints_3_2_Func and OGLCreateRenderer_3_2_Func, respectively.
//
// In addition, the port must add the following GPU3DInterface objects to core3DList:
// - gpu3Dgl: Automatically selects the most fully featured version of standard OpenGL that
// is available on the host system, prefering OpenGL 3.2 Core Profile.
// - gpu3Dgl_3_2: Selects the OpenGL 3.2 Core Profile renderer, and returns an error if it
// is not available on the host system.
//
// Finally, the port must call GPU->Set3DRendererByID() and pass in the index where
// gpu3Dgl_3_2 exists in core3DList so that the emulator can create the appropriate
// OpenGLRenderer object.
//
// Example code:
// OGLLoadEntryPoints_3_2_Func = &OGLLoadEntryPoints_3_2;
// OGLCreateRenderer_3_2_Func = &OGLCreateRenderer_3_2;
// GPU3DInterface *core3DList[] = { &gpu3DNull, &gpu3DRasterize, &gpu3Dgl_3_2, NULL };
// GPU->Set3DRendererByID(2);
void OGLLoadEntryPoints_3_2();
void OGLCreateRenderer_3_2(OpenGLRenderer **rendererPtr);
class OpenGLGeometryResource : public Render3DResourceGeometry
{
protected:
GLuint _vboID[3];
GLuint _eboID[3];
GLuint _vaoID[3];
GLuint _uboPolyStatesID[3];
GLuint _tboPolyStatesID[3];
GLuint _texPolyStatesID[3];
GLsync _syncGeometryRender[3];
u16 *_indexBuffer[3];
OGLPolyStates *_polyStatesBuffer[3];
public:
OpenGLGeometryResource(const OpenGLVariantID variantID);
~OpenGLGeometryResource();
size_t BindWrite(const size_t rawVtxCount, const size_t clippedPolyCount);
size_t BindUsage();
size_t UnbindUsage();
size_t RebindUsage();
u16* GetIndexBuffer(const size_t index);
OGLPolyStates* GetPolyStatesBuffer(const size_t index);
bool IsPolyStatesBufferUBO();
bool IsPolyStatesBufferTBO();
};
class OpenGLRenderStatesResource : public Render3DResource
{
protected:
GLsync _sync[3];
GLuint _uboRenderStatesID[3];
OGLRenderStates *_buffer[3];
public:
OpenGLRenderStatesResource();
~OpenGLRenderStatesResource();
size_t BindWrite();
size_t BindUsage();
size_t UnbindUsage();
OGLRenderStates* GetRenderStatesBuffer(const size_t index);
};
class OpenGLRenderer_3_2 : public OpenGLRenderer_2_1
{
protected:
virtual Render3DError InitExtensions();
bool _isShaderFixedLocationSupported;
bool _isConservativeDepthSupported;
bool _isConservativeDepthAMDSupported;
OpenGLGeometryResource *_gResource;
OpenGLRenderStatesResource *_rsResource;
virtual Render3DError CreateVBOs();
virtual Render3DError CreatePBOs();
virtual Render3DError CreateFBOs();
virtual void DestroyFBOs();
virtual Render3DError CreateMultisampledFBO();
virtual Render3DError CreateMultisampledFBO(GLsizei numSamples);
virtual void DestroyMultisampledFBO();
virtual void ResizeMultisampledFBOs(GLsizei numSamples);
virtual Render3DError CreateVAOs();
virtual void DestroyVAOs();
virtual Render3DError LoadShaderPrograms(std::string *outVertexShaderProgram, std::string *outFragmentShaderProgram);
virtual Render3DError SetupShaderIO();
virtual Render3DError CreateGeometryPrograms();
virtual Render3DError CreateClearImageProgram(const char *vsCString, const char *fsCString);
virtual void DestroyClearImageProgram();
virtual Render3DError CreateGeometryZeroDstAlphaProgram(const char *vtxShaderCString, const char *fragShaderCString);
virtual Render3DError CreateMSGeometryZeroDstAlphaProgram(const char *vtxShaderCString, const char *fragShaderCString);
virtual void DestroyMSGeometryZeroDstAlphaProgram();
virtual Render3DError CreateEdgeMarkProgram(const bool isMultisample, const char *vtxShaderCString, const char *fragShaderCString);
virtual Render3DError CreateFogProgram(const OGLFogProgramKey fogProgramKey, const bool isMultisample, const char *vtxShaderCString, const char *fragShaderCString);
virtual Render3DError CreateFramebufferOutput6665Program(const char *vtxShaderCString, const char *fragShaderCString);
virtual Render3DError CreateFramebufferOutput8888Program(const char *vtxShaderCString, const char *fragShaderCString);
virtual void GetExtensionSet(std::set<std::string> *oglExtensionSet);
virtual Render3DError EnableVertexAttributes(const VERTLIST *vertList, const GLushort *indexBuffer, const unsigned int vertIndexCount);
virtual Render3DError DisableVertexAttributes();
virtual Render3DError SelectRenderingFramebuffer();
virtual Render3DError DownsampleFBO();
virtual void _SetupGeometryShaders(const OGLGeometryFlags flags);
virtual void _RenderGeometryVertexAttribEnable();
virtual void _RenderGeometryVertexAttribDisable();
virtual Render3DError ZeroDstAlphaPass(const POLY *rawPolyList, const CPoly *clippedPolyList, const size_t clippedPolyCount, const size_t clippedPolyOpaqueCount, bool enableAlphaBlending, size_t indexOffset, POLYGON_ATTR lastPolyAttr);
virtual void _RenderGeometryLoopBegin();
virtual void _RenderGeometryLoopEnd();
virtual void _ResolveWorkingBackFacing();
virtual void _ResolveGeometry();
virtual void _ResolveFinalFramebuffer();
virtual void _FramebufferProcessVertexAttribEnable();
virtual void _FramebufferProcessVertexAttribDisable();
virtual Render3DError _FramebufferConvertColorFormat();
virtual Render3DError ClearUsingImage() const;
virtual Render3DError BeginRender(const GFX3D_State &renderState, const GFX3D_GeometryList &renderGList);
virtual Render3DError PostprocessFramebuffer();
virtual Render3DError ClearUsingImage(const u16 *__restrict colorBuffer, const u32 *__restrict depthBuffer, const u8 *__restrict fogBuffer, const u8 opaquePolyID);
virtual Render3DError ClearUsingValues(const Color4u8 &clearColor6665, const FragmentAttributes &clearAttributes);
virtual void SetPolygonIndex(const size_t index);
virtual Render3DError SetupPolygon(const POLY &thePoly, bool treatAsTranslucent, bool willChangeStencilBuffer, bool isBackFacing);
virtual Render3DError SetupTexture(const POLY &thePoly, size_t polyRenderIndex);
public:
OpenGLRenderer_3_2();
~OpenGLRenderer_3_2();
virtual Render3DError InitExtensions();
virtual Render3DError RenderFinish();
virtual Render3DError RenderPowerOff();
virtual Render3DError SetFramebufferSize(size_t w, size_t h);
};
#endif

View File

@ -0,0 +1,963 @@
/*
Copyright (C) 2024 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with the this software. If not, see <http://www.gnu.org/licenses/>.
*/
#include "OGLRender_ES3.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <algorithm>
#include <string>
#include <sstream>
#include "utils/bits.h"
#include "common.h"
#include "debug.h"
#include "NDSSystem.h"
static const GLenum GeometryDrawBuffersEnumES[8][4] = {
{ OGL_COLOROUT_ATTACHMENT_ID, GL_NONE, GL_NONE, GL_NONE },
{ OGL_COLOROUT_ATTACHMENT_ID, GL_NONE, GL_NONE, OGL_FOGATTRIBUTES_ATTACHMENT_ID },
{ OGL_COLOROUT_ATTACHMENT_ID, GL_NONE, OGL_POLYID_ATTACHMENT_ID, GL_NONE },
{ OGL_COLOROUT_ATTACHMENT_ID, GL_NONE, OGL_POLYID_ATTACHMENT_ID, OGL_FOGATTRIBUTES_ATTACHMENT_ID },
{ OGL_COLOROUT_ATTACHMENT_ID, OGL_WORKING_ATTACHMENT_ID, GL_NONE, GL_NONE },
{ OGL_COLOROUT_ATTACHMENT_ID, OGL_WORKING_ATTACHMENT_ID, GL_NONE, OGL_FOGATTRIBUTES_ATTACHMENT_ID },
{ OGL_COLOROUT_ATTACHMENT_ID, OGL_WORKING_ATTACHMENT_ID, OGL_POLYID_ATTACHMENT_ID, GL_NONE },
{ OGL_COLOROUT_ATTACHMENT_ID, OGL_WORKING_ATTACHMENT_ID, OGL_POLYID_ATTACHMENT_ID, OGL_FOGATTRIBUTES_ATTACHMENT_ID }
};
static const GLint GeometryAttachmentWorkingBufferES[8] = { 1,1,1,1,1,1,1,1 };
static const GLint GeometryAttachmentPolyIDES[8] = { 2,2,2,2,2,2,2,2 };
static const GLint GeometryAttachmentFogAttributesES[8] = { 3,3,3,3,3,3,3,3 };
// Vertex shader for geometry, GLSL ES 3.00
static const char *GeometryVtxShader_ES300 = {"\
IN_VTX_POSITION vec4 inPosition;\n\
IN_VTX_TEXCOORD0 vec2 inTexCoord0;\n\
IN_VTX_COLOR vec3 inColor; \n\
\n\
#if IS_USING_UBO_POLY_STATES\n\
layout (std140) uniform PolyStates\n\
{\n\
ivec4 value[4096];\n\
} polyState;\n\
#elif IS_USING_TBO_POLY_STATES\n\
uniform highp isamplerBuffer PolyStates;\n\
#else\n\
uniform highp isampler2D PolyStates;\n\
#endif\n\
uniform mediump int polyIndex;\n\
uniform bool polyDrawShadow;\n\
\n\
out vec2 vtxTexCoord;\n\
out vec4 vtxColor;\n\
flat out lowp int polyID;\n\
flat out lowp int polyMode;\n\
flat out lowp int polyIsWireframe;\n\
flat out lowp int polyEnableFog;\n\
flat out lowp int polySetNewDepthForTranslucent;\n\
flat out lowp int polyEnableTexture;\n\
flat out lowp int texSingleBitAlpha;\n\
flat out lowp int polyIsBackFacing;\n\
flat out lowp int isPolyDrawable;\n\
\n\
void main()\n\
{\n\
#if IS_USING_UBO_POLY_STATES\n\
ivec4 polyStateVec = polyState.value[polyIndex >> 2];\n\
int polyStateBits = polyStateVec[polyIndex & 0x03];\n\
#elif IS_USING_TBO_POLY_STATES\n\
int polyStateBits = texelFetch(PolyStates, polyIndex).r;\n\
#else\n\
int polyStateBits = texelFetch(PolyStates, ivec2(polyIndex & 0x00FF, (polyIndex >> 8) & 0x007F), 0).r;\n\
#endif\n\
int texSizeShiftS = (polyStateBits >> 18) & 0x07;\n\
int texSizeShiftT = (polyStateBits >> 21) & 0x07;\n\
\n\
float polyAlpha = float((polyStateBits >> 8) & 0x1F) / 31.0;\n\
vec2 polyTexScale = vec2(1.0 / float(8 << texSizeShiftS), 1.0 / float(8 << texSizeShiftT));\n\
\n\
polyID = (polyStateBits >> 0) & 0x3F;\n\
polyMode = (polyStateBits >> 6) & 0x03;\n\
polyIsWireframe = (polyStateBits >> 13) & 0x01;\n\
polyEnableFog = (polyStateBits >> 14) & 0x01;\n\
polySetNewDepthForTranslucent = (polyStateBits >> 15) & 0x01;\n\
polyEnableTexture = (polyStateBits >> 16) & 0x01;\n\
texSingleBitAlpha = (polyStateBits >> 17) & 0x01;\n\
polyIsBackFacing = (polyStateBits >> 24) & 0x01;\n\
\n\
isPolyDrawable = int((polyMode != 3) || polyDrawShadow);\n\
\n\
mat2 texScaleMtx = mat2( vec2(polyTexScale.x, 0.0), \n\
vec2( 0.0, polyTexScale.y)); \n\
\n\
vtxTexCoord = (texScaleMtx * inTexCoord0) / 16.0;\n\
vtxColor = vec4(inColor / 63.0, polyAlpha);\n\
gl_Position = vec4(inPosition.x, -inPosition.y, inPosition.z, inPosition.w) / 4096.0;\n\
}\n\
"};
// Fragment shader for geometry, GLSL ES 3.00
static const char *GeometryFragShader_ES300 = {"\
in vec2 vtxTexCoord;\n\
in vec4 vtxColor;\n\
flat in lowp int polyID;\n\
flat in lowp int polyMode;\n\
flat in lowp int polyIsWireframe;\n\
flat in lowp int polyEnableFog;\n\
flat in lowp int polySetNewDepthForTranslucent;\n\
flat in lowp int polyEnableTexture;\n\
flat in lowp int texSingleBitAlpha;\n\
flat in lowp int polyIsBackFacing;\n\
flat in lowp int isPolyDrawable;\n\
\n\
layout (std140) uniform RenderStates\n\
{\n\
bool enableAntialiasing;\n\
bool enableFogAlphaOnly;\n\
int clearPolyID;\n\
float clearDepth;\n\
float alphaTestRef;\n\
float fogOffset;\n\
float fogStep;\n\
float pad_0;\n\
vec4 fogColor;\n\
vec4 edgeColor[8];\n\
vec4 toonColor[32];\n\
} state;\n\
\n\
uniform sampler2D texRenderObject;\n\
uniform bool texDrawOpaque;\n\
uniform bool drawModeDepthEqualsTest;\n\
uniform bool polyDrawShadow;\n\
uniform float polyDepthOffset;\n\
\n\
OUT_COLOR vec4 outFragColor;\n\
\n\
#if DRAW_MODE_OPAQUE\n\
OUT_WORKING_BUFFER vec4 outDstBackFacing;\n\
#elif USE_DEPTH_LEQUAL_POLYGON_FACING\n\
uniform sampler2D inDstBackFacing;\n\
#endif\n\
\n\
#if ENABLE_EDGE_MARK\n\
OUT_POLY_ID vec4 outPolyID;\n\
#endif\n\
#if ENABLE_FOG\n\
OUT_FOG_ATTRIBUTES vec4 outFogAttributes;\n\
#endif\n\
\n\
void main()\n\
{\n\
#if USE_DEPTH_LEQUAL_POLYGON_FACING && !DRAW_MODE_OPAQUE\n\
bool isOpaqueDstBackFacing = bool( texelFetch(inDstBackFacing, ivec2(gl_FragCoord.xy), 0).r );\n\
if ( drawModeDepthEqualsTest && (bool(polyIsBackFacing) || !isOpaqueDstBackFacing) )\n\
{\n\
discard;\n\
}\n\
#endif\n\
\n\
vec4 mainTexColor = (ENABLE_TEXTURE_SAMPLING && bool(polyEnableTexture)) ? texture(texRenderObject, vtxTexCoord) : vec4(1.0, 1.0, 1.0, 1.0);\n\
\n\
if (!bool(texSingleBitAlpha))\n\
{\n\
if (texDrawOpaque)\n\
{\n\
if ( (polyMode != 1) && (mainTexColor.a <= 0.999) )\n\
{\n\
discard;\n\
}\n\
}\n\
else\n\
{\n\
if ( ((polyMode != 1) && (mainTexColor.a * vtxColor.a > 0.999)) || ((polyMode == 1) && (vtxColor.a > 0.999)) )\n\
{\n\
discard;\n\
}\n\
}\n\
}\n\
#if USE_TEXTURE_SMOOTHING\n\
else\n\
{\n\
if (mainTexColor.a < 0.500)\n\
{\n\
mainTexColor.a = 0.0;\n\
}\n\
else\n\
{\n\
mainTexColor.rgb = mainTexColor.rgb / mainTexColor.a;\n\
mainTexColor.a = 1.0;\n\
}\n\
}\n\
#endif\n\
\n\
outFragColor = mainTexColor * vtxColor;\n\
\n\
if (polyMode == 1)\n\
{\n\
outFragColor.rgb = (ENABLE_TEXTURE_SAMPLING && bool(polyEnableTexture)) ? mix(vtxColor.rgb, mainTexColor.rgb, mainTexColor.a) : vtxColor.rgb;\n\
outFragColor.a = vtxColor.a;\n\
}\n\
else if (polyMode == 2)\n\
{\n\
vec3 newToonColor = state.toonColor[int((vtxColor.r * 31.0) + 0.5)].rgb;\n\
#if TOON_SHADING_MODE\n\
outFragColor.rgb = min((mainTexColor.rgb * vtxColor.r) + newToonColor.rgb, 1.0);\n\
#else\n\
outFragColor.rgb = mainTexColor.rgb * newToonColor.rgb;\n\
#endif\n\
}\n\
else if ((polyMode == 3) && polyDrawShadow)\n\
{\n\
outFragColor = vtxColor;\n\
}\n\
\n\
if ( (isPolyDrawable != 0) && ((outFragColor.a < 0.001) || (ENABLE_ALPHA_TEST && outFragColor.a < state.alphaTestRef)) )\n\
{\n\
discard;\n\
}\n\
#if ENABLE_EDGE_MARK\n\
outPolyID = (isPolyDrawable != 0) ? vec4( float(polyID)/63.0, float(polyIsWireframe == 1), 0.0, float(outFragColor.a > 0.999) ) : vec4(0.0, 0.0, 0.0, 0.0);\n\
#endif\n\
#if ENABLE_FOG\n\
outFogAttributes = (isPolyDrawable != 0) ? vec4( float(polyEnableFog), 0.0, 0.0, float((outFragColor.a > 0.999) ? 1.0 : 0.5) ) : vec4(0.0, 0.0, 0.0, 0.0);\n\
#endif\n\
#if DRAW_MODE_OPAQUE\n\
outDstBackFacing = vec4(float(polyIsBackFacing), 0.0, 0.0, 1.0);\n\
#endif\n\
\n\
#if USE_NDS_DEPTH_CALCULATION || ENABLE_FOG\n\
// It is tempting to perform the NDS depth calculation in the vertex shader rather than in the fragment shader.\n\
// Resist this temptation! It is much more reliable to do the depth calculation in the fragment shader due to\n\
// subtle interpolation differences between various GPUs and/or drivers. If the depth calculation is not done\n\
// here, then it is very possible for the user to experience Z-fighting in certain rendering situations.\n\
\n\
#if ENABLE_W_DEPTH\n\
gl_FragDepth = clamp( ((1.0/gl_FragCoord.w) * (4096.0/16777215.0)) + polyDepthOffset, 0.0, 1.0 );\n\
#else\n\
// hack: when using z-depth, drop some LSBs so that the overworld map in Dragon Quest IV shows up correctly\n\
gl_FragDepth = clamp( (floor(gl_FragCoord.z * 4194303.0) * (4.0/16777215.0)) + polyDepthOffset, 0.0, 1.0 );\n\
#endif\n\
#endif\n\
}\n\
"};
void OGLLoadEntryPoints_ES_3_0()
{
OGLLoadEntryPoints_3_2();
}
void OGLCreateRenderer_ES_3_0(OpenGLRenderer **rendererPtr)
{
if (IsOpenGLDriverVersionSupported(3, 0, 0))
{
*rendererPtr = new OpenGLESRenderer_3_0;
(*rendererPtr)->SetVersion(3, 0, 0);
}
}
OpenGLESRenderer_3_0::OpenGLESRenderer_3_0()
{
_variantID = OpenGLVariantID_ES3_3_0;
_geometryDrawBuffersEnum = GeometryDrawBuffersEnumES;
_geometryAttachmentWorkingBuffer = GeometryAttachmentWorkingBufferES;
_geometryAttachmentPolyID = GeometryAttachmentPolyIDES;
_geometryAttachmentFogAttributes = GeometryAttachmentFogAttributesES;
ref->textureSrcTypeCIColor = GL_UNSIGNED_BYTE;
ref->textureSrcTypeCIFog = GL_UNSIGNED_BYTE;
ref->textureSrcTypeEdgeColor = GL_UNSIGNED_BYTE;
ref->textureSrcTypeToonTable = GL_UNSIGNED_BYTE;
}
Render3DError OpenGLESRenderer_3_0::InitExtensions()
{
OGLRenderRef &OGLRef = *this->ref;
Render3DError error = OGLERROR_NOERR;
// Get OpenGL extensions
std::set<std::string> oglExtensionSet;
this->GetExtensionSet(&oglExtensionSet);
// OpenGL ES 3.0 should fully support FBOs, so we don't need the default framebuffer.
// However, OpenGL ES has traditionally required some kind of surface buffer attached
// to the context before using it. We don't want it, nor would we ever use it here.
// Therefore, check if our context supports being surfaceless before doing anything else,
// as this works as a kind of compatibility check.
if (!this->IsExtensionPresent(&oglExtensionSet, "GL_OES_surfaceless_context"))
{
INFO("OpenGL ES: Client contexts are not expected to have any surfaces attached\n");
INFO(" to the default framebuffer. The fact that the context does not\n");
INFO(" work surfaceless may indicate an error in the context creation,\n");
INFO(" or that your platform's context creation is too old.\n");
error = OGLERROR_FEATURE_UNSUPPORTED;
return error;
}
// Mirrored Repeat Mode Support
OGLRef.stateTexMirroredRepeat = GL_MIRRORED_REPEAT;
// Blending Support
this->_isBlendFuncSeparateSupported = true;
this->_isBlendEquationSeparateSupported = true;
// Fixed locations in shaders are supported in ES 3.0 by default.
this->_isShaderFixedLocationSupported = true;
GLfloat maxAnisotropyOGL = 1.0f;
glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &maxAnisotropyOGL);
this->_deviceInfo.maxAnisotropy = (float)maxAnisotropyOGL;
// OpenGL ES 3.0 should be able to handle the GL_RGBA format in glReadPixels without any performance penalty.
OGLRef.readPixelsBestFormat = GL_RGBA;
OGLRef.readPixelsBestDataType = GL_UNSIGNED_BYTE;
this->_deviceInfo.isEdgeMarkSupported = true;
this->_deviceInfo.isFogSupported = true;
// Need to generate this texture first because FBO creation needs it.
// This texture is only required by shaders, and so if shader creation
// fails, then we can immediately delete this texture if an error occurs.
glGenTextures(1, &OGLRef.texFinalColorID);
glActiveTexture(GL_TEXTURE0 + OGLTextureUnitID_FinalColor);
glBindTexture(GL_TEXTURE_2D, OGLRef.texFinalColorID);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, (GLsizei)this->_framebufferWidth, (GLsizei)this->_framebufferHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
glActiveTexture(GL_TEXTURE0);
// OpenGL ES 3.0 should have all the necessary features to be able to flip and convert the framebuffer.
this->_willConvertFramebufferOnGPU = true;
this->_enableTextureSmoothing = CommonSettings.GFX3D_Renderer_TextureSmoothing;
this->_emulateShadowPolygon = CommonSettings.OpenGL_Emulation_ShadowPolygon;
this->_emulateSpecialZeroAlphaBlending = CommonSettings.OpenGL_Emulation_SpecialZeroAlphaBlending;
this->_emulateNDSDepthCalculation = CommonSettings.OpenGL_Emulation_NDSDepthCalculation;
this->_emulateDepthLEqualPolygonFacing = CommonSettings.OpenGL_Emulation_DepthLEqualPolygonFacing;
// Load and create shaders. Return on any error, since ES 3.0 makes shaders mandatory.
this->isShaderSupported = true;
this->_rsResource = new OpenGLRenderStatesResource();
if (IsOpenGLDriverVersionSupported(3, 2, 0))
{
this->_gResource = new OpenGLGeometryResource(OpenGLVariantID_ES3_3_2);
}
else if (IsOpenGLDriverVersionSupported(3, 1, 0))
{
this->_gResource = new OpenGLGeometryResource(OpenGLVariantID_ES3_3_1);
}
else
{
this->_gResource = new OpenGLGeometryResource(OpenGLVariantID_ES3_3_0);
}
error = this->CreateGeometryPrograms();
if (error != OGLERROR_NOERR)
{
glUseProgram(0);
this->DestroyGeometryPrograms();
this->isShaderSupported = false;
return error;
}
error = this->CreateClearImageProgram(ClearImageVtxShader_150, ClearImageFragShader_150);
if (error != OGLERROR_NOERR)
{
glUseProgram(0);
this->DestroyGeometryPrograms();
this->isShaderSupported = false;
return error;
}
error = this->CreateGeometryZeroDstAlphaProgram(GeometryZeroDstAlphaPixelMaskVtxShader_150, GeometryZeroDstAlphaPixelMaskFragShader_150);
if (error != OGLERROR_NOERR)
{
glUseProgram(0);
this->DestroyGeometryPrograms();
this->DestroyClearImageProgram();
this->isShaderSupported = false;
return error;
}
INFO("OpenGL ES: Successfully created geometry shaders.\n");
error = this->InitPostprocessingPrograms(EdgeMarkVtxShader_150,
EdgeMarkFragShader_150,
FramebufferOutputVtxShader_150,
FramebufferOutput6665FragShader_150,
NULL);
if (error != OGLERROR_NOERR)
{
glUseProgram(0);
this->DestroyGeometryPrograms();
this->DestroyClearImageProgram();
this->DestroyGeometryZeroDstAlphaProgram();
this->isShaderSupported = false;
return error;
}
this->isVBOSupported = true;
this->CreateVBOs();
// PBOs are only used when reading back the rendered framebuffer for the emulated
// BG0 layer. For desktop-class GPUs, doing an asynchronous glReadPixels() call
// is always advantageous since such devices are expected to have their GPUs
// connected to a data bus.
//
// However, many ARM-based mobile devices use integrated GPUs of varying degrees
// of memory latency and implementation quality. This means that the performance
// of an asynchronous glReadPixels() call is NOT guaranteed on such devices.
//
// In fact, many ARM-based devices suffer devastating performance drops when trying
// to do asynchronous framebuffer reads. Therefore, since most OpenGL ES users will
// be running an ARM-based iGPU, we will disable PBOs for OpenGL ES and stick with
// a traditional synchronous glReadPixels() call instead.
this->isPBOSupported = false;
this->isVAOSupported = true;
this->CreateVAOs();
// Load and create FBOs. Return on any error, since OpenGL ES 3.0 includes FBOs as core functionality.
this->isFBOSupported = true;
error = this->CreateFBOs();
if (error != OGLERROR_NOERR)
{
this->isFBOSupported = false;
return error;
}
this->_isFBOBlitSupported = true;
this->isMultisampledFBOSupported = true;
this->_selectedMultisampleSize = CommonSettings.GFX3D_Renderer_MultisampleSize;
GLint maxSamplesOGL = 0;
glGetIntegerv(GL_MAX_SAMPLES, &maxSamplesOGL);
this->_deviceInfo.maxSamples = (u8)maxSamplesOGL;
if (this->_deviceInfo.maxSamples >= 2)
{
// Try and initialize the multisampled FBOs with the GFX3D_Renderer_MultisampleSize.
// However, if the client has this set to 0, then set sampleSize to 2 in order to
// force the generation and the attachments of the buffers at a meaningful sample
// size. If GFX3D_Renderer_MultisampleSize is 0, then we can deallocate the buffer
// memory afterwards.
GLsizei sampleSize = this->GetLimitedMultisampleSize();
if (sampleSize == 0)
{
sampleSize = 2;
}
error = this->CreateMultisampledFBO(sampleSize);
if (error != OGLERROR_NOERR)
{
this->isMultisampledFBOSupported = false;
}
// If GFX3D_Renderer_MultisampleSize is 0, then we can deallocate the buffers now
// in order to save some memory.
if (this->_selectedMultisampleSize == 0)
{
this->ResizeMultisampledFBOs(0);
}
}
else
{
this->isMultisampledFBOSupported = false;
INFO("OpenGL ES: Driver does not support at least 2x multisampled FBOs.\n");
}
this->_isDepthLEqualPolygonFacingSupported = true;
this->_enableMultisampledRendering = ((this->_selectedMultisampleSize >= 2) && this->isMultisampledFBOSupported);
return OGLERROR_NOERR;
}
Render3DError OpenGLESRenderer_3_0::CreateGeometryPrograms()
{
Render3DError error = OGLERROR_NOERR;
OGLRenderRef &OGLRef = *this->ref;
// Create shader resources.
glGenTextures(1, &OGLRef.texFogDensityTableID);
glActiveTexture(GL_TEXTURE0 + OGLTextureUnitID_LookupTable);
glBindTexture(GL_TEXTURE_2D, OGLRef.texFogDensityTableID);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexImage2D(GL_TEXTURE_2D, 0, GL_R8, 32, 1, 0, GL_RED, GL_UNSIGNED_BYTE, NULL);
glActiveTexture(GL_TEXTURE0);
OGLGeometryFlags programFlags;
programFlags.value = 0;
std::stringstream shaderHeader;
shaderHeader << "#version 300 es\n";
shaderHeader << "precision highp float;\n";
shaderHeader << "precision highp int;\n";
shaderHeader << "\n";
std::stringstream vsHeader;
vsHeader << "#define IN_VTX_POSITION layout (location = " << OGLVertexAttributeID_Position << ") in\n";
vsHeader << "#define IN_VTX_TEXCOORD0 layout (location = " << OGLVertexAttributeID_TexCoord0 << ") in\n";
vsHeader << "#define IN_VTX_COLOR layout (location = " << OGLVertexAttributeID_Color << ") in\n";
vsHeader << "\n";
vsHeader << "#define IS_USING_UBO_POLY_STATES " << ((this->_gResource->IsPolyStatesBufferUBO()) ? 1 : 0) << "\n";
vsHeader << "#define IS_USING_TBO_POLY_STATES " << ((this->_gResource->IsPolyStatesBufferTBO()) ? 1 : 0) << "\n";
vsHeader << "#define DEPTH_EQUALS_TEST_TOLERANCE " << DEPTH_EQUALS_TEST_TOLERANCE << ".0\n";
vsHeader << "\n";
std::string vtxShaderCode = shaderHeader.str() + vsHeader.str() + std::string(GeometryVtxShader_ES300);
for (size_t flagsValue = 0; flagsValue < 128; flagsValue++, programFlags.value++)
{
std::stringstream shaderFlags;
shaderFlags << "#define OUT_COLOR layout (location = 0) out\n";
shaderFlags << "#define OUT_WORKING_BUFFER layout (location = " << (OGL_WORKING_ATTACHMENT_ID - GL_COLOR_ATTACHMENT0) << ") out\n";
shaderFlags << "#define OUT_POLY_ID layout (location = " << (OGL_POLYID_ATTACHMENT_ID - GL_COLOR_ATTACHMENT0) << ") out\n";
shaderFlags << "#define OUT_FOG_ATTRIBUTES layout (location = " << (OGL_FOGATTRIBUTES_ATTACHMENT_ID - GL_COLOR_ATTACHMENT0) << ") out\n";
shaderFlags << "\n";
shaderFlags << "#define USE_TEXTURE_SMOOTHING " << ((this->_enableTextureSmoothing) ? 1 : 0) << "\n";
shaderFlags << "#define USE_NDS_DEPTH_CALCULATION " << ((this->_emulateNDSDepthCalculation) ? 1 : 0) << "\n";
shaderFlags << "#define USE_DEPTH_LEQUAL_POLYGON_FACING " << ((this->_emulateDepthLEqualPolygonFacing) ? 1 : 0) << "\n";
shaderFlags << "\n";
shaderFlags << "#define ENABLE_W_DEPTH " << ((programFlags.EnableWDepth) ? 1 : 0) << "\n";
shaderFlags << "#define ENABLE_ALPHA_TEST " << ((programFlags.EnableAlphaTest) ? "true\n" : "false\n");
shaderFlags << "#define ENABLE_TEXTURE_SAMPLING " << ((programFlags.EnableTextureSampling) ? "true\n" : "false\n");
shaderFlags << "#define TOON_SHADING_MODE " << ((programFlags.ToonShadingMode) ? 1 : 0) << "\n";
shaderFlags << "#define ENABLE_FOG " << ((programFlags.EnableFog) ? 1 : 0) << "\n";
shaderFlags << "#define ENABLE_EDGE_MARK " << ((programFlags.EnableEdgeMark) ? 1 : 0) << "\n";
shaderFlags << "#define DRAW_MODE_OPAQUE " << ((programFlags.OpaqueDrawMode) ? 1 : 0) << "\n";
shaderFlags << "\n";
std::string fragShaderCode = shaderHeader.str() + shaderFlags.str() + std::string(GeometryFragShader_ES300);
error = this->ShaderProgramCreate(OGLRef.vertexGeometryShaderID,
OGLRef.fragmentGeometryShaderID[flagsValue],
OGLRef.programGeometryID[flagsValue],
vtxShaderCode.c_str(),
fragShaderCode.c_str());
if (error != OGLERROR_NOERR)
{
INFO("OpenGL ES: Failed to create the GEOMETRY shader program.\n");
glUseProgram(0);
this->DestroyGeometryPrograms();
return error;
}
glLinkProgram(OGLRef.programGeometryID[flagsValue]);
if (!this->ValidateShaderProgramLink(OGLRef.programGeometryID[flagsValue]))
{
INFO("OpenGL ES: Failed to link the GEOMETRY shader program.\n");
glUseProgram(0);
this->DestroyGeometryPrograms();
return OGLERROR_SHADER_CREATE_ERROR;
}
glValidateProgram(OGLRef.programGeometryID[flagsValue]);
glUseProgram(OGLRef.programGeometryID[flagsValue]);
// Set up render states UBO
const GLuint uniformBlockRenderStates = glGetUniformBlockIndex(OGLRef.programGeometryID[flagsValue], "RenderStates");
glUniformBlockBinding(OGLRef.programGeometryID[flagsValue], uniformBlockRenderStates, OGLBindingPointID_RenderStates);
GLint uboSize = 0;
glGetActiveUniformBlockiv(OGLRef.programGeometryID[flagsValue], uniformBlockRenderStates, GL_UNIFORM_BLOCK_DATA_SIZE, &uboSize);
assert(uboSize == sizeof(OGLRenderStates));
const GLint uniformTexRenderObject = glGetUniformLocation(OGLRef.programGeometryID[flagsValue], "texRenderObject");
glUniform1i(uniformTexRenderObject, 0);
if (this->_gResource->IsPolyStatesBufferUBO())
{
const GLuint uniformBlockPolyStates = glGetUniformBlockIndex(OGLRef.programGeometryID[flagsValue], "PolyStates");
glUniformBlockBinding(OGLRef.programGeometryID[flagsValue], uniformBlockPolyStates, OGLBindingPointID_PolyStates);
}
else
{
const GLint uniformTexBufferPolyStates = glGetUniformLocation(OGLRef.programGeometryID[flagsValue], "PolyStates");
glUniform1i(uniformTexBufferPolyStates, OGLTextureUnitID_PolyStates);
}
if (this->_emulateDepthLEqualPolygonFacing && !programFlags.OpaqueDrawMode)
{
const GLint uniformTexBackfacing = glGetUniformLocation(OGLRef.programGeometryID[flagsValue], "inDstBackFacing");
glUniform1i(uniformTexBackfacing, OGLTextureUnitID_FinalColor);
}
OGLRef.uniformTexDrawOpaque[flagsValue] = glGetUniformLocation(OGLRef.programGeometryID[flagsValue], "texDrawOpaque");
OGLRef.uniformDrawModeDepthEqualsTest[flagsValue] = glGetUniformLocation(OGLRef.programGeometryID[flagsValue], "drawModeDepthEqualsTest");
OGLRef.uniformPolyDrawShadow[flagsValue] = glGetUniformLocation(OGLRef.programGeometryID[flagsValue], "polyDrawShadow");
OGLRef.uniformPolyStateIndex[flagsValue] = glGetUniformLocation(OGLRef.programGeometryID[flagsValue], "polyIndex");
OGLRef.uniformPolyDepthOffset[flagsValue] = glGetUniformLocation(OGLRef.programGeometryID[flagsValue], "polyDepthOffset");
}
return error;
}
Render3DError OpenGLESRenderer_3_0::CreateClearImageProgram(const char *vsCString, const char *fsCString)
{
Render3DError error = OGLERROR_NOERR;
OGLRenderRef &OGLRef = *this->ref;
std::stringstream shaderHeader;
shaderHeader << "#version 300 es\n";
shaderHeader << "precision highp float;\n";
shaderHeader << "precision highp int;\n";
shaderHeader << "\n";
std::stringstream vsHeader;
if (this->_isShaderFixedLocationSupported)
{
vsHeader << "#define IN_VTX_POSITION layout (location = " << OGLVertexAttributeID_Position << ") in\n";
vsHeader << "#define IN_VTX_TEXCOORD0 layout (location = " << OGLVertexAttributeID_TexCoord0 << ") in\n";
}
else
{
vsHeader << "#define IN_VTX_POSITION in\n";
vsHeader << "#define IN_VTX_TEXCOORD0 in\n";
}
vsHeader << "\n";
std::string vtxShaderCode = shaderHeader.str() + vsHeader.str() + std::string(vsCString);
std::stringstream fsHeader;
if (this->_isShaderFixedLocationSupported)
{
fsHeader << "#define OUT_COLOR layout (location = 0) out\n";
fsHeader << "#define OUT_FOGATTR layout (location = 1) out\n";
}
else
{
fsHeader << "#define OUT_COLOR out\n";
fsHeader << "#define OUT_FOGATTR out\n";
}
fsHeader << "\n";
std::string fragShaderCodeFogColor = shaderHeader.str() + fsHeader.str() + std::string(fsCString);
error = this->ShaderProgramCreate(OGLRef.vsClearImageID,
OGLRef.fsClearImageID,
OGLRef.pgClearImageID,
vtxShaderCode.c_str(),
fragShaderCodeFogColor.c_str());
if (error != OGLERROR_NOERR)
{
INFO("OpenGL ES: Failed to create the CLEAR_IMAGE shader program.\n");
glUseProgram(0);
this->DestroyClearImageProgram();
return error;
}
glLinkProgram(OGLRef.pgClearImageID);
if (!this->ValidateShaderProgramLink(OGLRef.pgClearImageID))
{
INFO("OpenGL ES: Failed to link the CLEAR_IMAGE shader color/fog program.\n");
glUseProgram(0);
this->DestroyClearImageProgram();
return OGLERROR_SHADER_CREATE_ERROR;
}
glValidateProgram(OGLRef.pgClearImageID);
glUseProgram(OGLRef.pgClearImageID);
const GLint uniformTexCIColor = glGetUniformLocation(OGLRef.pgClearImageID, "texCIColor");
const GLint uniformTexCIFogAttr = glGetUniformLocation(OGLRef.pgClearImageID, "texCIFogAttr");
const GLint uniformTexCIDepthCF = glGetUniformLocation(OGLRef.pgClearImageID, "texCIDepth");
glUniform1i(uniformTexCIColor, OGLTextureUnitID_CIColor);
glUniform1i(uniformTexCIFogAttr, OGLTextureUnitID_CIFogAttr);
glUniform1i(uniformTexCIDepthCF, OGLTextureUnitID_CIDepth);
return error;
}
Render3DError OpenGLESRenderer_3_0::CreateGeometryZeroDstAlphaProgram(const char *vtxShaderCString, const char *fragShaderCString)
{
Render3DError error = OGLERROR_NOERR;
OGLRenderRef &OGLRef = *this->ref;
if ( (vtxShaderCString == NULL) || (fragShaderCString == NULL) )
{
return error;
}
std::stringstream shaderHeader;
shaderHeader << "#version 300 es\n";
shaderHeader << "precision highp float;\n";
shaderHeader << "precision highp int;\n";
shaderHeader << "\n";
std::stringstream vsHeader;
vsHeader << "#define IN_VTX_POSITION layout (location = " << OGLVertexAttributeID_Position << ") in\n";
vsHeader << "#define IN_VTX_TEXCOORD0 layout (location = " << OGLVertexAttributeID_TexCoord0 << ") in\n";
vsHeader << "#define IN_VTX_COLOR layout (location = " << OGLVertexAttributeID_Color << ") in\n";
std::string vtxShaderCode = shaderHeader.str() + vsHeader.str() + std::string(vtxShaderCString);
std::string fragShaderCode = shaderHeader.str() + std::string(fragShaderCString);
error = this->ShaderProgramCreate(OGLRef.vtxShaderGeometryZeroDstAlphaID,
OGLRef.fragShaderGeometryZeroDstAlphaID,
OGLRef.programGeometryZeroDstAlphaID,
vtxShaderCode.c_str(),
fragShaderCode.c_str());
if (error != OGLERROR_NOERR)
{
INFO("OpenGL ES: Failed to create the GEOMETRY ZERO DST ALPHA shader program.\n");
glUseProgram(0);
this->DestroyGeometryZeroDstAlphaProgram();
return error;
}
glLinkProgram(OGLRef.programGeometryZeroDstAlphaID);
if (!this->ValidateShaderProgramLink(OGLRef.programGeometryZeroDstAlphaID))
{
INFO("OpenGL ES: Failed to link the GEOMETRY ZERO DST ALPHA shader program.\n");
glUseProgram(0);
this->DestroyGeometryZeroDstAlphaProgram();
return OGLERROR_SHADER_CREATE_ERROR;
}
glValidateProgram(OGLRef.programGeometryZeroDstAlphaID);
glUseProgram(OGLRef.programGeometryZeroDstAlphaID);
const GLint uniformTexGColor = glGetUniformLocation(OGLRef.programGeometryZeroDstAlphaID, "texInFragColor");
glUniform1i(uniformTexGColor, OGLTextureUnitID_GColor);
return OGLERROR_NOERR;
}
Render3DError OpenGLESRenderer_3_0::CreateEdgeMarkProgram(const bool isMultisample, const char *vtxShaderCString, const char *fragShaderCString)
{
Render3DError error = OGLERROR_NOERR;
OGLRenderRef &OGLRef = *this->ref;
if ( (vtxShaderCString == NULL) || (fragShaderCString == NULL) )
{
return error;
}
std::stringstream shaderHeader;
shaderHeader << "#version 300 es\n";
shaderHeader << "precision highp float;\n";
shaderHeader << "precision highp int;\n";
shaderHeader << "\n";
shaderHeader << "#define FRAMEBUFFER_SIZE_X " << this->_framebufferWidth << ".0 \n";
shaderHeader << "#define FRAMEBUFFER_SIZE_Y " << this->_framebufferHeight << ".0 \n";
shaderHeader << "\n";
std::stringstream vsHeader;
vsHeader << "#define IN_VTX_POSITION layout (location = " << OGLVertexAttributeID_Position << ") in\n";
vsHeader << "#define IN_VTX_TEXCOORD0 layout (location = " << OGLVertexAttributeID_TexCoord0 << ") in\n";
vsHeader << "#define IN_VTX_COLOR layout (location = " << OGLVertexAttributeID_Color << ") in\n";
std::stringstream fsHeader;
fsHeader << "#define OUT_COLOR layout (location = 0) out\n";
std::string vtxShaderCode = shaderHeader.str() + vsHeader.str() + std::string(vtxShaderCString);
std::string fragShaderCode = shaderHeader.str() + fsHeader.str() + std::string(fragShaderCString);
error = this->ShaderProgramCreate(OGLRef.vertexEdgeMarkShaderID,
OGLRef.fragmentEdgeMarkShaderID,
OGLRef.programEdgeMarkID,
vtxShaderCode.c_str(),
fragShaderCode.c_str());
if (error != OGLERROR_NOERR)
{
INFO("OpenGL ES: Failed to create the EDGE MARK shader program.\n");
glUseProgram(0);
this->DestroyEdgeMarkProgram();
return error;
}
glLinkProgram(OGLRef.programEdgeMarkID);
if (!this->ValidateShaderProgramLink(OGLRef.programEdgeMarkID))
{
INFO("OpenGL ES: Failed to link the EDGE MARK shader program.\n");
glUseProgram(0);
this->DestroyEdgeMarkProgram();
return OGLERROR_SHADER_CREATE_ERROR;
}
glValidateProgram(OGLRef.programEdgeMarkID);
glUseProgram(OGLRef.programEdgeMarkID);
const GLuint uniformBlockRenderStates = glGetUniformBlockIndex(OGLRef.programEdgeMarkID, "RenderStates");
glUniformBlockBinding(OGLRef.programEdgeMarkID, uniformBlockRenderStates, OGLBindingPointID_RenderStates);
const GLint uniformTexGDepth = glGetUniformLocation(OGLRef.programEdgeMarkID, "texInFragDepth");
const GLint uniformTexGPolyID = glGetUniformLocation(OGLRef.programEdgeMarkID, "texInPolyID");
glUniform1i(uniformTexGDepth, OGLTextureUnitID_DepthStencil);
glUniform1i(uniformTexGPolyID, OGLTextureUnitID_GPolyID);
return OGLERROR_NOERR;
}
Render3DError OpenGLESRenderer_3_0::CreateFogProgram(const OGLFogProgramKey fogProgramKey, const bool isMultisample, const char *vtxShaderCString, const char *fragShaderCString)
{
Render3DError error = OGLERROR_NOERR;
OGLRenderRef &OGLRef = *this->ref;
if (vtxShaderCString == NULL)
{
INFO("OpenGL ES: The FOG vertex shader is unavailable.\n");
error = OGLERROR_VERTEX_SHADER_PROGRAM_LOAD_ERROR;
return error;
}
else if (fragShaderCString == NULL)
{
INFO("OpenGL ES: The FOG fragment shader is unavailable.\n");
error = OGLERROR_FRAGMENT_SHADER_PROGRAM_LOAD_ERROR;
return error;
}
const s32 fogOffset = fogProgramKey.offset;
const GLfloat fogOffsetf = (GLfloat)fogOffset / 32767.0f;
const s32 fogStep = 0x0400 >> fogProgramKey.shift;
std::stringstream shaderHeader;
shaderHeader << "#version 300 es\n";
shaderHeader << "precision highp float;\n";
shaderHeader << "precision highp int;\n";
shaderHeader << "\n";
std::stringstream vsHeader;
vsHeader << "#define IN_VTX_POSITION layout (location = " << OGLVertexAttributeID_Position << ") in\n";
vsHeader << "#define IN_VTX_TEXCOORD0 layout (location = " << OGLVertexAttributeID_TexCoord0 << ") in\n";
vsHeader << "#define IN_VTX_COLOR layout (location = " << OGLVertexAttributeID_Color << ") in\n";
std::stringstream fsHeader;
fsHeader << "#define FOG_OFFSET " << fogOffset << "\n";
fsHeader << "#define FOG_OFFSETF " << fogOffsetf << (((fogOffsetf == 0.0f) || (fogOffsetf == 1.0f)) ? ".0" : "") << "\n";
fsHeader << "#define FOG_STEP " << fogStep << "\n";
fsHeader << "\n";
fsHeader << "#define OUT_COLOR layout (location = 0) out\n";
std::string vtxShaderCode = shaderHeader.str() + vsHeader.str() + std::string(vtxShaderCString);
std::string fragShaderCode = shaderHeader.str() + fsHeader.str() + std::string(fragShaderCString);
OGLFogShaderID shaderID;
shaderID.program = 0;
shaderID.fragShader = 0;
error = this->ShaderProgramCreate(OGLRef.vertexFogShaderID,
shaderID.fragShader,
shaderID.program,
vtxShaderCode.c_str(),
fragShaderCode.c_str());
this->_fogProgramMap[fogProgramKey.key] = shaderID;
if (error != OGLERROR_NOERR)
{
INFO("OpenGL ES: Failed to create the FOG shader program.\n");
glUseProgram(0);
this->DestroyFogProgram(fogProgramKey);
return error;
}
glLinkProgram(shaderID.program);
if (!this->ValidateShaderProgramLink(shaderID.program))
{
INFO("OpenGL ES: Failed to link the FOG shader program.\n");
glUseProgram(0);
this->DestroyFogProgram(fogProgramKey);
return OGLERROR_SHADER_CREATE_ERROR;
}
glValidateProgram(shaderID.program);
glUseProgram(shaderID.program);
const GLuint uniformBlockRenderStates = glGetUniformBlockIndex(shaderID.program, "RenderStates");
glUniformBlockBinding(shaderID.program, uniformBlockRenderStates, OGLBindingPointID_RenderStates);
const GLint uniformTexGDepth = glGetUniformLocation(shaderID.program, "texInFragDepth");
const GLint uniformTexGFog = glGetUniformLocation(shaderID.program, "texInFogAttributes");
const GLint uniformTexFogDensityTable = glGetUniformLocation(shaderID.program, "texFogDensityTable");
glUniform1i(uniformTexGDepth, OGLTextureUnitID_DepthStencil);
glUniform1i(uniformTexGFog, OGLTextureUnitID_FogAttr);
glUniform1i(uniformTexFogDensityTable, OGLTextureUnitID_LookupTable);
return OGLERROR_NOERR;
}
Render3DError OpenGLESRenderer_3_0::CreateFramebufferOutput6665Program(const char *vtxShaderCString, const char *fragShaderCString)
{
Render3DError error = OGLERROR_NOERR;
OGLRenderRef &OGLRef = *this->ref;
if ( (vtxShaderCString == NULL) || (fragShaderCString == NULL) )
{
return error;
}
std::stringstream shaderHeader;
shaderHeader << "#version 300 es\n";
shaderHeader << "precision highp float;\n";
shaderHeader << "precision highp int;\n";
shaderHeader << "\n";
shaderHeader << "#define FRAMEBUFFER_SIZE_X " << this->_framebufferWidth << ".0 \n";
shaderHeader << "#define FRAMEBUFFER_SIZE_Y " << this->_framebufferHeight << ".0 \n";
shaderHeader << "\n";
std::stringstream vsHeader;
vsHeader << "#define IN_VTX_POSITION layout (location = " << OGLVertexAttributeID_Position << ") in\n";
vsHeader << "#define IN_VTX_TEXCOORD0 layout (location = " << OGLVertexAttributeID_TexCoord0 << ") in\n";
vsHeader << "#define IN_VTX_COLOR layout (location = " << OGLVertexAttributeID_Color << ") in\n";
std::stringstream fsHeader;
fsHeader << "#define OUT_COLOR layout (location = " << (OGL_WORKING_ATTACHMENT_ID - GL_COLOR_ATTACHMENT0) << ") out\n";
std::string vtxShaderCode = shaderHeader.str() + vsHeader.str() + std::string(vtxShaderCString);
std::string fragShaderCode = shaderHeader.str() + fsHeader.str() + std::string(fragShaderCString);
error = this->ShaderProgramCreate(OGLRef.vertexFramebufferOutput6665ShaderID,
OGLRef.fragmentFramebufferRGBA6665OutputShaderID,
OGLRef.programFramebufferRGBA6665OutputID,
vtxShaderCode.c_str(),
fragShaderCode.c_str());
if (error != OGLERROR_NOERR)
{
INFO("OpenGL ES: Failed to create the FRAMEBUFFER OUTPUT RGBA6665 shader program.\n");
glUseProgram(0);
this->DestroyFramebufferOutput6665Programs();
return error;
}
glLinkProgram(OGLRef.programFramebufferRGBA6665OutputID);
if (!this->ValidateShaderProgramLink(OGLRef.programFramebufferRGBA6665OutputID))
{
INFO("OpenGL ES: Failed to link the FRAMEBUFFER OUTPUT RGBA6665 shader program.\n");
glUseProgram(0);
this->DestroyFramebufferOutput6665Programs();
return OGLERROR_SHADER_CREATE_ERROR;
}
glValidateProgram(OGLRef.programFramebufferRGBA6665OutputID);
glUseProgram(OGLRef.programFramebufferRGBA6665OutputID);
const GLint uniformTexGColor = glGetUniformLocation(OGLRef.programFramebufferRGBA6665OutputID, "texInFragColor");
glUniform1i(uniformTexGColor, OGLTextureUnitID_GColor);
return OGLERROR_NOERR;
}

View File

@ -0,0 +1,59 @@
/*
Copyright (C) 2024 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with the this software. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OGLRENDER_ES3_H
#define OGLRENDER_ES3_H
#include "OGLRender_3_2.h"
// A port that wants to use the OpenGL ES renderer must assign the two following functions
// to OGLLoadEntryPoints_ES_3_0_Func and OGLCreateRenderer_ES_3_0_Func, respectively.
//
// In addition, the port must add the following GPU3DInterface objects to core3DList:
// - gpu3Dgl_ES_3_0: Selects the OpenGL ES 3.0 renderer, and returns an error if it is
// not available on the host system.
//
// Finally, the port must call GPU->Set3DRendererByID() and pass in the index where
// gpu3Dgl_ES_3_0 exists in core3DList so that the emulator can create the appropriate
// OpenGLRenderer object.
//
// Example code:
// OGLLoadEntryPoints_ES_3_0_Func = &OGLLoadEntryPoints_ES_3_0;
// OGLCreateRenderer_ES_3_0_Func = &OGLCreateRenderer_ES_3_0;
// GPU3DInterface *core3DList[] = { &gpu3DNull, &gpu3DRasterize, &gpu3Dgl_ES_3_0, NULL };
// GPU->Set3DRendererByID(2);
void OGLLoadEntryPoints_ES_3_0();
void OGLCreateRenderer_ES_3_0(OpenGLRenderer **rendererPtr);
class OpenGLESRenderer_3_0 : public OpenGLRenderer_3_2
{
protected:
virtual Render3DError CreateGeometryPrograms();
virtual Render3DError CreateClearImageProgram(const char *vsCString, const char *fsCString);
virtual Render3DError CreateGeometryZeroDstAlphaProgram(const char *vtxShaderCString, const char *fragShaderCString);
virtual Render3DError CreateEdgeMarkProgram(const bool isMultisample, const char *vtxShaderCString, const char *fragShaderCString);
virtual Render3DError CreateFogProgram(const OGLFogProgramKey fogProgramKey, const bool isMultisample, const char *vtxShaderCString, const char *fragShaderCString);
virtual Render3DError CreateFramebufferOutput6665Program(const char *vtxShaderCString, const char *fragShaderCString);
public:
OpenGLESRenderer_3_0();
virtual Render3DError InitExtensions();
};
#endif // OGLRENDER_ES3_H

View File

@ -1,12 +1,12 @@
#ifndef __GNUC__
#pragma pack(push, 1)
#pragma warning(disable : 4103)
#endif
#ifndef __PACKED
#ifdef __GNUC__
#define __PACKED __attribute__((__packed__))
#else
#define __PACKED
#endif
#endif
#ifndef __GNUC__
#pragma pack(push, 1)
#pragma warning(disable : 4103)
#endif
#ifndef __PACKED
#ifdef __GNUC__
#define __PACKED __attribute__((__packed__))
#else
#define __PACKED
#endif
#endif

View File

@ -1,3 +1,3 @@
#ifndef __GNUC__
#pragma pack(pop)
#endif
#ifndef __GNUC__
#pragma pack(pop)
#endif

View File

@ -1,6 +1,6 @@
/*
Copyright 2007 Guillaume Duhamel
Copyright 2007-2012 DeSmuME team
Copyright 2007-2017 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -25,6 +25,8 @@
#include <zzip/zzip.h>
#endif
#include "utils/xstring.h"
#ifdef WIN32
#define stat(...) _stat(__VA_ARGS__)
#define S_IFMT _S_IFMT
@ -55,6 +57,7 @@ void STDROMReaderDeInit(void *);
u32 STDROMReaderSize(void *);
int STDROMReaderSeek(void *, int, int);
int STDROMReaderRead(void *, void *, u32);
int STDROMReaderWrite(void *, void *, u32);
ROMReader_struct STDROMReader =
{
@ -64,54 +67,87 @@ ROMReader_struct STDROMReader =
STDROMReaderDeInit,
STDROMReaderSize,
STDROMReaderSeek,
STDROMReaderRead
STDROMReaderRead,
STDROMReaderWrite
};
void * STDROMReaderInit(const char * filename)
struct STDROMReaderData
{
#ifdef WIN32
struct _stat sb;
#else
FILE* file;
long pos;
};
void* STDROMReaderInit(const char* filename)
{
#ifndef _MSC_VER
struct stat sb;
#endif
if (stat(filename, &sb) == -1)
return 0;
if ((sb.st_mode & S_IFMT) != S_IFREG)
return 0;
#endif
#ifdef WIN32
FILE* inf = _wfopen(mbstowcs((std::string)filename).c_str(),L"rb");
#else
FILE* inf = fopen(filename, "rb");
#endif
if(!inf) return NULL;
return (void *) fopen(filename, "rb");
STDROMReaderData* ret = new STDROMReaderData();
ret->file = inf;
ret->pos = 0;
return (void*)ret;
}
void STDROMReaderDeInit(void * file)
{
if (!file) return ;
fclose((FILE*)file);
fclose(((STDROMReaderData*)file)->file);
delete ((STDROMReaderData*)file);
}
u32 STDROMReaderSize(void * file)
{
u32 size;
if (!file) return 0 ;
if (!file) return 0;
fseek((FILE*)file, 0, SEEK_END);
size = ftell((FILE*)file);
fseek((FILE*)file, 0, SEEK_SET);
FILE* inf = ((STDROMReaderData*)file)->file;
fseek(inf, 0, SEEK_END);
size = ftell(inf);
fseek(inf, ((STDROMReaderData*)file)->pos, SEEK_SET);
return size;
}
int STDROMReaderSeek(void * file, int offset, int whence)
{
if (!file) return 0 ;
return fseek((FILE*)file, offset, whence);
//not normal fseek return value meanings. awesome.
if (!file) return 0;
if(whence == SEEK_SET && offset == ((STDROMReaderData*)file)->pos)
return 1;
fseek(((STDROMReaderData*)file)->file, offset, whence);
((STDROMReaderData*)file)->pos = ftell(((STDROMReaderData*)file)->file);
return 1;
}
int STDROMReaderRead(void * file, void * buffer, u32 size)
{
if (!file) return 0 ;
return fread(buffer, 1, size, (FILE*)file);
if (!file) return 0;
int read = fread(buffer, 1, size, ((STDROMReaderData*)file)->file);
((STDROMReaderData*)file)->pos += read;
return read;
}
int STDROMReaderWrite(void *, void *, u32)
{
//not supported, for now
return 0;
}
#ifdef HAVE_LIBZ
@ -120,6 +156,7 @@ void GZIPROMReaderDeInit(void *);
u32 GZIPROMReaderSize(void *);
int GZIPROMReaderSeek(void *, int, int);
int GZIPROMReaderRead(void *, void *, u32);
int GZIPROMReaderWrite(void *, void *, u32);
ROMReader_struct GZIPROMReader =
{
@ -129,7 +166,8 @@ ROMReader_struct GZIPROMReader =
GZIPROMReaderDeInit,
GZIPROMReaderSize,
GZIPROMReaderSeek,
GZIPROMReaderRead
GZIPROMReaderRead,
GZIPROMReaderWrite
};
void * GZIPROMReaderInit(const char * filename)
@ -166,6 +204,12 @@ int GZIPROMReaderRead(void * file, void * buffer, u32 size)
{
return gzread((gzFile)file, buffer, size);
}
int GZIPROMReaderWrite(void *, void *, u32)
{
//not supported, ever
return 0;
}
#endif
#ifdef HAVE_LIBZZIP
@ -174,6 +218,7 @@ void ZIPROMReaderDeInit(void *);
u32 ZIPROMReaderSize(void *);
int ZIPROMReaderSeek(void *, int, int);
int ZIPROMReaderRead(void *, void *, u32);
int ZIPROMReaderWrite(void *, void *, u32);
ROMReader_struct ZIPROMReader =
{
@ -183,7 +228,8 @@ ROMReader_struct ZIPROMReader =
ZIPROMReaderDeInit,
ZIPROMReaderSize,
ZIPROMReaderSeek,
ZIPROMReaderRead
ZIPROMReaderRead,
ZIPROMReaderWrite
};
void * ZIPROMReaderInit(const char * filename)
@ -192,12 +238,13 @@ void * ZIPROMReaderInit(const char * filename)
ZZIP_DIRENT * dirent = zzip_readdir(dir);
if (dir != NULL)
{
char tmp1[1024];
char *tmp1;
char tmp2[1024];
memset(tmp1,0,sizeof(tmp1));
memset(tmp2,0,sizeof(tmp2));
strncpy(tmp1, filename, strlen(filename) - 4);
tmp1 = strndup(filename, strlen(filename) - 4);
sprintf(tmp2, "%s/%s", tmp1, dirent->d_name);
free(tmp1);
return zzip_fopen(tmp2, "rb");
}
return NULL;
@ -232,4 +279,97 @@ int ZIPROMReaderRead(void * file, void * buffer, u32 size)
return zzip_read((ZZIP_FILE*)file, buffer, size);
#endif
}
int ZIPROMReaderWrite(void *, void *, u32)
{
//not supported ever
return 0;
}
#endif
struct {
void* buf;
int len;
int pos;
} mem;
void * MemROMReaderInit(const char * filename)
{
return NULL; //dummy
}
void MemROMReaderDeInit(void *)
{
//nothing to do
}
u32 MemROMReaderSize(void *)
{
return (u32)mem.len;
}
int MemROMReaderSeek(void * file, int offset, int whence)
{
switch(whence) {
case SEEK_SET:
mem.pos = offset;
break;
case SEEK_CUR:
mem.pos += offset;
break;
case SEEK_END:
mem.pos = mem.len + offset;
break;
}
return mem.pos;
}
int MemROMReaderRead(void * file, void * buffer, u32 size)
{
if(mem.pos<0) return 0;
int todo = (int)size;
int remain = mem.len - mem.pos;
if(remain<todo)
todo = remain;
if(todo<=0)
return 0;
else if(todo==1) *(u8*)buffer = ((u8*)mem.buf)[mem.pos];
else memcpy(buffer,(u8*)mem.buf + mem.pos, todo);
mem.pos += todo;
return todo;
}
int MemROMReaderWrite(void * file, void * buffer, u32 size)
{
if(mem.pos<0) return 0;
int todo = (int)size;
int remain = mem.len - mem.pos;
if(remain<todo)
todo = remain;
if (todo == 1) ((u8*)mem.buf)[mem.pos] = *(u8*)buffer;
else memcpy((u8*)mem.buf + mem.pos,buffer, todo);
mem.pos += todo;
return todo;
}
static ROMReader_struct MemROMReader =
{
ROMREADER_MEM,
"Memory ROM Reader",
MemROMReaderInit,
MemROMReaderDeInit,
MemROMReaderSize,
MemROMReaderSeek,
MemROMReaderRead,
MemROMReaderWrite,
};
ROMReader_struct * MemROMReaderRead_TrueInit(void* buf, int length)
{
mem.buf = buf;
mem.len = length;
mem.pos = 0;
return &MemROMReader;
}

View File

@ -1,50 +1,58 @@
/*
Copyright (C) 2007 Guillaume Duhamel
Copyright (C) 2007 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with the this software. If not, see <http://www.gnu.org/licenses/>.
*/
#ifdef HAVE_LIBZ
#include <zlib.h>
#endif
#include <string.h>
#include "types.h"
#define ROMREADER_DEFAULT -1
#define ROMREADER_STD 0
#define ROMREADER_GZIP 1
#define ROMREADER_ZIP 2
typedef struct
{
int id;
const char * Name;
void * (*Init)(const char * filename);
void (*DeInit)(void * file);
u32 (*Size)(void * file);
int (*Seek)(void * file, int offset, int whence);
int (*Read)(void * file, void * buffer, u32 size);
} ROMReader_struct;
extern ROMReader_struct STDROMReader;
#ifdef HAVE_LIBZ
extern ROMReader_struct GZIPROMReader;
#endif
#ifdef HAVE_LIBZZIP
extern ROMReader_struct ZIPROMReader;
#endif
ROMReader_struct * ROMReaderInit(char ** filename);
/*
Copyright (C) 2007 Guillaume Duhamel
Copyright (C) 2007-2022 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with the this software. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _ROMREADER_H_
#define _ROMREADER_H_
#ifdef HAVE_LIBZ
#include <zlib.h>
#endif
#include <string.h>
#include "types.h"
#define ROMREADER_DEFAULT -1
#define ROMREADER_STD 0
#define ROMREADER_GZIP 1
#define ROMREADER_ZIP 2
#define ROMREADER_MEM 3
typedef struct
{
int id;
const char * Name;
void * (*Init)(const char * filename);
void (*DeInit)(void * file);
u32 (*Size)(void * file);
int (*Seek)(void * file, int offset, int whence);
int (*Read)(void * file, void * buffer, u32 size);
int (*Write)(void * file, void * buffer, u32 size);
} ROMReader_struct;
extern ROMReader_struct STDROMReader;
#ifdef HAVE_LIBZ
extern ROMReader_struct GZIPROMReader;
#endif
#ifdef HAVE_LIBZZIP
extern ROMReader_struct ZIPROMReader;
#endif
ROMReader_struct * ROMReaderInit(char ** filename);
ROMReader_struct * MemROMReaderRead_TrueInit(void* buf, int length);
#endif // _ROMREADER_H_

File diff suppressed because it is too large Load Diff

View File

@ -1,253 +1,305 @@
/*
Copyright 2006 Theo Berkau
Copyright (C) 2006-2010 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with the this software. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef SPU_H
#define SPU_H
#include <iosfwd>
#include <string>
#include <assert.h>
#include "types.h"
#include "matrix.h"
#include "emufile.h"
#include "metaspu/metaspu.h"
#define SNDCORE_DEFAULT -1
#define SNDCORE_DUMMY 0
#define CHANSTAT_STOPPED 0
#define CHANSTAT_PLAY 1
//who made these static? theyre used in multiple places.
FORCEINLINE u32 sputrunc(float f) { return u32floor(f); }
FORCEINLINE u32 sputrunc(double d) { return u32floor(d); }
FORCEINLINE s32 spumuldiv7(s32 val, u8 multiplier) {
assert(multiplier <= 127);
return (multiplier == 127) ? val : ((val * multiplier) >> 7);
}
enum SPUInterpolationMode
{
SPUInterpolation_None = 0,
SPUInterpolation_Linear = 1,
SPUInterpolation_Cosine = 2
};
struct SoundInterface_struct
{
int id;
const char *Name;
int (*Init)(int buffersize);
void (*DeInit)();
void (*UpdateAudio)(s16 *buffer, u32 num_samples);
u32 (*GetAudioSpace)();
void (*MuteAudio)();
void (*UnMuteAudio)();
void (*SetVolume)(int volume);
void (*ClearBuffer)();
void (*FetchSamples)(s16 *sampleBuffer, size_t sampleCount, ESynchMode synchMode, ISynchronizingAudioBuffer *theSynchronizer);
size_t (*PostProcessSamples)(s16 *postProcessBuffer, size_t requestedSampleCount, ESynchMode synchMode, ISynchronizingAudioBuffer *theSynchronizer);
};
extern SoundInterface_struct SNDDummy;
extern SoundInterface_struct SNDFile;
extern int SPU_currentCoreNum;
struct channel_struct
{
channel_struct()
{}
u32 num;
u8 vol;
u8 datashift;
u8 hold;
u8 pan;
u8 waveduty;
u8 repeat;
u8 format;
u8 keyon;
u8 status;
u32 addr;
u16 timer;
u16 loopstart;
u32 length;
u32 totlength;
double double_totlength_shifted;
double sampcnt;
double sampinc;
// ADPCM specific
u32 lastsampcnt;
s16 pcm16b, pcm16b_last;
s16 loop_pcm16b;
int index;
int loop_index;
u16 x;
s16 psgnoise_last;
};
class SPUFifo
{
public:
SPUFifo();
void enqueue(s16 val);
s16 dequeue();
s16 buffer[16];
s32 head,tail,size;
void save(EMUFILE* fp);
bool load(EMUFILE* fp);
void reset();
};
class SPU_struct
{
public:
SPU_struct(int buffersize);
u32 bufpos;
u32 buflength;
s32 *sndbuf;
s32 lastdata; //the last sample that a channel generated
s16 *outbuf;
u32 bufsize;
channel_struct channels[16];
//registers
struct REGS {
REGS()
: mastervol(0)
, ctl_left(0)
, ctl_right(0)
, ctl_ch1bypass(0)
, ctl_ch3bypass(0)
, masteren(0)
, soundbias(0)
{}
u8 mastervol;
u8 ctl_left, ctl_right;
u8 ctl_ch1bypass, ctl_ch3bypass;
u8 masteren;
u16 soundbias;
enum LeftOutputMode
{
LOM_LEFT_MIXER=0, LOM_CH1=1, LOM_CH3=2, LOM_CH1_PLUS_CH3=3
};
enum RightOutputMode
{
ROM_RIGHT_MIXER=0, ROM_CH1=1, ROM_CH3=2, ROM_CH1_PLUS_CH3=3
};
struct CAP {
CAP()
: add(0), source(0), oneshot(0), bits8(0), active(0), dad(0), len(0)
{}
u8 add, source, oneshot, bits8, active;
u32 dad;
u16 len;
struct Runtime {
Runtime()
: running(0), curdad(0), maxdad(0)
{}
u8 running;
u32 curdad;
u32 maxdad;
double sampcnt;
SPUFifo fifo;
} runtime;
} cap[2];
} regs;
void reset();
~SPU_struct();
void KeyOff(int channel);
void KeyOn(int channel);
void KeyProbe(int channel);
void ProbeCapture(int which);
void WriteByte(u32 addr, u8 val);
u8 ReadByte(u32 addr);
u16 ReadWord(u32 addr);
u32 ReadLong(u32 addr);
void WriteWord(u32 addr, u16 val);
void WriteLong(u32 addr, u32 val);
//kills all channels but leaves SPU otherwise running normally
void ShutUp();
};
int SPU_ChangeSoundCore(int coreid, int buffersize);
SoundInterface_struct *SPU_SoundCore();
void SPU_ReInit();
int SPU_Init(int coreid, int buffersize);
void SPU_Pause(int pause);
void SPU_SetVolume(int volume);
void SPU_SetSynchMode(int mode, int method);
void SPU_ClearOutputBuffer(void);
void SPU_Reset(void);
void SPU_DeInit(void);
void SPU_KeyOn(int channel);
void SPU_WriteByte(u32 addr, u8 val);
void SPU_WriteWord(u32 addr, u16 val);
void SPU_WriteLong(u32 addr, u32 val);
u8 SPU_ReadByte(u32 addr);
u16 SPU_ReadWord(u32 addr);
u32 SPU_ReadLong(u32 addr);
void SPU_Emulate_core(void);
void SPU_Emulate_user(bool mix = true);
void SPU_DefaultFetchSamples(s16 *sampleBuffer, size_t sampleCount, ESynchMode synchMode, ISynchronizingAudioBuffer *theSynchronizer);
size_t SPU_DefaultPostProcessSamples(s16 *postProcessBuffer, size_t requestedSampleCount, ESynchMode synchMode, ISynchronizingAudioBuffer *theSynchronizer);
extern SPU_struct *SPU_core, *SPU_user;
extern int spu_core_samples;
void spu_savestate(EMUFILE* os);
bool spu_loadstate(EMUFILE* is, int size);
enum WAVMode
{
WAVMODE_ANY = -1,
WAVMODE_CORE = 0,
WAVMODE_USER = 1
};
class WavWriter
{
public:
WavWriter();
bool open(const std::string & fname);
void close();
void update(void* soundData, int numSamples);
bool isRecording() const;
WAVMode mode;
private:
FILE *spufp;
};
void WAV_End();
bool WAV_Begin(const char* fname, WAVMode mode=WAVMODE_CORE);
bool WAV_IsRecording(WAVMode mode=WAVMODE_ANY);
void WAV_WavSoundUpdate(void* soundData, int numSamples, WAVMode mode=WAVMODE_CORE);
// we should make this configurable eventually
// but at least defining it somewhere is probably a step in the right direction
#define DESMUME_SAMPLE_RATE 44100
//#define DESMUME_SAMPLE_RATE 48000
#endif
/*
Copyright 2006 Theo Berkau
Copyright (C) 2006-2015 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with the this software. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef SPU_H
#define SPU_H
#include <iosfwd>
#include <string>
#include <assert.h>
#include <stdio.h>
#include "types.h"
#include "matrix.h"
#include "metaspu/metaspu.h"
class EMUFILE;
#define SNDCORE_DEFAULT -1
#define SNDCORE_DUMMY 0
#define CHANSTAT_STOPPED 0
#define CHANSTAT_PLAY 1
#define SPUINTERPOLATION_TAPS 4 // Must be at least 4 for Catmull-Rom interpolation
//who made these static? theyre used in multiple places.
FORCEINLINE s32 spumuldiv7(s32 val, u8 multiplier) {
assert(multiplier <= 127);
return (multiplier == 127) ? val : ((val * multiplier) >> 7);
}
enum SPUInterpolationMode
{
SPUInterpolation_None = 0,
SPUInterpolation_Linear = 1,
SPUInterpolation_Cosine = 2,
SPUInterpolation_CatmullRom = 3
};
struct SoundInterface_struct
{
int id;
const char *Name;
int (*Init)(int buffersize);
void (*DeInit)();
void (*UpdateAudio)(s16 *buffer, u32 num_samples);
u32 (*GetAudioSpace)();
void (*MuteAudio)();
void (*UnMuteAudio)();
void (*SetVolume)(int volume);
void (*ClearBuffer)();
void (*FetchSamples)(s16 *sampleBuffer, size_t sampleCount, ESynchMode synchMode, ISynchronizingAudioBuffer *theSynchronizer);
size_t (*PostProcessSamples)(s16 *postProcessBuffer, size_t requestedSampleCount, ESynchMode synchMode, ISynchronizingAudioBuffer *theSynchronizer);
};
extern SoundInterface_struct SNDDummy;
extern SoundInterface_struct SNDFile;
extern int SPU_currentCoreNum;
struct channel_struct
{
channel_struct() : num(0),
vol(0),
volumeDiv(0),
hold(0),
pan(0),
waveduty(0),
repeat(0),
format(0),
keyon(0),
status(0),
pcm16bOffs(0),
addr(0),
timer(0),
loopstart(0),
length(0),
totlength(0),
totlength_shifted(0),
sampcntFrac(0),
sampcntInt(0),
sampincFrac(0),
sampincInt(0),
loop_pcm16b(0),
index(0),
loop_index(0),
x(0)
{}
u32 num;
u8 vol;
u8 volumeDiv;
u8 hold;
u8 pan;
u8 waveduty;
u8 repeat;
u8 format;
u8 keyon;
u8 status;
u8 pcm16bOffs;
u32 addr;
u16 timer;
u16 loopstart;
u32 length;
u32 totlength;
s32 totlength_shifted;
u32 sampcntFrac;
s32 sampcntInt;
u32 sampincFrac;
u32 sampincInt;
s16 pcm16b[SPUINTERPOLATION_TAPS];
// ADPCM specific
s16 loop_pcm16b;
s32 index;
int loop_index;
// PSG noise
u16 x;
};
class SPUFifo
{
public:
SPUFifo();
void enqueue(s16 val);
s16 dequeue();
s16 buffer[16];
s32 head,tail,size;
void save(EMUFILE &fp);
bool load(EMUFILE &fp);
void reset();
};
class SPU_struct
{
public:
SPU_struct(int buffersize);
u32 bufpos;
u32 buflength;
s32 *sndbuf;
s32 lastdata; //the last sample that a channel generated
s16 *outbuf;
u32 bufsize;
channel_struct channels[16];
//registers
struct REGS {
REGS()
: mastervol(0)
, ctl_left(0)
, ctl_right(0)
, ctl_ch1bypass(0)
, ctl_ch3bypass(0)
, masteren(0)
, soundbias(0)
{}
u8 mastervol;
u8 ctl_left, ctl_right;
u8 ctl_ch1bypass, ctl_ch3bypass;
u8 masteren;
u16 soundbias;
enum LeftOutputMode
{
LOM_LEFT_MIXER=0, LOM_CH1=1, LOM_CH3=2, LOM_CH1_PLUS_CH3=3
};
enum RightOutputMode
{
ROM_RIGHT_MIXER=0, ROM_CH1=1, ROM_CH3=2, ROM_CH1_PLUS_CH3=3
};
struct CAP {
CAP()
: add(0), source(0), oneshot(0), bits8(0), active(0), dad(0), len(0)
{}
u8 add, source, oneshot, bits8, active;
u32 dad;
u16 len;
struct Runtime {
Runtime()
: running(0), curdad(0), maxdad(0)
{}
u8 running;
u32 curdad;
u32 maxdad;
u32 sampcntFrac;
u32 sampcntInt;
SPUFifo fifo;
} runtime;
} cap[2];
} regs;
void reset();
~SPU_struct();
void KeyOff(int channel);
void KeyOn(int channel);
void KeyProbe(int channel);
void ProbeCapture(int which);
void WriteByte(u32 addr, u8 val);
void WriteWord(u32 addr, u16 val);
void WriteLong(u32 addr, u32 val);
u8 ReadByte(u32 addr);
u16 ReadWord(u32 addr);
u32 ReadLong(u32 addr);
bool isSPU(u32 addr) { return ((addr >= 0x04000400) && (addr < 0x04000520)); }
//kills all channels but leaves SPU otherwise running normally
void ShutUp();
};
extern SPU_struct *SPU_core, *SPU_user;
extern int spu_core_samples;
int SPU_ChangeSoundCore(int coreid, int newBufferSizeBytes);
SoundInterface_struct *SPU_SoundCore();
void SPU_ReInit(bool fakeBoot = false);
int SPU_Init(int coreid, int newBufferSizeBytes);
void SPU_Pause(int pause);
void SPU_SetVolume(int newVolume);
void SPU_SetSynchMode(int mode, int method);
void SPU_ClearOutputBuffer(void);
void SPU_Reset(void);
void SPU_DeInit(void);
void SPU_KeyOn(int channel);
static FORCEINLINE void SPU_WriteByte(u32 addr, u8 val)
{
addr &= 0xFFF;
SPU_core->WriteByte(addr,val);
if(SPU_user)
SPU_user->WriteByte(addr,val);
}
static FORCEINLINE void SPU_WriteWord(u32 addr, u16 val)
{
addr &= 0xFFF;
SPU_core->WriteWord(addr,val);
if(SPU_user)
SPU_user->WriteWord(addr,val);
}
static FORCEINLINE void SPU_WriteLong(u32 addr, u32 val)
{
addr &= 0xFFF;
SPU_core->WriteLong(addr,val);
if(SPU_user)
SPU_user->WriteLong(addr,val);
}
static FORCEINLINE u8 SPU_ReadByte(u32 addr) { return SPU_core->ReadByte(addr & 0x0FFF); }
static FORCEINLINE u16 SPU_ReadWord(u32 addr) { return SPU_core->ReadWord(addr & 0x0FFF); }
static FORCEINLINE u32 SPU_ReadLong(u32 addr) { return SPU_core->ReadLong(addr & 0x0FFF); }
void SPU_Emulate_core(void);
void SPU_Emulate_user(bool mix = true);
void SPU_DefaultFetchSamples(s16 *sampleBuffer, size_t sampleCount, ESynchMode synchMode, ISynchronizingAudioBuffer *theSynchronizer);
size_t SPU_DefaultPostProcessSamples(s16 *postProcessBuffer, size_t requestedSampleCount, ESynchMode synchMode, ISynchronizingAudioBuffer *theSynchronizer);
void spu_savestate(EMUFILE &os);
bool spu_loadstate(EMUFILE &is, int size);
enum WAVMode
{
WAVMODE_ANY = -1,
WAVMODE_CORE = 0,
WAVMODE_USER = 1
};
class WavWriter
{
public:
WavWriter();
bool open(const std::string & fname);
void close();
void update(void* soundData, int numSamples);
bool isRecording() const;
WAVMode mode;
private:
FILE *spufp;
};
void WAV_End();
bool WAV_Begin(const char* fname, WAVMode mode=WAVMODE_CORE);
bool WAV_IsRecording(WAVMode mode=WAVMODE_ANY);
void WAV_WavSoundUpdate(void* soundData, int numSamples, WAVMode mode=WAVMODE_CORE);
// we should make this configurable eventually
// but at least defining it somewhere is probably a step in the right direction
#define DESMUME_SAMPLE_RATE 44100
//#define DESMUME_SAMPLE_RATE 48000
#endif

View File

@ -1,76 +0,0 @@
/*
Copyright (C) 2009-2012 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with the this software. If not, see <http://www.gnu.org/licenses/>.
*/
#include "addons.h"
#include <string>
//this is the currently-configured cflash mode
ADDON_CFLASH_MODE CFlash_Mode;
//this is the currently-configured path (directory or filename) for cflash.
//it should be viewed as a parameter for the above.
std::string CFlash_Path;
char GBAgameName[MAX_PATH];
extern ADDONINTERFACE addonNone;
extern ADDONINTERFACE addonCFlash;
extern ADDONINTERFACE addonRumblePak;
extern ADDONINTERFACE addonGBAgame;
extern ADDONINTERFACE addonGuitarGrip;
extern ADDONINTERFACE addonExpMemory;
extern ADDONINTERFACE addonPiano;
extern ADDONINTERFACE addonPaddle;
//extern ADDONINTERFACE addonExternalMic;
ADDONINTERFACE addonList[NDS_ADDON_COUNT] = {
addonNone,
addonCFlash,
addonRumblePak,
addonGBAgame,
addonGuitarGrip,
addonExpMemory,
addonPiano,
addonPaddle
};
ADDONINTERFACE addon = addonCFlash; // default none pak
NDS_ADDON_TYPE addon_type = NDS_ADDON_CFLASH;
BOOL addonsInit()
{
return addon.init();
}
void addonsClose()
{
addon.close();
}
void addonsReset()
{
addon.reset();
}
BOOL addonsChangePak(NDS_ADDON_TYPE type)
{
if (type > NDS_ADDON_COUNT) return FALSE;
addon.close();
addon = addonList[type];
addon_type = type;
printf("Slot 2: %s\n", addon.name);
return addon.init();
}

View File

@ -1,94 +0,0 @@
/*
Copyright (C) 2009-2011 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with the this software. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __ADDONS_H__
#define __ADDONS_H__
#include "common.h"
#include "types.h"
#include "debug.h"
struct ADDONINTERFACE
{
// The name of the plugin, this name will appear in the plugins list
const char * name;
//called once when the plugin starts up
BOOL (*init)(void);
//called when the emulator resets
void (*reset)(void);
//called when the plugin shuts down
void (*close)(void);
//called when the user configurating plugin
void (*config)(void);
//called when the emulator write to addon
void (*write08)(u32 procnum, u32 adr, u8 val);
void (*write16)(u32 procnum, u32 adr, u16 val);
void (*write32)(u32 procnum, u32 adr, u32 val);
//called when the emulator read from addon
u8 (*read08)(u32 procnum, u32 adr);
u16 (*read16)(u32 procnum, u32 adr);
u32 (*read32)(u32 procnum, u32 adr);
//called when the user get info about addon pak (description)
void (*info)(char *info);
};
enum NDS_ADDON_TYPE
{
NDS_ADDON_NONE,
NDS_ADDON_CFLASH, // compact flash
NDS_ADDON_RUMBLEPAK, // rumble pack
NDS_ADDON_GBAGAME, // gba game in slot
NDS_ADDON_GUITARGRIP, // Guitar Grip
NDS_ADDON_EXPMEMORY, // Memory Expansion
NDS_ADDON_PIANO, // Piano
NDS_ADDON_PADDLE,
//NDS_ADDON_EXTERNALMIC,
NDS_ADDON_COUNT // use for counter addons - MUST TO BE LAST!!!
};
enum ADDON_CFLASH_MODE
{
ADDON_CFLASH_MODE_Path, ADDON_CFLASH_MODE_File, ADDON_CFLASH_MODE_RomPath
};
extern ADDON_CFLASH_MODE CFlash_Mode;
extern std::string CFlash_Path;
inline bool CFlash_IsUsingPath() { return CFlash_Mode==ADDON_CFLASH_MODE_Path || CFlash_Mode==ADDON_CFLASH_MODE_RomPath; }
extern ADDONINTERFACE addon; // current pak
extern ADDONINTERFACE addonList[NDS_ADDON_COUNT]; // lists pointer on paks
extern NDS_ADDON_TYPE addon_type; // current type pak
extern char GBAgameName[MAX_PATH]; // file name for GBA game (rom)
extern void (*FeedbackON)(BOOL enable); // feedback on/off
extern BOOL addonsInit(); // Init addons
extern void addonsClose(); // Shutdown addons
extern void addonsReset(); // Reset addon
extern BOOL addonsChangePak(NDS_ADDON_TYPE type); // change current adddon
extern void guitarGrip_setKey(bool green, bool red, bool yellow, bool blue); // Guitar grip keys
extern void piano_setKey(bool c, bool cs, bool d, bool ds, bool e, bool f, bool fs, bool g, bool gs, bool a, bool as, bool b, bool hic); //piano keys
#endif //__ADDONS_H__

View File

@ -1,5 +1,5 @@
/*
Copyright (C) 2010-2012 DeSmuME team
Copyright (C) 2010-2015 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -17,44 +17,19 @@
#include "../slot1.h"
static void slot1_info(char *info) { strcpy(info, "Slot1 no-card emulation"); }
static void slot1_config(void) {}
static BOOL slot1_init() { return (TRUE); }
static void slot1_reset() {}
static void slot1_close() {}
static void slot1_write08(u8 PROCNUM, u32 adr, u8 val) {}
static void slot1_write16(u8 PROCNUM, u32 adr, u16 val) {}
static void slot1_write32(u8 PROCNUM, u32 adr, u32 val) {}
static u8 slot1_read08(u8 PROCNUM, u32 adr)
class Slot1_None : public ISlot1Interface
{
return 0xFF;
}
static u16 slot1_read16(u8 PROCNUM, u32 adr)
{
return 0xFFFF;
}
static u32 slot1_read32(u8 PROCNUM, u32 adr)
{
return 0xFFFFFFFF;
}
public:
virtual Slot1Info const* info()
{
static Slot1InfoSimple info("None","Slot1 no-card emulation", 0xFF);
return &info;
}
//pretty much every access to the card should just be ignored and reading HIGH-Z off the GC bus.
//so, nothing really to do here
//(notably, it results in a 0xFFFFFFFF card ID)
SLOT1INTERFACE slot1None = {
"None",
slot1_init,
slot1_reset,
slot1_close,
slot1_config,
slot1_write08,
slot1_write16,
slot1_write32,
slot1_read08,
slot1_read16,
slot1_read32,
slot1_info};
};
ISlot1Interface* construct_Slot1_None() { return new Slot1_None(); }

View File

@ -1,237 +1,236 @@
/* Copyright (C) 2010-2011 DeSmuME team
/*
Copyright (C) 2010-2021 DeSmuME team
This file is part of DeSmuME
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
DeSmuME is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
DeSmuME is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with DeSmuME; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
You should have received a copy of the GNU General Public License
along with the this software. If not, see <http://www.gnu.org/licenses/>.
*/
#include "slot1comp_protocol.h"
#include <time.h>
#include "../slot1.h"
#include "../registers.h"
#include "../MMU.h"
#include "../NDSSystem.h"
#include "../emufile.h"
static EMUFILE *img = NULL;
static u32 write_count = 0;
static u32 write_enabled = 0;
static void init_r4_flash()
class Slot1_R4 : public ISlot1Interface, public ISlot1Comp_Protocol_Client
{
srand(time(NULL));
private:
EMUFILE *img;
Slot1Comp_Protocol protocol;
u32 write_count;
u32 write_enabled;
if (!img)
img = slot1GetFatImage();
if(!img)
public:
Slot1_R4()
: img(NULL)
, write_count(0)
, write_enabled(0)
{
INFO("slot1 fat not successfully mounted\n");
}
}
static void info(char *info) { strcpy(info, "Slot1 R4 Emulation"); }
static void config(void) {}
static BOOL init()
{
init_r4_flash();
return TRUE;
}
static void reset() {
init_r4_flash();
}
static void close() {
img = NULL;
}
static void write08(u8 PROCNUM, u32 adr, u8 val) {}
static void write16(u8 PROCNUM, u32 adr, u16 val) {}
static void write32_GCROMCTRL(u32 val)
{
nds_dscard& card = MMU.dscard[0];
switch(card.command[0])
{
case 0xB0:
break;
case 0xB9:
case 0xBA:
card.address = (card.command[1] << 24) | (card.command[2] << 16) | (card.command[3] << 8) | card.command[4];
img->fseek(card.address,SEEK_SET);
break;
case 0xBB:
write_enabled = 1;
write_count = 0x80;
case 0xBC:
card.address = (card.command[1] << 24) | (card.command[2] << 16) | (card.command[3] << 8) | card.command[4];
img->fseek(card.address,SEEK_SET);
break;
}
}
static void write32_GCDATAIN(u32 val)
{
nds_dscard& card = MMU.dscard[0];
//bool log=false;
memcpy(&card.command[0], &MMU.MMU_MEM[0][0x40][0x1A8], 8);
//last_write_count = write_count;
if(card.command[4])
{
// transfer is done
T1WriteLong(MMU.MMU_MEM[0][0x40], 0x1A4,val & 0x7F7FFFFF);
// if needed, throw irq for the end of transfer
if(MMU.AUX_SPI_CNT & 0x4000)
NDS_makeIrq(ARMCPU_ARM9, IRQ_BIT_GC_TRANSFER_COMPLETE);
return;
}
switch(card.command[0])
virtual Slot1Info const* info()
{
case 0xBB:
{
if(write_count && write_enabled)
{
img->fwrite(&val, 4);
img->fflush();
write_count--;
}
break;
}
default:
break;
static Slot1InfoSimple info("R4", "Slot1 R4 emulation", 0x03);
return &info;
}
if(write_count==0)
{
write_enabled = 0;
// transfer is done
T1WriteLong(MMU.MMU_MEM[0][0x40], 0x1A4,val & 0x7F7FFFFF);
// if needed, throw irq for the end of transfer
if(MMU.AUX_SPI_CNT & 0x4000)
NDS_makeIrq(ARMCPU_ARM9, IRQ_BIT_GC_TRANSFER_COMPLETE);
}
/*if(log)
{
INFO("WRITE CARD command: %02X%02X%02X%02X%02X%02X%02X%02X\t",
card.command[0], card.command[1], card.command[2], card.command[3],
card.command[4], card.command[5], card.command[6], card.command[7]);
INFO("FROM: %08X\t", NDS_ARM9.instruct_adr);
INFO("VAL: %08X\n", val);
}*/
}
static void write32(u8 PROCNUM, u32 adr, u32 val)
{
switch(adr)
{
case REG_GCROMCTRL:
write32_GCROMCTRL(val);
break;
case REG_GCDATAIN:
write32_GCDATAIN(val);
break;
}
}
static u8 read08(u8 PROCNUM, u32 adr)
{
return 0xFF;
}
static u16 read16(u8 PROCNUM, u32 adr)
{
return 0xFFFF;
}
static u32 read32_GCDATAIN()
{
nds_dscard& card = MMU.dscard[0];
u32 val;
switch(card.command[0])
virtual void connect()
{
//Get ROM chip ID
case 0x90:
case 0xB8:
val = 0xFC2;
break;
img = slot1_GetFatImage();
case 0xB0:
val = 0x1F4;
break;
case 0xB9:
val = (rand() % 100) ? 0x1F4 : 0;
break;
case 0xBB:
case 0xBC:
val = 0;
break;
case 0xBA:
//INFO("Read from sd at sector %08X at adr %08X ",card.address/512,ftell(img));
img->fread(&val, 4);
//INFO("val %08X\n",val);
break;
if(!img)
INFO("slot1 fat not successfully mounted\n");
default:
val = 0;
protocol.reset(this);
protocol.chipId = 0xFC2;
protocol.gameCode = T1ReadLong((u8*)gameInfo.header.gameCode,0);
}
/*INFO("READ CARD command: %02X%02X%02X%02X% 02X%02X%02X%02X RET: %08X ",
card.command[0], card.command[1], card.command[2], card.command[3],
card.command[4], card.command[5], card.command[6], card.command[7],
val);
INFO("FROM: %08X LR: %08X\n", NDS_ARM9.instruct_adr, NDS_ARM9.R[14]);*/
return val;
} //read32_GCDATAIN
static u32 read32(u8 PROCNUM, u32 adr)
{
switch(adr)
//called when the emulator disconnects the device
virtual void disconnect()
{
case REG_GCDATAIN:
return read32_GCDATAIN();
default:
return 0;
img = NULL;
}
//called when the emulator shuts down, or when the device disappears from existence
virtual void shutdown()
{
}
}
SLOT1INTERFACE slot1R4 = {
"R4",
init,
reset,
close,
config,
write08,
write16,
write32,
read08,
read16,
read32,
info};
virtual void write_command(u8 PROCNUM, GC_Command command)
{
protocol.write_command(command);
}
virtual void write_GCDATAIN(u8 PROCNUM, u32 val)
{
protocol.write_GCDATAIN(PROCNUM, val);
}
virtual u32 read_GCDATAIN(u8 PROCNUM)
{
return protocol.read_GCDATAIN(PROCNUM);
}
virtual void slot1client_startOperation(eSlot1Operation theOperation)
{
if (theOperation != eSlot1Operation_Unknown)
return;
u32 address;
int cmd = protocol.command.bytes[0];
switch(cmd)
{
case 0xB0:
break;
case 0xB9:
case 0xBA:
address = (protocol.command.bytes[1] << 24) | (protocol.command.bytes[2] << 16) | (protocol.command.bytes[3] << 8) | protocol.command.bytes[4];
img->fseek(address,SEEK_SET);
break;
case 0xBB:
write_enabled = 1;
write_count = 0x80;
//passthrough on purpose?
case 0xBC:
address = (protocol.command.bytes[1] << 24) | (protocol.command.bytes[2] << 16) | (protocol.command.bytes[3] << 8) | protocol.command.bytes[4];
img->fseek(address,SEEK_SET);
break;
}
}
virtual u32 slot1client_read_GCDATAIN(eSlot1Operation theOperation)
{
if (theOperation != eSlot1Operation_Unknown)
return 0;
u32 val = 0;
int cmd = protocol.command.bytes[0];
switch (cmd)
{
case 0xB0:
val = (img != NULL) ? 0x1F4 : 0x1F2;
break;
case 0xB9:
val = (rand() % 100) ? (img) ? 0x1F4 : 0x1F2 : 0;
break;
case 0xBB:
case 0xBC:
val = 0;
break;
case 0xBA:
//INFO("Read from sd at sector %08X at adr %08X ",card.address/512,ftell(img));
img->read_32LE(val);
//INFO("val %08X\n",val);
break;
default:
val = 0;
break;
}
return val;
}
void slot1client_write_GCDATAIN(eSlot1Operation theOperation, u32 val)
{
if (theOperation != eSlot1Operation_Unknown)
return;
int cmd = protocol.command.bytes[0];
switch (cmd)
{
case 0xBB:
{
if (write_count && write_enabled)
{
img->write_32LE(val);
img->fflush();
write_count--;
}
break;
}
default:
break;
}
}
virtual void post_fakeboot(int PROCNUM)
{
// The BIOS leaves the card in NORMAL mode
protocol.mode = eCardMode_NORMAL;
}
void write32_GCDATAIN(u32 val)
{
//bool log = false;
//last_write_count = write_count;
//can someone tell me ... what the hell is this doing, anyway?
//seems odd to use card.command[4] for this... isnt it part of the address?
if (protocol.command.bytes[4])
{
// transfer is done
//are you SURE this is logical? there doesnt seem to be any way for the card to signal that
T1WriteLong(MMU.MMU_MEM[0][0x40], 0x1A4,val & 0x7F7FFFFF);
MMU_GC_endTransfer(0);
return;
}
int cmd = protocol.command.bytes[0];
switch (cmd)
{
case 0xBB:
{
if (write_count && write_enabled)
{
img->write_32LE(val);
img->fflush();
write_count--;
}
break;
}
default:
break;
}
if (write_count == 0)
{
write_enabled = 0;
//transfer is done
//are you SURE this is logical? there doesnt seem to be any way for the card to signal that
T1WriteLong(MMU.MMU_MEM[0][0x40], 0x1A4,val & 0x7F7FFFFF);
//but isnt this a different IRQ? IREQ_MC perhaps
MMU_GC_endTransfer(0);
}
/*if(log)
{
INFO("WRITE CARD command: %02X%02X%02X%02X%02X%02X%02X%02X\t",
card.command[0], card.command[1], card.command[2], card.command[3],
card.command[4], card.command[5], card.command[6], card.command[7]);
INFO("FROM: %08X\t", NDS_ARM9.instruct_adr);
INFO("VAL: %08X\n", val);
}*/
}
};
ISlot1Interface* construct_Slot1_R4() { return new Slot1_R4(); }

View File

@ -1,288 +0,0 @@
/* Copyright (C) 2010-2011 DeSmuME team
This file is part of DeSmuME
DeSmuME is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
DeSmuME is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with DeSmuME; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "../slot1.h"
#include "../registers.h"
#include "../MMU.h"
#include "../NDSSystem.h"
static void info(char *info) { strcpy(info, "Slot1 Retail card emulation"); }
static void config(void) {}
static BOOL init() { return (TRUE); }
static void reset() {}
static void close() {}
static void write08(u8 PROCNUM, u32 adr, u8 val) {}
static void write16(u8 PROCNUM, u32 adr, u16 val) {}
static void write32_GCROMCTRL(u8 PROCNUM, u32 val)
{
nds_dscard& card = MMU.dscard[PROCNUM];
switch(card.command[0])
{
case 0x00: //Data read
case 0xB7:
card.address = (card.command[1] << 24) | (card.command[2] << 16) | (card.command[3] << 8) | card.command[4];
card.transfer_count = 0x80;
break;
case 0xB8: // Chip ID
card.address = 0;
card.transfer_count = 1;
break;
default:
card.address = 0;
card.transfer_count = 0;
break;
}
}
static void write32(u8 PROCNUM, u32 adr, u32 val)
{
switch(adr)
{
case REG_GCROMCTRL:
write32_GCROMCTRL(PROCNUM, val);
break;
}
}
static u8 read08(u8 PROCNUM, u32 adr)
{
return 0xFF;
}
static u16 read16(u8 PROCNUM, u32 adr)
{
return 0xFFFF;
}
static u32 read32_GCDATAIN(u8 PROCNUM)
{
nds_dscard& card = MMU.dscard[PROCNUM];
switch(card.command[0])
{
//Get ROM chip ID
case 0x90:
case 0xB8:
{
// Note: the BIOS stores the chip ID in main memory
// Most games continuously compare the chip ID with
// the value in memory, probably to know if the card
// was removed.
// As DeSmuME normally boots directly from the game, the chip
// ID in main mem is zero and this value needs to be
// zero too.
//note that even if desmume was booting from firmware, and reading this chip ID to store in main memory,
//this still works, since it will have read 00 originally and then read 00 to validate.
//staff of kings verifies this (it also uses the arm7 IRQ 20)
if(nds.cardEjected) //TODO - handle this with ejected card slot1 device (and verify using this case)
return 0xFFFFFFFF;
else return 0;
}
break;
// Data read
case 0x00:
case 0xB7:
{
//it seems that etrian odyssey 3 doesnt work unless we mask this to cart size.
//but, a thought: does the internal rom address counter register wrap around? we may be making a mistake by keeping the extra precision
//but there is no test case yet
u32 address = card.address & (gameInfo.mask);
// Make sure any reads below 0x8000 redirect to 0x8000+(adr&0x1FF) as on real cart
if((card.command[0] == 0xB7) && (address < 0x8000))
{
//TODO - refactor this to include the PROCNUM, for debugging purposes if nothing else
//(can refactor gbaslot also)
//INFO("Read below 0x8000 (0x%04X) from: ARM%s %08X\n",
// card.address, (PROCNUM ? "7":"9"), (PROCNUM ? NDS_ARM7:NDS_ARM9).instruct_adr);
address = (0x8000 + (address&0x1FF));
}
//as a sanity measure for funny-sized roms (homebrew and perhaps truncated retail roms)
//we need to protect ourselves by returning 0xFF for things still out of range
if(address >= gameInfo.romsize)
{
DEBUG_Notify.ReadBeyondEndOfCart(address,gameInfo.romsize);
return 0xFFFFFFFF;
}
return T1ReadLong(MMU.CART_ROM, address);
}
break;
default:
return 0;
} //switch(card.command[0])
} //read32_GCDATAIN
static u32 read32(u8 PROCNUM, u32 adr)
{
switch(adr)
{
case REG_GCDATAIN:
return read32_GCDATAIN(PROCNUM);
default:
return 0;
}
}
SLOT1INTERFACE slot1Retail = {
"Retail",
init,
reset,
close,
config,
write08,
write16,
write32,
read08,
read16,
read32,
info
};
// ///writetoGCControl:
//// --- Ninja SD commands -------------------------------------
// // NJSD init/reset
// case 0x20:
// {
// card.address = 0;
// card.transfer_count = 0;
// }
// break;
// // NJSD_sendCLK()
// case 0xE0:
// {
// card.address = 0;
// card.transfer_count = 0;
// NDS_makeInt(PROCNUM, 20);
// }
// break;
// // NJSD_sendCMDN() / NJSD_sendCMDR()
// case 0xF0:
// case 0xF1:
// switch (card.command[2])
// {
// // GO_IDLE_STATE
// case 0x40:
// card.address = 0;
// card.transfer_count = 0;
// NDS_makeInt(PROCNUM, 20);
// break;
// case 0x42: // ALL_SEND_CID
// case 0x43: // SEND_RELATIVE_ADDR
// case 0x47: // SELECT_CARD
// case 0x49: // SEND_CSD
// case 0x4D:
// case 0x77: // APP_CMD
// case 0x69: // SD_APP_OP_COND
// card.address = 0;
// card.transfer_count = 6;
// NDS_makeInt(PROCNUM, 20);
// break;
// // SET_BLOCKLEN
// case 0x50:
// card.address = 0;
// card.transfer_count = 6;
// card.blocklen = card.command[6] | (card.command[5] << 8) | (card.command[4] << 16) | (card.command[3] << 24);
// NDS_makeInt(PROCNUM, 20);
// break;
// // READ_SINGLE_BLOCK
// case 0x51:
// card.address = card.command[6] | (card.command[5] << 8) | (card.command[4] << 16) | (card.command[3] << 24);
// card.transfer_count = (card.blocklen + 3) >> 2;
// NDS_makeInt(PROCNUM, 20);
// break;
// }
// break;
// // --- Ninja SD commands end ---------------------------------
// //GCDATAIN:
// // --- Ninja SD commands -------------------------------------
// // NJSD_sendCMDN() / NJSD_sendCMDR()
// case 0xF0:
// case 0xF1:
// switch (card.command[2])
// {
// // ALL_SEND_CID
// case 0x42:
// if (card.transfer_count == 2) val = 0x44534A4E;
// else val = 0x00000000;
// // SEND_RELATIVE_ADDR
// case 0x43:
// case 0x47:
// case 0x49:
// case 0x50:
// val = 0x00000000;
// break;
// case 0x4D:
// if (card.transfer_count == 2) val = 0x09000000;
// else val = 0x00000000;
// break;
// // APP_CMD
// case 0x77:
// if (card.transfer_count == 2) val = 0x00000037;
// else val = 0x00000000;
// break;
// // SD_APP_OP_COND
// case 0x69:
// if (card.transfer_count == 2) val = 0x00008000;
// else val = 0x00000000;
// break;
// // READ_SINGLE_BLOCK
// case 0x51:
// val = 0x00000000;
// break;
// }
// break;
// // --- Ninja SD commands end ---------------------------------

View File

@ -0,0 +1,104 @@
/*
Copyright (C) 2013-2015 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with the this software. If not, see <http://www.gnu.org/licenses/>.
*/
#include "../slot1.h"
#include "../NDSSystem.h"
class Slot1_Retail_Auto : public ISlot1Interface
{
private:
ISlot1Interface *mSelectedImplementation;
public:
Slot1_Retail_Auto()
: mSelectedImplementation(NULL)
{
}
virtual Slot1Info const* info()
{
static Slot1InfoSimple info("Retail (Auto)","Slot1 Retail (auto-selection) card emulation", 0xFE);
return &info;
}
virtual void connect()
{
NDS_SLOT1_TYPE selection = NDS_SLOT1_RETAIL_MCROM;
//check game ID in core emulator and select right implementation
//gamehack: definitely not a game hack, just a lazy way of selecting the right equipment for the game
if(gameInfo.IsCode("UOR") || // WarioWare - D.I.Y. (U)(E)(EUR) / Made in Ore (J)
gameInfo.IsCode("UXBP") || // Jam with the Band (EUR)
gameInfo.IsCode("AXBJ") // Daigassou! Band-Brothers DX (J)
)
selection = NDS_SLOT1_RETAIL_NAND;
slot1_selected_type = selection;
mSelectedImplementation = slot1_List[selection];
mSelectedImplementation->connect();
printf("Slot1 auto-selected device type: %s\n",mSelectedImplementation->info()->name());
}
virtual void disconnect()
{
if(mSelectedImplementation) mSelectedImplementation->disconnect();
mSelectedImplementation = NULL;
}
virtual void write_command(u8 PROCNUM, GC_Command command)
{
mSelectedImplementation->write_command(PROCNUM, command);
}
virtual void write_GCDATAIN(u8 PROCNUM, u32 val)
{
mSelectedImplementation->write_GCDATAIN(PROCNUM, val);
}
virtual u32 read_GCDATAIN(u8 PROCNUM)
{
return mSelectedImplementation->read_GCDATAIN(PROCNUM);
}
virtual u8 auxspi_transaction(int PROCNUM, u8 value)
{
return mSelectedImplementation->auxspi_transaction(PROCNUM, value);
}
virtual void auxspi_reset(int PROCNUM)
{
mSelectedImplementation->auxspi_reset(PROCNUM);
}
virtual void post_fakeboot(int PROCNUM)
{
mSelectedImplementation->post_fakeboot(PROCNUM);
}
virtual void savestate(EMUFILE &os)
{
mSelectedImplementation->savestate(os);
}
virtual void loadstate(EMUFILE &is)
{
mSelectedImplementation->loadstate(is);
}
};
ISlot1Interface* construct_Slot1_Retail_Auto() { return new Slot1_Retail_Auto(); }

View File

@ -0,0 +1,107 @@
/*
Copyright (C) 2010-2021 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with the this software. If not, see <http://www.gnu.org/licenses/>.
*/
#include "slot1comp_mc.h"
#include "slot1comp_rom.h"
#include "slot1comp_protocol.h"
#include "../slot1.h"
#include "../NDSSystem.h"
//quick architecture overview:
//MCROM receives GC bus commands from MMU.cpp
//those are passed on to the protocol component for parsing
//protocol calls back into MCROM via ISlot1Comp_Protocol_Client interface for things the protocol doesnt know about (the contents of the rom, chiefly)
//MCROM utilizes the rom component for address logic and delivering data
class Slot1_Retail_MCROM : public ISlot1Interface, public ISlot1Comp_Protocol_Client
{
private:
Slot1Comp_Protocol protocol;
Slot1Comp_Rom rom;
public:
virtual Slot1Info const* info()
{
static Slot1InfoSimple info("Retail MC+ROM", "Slot1 Retail MC+ROM (standard) card emulation", 0x01);
return &info;
}
virtual void connect()
{
protocol.reset(this);
protocol.chipId = gameInfo.chipID;
protocol.gameCode = T1ReadLong((u8*)gameInfo.header.gameCode,0);
g_Slot1Comp_MC.connect();
}
virtual u8 auxspi_transaction(int PROCNUM, u8 value)
{
return g_Slot1Comp_MC.auxspi_transaction(PROCNUM,value);
}
virtual void auxspi_reset(int PROCNUM)
{
g_Slot1Comp_MC.auxspi_reset(PROCNUM);
}
virtual void write_command(u8 PROCNUM, GC_Command command)
{
protocol.write_command(command);
}
virtual void write_GCDATAIN(u8 PROCNUM, u32 val)
{
protocol.write_GCDATAIN(PROCNUM, val);
}
virtual u32 read_GCDATAIN(u8 PROCNUM)
{
return protocol.read_GCDATAIN(PROCNUM);
}
virtual void slot1client_startOperation(eSlot1Operation theOperation)
{
rom.start(theOperation,protocol.address);
}
virtual void post_fakeboot(int PROCNUM)
{
// The BIOS leaves the card in NORMAL mode
protocol.mode = eCardMode_NORMAL;
}
virtual void savestate(EMUFILE &os)
{
protocol.savestate(os);
rom.savestate(os);
}
virtual void loadstate(EMUFILE &is)
{
protocol.loadstate(is);
rom.loadstate(is);
}
private:
u32 slot1client_read_GCDATAIN(eSlot1Operation operation)
{
return rom.read();
}
};
ISlot1Interface* construct_Slot1_Retail_MCROM() { return new Slot1_Retail_MCROM(); }

View File

@ -0,0 +1,214 @@
/*
Copyright (C) 2013-2021 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with the this software. If not, see <http://www.gnu.org/licenses/>.
*/
//This module implements a device which is capable of building a nitro FS on the fly
//(and REBUILDING it! -- Q: under what conditions?)
//so that you can test your homebrew games and patches without having to rebuild the ROM and restart it.
//Q. can it handle resized files?
#include "slot1comp_mc.h"
#include "slot1comp_rom.h"
#include "slot1comp_protocol.h"
#include <stdio.h>
#include <string>
#include "../slot1.h"
#include "../path.h"
#include "../NDSSystem.h"
#include "../utils/fsnitro.h"
class Slot1_Retail_DEBUG : public ISlot1Interface, public ISlot1Comp_Protocol_Client
{
private:
Slot1Comp_Protocol protocol;
Slot1Comp_Rom rom;
FILE *fpROM;
FS_NITRO *fs;
u16 curr_file_id;
std::string pathData;
public:
virtual Slot1Info const* info()
{
static Slot1InfoSimple info("Retail DEBUG","Slot1 Retail (standard) card emulation + FS Nitro DEBUG", 0x04);
return &info;
}
virtual void connect()
{
protocol.reset(this);
protocol.chipId = gameInfo.chipID;
protocol.gameCode = T1ReadLong((u8*)gameInfo.header.gameCode,0);
curr_file_id = 0xFFFF;
fpROM = NULL;
fs = NULL;
pathData = path.getpath(path.SLOT1D) + path.GetRomNameWithoutExtension();
printf("Path to Slot1 data: %s\n", pathData.c_str());
fs = new FS_NITRO();
fs->rebuildFAT(pathData);
}
virtual u8 auxspi_transaction(int PROCNUM, u8 value)
{
return g_Slot1Comp_MC.auxspi_transaction(PROCNUM,value);
}
virtual void auxspi_reset(int PROCNUM)
{
g_Slot1Comp_MC.auxspi_reset(PROCNUM);
}
virtual void write_command(u8 PROCNUM, GC_Command command)
{
protocol.write_command(command);
}
virtual void write_GCDATAIN(u8 PROCNUM, u32 val)
{
protocol.write_GCDATAIN(PROCNUM, val);
}
virtual u32 read_GCDATAIN(u8 PROCNUM)
{
return protocol.read_GCDATAIN(PROCNUM);
}
virtual void post_fakeboot(int PROCNUM)
{
// The BIOS leaves the card in NORMAL mode
protocol.mode = eCardMode_NORMAL;
}
virtual void savestate(EMUFILE &os)
{
protocol.savestate(os);
rom.savestate(os);
}
virtual void loadstate(EMUFILE &is)
{
protocol.loadstate(is);
rom.loadstate(is);
}
virtual void slot1client_startOperation(eSlot1Operation theOperation)
{
if (protocol.operation == eSlot1Operation_B7_Read)
{
u16 file_id = 0xFFFF; u32 offset = 0;
bool bFromFile = false;
if (fs && fs->isFAT(protocol.address))
{
fs->rebuildFAT(protocol.address, protocol.length, pathData);
}
else
{
if (fs && fs->getFileIdByAddr(protocol.address, file_id, offset))
{
if (file_id != curr_file_id)
{
std::string tmp = fs->getFullPathByFileID(file_id);
printf("%04X:[%08X, ofs %08X] %s\n", file_id, protocol.address, offset, tmp.c_str());
if (fpROM)
{
fclose(fpROM);
fpROM = NULL;
}
tmp = pathData + tmp;
fpROM = fopen(tmp.c_str(), "rb");
if (fpROM)
{
bFromFile = true;
printf("\t * found at disk, offset %08X\n", offset);
if (fseek(fpROM, offset, SEEK_SET) != 0)
{
printf("\t\t - ERROR seek file position\n");
}
}
}
else
{
if (fpROM)
{
bFromFile = true;
if (ftell(fpROM) != offset)
{
printf("\t * new file seek %08Xh\n", offset);
fseek(fpROM, offset, SEEK_SET);
}
}
}
}
}
if (!bFromFile && fpROM)
{
fclose(fpROM);
fpROM = NULL;
}
curr_file_id = file_id;
}
rom.start(theOperation, protocol.address);
}
private:
u32 slot1client_read_GCDATAIN(eSlot1Operation operation)
{
if (protocol.operation == eSlot1Operation_B7_Read)
{
u32 address = rom.getAddress();
if (fs && fs->isFAT(address))
{
u32 res = fs->getFATRecord(address);
if (res != 0xFFFFFFFF)
{
rom.incAddress();
return res;
}
}
else
if (fpROM)
{
u32 data = 0;
u32 readed = fread(&data, 1, 4, fpROM);
if (readed)
{
rom.incAddress();
if (readed < 4)
data |= ((u32)0xFFFFFFFF << (readed * 8));
return data;
}
fclose(fpROM);
fpROM = NULL;
}
}
return rom.read();
}
};
ISlot1Interface* construct_Slot1_Retail_DEBUG() { return new Slot1_Retail_DEBUG(); }

View File

@ -1,205 +1,327 @@
/* Copyright (C) 2011 DeSmuME team
/*
Copyright (C) 2010-2021 DeSmuME team
This file is part of DeSmuME
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
DeSmuME is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
DeSmuME is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with DeSmuME; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
You should have received a copy of the GNU General Public License
along with the this software. If not, see <http://www.gnu.org/licenses/>.
*/
// Games with NAND Flash:
// Ore/WarioWare D.I.Y. - chip: SAMSUNG 004
// KLC2811ANB-P204
// NTR-UORE-0
// - 128Mbit
#include "slot1comp_rom.h"
#include "slot1comp_protocol.h"
#include "../slot1.h"
#include "../registers.h"
#include "../MMU.h"
#include "../NDSSystem.h"
#include "../emufile.h"
static void info(char *info) { strcpy(info, "Slot1 Retail NAND card emulation"); }
static void config(void) {}
//quick architecture overview:
//NAND receives GC bus commands from MMU.cpp
//those are passed on to the protocol component for parsing
//protocol calls back into NAND via ISlot1Comp_Protocol_Client interface for things the protocol doesn't know about (the contents of the rom, chiefly)
//NAND utilizes the rom component for address logic and delivering data.
//it also processes some commands itself which aren't rom-related (the NANDy stuff)
static BOOL init() { return (TRUE); }
static void reset() {}
static void close() {}
static void write08(u8 PROCNUM, u32 adr, u8 val) {}
static void write16(u8 PROCNUM, u32 adr, u16 val) {}
static void write32_GCROMCTRL(u8 PROCNUM, u32 val)
class Slot1_Retail_NAND : public ISlot1Interface, public ISlot1Comp_Protocol_Client
{
nds_dscard& card = MMU.dscard[PROCNUM];
private:
u32 subAdr;
switch(card.command[0])
Slot1Comp_Protocol protocol;
Slot1Comp_Rom rom;
u32 mode;
u32 handle_save;
//current NAND read/write start position
//when this is changed, the read/write cursor will be reset to it
//when it is set to the same value, the read/write cursor will NOT be reset
//(this is since some value must necessarily come in on the protocol address, so the 'current save_start' is used as a special 'dont change' value
u32 save_start;
//current NAND read/write cursor
u32 save_adr;
public:
virtual Slot1Info const* info()
{
case 0x00: //Data read
case 0xB7:
card.address = (card.command[1] << 24) | (card.command[2] << 16) | (card.command[3] << 8) | card.command[4];
card.transfer_count = 0x80;
break;
static Slot1InfoSimple info("Retail NAND","Slot1 retail NAND card emulation", 0x02);
return &info;
}
case 0xB8: // Chip ID
card.address = 0;
card.transfer_count = 1;
break;
virtual void connect()
{
protocol.reset(this);
protocol.chipId = gameInfo.chipID;
protocol.gameCode = T1ReadLong((u8*)gameInfo.header.gameCode,0);
// Nand Init
case 0x94:
card.address = 0;
card.transfer_count = 0x80;
break;
save_adr = 0;
handle_save = 0;
mode = 0;
subAdr = T1ReadWord(gameInfo.header.reserved2, 0x6) << 17;
}
// Nand Error?
case 0xD6:
card.address = 0;
card.transfer_count = 1;
break;
virtual void write_command(u8 PROCNUM, GC_Command command)
{
protocol.write_command(command);
}
virtual void write_GCDATAIN(u8 PROCNUM, u32 val)
{
protocol.write_GCDATAIN(PROCNUM, val);
}
virtual u32 read_GCDATAIN(u8 PROCNUM)
{
return protocol.read_GCDATAIN(PROCNUM);
}
virtual void slot1client_startOperation(eSlot1Operation theOperation)
{
//INFO("Start command: %02X%02X%02X%02X%02X%02X%02X%02X\t",
// protocol.command.bytes[0], protocol.command.bytes[1], protocol.command.bytes[2], protocol.command.bytes[3],
// protocol.command.bytes[4], protocol.command.bytes[5], protocol.command.bytes[6], protocol.command.bytes[7]);
//INFO("FROM: %08X\n", NDS_ARM9.instruct_adr);
u32 addressFromProtocol = (protocol.command.bytes[1] << 24) | (protocol.command.bytes[2] << 16) | (protocol.command.bytes[3] << 8) | protocol.command.bytes[4];
//pass the normal rom operations along to the rom component
switch (theOperation)
{
case eSlot1Operation_00_ReadHeader_Unencrypted:
rom.start(theOperation, addressFromProtocol);
return;
case eSlot1Operation_2x_SecureAreaLoad:
rom.start(theOperation, protocol.address);
return;
default:
break;
}
//handle special commands ourselves
int cmd = protocol.command.bytes[0];
switch(cmd)
{
// Nand Init
case 0x94:
mode = cmd;
break;
// Nand Error?
case 0xD6:
break;
//Nand Write Page
case 0x81:
mode = cmd;
if(addressFromProtocol != save_start)
{
save_start = addressFromProtocol;
save_adr = (addressFromProtocol & gameInfo.mask) - subAdr;
}
handle_save = 1;
break;
case 0x84: //Write disable
case 0x85: //Write enable
mode = cmd;
break;
case 0x8B:
mode = cmd;
handle_save = 0;
MMU_new.backupDevice.flushBackup();
break;
//Start read mode
case 0xB7:
if (handle_save)
{
mode = cmd;
if(addressFromProtocol != save_start)
{
save_start = addressFromProtocol;
save_adr = (addressFromProtocol & gameInfo.mask) - subAdr;
}
}
else
{
rom.start(theOperation, addressFromProtocol);
}
break;
case 0xB2: //Set save position
mode = cmd;
save_start = addressFromProtocol;
//cursor resets regardless of whether save_start changed, that's what makes this special.
//the cursor could be reset to the beginning of the previous save_start region
save_adr = (addressFromProtocol & gameInfo.mask) - subAdr;
handle_save = 1;
break;
}
}
virtual u32 slot1client_read_GCDATAIN(eSlot1Operation operation)
{
//pass the normal rom operations along to the rom component
switch(operation)
{
case eSlot1Operation_00_ReadHeader_Unencrypted:
case eSlot1Operation_2x_SecureAreaLoad:
//case eSlot1Operation_B7_Read:
return rom.read();
default:
break;
}
//handle special commands ourselves
int cmd = protocol.command.bytes[0];
int val = 0;
switch(cmd)
{
// Nand Init?
case 0x94:
val = 0;
mode = 0;
break;
//Rom/Save Read
case 0xB7:
{
if(handle_save)
{
MMU_new.backupDevice.ensure(save_adr+4, (u8)0);
val = MMU_new.backupDevice.readLong(save_adr, 0);
save_adr += 4;
}
else
{
val = rom.read();
}
}
break;
// Nand Status?
case 0xD6:
//0x80 == busy
//0x40 == ??
//0x20 == ready?
//0x10 == write enabled?
switch (mode)
{
case 0x84: //Write disable
val = 0x20202020;
break;
case 0x85: //Write enable
val = 0x20202020 | 0x10101010;
break;
case 0x8B:
val = 0x60606060 | 0x10101010;
break;
case 0xB2: //Set save position
val = 0x20202020;
break;
default:
val = 0x60606060; //0x20 == ready
break;
}
break;
}
// Nand Write? ---- PROGRAM for INTERNAL DATA MOVE/RANDOM DATA INPUT
//case 0x8B:
case 0x85:
card.address = 0;
card.transfer_count = 0x80;
break;
default:
card.address = 0;
card.transfer_count = 0;
break;
return val;
}
}
static void write32(u8 PROCNUM, u32 adr, u32 val)
{
switch(adr)
virtual void slot1client_write_GCDATAIN(eSlot1Operation operation, u32 val)
{
case REG_GCROMCTRL:
write32_GCROMCTRL(PROCNUM, val);
break;
//pass the normal rom operations along to the rom component
switch(operation)
{
case eSlot1Operation_00_ReadHeader_Unencrypted:
case eSlot1Operation_B7_Read:
case eSlot1Operation_2x_SecureAreaLoad:
return;
default:
break;
}
//handle special commands ourselves
int cmd = protocol.command.bytes[0];
u32 value = val;
u32 adr = save_adr;
switch(cmd)
{
case 0x81: //Nand Write
MMU_new.backupDevice.ensure(adr+4, (u8)0);
MMU_new.backupDevice.writeLong(adr, val);
save_adr += 4;
break;
}
}
}
static u8 read08(u8 PROCNUM, u32 adr)
{
return 0xFF;
}
static u16 read16(u8 PROCNUM, u32 adr)
{
return 0xFFFF;
}
static u32 read32_GCDATAIN(u8 PROCNUM)
{
nds_dscard& card = MMU.dscard[PROCNUM];
switch(card.command[0])
virtual void post_fakeboot(int PROCNUM)
{
//Get ROM chip ID
case 0x90:
case 0xB8:
{
// Note: the BIOS stores the chip ID in main memory
// Most games continuously compare the chip ID with
// the value in memory, probably to know if the card
// was removed.
// As DeSmuME boots directly from the game, the chip
// ID in main mem is zero and this value needs to be
// zero too.
//note that even if desmume was booting from firmware, and reading this chip ID to store in main memory,
//this still works, since it will have read 00 originally and then read 00 to validate.
//staff of kings verifies this (it also uses the arm7 IRQ 20)
if(nds.cardEjected) //TODO - handle this with ejected card slot1 device (and verify using this case)
return 0xFFFFFFFF;
else return 0;
}
break;
// Data read
case 0x00:
case 0xB7:
{
// Make sure any reads below 0x8000 redirect to 0x8000+(adr&0x1FF) as on real cart
if((card.command[0] == 0xB7) && (card.address < 0x8000))
{
//TODO - refactor this to include the PROCNUM, for debugging purposes if nothing else
//(can refactor gbaslot also)
//INFO("Read below 0x8000 (0x%04X) from: ARM%s %08X\n",
// card.address, (PROCNUM ? "7":"9"), (PROCNUM ? NDS_ARM7:NDS_ARM9).instruct_adr);
card.address = (0x8000 + (card.address&0x1FF));
}
//it seems that etrian odyssey 3 doesnt work unless we mask this to cart size.
//but, a thought: does the internal rom address counter register wrap around? we may be making a mistake by keeping the extra precision
//but there is no test case yet
u32 address = card.address & (gameInfo.mask);
//as a sanity measure for funny-sized roms (homebrew and perhaps truncated retail roms)
//we need to protect ourselves by returning 0xFF for things still out of range
if(address >= gameInfo.romsize)
{
DEBUG_Notify.ReadBeyondEndOfCart(address,gameInfo.romsize);
return 0xFFFFFFFF;
}
return T1ReadLong(MMU.CART_ROM, address);
}
break;
// Nand Init?
case 0x94:
return 0; //Unsure what to return here so return 0 for now
// Nand Status?
case 0xD6:
//0x80 == busy
// Made in Ore/WariWare D.I.Y. need set value to 0x80
return 0x80; //0x20 == ready
default:
return 0;
} //switch(card.command[0])
} //read32_GCDATAIN
static u32 read32(u8 PROCNUM, u32 adr)
{
switch(adr)
{
case REG_GCDATAIN:
return read32_GCDATAIN(PROCNUM);
default:
return 0;
// The BIOS leaves the card in NORMAL mode
protocol.mode = eCardMode_NORMAL;
}
virtual void savestate(EMUFILE &os)
{
s32 version = 0;
protocol.savestate(os);
rom.savestate(os);
os.write_32LE(version);
os.write_32LE(mode);
os.write_32LE(handle_save);
os.write_32LE(save_adr);
os.write_32LE(save_start);
os.write_32LE(subAdr);
}
virtual void loadstate(EMUFILE &is)
{
s32 version = 0;
protocol.loadstate(is);
rom.loadstate(is);
is.read_32LE(version);
// version 0
if (version >= 0)
{
is.read_32LE(mode);
is.read_32LE(handle_save);
is.read_32LE(save_adr);
is.read_32LE(save_start);
is.read_32LE(subAdr);
}
}
}
SLOT1INTERFACE slot1Retail_NAND = {
"Retail with NAND Flash",
init,
reset,
close,
config,
write08,
write16,
write32,
read08,
read16,
read32,
info
};
ISlot1Interface* construct_Slot1_Retail_NAND() { return new Slot1_Retail_NAND(); }

View File

@ -0,0 +1,43 @@
/*
Copyright (C) 2013-2017 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with the this software. If not, see <http://www.gnu.org/licenses/>.
*/
//this file contains the components used for emulating standard gamecard "MC" devices (eeprom, fram, flash)
//this is largely done by accessing the BackupDevice resources in the core emulator
#include "slot1comp_mc.h"
#include "../MMU.h"
#include "../NDSSystem.h"
Slot1Comp_MC g_Slot1Comp_MC;
u8 Slot1Comp_MC::auxspi_transaction(int PROCNUM, u8 value)
{
return MMU_new.backupDevice.data_command(value, PROCNUM);
}
void Slot1Comp_MC::auxspi_reset(int PROCNUM)
{
MMU_new.backupDevice.reset_command();
}
void Slot1Comp_MC::connect()
{
//gamehack: not really a game hack
if(gameInfo.IsCode("AXBJ"))
MMU_new.backupDevice.uninitializedValue = 0x00; // Daigassou! Band Brothers DX (JP)
}

View File

@ -0,0 +1,35 @@
/*
Copyright (C) 2013-2015 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with the this software. If not, see <http://www.gnu.org/licenses/>.
*/
//this file contains the components used for emulating standard gamecard "MC" devices (eeprom, fram, flash)
#ifndef _SLOT1COMP_MC_H
#define _SLOT1COMP_MC_H
#include "../types.h"
class Slot1Comp_MC
{
public:
u8 auxspi_transaction(int PROCNUM, u8 value);
void auxspi_reset(int PROCNUM);
void connect();
};
extern Slot1Comp_MC g_Slot1Comp_MC;
#endif

View File

@ -0,0 +1,262 @@
/*
Copyright (C) 2012-2021 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with the this software. If not, see <http://www.gnu.org/licenses/>.
*/
#include "slot1comp_protocol.h"
#include <string.h>
#include "../armcpu.h"
#include "../encrypt.h"
#include "../emufile.h"
#include "../utils/decrypt/decrypt.h"
static _KEY1 key1((const u8*)arm7_key);
void Slot1Comp_Protocol::reset(ISlot1Comp_Protocol_Client* theClient)
{
this->client = theClient;
//we have to initialize this to something.. lets use dummy.
//(need to clean this up...)
memcpy(&command,"\x9F\0\0\0\0\0\0\0",8);
operation = eSlot1Operation_9F_Dummy;
length = 0;
delay = 0;
mode = eCardMode_RAW;
}
void Slot1Comp_Protocol::write_command_RAW(GC_Command theCommand)
{
int cmd = theCommand.bytes[0];
if(cmd == 0x9F)
{
operation = eSlot1Operation_9F_Dummy;
length = 0x2000;
}
if(cmd == 0x90)
{
operation = eSlot1Operation_90_ChipID;
length = 4;
//we handle this operation ourselves
}
if(cmd == 0x3C)
{
//switch to KEY1
length = 0;
mode = eCardMode_KEY1;
//defer initialization of KEY1 until we know we need it, just to save some CPU time.
//TODO - some information about these parameters
//level == 2
//modulo == 8
key1.init(gameCode, 2, 0x08);
GCLOG("[GC] KEY1 ACTIVATED\n");
}
if(cmd == 0x00)
{
operation = eSlot1Operation_00_ReadHeader_Unencrypted;
client->slot1client_startOperation(operation);
}
}
void Slot1Comp_Protocol::write_command_KEY1(GC_Command theCommand)
{
//decrypt the KEY1-format command
u32 temp[2];
theCommand.toCryptoBuffer(temp);
key1.decrypt(temp);
theCommand.fromCryptoBuffer(temp);
GCLOG("[GC] (key1-decrypted):"); theCommand.print();
//and process it:
int cmd = theCommand.bytes[0];
switch(cmd&0xF0)
{
case 0x10:
operation = eSlot1Operation_1x_ChipID;
delay = 0x910, length = 4;
//we handle this operation ourselves
break;
case 0x20:
operation = eSlot1Operation_2x_SecureAreaLoad;
delay = 0x910, length = 0x11A8;
//TODO - more endian-safe way of doing this (theres examples in R4)
{
#ifdef MSB_FIRST
u64 cmd64 = *(u64*)theCommand.bytes;
#else
u64 cmd64 = bswap64(*(u64*)theCommand.bytes);
#endif
//todo - parse into blocknumber
u32 blocknumber = (cmd64>>44)&0xFFFF;
if(blocknumber<4||blocknumber>7)
printf("SLOT1 WARNING: INVALID BLOCKNUMBER FOR \"Get Secure Area Block\": 0x%04X\n",blocknumber);
address = blocknumber*0x1000;
}
client->slot1client_startOperation(operation);
break;
case 0x40:
//switch to KEY2
delay = 0x910, length = 0;
//well.. not really... yet.
GCLOG("[GC] KEY2 ACTIVATED\n");
break;
case 0x60:
//KEY2 disable? any info?
break;
case 0xA0:
delay = 0x910, length = 0;
mode = eCardMode_NORMAL;
GCLOG("[GC] NORMAL MODE ACTIVATED\n");
break;
}
}
void Slot1Comp_Protocol::write_command_NORMAL(GC_Command theCommand)
{
switch(command.bytes[0])
{
case 0xB7:
{
operation = eSlot1Operation_B7_Read;
//TODO - more endian-safe way of doing this (theres examples in R4)
#ifdef MSB_FIRST
u64 cmd64 = *(u64*)theCommand.bytes;
#else
u64 cmd64 = bswap64(*(u64*)theCommand.bytes);
#endif
address = (u32)((cmd64 >> 24));
length = 0x200;
client->slot1client_startOperation(operation);
}
break;
case 0xB8:
operation = eSlot1Operation_B8_ChipID;
delay = 0, length = 4;
//we handle this operation ourselves
break;
default:
operation = eSlot1Operation_Unknown;
client->slot1client_startOperation(operation);
break;
}
}
void Slot1Comp_Protocol::write_command(GC_Command theCommand)
{
this->command = theCommand;
//unrecognized commands will do something depending on the current state of the card
delay = 0;
length = 0;
address = 0;
switch(mode)
{
case eCardMode_RAW:
write_command_RAW(theCommand);
break;
case eCardMode_KEY1:
write_command_KEY1(theCommand);
break;
case eCardMode_NORMAL:
write_command_NORMAL(theCommand);
break;
default:
break;
}
}
void Slot1Comp_Protocol::write_GCDATAIN(u8 PROCNUM, u32 val)
{
switch(operation)
{
case eSlot1Operation_Unknown:
client->slot1client_write_GCDATAIN(operation,val);
break;
default:
break;
}
}
u32 Slot1Comp_Protocol::read_GCDATAIN(u8 PROCNUM)
{
switch(operation)
{
default:
return client->slot1client_read_GCDATAIN(operation);
case eSlot1Operation_9F_Dummy:
return 0xFFFFFFFF;
case eSlot1Operation_1x_ChipID:
return chipId;
case eSlot1Operation_90_ChipID:
case eSlot1Operation_B8_ChipID:
//Most games continuously compare the current chipId with the value in
//stored in memory at boot-up, probably to know if the card was removed.
//staff of kings verifies this (it also uses the arm7 IRQ 20 to detect card ejects)
return chipId;
}
return 0xFFFFFFFF;
}
void Slot1Comp_Protocol::savestate(EMUFILE &os)
{
s32 version = 0;
os.write_32LE(version);
os.write_32LE((s32)mode);
os.write_32LE((s32)operation);
os.fwrite(command.bytes,8);
os.write_32LE(address);
os.write_32LE(length);
os.write_32LE(delay);
os.write_32LE(chipId);
os.write_32LE(gameCode);
}
void Slot1Comp_Protocol::loadstate(EMUFILE &is)
{
s32 version = is.read_s32LE();
mode = (eCardMode)is.read_s32LE();
operation = (eSlot1Operation)is.read_s32LE();
is.fread(command.bytes,8);
is.read_32LE(address);
is.read_32LE(length);
is.read_32LE(delay);
is.read_32LE(chipId);
is.read_32LE(gameCode);
}

View File

@ -0,0 +1,114 @@
/*
Copyright (C) 2013-2021 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with the this software. If not, see <http://www.gnu.org/licenses/>.
*/
//this file contains the components used for emulating standard gamecard protocol.
//this largely means the complex boot-up process.
//i think there's no reason why proprietary cards couldn't speak any protocol they wish, as long as they didn't mind being unbootable.
//TODO - could this be refactored into a base class? that's probably more reasonable. but we've gone with this modular mix-in architecture so... not yet.
#ifndef _SLOT1COMP_PROTOCOL_H
#define _SLOT1COMP_PROTOCOL_H
#include "../types.h"
#include "../MMU.h"
class EMUFILE;
enum eSlot1Operation
{
//----------
//RAW mode operations
//before encrypted communications can be established, some values from the rom header must be read.
//this is the only way to read the header, actually, since the only reading commands available to games (after KEY2 mode is set) are
eSlot1Operation_00_ReadHeader_Unencrypted,
//it's not clear why this exists
eSlot1Operation_9F_Dummy,
eSlot1Operation_90_ChipID,
//----------
//----------
//KEY1 mode operations
eSlot1Operation_1x_ChipID,
eSlot1Operation_2x_SecureAreaLoad,
//----------
//----------
//NORMAL mode operations
//the main rom data reading command
eSlot1Operation_B7_Read,
eSlot1Operation_B8_ChipID,
//----------
eSlot1Operation_Unknown
};
class ISlot1Comp_Protocol_Client
{
public:
virtual void slot1client_startOperation(eSlot1Operation theOperation) {}
virtual u32 slot1client_read_GCDATAIN(eSlot1Operation theOperation) = 0;
virtual void slot1client_write_GCDATAIN(eSlot1Operation theOperation, u32 val) {}
};
class Slot1Comp_Protocol
{
public:
void savestate(EMUFILE &os);
void loadstate(EMUFILE &is);
//set some kind of protocol/hardware reset state
void reset(ISlot1Comp_Protocol_Client* theClient);
//signals from the GC bus
void write_command(GC_Command theCommand);
void write_GCDATAIN(u8 PROCNUM, u32 val);
u32 read_GCDATAIN(u8 PROCNUM);
//helpers for write_command()
void write_command_RAW(GC_Command theCommand);
void write_command_KEY1(GC_Command theCommand);
void write_command_NORMAL(GC_Command theCommand);
//operations not related to obscurities of the protocol or otherwise unknown are passed through to the client here
ISlot1Comp_Protocol_Client* client;
//--state--
//the major operational mode. the protocol shifts modes and interprets commands into operations differently depending on the mode
eCardMode mode;
//the current operational state
eSlot1Operation operation;
//the command we're currently crunching on
GC_Command command;
//most operations are defined in terms of returning a series of bytes
//the meaning of these varies by operation. they are provided publicly as a service to clients
u32 address;
s32 length, delay; //the expected length and delay of this state
//chipId which should be returned by the various chipId commands
u32 chipId;
//gameCode used by the protocol KEY1 crypto
u32 gameCode;
};
#endif //_SLOT1COMP_PROTOCOL_H

View File

@ -0,0 +1,123 @@
/*
Copyright (C) 2010-2021 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with the this software. If not, see <http://www.gnu.org/licenses/>.
*/
#include "slot1comp_rom.h"
#include "../NDSSystem.h"
#include "../emufile.h"
void Slot1Comp_Rom::start(eSlot1Operation operation, u32 addr)
{
this->_operation = operation;
this->_address = addr;
}
u32 Slot1Comp_Rom::read()
{
switch(this->_operation)
{
case eSlot1Operation_00_ReadHeader_Unencrypted:
{
u32 ret = gameInfo.readROM(this->_address);
this->_address = (this->_address + 4) & 0xFFF;
return ret;
}
break;
case eSlot1Operation_2x_SecureAreaLoad:
{
//see B7 for details
//zero 15-sep-2014 - this is meaningless. newer mask is actually reasonable
//address &= gameInfo.mask; //sanity check
u32 secureAreaAddress = (this->_address - 0x4000);
secureAreaAddress &= 0x3FFF; //memory safe sanity test
u32 ret = LE_TO_LOCAL_32(*(u32*)(gameInfo.secureArea + secureAreaAddress));
this->_address = (this->_address&~0xFFF) + ((this->_address+4)&0xFFF);
return ret;
}
case eSlot1Operation_B7_Read:
{
//TODO - check about non-4-byte aligned addresses
//it seems that etrian odyssey 3 doesnt work unless we mask this to cart size.
//but, a thought: does the internal rom address counter register wrap around? we may be making a mistake by keeping the extra precision
//but there is no test case yet
this->_address &= gameInfo.mask;
//feature of retail carts:
//B7 "Can be used only for addresses 8000h and up, smaller addresses will be silently redirected to address `8000h+(addr AND 1FFh)`"
if(CommonSettings.RetailCardProtection8000)
if(this->_address < 0x8000)
this->_address = (0x8000 + (this->_address & 0x1FF));
//1. as a sanity measure for funny-sized roms (homebrew and perhaps truncated retail roms) we need to protect ourselves by returning 0xFF for things still out of range.
//2. this isnt right, unless someone documents otherwise:
//if (address > gameInfo.header.endROMoffset)
// ... the cart hardware doesnt know anything about the rom header. if it has a totally bogus endROMoffset, the cart will probably work just fine. and, the +4 is missing anyway:
//3. this is better: it just allows us to read 0xFF anywhere we dont have rom data. forget what the header says
//note: we allow the reading to proceed anyway, because the readROM method is built to allow jaggedy reads off the end of the rom to support trimmed roms
if(this->_address+4 > gameInfo.romsize)
{
DEBUG_Notify.ReadBeyondEndOfCart(this->_address,gameInfo.romsize);
}
//actually read from the ROM provider
u32 ret = gameInfo.readROM(this->_address);
//"However, the datastream wraps to the begin of the current 4K block when address+length crosses a 4K boundary (1000h bytes)"
this->_address = (this->_address&~0xFFF) + ((this->_address+4)&0xFFF);
return ret;
}
break;
default:
return 0;
} //switch(operation)
} //Slot1Comp_Rom::read()
u32 Slot1Comp_Rom::getAddress()
{
return this->_address & gameInfo.mask;
} //Slot1Comp_Rom::getAddress()
u32 Slot1Comp_Rom::incAddress()
{
this->_address &= gameInfo.mask;
this->_address = (this->_address&~0xFFF) + ((this->_address+4)&0xFFF);
return this->_address;
}
void Slot1Comp_Rom::savestate(EMUFILE &os)
{
s32 version = 0;
os.write_32LE(version);
os.write_32LE((s32)this->_operation);
os.write_32LE(this->_address);
}
void Slot1Comp_Rom::loadstate(EMUFILE &is)
{
s32 version = is.read_s32LE();
this->_operation = (eSlot1Operation)is.read_s32LE();
this->_address = is.read_u32LE();
}

View File

@ -0,0 +1,45 @@
/*
Copyright (C) 2010-2021 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with the this software. If not, see <http://www.gnu.org/licenses/>.
*/
//this file contains the components used for emulating standard gamecard ROMs
//this is largely done by accessing the rom provided in the core emulator
#ifndef _SLOT1COMP_ROM_H
#define _SLOT1COMP_ROM_H
#include "slot1comp_protocol.h"
#include "../types.h"
class EMUFILE;
class Slot1Comp_Rom
{
public:
void start(eSlot1Operation operation, u32 addr);
u32 read();
u32 getAddress();
u32 incAddress();
void savestate(EMUFILE &os);
void loadstate(EMUFILE &is);
private:
u32 _address;
eSlot1Operation _operation;
};
#endif

View File

@ -0,0 +1,72 @@
/*
Copyright (C) 2013-2015 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with the this software. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
#include "../slot2.h"
class Slot2_Auto : public ISlot2Interface
{
private:
ISlot2Interface *mSelectedImplementation;
public:
Slot2_Auto()
: mSelectedImplementation(NULL)
{
}
virtual Slot2Info const* info()
{
static Slot2InfoSimple info("Auto","Slot2 (auto-selection) device emulation", 0xFE);
return &info;
}
virtual void connect()
{
slot2_selected_type = slot2_DetermineType();
mSelectedImplementation = slot2_List[slot2_selected_type];
mSelectedImplementation->connect();
printf("Slot2 auto-selected device type: %s (0x%02X)\n", mSelectedImplementation->info()->name(), mSelectedImplementation->info()->id());
}
virtual void disconnect()
{
if(mSelectedImplementation) mSelectedImplementation->disconnect();
mSelectedImplementation = NULL;
}
virtual void writeByte(u8 PROCNUM, u32 addr, u8 val) { mSelectedImplementation->writeByte(PROCNUM, addr, val); }
virtual void writeWord(u8 PROCNUM, u32 addr, u16 val) { mSelectedImplementation->writeWord(PROCNUM, addr, val); }
virtual void writeLong(u8 PROCNUM, u32 addr, u32 val) { mSelectedImplementation->writeLong(PROCNUM, addr, val); }
virtual u8 readByte(u8 PROCNUM, u32 addr) { return mSelectedImplementation->readByte(PROCNUM, addr); }
virtual u16 readWord(u8 PROCNUM, u32 addr) { return mSelectedImplementation->readWord(PROCNUM, addr); }
virtual u32 readLong(u8 PROCNUM, u32 addr) { return mSelectedImplementation->readLong(PROCNUM, addr); }
virtual void savestate(EMUFILE &os)
{
mSelectedImplementation->savestate(os);
}
virtual void loadstate(EMUFILE &is)
{
mSelectedImplementation->loadstate(is);
}
};
ISlot2Interface* construct_Slot2_Auto() { return new Slot2_Auto(); }

View File

@ -1,29 +1,24 @@
/* Copyright (C) 2009-2010 DeSmuME team
/*
Copyright (C) 2009 CrazyMax
Copyright (C) 2009-2017 DeSmuME team
This file is part of DeSmuME
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
DeSmuME is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
DeSmuME is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with DeSmuME; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
You should have received a copy of the GNU General Public License
along with the this software. If not, see <http://www.gnu.org/licenses/>.
*/
#include "../addons.h"
#include "../slot2.h"
#include "../emufile.h"
#include "../mem.h"
#include <string.h>
#include "../MMU.h"
u8 *expMemory = NULL;
u32 expMemSize = 8 * 1024 * 1024; // 8Mb
#if 0
#define EXPINFO(...) INFO(__VA_ARGS__)
@ -31,57 +26,7 @@ u32 expMemSize = 8 * 1024 * 1024; // 8Mb
#define EXPINFO(...)
#endif
static BOOL ExpMemory_init(void) { return (TRUE); }
static void ExpMemory_reset(void)
{
if (expMemory)
{
delete [] expMemory;
expMemory = NULL;
}
expMemory = new u8 [expMemSize];
memset(expMemory, 0xFF, expMemSize);
}
static void ExpMemory_close(void)
{
if (expMemory)
{
delete [] expMemory;
expMemory = NULL;
}
}
static void ExpMemory_config(void) {}
static void ExpMemory_write08(u32 procnum, u32 adr, u8 val)
{
if (adr >= 0x09000000)
{
u32 offs = (adr - 0x09000000);
if (offs >= expMemSize) return;
T1WriteByte(expMemory, offs, val);
}
EXPINFO("ExpMemory: write 08 at 0x%08X = 0x%02X\n", adr, val);
}
static void ExpMemory_write16(u32 procnum, u32 adr, u16 val)
{
if (adr >= 0x09000000)
{
u32 offs = (adr - 0x09000000);
if (offs >= expMemSize) return;
T1WriteWord(expMemory, offs, val);
}
EXPINFO("ExpMemory: write 16 at 0x%08X = 0x%04X\n", adr, val);
}
static void ExpMemory_write32(u32 procnum, u32 adr, u32 val)
{
if (adr >= 0x09000000)
{
u32 offs = (adr - 0x09000000);
if (offs >= expMemSize) return;
T1WriteLong(expMemory, offs, val);
}
EXPINFO("ExpMemory: write 32 at 0x%08X = 0x%08X\n", adr, val);
}
#define EXPANSION_MEMORY_SIZE (8 * 1024 * 1024)
static u8 header_0x00B0[] =
{ 0xFF, 0xFF, 0x96, 0x00, //this 0x96 is strange. it can't be read from the pak when it boots, it must appear later
@ -90,67 +35,162 @@ static u8 header_0x00B0[] =
0xFF, 0xFF, 0xFF, 0x7F
};
static u8 ExpMemory_read08(u32 procnum, u32 adr)
class Slot2_ExpansionPak : public ISlot2Interface
{
EXPINFO("ExpMemory: read 08 at 0x%08X\n", adr);
private:
u8 *expMemory;
bool ext_ram_lock;
public:
if(adr>=0x080000B0 && adr<0x080000C0)
return T1ReadByte(header_0x00B0,adr-0x080000B0);
if (adr >= 0x09000000)
Slot2_ExpansionPak()
{
u32 offs = (adr - 0x09000000);
if (offs >= expMemSize) return (0xFF);
return T1ReadByte(expMemory, offs);
expMemory = NULL;
ext_ram_lock = true;
}
virtual Slot2Info const* info()
{
static Slot2InfoSimple info("Memory Expansion Pak", "Official RAM expansion for Opera browser", 0x05);
return &info;
}
return 0xFF;
}
static u16 ExpMemory_read16(u32 procnum, u32 adr)
{
if(adr>=0x080000B0 && adr<0x080000C0)
return T1ReadWord(header_0x00B0,adr-0x080000B0);
if (adr == 0x0801FFFC) return 0x7FFF;
if (adr == 0x08240002) return 0; //this can't be 0xFFFF. dunno why, we just guessed 0
if (adr >= 0x09000000)
virtual void connect()
{
u32 offs = (adr - 0x09000000);
if (offs >= expMemSize) return (0xFFFF);
return T1ReadWord(expMemory, offs);
if (expMemory == NULL)
{
expMemory = new u8[EXPANSION_MEMORY_SIZE];
}
memset(expMemory, 0xFF, EXPANSION_MEMORY_SIZE);
ext_ram_lock = true;
}
EXPINFO("ExpMemory: read 16 at 0x%08X\n", adr);
return 0xFFFF;
}
static u32 ExpMemory_read32(u32 procnum, u32 adr)
{
if(adr>=0x080000B0 && adr<0x080000C0)
return T1ReadLong(header_0x00B0,adr-0x080000B0);
if (adr >= 0x09000000)
virtual void disconnect()
{
u32 offs = (adr - 0x09000000);
if (offs >= expMemSize) return 0xFFFFFFFF;
return T1ReadLong(expMemory, offs);
delete[] expMemory;
expMemory = NULL;
}
EXPINFO("ExpMemory: read 32 at 0x%08X\n", adr);
return 0xFFFFFFFF;
}
static void ExpMemory_info(char *info) { strcpy(info, "Memory Expansion Pak"); }
virtual void writeByte(u8 PROCNUM, u32 addr, u8 val)
{
if (ext_ram_lock) return;
ADDONINTERFACE addonExpMemory = {
"Memory Expansion Pak",
ExpMemory_init,
ExpMemory_reset,
ExpMemory_close,
ExpMemory_config,
ExpMemory_write08,
ExpMemory_write16,
ExpMemory_write32,
ExpMemory_read08,
ExpMemory_read16,
ExpMemory_read32,
ExpMemory_info};
if (addr >= 0x09000000)
{
u32 offs = (addr - 0x09000000);
if (offs >= EXPANSION_MEMORY_SIZE) return;
T1WriteByte(expMemory, offs, val);
}
EXPINFO("ExpMemory: write 08 at 0x%08X = 0x%02X\n", addr, val);
}
virtual void writeWord(u8 PROCNUM, u32 addr, u16 val)
{
if (addr == 0x08240000)
{
if (val == 0)
ext_ram_lock = true;
else
if (val == 1)
ext_ram_lock = false;
return;
}
if (ext_ram_lock) return;
if (addr >= 0x09000000)
{
u32 offs = (addr - 0x09000000);
if (offs >= EXPANSION_MEMORY_SIZE) return;
T1WriteWord(expMemory, offs, val);
}
EXPINFO("ExpMemory: write 16 at 0x%08X = 0x%04X\n", addr, val);
}
virtual void writeLong(u8 PROCNUM, u32 addr, u32 val)
{
if (ext_ram_lock) return;
if (addr >= 0x09000000)
{
u32 offs = (addr - 0x09000000);
if (offs >= EXPANSION_MEMORY_SIZE) return;
T1WriteLong(expMemory, offs, val);
}
EXPINFO("ExpMemory: write 32 at 0x%08X = 0x%08X\n", addr, val);
}
virtual u8 readByte(u8 PROCNUM, u32 addr)
{
EXPINFO("ExpMemory: read 08 at 0x%08X\n", addr);
if ((addr >= 0x080000B0) && (addr < 0x080000C0))
return T1ReadByte(header_0x00B0, (addr - 0x080000B0));
if (addr >= 0x09000000)
{
u32 offs = (addr - 0x09000000);
if (offs >= EXPANSION_MEMORY_SIZE) return (0xFF);
return T1ReadByte(expMemory, offs);
}
return 0xFF;
}
virtual u16 readWord(u8 PROCNUM, u32 addr)
{
EXPINFO("ExpMemory: read 16 at 0x%08X\n", addr);
if ((addr >= 0x080000B0) && (addr < 0x080000C0))
return T1ReadWord(header_0x00B0, (addr - 0x080000B0));
if (addr == 0x0801FFFC) return 0x7FFF;
if (addr == 0x08240002) return 0; //this can't be 0xFFFF. dunno why, we just guessed 0
if (addr >= 0x09000000)
{
u32 offs = (addr - 0x09000000);
if (offs >= EXPANSION_MEMORY_SIZE) return (0xFFFF);
return T1ReadWord(expMemory, offs);
}
return 0xFFFF;
}
virtual u32 readLong(u8 PROCNUM, u32 addr)
{
EXPINFO("ExpMemory: read 32 at 0x%08X\n", addr);
if((addr >= 0x080000B0) && (addr < 0x080000C0))
return T1ReadLong(header_0x00B0, (addr - 0x080000B0));
if (addr >= 0x09000000)
{
u32 offs = (addr - 0x09000000);
if (offs >= EXPANSION_MEMORY_SIZE) return 0xFFFFFFFF;
return T1ReadLong(expMemory, offs);
}
return 0xFFFFFFFF;
}
virtual void savestate(EMUFILE &os)
{
s32 version = 0;
EMUFILE_MEMORY ram = EMUFILE_MEMORY(expMemory, EXPANSION_MEMORY_SIZE);
os.write_32LE(version);
os.write_bool32(ext_ram_lock);
os.write_MemoryStream(ram);
}
virtual void loadstate(EMUFILE &is)
{
EMUFILE_MEMORY ram = EMUFILE_MEMORY();
s32 version = is.read_s32LE();
if (version >= 0)
{
is.read_bool32(ext_ram_lock);
is.read_MemoryStream(ram);
memcpy(expMemory, ram.buf(), std::min(EXPANSION_MEMORY_SIZE, ram.size()));
}
}
};
ISlot2Interface* construct_Slot2_ExpansionPak() { return new Slot2_ExpansionPak(); }

View File

@ -1,473 +1,466 @@
/* Copyright (C) 2009 CrazyMax
Copyright (C) 2009 DeSmuME team
/*
Copyright (C) 2009 CrazyMax
Copyright (C) 2009-2021 DeSmuME team
This file is part of DeSmuME
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
DeSmuME is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
DeSmuME is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with DeSmuME; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
You should have received a copy of the GNU General Public License
along with the this software. If not, see <http://www.gnu.org/licenses/>.
*/
#include "../addons.h"
#include "../mem.h"
#include "../slot2.h"
#include <string.h>
#include "../MMU.h"
#include "../debug.h"
#include "../NDSSystem.h"
#include "../path.h"
#include "../emufile.h"
//SRAM is going to be stored just above the rom.
//that is convenient for us, since it mirrors the nds memory map
#define GBA_ROMSIZE (32 * 1024 * 1024) + 1
#define GBA_SAVESIZE (512 * 1024) + 1
#define EEPROM 0x52504545
#define SRAM_ 0x4D415253
#define FLASH 0x53414C46
#define FLASH1M_ 0x5F4D3148
#define SIIRTC_V 0x52494953
static u8 *GBArom = NULL;
static u8 *saveData = NULL;
static u8 saveType = 0xFF;
static const char *saveTypes[] = {
"EEPROM",
"SRAM",
"FLASH",
"FLASH1M",
"SIIRTC_V",
};
//================================================================================== Flash GBA
typedef struct
class Slot2_GbaCart : public ISlot2Interface
{
u8 state;
u8 cmd;
u32 size;
u8 idDevice;
u8 idManufacturer;
u8 bank;
} FLASH_GBA;
private:
EMUFILE* fROM;
EMUFILE* fSRAM;
u32 romSize;
u32 sramSize;
u32 saveType;
FLASH_GBA gbaFlash = {0};
static void gbaWriteFlash(u32 adr, u8 val)
{
switch (gbaFlash.state)
struct
{
case 0:
if (adr == 0x0A005555)
u32 size;
u8 state;
u8 cmd;
u8 idDevice;
u8 idManufacturer;
u8 bank;
} gbaFlash;
u32 readRom(const u32 pos, const u8 size)
{
if (!fROM) return 0xFFFFFFFF;
fROM->fseek(pos, SEEK_SET);
u32 data = 0xFFFFFFFF;
u32 readed = fROM->fread(&data, size);
return data;
}
u32 readSRAM(const u32 pos, const u8 size)
{
if (!fSRAM)
return 0xFFFFFFFF;
fSRAM->fseek(pos, SEEK_SET);
u32 data = 0xFFFFFFFF;
u32 readed = fSRAM->fread(&data, size);
return data;
}
void writeSRAM(const u32 pos, const u8 *data, u32 size)
{
if (!fSRAM)
return;
fSRAM->fseek(pos, SEEK_SET);
u32 writed = size;
fSRAM->fwrite(data, size);
fSRAM->fflush();
}
u32 scanSaveTypeGBA()
{
if (!fROM) return 0xFF;
fROM->fseek(0, SEEK_SET);
int size = fROM->size();
int lastpct=1;
int len = fROM->size();
for(;;)
{
u32 romType = 0;
u32 readed = fROM->fread(&romType, 4);
int pos = fROM->ftell();
int currPct = pos*100/(size-1);
for(int i=lastpct;i<currPct;i++)
{
if (val == 0xF0)
{
//INFO("GBAgame: Flash: reset\n");
gbaFlash.state = 0;
gbaFlash.cmd = 0;
return;
}
if (val == 0xAA)
{
gbaFlash.state = 1;
return;
}
if(i%10==0)
printf(" %d%%\n",i/10*10);
else printf(".");
lastpct = currPct;
}
if (adr == 0x0A000000)
if (readed < 4)
break;
if(pos >= len)
break;
switch (romType)
{
if (gbaFlash.cmd == 0xB0)
case EEPROM:
return 1;
case SRAM_:
return 2;
case FLASH:
{
gbaFlash.bank = val;
gbaFlash.cmd = 0;
//INFO("GBAgame: Flash: change bank %i\n", val);
return;
u32 tmp = fROM->read_u32LE();
return ((tmp == FLASH1M_)?3:5);
}
}
break;
case 1:
if ( (adr == 0x0A002AAA) && (val == 0x55) )
{
gbaFlash.state = 2;
return;
}
gbaFlash.state = 0;
break;
case 2:
if (adr == 0x0A005555)
{
//INFO("GBAgame: Flash: send command flash 0x%02X\n", val);
switch (val)
{
case 0x80: // Erase
gbaFlash.state = 0x80;
case SIIRTC_V:
return 4;
default:
break;
}
}
case 0x90: // Chip Identification
gbaFlash.state = 0x90;
break;
return 0xFF;
}
case 0xA0: // Write
void gbaWriteFlash(u32 adr, u8 val)
{
if (!fSRAM) return;
switch (gbaFlash.state)
{
case 0:
if (adr == 0x0A005555)
{
if (val == 0xF0)
{
//INFO("GBAgame: Flash: reset\n");
gbaFlash.state = 0;
break;
default:
gbaFlash.state = 0;
break;
gbaFlash.cmd = 0;
return;
}
if (val == 0xAA)
{
gbaFlash.state = 1;
return;
}
}
gbaFlash.cmd = val;
return;
}
gbaFlash.state = 0;
break;
// erase
case 0x80:
if ( (adr == 0x0A005555) && (val == 0xAA) )
{
gbaFlash.state = 0x81;
return;
}
gbaFlash.state = 0;
break;
if (adr == 0x0A000000)
{
if (gbaFlash.cmd == 0xB0)
{
gbaFlash.bank = val;
gbaFlash.cmd = 0;
//INFO("GBAgame: Flash: change bank %i\n", val);
return;
}
}
break;
case 1:
if ( (adr == 0x0A002AAA) && (val == 0x55) )
{
gbaFlash.state = 2;
return;
}
gbaFlash.state = 0;
break;
case 2:
if (adr == 0x0A005555)
{
//INFO("GBAgame: Flash: send command flash 0x%02X\n", val);
switch (val)
{
case 0x80: // Erase
gbaFlash.state = 0x80;
break;
case 0x81:
if ( (adr == 0x0A002AAA) && (val == 0x55) )
{
gbaFlash.state = 0x82;
return;
}
gbaFlash.state = 0;
break;
case 0x90: // Chip Identification
gbaFlash.state = 0x90;
break;
case 0x82:
if (val == 0x30)
{
u32 ofs = (adr & 0x0000F000);
//INFO("GBAgame: Flash: erase from 0x%08X to 0x%08X\n", ofs + 0x0A000000, ofs + 0x0A001000);
for (u32 i = ofs; i < (ofs + 0x1000); i++)
saveData[i] = 0xFF;
}
case 0xA0: // Write
gbaFlash.state = 0;
break;
default:
gbaFlash.state = 0;
break;
}
gbaFlash.cmd = val;
return;
}
gbaFlash.state = 0;
break;
// erase
case 0x80:
if ( (adr == 0x0A005555) && (val == 0xAA) )
{
gbaFlash.state = 0x81;
return;
}
gbaFlash.state = 0;
break;
case 0x81:
if ( (adr == 0x0A002AAA) && (val == 0x55) )
{
gbaFlash.state = 0x82;
return;
}
gbaFlash.state = 0;
break;
case 0x82:
if (val == 0x30)
{
u32 ofs = (adr & 0x0000F000) + (0x10000 * gbaFlash.bank);
//INFO("GBAgame: Flash: erase from 0x%08X to 0x%08X\n", ofs + 0x0A000000, ofs + 0x0A001000);
u8 *tmp = new u8[0x1000];
memset(tmp, 0xFF, 0x1000);
writeSRAM(ofs, tmp, 0x1000);
delete [] tmp;
}
gbaFlash.state = 0;
gbaFlash.cmd = 0;
return;
// Chip Identification
case 0x90:
if ( (adr == 0x0A005555) && (val == 0xAA) )
{
gbaFlash.state = 0x91;
return;
}
gbaFlash.state = 0;
break;
case 0x91:
if ( (adr == 0x0A002AAA) && (val == 0x55) )
{
gbaFlash.state = 0x92;
return;
}
gbaFlash.state = 0;
break;
case 0x92:
gbaFlash.state = 0;
gbaFlash.cmd = 0;
return;
}
if (gbaFlash.cmd == 0xA0) // write
{
writeSRAM((adr & 0x1FFFF) + (0x10000 * gbaFlash.bank), &val, 1);
gbaFlash.state = 0;
gbaFlash.cmd = 0;
return;
// Chip Identification
case 0x90:
if ( (adr == 0x0A005555) && (val == 0xAA) )
{
gbaFlash.state = 0x91;
return;
}
gbaFlash.state = 0;
break;
case 0x91:
if ( (adr == 0x0A002AAA) && (val == 0x55) )
{
gbaFlash.state = 0x92;
return;
}
gbaFlash.state = 0;
break;
case 0x92:
gbaFlash.state = 0;
gbaFlash.cmd = 0;
return;
}
if (gbaFlash.cmd == 0xA0) // write
{
saveData[(adr & 0x1FFFF)+(0x10000*gbaFlash.bank)] = val;
gbaFlash.state = 0;
gbaFlash.cmd = 0;
return;
}
INFO("GBAgame: Flash: write unknown atn 0x%08X = 0x%02X\n", adr, val);
}
static u8 gbaReadFlash(u32 adr)
{
if (gbaFlash.cmd == 0)
{
//INFO("GBAgame: flash read at 0x%08X = 0x%02X\n", adr, saveData[(adr & 0x1FFFF)+(0x10000*gbaFlash.bank)]);
return saveData[(adr & 0x1FFFF)+(0x10000*gbaFlash.bank)];
}
//INFO("GBAgame: flash read at 0x%08X\n", adr);
switch (gbaFlash.cmd)
{
case 0x90: // Chip Identification
if (adr == 0x0A000000) return gbaFlash.idManufacturer;
if (adr == 0x0A000001) return gbaFlash.idDevice;
break;
case 0xF0: //
//INFO("GBAgame: Flash: reset2\n");
gbaFlash.state = 0;
gbaFlash.cmd = 0;
break;
case 0xB0: // Bank switching
break;
default:
INFO("GBAgame: Flash: read - unknown command at 0x%08X = 0x%02X\n", adr, gbaFlash.cmd);
break;
}
return 0xFF;
}
//==================================================================================
static u8 getSaveTypeGBA(const u8 *data, const u32 size)
{
u8 *dat = (u8 *)data;
for (u32 i = 0; i < size; i++)
{
u32 tmp = T1ReadLong(dat, 0);
if (tmp == 0x52504545)
{
if(memcmp(dat, "EEPROM_", 7) == 0)
{
return 1;
}
return;
}
INFO("GBAgame: Flash: write unknown atn 0x%08X = 0x%02X\n", adr, val);
}
if (tmp == 0x4D415253)
u8 gbaReadFlash(u32 adr)
{
if (!fSRAM) return 0xFF;
if (gbaFlash.cmd == 0)
return readSRAM((adr & 0x1FFFF) + (0x10000 * gbaFlash.bank), 1);
//INFO("GBAgame: flash read at 0x%08X\n", adr);
switch (gbaFlash.cmd)
{
if(memcmp(dat, "SRAM_", 5) == 0)
{
return 2;
}
}
case 0x90: // Chip Identification
if (adr == 0x0A000000) return gbaFlash.idManufacturer;
if (adr == 0x0A000001) return gbaFlash.idDevice;
break;
if (tmp == 0x53414C46)
{
if(memcmp(dat, "FLASH1M_", 8) == 0)
{
return 3;
}
}
case 0xF0: //
gbaFlash.state = 0;
gbaFlash.cmd = 0;
break;
if (tmp == 0x52494953)
{
if(memcmp(dat, "SIIRTC_V", 8) == 0)
{
return 4;
}
}
if(memcmp(dat, "FLASH", 5) == 0)
{
return 5;
}
dat++;
}
return 0xFF; // NONE
}
static BOOL GBAgame_init(void)
{
return (TRUE);
}
static void GBAgame_reset(void)
{
memset(&gbaFlash, 0, sizeof(gbaFlash));
if (GBArom)
{
delete [] GBArom;
GBArom = NULL;
}
GBArom = new u8 [GBA_ROMSIZE];
memset(GBArom, 0xFF, GBA_ROMSIZE);
if (saveData)
{
delete [] saveData;
saveData = NULL;
}
saveData = new u8 [GBA_SAVESIZE];
memset(saveData, 0xFF, GBA_SAVESIZE);
if (!strlen(GBAgameName)) return;
FILE *fgame = 0;
//perk: if the gbagame name is "self" this is a special indicator that we should mount the main rom that we're running as the gba game
if(!strcasecmp(GBAgameName,"self"))
{
strcpy(GBAgameName,path.path.c_str());
}
fgame = fopen(GBAgameName,"rb");
if (!fgame) return;
fseek(fgame, 0, SEEK_END);
u32 size = ftell(fgame);
rewind(fgame);
if (!fread(GBArom, 1, size, fgame))
{
fclose(fgame);
return;
}
fclose(fgame);
saveType = getSaveTypeGBA(GBArom, size);
INFO("Loaded \"%s\" in GBA slot (save type %i)\n", GBAgameName, saveType);
//try loading the sram
char * dot = strrchr(GBAgameName,'.');
if(!dot) return;
std::string sram_fname = GBAgameName;
sram_fname.resize(dot-GBAgameName);
sram_fname += ".sav";
fgame = fopen(sram_fname.c_str(),"rb");
if(!fgame) return;
fseek(fgame, 0, SEEK_END);
size = ftell(fgame);
rewind(fgame);
if (!fread(saveData, 1, size, fgame))
{
fclose(fgame);
return;
}
fclose(fgame);
gbaFlash.size = size;
if (gbaFlash.size <= (64 * 1024))
{
gbaFlash.idDevice = 0x1B;
gbaFlash.idManufacturer = 0x32;
}
else
{
gbaFlash.idDevice = 0x09;
gbaFlash.idManufacturer = 0xC2;
}
INFO("Loaded save \"%s\" in GBA slot\n", sram_fname.c_str());
}
static void GBAgame_close(void)
{
if (GBArom)
{
delete [] GBArom;
GBArom = NULL;
}
if (saveData)
{
delete [] saveData;
saveData = NULL;
}
}
static void GBAgame_config(void) {}
static void GBAgame_write08(u32 procnum, u32 adr, u8 val)
{
//INFO("GBAgame: write08 at 0x%08X val=0x%02X\n", adr, val);
if ( (adr >= 0x0A000000) && (adr < 0x0A010000) )
{
switch (saveType)
{
case 3: // Flash
case 5:
gbaWriteFlash(adr, val);
case 0xB0: // Bank switching
break;
default:
break;
INFO("GBAgame: Flash: read - unknown command at 0x%08X = 0x%02X\n", adr, gbaFlash.cmd);
break;
}
//return (u8)T1ReadByte(saveData, (adr - 0x0A000000));
return 0xFF;
}
}
static void GBAgame_write16(u32 procnum, u32 adr, u16 val)
{
//INFO("GBAgame: write16 at 0x%08X val=0x%04X\n", adr, val);
}
static void GBAgame_write32(u32 procnum, u32 adr, u32 val)
{
//INFO("GBAgame: write32 at 0x%08X val=0x%08X\n", adr, val);
}
static u8 GBAgame_read08(u32 procnum, u32 adr)
{
//INFO("GBAgame: read08 at 0x%08X value 0x%02X\n", adr, (u8)T1ReadByte(GBArom, (adr - 0x08000000)));
if (adr < 0x0A000000)
return (u8)T1ReadByte(GBArom, (adr - 0x08000000));
if (adr < 0x0A010000)
void Close()
{
switch (saveType)
{
case 3: // Flash
case 5:
return gbaReadFlash(adr);
delete fROM; fROM = NULL;
delete fSRAM; fSRAM = NULL;
romSize = 0;
sramSize = 0;
}
default:
break;
public:
Slot2_GbaCart()
: fROM(NULL)
, fSRAM(NULL)
{
Close();
}
virtual Slot2Info const* info()
{
static Slot2InfoSimple info("GBA Cartridge", "GBA cartridge in slot", 0x03);
return &info;
}
virtual void connect()
{
Close();
romSize = 0;
sramSize = 0;
if (gameInfo.romsize == 0)
{
return;
}
//INFO("Read08 at 0x%08X val=0x%08X\n", adr, (u8)T1ReadByte(GBArom, (adr - 0x08000000)) );
return (u8)T1ReadByte(saveData, (adr - 0x0A000000));
if (GBACartridge_RomPath.empty())
{
return;
}
if (!strcasecmp(GBACartridge_RomPath.c_str(), "self"))
{
GBACartridge_RomPath = path.path;
GBACartridge_SRAMPath = Path::GetFileNameWithoutExt(GBACartridge_RomPath) + "." + GBA_SRAM_FILE_EXT;
}
printf("GBASlot opening ROM: %s\n", GBACartridge_RomPath.c_str());
EMUFILE_FILE *inf = new EMUFILE_FILE(GBACartridge_RomPath, "rb");
fROM = inf;
if (fROM->fail())
{
printf(" - Failed\n");
Close();
return;
}
inf->EnablePositionCache();
romSize = fROM->size();
printf(" - Success (%u bytes)\n", romSize);
// Load the GBA cartridge SRAM.
inf = new EMUFILE_FILE(GBACartridge_SRAMPath, "rb+");
fSRAM = inf;
if(fSRAM->fail())
{
delete fSRAM;
fSRAM = NULL;
printf("GBASlot did not load associated SRAM.\n");
}
else
{
inf->EnablePositionCache();
sramSize = fSRAM->size();
printf("Scanning GBA rom to ID save type\n");
saveType = scanSaveTypeGBA();
printf("\nGBASlot found SRAM (%s - %u bytes) at:\n%s\n", (saveType == 0xFF)?"Unknown":saveTypes[saveType], sramSize, GBACartridge_SRAMPath.c_str());
gbaFlash.size = sramSize;
if (gbaFlash.size <= (64 * 1024))
{
gbaFlash.idDevice = 0x1B;
gbaFlash.idManufacturer = 0x32;
}
else
{
gbaFlash.idDevice = 0x09;
gbaFlash.idManufacturer = 0xC2;
}
gbaFlash.state = 0;
}
}
//INFO("Read08 at 0x%08X val=0x%08X\n", adr, (u8)T1ReadByte(GBArom, (adr - 0x08000000)) );
return 0xFF;
}
static u16 GBAgame_read16(u32 procnum, u32 adr)
{
//INFO("GBAgame: read16 at 0x%08X value 0x%04X\n", adr, (u16)T1ReadWord(GBArom, (adr - 0x08000000)));
if (adr < 0x0A000000)
return (u16)T1ReadWord(GBArom, (adr - 0x08000000));
if (adr < 0x0A010000)
virtual void disconnect()
{
//INFO("GBAgame: flash read16 at 0x%08X\n", adr);
return (u16)T1ReadWord(saveData, (adr - 0x0A000000));
Close();
}
return 0xFFFF;
}
static u32 GBAgame_read32(u32 procnum, u32 adr)
{
//INFO("GBAgame: read32 at 0x%08X value 0x%08X\n", adr, (u32)T1ReadLong(GBArom, (adr - 0x08000000)));
if (adr < 0x0A000000)
return (u32)T1ReadLong(GBArom, (adr - 0x08000000));
if (adr < 0x0A010000)
virtual void writeByte(u8 PROCNUM, u32 addr, u8 val)
{
//INFO("GBAgame: flash read32 at 0x%08X\n", adr);
return (u32)T1ReadLong(saveData, (adr - 0x0A000000));
if ((addr >= 0x0A000000) && (addr < 0x0A010000))
{
switch (saveType)
{
case 3: // Flash
case 5:
gbaWriteFlash(addr, val);
break;
default: break;
}
}
}
return 0xFFFFFFFF;
}
static void GBAgame_info(char *info)
{
strcpy(info, "GBA game in slot");
}
virtual u8 readByte(u8 PROCNUM, u32 addr)
{
if (addr < 0x0A000000)
return (u8)readRom(addr - 0x08000000, 1);
ADDONINTERFACE addonGBAgame = {
"GBA game",
GBAgame_init,
GBAgame_reset,
GBAgame_close,
GBAgame_config,
GBAgame_write08,
GBAgame_write16,
GBAgame_write32,
GBAgame_read08,
GBAgame_read16,
GBAgame_read32,
GBAgame_info};
if (addr < 0x0A010000)
{
if ((saveType == 3) || (saveType == 5))
return gbaReadFlash(addr);
return (u8)readSRAM(addr - 0x0A000000, 1);
}
return 0xFF;
}
virtual u16 readWord(u8 PROCNUM, u32 addr)
{
if (addr < 0x0A000000)
return (u16)readRom(addr - 0x08000000, 2);
if (addr < 0x0A010000)
return (u16)readSRAM(addr - 0x0A000000, 2);
return 0xFFFF;
}
virtual u32 readLong(u8 PROCNUM, u32 addr)
{
if (addr < 0x0A000000)
return (u32)readRom(addr - 0x08000000, 4);
if (addr < 0x0A010000)
return (u32)readSRAM(addr - 0x0A000000, 4);
return 0xFFFFFFFF;
}
};
ISlot2Interface* construct_Slot2_GbaCart() { return new Slot2_GbaCart(); }

View File

@ -1,72 +1,65 @@
/* Copyright (C) 2009-2010 DeSmuME team
/*
Copyright (C) 2009 CrazyMax
Copyright (C) 2009-2013 DeSmuME team
This file is part of DeSmuME
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
DeSmuME is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
DeSmuME is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with DeSmuME; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
You should have received a copy of the GNU General Public License
along with the this software. If not, see <http://www.gnu.org/licenses/>.
*/
#include "../addons.h"
#include <string.h>
#include "../slot2.h"
static u8 guitarKeyStatus;
static u8 guitarKeyStatus = 0;
class Slot2_GuitarGrip : public ISlot2Interface
{
private:
public:
virtual Slot2Info const* info()
{
static Slot2InfoSimple info("Guitar Grip", "Guitar Grip for Guitar Hero games", 0x04);
return &info;
}
static BOOL guitarGrip_init(void) { return (TRUE); }
static void guitarGrip_reset(void)
{
//INFO("GuitarGrip: Reset\n");
guitarKeyStatus = 0;
}
static void guitarGrip_close(void) {}
static void guitarGrip_config(void) {}
static void guitarGrip_write08(u32 procnum, u32 adr, u8 val) {}
static void guitarGrip_write16(u32 procnum, u32 adr, u16 val) {}
static void guitarGrip_write32(u32 procnum, u32 adr, u32 val) {}
static u8 guitarGrip_read08(u32 procnum, u32 adr)
{
//INFO("GuitarGrip: read 08 at 0x%08X\n", adr);
if (adr == 0x0A000000) return (~guitarKeyStatus);
else if(adr&1) return 0xF9;
else return 0xFF;
}
static u16 guitarGrip_read16(u32 procnum, u32 adr)
{
//INFO("GuitarGrip: read 16 at 0x%08X\n", adr);
return 0xF9FF;
}
static u32 guitarGrip_read32(u32 procnum, u32 adr)
{
//INFO("GuitarGrip: read 32 at 0x%08X\n", adr);
return (0xF9FFF9FF);
}
static void guitarGrip_info(char *info) { strcpy(info, "Guitar Grip for Guitar Hero games"); }
virtual void connect()
{
guitarKeyStatus = 0xFF;
}
virtual u8 readByte(u8 PROCNUM, u32 addr)
{
if (addr == 0x0A000000)
return guitarKeyStatus;
return (addr & 1) ? 0xF9 : 0xFF;
}
virtual u16 readWord(u8 PROCNUM, u32 addr) { return 0xF9FF; }
virtual u32 readLong(u8 PROCNUM, u32 addr) { return 0xF9FFF9FF; }
};
ISlot2Interface* construct_Slot2_GuitarGrip() { return new Slot2_GuitarGrip(); }
void guitarGrip_setKey(bool green, bool red, bool yellow, bool blue)
{
guitarKeyStatus = 0 | (green << 6) | (red << 5) | (yellow << 4) | (blue << 3);
const u8 g = (green) ? (1 << 6) : 0;
const u8 r = (red) ? (1 << 5) : 0;
const u8 y = (yellow) ? (1 << 4) : 0;
const u8 b = (blue) ? (1 << 3) : 0;
guitarKeyStatus = ~(g | r | y | b);
}
ADDONINTERFACE addonGuitarGrip = {
"Guitar Grip",
guitarGrip_init,
guitarGrip_reset,
guitarGrip_close,
guitarGrip_config,
guitarGrip_write08,
guitarGrip_write16,
guitarGrip_write32,
guitarGrip_read08,
guitarGrip_read16,
guitarGrip_read32,
guitarGrip_info};
void guitarGrip_setKey(u8 theKeys)
{
guitarKeyStatus = theKeys;
}

View File

@ -0,0 +1,87 @@
//HCV-1000 emulation code adapted from GBE+: https://github.com/shonumi/gbe-plus
/*
Modifications Copyright (C) 2023 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with the this software. If not, see <http://www.gnu.org/licenses/>.
*/
#include <string.h>
#include "../slot2.h"
u8 hcv1000_cnt;
char hcv1000_data[16];
class Slot2_HCV1000 : public ISlot2Interface
{
public:
virtual Slot2Info const* info()
{
static Slot2InfoSimple info("Sega Card Reader", "Sega Card Reader(HCV-1000) add-on", 0x09);
return &info;
}
virtual bool init()
{
hcv1000_cnt = 0;
memset(hcv1000_data, 0x5F, 16);
return TRUE;
}
virtual void writeByte(u8 PROCNUM, u32 addr, u8 val)
{
if (addr == 0xA000000) { hcv1000_cnt = (val & 0x83); }
}
virtual u8 readByte(u8 PROCNUM, u32 addr)
{
u8 slot_byte = 0xFF;
//Reading these cart addresses is for detection
if (addr < 0x8020000)
{
u8 data = 0xF0 | ((addr & 0x1F) >> 1);
slot_byte = (addr & 0x1) ? 0xFD : data;
}
//HCV_CNT
else if (addr == 0xA000000) { slot_byte = hcv1000_cnt; }
//HCV_DATA
else if ((addr >= 0xA000010) && (addr <= 0xA00001F))
{
slot_byte = (u8)hcv1000_data[addr & 0xF];
}
return slot_byte;
}
virtual u16 readWord(u8 PROCNUM, u32 addr) { return 0xFDFD; };
virtual u32 readLong(u8 PROCNUM, u32 addr) { return 0xFDFDFDFD; };
};
ISlot2Interface* construct_Slot2_HCV1000() { return new Slot2_HCV1000(); }
void HCV1000_setReady()
{
hcv1000_cnt &= ~0x80;
}
void HCV1000_setBarcode(std::string barcode)
{
barcode.resize(16, '_');
memcpy(hcv1000_data, barcode.c_str(), barcode.length());
}

View File

@ -1,39 +1,33 @@
/*
Copyright (C) 2006 yopyop
Copyright (C) 2006 Mic
Copyright (C) 2009-2011 DeSmuME team
Copyright (C) 2009-2017 DeSmuME team
This file is part of DeSmuME
DeSmuME is free software; you can redistribute it and/or modify
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
DeSmuME is distributed in the hope that it will be useful,
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with DeSmuME; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
along with the this software. If not, see <http://www.gnu.org/licenses/>.
*/
#include "../addons.h"
#include <string>
#include <string.h>
#include "debug.h"
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include "types.h"
#include "../utils/vfat.h"
#include "../slot2.h"
#include "../debug.h"
#include "../emufile.h"
#include "../path.h"
#include "MMU.h"
#include "NDSSystem.h"
#include "../utils/vfat.h"
// Set up addresses for GBAMP
#define CF_REG_DATA 0x9000000
@ -91,6 +85,17 @@ static BOOL cflash_init()
sFlashPath = CFlash_Path;
INFO("Using CFlash directory: %s\n", sFlashPath.c_str());
}
else if(CFlash_Mode == ADDON_CFLASH_MODE_File)
{
sFlashPath = CFlash_Path;
INFO("Using CFlash disk image file %s\n", sFlashPath.c_str());
}
else
{
return FALSE;
}
if (sFlashPath == "") return FALSE;
if(CFlash_IsUsingPath())
{
@ -117,8 +122,6 @@ static BOOL cflash_init()
}
else
{
sFlashPath = CFlash_Path;
INFO("Using CFlash disk image file %s\n", sFlashPath.c_str());
file = new EMUFILE_FILE(sFlashPath.c_str(),"rb+");
if(file->fail())
{
@ -155,7 +158,7 @@ static unsigned int cflash_read(unsigned int address)
{
if(file)
{
u8 data[2];
u8 data[2] = {0,0};
file->fseek(currLBA, SEEK_SET);
elems_read += file->fread(data,2);
ret_value = data[1] << 8 | data[0];
@ -266,73 +269,33 @@ static void cflash_close( void)
inited = FALSE;
}
static BOOL init(void)
class Slot2_CFlash : public ISlot2Interface
{
return TRUE;
}
public:
virtual Slot2Info const* info()
{
static Slot2InfoSimple info("MPCF Flash Card Device", "MPCF Flash Card Device", 0x01);
return &info;
}
static void reset(void)
{
cflash_close();
cflash_init();
}
virtual void connect()
{
cflash_close();
cflash_init();
}
virtual void disconnect()
{
cflash_close();
}
static void close(void)
{
cflash_close();
}
virtual void writeByte(u8 PROCNUM, u32 addr, u8 val) { cflash_write(addr, val); }
virtual void writeWord(u8 PROCNUM, u32 addr, u16 val) { cflash_write(addr, val); }
virtual void writeLong(u8 PROCNUM, u32 addr, u32 val) { cflash_write(addr, val); }
static void config(void)
{
}
virtual u8 readByte(u8 PROCNUM, u32 addr) { return (cflash_read(addr)); }
virtual u16 readWord(u8 PROCNUM, u32 addr) { return (cflash_read(addr)); }
virtual u32 readLong(u8 PROCNUM, u32 addr) { return (cflash_read(addr)); }
static void write08(u32 procnum, u32 adr, u8 val)
{
cflash_write(adr, val);
}
};
static void write16(u32 procnum, u32 adr, u16 val)
{
cflash_write(adr, val);
}
static void write32(u32 procnum, u32 adr, u32 val)
{
cflash_write(adr, val);
}
static u8 read08(u32 procnum, u32 adr)
{
return (cflash_read(adr));
}
static u16 read16(u32 procnum, u32 adr)
{
return (cflash_read(adr));
}
static u32 read32(u32 procnum, u32 adr)
{
return (cflash_read(adr));
}
static void info(char *info)
{
strcpy(info, "MPCF Flash Card Device");
}
ADDONINTERFACE addonCFlash = {
"MPCF Flash Card Device",
init,
reset,
close,
config,
write08,
write16,
write32,
read08,
read16,
read32,
info};
#undef CFLASHDEBUG
ISlot2Interface* construct_Slot2_CFlash() { return new Slot2_CFlash(); }

View File

@ -1,48 +1,31 @@
/* Copyright (C) 2009 CrazyMax
Copyright (C) 2009 DeSmuME team
/*
Copyright (C) 2009 CrazyMax
Copyright (C) 2009-2013 DeSmuME team
This file is part of DeSmuME
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
DeSmuME is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
DeSmuME is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with DeSmuME; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
You should have received a copy of the GNU General Public License
along with the this software. If not, see <http://www.gnu.org/licenses/>.
*/
#include "../addons.h"
#include <string.h>
#include "../slot2.h"
static BOOL None_init(void) { return (TRUE); }
static void None_reset(void) {}
static void None_close(void) {}
static void None_config(void) {}
static void None_write08(u32 procnum, u32 adr, u8 val) {}
static void None_write16(u32 procnum, u32 adr, u16 val) {}
static void None_write32(u32 procnum, u32 adr, u32 val) {}
static u8 None_read08(u32 procnum, u32 adr){ return (0xFF); }
static u16 None_read16(u32 procnum, u32 adr){ return (0xFFFF); }
static u32 None_read32(u32 procnum, u32 adr){ return (0xFFFFFFFF); }
static void None_info(char *info) { strcpy(info, "Nothing in GBA slot"); }
class Slot2_None : public ISlot2Interface
{
public:
virtual Slot2Info const* info()
{
static Slot2InfoSimple info("None", "Slot2 no-device emulation", 0xFF);
return &info;
}
};
ADDONINTERFACE addonNone = {
"NONE",
None_init,
None_reset,
None_close,
None_config,
None_write08,
None_write16,
None_write32,
None_read08,
None_read16,
None_read32,
None_info};
ISlot2Interface* construct_Slot2_None() { return new Slot2_None(); }

Some files were not shown because too many files have changed in this diff Show More