AXPBox on Mac OS X

Hi Everyone,

Im trying to get AXPBox running on a Mac using Monterey but am having no luck.

I was able to compile it, however SDL and X11 are both not found for the GUI - I have installed X11 and it isnt detected because “x.h” is not found - which seems deprecated.

SDL is now up to SDL2 and does not seem to hold any support.

Has anyone had any luck using AXPBOX emulating an Alpha ES40 on a Modern Mac, and if so, your steps?

Adrian

I did it!
prereqs:

brew install sdl12-compat

patch:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4f66f1b..e935f53 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -116,7 +116,7 @@ check_symbol_exists(_stricmp "string.h" HAVE__STRICMP)
 
 # Features
 check_include_file("pcap.h" HAVE_PCAP)
-check_include_file("SDL/SDL.h" HAVE_SDL)
+set(HAVE_SDL 1)
 check_include_file("X11/X.h" HAVE_X11)
 # Large file support (fopen64 / disk files > 2 GB)
 AXPBOX_TEST_LARGE_FILES(HAVE_LARGE_FILES)

Build command:

cmake . -DCMAKE_C_FLAGS="-I/opt/homebrew/include/ -w" -DCMAKE_CXX_FLAGS="-I/opt/homebrew/include/ -w" -DCMAKE_EXE_LINKER_FLAGS='-L/opt/homebrew/lib'
make -j8
1 Like

ive patched but during “make -j8” I receive

/Users/adrian/axpbox/src/AlphaSim.cpp:37:10: fatal error: ‘SDL/SDL.h’ file not found

I did do the sdl12-compat also…

Its like my SDL isnt in a standard location?

Is it in /opt/homebrew/include?
The cmake command you shoud use is this:

cmake . -DCMAKE_C_FLAGS="-I/opt/homebrew/include/ -w" -DCMAKE_CXX_FLAGS="-I/opt/homebrew/include/ -w" -DCMAKE_EXE_LINKER_FLAGS='-L/opt/homebrew/lib'

Run that in the top level of axpbox.

Only folders in my opt directory are x11 and bin.

I’ve searched my drive for sdl.h and the only instances are in a QEMU download from last year….

Did you install sdl12-compat from homebrew?
If you did, run brew list sdl12-compat.

Yes.

It confirms its installed and running the brew list command shows as follows

Warning: sdl12-compat 1.2.68 is already installed and up-to-date.
To reinstall 1.2.68, run:
brew reinstall sdl12-compat

/usr/local/Cellar/sdl12-compat/1.2.68/bin/sdl-config
/usr/local/Cellar/sdl12-compat/1.2.68/include/SDL/ (33 files)
/usr/local/Cellar/sdl12-compat/1.2.68/lib/libSDL-1.2.0.dylib
/usr/local/Cellar/sdl12-compat/1.2.68/lib/pkgconfig/ (2 files)
/usr/local/Cellar/sdl12-compat/1.2.68/lib/ (2 other files)
/usr/local/Cellar/sdl12-compat/1.2.68/share/aclocal/sdl.m4

Try using

cmake . -DCMAKE_C_FLAGS="-I/usr/local/include/ -w" -DCMAKE_CXX_FLAGS="-I/usr/local/include/ -w" -DCMAKE_EXE_LINKER_FLAGS='-L/usr/local/lib'

Apparently the prefixes for newer and older homebrew installs are different.

Thank you for your help so far - it finally built and could configure with SDL…

However running now I am getting another failure… I have checked and putty is installed in brew.

I downloaded the listed ROM exe from a site and put it in the rom folder as well.

I feel I have missed something really simple and critical here… My brain is just friend from covid and weeks working on TK-50 Tapes.

%GUI-I-INS: Installing sdl module as the ES40 GUI

sys0(tsunami): $Id: System.cpp,v 1.79 2008/06/12 07:29:44 iamcamiel Exp $

%FLS-F-NOREST: Flash could not be restored from rom/flash.rom

sys0(tsunami): $Id: Flash.cpp,v 1.19 2008/03/24 22:11:50 iamcamiel Exp $

dma: $Id: DMA.cpp,v 1.9 2008/04/29 09:24:52 iamcamiel Exp $

pci0.19(ali_usb): $Id: AliM1543C_usb.cpp,v 1.6 2008/03/14 15:30:50 iamcamiel Exp $

%DPR-F-NOREST: DPR could not be restored from rom/dpr.rom

sys0(tsunami): $Id: DPR.cpp,v 1.23 2008/06/12 07:29:44 iamcamiel Exp $

cpu0(ev68cb)(0): $Id: AlphaCPU.cpp,v 1.82 2009/03/16 01:33:27 iamcamiel Exp $

serial0(serial): Waiting for connection on port 21264.

Emulator Failure: Runtime exception: Exec of ‘putty’ failed.

: /Users/adrian/axpbox/src/Serial.cpp, line 616

Stop threads:

Freeing memory in use by system…

Emulator Failure: Runtime exception: Exec of ‘putty’ has failed.

: /Users/adrian/axpbox/src/Serial.cpp, line 621

Stop threads:

is putty on PATH?
(And please use code blocks enclosed in triple backticks for output)

%GUI-I-INS: Installing sdl module as the ES40 GUI
sys0(tsunami): $Id: System.cpp,v 1.79 2008/06/12 07:29:44 iamcamiel Exp $
%FLS-F-NOREST: Flash could not be restored from rom/flash.rom
sys0(tsunami): $Id: Flash.cpp,v 1.19 2008/03/24 22:11:50 iamcamiel Exp $
dma: $Id: DMA.cpp,v 1.9 2008/04/29 09:24:52 iamcamiel Exp $
pci0.19(ali_usb): $Id: AliM1543C_usb.cpp,v 1.6 2008/03/14 15:30:50 iamcamiel Exp $
%DPR-F-NOREST: DPR could not be restored from rom/dpr.rom
sys0(tsunami): $Id: DPR.cpp,v 1.23 2008/06/12 07:29:44 iamcamiel Exp $
cpu0(ev68cb)(0): $Id: AlphaCPU.cpp,v 1.82 2009/03/16 01:33:27 iamcamiel Exp $
serial0(serial): Waiting for connection on port 21264.
Emulator Failure: Runtime exception: Exec of ‘putty’ failed.
: /Users/adrian/axpbox/src/Serial.cpp, line 616
Stop threads:
Freeing memory in use by system…
Emulator Failure: Runtime exception: Exec of ‘putty’ has failed.
: /Users/adrian/axpbox/src/Serial.cpp, line 621
Stop threads:

I installed putty via macports instead of brew and that resolved that issue - it now fires up and then crashes out…

Getting this feedback in term

%GUI-I-INS: Installing sdl module as the ES40 GUI
sys0(tsunami): $Id: System.cpp,v 1.79 2008/06/12 07:29:44 iamcamiel Exp $
%FLS-F-NOREST: Flash could not be restored from rom/flash.rom
sys0(tsunami): $Id: Flash.cpp,v 1.19 2008/03/24 22:11:50 iamcamiel Exp $
dma: $Id: DMA.cpp,v 1.9 2008/04/29 09:24:52 iamcamiel Exp $
pci0.19(ali_usb): $Id: AliM1543C_usb.cpp,v 1.6 2008/03/14 15:30:50 iamcamiel Exp $
%DPR-F-NOREST: DPR could not be restored from rom/dpr.rom
sys0(tsunami): $Id: DPR.cpp,v 1.23 2008/06/12 07:29:44 iamcamiel Exp $
cpu0(ev68cb)(0): $Id: AlphaCPU.cpp,v 1.82 2009/03/16 01:33:27 iamcamiel Exp $
serial0(serial): Waiting for connection on port 21264.
dbus[57416]: Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
serial0(serial): $Id: Serial.cpp,v 1.51 2008/06/03 09:07:56 iamcamiel Exp $
serial1(serial): Waiting for connection on port 21265.
dbus[57418]: Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
serial1(serial): $Id: Serial.cpp,v 1.51 2008/06/03 09:07:56 iamcamiel Exp $
%IDE-I-INIT: New IDE emulator initialized.
pci0.1(cirrus): $Id: Cirrus.cpp,v 1.23 2008/05/31 15:47:09 iamcamiel Exp $
pci0.7(ali): $Id: AliM1543C.cpp,v 1.66 2008/05/31 15:47:07 iamcamiel Exp $
kbc: $Id: Keyboard.cpp,v 1.10 2008/05/31 15:47:09 iamcamiel Exp $
%SYS-I-READROM: Reading decompressed ROM image from rom/decompressed.rom.
%SYM-I-PATCHROM: Patching ROM for speed.
%SYS-I-ROMLOADED: ROM Image loaded successfully!
%DPR-F-NOREST: DPR could not be restored from rom/dpr.rom
sys0(tsunami): $Id: DPR.cpp,v 1.23 2008/06/12 07:29:44 iamcamiel Exp $
Start threads: cpu0 srl0 srl1 ide0 ide1 cirrus ali kbd
*** CPU0 *** STARTING ***
Arbitration 0000000000010000 from CPU 0 (@13e39)... won  0000000800010000
Arbitration clear from CPU 0 (@13f55).
Arbitration 0000000000010000 from CPU 0 (@13351)... won  0000000800010000
Arbitration clear from CPU 0 (@133b9).
Arbitration 0000000000010000 from CPU 0 (@13351)... won  0000000800010000
Arbitration clear from CPU 0 (@133b9).
Arbitration 0000000000010000 from CPU 0 (@13351)... won  0000000800010000
Arbitration clear from CPU 0 (@133b9).
Exception in Cirrus thread: SDL error: Unable to set requested videomode: 640x480: NSWindow drag regions should only be invalidated on the Main Thread!   
: /Users/adrian/axpbox/src/gui/sdl.cpp, line 1123.
Assertion failed: (NSViewIsCurrentlyBuildingLayerTreeForDisplay() != currentlyBuildingLayerTree), function NSViewSetCurrentlyBuildingLayerTreeForDisplay, file NSView.m, line 13477.
Illegal instruction: 4

https://github.com/libsdl-org/SDL/issues/5891

OR
Try changing putting HAVE_SDL back to how it was before (git restore CMakeLists.txt)
and changing HAVE_X11 instead, and then run the same cmake command, to build with x11 instead of SDL.

I’m running this on my intel, and looking at the help thread there doesnt seem to be a result.
Ill try X11

Now im getting

/Users/adrian/axpbox/src/gui/gui_x11.cpp:48:10: fatal error: 'X11/Xatom.h' file not found
#include <X11/Xatom.h>

Xatom.h is not on my machine anywhere… X11 quartz was downloaded and installed recently along with Xcode.

It seems to be provided on macports by https://ports.macports.org/port/xorg-xorgproto/
EDIT: try installing xorgproto from brew.

[  1%] Linking CXX executable axpbox
ld: library not found for -lX11
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [axpbox] Error 1
make[1]: *** [CMakeFiles/axpbox.dir/all] Error 2
make: *** [all] Error 2

Installed - now the make j8 has gone backwards. I feel like such a n00b.

Does /usr/local/lib/libX11.dylib exist?

No, it doesnt.

Ive now run

brew install libx11

and moved that file into the /usr/local/lib/ and now obtain

XAllocColorCells returns error. Maybe your screen does not support a private colormap?   
font 8 wide x 16 high, display depth = 24   
X Error of failed request:  BadAccess (attempt to access private resource denied)
  Major opcode of failed request:  89 (X_StoreColors)
  Serial number of failed request:  12
  Current serial number in output stream:  274

I assume its something to do with the link to the missing file and permissions…

Why not try without GUI?
Would that be sufficient for what you are trying to do?