iris 3d issue

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
dciris
DCEmu Junior
DCEmu Junior
Posts: 42
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Thu Feb 06, 2003 3:51 pm
Has thanked: 0
Been thanked: 0

iris 3d issue

Post by dciris »

When trying to compile samples boxed with Iris I get this type of error statement and I can't figure it out its messing me up?

/usr/local/dc/sh-elf/lib/gcc-lib/sh-elf/3.0.3/../../../../sh-elf/bin/ld:
cannot
find -ldcutils
collect2: ld returned 1 exit status
make: *** [anim_iris.elf] Error 1


Ps: The Kos environment compiles nicely but my elfs are double the size of the ones boxed with the samples? does any one know why?

Thanks to anyone taking the time to answer I am very grateful :D
Bombshell
DC Developer
DC Developer
Posts: 179
Joined: Wed Nov 20, 2002 8:29 pm
Has thanked: 0
Been thanked: 0

Post by Bombshell »

From the makefile (should look something like this)
$(TARGET): $(OBJS)

$(KOS_CC) $(KOS_CFLAGS) $(KOS_LDFLAGS) -o $(TARGET) $(KOS_START) \
$(OBJS) $(OBJEXTRA) -L$(KOS_BASE)/lib -lkallisti -lm -lgcc -ldcutils
Remove the bolded statement it should work I dont think the Iris engine uses it but I may be wrong. I think it is just standard makefile for KOS
dciris
DCEmu Junior
DCEmu Junior
Posts: 42
Joined: Thu Feb 06, 2003 3:51 pm
Has thanked: 0
Been thanked: 0

Post by dciris »

Man thanks a million that has baffled me for a real long time and now I can finally compile!!!!!!!!!!Sooo Happy :lol:

On another note
You wouldn't by any chance know why .elfs are created double their size I have no iris proof but the sample I compiled (anim) was close to 2 megs I don't know if thats regular or what but other samples with original elfs complie to double the original size

P.S. Thanks again
Bombshell
DC Developer
DC Developer
Posts: 179
Joined: Wed Nov 20, 2002 8:29 pm
Has thanked: 0
Been thanked: 0

Post by Bombshell »

Thats true all you have to do to get it to run on dc is go

sh-elf-objcopy -O binary <your.elf> <yournew.bin>

Then burn it and load it up should work fine as long as your have everything that is needed on the disc

Also make sure to set your path to

PATH=/usr/local/dc/sh-elf/bin/:$PATH

That is where I installed my sh compilers change accordingly later glad I could help
dciris
DCEmu Junior
DCEmu Junior
Posts: 42
Joined: Thu Feb 06, 2003 3:51 pm
Has thanked: 0
Been thanked: 0

Post by dciris »

I got everything running on dc via a serial cable but the actual files fully compiled by me are always double the size of the ones boxed with the source...I don't get it :roll:
reaper2k2
DC Developer
DC Developer
Posts: 2648
Joined: Sun Mar 24, 2002 7:48 pm
Has thanked: 0
Been thanked: 0
Contact:

Post by reaper2k2 »

compiler setting matter for bin sizes thats why


-o1 for a smaller bin then -o3 etc and other things make the bin larger

-oo can make it smaller etc again thats all it is

turn it into a bin it be the same size then you must not have strip on
http://homebrew.dcemulation.com/dcgames/ *homebrew webbrowser games *

http://r2k2gate.topcities.com *dev site and my releases*
Image
Im' a Commodorian are you?
dciris
DCEmu Junior
DCEmu Junior
Posts: 42
Joined: Thu Feb 06, 2003 3:51 pm
Has thanked: 0
Been thanked: 0

Post by dciris »

Yet again you guys hook it up thanks very much... :lol:
nymus
DC Developer
DC Developer
Posts: 968
Joined: Tue Feb 11, 2003 4:12 pm
Location: In a Dream
Has thanked: 5 times
Been thanked: 6 times

Post by nymus »

I think your elfs are huge because they are not stripped of symbols.

If you load the elf in a gex-editor eg KDE's HexEdit, you'll be able to see function names etc.

To remove these symbols, type "sh-elf-strip" [filename.elf] (If you built your environment using target=sh-elf)

you could also run "make dist" which strips the symbols for you.
behold the mind
inspired by Dreamcast
dciris
DCEmu Junior
DCEmu Junior
Posts: 42
Joined: Thu Feb 06, 2003 3:51 pm
Has thanked: 0
Been thanked: 0

Post by dciris »

Man thanks for the post its been a while since I got to the forum...
But now that I'm compiling the size of my .elf is becoming more and more of a problem I'm gonna look into what you said. Is "make-dist" a command you use while in the environment? I know I know I should just tryit but I figured I'd ask in case when I do try it it gives me an error thanks very much I will now pursue my mission of smaller elf sizes
nymus
DC Developer
DC Developer
Posts: 968
Joined: Tue Feb 11, 2003 4:12 pm
Location: In a Dream
Has thanked: 5 times
Been thanked: 6 times

Post by nymus »

"make-dist" is an option in the makefile. It's just a common name used in place of "sh-elf-strip [filename]"

Just open the makefile in a text editor and see for yourself
behold the mind
inspired by Dreamcast
dciris
DCEmu Junior
DCEmu Junior
Posts: 42
Joined: Thu Feb 06, 2003 3:51 pm
Has thanked: 0
Been thanked: 0

Post by dciris »

Its been a very long time since my last post thanks a million for all the previous help to annoying questions...Currently I am still having trouble with huge .elf file sizes I can't for the life of me figure how to minimize their size by using the make file. This is the make file I am currently using I would really appreciate any help if possible. (still looking into a hex editor)

#
# Iris sample
# Olivier/Omar for lab-console
# Jully 2002
#

# Files ---------------------------------------------------------------------------
TARGET = drawprimitive_iris.elf

OBJS = main.o
INCLUDE_PATH = /usr/local/include
INCLUDE_IRIS = $(INCLUDE_PATH)/iris3d
INCLUDE_OPCODE = $(INCLUDE_PATH)/opcode
KOS_CFLAGS += -I/usr/local/include/stlport -I$(INCLUDE_IRIS)/ -I$(INCLUDE_OPCODE)/
KOS_LDFLAGS += -L/usr/local/lib/
IRIS_LIBS = -lopcode -liris3d -lstdc++ -lpng -lz -lgl -ldcplib -lm
# Base ----------------------------------------------------------------------------
all: $(TARGET)
include $(KOS_BASE)/Makefile.rules

# Link ----------------------------------------------------------------------------
$(TARGET): $(OBJS) romdisk.o
$(KOS_CC) $(KOS_CFLAGS) $(KOS_LDFLAGS) -o $(TARGET) $(KOS_START) $(OBJS) romdisk.o $(OBJEXTRA) $(IRIS_LIBS) $(KOS_LIBS)

# ROM Disk Creation ---------------------------------------------------------------
rd :
$(KOS_GENROMFS) -f romdisk.img -d romdisk -v

romdisk.img :
$(KOS_GENROMFS) -f romdisk.img -d romdisk -v

romdisk.o : romdisk.img
$(KOS_BASE)/utils/bin2o/bin2o romdisk.img romdisk romdisk.o

# Upload program on Dreamcast using $KOS_LOADER -----------------------------------
run: $(TARGET)
$(KOS_LOADER) $(TARGET)

# Miscellaneous -------------------------------------------------------------------
dist:
rm -f $(OBJS)
$(KOS_STRIP) $(TARGET)

clean: clean_elf
-rm -f $(OBJS)

clean_elf:
-rm -f $(TARGET) romdisk.*

#----------------------------------------------------------------------------------
dciris
DCEmu Junior
DCEmu Junior
Posts: 42
Joined: Thu Feb 06, 2003 3:51 pm
Has thanked: 0
Been thanked: 0

Post by dciris »

Guys I'm sorry for asking some of the most un interesting/annoying questions ever :( Thanks a million though for baring with me FINALLY I have figured out with much help of course that after your .elf is compiled one can simply use (make dist) to optimize the files size. So happy this works...Sorry for all the reposts and annoyingness.... Yet I HAVE ANOTHER IRIS 3D ISSUE... Recently I been trying to incorperate .ogg files into my program but I have traced that the reason this does not work is that the IRIS make file is different than the KOS makefile housed with the hello ogg example file. I have spent a lot of hours trying to figure out how to modify Iris makefile I am using to allow the .ogg file commands to compile I will post both makefiles in hope someone can help me out thanks guys...
-----------------------------------------------------------------------------------------------
IRIS 3D make file I use
-----------------------------------------------------------------------------------------------
#
# Iris sample
# Olivier/Omar for lab-console
# Jully 2002
#

# Files ---------------------------------------------------------------------------
TARGET = select.elf

OBJS = main.o
INCLUDE_PATH = /usr/local/include
INCLUDE_IRIS = $(INCLUDE_PATH)/iris3d
INCLUDE_OPCODE = $(INCLUDE_PATH)/opcode
KOS_CFLAGS += -I/usr/local/include/stlport -I$(INCLUDE_IRIS)/ -I$(INCLUDE_OPCODE)/
KOS_LDFLAGS += -L/usr/local/lib/
IRIS_LIBS = -lopcode -liris3d -lstdc++ -lpng -lz -lgl -ldcplib -lm
# Base ----------------------------------------------------------------------------
all: $(TARGET)
include $(KOS_BASE)/Makefile.rules

# Link ----------------------------------------------------------------------------
$(TARGET): $(OBJS) romdisk.o
$(KOS_CC) $(KOS_CFLAGS) $(KOS_LDFLAGS) -o $(TARGET) $(KOS_START) $(OBJS) romdisk.o $(OBJEXTRA) $(IRIS_LIBS) $(KOS_LIBS)

# ROM Disk Creation ---------------------------------------------------------------
rd :
$(KOS_GENROMFS) -f romdisk.img -d romdisk -v

romdisk.img :
$(KOS_GENROMFS) -f romdisk.img -d romdisk -v

romdisk.o : romdisk.img
$(KOS_BASE)/utils/bin2o/bin2o romdisk.img romdisk romdisk.o

# Upload program on Dreamcast using $KOS_LOADER -----------------------------------
run: $(TARGET)
$(KOS_LOADER) $(TARGET)

# Miscellaneous -------------------------------------------------------------------
dist:
rm -f $(OBJS)
$(KOS_STRIP) $(TARGET)

clean: clean_elf
-rm -f $(OBJS)

clean_elf:
-rm -f $(TARGET) romdisk.*

#----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
THIS IS THE MAKEFILE HELLO-OGG USES TO COMPILE A OGG FILE
-----------------------------------------------------------------------------------------------
# KallistiOS Ogg/Vorbis Decoder Library
#
# Library Makefile
# (c)2001 Thorsten Titze
# Based on KOS Makefiles by Dan Potter

TARGET = vorbistest.elf
OBJS = romdisk.o vorbistest.o

all: clean $(TARGET)

include $(KOS_BASE)/Makefile.rules

clean:
-rm -f $(TARGET) $(OBJS)
-rm -f romdisk.o romdisk.img

# You can choose a decoder to test below. Tremor is the integer-only
# version, and oggvorbisplay is the full FP version.
$(TARGET): $(OBJS)
$(KOS_CC) $(KOS_CFLAGS) $(KOS_LDFLAGS) -o $(TARGET) $(KOS_START) \
$(OBJS) $(DATAOBJS) $(OBJEXTRA) -L$(KOS_BASE)/lib -ltremor -lm -lkallisti -lgcc
# $(OBJS) $(DATAOBJS) $(OBJEXTRA) -L$(KOS_BASE)/lib -loggvorbisplay -ldcutils -lm -lkallisti -lgcc

romdisk.img:
$(KOS_GENROMFS) -f romdisk.img -d romdisk -v

romdisk.o: romdisk.img
$(KOS_BASE)/utils/bin2o/bin2o romdisk.img romdisk romdisk.o

run:
$(KOS_LOADER) $(TARGET)
# dc-tool -p -b 115200 -x $(TARGET)

dist:
rm -f $(OBJS) romdisk.o romdisk.img
$(KOS_STRIP) $(TARGET)
------------------------------------------------------------------------------------------------
THANKS A MILLION FOR LOOKING INTO THIS
Warmachine
DCEmu Veteran
DCEmu Veteran
Posts: 4306
Joined: Sat Nov 30, 2002 7:01 pm
Location: San Jose
Has thanked: 0
Been thanked: 0
Contact:

Post by Warmachine »

Can I ask what you are making?
:headbang: Dreamcast :headbang:
dciris
DCEmu Junior
DCEmu Junior
Posts: 42
Joined: Thu Feb 06, 2003 3:51 pm
Has thanked: 0
Been thanked: 0

Post by dciris »

I am trying to make a demo game with a title screen, player select and some sort of game play I would like to use the .ogg for a consitent loop in the player select.
Warmachine
DCEmu Veteran
DCEmu Veteran
Posts: 4306
Joined: Sat Nov 30, 2002 7:01 pm
Location: San Jose
Has thanked: 0
Been thanked: 0
Contact:

Post by Warmachine »

dciris wrote:I am trying to make a demo game with a title screen, player select and some sort of game play I would like to use the .ogg for a consitent loop in the player select.
Oh okay, tell us if it works.
:headbang: Dreamcast :headbang:
ZacMc
DCEmu Super Fan
DCEmu Super Fan
Posts: 2715
Joined: Fri Nov 16, 2001 11:16 am
Location: Milwaukee, WI
Has thanked: 0
Been thanked: 0
Contact:

Post by ZacMc »

You could try asking for help in the iris3d forum.
Warmachine
DCEmu Veteran
DCEmu Veteran
Posts: 4306
Joined: Sat Nov 30, 2002 7:01 pm
Location: San Jose
Has thanked: 0
Been thanked: 0
Contact:

Post by Warmachine »

I cant wait til they release there games :D
:headbang: Dreamcast :headbang:
Post Reply