What's new

Who wants to help with a osx port?

Tillin9

Mupen64Plus Dev.
CrispyXUK: You offered your services with a program icon? If you could make an SVG that looks roughly like this:
Mupen64_icon.png


Ideally with a greenish + in addition (though I probably have enough inkscape skills to add that :))

I believe the original icon is Creative Commons licensed (Hacktarux never got back to us but I found the icon in Wikicommons), however, the transparency around the edges is not very nice. A new SVG model would be better.
 
Ok, its mostly done, needs quite a bit of cleaning up so I'll post it some time today.

What's happening with the build BTW?
 

Tillin9

Mupen64Plus Dev.
Thanks for the icon work.

SVG stands for scalable vector graphics. Its just the file format I want the new icon in since it avoids resolution issues, is easy to modify, etc. I'm fairly sure you figured this out yourself.

As far as the build, one / maybe two people have mupen64plus running under OSX (one working graphics plugin glN64 and non-dynarec core). Support isn't in trunk, but basically I think I know what's necessary to get it there. The biggest issue is I have no time this week, so be patient.
 
Oh, ok, nothing available to try then?

Not doing the icon in a vector format, but so far its been done @ 512x512 res, so we won't have any scaling issues anyway.
 

Tillin9

Mupen64Plus Dev.
I know beggars can't be choosers, but please do the icon as SVG. Most vector work is done in Illustrator or Inkscape. Does inkscape has an angle / length tool? I like to specify my vectors mathematically and that's currently giving me an issue. Otherwise, I could bang this out myself (granted I'm backed up with tons of mupen and real life things right now).

Even if your icon is perfect at 512x512, resizing a raster is never as good as rendering a vector. I also would like the freedom to tweak some of the gradient stuff in inkscape (I figured out how to do bezier curve gradients crystal effects) not on the model.
 
I know beggars can't be choosers, but please do the icon as SVG. Most vector work is done in Illustrator or Inkscape. Does inkscape has an angle / length tool? I like to specify my vectors mathematically and that's currently giving me an issue. Otherwise, I could bang this out myself (granted I'm backed up with tons of mupen and real life things right now).

Even if your icon is perfect at 512x512, resizing a raster is never as good as rendering a vector. I also would like the freedom to tweak some of the gradient stuff in inkscape (I figured out how to do bezier curve gradients crystal effects) not on the model.

You'd never need an icon larger than 512x512

http://developer.apple.com/document...ction_8.html#//apple_ref/doc/uid/20000967-SW1
 

Tillin9

Mupen64Plus Dev.
I mean resizing to lower resolutions. A straight resize is often not the best way to get lower size (16x16, 22x22, etc.) icons. Doing things like changing the stroke width on a vector and removing some extra gradient effects can make a big difference. Anyway... its silly to argue over this.

P.S. I wanted this icon for mupen64plus in general, not just the OSX port. Yet another reason for SVG, since I can easily customize the look for GNOME, KDE4, and OSX by changing gradients, colors, and effects.
 
Last edited:
As I said, the base is vector, only small highlights and texture are bitmap, so it won't be a problem scaling down in anyway.
 

DarkJezter

New member
Here's a test patch for osx support in blight_input. if this is confirmed working it can be included in the trunk

Code:
Index: blight_input/plugin.c
===================================================================
--- blight_input/plugin.c       (revision 824)
+++ blight_input/plugin.c       (working copy)
@@ -15,12 +15,15 @@
  *                                                                         *
  ***************************************************************************/
 
+
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <dirent.h>
+#ifdef __linux__
 #include <linux/input.h>
+#endif //__linux__
 
 #include "plugin.h"
 
@@ -43,11 +46,13 @@
 #include <string.h>
 
 /* defines for the force feedback rumble support */
+#ifdef __linux__
 #define BITS_PER_LONG (sizeof(long) * 8)
 #define OFF(x)  ((x)%BITS_PER_LONG)
 #define BIT(x)  (1UL<<OFF(x))
 #define LONG(x) ((x)/BITS_PER_LONG)
 #define test_bit(bit, array)    ((array[LONG(bit)] >> OFF(bit)) & 1)
+#endif //__linux__
 
 static unsigned short button_bits[] = {
     0x0001,  // R_DPAD
@@ -453,10 +458,13 @@
 
 BYTE lastCommand[6];
 
+#ifdef __linux__
+
 struct ff_effect ffeffect[3];
 struct ff_effect ffstrong[3];
 struct ff_effect ffweak[3];
 
+#endif //__linux__
 BYTE DataCRC( BYTE *Data, int iLenght )
 {
     register BYTE Remainder = Data[0];
@@ -513,7 +521,6 @@
 void ControllerCommand(int Control, BYTE *Command)
 {
     BYTE *Data = &Command[5];
-    struct input_event play;
 
     if (Control == -1)
         return;
@@ -549,6 +556,8 @@
               if(dwAddress==PAK_IO_RUMBLE&&*Data)
                     printf("Triggering rumble pack.\n");*/
 
+#ifdef __linux__
+                struct input_event play;
                 if( dwAddress == PAK_IO_RUMBLE && controller[Control].event_joystick != 0)
                 {
                     if( *Data )
@@ -571,6 +580,7 @@
                             perror("Error stopping rumble effect");
                     }
                 }
+#endif //__linux__
                 Data[32] = DataCRC( Data, 32 );
             }
             break;
@@ -864,7 +874,6 @@
 void
 GetKeys( int Control, BUTTONS *Keys )
 {
-    struct input_event play;
     int b, axis_val, axis_max_val, axis_val_tmp;
     SDL_Event event;
     Uint8 *keystate = SDL_GetKeyState( NULL );
@@ -1091,8 +1100,10 @@
     *(int *)Keys = *(int *)&controller[Control].buttons;
 
     /* handle mempack / rumblepak switching (only if rumble is active on joystick) */
+#ifdef __linux__
     if (controller[Control].event_joystick != 0)
     {
+        struct input_event play;
         if (controller[Control].buttons.button & button_bits[14])
         {
             controller[Control].control.Plugin = PLUGIN_MEMPAK;
@@ -1112,6 +1123,7 @@
                 perror("Error starting rumble effect");
         }
     }
+#endif //__linux__
 }
 
 int InitiateRumble(int cntrl)
@@ -1124,7 +1136,7 @@
     int iFound = 0;
 
     controller[cntrl].event_joystick = 0;
-
+#ifdef __linux__
     sprintf(temp,"/sys/class/input/js%d/device", controller[cntrl].device);
     dp = opendir(temp);
 
@@ -1209,6 +1221,8 @@
     ioctl(controller[cntrl].event_joystick, EVIOCSFF, &ffweak[cntrl]);
 
     printf("["PLUGIN_NAME"]: Rumble activated on N64 joystick #%i\n", cntrl + 1);
+#endif //__linux__
+
 }
 
 /******************************************************************
 

Auria

New member
For now i get this :
Code:
69-4-214-3:/Developer/SVN/mupen mmg$ patch -p0 < blight.patch
patching file blight_input/plugin.c
Hunk #1 FAILED at 15.
Hunk #2 succeeded at 50 (offset 4 lines).
Hunk #3 FAILED at 462.
Hunk #4 succeeded at 528 with fuzz 2 (offset 7 lines).
Hunk #5 succeeded at 563 (offset 7 lines).
Hunk #6 succeeded at 587 (offset 7 lines).
Hunk #7 FAILED at 881.
Hunk #8 succeeded at 1109 (offset 9 lines).
Hunk #9 FAILED at 1132.
Hunk #10 succeeded at 1147 (offset 11 lines).
patch unexpectedly ends in middle of line
Hunk #11 FAILED at 1232.
5 out of 11 hunks FAILED -- saving rejects to file blight_input/plugin.c.rej

With plugin.c.rej containing
Code:
***************
*** 15,26 ****
   *                                                                         *
   ***************************************************************************/
  
  #include <sys/types.h>
  #include <sys/stat.h>
  #include <fcntl.h>
  #include <unistd.h>
  #include <dirent.h>
  #include <linux/input.h>
  
  #include "plugin.h"
  
--- 15,29 ----
   *                                                                         *
   ***************************************************************************/
  
+ 
  #include <sys/types.h>
  #include <sys/stat.h>
  #include <fcntl.h>
  #include <unistd.h>
  #include <dirent.h>
+ #ifdef __linux__
  #include <linux/input.h>
+ #endif //__linux__
  
  #include "plugin.h"
  
***************
*** 457,466 ****
  
  BYTE lastCommand[6];
  
  struct ff_effect ffeffect[3];
  struct ff_effect ffstrong[3];
  struct ff_effect ffweak[3];
  
  BYTE DataCRC( BYTE *Data, int iLenght )
  {
      register BYTE Remainder = Data[0];
--- 462,474 ----
  
  BYTE lastCommand[6];
  
+ #ifdef __linux__
+ 
  struct ff_effect ffeffect[3];
  struct ff_effect ffstrong[3];
  struct ff_effect ffweak[3];
  
+ #endif //__linux__
  BYTE DataCRC( BYTE *Data, int iLenght )
  {
      register BYTE Remainder = Data[0];
***************
*** 871,877 ****
  void
  GetKeys( int Control, BUTTONS *Keys )
  {
-     struct input_event play;
      int b, axis_val, axis_max_val, axis_val_tmp;
      SDL_Event event;
      Uint8 *keystate = SDL_GetKeyState( NULL );
--- 881,886 ----
  void
  GetKeys( int Control, BUTTONS *Keys )
  {
      int b, axis_val, axis_max_val, axis_val_tmp;
      SDL_Event event;
      Uint8 *keystate = SDL_GetKeyState( NULL );
***************
*** 1121,1126 ****
                  perror("Error starting rumble effect");
          }
      }
  }
  
  int InitiateRumble(int cntrl)
--- 1132,1138 ----
                  perror("Error starting rumble effect");
          }
      }
+ #endif //__linux__
  }
  
  int InitiateRumble(int cntrl)
***************
*** 1220,1225 ****
      ioctl(controller[cntrl].event_joystick, EVIOCSFF, &ffweak[cntrl]);
  
      printf("["PLUGIN_NAME"]: Rumble activated on N64 joystick #%i\n", cntrl + 1);
  }
  
  
--- 1232,1239 ----
      ioctl(controller[cntrl].event_joystick, EVIOCSFF, &ffweak[cntrl]);
  
      printf("["PLUGIN_NAME"]: Rumble activated on N64 joystick #%i\n", cntrl + 1);
+ #endif //__linux__
+ 
  }

I could not try compiling it because with latest changes in SVN i can't build mupen anymore (complains about not finding GTK... i'll need to investigate)

EDIT: okay, seems like mupen is trying to link against the gui even if i passe GUI=NONE...

Code:
/usr/bin/ld: Undefined symbols:
_gui_display
_gui_init
_gui_main_loop
_gui_message
_libiconv
_libiconv_close
_libiconv_open
_updaterombrowser

since i no more have GTK on my computer i can't really build mupen anymore
 
Last edited:

Tillin9

Mupen64Plus Dev.
Auria: The Gtk issue comes from the plugins. Basically since Rice and Gilde need Gtk even with GUI=NONE so we can't make the test for Gtk conditional in pre.mk in trunk. This was the general rule for all the plugins till I started trying to fix it. Now with some makefile tweaking, its possible to build nearly everything else, though glN64 is the only video plugin which can work without Gtk right now.

Luckily Rice and Glide use basically the same GUI scheme, so getting one Gtk free means basically getting the other. Its just they have a corner case interactive mode so their GUI is a fair bit more complex than say jttl_audio with its three GUI functions.

If you remove the GTK stuff from the mk.pre. and pass GUI=NONE the ifdefs in the main should prevent the GUI API from being needed.

Nogui
Code:
templarapheonix@Sonia:~/mupen64plus/trunk$ ldd mupen64plus-nogui
        linux-gate.so.1 =>  (0xffffe000)
        libz.so.1 => /usr/lib/libz.so.1 (0xb7fa0000)
        libpng12.so.0 => /usr/lib/libpng12.so.0 (0xb7f7d000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb7f07000)
        libSDL-1.2.so.0 => /usr/lib/libSDL-1.2.so.0 (0xb7e56000)
        libGL.so.1 => /usr/local/lib/libGL.so.1 (0xb7dec000)
        libGLU.so.1 => /usr/local/lib/libGLU.so.1 (0xb7d66000)
        libpthread.so.0 => /lib/i686/cmov/libpthread.so.0 (0xb7d4d000)
        libdl.so.2 => /lib/i686/cmov/libdl.so.2 (0xb7d49000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7c5a000)
        libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb7c34000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7c27000)
        libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7acc000)
        libasound.so.2 => /usr/lib/libasound.so.2 (0xb7a0a000)
        libdirectfb-1.0.so.0 => /usr/lib/libdirectfb-1.0.so.0 (0xb79a2000)
        libfusion-1.0.so.0 => /usr/lib/libfusion-1.0.so.0 (0xb799a000)
        libdirect-1.0.so.0 => /usr/lib/libdirect-1.0.so.0 (0xb7986000)
        libvga.so.1 => /usr/lib/libvga.so.1 (0xb7925000)
        libX11.so.6 => /usr/lib/libX11.so.6 (0xb7836000)
        libXext.so.6 => /usr/lib/libXext.so.6 (0xb7827000)
        libXxf86vm.so.1 => /usr/lib/libXxf86vm.so.1 (0xb7822000)
        libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0xb781f000)
        libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0xb781a000)
        libdrm.so.2 => /usr/lib/xorg/lib/libdrm.so.2 (0xb7811000)
        /lib/ld-linux.so.2 (0xb7fd2000)
        librt.so.1 => /lib/i686/cmov/librt.so.1 (0xb7807000)
        libx86.so.1 => /lib/libx86.so.1 (0xb7804000)
        libxcb-xlib.so.0 => /usr/lib/libxcb-xlib.so.0 (0xb7802000)
        libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb77ea000)
        libXau.so.6 => /usr/lib/xorg/lib/libXau.so.6 (0xb77e7000)
        libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb77e1000)

Gtk GUI
Code:
templarapheonix@Sonia:~/mupen64plus/trunk$ ldd mupen64plus
        linux-gate.so.1 =>  (0xffffe000)
        libz.so.1 => /usr/lib/libz.so.1 (0xb7f54000)
        libpng12.so.0 => /usr/lib/libpng12.so.0 (0xb7f31000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb7ebb000)
        libSDL-1.2.so.0 => /usr/lib/libSDL-1.2.so.0 (0xb7e0a000)
        libGL.so.1 => /usr/local/lib/libGL.so.1 (0xb7da0000)
        libGLU.so.1 => /usr/local/lib/libGLU.so.1 (0xb7d1a000)
        libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 (0xb798f000)
        libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0 (0xb7908000)
        libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0xb78ec000)
        libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0xb78d4000)
        libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb78ae000)
        libpangocairo-1.0.so.0 => /usr/lib/libpangocairo-1.0.so.0 (0xb78a4000)
        libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0xb7864000)
        libcairo.so.2 => /usr/lib/libcairo.so.2 (0xb77fb000)
        libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0xb77bf000)
        libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0xb77bb000)
        libdl.so.2 => /lib/i686/cmov/libdl.so.2 (0xb77b7000)
        libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0xb7702000)
        libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0xb76fd000)
        librt.so.1 => /lib/i686/cmov/librt.so.1 (0xb76f3000)
        libpthread.so.0 => /lib/i686/cmov/libpthread.so.0 (0xb76da000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb75ec000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb75df000)
        libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7484000)
        libasound.so.2 => /usr/lib/libasound.so.2 (0xb73c2000)
        libdirectfb-1.0.so.0 => /usr/lib/libdirectfb-1.0.so.0 (0xb735a000)
        libfusion-1.0.so.0 => /usr/lib/libfusion-1.0.so.0 (0xb7352000)
        libdirect-1.0.so.0 => /usr/lib/libdirect-1.0.so.0 (0xb733e000)
        libvga.so.1 => /usr/lib/libvga.so.1 (0xb72dd000)
        libX11.so.6 => /usr/lib/libX11.so.6 (0xb71ee000)
        libXext.so.6 => /usr/lib/libXext.so.6 (0xb71df000)
        libXxf86vm.so.1 => /usr/lib/libXxf86vm.so.1 (0xb71da000)
        libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0xb71d7000)
        libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0xb71d2000)
        libdrm.so.2 => /usr/lib/xorg/lib/libdrm.so.2 (0xb71c9000)
        libXcomposite.so.1 => /usr/lib/libXcomposite.so.1 (0xb71c5000)
        libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0xb719b000)
        libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb7192000)
        libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0xb718f000)
        libXi.so.6 => /usr/lib/libXi.so.6 (0xb7187000)
        libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0xb7180000)
        libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0xb7177000)
        /lib/ld-linux.so.2 (0xb7f86000)
        libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0xb7150000)
        libxcb-render-util.so.0 => /usr/lib/libxcb-render-util.so.0 (0xb714c000)
        libxcb-render.so.0 => /usr/lib/libxcb-render.so.0 (0xb7145000)
        libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb712c000)
        libpixman-1.so.0 => /usr/lib/libpixman-1.so.0 (0xb7103000)
        libselinux.so.1 => /lib/libselinux.so.1 (0xb70ea000)
        libpcre.so.3 => /usr/lib/libpcre.so.3 (0xb70c1000)
        libx86.so.1 => /lib/libx86.so.1 (0xb70be000)
        libxcb-xlib.so.0 => /usr/lib/libxcb-xlib.so.0 (0xb70bb000)
        libXau.so.6 => /usr/lib/xorg/lib/libXau.so.6 (0xb70b8000)
        libexpat.so.1 => /usr/lib/libexpat.so.1 (0xb7092000)
        libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb708d000)
 

Auria

New member
Tillin9, thanks for the info. It was just slightly confusing that there is a NO_GUI option that still links GTK in. I'm not sure whether it's documented or if i just missed it.

Anyway, this is not a really important matter, if mupen depends on GTK let it be so. I recently got GTK installed back on my computer (GTK is not yet very solid on mac, there's no official package yet, so it needs to be built from scripts and it breaks often)

However i now get :
Code:
make: *** No rule to make target `r4300//assemble.o', needed by `mupen64plus'.  Stop.

this is on a clean build, today's SVN (r860)

EDIT: oh, i think i get this cause i forgot to pass "NO_ASM=1". Trying again right now...
 
Last edited:

Auria

New member
Okay, the BlightInput patch works fine :) I guess it can be comitted or added to the issue tracker (?).

I also finally made a proper patch for OpenGL types, and submitted it to the bug tracker.
 

Top