diff --git a/.vs/NullDC BEAR/v16/.suo b/.vs/NullDC BEAR/v16/.suo index c85439c..a681d00 100644 Binary files a/.vs/NullDC BEAR/v16/.suo and b/.vs/NullDC BEAR/v16/.suo differ diff --git a/NullDC CvS2 BEAR/MednafenLauncher.vb b/NullDC CvS2 BEAR/MednafenLauncher.vb index 2229706..bb3e9a2 100644 --- a/NullDC CvS2 BEAR/MednafenLauncher.vb +++ b/NullDC CvS2 BEAR/MednafenLauncher.vb @@ -38,6 +38,7 @@ Public Class MednafenLauncher Dim LineCount = 0 For Each _line In _mednafenConfigs + If _line.Length > 1 Then For Each _optimization As String In SpecialSettings If _line.StartsWith(_optimization.Split(" ")(0).Trim & " ") Then @@ -55,6 +56,12 @@ Public Class MednafenLauncher _mednafenConfigs(LineCount) = "sound.volume " & MainformRef.ConfigFile.EmulatorVolume End If + If _line.StartsWith("nes.input.port") Then + If Not _line.Split(" ")(1) = "none" And Not _line.Split(" ")(1) = "gamepad" And Not _line.Split(" ")(1) = "zapper" Then + _mednafenConfigs(LineCount) = _line.Split(" ")(0) & " gamepad" + End If + End If + End If LineCount += 1 diff --git a/NullDC CvS2 BEAR/Resources/Updates.zip b/NullDC CvS2 BEAR/Resources/Updates.zip index b70ee35..4542c35 100644 Binary files a/NullDC CvS2 BEAR/Resources/Updates.zip and b/NullDC CvS2 BEAR/Resources/Updates.zip differ diff --git a/NullDC CvS2 BEAR/frmKeyMapperSDL.vb b/NullDC CvS2 BEAR/frmKeyMapperSDL.vb index 0c6fe0c..e5c47f0 100644 --- a/NullDC CvS2 BEAR/frmKeyMapperSDL.vb +++ b/NullDC CvS2 BEAR/frmKeyMapperSDL.vb @@ -1414,6 +1414,53 @@ Public Class frmKeyMapperSDL DoAnnoyingFlycastStuff(CompatStuff, DreamcastStuff, EmulatorStuff, "axis_btn_z", "btn_z", _line, _player, _ControllerName, False) End If + ' MACROS + 'I_BC_345 = k0|k0 + 'I_BC_012 = k0|k0 + 'I_BC_45 = k0|k0 + 'I_BC_34 = k0|k0 + 'I_BC_12 = k0|k0 + 'I_BC_01 = k0|k0 + 'I_BC_25 = k0|k0 + 'I_BC_14 = k0|k0 + 'I_BC_03 = k0|k0 + + If _line.StartsWith("I_BC_03=") Then ' + DoAnnoyingFlycastStuff(CompatStuff, CompatStuff, CompatStuff, "axis_1+4", "1+4", _line, _player, _ControllerName, False) + End If + + If _line.StartsWith("I_BC_14=") Then ' + DoAnnoyingFlycastStuff(CompatStuff, CompatStuff, CompatStuff, "axis_2+5", "2+5", _line, _player, _ControllerName, False) + End If + + If _line.StartsWith("I_BC_25=") Then ' + DoAnnoyingFlycastStuff(CompatStuff, CompatStuff, CompatStuff, "axis_3+6", "3+6", _line, _player, _ControllerName, False) + End If + + If _line.StartsWith("I_BC_01=") Then ' + DoAnnoyingFlycastStuff(CompatStuff, CompatStuff, CompatStuff, "axis_1+2", "1+2", _line, _player, _ControllerName, False) + End If + + If _line.StartsWith("I_BC_12=") Then ' + DoAnnoyingFlycastStuff(CompatStuff, CompatStuff, CompatStuff, "axis_2+3", "2+3", _line, _player, _ControllerName, False) + End If + + If _line.StartsWith("I_BC_34=") Then ' + DoAnnoyingFlycastStuff(CompatStuff, CompatStuff, CompatStuff, "axis_4+5", "4+5", _line, _player, _ControllerName, False) + End If + + If _line.StartsWith("I_BC_45=") Then ' + DoAnnoyingFlycastStuff(CompatStuff, CompatStuff, CompatStuff, "axis_5+6", "5+6", _line, _player, _ControllerName, False) + End If + + If _line.StartsWith("I_BC_012=") Then ' + DoAnnoyingFlycastStuff(CompatStuff, CompatStuff, CompatStuff, "axis_1+2+3", "1+2+3", _line, _player, _ControllerName, False) + End If + + If _line.StartsWith("I_BC_345=") Then ' + DoAnnoyingFlycastStuff(CompatStuff, CompatStuff, CompatStuff, "axis_4+5+6", "4+5+6", _line, _player, _ControllerName, False) + End If + Else Dim ToStickornotToStick = "CONT_" If _Peripheral = "1" Then ToStickornotToStick = "STICK_" @@ -1530,6 +1577,55 @@ Public Class frmKeyMapperSDL DoAnnoyingFlycastStuff(CompatStuff, DreamcastStuff, EmulatorStuff, "axis_btn_c", "btn_c", _line, _player, _ControllerName, False) End If + ' Macros + + 'CONT_BC_ABC = k0|k0 + 'CONT_BC_XYZ = k0|k0 + 'CONT_BC_BC = k0|k0 + 'CONT_BC_AB = k0|k0 + 'CONT_BC_YZ = k0|k0 + 'CONT_BC_XY = k0|k0 + 'CONT_BC_CZ = k0|k0 + 'CONT_BC_YB = k0|k0 + 'CONT_BC_XA = k0|k0 + + If _line.StartsWith(ToStickornotToStick & "BC_XA=") Then ' btn_start + DoAnnoyingFlycastStuff(CompatStuff, CompatStuff, CompatStuff, "axis_X+A", "X+A", _line, _player, _ControllerName, False) + End If + + If _line.StartsWith(ToStickornotToStick & "BC_YB=") Then ' btn_start + DoAnnoyingFlycastStuff(CompatStuff, CompatStuff, CompatStuff, "axis_Y+B", "Y+B", _line, _player, _ControllerName, False) + End If + + If _line.StartsWith(ToStickornotToStick & "BC_CZ=") Then ' L/R + DoAnnoyingFlycastStuff(CompatStuff, CompatStuff, CompatStuff, "axis_L+R", "L+R", _line, _player, _ControllerName, False) + End If + + If _line.StartsWith(ToStickornotToStick & "BC_XY=") Then ' btn_start + DoAnnoyingFlycastStuff(CompatStuff, CompatStuff, CompatStuff, "axis_X+Y", "X+Y", _line, _player, _ControllerName, False) + End If + + If _line.StartsWith(ToStickornotToStick & "BC_YZ=") Then ' btn_start + DoAnnoyingFlycastStuff(CompatStuff, CompatStuff, CompatStuff, "axis_Y+L", "Y+L", _line, _player, _ControllerName, False) + End If + + If _line.StartsWith(ToStickornotToStick & "BC_AB=") Then ' btn_start + DoAnnoyingFlycastStuff(CompatStuff, CompatStuff, CompatStuff, "axis_A+B", "A+B", _line, _player, _ControllerName, False) + End If + + If _line.StartsWith(ToStickornotToStick & "BC_BC=") Then ' btn_start + DoAnnoyingFlycastStuff(CompatStuff, CompatStuff, CompatStuff, "axis_B+R", "B+R", _line, _player, _ControllerName, False) + End If + + If _line.StartsWith(ToStickornotToStick & "BC_ABC=") Then ' btn_start + DoAnnoyingFlycastStuff(CompatStuff, CompatStuff, CompatStuff, "axis_A+B+R", "A+B+R", _line, _player, _ControllerName, False) + End If + + If _line.StartsWith(ToStickornotToStick & "BC_XYZ=") Then ' btn_start + DoAnnoyingFlycastStuff(CompatStuff, CompatStuff, CompatStuff, "axis_X+Y+L", "X+Y+L", _line, _player, _ControllerName, False) + End If + + End If Next diff --git a/NullDC CvS2 BEAR/frmMain.vb b/NullDC CvS2 BEAR/frmMain.vb index 671e861..88c0f58 100644 --- a/NullDC CvS2 BEAR/frmMain.vb +++ b/NullDC CvS2 BEAR/frmMain.vb @@ -6,12 +6,12 @@ Imports System.Text Imports System.Threading Public Class frmMain - Public IsBeta As Boolean = True + Public IsBeta As Boolean = False ' Update Stuff Dim UpdateCheckClient As New WebClient - Public Ver As String = "1.93f" 'Psst make sure to also change DreamcastGameOptimizations.txt + Public Ver As String = "1.94" 'Psst make sure to also change DreamcastGameOptimizations.txt ' Public InputHandler As InputHandling Public NetworkHandler As NetworkHandling @@ -91,9 +91,11 @@ Public Class frmMain End If End If + Catch ex As Exception MsgBox("Couldn't change SDL version make sure nullDC is closed. Error: " & vbNewLine & ex.Message) End + End Try End Sub diff --git a/NullDC CvS2 BEAR/mFlycastLauncher.vb b/NullDC CvS2 BEAR/mFlycastLauncher.vb index 743f667..00b8a1d 100644 --- a/NullDC CvS2 BEAR/mFlycastLauncher.vb +++ b/NullDC CvS2 BEAR/mFlycastLauncher.vb @@ -64,11 +64,36 @@ Public Class MFlycastLauncher If MainformRef.ConfigFile.Vsync = 1 Then Vsync = "yes" 'FlycastInfo.Arguments += "-config config:rend.vsync=" & Vsync & " " + Dim CheckIfCreated As String() = {"GGPOAnalogAxes", "Stats"} + Dim InSection As String() = {"network", "network"} + Dim ValueDefault As String() = {"2", "yes"} + Dim WereCreated As Boolean() = {False, False} + +ReDoConfigs: + 'Some settings are locked some are not, these are not or maybe they're settings i know won't cause desync so i let people change Dim lines() As String = File.ReadAllLines(MainformRef.NullDCPath & "\flycast\emu.cfg") + + For Each line As String In lines + For i = 0 To CheckIfCreated.Count - 1 + If line.StartsWith(CheckIfCreated(i)) Then WereCreated(i) = True + Next + Next + Dim linenumber = 0 For Each line As String In lines + For i = 0 To CheckIfCreated.Count - 1 + If WereCreated(i) = False Then + If line.Trim = "[" & InSection(i) & "]" Then + lines(linenumber) = lines(linenumber) & vbNewLine & CheckIfCreated(i) & " = " & ValueDefault(i) + File.WriteAllLines(MainformRef.NullDCPath & "\flycast\emu.cfg", lines) + GoTo ReDoConfigs + + End If + End If + Next + If line.StartsWith("rend.vsync = ") Then lines(linenumber) = "rend.vsync = " & Vsync If line.StartsWith("device1 = ") Then lines(linenumber) = "device1 = 0" @@ -97,15 +122,28 @@ Public Class MFlycastLauncher 'Dreamcast.SavestateSlot = 0 If line.StartsWith("Dreamcast.SavestateSlot = ") Then lines(linenumber) = "Dreamcast.SavestateSlot = 0" + If line.StartsWith("GGPOAnalogAxes = ") Then + Select Case romdetails(2) + Case "na", "fc_na", "fly_na" + lines(linenumber) = "GGPOAnalogAxes = 0" + Case Else + lines(linenumber) = "GGPOAnalogAxes = 2" + End Select + + End If + If MainformRef.ConfigFile.Status = "Offline" Then If line.StartsWith("GGPO = ") Then lines(linenumber) = "GGPO = no" Else If line.StartsWith("GGPO = ") Then lines(linenumber) = "GGPO = yes" + End If - linenumber += 1 + linenumber += 1 Next + ' Check if created stuff and if not then create them + File.WriteAllLines(MainformRef.NullDCPath & "\flycast\emu.cfg", lines) ' FlycastInfo.Arguments += "-config config:rend.DelayFrameSwapping=no " @@ -143,6 +181,9 @@ Public Class MFlycastLauncher If File.Exists(MainformRef.NullDCPath & "\dc\vmu_data_host.bin") Then If romdetails(2) = "dc" Or romdetails(2) = "fly_dc" Then FileSystem.FileCopy(MainformRef.NullDCPath & "\dc\vmu_data_host.bin", MainformRef.NullDCPath & "\flycast\data\vmu_save_A1.bin") + FlycastInfo.Arguments += "-config config:GGPOAnalogAxes=2 " + Else + FlycastInfo.Arguments += "-config config:GGPOAnalogAxes=0 " End If End If