[fpc-devel] New targets for FPC - Windows Phone 8 and Flash

Sven Barth pascaldragon at googlemail.com
Sat Jul 5 10:19:39 CEST 2014

On 04.07.2014 23:07, Sergio Flores wrote:
> What is the current state of Windows Phone 8 for FPC?
> Also, would anyone have interest in support Flash as a FPC target?
> It is possible to compile C++ to .swf, so having the same capacity for
> FPC would be great!
> There is a open source project called FlashPascal that does exactly
> this, I've contacted the developers but sadly they abandoned it, and
> that compiler only supports a small subset of object pascal.
> In theory adding Windows Phone should be simple no? It is a ARMv7
> target, we already support this.
> In the other hand Flash would be a completly new arch, that could take a
> year or more, and I'm guess there is not really that much interest in
> such target.
> If not, anyone interested in trying to add support for any of those two
> platforms?
> I'm willing to pay for someone to add either those targets to the
> compiler, as I really want to port my existing games for both Windows
> Phones and for the web via Flash.
> Or if anyone is willing to take me as a FPC apprentice I can try to do
> it myself.
> I'm am a experienced programmer, just don't know much about FPC
> internals. Sadly there is not enough documentation for an outsider to be
> able to do such thing without spendings months just studying the
> compiler source.

Adding a new target OS for a known CPU is definitely simpler (in this 
case Windows Phone) than adding a completely new backend (in this case 
SWF). So if I were you I'd start with adding a Windows Phone target, 
though to be honest I'd first start with a i386-winrt or x86_64-winrt 
target. WinRT (aka Metro) might not be exactly the same as Windows 
Phone, but they share many traits and the hard ground work (namely the 
absolute core APIs that are available) are the same and developing on 
the PC should be simpler than developing for the phone...

There is a rather rough (and slightly outdated) article on the wiki ( 
http://wiki.freepascal.org/Porting_Free_Pascal ) which explains how to 
add a new operating system as a target. That would at least give you a 
starting point. You'll still need to dig a bit through the compiler's 
source though...


More information about the fpc-devel mailing list