Macs and Doom

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
User avatar
MartinHowe
Posts: 2096
Joined: Mon Aug 11, 2003 1:50 pm
Preferred Pronouns: He/Him
Location: East Suffolk (UK)

Post by MartinHowe »

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)?
chemicaes
Posts: 12
Joined: Sat Feb 26, 2005 11:58 am

Post by chemicaes »

cutmanmike wrote:Reminds me of snes doom.....
Jag wolf3d - sprites looked awesome ! only front, but awesome
Neil
Posts: 28
Joined: Sat Sep 16, 2006 2:34 pm
Location: California

Post by Neil »

Hello,

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?

thanks,
User avatar
Mannequin
Posts: 441
Joined: Tue Jul 15, 2003 8:21 pm
Location: On The Lonely Island somewhere.

Post by Mannequin »

Holy freakin' crap. This is like... This thread was like... Dead.

-M.
Neil
Posts: 28
Joined: Sat Sep 16, 2006 2:34 pm
Location: California

Post by Neil »

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.
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

Post by randi »

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.
Neil
Posts: 28
Joined: Sat Sep 16, 2006 2:34 pm
Location: California

Post by Neil »

Good call. I went in and did that and... well, suddenly it's a matter of making the usual little fixes to get things compiling.

Thank you very much,
Neil
Posts: 28
Joined: Sat Sep 16, 2006 2:34 pm
Location: California

Post by Neil »

We have lift off.
[17:33] <odafortimexium> oh my god it is running!
[17:33] <Neil> YES
[17:33] <odafortimexium> i have the doom2 title screen :D
[17:33] <odafortimexium> i'm in map01.
ZDoom on Intel Macintosh is here, albeit without sound. Sound and PPC Mac support to come.
User avatar
esselfortium
Posts: 3862
Joined: Tue Sep 19, 2006 8:43 pm
Contact:

Post by esselfortium »

Image

<3
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

Post by randi »

Awesomeness. (I guess Intel Macs are another reason for me to upgrade to FMOD Ex.)
User avatar
Nash
 
 
Posts: 17506
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Post by Nash »

Good job, Neil. Eventhough I don't own a Mac, I'm just simply astonished at the fact that we now have another OS that ZDoom will run on.
Hobbs
Posts: 212
Joined: Mon Jul 11, 2005 3:41 pm

Post by Hobbs »

Awesome. Since at some point I am getting a MacBook (pro possibly) this actually affects me. gj Neil.
User avatar
jallamann
Posts: 2271
Joined: Mon May 24, 2004 8:25 am
Location: Ålesund, Norway
Contact:

Post by jallamann »

Hooray.

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).

Good job nevertheless!
Hobbs
Posts: 212
Joined: Mon Jul 11, 2005 3:41 pm

Post by Hobbs »

You realize that x86 macs are pretty damn nearly IBM compatable right?
User avatar
TheDarkArchon
Posts: 7656
Joined: Sat Aug 07, 2004 5:14 am
Location: Some cold place

Post by TheDarkArchon »

Come on, jalla, haven't you realised yet that Quicktime is an overpriced piece of ass? ;)
Post Reply

Return to “General”