Compiling LTE engine with latest pspsdk

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
nikmes
Posts: 26
Joined: Tue May 20, 2008 6:00 pm

Compiling LTE engine with latest pspsdk

Post by nikmes »

Hi,
I started this thread to get help from the community to compile the LTE engine on a linux machine that is running the latest sdk.

You will need to install zlib and libmad before you begin:

svn checkout svn://svn.ps2dev.org/psp/trunk/libmad
svn checkout svn://svn.pspdev.org/psp/trunk/zlib

After downloading the latest source from http://www.ltestudios.com/ and i tried to compile i get the following warnings and errors:

Warning:

CPlanarShadow.cpp:367:2: warning: no newline at end of file

I overcome this by just adding the extra line.

Error:

CAnimatedMeshSceneNode.h:77: warning: extra qualification ‘engine::scene::CAnimatedMeshSceneNode::’ on member ‘addCelshadingSceneNode’

From what i gather from the internet http://www.fourmilab.ch/fourmilog/archi ... 00699.html
this is due to an “enhancement” of GCC.

To overcome the problem we need to remove the class qualifier from the inline function declaration for every case. Just remove based on which files the compiler is complaining.

I also modify the Makefile. Access to libmad directory was using the symbol libmad/ but instead it should use libmad\

In CShadowVolumeSceneNode.cpp i included the header assert.h. The compiler dose not like the assert call if this header is not specified.

still compiling is taking time.....




[/b]
nikmes
Posts: 26
Joined: Tue May 20, 2008 6:00 pm

Compiled and run most of the examples

Post by nikmes »

Hi,
Just compiled the example with the newly compiled engine and everything looks fine.

Next think will be to compile the LTE engine with the latest pspgl and see if it works
nikmes
Posts: 26
Joined: Tue May 20, 2008 6:00 pm

Missed this

Post by nikmes »

You also need to modify the file below
CSoftwareDriver2.h
and on line 73 replace with line below:

virtual core::dimension2d<s32> getCurrentRenderTargetSize();
nikmes
Posts: 26
Joined: Tue May 20, 2008 6:00 pm

After linkin LTE with latest PSPGL i got the following.

Post by nikmes »

../../libs/libengine.a(CSoftwareDriver2.o): In function `engine::video::CSoftwareDriver2::drawCelshadingMultitexture(engine::video::CSoftwareDriver2::__verttex*, unsigned short const*, int)':
CSoftwareDriver2.cpp:(.text+0xc78): undefined reference to `glBlendFuncFixPSP'
../../libs/libengine.a(CSoftwareDriver2.o): In function `engine::video::COpenGLMultipassRender_REFLECTION_2_LAYER::setPass(int)':
CSoftwareDriver2.cpp:(.text._ZN6engine5video41COpenGLMultipassRender_REFLECTION_2_LAYER7setPassEi[engine::video::COpenGLMultipassRender_REFLECTION_2_LAYER::setPass(int)]+0x60): undefined reference to `glBlendFuncFixPSP'
collect2: ld returned 1 exit status
make: *** [SpecialFX.elf] Error 1
nikmes
Posts: 26
Joined: Tue May 20, 2008 6:00 pm

Success with new PSPGL!!

Post by nikmes »

ok,
got over that with the following
i replaced this calls from LTE engine glBlendFuncFixPSP
with this
glBlendFunc

after that i compiled exmaples with no errors. and they run smoothly..
at least example 08
nikmes
Posts: 26
Joined: Tue May 20, 2008 6:00 pm

I think i am having problem when using 4Gb memmory stick

Post by nikmes »

hi,
When using a 4GB memmory stick one of demo programs fails to start..

with 32GB memmory stick i can not run the 06 demo that is the 2D graphics demo. I get a black screen.
nikmes
Posts: 26
Joined: Tue May 20, 2008 6:00 pm

4Gb Memmory Stick

Post by nikmes »

For one of the examples that was crashing my PSP with my memory stick flashing all the time i overcome by installing DarkAlexs kernel1.50 addon with 4gb memory stick support.

Still can not get the 2d example to work..
Maybe is cause of the pspgl ...
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

If you'd read the other threads on LTE, you'd find this:
http://www.mediafire.com/download.php?y2oim3x1dmz

That's my conversion of the last published LTE code to the Slim. It still uses their PSPGL instead of the latest. I didn't bother trying to add their function in... I'll leave that to you. I did clean up all the problems getting LTE to compile with the latest toolchain and libs (other than PSPGL).

All the examples now compile as user mode apps with the large memory flag set, and the heap set to 48 MB. You have to change the heap size in the LTE libs.
nikmes
Posts: 26
Joined: Tue May 20, 2008 6:00 pm

LTE already compiled!! I did not know

Post by nikmes »

Hi JF,
I am guessing i need to change the heapsize a smaller number since i am running on a FAT PSP?
Then maybe i try with the latest PSPGL to see if i get the same problem with 06 example.
Thanks
Regards
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Yeah. You'll find the heap size in CAudioDriver.cpp. Do NOT set it to MAX! There won't be any memory left for threads, which are used extensively by LTE. Until some of the discussed changes for negative heap sizes are made to the SDK (newlib in particular), MAX is generally not very useful.
nikmes
Posts: 26
Joined: Tue May 20, 2008 6:00 pm

Thanks a lot

Post by nikmes »

hi
I compiled the source from the link you gave me and everything looks fine now.

Wich engine has better performance if you know?
The LTE or the triengine?
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Re: Thanks a lot

Post by J.F. »

nikmes wrote:hi
I compiled the source from the link you gave me and everything looks fine now.

Wich engine has better performance if you know?
The LTE or the triengine?
No hard facts, but I'd guess triEngine since it was made for the PSP while LTE is merely a conversion of irrlicht.
nikmes
Posts: 26
Joined: Tue May 20, 2008 6:00 pm

TriEngine for Slim

Post by nikmes »

Hi,
Anyone tried to compile triEngine samples for 3.90 firmware..
i set below in mak files but dosent seem to work after try on PSP

BUILD_PRX = 1
PSP_FW_VERSION = 390

after compiling with above i get
"The game could not be started. (800200D9)
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

tri was made for the 1.5 kernel.

If I get a spare 30 mins tonight I'll update it to be pure user-mode for 3xx.

[EDIT] Done. Either 'svn update' or 'svn co http://svn2.assembla.com/svn/openTRI'
nikmes
Posts: 26
Joined: Tue May 20, 2008 6:00 pm

I will be trying triEngine

Post by nikmes »

Thanks for the quick response
I m going to checkout the code now again to try
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Insert_witty_name wrote:tri was made for the 1.5 kernel.

If I get a spare 30 mins tonight I'll update it to be pure user-mode for 3xx.

[EDIT] Done. Either 'svn update' or 'svn co http://svn2.assembla.com/svn/openTRI'
Great! Thanks a lot.
:)
nikmes
Posts: 26
Joined: Tue May 20, 2008 6:00 pm

Tried on my PSP Fat 3.90

Post by nikmes »

hi
i got triEngine again and i compile the particles test and i still get the executable to exit after starting. It looks like is loading some stuff from memmory stick and then exits.
thanks
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

Ensure you have transfered all required external data with the EBOOT.

This includes the text files.
nikmes
Posts: 26
Joined: Tue May 20, 2008 6:00 pm

You were right

Post by nikmes »

sorry,
don know what i did..
is fine now..
i can get graphics test to compile though..
only particle..
i think i m missing some libs...
png maybe
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/bin/ld: cannot find -lpng
collect2: ld returned 1 exit status
i ll get now from svn

Thanks a o lot..
I ll try use the triEngine for my small project..
nikmes
Posts: 26
Joined: Tue May 20, 2008 6:00 pm

Try again

Post by nikmes »

Hi,
For fonts sample i get below error. Any file missing..?

make: /usr/local/pspdev/psp/bin/freetype-config: Command not found
make: /usr/local/pspdev/psp/bin/freetype-config: Command not found
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O0 -G0 -Wall -g -DDEBUG -D_DEBUG -D_DEBUG_LOG -D_DEBUG_MEMORY -D__PSP__ -D_PSP_FW_VERSION=150 -c -o fonttest.o fonttest.c
In file included from fonttest.c:7:
../../triFont.h:32:22: error: ft2build.h: No such file or directory
../../triFont.h:33:10: error: #include expects "FILENAME" or <FILENAME>
make: *** [fonttest.o] Error 1

For music i can see that still in 1.50 but stills work

and for strams i get below
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O0 -G0 -Wall -g -D_DEBUG_LOG -D__PSP__ -D_PSP_FW_VERSION=150 -L. -L/usr/local/pspdev/psp/sdk/lib -specs=/usr/local/pspdev/psp/sdk/lib/prxspecs -Wl,-q,-T/usr/local/pspdev/psp/sdk/lib/linkfile.prx streamstest.o ../../streams/streams.o ../../triLog.o /usr/local/pspdev/psp/sdk/lib/prxexports.o -lpsprtc -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o streamstest.elf
streamstest.o: In function `test_bfstream':
/root/triEngine/src/tests/streams/streamstest.c:258: undefined reference to `stream_bfopen'
/root/triEngine/src/tests/streams/streamstest.c:267: undefined reference to `stream_bfopen'
collect2: ld returned 1 exit status
make: *** [streamstest.elf] Error 1
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

You need freetype installed for the font stuff. It's on the ps2dev.org SVN.

I didn't check the streams sample, I'll take a look at it.

This is getting out of scope for these forums, I'd suggest we take this to PM if you have any more issues mate.
nikmes
Posts: 26
Joined: Tue May 20, 2008 6:00 pm

triEngine

Post by nikmes »

Hi,
what is PM?
can i email you directly? or is there any triEngine forums?
thanks a lot
nikmes
Posts: 26
Joined: Tue May 20, 2008 6:00 pm

Hi sorry i am posting here again.

Post by nikmes »

I made a change in test/graphics to move the guitar sprite arround..
when i add this everything works fine..
if (triInputHeld (PSP_CTRL_LEFT))
{
aniX-=1.5;
}
if (triInputHeld (PSP_CTRL_RIGHT))
{
aniX+=1.5;
}

everything is fine but when i try the below for Y
if (triInputHeld (PSP_CTRL_UP))
{
aniY-=1.5;
}
if (triInputHeld (PSP_CTRL_DOWN))
{
aniY+=1.5;
}

i can see a blue square flashing while the background image is moving arround

any idea?
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

Under my post there is a button named 'PM', it means to private message a user.

Here is a direct link: http://forums.ps2dev.org/privmsg.php?mode=post&u=6105
gnin
Posts: 2
Joined: Tue May 27, 2008 6:15 am

Post by gnin »

Last edited by gnin on Tue Aug 05, 2008 6:13 am, edited 1 time in total.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Two things I HATE about RabidSwear - you have download limits that make you wait, and the files go away after a short period of time. The first isn't a big deal... unless you JUST used RabidSwear to get something else, and now you have to wait 456 minutes before they'll allow you to download anything else. The second means that two months from now, no one will be able to use that link you just posted.
Post Reply