Graf Zahl wrote:Endianness is a much bigger problem. Especially the ACS code has to be adjusted.
Agreed. Nevertheless, the original question still applies in it's own right:
MartinHowe wrote:Given that the current MAC OS is UNIX with a fancy graphical shell, does that help in any way, given that Randy does have a (buggy at the moment) Linux port of ZDoom? I mean, how architecturally different is Linux to "real" UNIX? For that matter, which flavour of UNIX is MAC OS based on?
What are the other linux-vs-MACUNIX issues involved (i.e., other than endianness)?
Well, after getting PrBoom and PrBoom-Plus working on the Mac, on a whim I've decided to take a look at ZDoom.
And, well, I've gotten about as far as Costja above did. Clearly it's possible to #ifdef out all those __attribute__(section("foo")) directives but, without knowing what exactly the reason is for them, that doesn't seem like a good idea.
I get the idea there's some linker magic being done here. Can anyone tell me what it is, and what kind of work would be involved to get the code working without depending on such tricks?
Mannequin wrote:Holy freakin' crap. This is like... This thread was like... Dead.
Yup, and it turned out that in my own ZDoom port effort, I effectively retraced the steps of the last guy in this thread to try it. So there was no reason to create a new thread for the same issue.
Once upon a time when I had a 350 MHz Pentium II, my link times were approaching five minutes for a release build. I set about finding a way to make the time less inconvenient. This was the solution I found: Let the linker collect together all the information about the different classes in the game. Then I can step through a bunch of consecutive pointers to locate the metadata for every class at runtime. (This is the same way the C++ runtime initializes classes with global scope.) My link times were down to less than a minute again, and I was happy. As an added bonus, the executable's size also shrank by several hundred kilobytes.
If the Mac's binary format really doesn't support custom sections, that's pretty sad. However, "Expected comma after segment-name" suggests that it does indeed support them. After a little googling, I suggest you try replacing __attribute__((section("areg"))) with __attribute__((section("__DATA,areg"))) or __attribute__((section("__DATA,__areg"))). Likewise for the other sections.
On the other hand, you can go back to the sort of code I had before and use a unique global class to build the array at runtime before main.
[17:33] <odafortimexium> oh my god it is running!
[17:33] <Neil> YES
[17:33] <odafortimexium> i have the doom2 title screen
[17:33] <odafortimexium> i'm in map01.
ZDoom on Intel Macintosh is here, albeit without sound. Sound and PPC Mac support to come.
Now to find another reason big enough for me to consider buying a piece of noob computer.
(Okay, it can run Quicktime natively and has some more F keys. And now it can run ZDoom. I think I'll stick with the de facto 100% IBM compatible PC).