Compiling SnemulDS?

Discussion in 'NDS - Emulation and Homebrew' started by Gryphon93, Oct 26, 2009.

Oct 26, 2009

Compiling SnemulDS? by Gryphon93 at 12:31 PM (1,636 Views / 0 Likes) 11 replies

  1. Gryphon93
    OP

    Member Gryphon93 GBAtemp Regular

    Joined:
    Nov 30, 2008
    Messages:
    145
    Country:
    Sweden
    I've tried to compile SnemulDS for a while now, but I haven't got it to work. I get 2 errors, and I don't know how to solve them. I'm using the latest DevKitPro (downloaded today, 26/10 - 2009), and I get errors about a header-file called "registers_alt.h". I've read about others that haven't been able to compile SnemulDS, but noone has found out a way to fix it. I thought maybe some of you guys here knew how to fix the problem, so I decided to post this here. Well, here is the compile-log:

    Warning: Spoilers inside!
     
  2. Chase-san

    Member Chase-san GBAtemp Regular

    Joined:
    Dec 24, 2008
    Messages:
    165
    Country:
    United States
    lol, try changing apu.cpp to apu.c, or drop in a extern "C" before that in the h file. (or remove it)
     
  3. Gryphon93
    OP

    Member Gryphon93 GBAtemp Regular

    Joined:
    Nov 30, 2008
    Messages:
    145
    Country:
    Sweden
    Thanks, but please, explain a bit better, thank you [​IMG]
     
  4. Ben_j

    Member Ben_j GBAtemp Advanced Fan

    Joined:
    Nov 13, 2005
    Messages:
    696
    Country:
    France
    if you do manage to compile it, I would be interessed too.

    EDIT : what sources do you use ? The ones from the svn ?
     
  5. Ben_j

    Member Ben_j GBAtemp Advanced Fan

    Joined:
    Nov 13, 2005
    Messages:
    696
    Country:
    France
    Here's what I get when I compile SNEmulDS 0.4 :

    Code:
    D:\NDS_Dev\SNEmulDSv04-src\SNEmulDS>make
    make -C src
    make[1]: Entering directory `/d/NDS_Dev/SNEmulDSv04-src/SNEmulDS/src'
    make -C arm7
    make[2]: Entering directory `/d/NDS_Dev/SNEmulDSv04-src/SNEmulDS/src/arm7'
    apu.cpp
    arm-eabi-g++ -MMD -MP -MF /d/NDS_Dev/SNEmulDSv04-src/SNEmulDS/src/arm7/bin/apu.d
    -g -Wall -Os -mcpu=arm7tdmi -mtune=arm7tdmi -fomit-frame-pointer -ffast-math -m
    thumb-interworkÂÂ-I/c/devkitPro/libnds/include -I/d/NDS_Dev/SNEmulDSv04-src/SNEm
    ulDS/src/arm7/bin -DARM7 -fno-exceptions -fno-rtti -c /d/NDS_Dev/SNEmulDSv04-src
    /SNEmulDS/src/arm7/source/apu.cpp -o apu.o
    In file included from d:/NDS_Dev/SNEmulDSv04-src/SNEmulDS/src/arm7/source/pocket
    spc.h:2,
    ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ from d:/NDS_Dev/SNEmulDSv04-src/SNEmulDS/src/arm7/source/apu.cp
    p:1:
    c:/devkitPro/libnds/include/nds/registers_alt.h:39:2: warning: #warning "header
    provided for assistance in porting to new register names, do not use for release
    code"
    c:/devkitPro/libnds/include/nds/registers_alt.h:233:1: warning: "REG_SIOCNT" red
    efined
    In file included from c:/devkitPro/libnds/include/nds/arm7/audio.h:43,
    ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ from c:/devkitPro/libnds/include/nds.h:209,
    ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ from d:/NDS_Dev/SNEmulDSv04-src/SNEmulDS/src/arm7/source/pocket
    spc.h:1,
    ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ from d:/NDS_Dev/SNEmulDSv04-src/SNEmulDS/src/arm7/source/apu.cp
    p:1:
    c:/devkitPro/libnds/include/nds/arm7/serial.h:47:1: warning: this is the locatio
    n of the previous definition
    In file included from d:/NDS_Dev/SNEmulDSv04-src/SNEmulDS/src/arm7/source/pocket
    spc.h:2,
    ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ from d:/NDS_Dev/SNEmulDSv04-src/SNEmulDS/src/arm7/source/apu.cp
    p:1:
    c:/devkitPro/libnds/include/nds/registers_alt.h:239:1: warning: "REG_RCNT" redef
    ined
    In file included from c:/devkitPro/libnds/include/nds/arm7/audio.h:43,
    ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ from c:/devkitPro/libnds/include/nds.h:209,
    ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ from d:/NDS_Dev/SNEmulDSv04-src/SNEmulDS/src/arm7/source/pocket
    spc.h:1,
    ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ from d:/NDS_Dev/SNEmulDSv04-src/SNEmulDS/src/arm7/source/apu.cp
    p:1:
    c:/devkitPro/libnds/include/nds/arm7/serial.h:42:1: warning: this is the locatio
    n of the previous definition
    d:/NDS_Dev/SNEmulDSv04-src/SNEmulDS/src/arm7/source/apu.h:53: error: previous de
    claration of 'u32 APU_STATE [16]' with 'C++' linkage
    d:/NDS_Dev/SNEmulDSv04-src/SNEmulDS/src/arm7/source/apu.cpp:47: error: conflicts
    with new declaration with 'C' linkage
    make[3]: *** [apu.o] Error 1
    make[2]: *** [bin] Error 2
    make[2]: Leaving directory `/d/NDS_Dev/SNEmulDSv04-src/SNEmulDS/src/arm7'
    make[1]: *** [all] Error 2
    make[1]: Leaving directory `/d/NDS_Dev/SNEmulDSv04-src/SNEmulDS/src'
    make: *** [all] Error 2
     
  6. Gryphon93
    OP

    Member Gryphon93 GBAtemp Regular

    Joined:
    Nov 30, 2008
    Messages:
    145
    Country:
    Sweden
    I'm using the latest source from the SVN (v.0.5). I have still not managed to compile it, but I hope I will soon. I think I'll ask my brother for some help.
     
  7. Ultralex

    Member Ultralex GBAtemp Fan

    Joined:
    Mar 18, 2009
    Messages:
    334
    Country:
    Germany
    what do you want to change in snemul (Moonshell2 version would be good [​IMG])
     
  8. Gryphon93
    OP

    Member Gryphon93 GBAtemp Regular

    Joined:
    Nov 30, 2008
    Messages:
    145
    Country:
    Sweden
    I want to make the sound and graphics better. I want to play Harvest Moon without bugs x). For now I just want to know how to compile the source, then I'm going to do some testing just to get to know the emulator a bit better, then I'll try to actually improve something. Since no one is doing it, I thought I would give it try (though I'm not a professional programmer, especially not in C/C++-programming, but I'm learning). I don't have any experience programming emulators, so it'll be quite a challenge.
     
  9. Ben_j

    Member Ben_j GBAtemp Advanced Fan

    Joined:
    Nov 13, 2005
    Messages:
    696
    Country:
    France
    Ok, here's what I got from a member on the DSdev.org forums :

    That's what I thought, my libnds is too recent [​IMG]

    That's what I want to do. If I'm right, only 3 lines added to the code should be enough.

    I'm gonna take a look at the sources of the Moonshell version of Nester
     
  10. Normmatt

    Member Normmatt Former AKAIO Programmer

    Joined:
    Dec 14, 2004
    Messages:
    2,135
    Country:
    New Zealand
  11. Ben_j

    Member Ben_j GBAtemp Advanced Fan

    Joined:
    Nov 13, 2005
    Messages:
    696
    Country:
    France
    new errors, with devkitARM r20 :

    Code:
    D:\NDS_Dev\SNEmulDSv04-src\SNEmulDS>make 
    make -C src 
    make[1]: Entering directory `/d/NDS_Dev/SNEmulDSv04-src/SNEmulDS/src' 
    make -C arm7 
    make[2]: Entering directory `/d/NDS_Dev/SNEmulDSv04-src/SNEmulDS/src/arm7' 
    [color=red]make[3]: *** No rule to make target `apu.o', needed by `../bin/pocketspc.elf'.[/color] 
    Stop. 
    make[2]: *** [bin] Error 2 
    make[2]: Leaving directory `/d/NDS_Dev/SNEmulDSv04-src/SNEmulDS/src/arm7' 
    make[1]: *** [all] Error 2 
    make[1]: Leaving directory `/d/NDS_Dev/SNEmulDSv04-src/SNEmulDS/src' 
    make: *** [all] Error 2
    I have this with both new libnds & libfat and old versions
     
  12. Ben_j

    Member Ben_j GBAtemp Advanced Fan

    Joined:
    Nov 13, 2005
    Messages:
    696
    Country:
    France
    I'm getting mad. My PATH var is good.

    EDIT : ... not ^^'

    Still can't compile 0.5... but I succesfuly compiled the 0.4 \o/ (with shitloads of warnings everywhere)

    EDIT bis : fuck, I'm at work, my DS is out of battery and I don't have the charger. I can't test anything [​IMG]
     

Share This Page