kevinhughes27 / mupen64plus-input-bot

An input driver for mupen64plus that consumes from a python web server
191 stars 48 forks source link

Error on start #12

Open jakiiiiiiiiiiiiiiiiiiiiiiiiiiiii opened 1 year ago

jakiiiiiiiiiiiiiiiiiiiiiiiiiiiii commented 1 year ago

When I try to start mupen64plus with the bot I get this error: Input Error: ERROR, no such host '' Without the bot everything works fine. I have tried to change the host in the config file but I get the same error. Log:

Mupen64Plus Console User-Interface Version 2.5.9

UI-Console: attached to core library 'Mupen64Plus Core' version 2.5.9
UI-Console: Includes support for Dynamic Recompiler.
Core: Using full mem base
Core: Goodname: Mario Kart 64 (U) [!]
Core: Name: MARIOKART64  
Core: MD5: 3A67D9986F54EB282924FCA4CD5F6DFF
Core: CRC: 3E5055B6 2E92DA52
Core: Imagetype: .z64 (native)
Core: Rom size: 12582912 bytes (or 12 Mb or 96 Megabits)
Core: Version: 1446
Core: Manufacturer: Nintendo
Core: Country: USA
UI-Console Status: Cheat codes disabled.
UI-Console: using Video plugin: 'Mupen64Plus OpenGL Video Plugin by Rice' v2.5.9
UI-Console: using Audio plugin: 'Mupen64Plus SDL Audio Plugin' v2.5.9
Input: Mupen64Plus Bot Input Plugin version 0.0.1 startup.
UI-Console: using Input plugin: 'Mupen64Plus Bot Input Plugin' v0.0.1
UI-Console: using RSP plugin: 'Hacktarux/Azimer High-Level Emulation RSP Plugin' v2.5.9
Input: InitiateControllers
Input: Reading Input-Bot-Control0
Input Warning: Missing 'plugged' parameter. Set to 1
Input Warning: Missing 'host' parameter. Setting to localhost
Input Warning: missing 'port' parameter. Set to 8082
Input: Reading Input-Bot-Control1
Input Warning: Missing 'plugged' parameter. Set to 0
Input: Reading Input-Bot-Control2
Input Warning: Missing 'plugged' parameter. Set to 0
Input: Reading Input-Bot-Control3
Input Warning: Missing 'plugged' parameter. Set to 0
Input: Mupen64Plus Bot Input Plugin version 0.0.1 initialized.
RSP: RSP Fallback disabled !
Core: Using video capture backend: dummy
Core: Game controller 0 (Standard controller) has nothing plugged in
Core: Game controller 1 (Standard controller) has nothing plugged in
Core: Game controller 2 (Standard controller) has a Memory pak plugged in
Core: Using CIC type X102
Video: SSE processing enabled.
Video: Found ROM 'Mario Kart 64', CRC b655503e52da922e-45
Video: Enabled hacks for game: 'MARIOKART64'
Video: Initializing OpenGL Device Context.
Core: Setting 32-bit video mode: 640x480
Video Warning: Failed to set GL_SWAP_CONTROL to 0. (it's -1)
Video Warning: Failed to set GL_BUFFER_SIZE to 32. (it's 24)
Video Warning: Failed to set GL_DEPTH_SIZE to 16. (it's 24)
Video: Using OpenGL: Mesa Intel(R) HD Graphics 4600 (HSW GT2) - 3.1 Mesa 22.0.5 : Intel
Audio: Using resampler trivial
Audio: Initializing SDL audio subsystem...
Core: Initializing 4 RDRAM modules for a total of 8 MB
Core: Starting R4300 emulator: Dynamic Recompiler
Input Error: ERROR, no such host ''
Segmentation fault (core dumped)
SambraveTheWise commented 1 year ago

Is your config located here? ~/.config/mupen64plus/mupen64plus.cfg

Also, posting the contents of your config file could help, too.

jakiiiiiiiiiiiiiiiiiiiiiiiiiiiii commented 1 year ago

Yeah my config is located there. Here is my config file:

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

[64DD]

# Filename of the 64DD IPL ROM
IPL-ROM = ""
# Filename of the disk to load into Disk Drive
Disk = ""

[Audio-SDL]

# Mupen64Plus SDL Audio Plugin config parameter version number
Version = 1.000000
# Frequency which is used if rom doesn't want to change it
DEFAULT_FREQUENCY = 33600
# Swaps left and right channels
SWAP_CHANNELS = False
# Size of primary buffer in output samples. This is where audio is loaded after it's extracted from n64's memory.
PRIMARY_BUFFER_SIZE = 16384
# Fullness level target for Primary audio buffer, in equivalent output samples. This value must be larger than the SECONDARY_BUFFER_SIZE. Decreasing this value will reduce audio latency but requires a faster PC to avoid choppiness. Increasing this will increase audio latency but reduce the chance of drop-outs.
PRIMARY_BUFFER_TARGET = 2048
# Size of secondary buffer in output samples. This is SDL's hardware buffer. The SDL documentation states that this should be a power of two between 512 and 8192.
SECONDARY_BUFFER_SIZE = 1024
# Audio resampling algorithm. src-sinc-best-quality, src-sinc-medium-quality, src-sinc-fastest, src-zero-order-hold, src-linear, speex-fixed-{10-0}, trivial
RESAMPLE = "trivial"
# Volume control type: 1 = SDL (only affects Mupen64Plus output)  2 = OSS mixer (adjusts master PC volume)
VOLUME_CONTROL_TYPE = 1
# Percentage change each time the volume is increased or decreased
VOLUME_ADJUST = 5
# Default volume when a game is started.  Only used if VOLUME_CONTROL_TYPE is 1
VOLUME_DEFAULT = 80
# Synchronize Video/Audio
AUDIO_SYNC = True

[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 = True
# 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
# Force number of cycles per emulated instruction
CountPerOp = 0
# Reduce number of cycles per update by power of two when set greater than 0 (overclock)
CountPerOpDenomPot = 0
# Increment the save state slot after each save operation
AutoStateSlotIncrement = False
# Save state slot (0-9) to use when saving/loading the emulator state
CurrentStateSlot = 0
# Activate the R4300 debugger when ROM execution begins, if core was built with Debugger support
EnableDebugger = False
# Path to directory where screenshots are saved. If this is blank, the default value of ${UserDataPath}/screenshot will be used
ScreenshotPath = ""
# Path to directory where emulator save states (snapshots) are saved. If this is blank, the default value of ${UserDataPath}/save will be used
SaveStatePath = ""
# Path to directory where SRAM/EEPROM data (in-game saves) are stored. If this is blank, the default value of ${UserDataPath}/save will be used
SaveSRAMPath = ""
# Path to a directory to search when looking for shared data files
SharedDataPath = ""
# Randomize PI/SI Interrupt Timing
RandomizeInterrupt = True
# Duration of SI DMA (-1: use per game settings)
SiDmaDuration = -1
# Gameboy Camera Video Capture backend
GbCameraVideoCaptureBackend1 = ""
# Disk Save Format (0: Full Disk Copy (*.ndr/*.d6r), 1: RAM Area Only (*.ram))
SaveDiskFormat = 1
# Save (SRAM/State) Filename Format (0: ROM Header Name, 1: Automatic (including partial MD5 hash))
SaveFilenameFormat = 1

[CoreEvents]

# Mupen64Plus CoreEvents config parameter set version number.  Please don't change this version number.
Version = 1.000000
# SDL keysym for save slot 0
Kbd Mapping Slot 0 = 48
# SDL keysym for save slot 1
Kbd Mapping Slot 1 = 49
# SDL keysym for save slot 2
Kbd Mapping Slot 2 = 50
# SDL keysym for save slot 3
Kbd Mapping Slot 3 = 51
# SDL keysym for save slot 4
Kbd Mapping Slot 4 = 52
# SDL keysym for save slot 5
Kbd Mapping Slot 5 = 53
# SDL keysym for save slot 6
Kbd Mapping Slot 6 = 54
# SDL keysym for save slot 7
Kbd Mapping Slot 7 = 55
# SDL keysym for save slot 8
Kbd Mapping Slot 8 = 56
# SDL keysym for save slot 9
Kbd Mapping Slot 9 = 57
# SDL keysym for stopping the emulator
Kbd Mapping Stop = 27
# SDL keysym for switching between fullscreen/windowed modes
Kbd Mapping Fullscreen = 323
# 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 toggling the framerate limiter
Kbd Mapping Speed Limiter Toggle = 121
# 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 resetting the emulator
Joy Mapping Reset = ""
# Joystick event string for slowing down the emulator
Joy Mapping Speed Down = ""
# Joystick event string for speeding up the emulator
Joy Mapping Speed Up = ""
# 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 advancing by one frame when paused
Joy Mapping Frame Advance = ""
# Joystick event string for pressing the game shark button
Joy Mapping Gameshark = ""

[Input-Bot-Control0]
plugged = "1"
host = "localhost" 
port = "8082"

[Input-Bot-Control1]

plugged = "0"
host = "localhost"
port = "8082"

[Input-Bot-Control2]

plugged = "0"
host = "localhost"
port = "8085"

[Input-Bot-Control3]

plugged = "0"
host = "localhost"
port = "8085"

[Input-SDL-Control1]

# Mupen64Plus SDL Input Plugin config parameter version number.  Please don't change this version number.
version = 2.000000
# Controller configuration mode: 0=Fully Manual, 1=Auto with named SDL Device, 2=Fully automatic
mode = 2
# 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, 4=Transfer 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.000000
# Controller configuration mode: 0=Fully Manual, 1=Auto with named SDL Device, 2=Fully automatic
mode = 2
# 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, 4=Transfer 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 = ""
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-Control3]

# Mupen64Plus SDL Input Plugin config parameter version number.  Please don't change this version number.
version = 2.000000
# Controller configuration mode: 0=Fully Manual, 1=Auto with named SDL Device, 2=Fully automatic
mode = 2
# 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, 4=Transfer 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 = ""
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.000000
# Controller configuration mode: 0=Fully Manual, 1=Auto with named SDL Device, 2=Fully automatic
mode = 2
# 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, 4=Transfer 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 = ""
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 = ""

[Rsp-HLE]

# Mupen64Plus RSP HLE Plugin config parameter version number
Version = 1.000000
# Path to a RSP plugin which will be used when encountering an unknown ucode.You can disable this by letting an empty string.
RspFallback = ""
# Send display lists to the graphics plugin
DisplayListToGraphicsPlugin = True
# Send audio lists to the audio plugin
AudioListToAudioPlugin = False

[Transferpak]

# Filename of the GB ROM to load into transferpak 1
GB-rom-1 = ""
# Filename of the GB RAM to load into transferpak 1
GB-ram-1 = ""
# Filename of the GB ROM to load into transferpak 2
GB-rom-2 = ""
# Filename of the GB RAM to load into transferpak 2
GB-ram-2 = ""
# Filename of the GB ROM to load into transferpak 3
GB-rom-3 = ""
# Filename of the GB RAM to load into transferpak 3
GB-ram-3 = ""
# Filename of the GB ROM to load into transferpak 4
GB-rom-4 = ""
# Filename of the GB RAM to load into transferpak 4
GB-ram-4 = ""

[UI-Console]

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

[Video-General]

# Use fullscreen mode if True, or windowed mode if False
Fullscreen = False
# 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-Rice]

# Mupen64Plus Rice Video Plugin config parameter version number
Version = 1
# Frame Buffer Emulation (0=ROM default, 1=disable)
FrameBufferSetting = 0
# Frequency to write back the frame buffer (0=every frame, 1=every other frame, etc)
FrameBufferWriteBackControl = 0
# Render-to-texture emulation (0=none, 1=ignore, 2=normal, 3=write back, 4=write back and reload)
RenderToTexture = 0
# 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 = 1
# 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 = True
# If this option is enabled, the plugin will skip every other frame
SkipFrame = False
# 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 = False
# Use Mipmapping? 0=no, 1=nearest, 2=bilinear, 3=trilinear
Mipmapping = 2
# Enable, Disable fog generation (0=Disable, 1=Enable)
FogMethod = 1
# Force to use texture filtering or not (0=auto: n64 choose, 1=force no filtering, 2=force filtering)
ForceTextureFilter = 0
# 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 = 0
# Secondary texture enhancement filter (0 = none, 1-4 = filtered)
TextureEnhancementControl = 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_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
# If true, use polygon offset values specified below
ForcePolygonOffset = False
# Specifies a scale factor that is used to create a variable depth offset for each polygon
PolygonOffsetFactor = 0.000000
# Is multiplied by an implementation-specific value to create a constant depth offset
PolygonOffsetUnits = 0.000000
samly97 commented 1 year ago

If you checkout the specific commits to Core and Input Bot then this should work again: https://github.com/bzier/gym-mupen64plus/blob/master/Dockerfile

I went with the original config file and that worked for me.

mauchf commented 7 months ago

I've had the same issue. Plugging all four controlers did the trick for me:

[Input-Bot-Control0]

plugged = "1" host = "localhost" port = "8082"

[Input-Bot-Control1]

plugged = "1" host = "localhost" port = "8082"

[Input-Bot-Control2]

plugged = "1" host = "localhost" port = "8082"

[Input-Bot-Control3]

plugged = "1" host = "localhost" port = "8082"