Announcement

Collapse
No announcement yet.

Getting started with ps2smap

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • dnawrkshp
    replied
    I understand the use of SMapInit(), however, I can not implement it without the compiling error of " main.c: undefined reference to `SMapInit' ". I have looked at multiple samples and they all just add the .irx and include smap.h. This is quite troubling!

    Leave a comment:


  • misfire
    replied
    Originally posted by LiquidManZero View Post
    This isn't entirely relevant, but if the idea comes to mind... Don't use ps2rd as a reference for using this module. I'm not sure if it's this specific one causing the issue, but however networking was modified on ps2rd makes it utterly incapable of networking without a direct ps2 to pc cable connection.
    That's completely wrong.

    1) PS2rd allows you to select which SMAP implementation to use; either the standard PS2SDK module or the SMS variant. See https://github.com/mlafeldt/ps2rd/bl...p.txt#L102-105

    The IOP modules can be found here: https://github.com/mlafeldt/ps2rd/tree/master/iop

    2) SMAP has a standard interface. That makes the code really simple as the loader doesn't have to care about the SMAP implementation and can use the network stack as-is.

    Check the source code of PS2rd on how to invoke SMapInit().

    Code:
    [ps2rd (master)]$ git grep -i smapinit
    iop/SMSMAP/main.c:static int SMapInit ( IPAddr IP, IPAddr NM, IPAddr GW ) {
    iop/SMSMAP/main.c:}  /* end SMapInit */
    iop/SMSMAP/main.c: return !SMapInit( IP, NM, GW );
    iop/smap/main.c:SMapInit(IPAddr IP,IPAddr NM,IPAddr GW)
    iop/smap/main.c:        dbgprintf("SMapInit: Dev9 detected & initialized\n");
    iop/smap/main.c:                printf("SMapInit: Fatal error - unable to create iSendMutex\n");
    iop/smap/main.c:                printf("SMapInit: Fatal error - unable to create iSendReqMutex\n");
    iop/smap/main.c:        dbgprintf("SMapInit: SMap initialized\n");
    iop/smap/main.c:        dbgprintf("SMapInit: Interrupt-handler installed\n");
    iop/smap/main.c:        dbgprintf("SMapInit: Timer installed\n");
    iop/smap/main.c:        dbgprintf("SMapInit: NetIF added to ps2ip\n");
    iop/smap/main.c:        if      (!SMapInit(IP,NM,GW))

    Leave a comment:


  • dnawrkshp
    replied
    I wasn't planning to. Although, some samples would be lovely. Can't seem to find any but ee-echo. Which isn't the most useful thing. Actually let me check if there is a special lib included in the makefile. Well turns out that there is a lib include called "ps2ip" and I will attempt to use that ASAP.

    Turns out it doesn't integrate smap.
    Last edited by dnawrkshp; 08-06-2012, 10:52:06 PM.

    Leave a comment:


  • LiquidManZero
    replied
    This isn't entirely relevant, but if the idea comes to mind... Don't use ps2rd as a reference for using this module. I'm not sure if it's this specific one causing the issue, but however networking was modified on ps2rd makes it utterly incapable of networking without a direct ps2 to pc cable connection.

    Leave a comment:


  • dnawrkshp
    started a topic Getting started with ps2smap

    Getting started with ps2smap

    So I have attempted to start trying out some ps2 side network communication and it did not go all that well. First I compiled the ps2smap.irx and converted it to a *.o. Then I added that to the Makefile. Copied the smap.h and types.h (required by the smap.h) to the directory with my makefile. Then made a quick main.c just to test the compiling. It worked. Then I added a function from ps2smap and compiled it. It gave me an error stating that SMapInit is undefined. Can anyone help me getting started with this?

    main.c:

    Code:
    #include <debug.h>
    #include <smap.h>
    #include <stdio.h>
    
    int main(void)
    
    {
    
          printf("Begun\n");
    
          SMapInit(ARG1, ARG2, ARG3); //I was just checking that it would recognize SMapInit, then I would worry about the correct arguments
    
          return 0;
    
    }
    Last edited by dnawrkshp; 08-06-2012, 10:14:29 PM.
Working...
X