What's new

2 players with one keyboard

felixxex

New member
Hi so I'm making an arcade system using a RPi2 and I'm making my arcade controls to act as keyboard strokes. This works great, I've gotten that function to work. Now, I'm trying to figure out how to configure Mupen64plus to allow me to have 2 players on one keyboard. I've been trying to mess around with "inputAutoCfg.ini" and "mupen64plus.cfg" but had no luck making that work.

Any help will be appreciated

Edit:
I have found a way to do this. Here is the config. All I did was experiment A LOT until I have finally come to this config. All controllers are set to Manual and only 1,2 are set to plugged. They each have their own keys and it works :)

# Mupen64Plus Configuration File
# This file is automatically read and written by the Mupen64Plus Core library

[Audio-OMX]

# Mupen64Plus OMX Audio Plugin config parameter version number
Version = 1
# Frequency which is used if rom doesn't want to change it
DEFAULT_FREQUENCY = 33600
# Swaps left and right channels
SWAP_CHANNELS = False
# Audio output to go to (0) Analogue jack, (1) HDMI
OUTPUT_PORT = 1
# Audio Output Frequncy mode (when NATIVE_MODE=false): 0 = Rom Frequency, 1 ROM Frequency if supported (HDMI only), 2 = Standard frequency < Rom Frequency, 3 = Standard frequency > Rom Frequency, [N] Force output frequency
DEFAULT_MODE = 0


[Core]

# Mupen64Plus Core config parameter set version number. Please don't change this version number.
Version = 1.010000
# Draw on-screen display if True, otherwise don't draw OSD
OnScreenDisplay = False
# Use Pure Interpreter if 0, Cached Interpreter if 1, or Dynamic Recompiler if 2 or more
R4300Emulator = 2
# Disable compiled jump commands in dynamic recompiler (should be set to False)
NoCompiledJump = False
# Disable 4MB expansion RAM pack. May be necessary for some games
DisableExtraMem = False
# Increment the save state slot after each save operation
AutoStateSlotIncrement = False
# Activate the R4300 debugger when ROM execution begins, if core was built with Debugger support
EnableDebugger = False
# Save state slot (0-9) to use when saving/loading the emulator state
CurrentStateSlot = 0
# Path to directory where screenshots are saved. If this is blank, the default value of ${UserConfigPath}/screenshot will be used
ScreenshotPath = "/home/pi/RetroPie/roms/n64"
# Path to directory where emulator save states (snapshots) are saved. If this is blank, the default value of ${UserConfigPath}/save will be used
SaveStatePath = "/home/pi/RetroPie/roms/n64"
# Path to directory where SRAM/EEPROM data (in-game saves) are stored. If this is blank, the default value of ${UserConfigPath}/save will be used
SaveSRAMPath = "/home/pi/RetroPie/roms/n64"
# Path to a directory to search when looking for shared data files
SharedDataPath = "/opt/retropie/configs/n64"
# Delay interrupt after DMA SI read/write
DelaySI = True
# Force number of cycles per emulated instruction
CountPerOp = 0


[CoreEvents]

# Mupen64Plus CoreEvents config parameter set version number. Please don't change this version number.
Version = 1
# SDL keysym for stopping the emulator
Kbd Mapping Stop = 27
# SDL keysym for switching between fullscreen/windowed modes
Kbd Mapping Fullscreen = 0
# SDL keysym for saving the emulator state
Kbd Mapping Save State = 286
# SDL keysym for loading the emulator state
Kbd Mapping Load State = 288
# SDL keysym for advancing the save state slot
Kbd Mapping Increment Slot = 0
# SDL keysym for resetting the emulator
Kbd Mapping Reset = 290
# SDL keysym for slowing down the emulator
Kbd Mapping Speed Down = 291
# SDL keysym for speeding up the emulator
Kbd Mapping Speed Up = 292
# SDL keysym for taking a screenshot
Kbd Mapping Screenshot = 293
# SDL keysym for pausing the emulator
Kbd Mapping Pause = 112
# SDL keysym for muting/unmuting the sound
Kbd Mapping Mute = 109
# SDL keysym for increasing the volume
Kbd Mapping Increase Volume = 93
# SDL keysym for decreasing the volume
Kbd Mapping Decrease Volume = 91
# SDL keysym for temporarily going really fast
Kbd Mapping Fast Forward = 102
# SDL keysym for advancing by one frame when paused
Kbd Mapping Frame Advance = 47
# SDL keysym for pressing the game shark button
Kbd Mapping Gameshark = 103
# Joystick event string for stopping the emulator
Joy Mapping Stop = ""
# Joystick event string for switching between fullscreen/windowed modes
Joy Mapping Fullscreen = ""
# Joystick event string for saving the emulator state
Joy Mapping Save State = ""
# Joystick event string for loading the emulator state
Joy Mapping Load State = ""
# Joystick event string for advancing the save state slot
Joy Mapping Increment Slot = ""
# Joystick event string for taking a screenshot
Joy Mapping Screenshot = ""
# Joystick event string for pausing the emulator
Joy Mapping Pause = ""
# Joystick event string for muting/unmuting the sound
Joy Mapping Mute = ""
# Joystick event string for increasing the volume
Joy Mapping Increase Volume = ""
# Joystick event string for decreasing the volume
Joy Mapping Decrease Volume = ""
# Joystick event string for fast-forward
Joy Mapping Fast Forward = ""
# Joystick event string for pressing the game shark button
Joy Mapping Gameshark = ""


[Input-SDL-Control1]

# Mupen64Plus SDL Input Plugin config parameter version number. Please don't change this version number.
version = 2
# Controller configuration mode: 0=Fully Manual, 1=Auto with named SDL Device, 2=Fully automatic
mode = 0
# Specifies which joystick is bound to this controller: -1=No joystick, 0 or more= SDL Joystick number
device = -1
# SDL joystick name (or Keyboard)
name = "Keyboard"
# 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
# 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 = "key(100)"
DPad L = "key(97)"
DPad D = "key(115)"
DPad U = "key(119)"
Start = "key(13)"
Z Trig = "key(122)"
B Button = "key(306)"
A Button = "key(304)"
C Button R = "key(108)"
C Button L = "key(106)"
C Button D = "key(107)"
C Button U = "key(105)"
R Trig = "key(99)"
L Trig = "key(120)"
Mempak switch = "key(44)"
Rumblepak switch = "key(46)"
# Analog axis configuration mappings
X Axis = "key(276,275)"
Y Axis = "key(273,274)"


[Input-SDL-Control2]

# Mupen64Plus SDL Input Plugin config parameter version number. Please don't change this version number.
version = 2
# Controller configuration mode: 0=Fully Manual, 1=Auto with named SDL Device, 2=Fully automatic
mode = 0
# Specifies which joystick is bound to this controller: -1=No joystick, 0 or more= SDL Joystick number
device = -1
# SDL joystick name (or Keyboard)
name = "Keyboard1"
# 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 = 1
# If True, then mouse buttons may be used with this controller
mouse = False
# 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 = "key(104)"
DPad L = "key(102)"
DPad D = "key(103)"
DPad U = "key(116)"
Start = "key(114)"
Z Trig = "key(121)"
B Button = "key(49)"
A Button = "key(50)"
C Button R = "key(54)"
C Button L = "key(52)"
C Button D = "key(53)"
C Button U = "key(56)"
R Trig = "key(55)"
L Trig = "key(57)"
Mempak switch = "key(43)"
Rumblepak switch = "key(45)"
X Axis = "key(52,54)"
Y Axis = "key(56,53)"


[Input-SDL-Control3]

# Mupen64Plus SDL Input Plugin config parameter version number. Please don't change this version number.
version = 2
# Controller configuration mode: 0=Fully Manual, 1=Auto with named SDL Device, 2=Fully automatic
mode = 0
# Specifies which joystick is bound to this controller: -1=No joystick, 0 or more= SDL Joystick number
device = -1
# SDL joystick name (or Keyboard)
name = ""
# Specifies whether this controller is 'plugged in' to the simulated N64
plugged = False
# Specifies which type of expansion pak is in the controller: 1=None, 2=Mem pak, 5=Rumble pak
plugin = 1
# If True, then mouse buttons may be used with this controller
mouse = False
# 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 = ""
Z Trig = ""
B Button = ""
A Button = ""
C Button R = ""
C Button L = ""
C Button D = ""
C Button U = ""
R Trig = ""
L Trig = ""
Mempak switch = ""
Rumblepak switch = ""
# Analog axis configuration mappings
X Axis = ""
Y Axis = ""


[Input-SDL-Control4]

# Mupen64Plus SDL Input Plugin config parameter version number. Please don't change this version number.
version = 2
# Controller configuration mode: 0=Fully Manual, 1=Auto with named SDL Device, 2=Fully automatic
mode = 0
# Specifies which joystick is bound to this controller: -1=No joystick, 0 or more= SDL Joystick number
device = -1
# SDL joystick name (or Keyboard)
name = ""
# Specifies whether this controller is 'plugged in' to the simulated N64
plugged = False
# Specifies which type of expansion pak is in the controller: 1=None, 2=Mem pak, 5=Rumble pak
plugin = 1
# If True, then mouse buttons may be used with this controller
mouse = False
# 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 = ""
Z Trig = ""
B Button = ""
A Button = ""
C Button R = ""
C Button L = ""
C Button D = ""
C Button U = ""
R Trig = ""
L Trig = ""
Mempak switch = ""
Rumblepak switch = ""
# Analog axis configuration mappings
X Axis = ""
Y Axis = ""


[UI-Console]

# Mupen64Plus UI-Console config parameter set version number. Please don't change this version number.
Version = 1
# Directory in which to search for plugins
PluginDir = "./"
# Filename of video plugin
VideoPlugin = "mupen64plus-video-n64.so"
# Filename of audio plugin
AudioPlugin = "mupen64plus-audio-omx.so"
# Filename of input plugin
InputPlugin = "mupen64plus-input-sdl.so"
# Filename of RSP plugin
RspPlugin = "mupen64plus-rsp-hle.so"


[Video-General]

Fullscreen = True
# Width of output window or fullscreen width
ScreenWidth = 640
# Height of output window or fullscreen height
ScreenHeight = 480
# If true, activate the SDL_GL_SWAP_CONTROL attribute
VerticalSync = False


[Video-Glide64mk2]

# Wrapper FBO
wrpFBO = False


[Video-Rice]

# Control when the screen will be updated (0=ROM default, 1=VI origin update, 2=VI origin change, 3=CI change, 4=first CI change, 5=first primitive draw, 6=before screen clear, 7=after screen drawn)
ScreenUpdateSetting = 7
# Frequency to write back the frame buffer (0=every frame, 1=every other frame, etc)
FrameBufferWriteBackControl = 1
# If this option is enabled, the plugin will skip every other frame
SkipFrame = False
# If this option is enabled, the plugin will only draw every other screen update
SkipScreenUpdate = False
# Force to use texture filtering or not (0=auto: n64 choose, 1=force no filtering, 2=force filtering)
ForceTextureFilter = 2
# Primary texture enhancement filter (0=None, 1=2X, 2=2XSAI, 3=HQ2X, 4=LQ2X, 5=HQ4X, 6=Sharpen, 7=Sharpen More, 8=External, 9=Mirrored)
TextureEnhancement = 6
# Secondary texture enhancement filter (0 = none, 1-4 = filtered)
TextureEnhancementControl = 0
# Frame Buffer Emulation (0=ROM default, 1=disable)
FrameBufferSetting = 0
# Render-to-texture emulation (0=none, 1=ignore, 2=normal, 3=write back, 4=write back and reload)
RenderToTexture = 0
# Force to use normal alpha blender
NormalAlphaBlender = False
# Use a faster algorithm to speed up texture loading and CRC computation
FastTextureLoading = False
# Use different texture coordinate clamping code
AccurateTextureMapping = True
# Force emulated frame buffers to be in N64 native resolution
InN64Resolution = False
# Try to reduce Video RAM usage (should never be used)
SaveVRAM = False
# Enable this option to have better render-to-texture quality
DoubleSizeForSmallTxtrBuf = False
# Force to use normal color combiner
DefaultCombinerDisable = False
# Enable game-specific settings from INI file
EnableHacks = True
# If enabled, graphics will be drawn in WinFrame mode instead of solid and texture mode
WinFrameMode = False
# N64 Texture Memory Full Emulation (may fix some games, may break others)
FullTMEMEmulation = False
# Enable vertex clipper for fog operations
OpenGLVertexClipper = False
# Enable/Disable SSE optimizations for capable CPUs
EnableSSE = False
# Use GPU vertex shader
EnableVertexShader = True
# If enabled, texture enhancement will be done only for TxtRect ucode
TexRectOnly = False
# If enabled, texture enhancement will be done only for textures width+height<=128
SmallTextureOnly = False
# Select hi-resolution textures based only on the CRC and ignore format+size information (Glide64 compatibility)
LoadHiResCRCOnly = True
# Enable hi-resolution texture file loading
LoadHiResTextures = False
# Enable texture dumping
DumpTexturesToFiles = False
# Display On-screen FPS
ShowFPS = True
# Use Mipmapping? 0=no, 1=nearest, 2=bilinear, 3=trilinear
Mipmapping = 2
# Enable, Disable or Force fog generation (0=Disable, 1=Enable n64 choose, 2=Force Fog)
FogMethod = 0
# Color bit depth to use for textures (0=default, 1=32 bits, 2=16 bits)
TextureQuality = 0
# Z-buffer depth (only 16 or 32)
OpenGLDepthBufferSetting = 16
# Enable/Disable MultiSampling (0=off, 2,4,8,16=quality)
MultiSampling = 0
# Color bit depth for rendering window (0=32 bits, 1=16 bits)
ColorQuality = 0
# OpenGL level to support (0=auto, 1=OGL_1.1, 2=OGL_1.2, 3=OGL_1.3, 4=OGL_1.4, 5=OGL_1.4_V2, 6=OGL_TNT2, 7=NVIDIA_OGL, 8=OGL_FRAGMENT_PROGRAM)
OpenGLRenderSetting = 0
# Enable/Disable Anisotropic Filtering for Mipmapping (0=no filtering, 2-16=quality). This is uneffective if Mipmapping is 0. If the given value is to high to be supported by your graphic card, the value will be the highest value your graphic card can support. Better result with Trilinear filtering
AnisotropicFiltering = 0
 
Last edited:

V1del

New member
Use code blocks not quote blocks for pasting output/textfiles but yeah, that's how you are supposed to do it, good that you found out yourself
 

Falkoner

New member
Yeah, just remember that some limitations apply depending on what keyboard you're using. Certain drivers have low enough recognition for multiple keypresses at once that two players on a single keyboard can go over the threshold.
 

Top