WiiSX Source Code Help

Discussion in 'Wii - Emulation and Homebrew' started by smoothiespampam, Jun 8, 2012.

Jun 8, 2012
  1. smoothiespampam
    OP

    Newcomer smoothiespampam Member

    Joined:
    Nov 23, 2011
    Messages:
    22
    Country:
    United States
    Hi everyone,

    I've never done any source code editing, but have minor experience in other types of code. However, this is alot more challenging, and I was wondering if there was a way to edit the program in order to set the default values for the "gamepad" (wiimote, wiimote + nunchuk, gamecube, etc.) to something more to my liking, and then recompile the program.

    I would think that there would be, but I've been looking all over the "trunk", and I can't find anything

    Any help would be awesome
     
  2. Wiimpathy

    Member Wiimpathy GBAtemp Fan

    Joined:
    Mar 3, 2010
    Messages:
    407
    Country:
    France
    Hi,

    first, you need to install DevkitPPC here in order to compile. Note that you"ll have to grab an old version of the devkit and libogc (Wiisx code is from 2010).
    Then, look for the .c files located in src/Gamecube/gc_input and try to modify some values.

    If you have no experience in C, wii coding and especially Wiisx isn't the easier thing (to say the least) to start with.
    But well, you can still try. Maybe other users will help you here, or you can also ask in the Wiibrew forums.
    Good luck !
     
  3. smoothiespampam
    OP

    Newcomer smoothiespampam Member

    Joined:
    Nov 23, 2011
    Messages:
    22
    Country:
    United States
    Hey thanks for the help!

    I found and edited what I needed to in the gc_input folder, and now I'm on to compiling...

    It keeps giving me errors when I compile, but I was wondering if this could be attributed to me downloading the new devkitPPC not the old one like you said. If you could link me to the right one it'd be great, or have any other suggestions. Thanks!

    Here is the output


    linking ... CubeSX.elf
    c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/bin/ld.exe: cannot find -lz
    collect2: ld returned 1 exit status
    make[1]: *** [/c/projects/wii/wiisx/CubeSX.elf] Error 1
    "make": *** [build] Error 2
     
  4. newo

    Newcomer newo Advanced Member

    Joined:
    Apr 7, 2011
    Messages:
    99
    Country:
    Jamaica
    look in your makefile and see if there is -lz. You might be able to remove it and try a compile again. finger crossed. otherwise you will have to find out what library it is and compile that as well.
     
  5. smoothiespampam
    OP

    Newcomer smoothiespampam Member

    Joined:
    Nov 23, 2011
    Messages:
    22
    Country:
    United States
    just did some more reading,

    I think wiisx needs a library called "zlib", so I downloaded it, and currently trying to compile it.

    Once I compile it however, what do I do with it?

    (I'm a noob at this :/)
     
  6. Wiimpathy

    Member Wiimpathy GBAtemp Fan

    Joined:
    Mar 3, 2010
    Messages:
    407
    Country:
    France
    Glad you've made some progress with this.
    You downloaded zlib from here right? No need to compile it. Depending on the Devkit revision, it's in portlibs folder since r21 or in libogc folder for older revisions.

    Try to compile wiisx once again to see if zlib is found.
    If the compilation ends well (with a code 0 and without too many warnings), you'll get a dol file ready to test on the Wii.

    In my 1st post, I should have added something obvious : when you have a source code, the first step (before any modification) is trying to compile it.
    There are often problems with libraries, different versions, conflicting variables between them, etc ...
    Fortunately, here it's a common library, it shouldn't be a problem(?!).
     
  7. smoothiespampam
    OP

    Newcomer smoothiespampam Member

    Joined:
    Nov 23, 2011
    Messages:
    22
    Country:
    United States
    Okay I think I'm doing okay...

    Now I get the same error as before, even though the zlib I downloaded from the website is extracted and placed in "C:\devkitPro\portlibs\ppc"

    C:\devkitPro\portlibs\ppc\include
    C:\devkitPro\portlibs\ppc\share
    C:\devkitPro\portlibs\ppc\lib

    However, the devkit seems to be unable to find the support library :/
     
  8. Wiimpathy

    Member Wiimpathy GBAtemp Fan

    Joined:
    Mar 3, 2010
    Messages:
    407
    Country:
    France
    Maybe you need to add the linked library in the makefile at the LIBS := line with -lz as newo already said.
    Else you can download an older devkit/libogc, at wiixplorer's googlecode here. Take r19 for example and replace your DevkitPPC and libogc folders.
     
  9. smoothiespampam
    OP

    Newcomer smoothiespampam Member

    Joined:
    Nov 23, 2011
    Messages:
    22
    Country:
    United States

    working alot better now!



    got a ways into compiling process until it gave me this error




    linking ... WiiSX.elf
    fileBrowser-libfat.o: In function `fileBrowser_libfat_readDir':
    c:/projects/wii/wiisx/src/Gamecube/fileBrowser/fileBrowser-libfat.c:204: undefin
    ed reference to `diropen'
    c:/projects/wii/wiisx/src/Gamecube/fileBrowser/fileBrowser-libfat.c:213: undefin
    ed reference to `dirnext'
    c:/projects/wii/wiisx/src/Gamecube/fileBrowser/fileBrowser-libfat.c:227: undefin
    ed reference to `dirclose'
    c:/devkitPro/libogc/lib/wii\libtinysmb.a(smb_devoptab.o): In function `__smb_unl
    ink':
    smb_devoptab.c:(.text.__smb_unlink+0x30): undefined reference to `diropen'
    smb_devoptab.c:(.text.__smb_unlink+0x3c): undefined reference to `dirclose'
    collect2: ld returned 1 exit status
    make[1]: *** [/c/projects/wii/wiisx/src/Gamecube/WiiSX.elf] Error 1
    make: *** [build] Error 2


    it seems to be specific to the wiisx program, not any libraries or anything so maybe I just need to modify that stuff?

    you're helping so much, thank you I think i'm on the cusp of completing it!
     
  10. smoothiespampam
    OP

    Newcomer smoothiespampam Member

    Joined:
    Nov 23, 2011
    Messages:
    22
    Country:
    United States
    hmm.. that post came out a little funny...

    let me know if you can't read it well
     
  11. obcd

    Member obcd GBAtemp Advanced Maniac

    Joined:
    Apr 5, 2011
    Messages:
    1,594
    Country:
    Belgium
    the diropen and dirclose functions got replaced by opendir and closedir in the latest versions of libogc.

    I might have some sources with those functions replaced, so that they compile with the latest libogc version.

    http://code.google.com/p/janeek/
     
  12. smoothiespampam
    OP

    Newcomer smoothiespampam Member

    Joined:
    Nov 23, 2011
    Messages:
    22
    Country:
    United States
    half of the error has gone thanks to obcd (thanks!) now left with:


    linking ... WiiSX.elf
    c:/devkitPro/libogc/lib/wii\libtinysmb.a(smb_devoptab.o): In function `__smb_unl
    ink':
    smb_devoptab.c:(.text.__smb_unlink+0x30): undefined reference to `diropen'
    smb_devoptab.c:(.text.__smb_unlink+0x3c): undefined reference to `dirclose'
    collect2: ld returned 1 exit status
    make[1]: *** [/c/projects/wii/wiisx/src/Gamecube/WiiSX.elf] Error 1
    make: *** [build] Error 2
     
  13. smoothiespampam
    OP

    Newcomer smoothiespampam Member

    Joined:
    Nov 23, 2011
    Messages:
    22
    Country:
    United States
    Think I got it :D got a .dol but now there's no sound, but maybe I'll try an older libaesnd or something

    my controller settings worked tho!
     
  14. smoothiespampam
    OP

    Newcomer smoothiespampam Member

    Joined:
    Nov 23, 2011
    Messages:
    22
    Country:
    United States
    no sound... but it builds fine?

    any thoughts?
     
  15. obcd

    Member obcd GBAtemp Advanced Maniac

    Joined:
    Apr 5, 2011
    Messages:
    1,594
    Country:
    Belgium
    Have you checked the emulator settings for sound? I can't think of a reason why it wouldn't produce any.
    Did you change the normal sound library with a different one? (Perhaps to build another program?)
     
  16. smoothiespampam
    OP

    Newcomer smoothiespampam Member

    Joined:
    Nov 23, 2011
    Messages:
    22
    Country:
    United States
    i checked the emulator settings for sound, but I've never built another program, this is my first...

    I'll keep looking around
     
  17. obcd

    Member obcd GBAtemp Advanced Maniac

    Joined:
    Apr 5, 2011
    Messages:
    1,594
    Country:
    Belgium
    With settings I really mean those you get when the program is running on the wii. If I remember well, there are some sound options.
     
  18. smoothiespampam
    OP

    Newcomer smoothiespampam Member

    Joined:
    Nov 23, 2011
    Messages:
    22
    Country:
    United States
    yes, I checked those settings, and audio was enabled and volume I even set to loudest

    I checked the WiiSX website, and they said it was compiled with libogc r21, but when I looked in r21, there is no libaesnd...
    so did they use an old revision of libaesnd or something? I'm stumped :/
     

Share This Page