Set To Compile A Working Version Of Daphne Emu


idarwin

Still Fresh
Joined
Jun 22, 2011
Messages
74
Age
45
Location
Buenos Aires, Argentina
Hello guys,

I'm giving a last chance to all this... and I'm setting to try compiling a working version of the Daphne Emu for the Caanoo. I'll need some help from you, the experienced and well-disposed developers of the forum in order to enrich the world of the Caanoo.

Please help me, help the Caanoo and this community.

Ok, that said, I've downloaded the Caanoo compiler: gcc-4.2.4-glibc-2.7-eabi

also downloaded the Daphne Emu source, set the Makefile.vars to the Gp2x version and modded some stuff from it to work with my enviroment. Although I'm not sure that's ok, and I suspect I'm missing some stuff. Also, I've downloaded all the headers needed to compile mentioned on the readme file of the Daphne Emu source.

As in the readme file:

SDL 1.2 (tested with 1.2.5, older versions may work fine)
SDL NOTE:
To have minimum hardware acceleration, SDL needs to be built with "xv" support.
"OpenGL" support is also recommended for better hardware acceleration.
Ogg Vorbis (libogg, libvorbis, libvorbisfile)
Zlib
GLEW (http://glew.sourceforge.net)
libvldp2.so

I'm also attaching the Makefile.vars file so you can see it (I know it's horrible the directory structure I've choosen).

The thing is I'm getting this result from the compiler and I don't understand what it means; maybe basic noob stuff... but at least I'm trying.

Makefile:60: daphne.d: No such file or directory
set -e; /home/ezequiel/Desktop/gcc-4.2.4-glibc-2.7-eabi/bin/arm-gph-linux-gnueabi-g++ -MM -g -DCPU_DEBUG `/home/ezequiel/Desktop/gcc-4.2.4-glibc-2.7-eabi/arm-gph-linux-gnueabi/sys-root/usr/bin/sdl-config --cflags` -DUNIX -DLINUX -DNATIVE_CPU_ARM -DGP2X -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -I/home/ezequiel/Desktop/gcc-4.2.4-glibc-2.7-eabi/include/ -DSTATIC_VLDP -Wall -Werror daphne.cpp \
| sed 's^(daphne)\.o[ :]*^\1.o daphne.d : ^g' > daphne.d; \
[ -s daphne.d ] || rm -f daphne.d
daphne.cpp:49:22: error: SDL_main.h: No such file or directory
In file included from daphne.cpp:65:
io/input.h:55:17: error: SDL.h: No such file or directory



Best

E.-

Sorry I posted this in the wrong section :(


Ok, more News. I've somehow copied the SDL header files from the xxx directory to my include folder and it began compiling. I still have the first warning anyway telling me that the daphne.d file is missing but it began doing stuff anyway. Now I have a new error:

ldp-vldp.cpp: In member function 'virtual bool ldp_vldp::init_player()':
ldp-vldp.cpp:190: error: 'struct vldp_in_info' has no member named 'prepare_yuy2_frame'
ldp-vldp.cpp:191: error: 'struct vldp_in_info' has no member named 'display_yuy2_frame'
make[1]: *** [ldp-vldp.o] Error 1
make[1]: Leaving directory `/home/ezequiel/Desktop/src/ldp-out'
make: *** [sub] Error 2

Any ideas or help would be appretiated.

Best

E.-
 
Last edited by a moderator:
Try to run sdl-config
Code:
$ /home/ezequiel/Desktop/gcc-4.2.4-glibc-2.7-eabi/arm-gph-linux-gnueabi/sys-root/usr/bin/sdl-config --cflags
and see the directories metioned on -I flags. Mine outputs this:
Code:
-I/home/rodolfo/toolchain/GPH_SDK-caanoo/DGE/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
So, SDL.h should be in the folder /home/rodolfo/toolchain/GPH_SDK-caanoo/DGE/include/SDL.

Be sure you don't have deleted these files ;)
 
Rodolfo said:
Try to run sdl-config
Code:
$ /home/ezequiel/Desktop/gcc-4.2.4-glibc-2.7-eabi/arm-gph-linux-gnueabi/sys-root/usr/bin/sdl-config --cflags
and see the directories metioned on -I flags. Mine outputs this:
Code:
-I/home/rodolfo/toolchain/GPH_SDK-caanoo/DGE/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
So, SDL.h should be in the folder /home/rodolfo/toolchain/GPH_SDK-caanoo/DGE/include/SDL.

Be sure you don't have deleted these files ;)

Thank you Rodolfo; it seems that my sdl-config tool points to an inexistent directory ;)

Let me see if can handle this.

Best.

E.-
 
Last edited by a moderator:
OK, I've reinstalled the complete GPH SDK, and read the Huge and boring PDF that comes with it. Also I've googled like 40 pages looking for sdl-config; the thing is that when I run this:

/opt/toolchain-caanoo/arm-gph-linux-gnueabi/sys-root/usr/bin/sdl-config --libs

the result is:


-L/home/hani/work/source/librarys/SDL/SDL-1.2.13/output/lib -Wl,-rpath,/home/hani/work/source/librarys/SDL/SDL-1.2.13/output/lib -lSDL -lpthread

I do not have any hani directory, or any directory like that. Where do I change that? I've added the env vars as said on the git.gph.com site.

Thanks.

E.-
 
Just edit the sdl-config (it's a shell script, ie a text file): the library files are inside [toolchain root/]DGE/lib/target/ directory.

So change the prefix definition line for something like that:
Code:
prefix=/opt/toolchain-caanoo/DGE

The libdir line also:
Code:
libdir=${prefix}/lib/target

It should work.
 
idarwin said:
OK, I've reinstalled the complete GPH SDK, and read the Huge and boring PDF that comes with it. Also I've googled like 40 pages looking for sdl-config; the thing is that when I run this:

/opt/toolchain-caanoo/arm-gph-linux-gnueabi/sys-root/usr/bin/sdl-config --libs

the result is:


-L/home/hani/work/source/librarys/SDL/SDL-1.2.13/output/lib -Wl,-rpath,/home/hani/work/source/librarys/SDL/SDL-1.2.13/output/lib -lSDL -lpthread

I do not have any hani directory, or any directory like that. Where do I change that? I've added the env vars as said on the git.gph.com site.

Thanks.

E.-
Change the exec_prefix or prefix directory in the sdl-config. I have mine set to /usr/local/GPH_SDK which is where my sdk is located.
 
Last edited by a moderator:
Thank you guys; now I keep getting the error I copy below. I registered and wrote the guys from daphne-emu.com directly. I read the code and it seems to be a line added just for the old gp2x. There is a member missing from a struct... I've checked the includes and seem to be OK. I did a grep -e searching for prepare_yuy2_frame and it seems it's defined in a folder called vldp-blabla-gp2x-hack.

make[1]: Leaving directory `/home/ezequiel/Desktop/daphne-src/ldp-out'
make[1]: Entering directory `/home/ezequiel/Desktop/daphne-src/ldp-out'
/opt/toolchain-caanoo/bin/arm-gph-linux-gnueabi-g++ -g -DCPU_DEBUG `/opt/toolchain-caanoo/arm-gph-linux-gnueabi/sys-root/usr/bin/sdl-config --cflags` -DUNIX -DLINUX -DNATIVE_CPU_ARM -DGP2X -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -I/opt/toolchain-caanoo/arm-gph-linux-gnueabi/sys-root/usr/include -DSTATIC_VLDP -Wall -Werror -c ldp-vldp.cpp -o ldp-vldp.o
ldp-vldp.cpp: In member function 'virtual bool ldp_vldp::init_player()':
ldp-vldp.cpp:191: error: 'struct vldp_in_info' has no member named 'prepare_yuy2_frame'
ldp-vldp.cpp:192: error: 'struct vldp_in_info' has no member named 'display_yuy2_frame'
make[1]: *** [ldp-vldp.o] Error 1
make[1]: Leaving directory `/home/ezequiel/Desktop/daphne-src/ldp-out'
make: *** [sub] Error 2

Best

E.-
 
UPDATE:

I haven't received an answer yet from Matt Owny from daphne-emu.

I kept reviewing the code and realized that I was compiling the vldp library staticaly; and when you do that you must compile the dll first. I changed the flag on the Makefile, but I still have the same issue.

So, I decided to change the Makefile so it won't compile the gp2x (that makes to avoid the compilation of every ifdef gp2x on the code) and it went't ok but further ahead it gave a different error.

I wonder, should I compile with de GP2x directive, or without?

/opt/toolchain-caanoo/bin/arm-gph-linux-gnueabi-g++ -g -DCPU_DEBUG `/opt/toolchain-caanoo/arm-gph-linux-gnueabi/sys-root/usr/bin/sdl-config --cflags` -DUNIX -DLINUX -DNATIVE_CPU_ARM -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -I/opt/toolchain-caanoo/arm-gph-linux-gnueabi/sys-root/usr/include -Wall -Werror -c i86dasm.cpp -o i86dasm.o
cc1plus: warnings being treated as errors
i86dasm.cpp: In function 'void outhex(char, int, int, int, int)':
i86dasm.cpp:977: warning: comparison is always false due to limited range of data type
make[1]: *** [i86dasm.o] Error 1
make[1]: Leaving directory `/home/ezequiel/Desktop/daphne-src/cpu/x86'
make: *** [sub] Error 2


Help would be appretiated.

Best,

E.-
 
i took a "quick" look at the code, the problem with the error is that GCC interprets "char" as unsigned but the code assumes it's signed.

Usually that's just a Warning, but the code is compiled using -Werror directive, which means the compiler should treat all warnings as errors. you _might_ want to remove that, but i dont think it's good because otherwise you might easily overlook real problems.

so you need to add -fsigned-char as a compiler directive; thats the DFLAGS variable, near -fexpensive-optimizations for example in Makefile.vars.linux_x86 maybe there are even more makefiles you need to modify.

i dont know what version is good to start from. The GP2X version uses the gp2x's coprocessor to decode the videos - and there seems to be a lot GP2X specifics all around the code. so i dont know, you might have more luck with the linux version...

to get the GP2X version working with 'prepare_yuy2_frame' ... i think you need to rename the vldp2 folder to vldp2_original (or the like) and the vldp2_gp2xhacking back to vldp2.
 
Thank you Crow!

Good news fellas... we are almost done I think. With all your help I was able to pass almost all these errors.

Crow: You were right about everything; I renamed the Gp2x_hack directory, and replaced it... added the flag to the compiler that you mentioned and I went great. Also I was able to compile up to here using the GP2X var, which means we are compiling the opt code for the Gp. Also VLDP compiled great.

So, why aren't we drinking champagne yet dude? you might be asking... or maybe... cut the c**p and start talking.

The thing is that the compiler threw an error with a sdl library that is inside the SDL I downloaded from GPH... actually the most odd thing that it's a binary file that it has a fixed inexistent directory hardcoded in it. How do I change this?

At the end I copy the complete output... but I want to show you specifically this line:

/opt/toolchain-caanoo/arm-gph-linux-gnueabi/sys-root/usr/lib/libSDL.a(SDL_fbevents.o): In function `handle_tslib':
/home/hani/work/source/librarys/SDL/SDL-1.2.13/./src/video/fbcon/SDL_fbevents.c:879: undefined reference to `ts_read'

if I open the bin file libSDL.a it has the damn directory about hani again... but this is no sh... so what the heck?

Complete:


/opt/toolchain-caanoo/bin/arm-gph-linux-gnueabi-g++ -g -DCPU_DEBUG -fsigned-char ldp-out/*.o cpu/*.o game/*.o io/*.o timer/*.o ldp-in/*.o video/*.o sound/*.o daphne.o cpu/x86/*.o scoreboard/*.o vldp2/vldp/vldp.o vldp2/vldp/vldp_internal.o vldp2/vldp/mpegscan.o vldp2/libvo/video_out_null.o vldp2/940/interface_920.o -o ../daphne2x `/opt/toolchain-caanoo/arm-gph-linux-gnueabi/sys-root/usr/bin/sdl-config --libs` -L /opt/toolchain-caanoo/arm-gph-linux-gnueabi/sys-root/usr/lib -static -lz -lvorbisidec -ldl
game/singe.o: In function `singe::init()':
/home/ezequiel/Desktop/daphne-src/game/singe.cpp:74: warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
io/network.o: In function `net_send_data_to_server()':
/home/ezequiel/Desktop/daphne-src/io/network.cpp:549: warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/opt/toolchain-caanoo/arm-gph-linux-gnueabi/sys-root/usr/lib/libSDL.a(SDL_fbevents.o): In function `handle_tslib':
/home/hani/work/source/librarys/SDL/SDL-1.2.13/./src/video/fbcon/SDL_fbevents.c:879: undefined reference to `ts_read'
/opt/toolchain-caanoo/arm-gph-linux-gnueabi/sys-root/usr/lib/libSDL.a(SDL_fbevents.o): In function `FB_OpenMouse':
/home/hani/work/source/librarys/SDL/SDL-1.2.13/./src/video/fbcon/SDL_fbevents.c:688: undefined reference to `ts_open'
/home/hani/work/source/librarys/SDL/SDL-1.2.13/./src/video/fbcon/SDL_fbevents.c:689: undefined reference to `ts_config'
/home/hani/work/source/librarys/SDL/SDL-1.2.13/./src/video/fbcon/SDL_fbevents.c:695: undefined reference to `ts_fd'
/opt/toolchain-caanoo/arm-gph-linux-gnueabi/sys-root/usr/lib/libSDL.a(SDL_fbevents.o): In function `FB_CloseMouse':
/home/hani/work/source/librarys/SDL/SDL-1.2.13/./src/video/fbcon/SDL_fbevents.c:463: undefined reference to `ts_close'
collect2: ld returned 1 exit status


Best

E.-
 
I'm having the same problem with something I'm working on, but adding -lts doesn't work because there's no static version of the ts library...

Thoughts?


crow_riot said:
just add -lts next to -ldl :)
 
Last edited by a moderator:
stpat said:
I'm having the same problem with something I'm working on, but adding -lts doesn't work because there's no static version of the ts library...

Thoughts?


crow_riot said:
just add -lts next to -ldl :)

just use dynamic linking then?

or go and compile tslib yourself: http://tslib.berlios.de/ ?
 
Last edited by a moderator:
Thank you again; so what's the ldl flag for? Looks like something about dynamic linking... but I'm just guessing.

I made the change and now I just have this one error; it says that it can't find the -lts

Maybe I'm missing a library?

/opt/toolchain-caanoo/bin/arm-gph-linux-gnueabi-g++ -g -DCPU_DEBUG -fsigned-char ldp-out/*.o cpu/*.o game/*.o io/*.o timer/*.o ldp-in/*.o video/*.o sound/*.o daphne.o cpu/x86/*.o scoreboard/*.o vldp2/vldp/vldp.o vldp2/vldp/vldp_internal.o vldp2/vldp/mpegscan.o vldp2/libvo/video_out_null.o vldp2/940/interface_920.o -o ../daphne2x `/opt/toolchain-caanoo/arm-gph-linux-gnueabi/sys-root/usr/bin/sdl-config --libs` -L /opt/toolchain-caanoo/arm-gph-linux-gnueabi/sys-root/usr/lib -static -lz -lvorbisidec -ldl -lts
game/singe.o: In function `singe::init()':
/home/ezequiel/Desktop/daphne-src/game/singe.cpp:74: warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/opt/toolchain-caanoo/bin/../lib/gcc/arm-gph-linux-gnueabi/4.2.4/../../../../arm-gph-linux-gnueabi/bin/ld: cannot find -lts
collect2: ld returned 1 exit status
make: *** [all] Error 1

E.-



Edit: SORRY... I've just read the other answer... I'll try compiling it. ;)
 
YAHOOOO it compiled :p (but it doesn't seem to work)

When you execute it... seems to hang on the loading stage. I'm attaching the first non-working binary for you all to check. Also I've added the ini file. I'll prepare the image and icon soon for you all... my brother is a graphic designer so we'll ask him a favor ;)

I went through the last error by deleting the static flag on the compiler.

I'll attach a complete log of the compile process soon.

Best

E.-

First Daphne for Caanoo compilation: http://www.4shared.com/file/8TCKy1Mk/daphne.html
Compilation log:http://www.4shared.com/file/YXo5Ubmq/compile.html?
 
GREAT! you are the the most stubborn guy i ever known! you will have this on caanoo and NOW is real! thanks and hope in someone that can run this on the caanoo
;)
 
idarwin said:
YAHOOOO it compiled :p (but it doesn't seem to work)

When you execute it... seems to hang on the loading stage. I'm attaching the first non-working binary for you all to check. Also I've added the ini file. I'll prepare the image and icon soon for you all... my brother is a graphic designer so we'll ask him a favor ;)

I went through the last error by deleting the static flag on the compiler.

I'll attach a complete log of the compile process soon.

Best

E.-

First Daphne for Caanoo compilation: http://www.4shared.com/file/8TCKy1Mk/daphne.html
Compilation log:http://www.4shared.com/file/YXo5Ubmq/compile.html?

yes, hangs up on loading screen. But I'm really looking forward to this !!!!
 
Last edited by a moderator:
Just out of curiousity, how will this work on the caanoo exactly? Don't you need a DVD with the audio and video files for a game to work in conjunction with Daphne? I thought Daphne was more or less a laserdisc controller emulator (if you know what I mean).





spn-x said:
idarwin said:
YAHOOOO it compiled :p (but it doesn't seem to work)

When you execute it... seems to hang on the loading stage. I'm attaching the first non-working binary for you all to check. Also I've added the ini file. I'll prepare the image and icon soon for you all... my brother is a graphic designer so we'll ask him a favor ;)

I went through the last error by deleting the static flag on the compiler.

I'll attach a complete log of the compile process soon.

Best

E.-

First Daphne for Caanoo compilation: http://www.4shared.com/file/8TCKy1Mk/daphne.html
Compilation log:http://www.4shared.com/file/YXo5Ubmq/compile.html?

yes, hangs up on loading screen. But I'm really looking forward to this !!!!
 
Last edited by a moderator:
Thank you again guys... I'm wondering if one of you could be so kind to debug the thing. I bought the USB cable in order to do it but it won't be here until next sat :(
 
Ok guys; I've managed to get a USB cable for this (don't ask me how, long funny story). I have it but NOT for my surprise when I plug it to my Fedora; nothing happens (I know this is no damn WindoZ).

How do I manage to connect with gdb to this thing... I've read some posts on the forum but they are quite vague about the procedure.

Again...as always... help is appretiated (I'm learning from you, be patient... I'll give all back ur effort to the community)

E.-

Edit: I've downloaded and tried the usbnet posted in the forum, and run it... the screen flashes and goes back to the menu.
 
Back
Top