Multi platform how?

BlitzMax Forums/BlitzMax Beginners Area/Multi platform how?

Boulderdash(Posted 2006) [#1]
Excuse me for asking a question that probably all other BMAX users know, Since I dont have access to a MAC.

How do you compile for a MAC ,or does it work any way if built on an IBM clone PC.

Do you need to compile the program on a MAC for the MAC version and then compile the PC version on the other computer....?????

Its never mentioned , maybe its a secret!


Mordax_Praetorian(Posted 2006) [#2]
To compile a BMax program for a specific platform, you need to do the compiling on that platforms version

Thus you need a Mac to compile for Mac, and Linux to compile for linux

Simply take your code from 1 version, load it up in another version and hit the compile button


Boulderdash(Posted 2006) [#3]
Thanks, so all I need to do is go get $2000 out of the bank and go get a MAC notebook!!! LOL

Thanks for that info, I just hadsta no.


D4NM4N(Posted 2006) [#4]
You could always get a trusted party to compile it for you


xlsior(Posted 2006) [#5]
Thanks, so all I need to do is go get $2000 out of the bank and go get a MAC notebook!!! LOL


Not quite, since a Mac Mini starts at $599

Of course, keep in mind that there's actually two seperate Mac editions, you have the old PowerPC mac's and the new Intel Mac's. You need to compile these seperately as well, IIRC.

It might be easier to find someone else to compile it on your behalf...

As far as the Linux version is concerned, you can either do that through a dual-boot install of Linux on your own computer, or through an emulated install in VMWare or VirtualPC...


Perturbatio(Posted 2006) [#6]
I wonder if you could install OSx86 on your PC and compile for the intel mac that way?


xlsior(Posted 2006) [#7]
Possibly... Except it still takes some black magic to get OS-X running on a random stock PC at this time, since the Mac doesn't have a BIOS an alternative system, called EFI. Supposedly it's better, but since your 'normal' PC doesn't have it, things get a bit trickier...

I know one can compile OS-X PPC binaries through OSx emulated in PearPC under windows... dead slow and won't support full-screen OpenGL (only windowed), but compiling the actual executable itself works just fine.


Eck(Posted 2006) [#8]
Quick question, would Blitz Max run fine on a standard Mac Book eg. 512mb, 1.83 ghz processor with onboard graphics?


degac(Posted 2006) [#9]
I can run BlitzMax on a iBook g3@500Mhz, Mac OS X 10.3! Not the fastes thing on the Earth, but it works!


Garrett(Posted 2006) [#10]
xlsior, do you know of any instructions on how to setup OS X under PearPC?


Tom Darby(Posted 2006) [#11]
General question on cross-compiling:

If I have a trusted source for compiling on an architecture, but I cannot actually access that person's machine myself, is it acceptable to allow them to use my BMax license/login to install BMax, synchronizing modules, compile a source, and removing BlitzMax from their system, or do I actually need to physically do it myself?


Hotcakes(Posted 2006) [#12]
I wonder if you could install OSx86 on your PC and compile for the intel mac that way?

Of course... but for proper performance you can't do it with an AMD CPU.

the Mac doesn't have a BIOS an alternative system, called EFI. Supposedly it's better, but since your 'normal' PC doesn't have it, things get a bit trickier...

It's not better, it's just DRM-enabled (although from what I can tell Mac OS only uses it to tell if it's an 'Intel Mac' or not). The best way to access Intel Mac OS on a non-Intel Mac system is through GRUB or LILO, ie a dual boot with Linux.

xlsior, do you know of any instructions on how to setup OS X under PearPC?

I've done it before, it basically involves using particular tools to read the Mac OS Setup DVD, since it's not in a standard ISO format. To be honest with you, it is MUCH easier to get Mac OS Intel running... provided you have an Intel CPU.


xlsior(Posted 2006) [#13]
Garrett: It's been a while, so it's not fresh in my memory... but from what I recall:

1) download the latest PearPC stable release from the PearPC website
2) download the compressed harddrive image (6GB compressed, is ~20KB download)
3) uncompress teh harddrive file, and edit the pearpc configuration file to point to it
4) edit the config file to specify your CD-ROM drive(?)
5) launch pearPC with the config file, and have the first OS-X installation CD ready. Follow the Os installation steps
6) Install X-Code. If you don't have an xcode CD, you can download it from the Apple website
7) The easiest way to get files in/out of the virtual PearPc environment is by installing the NDIS network drivers, which can bridge the virtual OS virtual network adapter and your real windows one. You can then run an FTP server on windows to upload/download files to, or if you can get samba to work you can even do a direct drivemap to your windows partition

all in all a bit tricky to get running just right, but I had it all working back with Bmax 1.09 IIRC. Haven't done anything lately. Biggest downsides: since it is a PPC emulation, it is slow. I couldn't get more than ~5 FPS within PearPc for programs that ran at hundreds of FPS natively under windows. Also full screen OpenGL didn't work, so applications will only run in windowed mode.

the biggest downside at this moment is probably the fact that PearPC does PowerPC emulation, and not the new intel Macs.


Garrett(Posted 2006) [#14]
Thanks a bunch xlsior.


xlsior(Posted 2006) [#15]
By the way: Make sure to get the 'JITC-X86' version, and not the generic one. The JITC-X86 one runs at ~1/15th native speed, while the other one at 1/500th.


Grey Alien(Posted 2006) [#16]
OK, my problem withy letting someone else compile on their Mac is that I personally would want to see and test the end result thoroughly to check it working properly and looks the same in all ways etc.


Hotcakes(Posted 2006) [#17]
Well you're not going to be able to do that really on an emulated setup either ;]


Boulderdash(Posted 2006) [#18]
D-Grafix (Posted 3 days ago)

"You could always get a trusted party to compile it for you"

yeah right, trust a person across the internet, like email me $1000 bucks and I will give it back i "promise" , "while I hide behind my PC! at a secret location!"


I gave my source for a guy to make a port of my emulator and the bitch went and compiled it for windows and made claims all over the place that he co-wrote both and his was a better version and mine was shit and then defaced my php message boards and pissed all over my parade! stole web traffic from my site.

So do you think I will send source code again, never I will purchase the MAC at any expense rather than give a stranger my dick to hold onto and trust him no way.


Boulderdash(Posted 2006) [#19]
To make things worse the clown has given me no credit for my work and continues to visit my site upto four times a day to copy ideas from each update of my version,

Each time i put a feature in my program the bitch puts it in his several days later.


Boulderdash(Posted 2006) [#20]
bitch's name is James jacobs - handle: minous1

watch out for this character if you have dealings with him he is seriously nuts.


CS_TBL(Posted 2006) [#21]
I somewhat have the same feeling about that.. (the 'stranger' holding the dick, is open to discussion ofcoz ^_^)

Isn't there any way, in theory, to be able to compile for platform x on platform y ? In the end, each platform works with ones and zeros ..


tonyg(Posted 2006) [#22]
@Gav, the cad also seems to have stolen your edit button.


Tom Darby(Posted 2006) [#23]
...see, I think the issue here is a lack of appreciation for the meaning of the word "trusted".


Dreamora(Posted 2006) [#24]
Isn't there any way, in theory, to be able to compile for platform x on platform y ? In the end, each platform works with ones and zeros ..


Yes it is, there is actually no problem about that beside the fact that you have to write an assembler for the other platform on your current one which is heck of work. RealBasic does that ... don't know of many others. (.NET and JAVA don't, the compile to middle layer that endcompile on the platform)

BM actually uses platform bound assemblers and compilers (sadly not the "official" one on windows side but at least not borland bcc ^^)


Hotcakes(Posted 2006) [#25]
Isn't there any way, in theory, to be able to compile for platform x on platform y ?

Technically it is possible, but there are some things getting in the way - whereas with open source stuff like MinGW you could recompile the Linux exe yourself to compile for example Linux binaries on Windows (if you even need to recompile for that, I wouldn't know)... you also need a Windows exe of fasm that compiles for Linux and you also need a Windows exe of bcc (Max core compiler) that compiles for Linux and BRL have been very silent about ever allowing that, which basically means it won't happen.


H&K(Posted 2006) [#26]
Someone could setup a bonded compilation service, and charge for it


Boulderdash(Posted 2006) [#27]
@tonyg

I... I... I... will get him for that also....


Winni(Posted 2006) [#28]
Macs & EFI Bios: EFI has -nothing- do with DRM. EFI was designed by Intel to be the successor to the old BIOS; you can think of EFI as a more modern BIOS with a built-in Forth interpreter. That´s all that it is. Windows Server 2003 and the 64 Bit editions of Windows Vista also support it.

Like -ALL- current mainboards for x86 processors, the Mac mainboards have a TPM chip on it, which -can- be used for DRM. However, the DRM implementation on all systems is handled entirely in software and does not use any special hardware at the moment. It has been rumored that the TPM chip on the Mac mainboards was going to be used to make sure that OS X can only be run on genuine Apple hardware. However, there still is no evidence for that assumption.

As for running OS X on non-Apple hardware: It is a clear violation of the license agreement. And even though that it successfully has been done, those "Hackintoshs" are clearly illegal. (But nobody has been sued so far for doing it.) If want to run OS X, buy one of the new Intel Macs. They´re cheaper than --COMPARABLE-- PCs anyway, have a much nicer design, consume less power, produce less noise and you can even run Game Loader OS (TM) natively on it, if you really want to. And Linux. So a Mac basically is a cool PC -PLUS- OS X.

As for letting a "trusted" party compile something for me: Geez, how computers are so awfully cheap these days, that this approach just doesn´t make any sense at all. Dell is selling OptiPlex GX620 machines for 400 bucks. The smallest Mini is around 600 USD - that already includes an OS X and an iLife 06 license. How much do you guys charge for an hour of work these days? Or how much is it worth you to be able to offer your product on multiple platforms?

Just forget the idea to have somebody else compile your stuff for you and buy one of those cheap machines instead. It is even better to have an additonal low end machine available - for testing purposes. ;-)


H&K(Posted 2006) [#29]
How much do you guys charge for an hour of work these days?

Min Wage, well maybe not, but $400 isnt "Free", but you would have to be a really lonly sado not to know someone with a max or a PC depending.


Dreamora(Posted 2006) [#30]
Sad thing is that Mac Minis as well as MacBooks are useless for programming games. They come with Intel Onboard ... which is only known to succeed in s**** with OpenGL for several years.
And testing stuff on software emulation you are planning to sell is surely no usefull idea, in that case you could use PearPC as well.


Scott Shaver(Posted 2006) [#31]
I've had absolutely no problem using my Mini for programming games in Blitz. And play commercial games.


Tom Darby(Posted 2006) [#32]
Dreamora, I'm coding on a 3 1/2 year old G4 PowerBook. While it's no monster, it's perfectly adequate for development purposes--and the "nice" GeForce4 MX a fair sight slower than today's onboard Intel chipsets. While it isn't optimal it's far from useless.

Winni, I make a modest income, though between the wife and I we're above average for the US. $600 is a fairly significant chunk of change to throw around for the majority of people out there, especially when the only real need for the extra machine is cross-compiling. Besides, I've got a lot better things to spend that $600 on, like finishing my fence, putting up window casings, visiting family for the holidays, or taking the missus on a nice vacation.


Tachyon(Posted 2006) [#33]
I thought I'd post this question here since nobody on the Mac discussion thread has any answers.

On the BlitzMax product page it says MacOS 10.3.9 is needed to use BlitzMax, but what is the actual oldest (or earliest) version of MacOS X that a *compiled BlitzMax program* can run on? If BlitzMax games themselves are limited to MacOS 10.3.9 or later, that really limits the Macintosh audience for BlitzMax created games!


Dreamora(Posted 2006) [#34]
it needs 10.3.X at least (which means 10.3.9 as this is what anyone can upgrade for free to)

it won't run with 10.2 or earlier if this is your question.


Tachyon(Posted 2006) [#35]
Thank you Dreamora. That's exactly what I needed to know.


bregors(Posted 2006) [#36]
.


Dreamora(Posted 2006) [#37]
You have to buy them from Apple, you can't use OSX on normal systems.
And old systems aren't there any (most likely at least), Intel Macs appeared less than a year ago.


xlsior(Posted 2006) [#38]
Here's a dumb question... Is it possible to buy spare parts and throw together an Intel Mac, like you would a PC? I built this rig for under $300.00 using spare parts and the like. Is that possible with Macs, or are you stuck with paying higher prices?


The latter.

Only apple makes "Mac-compatible"hardware (they had a short experiment with 3rd party cloned stuff many moons ago, but canceled those licenses again)