Blitzmax on iphone/ipod touch?

Archives Forums/MacOS X Discussion/Blitzmax on iphone/ipod touch?

Dud(Posted 2008) [#1]
Given that Blitzmax uses xcode on the mac - I was wondering how feasible it would be to build something that could run on the iphone or ipod touch?

Given that the developers sdk for these devices is due out in February I can see a lot of people wanting to develop for these devices but I suspect that learning to build cocoa apps could prove hard for a lot of people. Blitzmax could be a nice alternative perhaps?


ImaginaryHuman(Posted 2008) [#2]
I would think it's pretty complicated, since you're targetting an entirely different CPU.


z80jim(Posted 2008) [#3]
it is now march 7th, and Apple finally released a beta version... so let's rediscuss this because personally I'm really interested. I'm sure we all know blitzmax relies somehow on xcode, I can't claim to know personally how though. Xcode is also where the SDK is located, so there's a connection. Steve Jobs told everyone in clear, uncryptic words that the iphone and itouch run native mac os X, so it seems at least on the surface to someone like me that it should be simple... mouse events are tap events, etc.. and you would need to add the motion sensor stuff, but that should be simple. Anyone with deep technical knowledge got anything to say?


Retro(Posted 2008) [#4]
As ImaginaryHuman points out, the iPhone's CPU is ARM-based. OS X executables (PPC or i86) can't simply be copied to it from a Mac and run, as is. They'd need to be recompiled for the ARM, for a start (which BlitzMax doesn't support). Also, the source code would likely need some host-specific changes for the iPhone OS.


Brucey(Posted 2008) [#5]
It shouldn't be too difficult to have bcc generating ARM asm code. I imagine it's simply a case of knowing ARM enough to generate the correct instructions.

After that, the core cpp stuff would likely not need any work, but some OS-specific functionality would certainly need tweaking.

Skid mentioned an ARM port a long time ago... tis such a shame nothing ever came of it, as I'd like to get some of my modules running on ARM :-)


z80jim(Posted 2008) [#6]
yes, I had already mentioned they would need to add support for the built in camera, for the accelerometer, and a few smaller things, but that shouldn't be hard. I don't even know how hard it would be for them to get it working on ARM, but that seems to be the only problem really.


Who was John Galt?(Posted 2008) [#7]
Yeah Xcode is just for recompiling the C parts of the modules, I believe. Quite a few people seemed interested in ARM support, but I doubt we'll see it.


Retro(Posted 2008) [#8]
One way to get around it might be to write a BlitzMax->ObjC translator (like bb2bmx) and add it to Xcode as an interim build phase (or just modify bmk). Not sure if a simple one-for-one text substituter would do the trick - i.e. without having to write a full parser. Of course, the deluxe solution would probably be to implement a BlitzMax front end for gcc.

There's also a small amount of asm in the module libraries which would need to be ported to the ARM.


z80jim(Posted 2008) [#9]
agent you just reminded me about that lol as far as I know, a program that converts your source code from one language to another, while hard, does work and it certainly has advantages like here. If someone could just do that, we could put bmx-made apps on the iphone and itouch without worrying about ARM and whatever other problems. Personally, I think blitzmax research would be stupid not to get bmx working on the iphone and itouch... they're already such hot products, and with the SDK, which you can tell from the vid on apple's website is simply amazing, bmx would profit a TON. You may or may not have heard about spore, but it's probably the most anticipated, most advanced, most breakthrough game ever, and they're gonna release it on the iphone and itouch! I dream of being able to program for the i's :D