What's new

Suggested small patches to Mupen64 0.5 (Linux)

Kethinov

New member
Hi all, and congratulations to Hacktarux for a fantastic release. Mupen64 0.5 for Linux + the new and improved plugins makes playable tons of N64 games on my Linux desktop previously unplayable before. I am very much enjoying this release.

There are two suggestions I would like to make though, very small suggestions, very simple suggestions, but this would add some polish to the software.

The first of these suggestions is a small change to be made to Blight's SDL input plugin. While Blight's input plugin is very effective, it does one very annoying thing; it replies on an unhidden config file in your home directory. Attached is is a modified version to plugin.c that corrects this, changing "blight_input.conf" to ".blight_input.conf".

For the record, my hack to plugin.c is as follows:

Code:
Line 192: f = fopen( ".blight_input.conf", "r" );
Line 343: f = fopen( ".blight_input.conf", "w" );

Simple to hack. Hard to compile. :(

Unfortunately, I could not get Blight's input plugin to compile, after repeated attempts. So for anyone else who might have this problem, there is a workaround that i'm using. I wrote a quick shell script as follows:

Code:
mv ~/.blight_input.conf ~/blight_input.conf
/path/to/mupen64/binary
mv ~/blight_input.conf ~/.blight_input.conf

Instead of executing your Mupen64 binary, you can execute this shell script. And it will keep Blight's config file hidden, except for when you're running the emulator. It works well for me, but I'd prefer a patched version of the plugin. That one's a hard sucker to compile!

----

Whew! The second suggestion I would like to make is a small revision to mupen64_icon.png. Icons look better when their backgrounds are transparent. So I opened up the png in The Gimp, added an alpha channel, and cleared away the white surrounding the logo. Looks much better now!

The revised plugin.c for Blight's input plugin and the revised mupen64_icon.png are attached.

Thanks for reading!
 

thrash_metash

New member
Hi, I've got mupen64 running successfully on my linux box with a wireless Xbox controller. So far everything is working great except that the Y axis is reversed (i.e. up is down and down is up.) My controller may be non-standard but anyway I don't see anywhere to invert the Y-axis. There may already be a way to invert it and if so great! If not then my suggestion would be to add a button in the controller setup gui that inverts the Y-axis.

Anyone else have the same problem?

Thanks!!!
 

Hacktarux

Emulator Developer
Moderator
Kethinov said:
Hi all, and congratulations to Hacktarux for a fantastic release. Mupen64 0.5 for Linux + the new and improved plugins makes playable tons of N64 games on my Linux desktop previously unplayable before. I am very much enjoying this release.

There are two suggestions I would like to make though, very small suggestions, very simple suggestions, but this would add some polish to the software.

The first of these suggestions is a small change to be made to Blight's SDL input plugin. While Blight's input plugin is very effective, it does one very annoying thing; it replies on an unhidden config file in your home directory. Attached is is a modified version to plugin.c that corrects this, changing "blight_input.conf" to ".blight_input.conf".

For the record, my hack to plugin.c is as follows:

Code:
Line 192: f = fopen( ".blight_input.conf", "r" );
Line 343: f = fopen( ".blight_input.conf", "w" );

Simple to hack. Hard to compile. :(

Unfortunately, I could not get Blight's input plugin to compile, after repeated attempts. So for anyone else who might have this problem, there is a workaround that i'm using. I wrote a quick shell script as follows:

Code:
mv ~/.blight_input.conf ~/blight_input.conf
/path/to/mupen64/binary
mv ~/blight_input.conf ~/.blight_input.conf

Instead of executing your Mupen64 binary, you can execute this shell script. And it will keep Blight's config file hidden, except for when you're running the emulator. It works well for me, but I'd prefer a patched version of the plugin. That one's a hard sucker to compile!

----

Whew! The second suggestion I would like to make is a small revision to mupen64_icon.png. Icons look better when their backgrounds are transparent. So I opened up the png in The Gimp, added an alpha channel, and cleared away the white surrounding the logo. Looks much better now!

The revised plugin.c for Blight's input plugin and the revised mupen64_icon.png are attached.

Thanks for reading!

What was the problem while trying to compile blight's plugin ? Do you have tried compiling from blight's source or from mupen64's source ?
 
OP
Kethinov

Kethinov

New member
thrash_metash said:
Hi, I've got mupen64 running successfully on my linux box with a wireless Xbox controller. So far everything is working great except that the Y axis is reversed (i.e. up is down and down is up.) My controller may be non-standard but anyway I don't see anywhere to invert the Y-axis. There may already be a way to invert it and if so great! If not then my suggestion would be to add a button in the controller setup gui that inverts the Y-axis.

Anyone else have the same problem?

Thanks!!!

Well, since it inverts the Y axis, have you tried when setting the Y axis pushing the joystick in the wrong direction so that when you play it goes in the correct direction? :D

Hacktarux said:
What was the problem while trying to compile blight's plugin ? Do you have tried compiling from blight's source or from mupen64's source ?

I tried compiling it from both packages and was unsuccessful. I was unable to tell from the compile errors what possible dependencies I was missing.
 

Hacktarux

Emulator Developer
Moderator
Kethinov said:
Well, since it inverts the Y axis, have you tried when setting the Y axis pushing the joystick in the wrong direction so that when you play it goes in the correct direction? :D



I tried compiling it from both packages and was unsuccessful. I was unable to tell from the compile errors what possible dependencies I was missing.

Then, can you past the errors there ? i'd like to know what to advise next time someone has the same problem or maybe i can even fix it for a future release.
 
OP
Kethinov

Kethinov

New member
Silly me, I just downloaded the source again to attempt a compile so I could post a more useful error report because I didn't remember well what I did last time, but I figured out what I was doing wrong before. I didn't have libgtk2.0-dev installed! I thought I just needed the binary libgtk2.0... :blush:

I was able to compile Blight's input plugin successfully with my minor hack and replace the old one in the stock Linux distributed package and it works fine. :)

Attached is the binary.
 
Last edited:

thrash_metash

New member
Kethinov said:
Well, since it inverts the Y axis, have you tried when setting the Y axis pushing the joystick in the wrong direction so that when you play it goes in the correct direction? :D.

Yes I did try pushing the joystick in the wrong direction during setup. It seems that during setup it is only looking for an axis not a direction so it detects the same axis regardless of whether I push up or down. I've searched around quite a bit and I'm very surprised no one else has the same problem.....
 
OP
Kethinov

Kethinov

New member
It's probably an issue with just XBox controllers. I use real N64 controllers with Adaptoids and I have no issues.
 

thrash_metash

New member
Kethinov said:
It's probably an issue with just XBox controllers. I use real N64 controllers with Adaptoids and I have no issues.

Hmmm, that could be true but I don't think it's due to any oddity in the Xbox controller or driver. I'm guessing that there are less people using the Xbox controller with mupen64 and therefore the plugin just hasn't been completely debugged for it. If I could get it to compile I'd go in and flip the axis myself....
 
OP
Kethinov

Kethinov

New member
Well, if you post the errors you're getting when you compile I can try to help you compile it yourself.

Otherwise, if you post the source for the patch you'd like to make to blight's plugin, I can compile it for you and post the binary.
 

Top