-
Notifications
You must be signed in to change notification settings - Fork 2
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
PCem v17? #7
Comments
The dynamic core in v17 is currently 'broken' to the extent that if you compile in macOS it will run extremely slowly and basically be unusable. I can confirm this myself as I built from source and tested it in Mojave. I have successfully built v16 and patched in the experimental Open GL 3.0 support as well (to use shaders). It works great. If you would like a copy, let me know and I will provide a DropBox link. Note that I am using an Intel Mac so it will only run in Rosetta 2 on an M1. |
Oh damn, but thanks. @almeath I sure want a copy please, at the moment I have an Intel Mac (2013 MacBook Pro Retina "13, i7 Dual Core 2.8GHz). Probably not one of the strongest Macs, and will probably struggle a bit, but I want to try out for FIFA 9X games, with a view for a future Apple Silicon upgrade between the end of 2021 and start of 2022. EDIT: If possible I would also like to fork the patched v16 repo so I could compile myself in the future. |
Actually, it is easier for me to just fork it now and let you build from there directly. Should be available now: https://github.com/almeath/PCemV16macOS Build instructions are in the README.md Let me know if you need any help. I think it is a good idea to hold off on Apple Silicon until there have been several generations of updates, which also allows more time for the Mac community to catch up with the transition. I like to move across when things are more established, rather than live on the frontier so to speak. For example, they are only just getting started with adding Apple Silicon support for Homebrew, and that will be a lengthy process. I know there is Rosetta 2, but I want full performance. |
Thanks! I'll give it a go sometime this weekend, and I will report back too. EDIT: I've got this error after running make: codegen_allocator.c:56:28: error: implicit declaration of function 'rand' is invalid in C99 [-Werror,-Wimplicit-function-declaration] I have latest Xcode and command line tools, brew 3.0.0, required packages installed (sdl2, wxmac, openal-soft). |
I’ll build this for you and post a link to the compiled output. However, in the meantime, can you try installing this in homebrew: brew install gcc After that, try running configure and make again. If that fails, can you show me your full Terminal output after running both the ./configure commands? It might be that you are missing a C / C++11 dependency. I had similar errors when building custom DOSBox branches and needed to install support for older C compilers. The default support in the version of clang that comes with macOS might not have full backwards compatibility. |
Here is the compiled output, with the pcem executable built. https://www.dropbox.com/s/z061mhaf3io9c3t/PCemV16macOS-master.zip?dl=0 I am still interested to know if you can build it yourself, as I may have to add some extra brew dependencies to the build instructions. |
after brew install gcc and trying to compile again, I'm stuck with the same error:
No luck. Well, I'll download your build and try it out. |
Here's the output for your build:
I've seen that before with one of the previous builds. I have to remember how I managed to overcome this one... |
Just confirming you ran the command to install the dependencies? brew install sdl2 brew install wxmac brew install openal-soft EDIT: I included your missing dylib in this zip file: these dependencies are included inside the PCem app that @kyr0 included with his earlier build. Maybe try putting these in your usr/local/lib ? |
Yes
I think the problem is the versioning. I do have the missing libraries in usr/local/lib, but they are newer versions (not just this one, there are others). I'll try these now |
No luck. I'm on WxMac 3.0.5.1 according to homebrew, and apparently pcem wants 3.0. I remember I've hit the same roadblock when I tried v14, but I did not insist back then. And there is no webview dylib within this latest version. |
This is the output when I add the webview library: MacBruno-Pro:PCemV16macOS-master Bruninho$ ./pcem |
OK, this appears to be a Catalina / Big Sur issue which I need to investigate. I am using Mojave on my main system, but I tested the binary in Big Sur on my MacBook Pro and it produced the same error about the missing library for libwx_osx_cocoau_xrc-3.0.dylib |
Yup, I’m on Big Sur 11.2. Apparently wxmac 3.0.5.1 from homebrew does not have some libs like webview. |
Yeah, I’m on 11.2 as well. I’m glad I kept it off my iMac for the time being. I believe the error will not appear in Catalina either.. this issue is exclusive to Big Sur. I hope to get to the bottom of this but in the meantime I’ll need to amend my build instructions to warn it is not Big Sur compatible. |
Hey guys, What do you think? |
That would be nice, I’d be up for testing and input some feedback when I can too. I’m not very technical with the code, since I am just a UI/UX designer. But I can do some testing. As of now, my current choice for emulation is UTM/QEMU, runs on both macOS and iOS, but does not have any 3Dfx emulation like DOSBox-X and PCem. So I keep trying to support both projects, looking forward to the future when I get a M1. I had chosen QEMU because of performance and speed. DOSBox-X now has gotten an improved dynamic core but still has issues with OpenGL on Mac and emulation speed. PCem, on the other hand, is slower but that can be improved too. I am currently running with a 2013 i7 rMBP “13, with 16GB RAM and 1TB SSD. Probably enough for a “good” performance in PCem. I have plans to get a M1 or any newer AS Mac, when I have the money, or when Intel support drops, whatever comes first, but I am planning to wait until the transition is closer to the end to get one, taking into consideration that the kinks will be ironed out and will be more stable. Then we can also try out the ARM based builds later. |
Regarding wx, I found this in another fork of my project for PCemV15: https://github.com/jamesfreeman959/PCem_macOS/blob/9ef6516e52a72e0b52cd7b8165c24c1d29d8c0b1/macos.patch Might be worth investigating what he also did in addition to that |
@almeath Your code can be compiled on Catalina without any warnings or errors. Seems to work stable; Good work! 👍 |
@brunocastello The fomula for brew for wxmac includes --enable-webview -- a blizzard shall hit me if PCem actually uses that feature... There are two options to fix the issue for you when it's only wxmac being the trouble... https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/wxmac.rb#L44 Take a look at that and install wxmac yourself but without the --enable-webview Or find out the right dependent libraries like the webview ones and install it including the development headers so that the original ./configure call of brew can locate them |
You can rawly copy the file I "wxmac.rb" save it as my-wxmac.rb, remove --enable-webview for example and run: brew install --build-from-source ./my-wxmac.rb Afterwards, try the ./configure of PCem again... :) |
Good to see you back @kyr0 :) Today I have been trying to compile the binary directly in Big Sur and I am encountering a series of errors referring to rand, gettimeofday, malloc, and open/close functions. The errors are similar with PCem 16 and 17 source. I overcome all these errors with various #include additions and edits, but I end up with a binary that crashes immediately upon launch. I would be very interested in achieving a successful compilation directly under Big Sur, as that will be more future proof than work-arounds that rely on compiling in an older version of macOS. I am certainly happy to support a common repo and website. Unlike DOSBox there appears to be a very limited amount of information to support Mac users of PCem. |
Incidentally, I tried removing the reference to webview, reinstalling wxmac under Mojave, and then re-compiling PCem. The resulting executable still produces the following errors (when run in Big Sur): dyld: Library not loaded: /usr/local/opt/wxmac/lib/libwx_osx_cocoau_webview-3.0.dylib |
This is what I see under Big Sur: /Users/almeath/Desktop/PCemV16macOS-master/pcem: |
And under Mojave, where I compiled successfully: /Users/almeath/Desktop/PCemV16/pcem: |
@almeath Okay, can you please try the following?
Then With a lot of luck it will not link in webview in the binary as it is not part of wxwindows anymore then Thus we can find out if the missing lib is the only reason it (probably) segfaults |
Def. better to have it compiling on Big Sur as well. Btw, in 2018 Apple did state that they would remove support for OpenGL from macOS in the future. This would be the end of this platform porting project... But... as it seems, Apple is porting OpenGL to Apple Silicon as well. So @brunocastello chances are good that PCem will run on Apple Silicon too https://developer.apple.com/forums/thread/650427 |
Yeah, you could also install glfw3 and glew with homebrew if they (apple) had fully deprecated it. Not sure if it would be enough. |
I am getting the same results with your ROMS, so we can rule out issues with my ROM set. I also have a similar processor to yours. I am thinking this is potentially related to the macOS version. Unfortunately I left my MacBook Pro with Big Sur at work, so I will not be able to perform tests on a newer macOS tonight. |
How odd.. why would Mojave behave so poor... strange |
Exactly - because it performs so well with v16. There is something it does not like in v17... Perhaps, to make sure there is nothing weird going on with my compilation, can you zip up your main PCem binary and send it here? That would pretty much rule out everything apart from a Mojave-specific issue. |
of course -- you can also |
Maybe it will segfault because the paths of the dylibs linked might be different on your system |
If we can make sure it's Mojave specific, we can just tell people running Mojave to please stick with V16. I guess over time, people will update and can then use V17 as well |
@almeath - with Big Sur I cannot load any machine on V16. Only V17 worked for me. The W98SE machine is also a Socket 7 Shuttle HOT-557, hacked it a bit inside the config file to use 512MB RAM. I'm using these ROMs: https://github.com/BaRRaKudaRain/PCem-ROMs |
Interesting results .. @kyr0 's binary works perfectly. So I can build both v16 and v17 on Mojave without any compilation errors. Yet only v16 runs properly. Something about being built in Catalina (and I presume Big Sur as well) makes the v17 binary function normally within Mojave... I am stumped. |
Just for the sake of completeness, I re-built v17 with both the homebrew wxmac and the modified version, and the results do not vary from the above. |
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1 |
@jamesfreeman959 I cloned over your V15 branch to the orga main branch https://github.com/PCemOnMac/PCemV15macOS |
@almeath 1 major version difference -- difference in the opcode generated may explain the different compilation results |
I think that now that we've got a bunch of things working, it's time for me to split out the DMG packaging scripts and assets and make them work for V17 at least -- and bundle a Catalina-compiled binary that works everywhere |
Yes, very likely .. wow, I think I finally found a compelling reason to upgrade my iMac's OS ;-) .. actually, over the weekend I will put Catalina on an SSD and perform further tests. As you said, it might just be that Mojave users should be advised to stay on v16 (if building from source). |
Another one: We might want to come up with a quick and dirty website so that Mac PCem users end up there and not in the PCem forums to annoy Sarah with Mac-specific issues xD @brunocastello You said you're a designer? :D I can implement the design you come up with as I'm also a frontend developer usually |
That's a great idea.. I am happy to help write up any guides, proof read site content etc. |
I mean, we could just tell people, that a support group for PCem on Mac exists, that those DMG's are available now and how to use the software in general.. etc. :) |
I can take it, but slowly. I'll try to come up with a design. I do mostly with Adobe XD, but I have a legitimate reason to try out Figma since I am working with Figma on my new job this year. |
@brunocastello We use Figma in the company I work for too. It's a good tool I can say so far -- esp. for collaborative work, worth investigating :) |
And lastly, we must decide on how to communicate outside of this 1 issue from PCem 14 :-) |
What are the options for communicating? Something that we all already have installed or an account would be my preference |
Well, I'm on discord as mentioned, but I am not wedded to that. Anything available through a native iOS/android app would be good (but also with a web interface) |
I just created a chatroom -- the cool thing is that you can login directly with your GitHub account, Twitter |
Looks great, has an iOS app too. Will get registered soon as possible. |
If anyone else finds this issue, I was able to get PCemV17macOS working by following the instructions in the README: https://github.com/PCemOnMac/PCemV17macOS |
@carlosgonzalezp nice! Let me know if your binary is a M1 native and if any 3dfx game runs on Windows 98. For a test, try Need For Speed II SE. Both PCem and DOSBox-X devs were trying to find the root of some issues with that. |
Hello Bruno. The binary was compilled by me in my M1 laptop: pcem: Mach-O 64-bit executable arm64 I'll need some time to set-up the Win98 environment with DirectX. I'll try the Jedi Knight II: Academy game, that I have the original CD's and will create full ISO for installing. I'll give you feedback asap. |
Any chance of an update to v17 for macOS? I am interested in trying it on both Intel Mac and M1 Mac*
The text was updated successfully, but these errors were encountered: