Skip to content

Basic support for macOS (and possibly also other UNIX systems) - #10

Closed
nbudin wants to merge 1 commit into
mstan:masterfrom
nbudin:unix-support
Closed

Basic support for macOS (and possibly also other UNIX systems)#10
nbudin wants to merge 1 commit into
mstan:masterfrom
nbudin:unix-support

Conversation

@nbudin

@nbudin nbudin commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

Hi! This project is super cool and I'm very interested in it ❤️

I wanted to try it out on my Mac, but right now it only supports Windows. Since you've set up Claude Code support in nesrecomp, I let Claude loose on it and asked it to get it to the point where things compile. Here's what it did:

  • Added a UNIX implementation of the _mkdir function from direct.h and abstracted it into a macro
  • Added a target_compile_options for clang
  • Added a POSIX implementation of coroutines using ucontext, as the error message suggested
  • Added some missing declarations in nes_runtime.h (not really sure about this one, I would imagine it should also be failing in Windows builds if this were a real issue?)

If you don't feel like dealing with this right now, I totally get it and won't be offended! Either way, nesrecomp is really interesting stuff and I'll be following it.

…a narrowing

- coroutine.c: implement POSIX ucontext_t backend (was #error TODO); add
  coroutine_restart_requested() to both Windows and POSIX paths
- nes_runtime.h: update mapper_init to 4-param signature; add missing
  declarations for runtime_get_ppu_t, runtime_scroll_from_t_valid,
  runtime_get_latch_state, runtime_set_latch_state
- nestopia_cmake.cmake: suppress -Wc++11-narrowing for non-MSVC builds
- main_nes.c: replace _mkdir with cross-platform make_dir macro

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mstan

mstan commented May 29, 2026

Copy link
Copy Markdown
Owner

Thank you for the PR! I apologize that I didn't see this sooner. I do have Macs to work with, so I'll take some time to try and integrate it in and do a bit of validation! Can't promise a turnaround, but will try to do so soon!

@mstan
mstan self-requested a review May 29, 2026 05:38
@mstan

mstan commented May 29, 2026

Copy link
Copy Markdown
Owner

Ah, I did have one follow-up. Was there a specific architecture you were hoping to have it supported on? I realize most of my Macs are the ARM architecture, so I wouldn't be able to test as well on anything x86 Mac.

@nbudin

nbudin commented May 29, 2026

Copy link
Copy Markdown
Contributor Author

I only have ARM Macs myself, so I'm in the same boat. I'd expect these changes should probably work on Intel as well, but I don't really have any way to test that.

mstan added a commit that referenced this pull request May 29, 2026
macOS / POSIX build support (supersedes #10)
@mstan

mstan commented May 29, 2026

Copy link
Copy Markdown
Owner

Hello! Wanted to give you a heads up that I went ahead and pulled your changes in on the latest branch and was able to build it myself. I was able to get Zelda running cleanly!

Screenshot 2026-05-29 at 10 51 58 AM

Because I'd made a number of changes since your PR, I couldn't cleanly update the branch here, so I went ahead and made PR #10 to re-incorporate the changes.

I made sure to preserve you as a co-author to give credit where credit is due.

If you can pull these down and see if you're able to build, do let me know. Can do a follow up if anything on my environment didn't work with yours.

Thank you for the contribution! It's much appreciated!

@mstan

mstan commented Jun 6, 2026

Copy link
Copy Markdown
Owner

Hello! Since I haven't gotten any follow-up on this, going to go ahead and close the PR since we already refactored and merged it per #10. As previously mentioned, you have been properly credited for your contribution. Thank you again!

@mstan mstan closed this Jun 6, 2026
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