So I found https://github.com/pelya/commandergenius which is a port of 
SDL 1.2 to Android. It looks pretty actively maintained, although the 
build system seems a little peculiar.

I followed the instructions in the readme, got the demo compiled and 
successfully loaded onto my android device, and then I dug into trying 
to compile the OHRRPGCE using it.

I ran

  scons fbc=~/misc/usr-local/bin/fbc gengcc=1 asm=1 game

And then I copied over

  *.c *.h *.cpp fb/*

Into my android project directory. Then I removed Jay's experimental gui 
code and the code that only matters for scons raster=1 

I made my best guess at AndroidAppSettings.cfg settings using 
commandergenius's changeAppSettings.sh tool and tried to compile.

Results were not successful, but still somewhat encouraging. Some 
modules do compile, but the NDK's gcc chokes on a whole bunch of errors 
like this:

/tmp/cc2PJ0en.s: Assembler messages:
/tmp/cc2PJ0en.s:5539: Error: bad instruction `fldl [fp,#-36]'
/tmp/cc2PJ0en.s:5539: Error: bad instruction `fistpl [fp,#-40]'
/tmp/cc2PJ0en.s:5807: Error: bad instruction `fldl [fp,#-92]'
/tmp/cc2PJ0en.s:5807: Error: bad instruction `fistpl [fp,#-96]'
/tmp/cc2PJ0en.s:5841: Error: bad instruction `fldl [fp,#-92]'
/tmp/cc2PJ0en.s:5841: Error: bad instruction `fistpl [fp,#-96]'
/tmp/cc2PJ0en.s:5942: Error: selected processor does not support ARM 
mode `flds [fp,#-96]'
/tmp/cc2PJ0en.s:5942: Error: bad instruction `fistpl [fp,#-92]'
/tmp/cc2PJ0en.s:6199: Error: selected processor does not support ARM 
mode `flds [fp,#-96]'
/tmp/cc2PJ0en.s:6199: Error: bad instruction `fistpl [fp,#-92]'
/tmp/cc2PJ0en.s:7854: Error: selected processor does not support ARM 
mode `flds [fp,#-96]'
/tmp/cc2PJ0en.s:7854: Error: bad instruction `fistpl [fp,#-92]'
/tmp/cc2PJ0en.s:7896: Error: bad instruction `fldl [fp,#-92]'
/tmp/cc2PJ0en.s:7896: Error: bad instruction `fistpl [fp,#-96]'
/tmp/cc2PJ0en.s:8388: Error: bad instruction `fldl [fp,#-92]'

It seems that freebasic's gcc backend is still writing asm code in some 
situations. For example, taken from bmod.rbas.c

static inline integer fb_dtosi( double value )
{
        volatile integer result;
        __asm__(
                "fldl %1;"
                "fistpl %0;"
                :"=m" (result)
                :"m" (value)
        );
        return result;
}

If you are curious, the project dir I was working with is here: 
http://hamsterrepublic.com/tmp/android-ohrrpgce-sdl-test.zip

I think this was enough to satiate my curiosity at least until we finish 
Beelzebufo :)

---
James
_______________________________________________
Ohrrpgce mailing list
[email protected]
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org

Reply via email to