Topic: Need some help to build a PPC port for some abscure OS
Hi all,
2 years ago i build a native version of teeworlds 0.5.2 for AmigaOS4 (some non-known os which works on ppc-based machines such as amigaones, pegasos2, sam and some others). Port works well, no problems with graphics corruptions or sound distortions.
There and there some info about os
There is some info about port
So 0.5.2 version works fine, have no problems with sound and look, just it hangs from time to time when connect to wrong server (it was wellknown bug for developers if i remember right and which is fixed already).
Now, i build latest (0.6.1) version and have 2 problems, in which i hope some of you can help me.
First one:
I have fancy characters in the list of servers. I.e. once i come to the list of servers, it shows fine for first 8 or 16 entryes, and then everything fucked up and shows like this:
Second one:
Sound distortion in whole game. Usually for ppc machines it happens when for sound used AUDIO_S16, while for PPC i change it usually to AUDIO_S16MSB, which is fix sound distortion and all works well. But , what is interesting is that for 0.5.2 version even without such a change in sound.cpp all works ok in terms of sounds, and, in 0.6.1 with or without changed : its all the time distortion. What make me think that maybe there is some new code in sounds related routines which is not big-endian worry since 0.6 versions.
To build 0.6.1 version all what i do, is make my own "base/detect.h" file of such kind:
#ifndef BASE_DETECT_H
#define BASE_DETECT_H
#define CONF_ARCH_PPC 1
#define CONF_ARCH_STRING "ppc"
#define CONF_ARCH_ENDIAN_BIG 1
#define CONF_FAMILY_UNIX 1
#define CONF_PLATFORM_HURD 1
#define CONF_PLATFORM_STRING "gnu"
#ifndef CONF_FAMILY_STRING
#define CONF_FAMILY_STRING "unknown"
#endif
#ifndef CONF_PLATFORM_STRING
#define CONF_PLATFORM_STRING "unknown"
#endif
#ifndef CONF_ARCH_STRING
#define CONF_ARCH_STRING "unknown"
#endif
#endif
Then disable ipv6 support blocks in the base/system.c as well as added one little define:
#define sched_yield() IDOS->Delay(1)
(os4 do not have such a fucntion, so i just make it as little-small delay for millisecond, i.e. just to skip it).
There is all changed files from base/* (you can notice there gai.h file, it is used to be header file for linking lib replacement for freeaddrinfo(), getaddrinfo(), inet_aton() and inet_ntop and defination of addrinfo structure).
Linking happens like this: -lpthread -lgai -lfreetype -lsdl -lGL -lGLU
Version of "freetype" (i can only thiink about that, when it come to first bug with graphics corruption) is 2.4.11.
In others, all works. I can connect to servers, play in game, etc. In all the other parts no graphics glitches. Only in refreshing server list and sound disctortions.
Any help is apprecated, thanks.