PCemOnMac / PCemV14MacOSX

MacOS port of PCem low-level PC hardware emulator PCem V14. Experimental OpenGL 3 port.
GNU General Public License v2.0
32 stars 2 forks source link

Unofficial PCem v14 port for macOS and Mac OS X

If you're a user looking for the Mac OS X build of PCem, click Releases and download the latest release. Please note that atm this is an unofficial build. If you have issues, report those issue here first, not on the official forum. Thanks :)

  1. Download a release (.dmg) here and install via drag & drop
  2. Download ROMS and put them into ~/Library/Application Support/PCem/
  3. Downlaod an old operating system and their respective boot disks:
  4. Download, install and use my Folder to ISO helper to easily transfer files from macOS to DOS/Windows by mounting the ISO as a CD ROM.

Screencast

Please note:

Known issues

Source modifications

There are only two issues with the official v14 release of PCem blocking full Mac OS X support (from my perspective). Both issues have been fixed in this branch (see commits for diff.):

  1. src/cdrom-ioctl-osx.c: An OS X system header file globally defines cycles which conflicts with the globally defined cycles in PCem source code. This branches solution is to lower the priority (locally overwrite) the global system header definition by moving the system header includes below the project header includes. (suggestion: Better prefix all global definitions like PCem_cycles?)

  2. src/wx-sdl2.c:get_pcem_path(): The default path for ROM's etc. should be the users library application support folder. (~/Library/Application Support/PCem/) - therefore this brach implements this.

How to build the app bundle and .dmg installer

You need to install the following libraries: SDL2, wxWidgets 3.x (for Mac OS X), OpenAL. OpenAL is part of the OS X system libraries in OS X 10.13.*, so on this OS, openal-soft isn't necessary to install.

Prerequisites: https://brew.sh

To install these libraries, use brew from the Homebrew project:

brew install wxmac sdl2 openal-soft

Additionally, to create the .dmg installer, we need create-dmg https://github.com/andreyvit/create-dmg:

brew install create-dmg

Then run:

# re-build the configure script based on current system conditions
autoreconf -i

# dependency tracking isn't wanted here
./configure --enable-networking --enable-release-build --disable-dependency-tracking

# permission to execute the shell scripts
chmod +x install-sh macos-make-app-bundle-sh macos-make-app-dmg-sh

# -j4 stands for 4 CPU parallel compilation; 
# for dual core processors, use -j2 etc.
# headerpad_max_install_names makes sure there is space in the binary
# for library names/path names that may differ in length after re-write (see below) 
make -j4 -Wl,headerpad_max_install_names

# Locally 
./macos-make-app-bundle-sh
./macos-make-app-dmg-sh

This creates the PCem executable, the app bundle in macos/build/PCem.app and the packaged, optimized installer PCem.dmg.

How to create the iconset

Use icns-Creator:

icns_creator.sh macos/pcem-icon.png

Thanks

To Sarah Walker for creating PCem and Vashpan and JosepMa (PCem forum) for some initial help.