Skip to content

Initial macOS compatibility fixes#107

Open
Mwrnk wants to merge 3 commits into
Jay-Day:masterfrom
Mwrnk:macos-compat
Open

Initial macOS compatibility fixes#107
Mwrnk wants to merge 3 commits into
Jay-Day:masterfrom
Mwrnk:macos-compat

Conversation

@Mwrnk

@Mwrnk Mwrnk commented May 16, 2026

Copy link
Copy Markdown

Description:
Gets RMG-K running on macOS (Apple Silicon / Mach-O).

  • Disable dynamic recompiler on APPLE: the arm64 dynarec uses ELF
    directives that are incompatible with Mach-O. Falls back to cached
    interpreter (mode 1) across all emulation paths.

  • Fix OpenGL widget startup in VidExt: isVisible() returns true on macOS
    before the NSView has an actual drawable surface. Now also waits for
    isExposed() with a 5s timeout, preventing makeCurrent() failures on
    launch. Improved GL context error messages to show requested vs. actual
    version/profile.

Mwrnk added 2 commits May 16, 2026 13:24
Dynarec uses ELF directives incompatible with Mach-O; fall back to
cached interpreter on __APPLE__. VidExt busy-wait now checks
isExposed() in addition to isVisible() (NSView has no drawable surface
until exposed), with a 5s timeout and improved GL context error output.
@Mwrnk Mwrnk changed the title macos-compat: initial macOS compatibility fixes Add macOS compatibility May 16, 2026
@Mwrnk Mwrnk changed the title Add macOS compatibility Initial macOS compatibility fixes May 16, 2026
@furtabs

furtabs commented Jun 20, 2026

Copy link
Copy Markdown

This PR really wont do, since the dynamic recompiler which is used even if we got it ported to arm64 is too different with the x86_64 code that it could desync.

# Conflicts:
#	Source/RMG/CMakeLists.txt
#	Source/RMG/VidExt.cpp
@Mwrnk

Mwrnk commented Jul 4, 2026

Copy link
Copy Markdown
Author

This PR really wont do, since the dynamic recompiler which is used even if we got it ported to arm64 is too different with the x86_64 code that it could desync.

The PR doesn't port the dynarec to macOS, it just disables it and uses the cached interpreter instead. If Mac vs PC sessions do desync, the fix is forcing all peers to the interpreter whenever a Mac player is in the room, not rejecting the entire port. And this is testable (same ROM + same inputs, compare savestates between the two cores) rather than something we have to guess about.

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.

2 participants