Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile macOS interface with clang #1

Open
wants to merge 134 commits into
base: binary-interface
Choose a base branch
from

Conversation

tech-ticks
Copy link

The new desmume build previously didn't load on macOS due to missing symbols in the outdated the system libstdc++. clang uses the non-deprecated libc++ instead, which should fix the issue when loading the debugger.

zeromus and others added 30 commits February 5, 2021 14:09
Update menu and config upon save type change
DeSmuME as a shared object / dynamic library
…on open rom file dialog and other cases probably)
…rsions 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.
- Fixes a crash that can occur on startup or when modifying the Video Pixel Scaler in Preferences. Fixes TASEmulators#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 TASEmulators#335.
- Fixes a possible crash that can occur if an invalid ID is sent when trying to set the 3D Rendering Engine. Maybe fixes TASEmulators#342.
…They don't actually do anything as of this commit, but they will be used in future commits.)
…nly 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).
…ould display a black box if the .app was built using Xcode 10 or later.

- Also make OGLImage run a little more efficiently.
…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.
…lor Depth while the emulator is paused would cause the program to freeze upon restarting the emulation via Run, Frame Advance, or Frame Jump.
- 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.
…Opaque32_vec() to require Tier-1 support instead of Tier-0.
rofl0r and others added 23 commits October 26, 2021 16:56
this option puts the touchscreen to the right, allowing higher scales
on widescreen monitors.
- 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).
…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
…ce_memory_leak_mitigation

Hotfix: fixed memory leak in binary interface
doesn't build yet (at least with --enable-glx - this will be fixed later)
the cli frontend still doesn't build, but gtk does
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.
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)
@tech-ticks tech-ticks force-pushed the binary-interface branch 2 times, most recently from e3aa5ae to 6f723f2 Compare November 5, 2021 12:09
@tech-ticks tech-ticks force-pushed the binary-interface branch 2 times, most recently from df953dc to 7fad6f2 Compare November 5, 2021 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants