DS Flash

Discussion in 'NDS - Emulation and Homebrew' started by SifJar, Apr 4, 2009.

Apr 4, 2009

DS Flash by SifJar at 8:27 PM (1,672 Views / 0 Likes) 12 replies

  1. SifJar
    OP

    Member SifJar Not a pirate

    Joined:
    Apr 4, 2009
    Messages:
    6,022
    Country:
    United Kingdom
    hi i was browsing around and i found this. It is called DS Flash and it plays flash files on the ds once they're compiled into a .nds file. The only problem is i cant get it to compile. According to Natrium42, the author, i need to compile the libraries first as he didnt add that to the makefile. I dont know how to compile the libraries, so could someone please tell me? I have compiled homebrew before, by using a command prompt and the make command and i have devkitpro installed, i just dont know how to compile the libraries. Any help would be greatly appreciated.

    EDIT: I managed to compile libjpeg and libzlib without any bother by using the make command from a command prompt, but i cant get libflash to compile. could someone more experienced explain how i could get it to compile? I followed instructions at the above link in the comments to delete certain sections of files and to replace part of another file but it still wont compile. anyone able to help?
     
  2. osimonbinladen

    Newcomer osimonbinladen Advanced Member

    Joined:
    Dec 26, 2008
    Messages:
    75
    Country:
    New Zealand
    Uhh, I was working on it for a while and had sound working for a while but then I made some changes and it crapped out...
    So yeah, I can tell you how to compile it, um.
    So what do you do?
    What errors do you get?
     
  3. SifJar
    OP

    Member SifJar Not a pirate

    Joined:
    Apr 4, 2009
    Messages:
    6,022
    Country:
    United Kingdom
    Well, i followed these instructions:

    Code:
    libflash/matrix.h:36: remove ‘Matrix::’
    libflash/matrix.h:42: remove ‘Matrix::’
    libflash/graphic16.h:27: remove ‘GraphicDevice16::’
    libflash/graphic24.h:27: remove ‘GraphicDevice24::’
    libflash/graphic32.h:27: remove ‘GraphicDevice32::’
    arm9/source/dsflash.cpp:65: change POWER_CR to REG_POWERCNT
    and then try to compile libflash and get this

    Code:
    C:\Homebrew\DSFlash\libflash>make
    flash.cpp
    arm-eabi-g++ -MMD -MP -MF /c/Homebrew/DSFlash/libflash/build/flash.d -g -Wall -O
    2 -mcpu=arm9tdmi -mtune=arm9tdmi -fomit-frame-pointer -ffast-math -mthumb -mthum
    b-interwork -I/c/Homebrew/DSFlash/libflash/include -I/c/Homebrew/DSFlash/libflas
    h/. -I/c/Homebrew/DSFlash/libflash/../libjpeg -I/c/Homebrew/DSFlash/libflash/../
    libzlib -I/c/devkitPro/libnds/include -I../libjpeg/include -I../libzlib/include
    -I/c/devkitPro/libnds/include -I../libjpeg/include -I../libzlib/include -I/c/Hom
    ebrew/DSFlash/libflash/build -DARM9 -c /c/Homebrew/DSFlash/libflash/./flash.cpp
    -o flash.o
    c:/Homebrew/DSFlash/libflash/swf.h:202: error: previous declaration of 'int shap
    e_size' with 'C++' linkage
    c:/Homebrew/DSFlash/libflash/flash.cpp:332: error: conflicts with new declaratio
    n with 'C' linkage
    c:/Homebrew/DSFlash/libflash/swf.h:202: error: previous declaration of 'int shap
    e_nb' with 'C++' linkage
    c:/Homebrew/DSFlash/libflash/flash.cpp:332: error: conflicts with new declaratio
    n with 'C' linkage
    c:/Homebrew/DSFlash/libflash/swf.h:202: error: previous declaration of 'int shap
    erecord_size' with 'C++' linkage
    c:/Homebrew/DSFlash/libflash/flash.cpp:332: error: conflicts with new declaratio
    n with 'C' linkage
    c:/Homebrew/DSFlash/libflash/swf.h:202: error: previous declaration of 'int shap
    erecord_nb' with 'C++' linkage
    c:/Homebrew/DSFlash/libflash/flash.cpp:332: error: conflicts with new declaratio
    n with 'C' linkage
    c:/Homebrew/DSFlash/libflash/swf.h:202: error: previous declaration of 'int styl
    e_size' with 'C++' linkage
    c:/Homebrew/DSFlash/libflash/flash.cpp:332: error: conflicts with new declaratio
    n with 'C' linkage
    c:/Homebrew/DSFlash/libflash/swf.h:202: error: previous declaration of 'int styl
    e_nb' with 'C++' linkage
    c:/Homebrew/DSFlash/libflash/flash.cpp:332: error: conflicts with new declaratio
    n with 'C' linkage
    make[1]: *** [flash.o] Error 1
    make: *** [build] Error 2
    thanks for your help. oh btw im on devkitpro 1.4.6 (i think) if that makes a difference
     
  4. osimonbinladen

    Newcomer osimonbinladen Advanced Member

    Joined:
    Dec 26, 2008
    Messages:
    75
    Country:
    New Zealand
    I had that error, but I forgot how I fixed it, ha ha.
    Sorry, about that, but would you like me to post my source for libFlash?
     
  5. SifJar
    OP

    Member SifJar Not a pirate

    Joined:
    Apr 4, 2009
    Messages:
    6,022
    Country:
    United Kingdom
    Yes please. That'd be great. Does it compile properly?
     
  6. osimonbinladen

    Newcomer osimonbinladen Advanced Member

    Joined:
    Dec 26, 2008
    Messages:
    75
    Country:
    New Zealand
    Um, it compiled last I checked. Ha ha.
    I uploaded the source here!
     
  7. SifJar
    OP

    Member SifJar Not a pirate

    Joined:
    Apr 4, 2009
    Messages:
    6,022
    Country:
    United Kingdom
    Thank you i'll try it out now.

    EDIT: well the library compiled once i renamed mad.h.crap to mad.h, but even then DSFlash wouldnt compile.

    Now trying to compile DSFlash gives me

    Code:
    C:\Homebrew\DSFlash>make
    make -C arm7
    make[1]: Entering directory `/c/Homebrew/DSFlash/arm7'
    template.c
    arm-eabi-gcc -MMD -MP -MF /c/Homebrew/DSFlash/arm7/build/template.d -g -Wall -O2
    -mcpu=arm7tdmi -mtune=arm7tdmi -fomit-frame-pointer -ffast-math -mthumb-interwo
    rk -I/c/Homebrew/DSFlash/arm7/include -I/c/Homebrew/DSFlash/arm7/build -I/c/devk
    itPro/libnds/include -I/c/Homebrew/DSFlash/arm7/build -DARM7 -c /c/Homebrew/DSFl
    ash/arm7/source/template.c -o template.o
    c:/Homebrew/DSFlash/arm7/source/template.c: In function 'VblankHandler':
    c:/Homebrew/DSFlash/arm7/source/template.c:49: error: 'TransferRegion' has no me
    mber named 'curtime'
    c:/Homebrew/DSFlash/arm7/source/template.c:84: error: 'TransferRegion' has no me
    mber named 'heartbeat'
    c:/Homebrew/DSFlash/arm7/source/template.c:96: error: 'TransferRegion' has no me
    mber named 'curtime'
    c:/Homebrew/DSFlash/arm7/source/template.c:49: warning: unused variable 'ct'
    make[2]: *** [template.o] Error 1
    make[1]: *** [build] Error 2
    make[1]: Leaving directory `/c/Homebrew/DSFlash/arm7'
    make: *** [arm7/DSFlash.elf] Error
    2
     
  8. Sarvesh50

    Member Sarvesh50 Aye!

    Joined:
    Jul 7, 2008
    Messages:
    915
    Location:
    Netherlands
    Country:
    Netherlands
    really you get sound to work you know how many people would be very happy if they did have that [​IMG]
     
  9. OneMichael

    Newcomer OneMichael Advanced Member

    Joined:
    Nov 27, 2008
    Messages:
    98
    Location:
    Manitoba, Canada
    Country:
    Canada
    Flash? Are we talking about FLV or SWF?
    FLV files can be converted to DPG and played by Moonshell, so that would be nearly useless. A SWF player would be good to have, though.
     
  10. osimonbinladen

    Newcomer osimonbinladen Advanced Member

    Joined:
    Dec 26, 2008
    Messages:
    75
    Country:
    New Zealand
    The errors that you are getting are from the fact that this program was created with a different version of libnds.
    You have either a newer or older version.
    By any chance do you know your version?
     
  11. SifJar
    OP

    Member SifJar Not a pirate

    Joined:
    Apr 4, 2009
    Messages:
    6,022
    Country:
    United Kingdom
    i think i downgraded stuff to use PALib, as per the instructions i read for setting up a homebrew dev environment. i am assumiong that was the wrong thing to do in this case? is there an easy way to fix this or will i have to uninstall everything and start over? According to installed.ini i have libnds version "20071023".

    for a compiled version, check the link in my first post. there you can download it with a strong bad animation, and also the source (also provided there) has a compiled version with a different flash file in it.

    BTW I tried unpacking the .nds file with DSLazy, but the data folder was empty. Shouldn't it have swf.bin in it? Why was it empty?
     
  12. Vague Rant

    Member Vague Rant Deceptively cute

    Joined:
    Aug 7, 2008
    Messages:
    1,980
    Location:
    Melbourne
    Country:
    Australia
    This is just a guess because I haven't bothered looking, but most likely the swf is packed into the ARM9.BIN.
     
  13. SifJar
    OP

    Member SifJar Not a pirate

    Joined:
    Apr 4, 2009
    Messages:
    6,022
    Country:
    United Kingdom
    ah, i see. Any way to unpack ARM9.BIN? lol
     

Share This Page