Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Inquisitor on November 23, 2003, 12:14:35 pm

Title: Mac OSX
Post by: Inquisitor on November 23, 2003, 12:14:35 pm
I got a development Mac from Apple, so I can test Lore, but I thought maybe I could try compiling on it, has anyone looked at creating a makefile?
Title: Mac OSX
Post by: redmenace on November 23, 2003, 05:53:48 pm
oh yes lets port fs2 to mac. yes this would spread the fs2 to more people and systems. :mad2:
soon fs2_open will take over the world.
Title: Mac OSX
Post by: kode on November 23, 2003, 05:54:56 pm
Quote
Originally posted by redmenace
oh yes lets port fs2 to mac. yes this would spread the fs2 to more people and systems. :mad2:
soon fs2_open will take over the world.


welcome to last week. there are ports worked on already...
but, uh...
Title: Mac OSX
Post by: Lightspeed on November 23, 2003, 06:10:56 pm
You know, what would be really cool would be to port the freespace2 source code to the Amiga :)

Theres FS1 for PPC / 68060 systems yet, so i bet they would simply love having FS2 ;)

I dunno if it's really possible to port it to 'classic' Amiga systems, we could always port it to the AmigaOne, seems to be quite popular lately :)
Title: Mac OSX
Post by: redmenace on November 23, 2003, 07:21:48 pm
Quote
Originally posted by kode


welcome to last week. there are ports worked on already...
but, uh...

which thread? usually I try and read most threads. haven't seen it yet. I know there is a linux port.
Title: Mac OSX
Post by: Galemp on November 23, 2003, 11:18:25 pm
Welcome to Apple, Inquisitor. Hope you like it here. :)

I have access to Macs and their compilers (though I've no idea how to use them) so I'm avaliable to test anything you like.
Title: Mac OSX
Post by: tr909 on November 24, 2003, 04:10:09 am
Hello all, i stumbled on freespace for the mac yesterday and roamed the web for info's and tidbits all night :-). Currently there is a working (second) Beta from the (i think) original source of the linux version. Already there is a lively discussion at www.insidemacgames.com. From what i understand (and see when i'm playing:-) is that that version is Mac native. Is it true that the fs2 open version is more aimed at windows (directx???), Maybe someone can jump in and explain this to me better). Anyway i think it would be very great if with the (pre)work from Mac-Freespace there will come a freespace open version for the mac (or better, platform independent)
i'll throw in a few links for you:

http://www.insidemacgames.com/news/story.php?ArticleID=8124
(also click through for the forum thread overthere)

http://homepage.mac.com/tigital/
(beta2 binairies, sadly i don't have freespace2 CD's but the demo is great)

and i think it is based on this version of the freespace2 source code
http://icculus.org/freespace2/ (not fs2 open)

anyway i don't know if the mac sourcecode is available too:
Now you inquisitor, if you wan't to start helping and get your
compilers running i suggest contacting taylor http://icculus.org/~taylor/
he has information on contacting tigital (who, i think, runs the mac port version)

success.
Title: Mac OSX
Post by: kode on November 24, 2003, 05:34:56 am
Quote
Originally posted by tr909
Is it true that the fs2 open version is more aimed at windows (directx???)

I think this thread is about linux stuff: http://www.hard-light.net/forums/index.php/topic,17364.0.html

the icculus is more "pure" fs2, whereas fso has more enhancements
Title: Mac OSX
Post by: tr909 on November 24, 2003, 07:44:27 am
Aha, hmmm it's getting more clearer now. It is really sad that all the projects and things are so scattered all over the net. A nice blog or website would be a real helper
Title: Mac OSX
Post by: Lightspeed on November 24, 2003, 10:57:53 am
they may be scattered but we are the core ;7 :nod:
Title: Mac OSX
Post by: taylor on November 24, 2003, 09:15:43 pm
Quote
they may be scattered but we are the core


You wish! ;)  (though in truth it, um, is sort of, um...true :nervous: )

Seriously though, SDL has support for both AmigaOS and BeOS so the Linux version, with some (hopefully) small changes, could be made to work on both platforms.  Hyperion Entertainment ported the original FS1 to the AmigaOS and in their FAQ it has something along the lines of choosing it over FS2 because it doesn't require hardware 3D accel.  I've never had my grubby hands on AmigaOS so I don't know much about it but it would be cool to have FS1 & FS2 ported to AmigaOS and BeOS.  The byte-swapping routines that tigital came up with for the OSX version would help move things along as well.  So, who was going to volunteer for this?
Title: Mac OSX
Post by: tr909 on November 25, 2003, 04:15:07 am
(what is SDL?) anyway "inquisitor" started the thread that he got a dev-machine from apple and wants to help out coding. Maybe some of the people on Descent2 port could also be interested? (also an icculus.org project?)

Before i got Freespace1 (got the cd's from my old pc-using era) running on the mac i had to grab some stuff of your site (fs-sounds.vp and fs1.vp) and still it crashes 4 times in mission 3 and then you can play on... strange-strange. Anyway that was nowhere documented, it took me a long time to roam the tidbits and files together from the internet.

I really would like to participate, (me being only a php programmer i don't think of diving into projectbuilder/gcc just jet but) i can donate some of my time to keep a news-/projectpage site up to date about the various projects. IMHO i think the HLP homepage could be a great HUB for this but it could use a (small) beef-up with a better overview and tweaked news and project pages.

Now i was wondering if tigital is willing to release his sourcecode?

What do you think taylor? is it worth it to start a FS_open mac/linux tree?
(is there also a FRED_open if i remember right?)
Title: Mac OSX
Post by: Lightspeed on November 25, 2003, 06:31:37 am
Quote
Originally posted by taylor
Hyperion Entertainment ported the original FS1 to the AmigaOS and in their FAQ it has something along the lines of choosing it over FS2 because it doesn't require hardware 3D accel.  I've never had my grubby hands on AmigaOS so I don't know much about it but it would be cool to have FS1 & FS2 ported to AmigaOS and BeOS.  The byte-swapping routines that tigital came up with for the OSX version would help move things along as well.  So, who was going to volunteer for this?


main group to point this to would be the AmigaOne users, I think. And most of them use Radeon 9800 PROs :D However, it should also be ported to conventional Amiga PPC systems (guess FS2 would not run on a plain 68060). Maybe we could easily get it to work under the upcoming AmigaOS 4.0 since that one is a completely platform independent Operating System. ;7

For now that OS4.0 is not out, AmigaOne users are limited to run Linux anyway (so they should be able to play it) since the original AmigaOS versions (or 3.5 & 3.9) are still platform dependand, so they wont run on AmigaOne systems with Mac processors.

:)
Title: Mac OSX
Post by: taylor on November 25, 2003, 09:49:38 am
Quote
(what is SDL?) anyway "inquisitor" started the thread that he got a dev-machine from apple and wants to help out coding. Maybe some of the people on Descent2 port could also be interested? (also an icculus.org project?)


SDL, from the website, "Simple DirectMedia Layer is a cross-platform multimedia library designed to provide level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer."  The SDL web site is at http://www.libsdl.org (http://www.libsdl.org) if you want to check it out.

I haven't grabbed a CVS update in a few months but I'm pretty sure that the d2x project supports OSX already for Descent 1 & 2.  If you mean Bradley helping FSO then I'm not sure.

Quote
Before i got Freespace1 (got the cd's from my old pc-using era) running on the mac i had to grab some stuff of your site (fs-sounds.vp and fs1.vp) and still it crashes 4 times in mission 3 and then you can play on... strange-strange. Anyway that was nowhere documented, it took me a long time to roam the tidbits and files together from the internet.


Yeah tigital was supposed to include fs1.vp in the OSX package so maybe he'll remember for beta3.  fs1.vp is the only required file for using the FS1 port and fs-sounds.vp is going away in the next few days since the MS-ADPCM decoder has been finished and will be in beta3 and in icculus.org CVS shortly.  For the crash are you referring to the third training mission or "Small Deadly Space"?  No one else has reported a crash in any level but "Paving the Way" and that's only on OSX.  Feel free to e-mail me about this ([email protected]) since I'd like to get this problem fixed.

Quote
Now i was wondering if tigital is willing to release his sourcecode?


I think that tigital is waiting until it's "done" but beta3 should be the last one and that's just to test a few specific things.  I'm hoping that tigital will find enough time to get the OSX patch whipped into shape and put in icculus.org CVS in the next couple of weeks.  Though he doesn't want it completely public yet I think he'd agree to me just sending the code to Inquisitor if he wants to have a go at it.  Let me know if you're interested Inquisitor.

Quote
What do you think taylor? is it worth it to start a FS_open mac/linux tree?
(is there also a FRED_open if i remember right?)


Well bKtHeG already has a Linux tree it's just not in CVS yet.  It may be about time to think about getting it pushed into CVS since though it works pretty damn good for me and some of the small usability stuff has been worked out.  OSX support could be integrated in about a weekend I believe.  FRED is great, but I ain't gonna port it.  Too much MFC for me to remain sane.  tigital is interested in looking at it though and maybe someone else could help get it ported to wxWindows so that it's cross platform.

Lightspeed, is there some place other than http://os.amiga.com that I should be looking?  I think I'm going to browse their forum and maybe post the question and see if anyone is interested.
Title: Mac OSX
Post by: Bobboau on November 25, 2003, 10:06:40 am
someone is going to try to prot FRED!,  
do they like pain?
hope so

have you gotten the OGL HTL integrated or are you still useing the pre htl code base?
Title: Mac OSX
Post by: Lightspeed on November 25, 2003, 10:27:11 am
www.amiga.com, you'll find most response on the Forums (http://os.amiga.com/forums/index.php) i think -- try the AmigaOne and OS4 forums :)

Also check the Amiga Support & Development forums (http://www.amigadev.net/forums/)

Also a good place to p1mp it is Amiga-News (http://www.amiga-news.de/forum/), theyre mostly a german site but you can post in the forums in english, they should understand you; and this is one of the most active community places :)

Another good and good place to go is theExoticA (http://exotica.fix.no/forum/) forums.

Or try the Amiga Forums (http://www.amigaforums.com/forums/index.php)

Also, if you are progressing you could try if TA (http://www.totalamiga.org/) is willing to publish the news  ;)  

As far as other things go, unfortunately I don't have enough money, so i'm stuck to a plain old A1200 with a blizzard 68030 50, so I'm not available for testing or the like :(

<-- Wants a nice A4000 68060 +PPC :)
Title: Mac OSX
Post by: karajorma on November 26, 2003, 07:29:54 am
I'll give it a try on Amiga.org later today. I used to hang out around there a long time ago and maybe someone will recognise me :D
Title: Mac OSX
Post by: Inquisitor on November 26, 2003, 12:05:34 pm
Yeah, I knew about the icculus build, I was hoping a friendly developer was thinking about making a make file or xcode project :)

Good stuff, definitley food for thought.
Title: Mac OSX
Post by: tigital on November 29, 2003, 05:02:01 pm
hi gang,

...just found this thread...I just recently got cvs access to icculus, but immediately became busy with other things...I've got several things I'd like to get done this next week:

1. release new betas with updated code (fullscreen working, adpcm sounds working, include fs1.vp, etc)

2.  grab the cvs from icculus and upload the osx/byteswapping changes, including my project builder project

3.  continue to work on cross platform network compatibility...we can do mac vs. mac, but not vs. x86...

4.  start a OSX freespace site!

l8r
Title: Mac OSX
Post by: tr909 on December 07, 2003, 10:51:58 am
Well, tigi.. that sounds promising... if you like i can help out with point 4. (Freespace-OSX website).
Title: Mac OSX
Post by: tr909 on December 15, 2003, 10:38:38 am
Woohaa Beta3 is out (looks like file was created yesterday 14 dec 2003 !)
Looks like point 1 and 3 are done Yes! cross platform networking. How do we get mission-briefing speech/sound? I had no luck on getting freespace2 CD's on ineternet. Can someone post a BitTorrent Distro of the 3 CD's ? would be great...
Title: Mac OSX
Post by: Kazan on December 15, 2003, 11:48:41 am
I think what we really should do is port everything into SDL - then we have one tree that does everything (with slight #ifdef's for things like reverse byte order on macs, etc)


eventually we're going to have to overhaul this stuff from the ground up there is only so far we can go
Title: Mac OSX
Post by: redmenace on December 15, 2003, 09:01:24 pm
tr909
what is your location? In the US. I might mail you a copy since no one seems to want to fess up tp owning the rights.
Title: Mac OSX
Post by: tr909 on January 08, 2004, 06:05:10 am
Redmenace (as noted in private message) thanx for your help. i already found the 3CD set on BitTorrent (suprnova.org) all you people out here who haven't got it (original) Freespace2 and Freespace1+extras are available.

Some mac question: i installed in virtualPC on a shared-folder and ran update-patch (from freespace2.com) i can't run the game because my VPC does not have 3D accelleration. After this i tossed in the Beta3 for MacOSX and it is playing. I have question. Do any of you have files in data/voices and in data/sounds? they are empty here. The underdog version has WAV files in these folders... Also briefing voices and movies aren't playing :-(
Title: Mac OSX
Post by: taylor on January 08, 2004, 06:31:38 am
All of the WAV files are in the various .VP archives depending on what the particular WAV is used for.  The Underdogs version has the files extracted which causes various problems, including crashes and excessive CPU usage from 0 byte anis, with the Linux and therefore the OSX version.  The icculus.org code is not going to be modified to make the Underdogs version work correctly so please don't ask.

Movies need to go in Data/Movies (may or may not be case sensitive) in order to be played with the current player code.  The new code, that I haven't finished the audio on yet, uses CFILE to locate the movies in all directories that CFILE manages, including the CD-ROM.  As soon as I get the movie audio to stream correctly it will be added to CVS.

Briefing voices and music don't work yet in the icculus.org code.  The decoder for the sound data is there but I haven't finished the streaming code and plugged it all together yet.  I haven't had much time to work on it over the past month but I plan to get back to it this month so working code should be available soon.  When it is done the streaming code will be added to FSO as well.
Title: Mac OSX
Post by: tr909 on January 08, 2004, 06:48:57 am
Great to hear that Taylor. i now have the original as well as the underdog version. (the movies play fine after a straight copy from the CD, so probably not case sensitive on OSX). Your post explaines a lot, thanx. i hope tigital reads this too because i emailed him another crash report for Freespace2 (where i also asked this sound issue). Also i guess Panther (OSX 10.3.x) is a bit different. Beta3 seems a bit unstable on Panther. but i'm really pleased with how far the port already is :-) thanx guys (and girls?)
Title: Mac OSX
Post by: Clave on February 22, 2005, 06:56:29 am
Well, I have all the tigital files now, so I need to buy a retail copy of FS2 for the PC?

Is it still on sale? or do I need to use eBay? :sigh:
Title: Mac OSX
Post by: karajorma on February 22, 2005, 08:16:00 am
You've got a lot of choices actually. If you can find a retail copy you can buy it. Ebay is sadly the place most likely to have it though and it's expensive there.

 You can get these bitTorrents (http://prototype24.ath.cx:6969/index.html?filter=Games)
if you have a bit torrent client (http://www.slyck.com/bt.php?page=2).

Personally I think that's your best option but...

The Home of the Underdogs (http://www.the-underdogs.org/game.php?id=4150) version is limited because a lot of the files are missing. but there should be everything you need to actually play the game in there.  (Which means you can get up and playing quickly if the big BitTorrent looks like it's going to take a long time to download).
My HotU FAQ will tell you where you can get the rest of the files although there are some new sources that iaren't in my FAQ yet which can be found on this thread (http://www.hard-light.net/forums/index.php/topic,30586.0.html).
Title: Mac OSX
Post by: Taristin on February 22, 2005, 09:27:02 am
But if you get the HOTU version, I have shareaza running, and the other VP files should be available if you search. I even posted direct URN's (I think that's the technical name for them) in BD's "Guys, seriously" thread...
Title: Mac OSX
Post by: taylor on February 22, 2005, 09:43:55 am
The HotU version does NOT work with the Linux/OSX code.  You can possibly get it to work a little but it will crash constantly in mission, if the mission even loads.  You've got to make a lot of changes to get everything in a set of VPs in order for the files to be found and used but that's not an easy task.  If you can get the individual VPs then that's fine but stay away from HotU unless you run Windows.

If possible go for the torrents.  That way you get the full game, already packaged in VPs and ready to use.  I'm not sure if it's ISOs or not but if so then some of the needed files will be in InstallShield CAB files.  To extract them on the Mac grab this (http://synce.sourceforge.net/synce/unshield.php) little command line utility.  Only the source is available but if you can't get it to compile let me know and I'll build and post a binary for you.
Title: Mac OSX
Post by: karajorma on February 22, 2005, 10:19:16 am
Thanks Taylor. Can you tell me why the HotU build doesn't work? Is it cause it only checks the VP files and ignores data?

If you noticed the thread on General Freespace I've been talking about improving the HotU build. One of the first changes I'd make would be to put as much as possible into VP files (I suggested it cause it would make it much easier to upgrade from HotU to a full Retail version). I've got no problem with trying to make it as Linux/Mac OS X compatible as possible while I'm there though.
Title: Mac OSX
Post by: taylor on February 22, 2005, 10:37:43 am
Quote
Originally posted by karajorma
Thanks Taylor. Can you tell me why the HotU build doesn't work? Is it cause it only checks the VP files and ignores data?

Filenames are case sensitive on the disk.  Files in a VP are not though so it's causes less problems to put them there.  The problem comes when the game requests a filename with a particular case and even though that file may exist it may have a different case (mixed/lower/upper).  FS2_Open is a little different in that it converts everything to lowercase when looking.  While that's good sometimes there are many files that are written to disk in mixed case (pilot files for instance) and most still exist only in mixed case so it could find the file in mixed case but then look again later in lower case and the file wouldn't be found.  Kind of a pain but no way around that on a case sensitive filesystem.

Getting the files in a VP is all that should be needed to fix it.  Why that's difficult at the moment is that many animation and sound files are zero byte and you can't put zero byte files in a VP.  One other issue that can occur with zero byte anis is when it tries to show nothing, CPU usage goes through the roof on those frames (mostly interface).  It's likely a small glitch in the way the whole ani/texture system works but I never bothered to fix it in the code.  Previously I had created single from anis to replace the zero byte versions, where that single frame was green (transparent) so it could still load but not be visible.  The zero byte sound files just need something in them which would be seen but seen as invalid.  I just put "I AM NOT A SOUND FILE" in each of them and that did the trick.

It's really difficult to get the end user to do all of the needed work to use the HotU version though so for the icculus.org version we just made it "officially unsupported" and tell people not to use it.  Getting it Linux/OSX friendly would be cool though so if you have questions or need help (testing or whatever) then let me know.
Title: Mac OSX
Post by: Taristin on February 22, 2005, 10:57:12 am
I was just suggesting the HotU because I do have the original VP files (all of them) in my shared folder. I've just not had any DLs yet.
Title: Mac OSX
Post by: karajorma on February 22, 2005, 02:36:04 pm
Quote
Originally posted by taylor
Getting the files in a VP is all that should be needed to fix it.  Why that's difficult at the moment is that many animation and sound files are zero byte and you can't put zero byte files in a VP.  


Is that a limitation of the VP format itself or of the VP tools?

Quote
Originally posted by taylor
It's really difficult to get the end user to do all of the needed work to use the HotU version though so for the icculus.org version we just made it "officially unsupported" and tell people not to use it.  Getting it Linux/OSX friendly would be cool though so if you have questions or need help (testing or whatever) then let me know.


I know what you mean. The main reason I was thinking of upgrading HotU was precisely because it's such a pain in the neck to upgrade it to a full version for PC users. I didn't realise that it was even worse for Mac and Linux people.  Probably is better just to tell them to go to the various places where PC owners will be getting the VP files anyway.

I'll try to make sure that the version I make has at least a couple of complete VPs in it though (Sparky as well as Root most likely) cause that way we cut down on the need to have people download those two at least (Which would cut down on some of the traffic on the FTP server).
Title: Mac OSX
Post by: StratComm on February 22, 2005, 03:34:44 pm
I'd imagine of the format itself; compression algorighms of any sort tend to have trouble with compressing absolutely nothing and if the VP is a block of data with pointers to all of its files, then 0 byte files will break the pointer sequence.  In short, I think it's a failing of the VP format but one that's needed to simplify the reading process.
Title: Mac OSX
Post by: taylor on February 22, 2005, 04:44:29 pm
Quote
Originally posted by karajorma
Is that a limitation of the VP format itself or of the VP tools?

It's the VP format itself but not really a flaw of any kind.  A VP is basically a filesystem so it stores basic info on files, directories, and the content of those files.  In order to access those files it needs some kind of index to tell where they are located in the system.  For a normal filesystem it's inodes (for *nix stuff) or like the FAT (the actual allocation table of available files) for Windows.  CFILE uses offsets to find the files in a VP and though it could store the basic info of a zero byte file inside of the VP it can't reference it's location since it takes no space and an offset to it's location would actually be the next file in the system.  A badly written VP creater tool might allow those zero byte files in the VP by mistake and that would cause all sorts of issues in CFILE.

It's done with offsets in order to save space so that that VP is never larger than what's required by the files stored in it.  A regular filesystem (eg, FAT32/NTFS) would store files in blocks of something like 4k.  Even a 0 byte file is taking 4k of space but it has to do that in order to keep track of the files (and speed, or whatever other reason the filesystem needs a particular block size for).

Uhh, maybe a little more than you wanted to know there but that's the reason why. :)
Title: Mac OSX
Post by: karajorma on February 22, 2005, 05:11:36 pm
Actually it was all pretty useful :)

I guess that does mean that I'm not going to be able to stick the entire contents of HotU's data folder into a vp then. I'll find another way to simplify things though :)
Title: Mac OSX
Post by: StratComm on February 22, 2005, 05:23:03 pm
It'd take a lot of work, but a bunch of 1-byte files should be fine.  Just a single ASCII character should be enough to get a VP to reference it correctly.  It just needs some data, instead of an empty file with a name.
Title: Mac OSX
Post by: karajorma on February 22, 2005, 05:40:15 pm
The problem with 1 byte files is the game might try using them and crash out thinking that they are corrupt. I'll give it a try :)
Title: Mac OSX
Post by: WMCoolmon on February 22, 2005, 06:06:13 pm
The chief problem is that a VP file uses a filesize of 0 to denote a directory...the format would have to be upgraded in order to use some other method for determining a directory.
Title: Mac OSX
Post by: StratComm on February 22, 2005, 06:09:22 pm
An upgrade to the VP structure doesn't do much good here though, does it?  Since it's being distributed with a retail exe...

Quote
Originally posted by karajorma
The problem with 1 byte files is the game might try using them and crash out thinking that they are corrupt. I'll give it a try :)


I think that's what the game tries to do with the HOTU version anyway.  Let me know how it turns out, though, because I wouldn't be opposed to helping get the files in order.
Title: Mac OSX
Post by: WMCoolmon on February 22, 2005, 06:16:35 pm
Nope. (Although I don't think it is a retail EXE, but one with a cd crack involved)

If I were going to make any SCP modification to support the HOTU version, I'd try to decrease the number of placeholder files required to 0, by having the game either put something else in its place or just not display whatever-it-was if the art was missing.
Title: Mac OSX
Post by: karajorma on February 23, 2005, 01:57:26 pm
The big problem I have with the HotU version is that you end up downloading everything again. With the exception of the three endgame cutscenes I don't think there's a single file that survives the transition to a full retail version. Basically that seems like a big waste of bandwidth to me.

What I would do is bundle a couple of complete VP files with the build so that you can ease the strain on the FTP and Game Warden (once MP starts up the VP downloads again).