VOGONS


Reply 60 of 242, by Bruninho

User metadata
Rank Oldbie
Rank
Oldbie
robertmo wrote on 2020-08-30, 03:57:

i guess it won't hurt if you meanwhile try this
https://discussions.apple.com/thread/8336714

Thank you, I'll read it and see if I can give it a try.

Edit: Still out of luck. Same errors. =(

"Design isn't just what it looks like and feels like. Design is how it works."
JOBS, Steve.
READ: Right to Repair sucks and is illegal!

Reply 62 of 242, by Bruninho

User metadata
Rank Oldbie
Rank
Oldbie
robertmo wrote on 2020-08-30, 05:10:

in the configure log you should have marked if it is still using clang or not

This is what I used:

MacBruno-Pro:~ Bruninho$ ../qemu-4.1.1/configure --cc=gcc-10 --cxx=g++-10 --host-cc=gcc-10 --target-list=i386-softmmu,x86_64-softmmu && make

Then it gave me the same errors as before regarding OpenGL, so I changed it to use -framework OpenGL instead of -lGLX, and tried again... this time, while it were really building with gcc-10, at the end it gave me a different error, about coreaudio.o this time.

"Design isn't just what it looks like and feels like. Design is how it works."
JOBS, Steve.
READ: Right to Repair sucks and is illegal!

Reply 63 of 242, by Bruninho

User metadata
Rank Oldbie
Rank
Oldbie

Anyway, as stated by @kjliew, Grand Prix 4 will not have on QEMU the same performance or get any close to the performance I have on VMware Fusion, so It's a waste of time from my part to try it.

I'll just limit the old games to DOSBox-X on my Mac, and do the same on my iPad Pro with UTM. As for Grand Prix 4, I'm afraid I'll have to take the dust out of my old i7 hackintosh mini, rebuild it to an even more smaller pc case, and install only Windows XP just for that game in particular. It would need my logitech G27 steering wheel/pedals to play anyway, so no point in using my macbook for that game in particular. It's not like if it was a game to play on the go when I'm not at home.

I couldn't care less about the garbage that is Windows 10. I guess that the standard QEMU will suffice for any linux distro as guest. That way I can give the middle finger to VMware/Parallels expensive solutions.

"Design isn't just what it looks like and feels like. Design is how it works."
JOBS, Steve.
READ: Right to Repair sucks and is illegal!

Reply 65 of 242, by kjliew

User metadata
Rank Oldbie
Rank
Oldbie

Can you provide more details steps of how you compiled QEMU 4.11 with clang on macOS without the patch?

If you applied the patch and compiled with clang on macOS with errors, then you should redirect stdout to capture the build log.
From the last step:

$ ../qemu-4.1.1/configure
$ make 2>&1 | tee build.log

Attach the build.log and I will take a look.

Reply 66 of 242, by Bruninho

User metadata
Rank Oldbie
Rank
Oldbie

Sure. I can try again tomorrow after the Belgian F1 GP.

"Design isn't just what it looks like and feels like. Design is how it works."
JOBS, Steve.
READ: Right to Repair sucks and is illegal!

Reply 67 of 242, by Bruninho

User metadata
Rank Oldbie
Rank
Oldbie
kjliew wrote on 2020-08-30, 07:15:

Can you provide more details steps of how you compiled QEMU 4.11 with clang on macOS without the patch?

$ wget https://download.qemu.org/qemu-4.1.1.tar.xz
$ tar xf qemu-4.1.1.tar.xz
$ cd qemu-4.1.1
./configure && make -j3

OK, here's the reports. For the entire process, I am using Apple's clang.

This produced QEMU 4.1.1 binaries which I later tested with a pre-existing OS X Snow Leopard VM I had on UTM. So both 5.1.0 (from homebrew) and 4.1.1 (compiled now) qemu-system-ppc worked OK.

kjliew wrote on 2020-08-30, 07:15:
If you applied the patch and compiled with clang on macOS with errors, then you should redirect stdout to capture the build log. […]
Show full quote

If you applied the patch and compiled with clang on macOS with errors, then you should redirect stdout to capture the build log.
From the last step:

$ ../qemu-4.1.1/configure
$ make 2>&1 | tee build.log

Attach the build.log and I will take a look.

Here, I'm now following the instructions on the github page and using QEMU 4.1.1 to patch.

Without modifying the -lGLX to -framework OpenGL inside configure, it didn't even started so there was no build.log to show. The error was:

ERROR: sizeof(size_t) doesn't match GLIB_SIZEOF_SIZE_T.
You probably need to set PKG_CONFIG_LIBDIR
to point to the right pkg-config files for your
build target

Setting PKG_CONFIG_LIBDIR did not solve it at all in previous posts, so I investigated and apparently I had to change -lGLX to -framework OpenGL.

Then I did the change and it started to build but later it failed on me. Attached is the build.log with the errors which failed:

Worth mentioning that a second attempt targeting only i386 and x86_64 still produces the same kind of error.

Attachments

"Design isn't just what it looks like and feels like. Design is how it works."
JOBS, Steve.
READ: Right to Repair sucks and is illegal!

Reply 68 of 242, by kjliew

User metadata
Rank Oldbie
Rank
Oldbie

I think I found the issue. Just to be sure, can you please attach the the following files from macOS build?

config-host.mak
config-host.h

They are generated by QEMU from in the same folder that you run configure && make.
I think I missed out some of the platform stuffs handling for macOS.

Reply 69 of 242, by Bruninho

User metadata
Rank Oldbie
Rank
Oldbie
kjliew wrote on 2020-08-30, 20:20:
I think I found the issue. Just to be sure, can you please attach the the following files from macOS build? […]
Show full quote

I think I found the issue. Just to be sure, can you please attach the the following files from macOS build?

config-host.mak
config-host.h

They are generated by QEMU from in the same folder that you run configure && make.
I think I missed out some of the platform stuffs handling for macOS.

You mean the ones from the QEMU 4.1.1 compiled with or without your patch?

EDIT: I've attached both. These are from the second attempt earlier - the ones for x86_64 and i386 targets only.

Attachments

  • Filename
    Archive-origin.zip
    File size
    3.6 KiB
    Downloads
    41 downloads
    File comment
    QEMU 4.1.1 without the patch
    File license
    CC-BY-4.0
  • Filename
    Archive.zip
    File size
    3.62 KiB
    Downloads
    39 downloads
    File comment
    QEMU 4.1.1 with the patch + change to -framework OpenGL
    File license
    CC-BY-4.0

"Design isn't just what it looks like and feels like. Design is how it works."
JOBS, Steve.
READ: Right to Repair sucks and is illegal!

Reply 71 of 242, by Bruninho

User metadata
Rank Oldbie
Rank
Oldbie
kjliew wrote on 2020-08-30, 21:34:
Thanks, one more file for SDL2 platform stuffs […]
Show full quote

Thanks, one more file for SDL2 platform stuffs

SDL2_config.h

That file does not exist in both patched and non-patched.

Last edited by Bruninho on 2020-08-30, 21:54. Edited 1 time in total.

"Design isn't just what it looks like and feels like. Design is how it works."
JOBS, Steve.
READ: Right to Repair sucks and is illegal!

Reply 72 of 242, by kjliew

User metadata
Rank Oldbie
Rank
Oldbie

This file is not part of QEMU, it is part of your build environment libraries. For Linux, it is typically in /usr/include/SDL2 or /usr/local/include/SDL2. You have to figure it out on macOS for homebrew or MacPort.
And, you need to disable Apple COCOA and enable SDL2 for QEMU.

--disable-cocoa --enable-sdl

Glide and MESA GL pass-through plumbing into QEMU UI handling only work for SDL/SDL2. Platform specific native display libraries (such as gtk, cocoa etc.) are not supported.
When QEMU configure script finished, it displayed a summary of configured features and libraries. Please attach that.

Reply 73 of 242, by Bruninho

User metadata
Rank Oldbie
Rank
Oldbie
kjliew wrote on 2020-08-30, 21:53:
This file is not part of QEMU, it is part of your build environment libraries. For Linux, it is typically in /usr/include/SDL2 o […]
Show full quote

This file is not part of QEMU, it is part of your build environment libraries. For Linux, it is typically in /usr/include/SDL2 or /usr/local/include/SDL2. You have to figure it out on macOS for homebrew or MacPort.
And, you need to disable Apple COCOA and enable SDL2 for QEMU.

--disable-cocoa --enable-sdl

Glide and MESA GL pass-through plumbing into QEMU UI handling only work for SDL/SDL2. Platform specific native display libraries (such as gtk, cocoa etc.) are not supported.

Okay, Give me some minutes to find it out

EDIT: Found it inside /usr/local/Cellar/sdl2/2.0.12_1/include/SDL2 for the homebrew version.

I also happen to have DOSBox-X, I've built both SDL1 and SDL2 versions yesterday, so for sure I have SDL2...

kjliew wrote on 2020-08-30, 21:53:

When QEMU configure script finished, it displayed a summary of configured features and libraries. Please attach that.

You mean this?

MacBruno-Pro:build Bruninho$ ../qemu-4.1.1/configure --target-list=i386-softmmu,x86_64-softmmu && make -j3
Install prefix /usr/local
BIOS directory /usr/local/share/qemu
firmware path /usr/local/share/qemu-firmware
binary directory /usr/local/bin
library directory /usr/local/lib
module directory /usr/local/lib/qemu
libexec directory /usr/local/libexec
include directory /usr/local/include
config directory /usr/local/etc
local state directory /usr/local/var
Manual directory /usr/local/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path /Users/Bruninho/myqemu/qemu-3dfx/qemu-4.1.1
GIT binary git
GIT submodules
C compiler cc
Host C compiler cc
C++ compiler c++
Objective-C compiler clang
ARFLAGS rv
CFLAGS -O2 -g
QEMU_CFLAGS -I/usr/local/Cellar/pixman/0.40.0/include/pixman-1 -I$(SRC_PATH)/dtc/libfdt -I/usr/local/Cellar/glib/2.64.5/include -I/usr/local/Cellar/glib/2.64.5/include/glib-2.0 -I/usr/local/Cellar/glib/2.64.5/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/pcre/8.44/include -m64 -mcx16 -DOS_OBJECT_USE_OBJC=0 -arch x86_64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wno-string-plus-int -Wno-typedef-redefinition -Wno-initializer-overrides -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/local/Cellar/gnutls/3.6.14/include -I/usr/local/Cellar/nettle/3.6/include -I/usr/local/Cellar/libtasn1/4.16.0/include -I/usr/local/Cellar/libidn2/2.3.0/include -I/usr/local/Cellar/p11-kit/0.23.20_1/include/p11-kit-1 -I/usr/local/Cellar/nettle/3.6/include -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -I$(SRC_PATH)/capstone/include
LDFLAGS -framework Hypervisor -m64 -framework CoreFoundation -framework IOKit -arch x86_64 -g
QEMU_LDFLAGS -L$(BUILD_DIR)/dtc/libfdt
make make
install install
python python3 -B (3.8.5)
slirp support internal
smbd /usr/sbin/smbd
module support no
host CPU x86_64
host big endian no
target list i386-softmmu x86_64-softmmu
gprof enabled no
sparse enabled no
strip binaries yes
profiler no
static build no
Cocoa support yes
SDL support no
SDL image support no
GTK support no
GTK GL support no
VTE support no
TLS priority NORMAL
GNUTLS support yes
libgcrypt no
nettle yes (3.6)
libtasn1 yes
PAM yes
iconv support yes
curses support no
virgl support no
curl support yes
mingw32 support no
Audio drivers coreaudio
Block whitelist (rw)
Block whitelist (ro)
VirtFS support no
Show last 92 lines
Multipath support no
VNC support yes
VNC SASL support yes
VNC JPEG support yes
VNC PNG support yes
xen support no
brlapi support no
bluez support no
Documentation no
PIE no
vde support yes
netmap support no
Linux AIO support no
ATTR/XATTR support no
Install blobs yes
KVM support no
HAX support yes
HVF support yes
WHPX support no
TCG support yes
TCG debug enabled no
TCG interpreter no
malloc trim support no
RDMA support no
PVRDMA support no
fdt support git
membarrier no
preadv support no
fdatasync no
madvise yes
posix_madvise yes
posix_memalign yes
libcap-ng support no
vhost-net support yes
vhost-crypto support yes
vhost-scsi support no
vhost-vsock support no
vhost-user support yes
Trace backends log
spice support no
rbd support no
xfsctl support no
smartcard support no
libusb yes
usb net redir no
OpenGL support no
OpenGL dmabufs no
libiscsi support no
libnfs support no
build guest agent yes
QGA VSS support no
QGA w32 disk info no
QGA MSI support no
seccomp support no
coroutine backend sigaltstack
coroutine pool yes
debug stack usage no
mutex debugging no
crypto afalg no
GlusterFS support no
gcov gcov
gcov enabled no
TPM support yes
libssh support yes
QOM debugging yes
Live block migration yes
lzo support yes
snappy support yes
bzip2 support yes
lzfse support no
NUMA host support no
libxml2 yes
tcmalloc support no
jemalloc support no
avx2 optimization no
replication support yes
VxHS block device no
bochs support yes
cloop support yes
dmg support yes
qcow v1 support yes
vdi support yes
vvfat support yes
qed support yes
parallels support yes
sheepdog support yes
capstone internal
docker no
libpmem support no
libudev no
default devices yes

Attachments

"Design isn't just what it looks like and feels like. Design is how it works."
JOBS, Steve.
READ: Right to Repair sucks and is illegal!

Reply 74 of 242, by kjliew

User metadata
Rank Oldbie
Rank
Oldbie

Alright, this is going to be complicated, unfortunately. I was looking for an easier path to use GLX/X11 on macOS, but this was not as simple as I thought. This was a deprecated, unfavoured approach and Apple had since freezed the time for anyone trying to do that, by capping the OpenGL at 2.1. To do this anyway, AFAIK you will need XQuartz (X.Org server) and SDL2 with X11 support by recompiling it with "--with-x=yes", in addition to Apple/Cocoa native UI library. When I inspected the SDL_config.h, it only supports Cocoa and no X11. Not surprising for something that was part of planned obsolesce. And I presume the performance will not be as good as what being supported on Windows and Linux.

So the correct way to support macOS is to add OpenGL context creation through Cocoa/NSOpenGL. Since I am not an Apple developer, this will be quite challenging to pull this out without accessing to systems with macOS. So I think I will just drop macOS support . Hopefully, someone more adept at macOS software development will be able to contribute the codes in future.

Reply 75 of 242, by Bruninho

User metadata
Rank Oldbie
Rank
Oldbie

So, thats bad news for me then...

I’m guessing that I will have to move forward with plan B... leave more modern games like GP4 to a small pc box with XP and move the older ones to DosBox-X or PCem on my mac for gaming on the go. Hopefully I can get FIFA 98 with proper 3dfx in one of these emulation options.

I was betting on QEMU as an all in one solution for both future arm macs and my iPad Pro (with UTM). Doesn’t look like DosBox-X and DosPad devs will work together to bring the dosbox-x features to on iOS, despite the fact that I have talked to both and both seemed to be receptive to the idea. Dospad hasn’t been updated in years and is way behind latest dosbox svn version.

I can play Fifa98 on UTM with win98se vm, but its software rendered instead of 3dfx, so graphics are a bit worse and playable & not so slow as I expected it to be. Let’s see what I can do now...

"Design isn't just what it looks like and feels like. Design is how it works."
JOBS, Steve.
READ: Right to Repair sucks and is illegal!

Reply 76 of 242, by Bruninho

User metadata
Rank Oldbie
Rank
Oldbie

Updating...

I spent a couple of hours setting up a win98se machine on dosbox-x. While it was working well and had 3dfx/voodoo, the machine performance was worse than its QEMU counterpart. I haven’t tested any game but the overall feel was that it was a bit slower. Much slower.

I have a feeling that PCem will not be any better.

Meanwhile, I copied the win98se machine I had on my iPad Pro running in UTM to my mac and put it to test with QEMU 5.1.0 (latest UTM uses 4.2.0). I had the impression that on my mac the speed was practically the same. That is, a 2nd gen iPad Pro (2017) vs my 2013 second hand i7 rMBP did the same task with same performance. I wonder if the 2020 iPad Pro is slightly faster.

In my win98se qemu vm, fifa 99 runs slightly faster than fifa 98, which is feeling almost like a stop motion game - I must double check if I am not missing any setting. GP3 also struggles a bit.

Lets see if I can get qemu patched in a linux distro...

"Design isn't just what it looks like and feels like. Design is how it works."
JOBS, Steve.
READ: Right to Repair sucks and is illegal!

Reply 78 of 242, by Bruninho

User metadata
Rank Oldbie
Rank
Oldbie
robertmo wrote on 2020-09-01, 00:50:

i guess on mac pro you should be able to use
qemu.exe -accel hvf

Yup, I did it for XP last weekend. But a QEMU machine without Direct3D will not work. HVF does not work for 98SE vm, it crashes before loading the OS. HVF does work for XP and 7 but still no D3D. I never managed to do W10 and I don’t really care about that terrible version of Windows with telemetry and data collection buried inside...

Hence why I tested dosbox-x, it had 3dfx/voodoo, I did a stellar install without much hassle for 9x, but even before installing any game I felt it was slower than qemu, because I loaded Netscape 9.0.0.6 to download some drivers and it took ages to load. On my vmware version, same OS and same browser, its faster, much faster.

I don’t know what to do next.

"Design isn't just what it looks like and feels like. Design is how it works."
JOBS, Steve.
READ: Right to Repair sucks and is illegal!

Reply 79 of 242, by Bruninho

User metadata
Rank Oldbie
Rank
Oldbie

To @kjliew: I know you will be thinking about dropping macOS Support (God help us) but here's some food for thought to consider in the future. I found it inside the Apple Developer Documentation regarding porting macOS apps to Apple Silicon:

If your app uses Metal, OpenGL, or OpenCL, be aware of the following differences:
The GPU and CPU on Apple silicon share memory.
OpenGL is deprecated, but is available on Apple silicon.
OpenCL is deprecated, but is available on Apple silicon when targeting the GPU. The OpenCL CPU device is not available to arm64 apps.

"Design isn't just what it looks like and feels like. Design is how it works."
JOBS, Steve.
READ: Right to Repair sucks and is illegal!