Maxmod hates me

Discussion in 'NDS - Emulation and Homebrew' started by loco365, May 27, 2012.

May 27, 2012

Maxmod hates me by loco365 at 5:46 PM (1,448 Views / 0 Likes) 10 replies

  1. loco365
    OP

    Member loco365 GBAtemp Guru

    Joined:
    Sep 1, 2010
    Messages:
    5,459
    So I'm trying to get Maxmod working in some sample code I'm working with. I'm writing the code in Visual C++ 2008, as mentioned in this tutorial. However, I'm sure I've added it correctly, and it still fails to make an NDS image. Here's my code:

    Code:
    #include <nds.h>
    #include <stdio.h>
    #include <maxmod9.h>	// Maxmod definitions for ARM9
    #include "soundbank.h"  // Soundbank definitions
    #include "soundbank_bin.h"
    
    //---------------------------------------------------------------------------------
    int main(void) {
    //---------------------------------------------------------------------------------
    consoleDemoInit();  //setup the sub screen for printing
    mmInitDefaultMem((mm_addr)soundbank_bin);
    mmLoad( mainmenu );
    
    
    iprintf("\n\tYou should hear music.\n\n\tFinal Fantasy VII Demo\n\tPrelude Remix");
    
    mmStart( mainmenu, MM_PLAY_LOOP );
    
    while(1) {
    swiWaitForVBlank();
    }
    
    return 0;
    }
    
    Here's the makefile:
    Warning: Spoilers inside!
    Here's my build log:
    Warning: Spoilers inside!

    If I copy/paste the code into the Hello World blank project in Programmer's Notepad, I have to rename my modules to numbers to get it to compile, but I don't have any audio at all. Names don't work or anything. Could someone get me on the right track and get my code to compile properly?
     
  2. LeRodeur

    Member LeRodeur GBAtemp Regular

    Joined:
    Dec 12, 2009
    Messages:
    162
    Country:
    France
    could you send me the full directory please?
    And what tutorial are you following?
     
  3. Foxi4

    Reporter Foxi4 On the hunt...

    pip
    Joined:
    Sep 13, 2009
    Messages:
    22,736
    Location:
    Gaming Grotto
    Country:
    Poland
    It would probably work if you included the music into your project. :P

    Is the song called mainmenu in your Data folder? If it's not, you're calling for something that doesn't exist. But even before that...

    Code:
    1>c:/Users/Jordan/DS/game/game/arm9/source/template.c(4):49: fatal error: soundbank.h: No such file or directory
    Where's the soundbank.h file, huh? ;)
     
  4. LeRodeur

    Member LeRodeur GBAtemp Regular

    Joined:
    Dec 12, 2009
    Messages:
    162
    Country:
    France
    the odd part is :
    Shouldn't be here if mmutils call was successful, and the command line in the makefile seems ok, did you place your sound files in arm9/audio?
     
  5. Foxi4

    Reporter Foxi4 On the hunt...

    pip
    Joined:
    Sep 13, 2009
    Messages:
    22,736
    Location:
    Gaming Grotto
    Country:
    Poland
    It would be best if he just zips up his entire compile folder and hosts it somewhere for others to review, that way we can simultainously look for bugs.
     
  6. loco365
    OP

    Member loco365 GBAtemp Guru

    Joined:
    Sep 1, 2010
    Messages:
    5,459
    I have it in my audio folder, but I tried copying it to Data, and it still didn't work.

    I can't find it, although I thought I had seen it earlier.

    If you want to see it, here's the project: https://dl.dropbox.com/u/34957059/game.zip

    After, I tried moving the audio folder into arm9, and now it's making soundbank.bin, but still isn't successful. Try doing it when you download my package.
     
  7. Snailface

    Member Snailface My frothing demand for 3ds homebrew is increasing

    Joined:
    Sep 20, 2010
    Messages:
    4,324
    Location:
    Engine Room with Cyan, watching him learn.
    Country:
    Antarctica
    You needed to change mainmenu to MOD_MAINMENU.
    I also moved your source to a maxmod example in devkitpro.

    http://www.mediafire.com/?yzhtrvlecu4er94
     
  8. loco365
    OP

    Member loco365 GBAtemp Guru

    Joined:
    Sep 1, 2010
    Messages:
    5,459
    Weird. I'll give it a try. I'll try incorperating your changes into my project, providing it all goes smoothly.
     
  9. LeRodeur

    Member LeRodeur GBAtemp Regular

    Joined:
    Dec 12, 2009
    Messages:
    162
    Country:
    France
    As said before, place the audio folder in your arm9 folder and maxmod uses defines for sounds such as MOD_*MYMODNAME* for mod files and SFX_*MYSFXNAME* for the sounds samples.
    They are all defined in the soundbank.h file (located in your arm9/build directory after compilation)
    Note that you could convert sounds and music without compiling using mmutils without makefile and then include the .h files in your souce and soundbank.bin in data folder

    Note : I don't really like tue idea of compiling arm7 by yourself, creators of devkitpro and libnds said it many times, you should use the precompiled version of the arm7 core, and use the examples as your templates. Unless you know what you are doing, which doesn't really sound to be the case
     
  10. loco365
    OP

    Member loco365 GBAtemp Guru

    Joined:
    Sep 1, 2010
    Messages:
    5,459
    I was thinking that the best blank project would be arm7 + arm9, but I guess that's wrong.

    *request close*
     
  11. LeRodeur

    Member LeRodeur GBAtemp Regular

    Joined:
    Dec 12, 2009
    Messages:
    162
    Country:
    France
    It is suggested not to compile ARM7 by yourself so that you avoid problems with maxmod libwifi etc, using both processors isnt as easy as it seems, and arm7 have specific work and abilities in NDS mode
     

Share This Page