Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: BeRoXM - The first android app with object pascal code

  1. #1

    BeRoXM - The first android app with object pascal code

    i've submitted the android version of BeRoXM into the android market as adbased freeware (of course, with a adfree unlocker key) today, see http://www.androidpit.com/en/android....beroxm/BeRoXM or directly on a android smartphone/superphone market://search?q=pname:com.bero.multimedia.beroxm but the CPU should be a fast once, optimal are >= GHz Devices like the Google Nexus One, HTC Desire, Samsung Galaxy S, and so on, at least i've tested it on my Google Nexus One and my Samsung Galaxy S and in some days i will test it on my old T-Mobile G1 and Motorola Milestone(/Droid) with slower CPUs.

    It's the first android app in the android market, which've by-freepascal-compiled code in it. The UI codepart is in Java, but the whole DSP audio code stuff is implemented in Object Pascal and is connected/bridged over the JNI Java Native Interface to the Java Codepart. Florian (the FPC father) had submitted already my small arm-linux dllprt0.as RTL patch for android into the FPC SVN, and the JNI.pas is at http://vserver.rosseaux.net/stuff/jni.pas. Important FPC parameters are -CpARMv6 -CfVFPV3. And you do need to write as/ld hook scripts to append additional parameters. For "as": "--march=armv7-a -mfloat-abi=softfp -mfpu=vfp3" and for "ld": "--fix-cortex-a8". And don't try to use the original arm binutils from the andoid NDK, because they are suprer buggy. So please use YAGARTO "GNU ARM toolchain" or a self-built ARM binutils toolchain from the newest binutils trunk revision. The remaining stuff is then simply like in the Android NDK C/C++ samples, with the difference, that the language is pascal

    And have fun with it


  2. #2
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    Re: BeRoXM - The first android app with object pascal code

    Hey great news Benjamin! I like that Pascal finally got it's self onto mobile devices. Do you plan anything else in the near future?
    Jason McMillen
    Pascal Game Development
    Co-Founder





  3. #3

    Re: BeRoXM - The first android app with object pascal code

    Thanks for sharing, BeRo. That jni.pas file could be useful for other projects too.
    ZGameEditor - Develop 64kb games for Windows.
    Thrust for Vectrex - ROM-file and 6809 source code.

  4. #4

    Re: BeRoXM - The first android app with object pascal code

    This is great news, just got an EVO for my wife and already have my Epic ordered. Started looking into development with FPC/Lazarus on the Android but couldn't find much information.

    Any chance you would put up a basic project with some info on how to build/debug/run apps for Android?

    Also, did you do the UI in Java because of limits in FPC or was it just the way things were?

    Will have to see if I can steal the wifes phone later and give this a test run

    - Jeremy

  5. #5

    Re: BeRoXM - The first android app with object pascal code

    Quote Originally Posted by jdarling
    This is great news, just got an EVO for my wife and already have my Epic ordered. Started looking into development with FPC/Lazarus on the Android but couldn't find much information.


    Quote Originally Posted by jdarling
    Any chance you would put up a basic project with some info on how to build/debug/run apps for Android?
    See http://vserver.rosseaux.net/stuff/FP...NativeTest.zip with a older buggy JNI.pas.

    Quote Originally Posted by jdarling
    Also, did you do the UI in Java because of limits in FPC or was it just the way things were?
    Not of limits in FPC, instead of the limits of the Android UI design concept philosophy (=UI layout XML files, which will mapped/rtranslated to auto generated Java Sources in the build process, whose will abuse as "UI resource ID files") / Dalvik VM (Androids Java VM), which is really designed most only for use/access it on Java level. Of course, you could define fake-Java-classes and fake-Java-Methods over JNI in pascal code and access to the Android UI system, but that would be very very very grubby/non-optimal way. So please make UI-stuff in Android always in Java for the less stress and cleaner code, except for OpenGL ES Androidgames, of course

    Quote Originally Posted by jdarling
    Will have to see if I can steal the wifes phone later and give this a test run
    Okay, i'm curious about your results.

  6. #6

    Re: BeRoXM - The first android app with object pascal code

    Congratulations.
    I did an attempt myself to and failed on the jni part, but see you modified fpc also?

    Can you make an hello world example out of it?

    What fpc do i need? Can you provide some more info on how to build the cross platform compiler?
    http://3das.noeska.com - create adventure games without programming

  7. #7

    Re: BeRoXM - The first android app with object pascal code

    Quote Originally Posted by noeska
    Congratulations.
    I did an attempt myself to and failed on the jni part, but see you modified fpc also?
    I've wrote only a non-empty dllprt0.as for the arm-linux FPC RTL (because with the original old empty arm-linux dllprt0.as refused the Android Dalvik VM to load the .so library file) which is even now already in the FPC trunk SVN, commited by Florian.

    Quote Originally Posted by noeska
    Can you make an hello world example out of it?
    See link above

    Quote Originally Posted by noeska
    What fpc do i need? Can you provide some more info on how to build the cross platform compiler?
    The current FPC 2.5.1 trunk SVN revision, otherwise see fpc-pascal mailing list archive. Short: No special, except choose the right arm binutils (not these bugy from the Android NDK), and hookscripts to add additional parameters to as & ld.


  8. #8
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    Re: BeRoXM - The first android app with object pascal code

    Ah so I see the Android is looking to become a targeted platform for FPC stable out of the box eventually?
    Jason McMillen
    Pascal Game Development
    Co-Founder





  9. #9

    Re: BeRoXM - The first android app with object pascal code

    Quote Originally Posted by WILL
    Ah so I see the Android is looking to become a targeted platform for FPC stable out of the box eventually?
    Yeah. The current FPC svn trunk version is already pretty stable usable for Android as platform, if pthreads/cthreads will be not used (instead only wrapped over Dalvik VM Java Threads, which are true threads on system linux kernel side) and so on, because Android is a "strongly stripped" linux environment, where the Google own libc-reimplementation called BIONIC is even stripped.




  10. #10

    Re: BeRoXM - The first android app with object pascal code

    greets for this great work !
    Current (and lifetime) project: FAR Colony
    https://www.farcolony.com/

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •