你如何配置mupen64plus控件?

我使用Synaptic从存储库安装了mupen64plus。 我喜欢模拟器(大多数情况下,TLOZ Ocarina of Time上的几个图形故障),特别是它在我的旧机器上的性能,但我无法弄清楚如何为自己配置控件。 我尝试在这里查看Google Code的指南,但是找不到我需要编辑的文件,并且关键ID的链接不起作用,所以即使我找到了文件,我也无法改变任何内容。 所以我需要的是一个带有键ID的资源以及在哪里找到我需要编辑的文件。

我正在运行Ubuntu 12.10 32位。 2GB RAM,Intel CORE 2 DUO @ 2.00GHz

这是问题的另一部分。 M64py是一个受欢迎的选择。 但是,它要求您输入所需的各种文件的路径。 默认位置在哪里? 包括32位系统和64位系统。 (所需文件是库文件,插件目录和数据目录。)

您可以使用配置文件配置控件。 首选方法是使用具有控制器设置的前端。

M64py

M64py是Mupen64Plus的Qt前端。 它可以从这里下载

它有一个控制器配置ui,如图所示

你可以从这里配置mupen64plus /path/to/rom ,然后从这里启动游戏或者在终端中实际运行mupen64plus /path/to/rom

我自己无法运行GUI的mupen,所以我最终弄清楚如何配置它并在终端中运行它。 我用来配置控制器的文件是:

 ~/.config/mupen64plus/mupen64plus.cfg 

在那里,我找到了它谈论操纵杆的区域,并通过反复试验看出,如果我在控制器上看到一个数字(按钮已编号)我在配置文件中输入该数字减一,而对于按钮我不是使用我只是留空,如“”。 我将保留我使用的代码:

  [Input-SDL-Control1] # Mupen64Plus SDL Input Plugin config parameter version number. Please don't change version = 1 # Specifies whether this controller is 'plugged in' to the simulated N64 plugged = True # Specifies which type of expansion pak is in the controller: 1=None, 2=Mem pak, 5=Rumble pak plugin = 2 # If True, then mouse buttons may be used with this controller mouse = False # Specifies which joystick is bound to this controller: -2=Keyboard/mouse, -1=Auto config, 0 or more= SDL Joystick number device = 1 # SDL joystick name (name check disabled if this is empty string) name = "DragonRise Inc. Generic USB Joystick " # Scaling factor for mouse movements. For X, Y axes. MouseSensitivity = "2.00,2.00" # The minimum absolute value of the SDL analog joystick axis to move the N64 controller axis value from 0. For X, Y axes. AnalogDeadzone = "4096,4096" # An absolute value of the SDL joystick axis >= AnalogPeak will saturate the N64 controller axis value (at 80). For X, Y axes. For each axis, this must be greater than the corresponding AnalogDeadzone value AnalogPeak = "32768,32768" # Digital button configuration mappings DPad R = "" DPad L = "" DPad D = "" DPad U = "" Start = "button(9)" Z Trig = "button(6)" B Button = "button(1)" A Button = "button(0)" C Button R = "axis(3+)" C Button L = "axis(3+)" C Button D = "axis(4+)" C Button U = "axis(4+)" R Trig = "button(7)" L Trig = "" Mempak switch = "" Rumblepak switch = "" # Analog axis configuration mappings X Axis = "axis(0-,0+)" Y Axis = "axis(1-,1+)" 

不幸的是,m64py对我来说不是一个有效的解决方案,“反复试验”太麻烦了。 这是一个解决方案,任何人当前运行mupen64plus,有或没有gui,应该能够使用。

您将需要操纵杆校准工具jscal来确定哪个按钮是哪个。 有关这方面的帮助,请参阅Ubuntu论坛 – 游戏和休闲 – HOWTO:Ubuntu下的游戏杆/游戏手柄

假设您已经设置好并且操纵杆已经正确校准,您需要做的就是运行jstest-gtk /dev/input/js0 & ,其中js0是您当前正在测试的设备的校准文件。

您将看到编号轴和按钮的gui。 它看起来像这样:

用于mupen linux的jscal控制器和操纵杆按钮映射

现在,您可以按下控制器上的按钮,查看它对应的轴或按钮。


将自定义控制器配置应用于mupen

找到InputAutoCfg.ini
运行locate InputAutoCfg.ini 。 对我来说,这是在/usr/share/games/mupen64plus/InputAutoCfg.ini目录中。

在首选文本编辑器中打开InputAutoCfg.ini
vim /usr/share/games/mupen64plus/InputAutoCfg.ini

找到您的设备并编辑设置。
您可以通过运行mupen64plus并查看打印到终端的输入信息,找出mupen正在使用的设备。

我说Input: N64 Controller #1: Using auto-config with SDL joystick 0 ('Generic X-Box pad') 。 所以对我来说,设置可以在[Generic X-Box pad]

保存/写入对文件的更改,并在下次运行mupen64plus时执行mupen64plus

经过一些改变后,我看起来像这样:

 [Generic X-Box pad] plugged = True plugin = 2 mouse = False AnalogDeadzone = "4096,4096" AnalogPeak = "32768,32768" DPad R = "hat(0 Right)" DPad L = "hat(0 Left)" DPad D = "hat(0 Down)" DPad U = "hat(0 Up)" Start = "button(7)" Z Trig = "button(4)" B Button = "button(2)" A Button = "button(0)" C Button R = "axis(3+)" C Button L = "axis(3-)" C Button D = "axis(4+)" C Button U = "axis(4-)" R Trig = "button(5)" L Trig = "axis(2+)" Mempak switch = "axis(5+)" Rumblepak switch = "button(2)" X Axis = "axis(0-,0+)" Y Axis = "axis(1-,1+)" 

使用jstest ,您应该能够弄清楚如何配置InputAutoCfg.ini以使用输入事件字自定义输入设置。

有时,查看N64控制器布局有助于确定要映射的参数。

N64控制器按钮布局配置