Quake3World.com
https://www.quake3world.com/forum/

intel inside macs
https://www.quake3world.com/forum/viewtopic.php?f=15&t=16606
Page 1 of 2

Author:  S@M [ 02-02-2006 02:28 AM ]
Post subject:  intel inside macs

I have not read much about these, is there any info on how an older game like q3 will play?

Author:  NCG_Mike [ 02-02-2006 09:34 AM ]
Post subject: 

We've got an iMac at work and it's much quicker than my dual 2Ghz G5.

If you compiled Q3 and turned on smp, it'd fly.

Author:  Canis [ 02-02-2006 10:56 AM ]
Post subject: 

Compiled? If you download the source into Xcode and hit compile it will just work on the intel machine?

Author:  NCG_Mike [ 02-02-2006 01:11 PM ]
Post subject: 

If you turn on compilation for Intel I'd imagine so. Not tried it to be honest and it'd be worth searching for Mac specific code to give it a quick check (reading binary files or network I/O come to mind).

Author:  S@M [ 02-02-2006 02:12 PM ]
Post subject: 

Woah, it sounds like your going to do this....Mike?

Author:  NCG_Mike [ 02-03-2006 09:10 AM ]
Post subject: 

I downloaded the sources from http://icculus.org/quake3/ and got it working on my PowerBook after editing the makefile for the following:

- G4 instructions
- G5 scheduling
- -Os instead of -O3
- loop alignment at 32 for the benefit of G5 machines
- -framework SDL instead of the dylib

Here's the diff between the two makefiles:
Code:
pbg4:~/dev/quake3 mdavis$ svn diff Makefile
Index: Makefile
===================================================================
--- Makefile    (revision 531)
+++ Makefile    (working copy)
@@ -282,10 +282,10 @@
     GL_CFLAGS =
   endif

-  OPTIMIZE = -O3 -ffast-math -falign-loops=16
+  OPTIMIZE = -Os -ffast-math -falign-loops=32

   ifeq ($(ARCH),ppc)
-  BASE_CFLAGS += -faltivec
+  BASE_CFLAGS += -faltivec -mcpu=G4 -mtune=G5
     ifneq ($(VM_PPC),)
       HAVE_VM_COMPILED=true
     endif
@@ -318,7 +318,7 @@
     #  the file has been modified by each build.
     LIBSDLMAIN=$(B)/libSDLmain.a
     LIBSDLMAINSRC=$(LIBSDIR)/macosx/libSDLmain.a
-    CLIENT_LDFLAGS=-framework Cocoa -framework OpenGL $(LIBSDIR)/macosx/libSDL-1.2.0.dylib
+    CLIENT_LDFLAGS=-framework Cocoa -framework OpenGL -framework SDL
   else
     # !!! FIXME: frameworks: OpenGL, Carbon, etc...
     #CLIENT_LDFLAGS=-L/usr/X11R6/$(LIB) -lX11 -lXext -lXxf86dga -lXxf86vm


If I built Quake 3 the default way, it'd crash on a call to openal during the demo. Dunno why and I didn't look into it.

I used timedemo 1 and the standard demo at 640x480 on a 1.33Ghz G4 PowerBook (768MB RAM) and got 77.6 fps. That's slower than the standard G4 one on the same machine (109fps). I'll fiddle with the optimisations to favour the PowerBook as they favour a G5 right now. There's also a SMP version which I've not tried.

One thing I noticed is that baseq3 has to be in "~/Library/Application Support/Quake3".

Author:  NCG_Mike [ 02-04-2006 09:38 AM ]
Post subject: 

Got it working on Intel...

http://homepage.mac.com/only_mortal/scr ... X-i386.jpg

Took a few hours, most of which was compiling SDL and Q3A.

Author:  S@M [ 02-04-2006 07:40 PM ]
Post subject: 

nice work,
did it feel slower or about the same? you noticed and fps drop, any other issues?
Is it a problem with copyright etc? to do this

Author:  Canis [ 02-04-2006 09:22 PM ]
Post subject: 

Yeah! Benchmark it with respect to the PPC version! :)

...unless you're not using a production intel mac.

Author:  S@M [ 02-06-2006 02:25 AM ]
Post subject: 

so older games like q3, wolfie etc wont play on an intel mac unless compiled?

THAT SUCS

Author:  Canis [ 02-06-2006 02:30 AM ]
Post subject: 

I think they'll play, just not well, because the rosetta translator will bottleneck performance. They've got benchmarks of various ppc games running on intel, and they're roughly 1/3 the performance.

Author:  S@M [ 02-06-2006 02:47 AM ]
Post subject: 

I dont know what to do then, I want a new computer, want to stay mac, want to play q3 for ever, and want to play bf2 etc as well. grrrr. cant have 2 computers,

Author:  NCG_Mike [ 02-06-2006 10:24 AM ]
Post subject: 

I couldn't get near the iMac today as someone's using it.

Author:  dzjepp [ 02-06-2006 07:51 PM ]
Post subject: 

You can't play online with a modified exe can you (checksum will differ from original), and 1.32 punkbuster won't allow it, as well as sv_pure 1. :paranoid:

*runs away from mac disc. where he dosen't belong*

Author:  S@M [ 02-06-2006 08:48 PM ]
Post subject: 

If I cant play q3 on it, I am NOT getting a mac, end of story. But obviously a very sad ending :(

dzj, u belong everywhere dont worry bout that!

Author:  dzjepp [ 02-06-2006 08:51 PM ]
Post subject: 

So basically it has problems working on intel macs?

Author:  S@M [ 02-06-2006 08:57 PM ]
Post subject: 

Not sure... Mike had to compile it to get it working and then it was average...
come back Mike....

Author:  Canis [ 02-06-2006 11:03 PM ]
Post subject: 

dzjepp wrote:
You can't play online with a modified exe can you (checksum will differ from original), and 1.32 punkbuster won't allow it, as well as sv_pure 1. :paranoid:

*runs away from mac disc. where he dosen't belong*


I'm not sure. I'd expect it at least has the potential to be fine.

Author:  NCG_Mike [ 02-07-2006 01:06 PM ]
Post subject: 

It's slower than the original version but I'm not sure that matters too much unless you're sub-PowerBook level.

There's a SMP version of the binary which I can compile. I've not ran that yet as the Intel box I have around is the DTK. This will probably be fine on the iMac with its dual core CPU.

Author:  NCG_Mike [ 02-07-2006 01:10 PM ]
Post subject: 

I'm pretty sure it'll work on-line, though obviously not on Punk Buster servers. There's also a dedicated server that ships with the sources.

Author:  S@M [ 02-07-2006 02:00 PM ]
Post subject: 

thats a shame, most of the servers left in Australia are pb servers, even private ones tend to have pb.

fark!! :(

Author:  Canis [ 02-07-2006 02:02 PM ]
Post subject: 

How well does it run under Rosetta?

Author:  S@M [ 02-07-2006 02:08 PM ]
Post subject: 

just came across this website:
http://wiki.osx86project.org/wiki/index.php/PPC_Games

suggests q3 should run okay, but does not mention pb related issues or if the networking was public multiplayer or lan....
another suggestion from a diff forum:
http://wiki.osx86project.org/wiki/index.php/Darwine
using Darwine which is a form of wine (of course I have nfi about these) but are they reasonable options? Something the community could do?

Author:  NCG_Mike [ 02-08-2006 09:57 AM ]
Post subject: 

Okay, I got near the iMac for an hour today and built a universal binary with XCode 2.2 (GCC 4) and some optimizations specific for each processor (Altivec and SSE3) along with -Os code optimization.

The test was at 640x480 in a window with sound at low quality (to avoid an OpenAL crash). I ran a timedemo on the default demo twice and took a screen shot of the final results. Note that it seems to be using a software renderer for audio...

The machine specs were:

- 20" iMac dual core with 512MB of RAM (as supplied by Apple)
- 2Ghz dual G5 with 1.5GB of RAM

Both have the latest OS installed.

http://homepage.mac.com/only_mortal/scr ... Q3I386.jpg
http://homepage.mac.com/only_mortal/scr ... /Q3PPC.jpg

Note the Intel based system is quite a bit faster!

Author:  S@M [ 02-08-2006 11:34 PM ]
Post subject: 

woah, thats a good improvement. I guess there is no question of it being legit on pb servers though.

What is going to happen to games like wolfenstein that were brought out for mac, theyre not likely to produce intel optimised versions are they.... :(

I guess teh next edition would be tho....

Author:  a2daj2 [ 02-09-2006 08:36 PM ]
Post subject: 

One thing I've noticed since I've been messing with the icculus.org Quake3 code is that somewhere between build 416 and 456 performance took a huge nose dive. It may be when they disabled the PPC JIT compiler. I have a dual 2.5 G5 and I ran benchmarks with the following settings:

Maxed settings
1024x768
r_smp 0 (the binary I used only supports single proc mode)
demo four
unmodified makefiles. I just ran make.

Here are the results of comparing the two builds mentioned above:

416 275 fps
456 160 fps

That's a pretty big drop in performance for the PPC version.

Author:  S@M [ 02-10-2006 01:42 AM ]
Post subject: 

are you "exterm" in another forum a2daj2?

Author:  NCG_Mike [ 02-10-2006 09:41 AM ]
Post subject: 

a2daj2 wrote:
One thing I've noticed since I've been messing with the icculus.org Quake3 code is that somewhere between build 416 and 456 performance took a huge nose dive. It may be when they disabled the PPC JIT compiler. I have a dual 2.5 G5 and I ran benchmarks with the following settings:

Maxed settings
1024x768
r_smp 0 (the binary I used only supports single proc mode)
demo four
unmodified makefiles. I just ran make.

Here are the results of comparing the two builds mentioned above:

416 275 fps
456 160 fps

That's a pretty big drop in performance for the PPC version.

Yeah, that's dramatic to say the least. I noticed something commented out in the makefile regarding the quake vm thing.

I'll try the smp version when I get a chance but I'm snowed under at work as I have to make a software release on the 20th and I've had an Apple evangelist over this week which didn't help my schedule.

Author:  NCG_Mike [ 02-10-2006 09:49 AM ]
Post subject: 

riddla wrote:
id & evenbalance should be notified of your efforts Mike, this is quality

It's just a case of compiling the sources on a PowerPC Mac, copying the results over to an Intel Mac, compiling there and running "lipo" on the two binaries to make a Universal Binary.

The SDL framework has a XCode project so you just need to turn on "i386" in the target to get XCode to do all the work for you. Build the .a and the framework. The .a is used by the q3 makefile and the framework just needs to be put in the application wrapper (Contents/Frameworks).

OpenAL ships on the Mac so I just linked with that. Had to turn audio settings to low to avoid an OpenAL crash.

Author:  a2daj2 [ 02-10-2006 09:56 AM ]
Post subject: 

S@M wrote:
are you "exterm" in another forum a2daj2?


Nope. Last time I checked I usually go by a2daj. But I'm waiting for that account to be reactivated on these forums.

Author:  a2daj2 [ 02-10-2006 10:02 AM ]
Post subject: 

NCG_Mike wrote:
Yeah, that's dramatic to say the least. I noticed something commented out in the makefile regarding the quake vm thing.

I'll try the smp version when I get a chance but I'm snowed under at work as I have to make a software release on the 20th and I've had an Apple evangelist over this week which didn't help my schedule.


When they finally reimplemented SMP support for Macs after I brought it up (they originally had no plans on supporting SMP for any platform since most ddn't have Macs and didn't know it was the only platform to see performance increases with it enabled) SMP performance wasn't as good as the Mac specific code. It was about 10-15% slower. Not enough to make a big deal about it. After the performance drop, the SMP build was about as fast as the old single proc performance. Apparently, the PPC QVM interpreter eats up a significant amount of CPU time compared to the x86 version. So disabling the JIT compiler really hurts performance.

Author:  Canis [ 02-10-2006 10:11 AM ]
Post subject: 

You brought it up and they implemented it? Can you be persuasive to them to fix the doppler sound bug?

Author:  NCG_Mike [ 02-10-2006 10:17 AM ]
Post subject: 

a2daj2 wrote:
NCG_Mike wrote:
Yeah, that's dramatic to say the least. I noticed something commented out in the makefile regarding the quake vm thing.

I'll try the smp version when I get a chance but I'm snowed under at work as I have to make a software release on the 20th and I've had an Apple evangelist over this week which didn't help my schedule.


When they finally reimplemented SMP support for Macs after I brought it up (they originally had no plans on supporting SMP for any platform since most ddn't have Macs and didn't know it was the only platform to see performance increases with it enabled) SMP performance wasn't as good as the Mac specific code. It was about 10-15% slower. Not enough to make a big deal about it. After the performance drop, the SMP build was about as fast as the old single proc performance. Apparently, the PPC QVM interpreter eats up a significant amount of CPU time compared to the x86 version. So disabling the JIT compiler really hurts performance.

It'd be interesting to see how the Intel iMac copes with the JIT as it'd follow the i386 source path...

Author:  iluvquake4 [ 02-11-2006 08:29 AM ]
Post subject: 

NCG_Mike wrote:
We've got an iMac at work and it's much quicker than my dual 2Ghz G5.

If you compiled Q3 and turned on smp, it'd fly.


Do you mean an Intel Imac?

Author:  iluvquake4 [ 02-11-2006 08:35 AM ]
Post subject: 

NCG_Mike wrote:
Note the Intel based system is quite a bit faster!


Are you using the specifically compiled for G4/G5 Quake 3 patch for Macs?

http://3ddownloads.com/Action/Quake%203 ... tivecTest2[1].pkg.sit;jsessionid=6841CCF0A9094329218753D16757C29A

I get the following:

Dual Power Mac G5 2ghz with ATI x800 XT and 4 gigs RAM.

Quake 3, r_smp = 0, timedemo 1, demo = 224 fps

Quake 3, r_smp = 1, timedemo 1, demo = 357 fps

Page 1 of 2 All times are UTC - 8 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/