Caanoo / WIZ Caanoo Toolchain Issues


Dave18

Member
Joined
Mar 16, 2003
Messages
352
Age
49
Hi

I was hoping for some help with GNU compiler and some strange issues I've been having.

If I compile FBA using x86 GNU G++ (v4.4.1) on my Windows PC using MinGW everything works fine and all games run.

If I compile natively on the Pandora (G++ V4.3.3 for ARM) almost everything works apart from most IREM games. Weird as the code is the same as the PC build.

If I cross compile for the Caanoo using G++ V4.2.4 as per the GPH SDK, several more games don't work properly, largely with palette issues, again using identical code to that's working perfectly when build for PC. At first glance I wonder if it is related to the palette code using double data types.

As an experiment I used a fresh install of Ubuntu and installed the latest ARM cross compilers (gcc-4.6-arm-linux-gnueabi-base, g++-4.6-arm-linux-gnueabi and cpp-4.6-arm-linux-gnueabi) Using this the code build absolutely fine but Segfaults on the Caanoo before executing any user code (ie if I put a printf as the first line in main it never gets executed). I used the flags -mcpu=arm926ej-s and -march=armv5te to try and ensure compatible code was produced but this didn't help.

Does anyone know if V4.2.4 does sometimes produce buggy code and how to avoid it, or better still how to produce compatible code using a newer version such as 4.6?

Also, is there a compiler option to force all double datatypes to be treated as floats? I couldn't find anything in the docs.

Thanks

Dave
 
Dave18 said:
I wonder if it is related to the palette code using double data types.
For what I understood, double are somehow emulated as the CPU cannot handle 64b entities, so there might be a bug there

Dave18 said:
Also, is there a compiler option to force all double datatypes to be treated as floats? I couldn't find anything in the docs.
#define double float

also -fsigned-char backed my ass more than once (this is the defaut on x86 while not on arm)
 
Last edited by a moderator:
Thanks, some improvement. -fsigned-char fixes the IREM driver on both Pandora and Caanoo. Caanoo still has palette issues though on galaxian drivers.

I take it I would have to add #define double float to every source files (of which there a hundreds)? I tried adding it as a compiler option but stdlib.h started throwing error messages.

Edit - I manually changed the doubles to floats in the galaxian driver and it didn't fix the palette issues so looks like that was a red herring.

Dave
 
Back
Top