GP32 Help With Chn Or Afm Player!!!


Optimus

Member
Joined
May 8, 2005
Messages
339
Age
44
Location
Greece
Website
optimus.untergrund.net
CHN:

Just moved my demo code from Mr.Mirko's SDK to DevkitARM with the official Gamepark SDK. I thought it would be much easier to use those players, cause I thought (I am not sure) they were written in DevkitARM.

I put the libmodplay.a in arm-elf/lib directory, type -lmodplay in the appropriate place on makefile, also put "gpmodplay.h" in arm-elf/include and include it in the beginning of my main programm. Everything fine till here. I start in my code by calling MODPlay_Init (mymod) after I declared MODPlay *mymod; above. The compiler says it can't find GpFileOpen, GpFileGetSize, etc. 4 SMC functions of the official SDK. There are includes in my main c file for these, but I think that's not the problem. The problem occurs in modplay.c inside libmodplay.a. But I can't see that code cause it's inside the lib anyways. Wtf? How can this happen??? Does the directory with includes/libs from the official SDK has to be in an exact place inside DevkitARM so that the lib can view it? I haven't found any more infos in the txt file coming with chn libmodplay! It seems to be a good player and I want to use it for my next scene demo(s). HELP!!!


AFM:

Then I said. Mmm,. let's try AFM player

(http://www.gp32x.de/cgi-bin/cfiles.cgi?0,0,0,0,6,439).

This is how the example code in the zip file containing the afm player begins:

/* 44100,2 for default speed */
/* 44100,8 for 99mhz */
afm_install(44100,2);

1) the compiler tells me "too many arguments". I remove one, I remove too and now it's afm_install(); And it works!!! The strange is that this function defined in afm.h also takes those two arguments but the lib doesn't agree with that! Anyways,. it works with no arguments at the end..

2) The only function that can't be found by the comiler is afm_start();
That one is also in afm.h but it doesn't seem to be found in libafm.a or something by the compiler ;P

Strange.. the example is much diferrent than the library provided. Old unupdated documentation??? What do you say?

p.s. I need help, esp. for CHN player. I really want to use that. Older demos use it and the MODs I am going to use seem to play very great in his MODplay app also released in the GP32.
 
That means that /* */ comments won't work, Try having the comments //like this
(just a guess and I wouldn't know why if it was)
 
Hooka posted on Oct 31 2005 at 10:07 AM said:
That means that /* */ comments won't work, Try having the comments //like this
(just a guess and I wouldn't know why if it was)

Actually I think devkitarm has problems with // and not with /* */
At least // has never worked for me while /* */ has worked flawlessly.
 
Last edited by a moderator:
Actually, I think I compiled without the comments from this code. That was just an example I pasted from the txt coming with the player, since I didn't have the code with me. Don't think that's the problem. Although, I don't know if DevkitARM has such problem with comments. That would be the reason why that example has /* */ twice at each line instead of //? Anyways,. I think that's not the problem here. Something is going wrong with the lib..

p.s. But I will check at home if comments produce problems in DevkitARM because what you say is preety strange. And they might have corrected such a lame bug in the latest DevkitARM version I use (17 or something).
 
ahhh, I'm sorry I read wrong... You removed the arguments from afm_install(); (the 44,100 and ,2) hmm, that's different, especially if it's in the .h file... any other places in the code it's referenced? maybe check them ;)

I'll leave this to the real coders to help you with now though...
 
For my demo I used chn's player, with devkitadvance + chn's gp32 patch. I haven't tried it on devkitarm though.
 
Perhaps that will help.
The compiler also shows warning message like these below.
What can it be?


c:\devkitarm\bin\..\lib\gcc\arm-elf\4.0.2\..\..\..\..\arm-elf\bin\ld.exe: Warning: c:/devkitarm/bin/../lib/gcc/arm-elf/4.0.2\libgcc.a(_dvmd_tls.o) does not support interworking, whereas ledblur.elf does
c:\devkitarm\bin\..\lib\gcc\arm-elf\4.0.2\..\..\..\..\arm-elf\bin\ld.exe: Warning: c:/devkitarm/bin/../lib/gcc/arm-elf/4.0.2\libgcc.a(_addsubdf3.o) does not support interworking, whereas ledblur.elf does
c:\devkitarm\bin\..\lib\gcc\arm-elf\4.0.2\..\..\..\..\arm-elf\bin\ld.exe: Warning: c:/devkitarm/bin/../lib/gcc/arm-elf/4.0.2\libgcc.a(_muldivdf3.o) does not support interworking, whereas ledblur.elf does
..............
..............
..............
c:\devkitarm\bin\..\lib\gcc\arm-elf\4.0.2\..\..\..\..\arm-elf\bin\ld.exe: Warning: c:/devkitarm/bin/../lib/gcc/arm-elf/4.0.2/crtend.o does not support interworking, whereas ledblur.elf does
c:\devkitarm\bin\..\lib\gcc\arm-elf\4.0.2\..\..\..\..\arm-elf\bin\ld.exe: Warning: c:/devkitarm/bin/../lib/gcc/arm-elf/4.0.2/crtn.o does not support interworking, whereas ledblur.elf does

p.s. If you don't know yet, I guess I'll try to mail CHN and/or try to find a solution alone. I'll post the solution later here for anyone else who might have a similar problem..
 
About AFM player:

Oh gott, I am so STOOOOOOOOPID!!!

Few days ago I also used DevkitArm to code for GBA too, so the lib and include file of AFM that was in the specific folders, were for the GBA and I totally forgot that when I tried to link them with my GP32 project! Agh, stoopid!!! (Almost) fixed..


About CHN player:

There could be a slight possibility that I am doing bogus here too, so I'll check it once again before I ask more. But if you still have to suggest something, I'd be pleased to hear.


:p :p :p
gp32_console
 
I found it! It's a great mistake but not stupid, since I didn't knew that thing and I've learned something now. Actually, I am new to the makefiles mayheum and gcc (Previous compiling experiences: Visual Studio click to make projects. Before that: Quickbasic ;PPP) and shit like that can happen..

What I didn't knew is that the order of lib linking in the makefile plays a role sometimes. Since CHN player needs those functions from gpstdio, it should be linked in the makefile just before gpstdio and not after. I had -lgpstdio and the rest and -lmodplay after that. It should be -lmodplay -lgpstdio -ltherest -letc..

It compiles now and the player is great. It doesn't break the smoothness of the graphics as Mr.Mirko's modplayer did, and it also plays the mod louder (I still have to open it and amplify it though). Everything is smooth and cool here..

Also, AFM player compiled, I even called the function to start playing the mod, but there is no music. Though, I don't care much now since CHN player works =)
 
Back
Top