Need help with compiling Yeti3d-pvr

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
Post Reply
User avatar
Basil
Insane DCEmu
Insane DCEmu
Posts: 200
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Wed Apr 09, 2008 9:04 am
Has thanked: 13 times
Been thanked: 0
Contact:

Need help with compiling Yeti3d-pvr

Post by Basil »

Hello everyone agian. I need you to help me with Yeti3d-pvr that is placed here http://code.google.com/p/yeti3d-pvr/
I try to compile source code.
An DC Dev Iso it compiles but controls doesnt work at all unlike binary presented at googlecode.
Using latest Kos SVN and MinGW i get this errors:

Code: Select all

$ make -f makefile.dc
rm -f yetiSDL.elf
/usr/sh-elf/bin/sh-elf-gcc -O2 -fomit-frame-pointer -ml -m4-single-only -fno-cro
ssjumping -I/usr/kos/kos/../kos-ports/include -I/usr/kos/kos/include -I/usr/kos/
kos/kernel/arch/dreamcast/include -I/usr/kos/kos/addons/include -D_arch_dreamcas
t -D_arch_sub_pristine -Wall -g -fno-builtin -fno-strict-aliasing -I/usr/kos/kos
/../kos-ports/include/SDL  -ml -m4-single-only -Wl,-Ttext=0x8c010000 -T/usr/kos/
kos/utils/ldscripts/shlelf.xc -nodefaultlibs -L/usr/kos/kos/lib/dreamcast -L/usr
/kos/kos/addons/lib/dreamcast -o yetiSDL.elf  \
                main.o ../../src/data.o ../../src/draw.o ../../src/extra.o ../..
/src/font.o  ../../src/game.o ../../src/maps.o ../../src/model.o ../../src/sprit
es.o ../../src/yeti.o  -lSDL -Wl,--start-group -lkallisti -lc -lgcc -Wl,--end-gr
oup
C:/MinGW/msys/1.0/kos/kos/addons/lib/dreamcast\libSDL.a(SDL_sysjoystick.o): In f
unction `SDL_SYS_JoystickInit':
C:\MinGW\msys\1.0\kos\kos-ports\SDL\base/src/joystick/dc/SDL_sysjoystick.c:80: u
ndefined reference to `maple_device_func'
C:/MinGW/msys/1.0/kos/kos/addons/lib/dreamcast\libSDL.a(SDL_sysjoystick.o): In f
unction `SDL_SYS_JoystickName':
C:\MinGW\msys\1.0\kos\kos-ports\SDL\base/src/joystick/dc/SDL_sysjoystick.c:88: u
ndefined reference to `maple_compat_resolve'
C:/MinGW/msys/1.0/kos/kos/addons/lib/dreamcast\libSDL.a(SDL_sysjoystick.o): In f
unction `SDL_SYS_JoystickUpdate':
C:\MinGW\msys\1.0\kos\kos-ports\SDL\base/src/joystick/dc/SDL_sysjoystick.c:175:
undefined reference to `cont_get_cond'
C:/MinGW/msys/1.0/kos/kos/addons/lib/dreamcast\libSDL.a(SDL_dcevents.o): In func
tion `mouse_update':
C:\MinGW\msys\1.0\kos\kos-ports\SDL\base/src/video/dc/SDL_dcevents.c:92: undefin
ed reference to `maple_first_kb'
C:\MinGW\msys\1.0\kos\kos-ports\SDL\base/src/video/dc/SDL_dcevents.c:92: undefin
ed reference to `maple_compat_resolve'
C:\MinGW\msys\1.0\kos\kos-ports\SDL\base/src/video/dc/SDL_dcevents.c:92: undefin
ed reference to `maple_first_mouse'
C:\MinGW\msys\1.0\kos\kos-ports\SDL\base/src/video/dc/SDL_dcevents.c:92: undefin
ed reference to `mouse_get_cond'
collect2: ld returned 1 exit status
make: *** [yetiSDL.elf] Error 1
By the way i changed SDL path from KOS_CFLAGS += -I$(KOS_BASE)/include/SDL to
KOS_CFLAGS += -I${KOS_BASE}/../kos-ports/include/SDL
P.S. compiled version at google code works very good on real console but no sounds and music so question to OneThirty8 would you like to add that ?
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5652
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: Need help with compiling Yeti3d-pvr

Post by BlueCrab »

If you've updated KOS any time since May, then the problem comes in the fact that the old Maple code was removed in r716. I never fixed SDL since it has more problems than just that anyway and needs serious work before its at all useful.
User avatar
Basil
Insane DCEmu
Insane DCEmu
Posts: 200
Joined: Wed Apr 09, 2008 9:04 am
Has thanked: 13 times
Been thanked: 0
Contact:

Re: Need help with compiling Yeti3d-pvr

Post by Basil »

yep i have updated kos recently, so what's ways to get it working ? Can i take just necessary files from old revision and what directories and files? There is also other unofficial repository svn://emuforge.com/kosports do they have sdl working ?
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5652
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: Need help with compiling Yeti3d-pvr

Post by BlueCrab »

I have no idea what they have working. As for getting things working, you could always do a reverse update to r715 of KOS, and that should at least make it compile. Doing this in the root directory of your checked out repo should work:

Code: Select all

svn update -r 715
EDIT:
I modified the controller stuff in the SDL in the KOS repo to remove all references to the old Maple stuff. I didn't test it at all, but it looks mostly sane. If you update to the newest revision, you should grab those new updates. Please let me know if there's any issues with it, and I'll try to find them.
User avatar
Indiket
DC Developer
DC Developer
Posts: 99
Joined: Sun Sep 05, 2010 5:44 am
Has thanked: 0
Been thanked: 0

Re: Need help with compiling Yeti3d-pvr

Post by Indiket »

Thanks BlueCrab for updating the SDL in the KOS repo, you finally did it hehe ;)

Basil, the SDL of emuforge works without any deprecated code of KOS Maple, so it should compile fine too.
User avatar
Basil
Insane DCEmu
Insane DCEmu
Posts: 200
Joined: Wed Apr 09, 2008 9:04 am
Has thanked: 13 times
Been thanked: 0
Contact:

Re: Need help with compiling Yeti3d-pvr

Post by Basil »

Thank you BlueCrab, I have successfully compiled elf with r742 but i didnt noticed that controls work only in pvr version, in sdl one only keyboards work and it does works on real console. I have problems with getting compiled pvr version now:

Code: Select all

rm -f yetipvr.elf
/usr/sh-elf/bin/sh-elf-gcc -O2 -fomit-frame-pointer -ml -m4-single-only -fno-cro
ssjumping -I/usr/kos/kos/../kos-ports/include -I/usr/kos/kos/include -I/usr/kos/
kos/kernel/arch/dreamcast/include -I/usr/kos/kos/addons/include -D_arch_dreamcas
t -D_arch_sub_pristine -Wall -g -fno-builtin -fno-strict-aliasing -D__PATCH_DRAW
_SPRITE__ -D__PATCH_DRAW_CLIPPED_POLY__ -D__PATCH_MD2__  -ml -m4-single-only -Wl
,-Ttext=0x8c010000 -T/usr/kos/kos/utils/ldscripts/shlelf.xc -nodefaultlibs -L/us
r/kos/kos/lib/dreamcast -L/usr/kos/kos/addons/lib/dreamcast -o yetipvr.elf  \
                main.o pvr_texture.o pvr_sprite.o ../../src/data.o ../../src/dra
w.o ../../src/extra.o ../../src/font.o ../../src/game.o ../../src/maps.o ../../s
rc/model.o ../../src/sprites.o ../../src/yeti.o  -lm -lparallax -ljpeg -Wl,--sta
rt-group -lkallisti -lc -lgcc -Wl,--end-group
../../src/draw.o: In function `draw_sprite':
C:\MinGW\msys\1.0\kos\kos\projects\yeti3d-pvr\platform\sdl/../../src/draw.c:147:
 multiple definition of `draw_sprite'
pvr_sprite.o:C:\MinGW\msys\1.0\kos\kos\projects\yeti3d-pvr\platform\pvr/pvr_spri
te.c:163: first defined here
../../src/draw.o: In function `draw_clipped_poly':
C:\MinGW\msys\1.0\kos\kos\projects\yeti3d-pvr\platform\sdl/../../src/draw.c:450:
 multiple definition of `draw_clipped_poly'
pvr_texture.o:C:\MinGW\msys\1.0\kos\kos\projects\yeti3d-pvr\platform\pvr/pvr_tex
ture.c:96: first defined here
../../src/model.o: In function `md2_clipped_poly':
C:\MinGW\msys\1.0\kos\kos\projects\yeti3d-pvr\platform\sdl/../../src/model.c:112
: multiple definition of `md2_clipped_poly'
pvr_texture.o:C:\MinGW\msys\1.0\kos\kos\projects\yeti3d-pvr\platform\pvr/pvr_tex
ture.c:177: first defined here
c:/mingw/msys/1.0/sh-elf/bin/../lib/gcc/sh-elf/4.5.2/../../../../sh-elf/bin/ld.e
xe: cannot find -lparallax
collect2: ld returned 1 exit status
make: *** [yetipvr.elf] Error 1

$
Make file is here http://pastebin.com/7Uu6vNFm
What should i change ?
User avatar
Indiket
DC Developer
DC Developer
Posts: 99
Joined: Sun Sep 05, 2010 5:44 am
Has thanked: 0
Been thanked: 0

Re: Need help with compiling Yeti3d-pvr

Post by Indiket »

Seems like Makefile cannot find the parallax lib (check that libparallax exists in addons/lib/dreamcast. If not, you can compile it from kos-ports).
User avatar
Basil
Insane DCEmu
Insane DCEmu
Posts: 200
Joined: Wed Apr 09, 2008 9:04 am
Has thanked: 13 times
Been thanked: 0
Contact:

Re: Need help with compiling Yeti3d-pvr

Post by Basil »

I compiled needed libraries but still:

Code: Select all

$ make
rm -f yetipvr.elf
/usr/sh-elf/bin/sh-elf-gcc -O2 -fomit-frame-pointer -ml -m4-single-only -fno-cro
ssjumping -I/usr/kos/kos/../kos-ports/include -I/usr/kos/kos/include -I/usr/kos/
kos/kernel/arch/dreamcast/include -I/usr/kos/kos/addons/include -D_arch_dreamcas
t -D_arch_sub_pristine -Wall -g -fno-builtin -fno-strict-aliasing -D__PATCH_DRAW
_SPRITE__ -D__PATCH_DRAW_CLIPPED_POLY__ -D__PATCH_MD2__  -ml -m4-single-only -Wl
,-Ttext=0x8c010000 -T/usr/kos/kos/utils/ldscripts/shlelf.xc -nodefaultlibs -L/us
r/kos/kos/lib/dreamcast -L/usr/kos/kos/addons/lib/dreamcast -o yetipvr.elf  \
                main.o pvr_texture.o pvr_sprite.o ../../src/data.o ../../src/dra
w.o ../../src/extra.o ../../src/font.o ../../src/game.o ../../src/maps.o ../../s
rc/model.o ../../src/sprites.o ../../src/yeti.o  -lm -lparallax -ljpeg -Wl,--sta
rt-group -lkallisti -lc -lgcc -Wl,--end-group
../../src/draw.o: In function `draw_sprite':
C:\MinGW\msys\1.0\kos\kos\projects\yeti3d-pvr\platform\sdl/../../src/draw.c:147:
 multiple definition of `draw_sprite'
pvr_sprite.o:C:\MinGW\msys\1.0\kos\kos\projects\yeti3d-pvr\platform\pvr/pvr_spri
te.c:163: first defined here
../../src/draw.o: In function `draw_clipped_poly':
C:\MinGW\msys\1.0\kos\kos\projects\yeti3d-pvr\platform\sdl/../../src/draw.c:450:
 multiple definition of `draw_clipped_poly'
pvr_texture.o:C:\MinGW\msys\1.0\kos\kos\projects\yeti3d-pvr\platform\pvr/pvr_tex
ture.c:96: first defined here
../../src/model.o: In function `md2_clipped_poly':
C:\MinGW\msys\1.0\kos\kos\projects\yeti3d-pvr\platform\sdl/../../src/model.c:112
: multiple definition of `md2_clipped_poly'
pvr_texture.o:C:\MinGW\msys\1.0\kos\kos\projects\yeti3d-pvr\platform\pvr/pvr_tex
ture.c:177: first defined here
collect2: ld returned 1 exit status
make: *** [yetipvr.elf] Error 1
User avatar
Indiket
DC Developer
DC Developer
Posts: 99
Joined: Sun Sep 05, 2010 5:44 am
Has thanked: 0
Been thanked: 0

Re: Need help with compiling Yeti3d-pvr

Post by Indiket »

Mmm I think I know what it happens. If you compiled first the SDL example, then you will have the .o files. Therefore, if you then try to compile the PVR files (without cleaning first), it detects the old .o files, so the compiler tries to use them. Because the .o files have the SDL code and not the PVR one, it fails at linking stage.

Easy fix: make clean the SDL makefile, and then make in the PVR one ;)
User avatar
Basil
Insane DCEmu
Insane DCEmu
Posts: 200
Joined: Wed Apr 09, 2008 9:04 am
Has thanked: 13 times
Been thanked: 0
Contact:

Re: Need help with compiling Yeti3d-pvr

Post by Basil »

You are right Indiket, now everything is working! Thank you guys.
Post Reply