printz Posted April 10, 2020 It seems Doom 3 is no longer on the Mac App Store. I think I even had to delete it since the latest macOS update (and the developers didn't care to update it to work). Is there any macOS source port of Doom 3? Any way to legally retrieve the official resources into my Mac and load them with such a source port? 0 Quote Share this post Link to post
G-Raps Posted July 12, 2020 That can be arranged, but I would have to study the macos file system and make some judgement calls. Also, I would be interested in source porting to Linux, so a compromise would be made for using dosbox or wine. Would that work ? 0 Quote Share this post Link to post
printz Posted July 12, 2020 (edited) I tried the Dhewm3 source port, which is cross-platform, but doesn't have readily made macOS builds yet. I successfully compiled it with Xcode, but my Mac is a laptop with Retina Display, but Dhewm3 is not prepared to handle that, and it may also be ill-equipped to handle fullscreen, so I get a tiny display in the lower-left corner, which is unplayable. So yeah, I'm still looking for solutions. I actually spent a day trying to fix Dhewm3 on Mac by myself, but failed. I would either get a tiny display in the lower-left corner, or a full resolution fullscreen, which is too high resolution to be smooth (2880x1800 unscaled). Edited July 12, 2020 by printz 0 Quote Share this post Link to post
Loud Silence Posted July 12, 2020 1 second in google have lead me to this. https://www.macgamestore.com/product/2156/DOOM-3/ 0 Quote Share this post Link to post
MFG38 Posted July 13, 2020 As far as I remember, there was an official MacOS port of Doom 3 released in early 2005, boxed copy and all. Might be worth looking for one of those, provided it isn't ludicrously expensive on the second-hand market. 0 Quote Share this post Link to post
printz Posted July 13, 2020 14 hours ago, Loud Silence said: 1 second in google have lead me to this. https://www.macgamestore.com/product/2156/DOOM-3/ That one has no 64-bit support, so it won't work. Also, I already have Doom 3, I even already bought Doom 3 on the Mac App Store while it was still runnable. I'm only looking for a source port if any. I figured out how to copy the game files neatly. 0 Quote Share this post Link to post
G-Raps Posted July 14, 2020 The Steam version is an i386 source port. Which means that it was a 32-bit version, for Steam's 64-bit audience. That's probably why id software stopped porting it for 64-bit linux, as the code was still in 32-bit land. So, what's it going to be ? Work on the 32-bit version for 32-bit operating systems ? OR, work on the 32-bit binary to continue working in a 64-bit operating system ? I bought the Steam version for $4.99. 0 Quote Share this post Link to post
G-Raps Posted July 14, 2020 (edited) Here's the compromise between linux and macos: objdump and strace ! One can find out a lot about the binary by using both tools effectively, and here's some of the output: objdump: Doom3.exe: file format pei-i386 Disassembly of section .text: 00401000 <.text>: 401000: 83 ec 08 sub $0x8,%esp 401003: 56 push %esi 401004: 33 f6 xor %esi,%esi 401006: ff 15 70 b2 74 00 call *0x74b270 40100c: 6a 07 push $0x7 40100e: 8d 4c 24 08 lea 0x8(%esp),%ecx 401012: 51 push %ecx 401013: 68 04 10 00 00 push $0x1004 401018: 50 push %eax 401019: ff 15 6c b2 74 00 call *0x74b26c 40101f: 85 c0 test %eax,%eax 401021: 74 22 je 0x401045 ... strace: execve("./Doom3.exe", ["./Doom3.exe"], 0x7ffd97fc1100 /* 41 vars */) = 0 brk(NULL) = 0x560dafa0a000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=127882, ...}) = 0 mmap(NULL, 127882, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f2de07af000 close(3) = 0 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260A\2\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=1824496, ...}) = 0 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2de07ad000 mmap(NULL, 1837056, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f2de05ec000 mprotect(0x7f2de060e000, 1658880, PROT_NONE) = 0 mmap(0x7f2de060e000, 1343488, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x22000) = 0x7f2de060e000 mmap(0x7f2de0756000, 311296, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16a000) = 0x7f2de0756000 mmap(0x7f2de07a3000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b6000) = 0x7f2de07a3000 mmap(0x7f2de07a9000, 14336, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f2de07a9000 close(3) = 0 ... faccessat(AT_FDCWD, "/usr/lib/wine/wine", X_OK) = 0 execve("/usr/lib/wine/wine", ["/usr/lib/wine/wine", "./Doom3.exe"], 0x560dafa0ab88 /* 42 vars */) = 0 brk(NULL) = 0x7d379000 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf7fb8000 readlink("/proc/self/exe", "/usr/lib/wine/wine", 4096) = 18 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/lib/wine/../i386-linux-gnu/wine/tls/i686/sse2/libwine.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (N o such file or directory) stat64("/usr/lib/wine/../i386-linux-gnu/wine/tls/i686/sse2", 0xffd5bab0) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/lib/wine/../i386-linux-gnu/wine/tls/i686/libwine.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No suc h file or directory) ... So this dump of the Doom3.exe binary reveals a lot about how the game works in a 64-bit processor. All one has to do, is hook into the interrupts and watch the call stacks, and then the game will load up to work in 64-bit land, most likely for Core i-series processors and AMD 3DNow chips. Full objdump of Doom3.exe: http://grapster.us/Doom3/dump.txt Full strace of Doom3.exe: http://grapster.us/Doom3/straceout.txt Edited July 14, 2020 by G-Raps 0 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.