Code style fixes
This commit is contained in:
parent
88d2a58e44
commit
e68aa2e4c3
|
@ -248,6 +248,10 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
switch (discType)
|
||||
{
|
||||
case DiscType.DOS:
|
||||
game.System = VSystemID.Raw.DOS;
|
||||
break;
|
||||
|
||||
case DiscType.SegaSaturn:
|
||||
game.System = VSystemID.Raw.SAT;
|
||||
break;
|
||||
|
@ -297,9 +301,6 @@ namespace BizHawk.Client.Common
|
|||
case DiscType.Wii:
|
||||
NoCoreForSystem(VSystemID.Raw.Wii);
|
||||
break;
|
||||
case DiscType.DOS:
|
||||
game.System = VSystemID.Raw.DOS;
|
||||
break;
|
||||
|
||||
case DiscType.AudioDisc:
|
||||
case DiscType.UnknownCDFS:
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace BizHawk.Client.Common
|
|||
["Coleco"] = 59.9227510135505,
|
||||
["Doom"] = 35.0,
|
||||
["DOS"] = 70.086303, // Video dump from DOSBox-X has 70086303/1000000 (70.086303) framerate when launching into DOS.
|
||||
["FDS"] = 60.098813897440515532,
|
||||
["FDS"] = 60.098813897440515532,
|
||||
["FDS_PAL"] = 50.006977968268290849,
|
||||
["GEN"] = 53693175 / (3420.0 * 262),
|
||||
["GEN_PAL"] = 53203424 / (3420.0 * 313),
|
||||
|
|
|
@ -28,6 +28,7 @@ using BizHawk.Emulation.Common;
|
|||
using BizHawk.Emulation.Cores;
|
||||
using BizHawk.Emulation.Cores.Computers.AppleII;
|
||||
using BizHawk.Emulation.Cores.Computers.Commodore64;
|
||||
using BizHawk.Emulation.Cores.Computers.DOS;
|
||||
using BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES;
|
||||
using BizHawk.Emulation.Cores.Consoles.SNK;
|
||||
using BizHawk.Emulation.Cores.Nintendo.GBA;
|
||||
|
@ -41,7 +42,6 @@ using BizHawk.Client.EmuHawk.CoreExtensions;
|
|||
using BizHawk.Client.EmuHawk.CustomControls;
|
||||
using BizHawk.Common.CollectionExtensions;
|
||||
using BizHawk.WinForms.Controls;
|
||||
using BizHawk.Emulation.Cores.Computers.DOS;
|
||||
|
||||
namespace BizHawk.Client.EmuHawk
|
||||
{
|
||||
|
@ -1996,7 +1996,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
byte[] sram;
|
||||
|
||||
// some cores might not know how big the saveram ought to be, so just send it the whole file
|
||||
if (Emulator is AppleII or C64 or MGBAHawk or NeoGeoPort or NES { BoardName: "FDS" } or DOSBox)
|
||||
if (Emulator is AppleII or C64 or DOSBox or MGBAHawk or NeoGeoPort or NES { BoardName: "FDS" })
|
||||
{
|
||||
sram = File.ReadAllBytes(saveRamPath);
|
||||
}
|
||||
|
|
|
@ -463,14 +463,7 @@ namespace BizHawk.Emulation.Common
|
|||
game.System = VSystemID.Raw.Amiga;
|
||||
break;
|
||||
|
||||
case ".IMA":
|
||||
case ".IMG":
|
||||
case ".XDF":
|
||||
case ".DMF":
|
||||
case ".FDD":
|
||||
//case ".FDI":
|
||||
case ".NFD":
|
||||
case ".D88":
|
||||
case ".D88" or ".DMF" or ".FDD" /*or ".FDI"*/ or ".IMA" or ".IMG" or ".NFD" or ".XDF":
|
||||
game.System = VSystemID.Raw.DOS;
|
||||
break;
|
||||
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
<Compile Update="Computers/Amiga/UAE.*.cs" DependentUpon="UAE.cs" />
|
||||
<Compile Update="Computers/AppleII/AppleII.*.cs" DependentUpon="AppleII.cs" />
|
||||
<Compile Update="Computers/Commodore64/C64.*.cs" DependentUpon="C64.cs" />
|
||||
<Compile Update="Computers/DOS/DOSBox.*.cs" DependentUpon="DOSBox.cs" />
|
||||
<Compile Update="Computers/Doom/DSDA.*.cs" DependentUpon="DSDA.cs" />
|
||||
<Compile Update="Computers/DOS/DOSBox.*.cs" DependentUpon="DOSBox.cs" />
|
||||
<Compile Update="Computers/SinclairSpectrum/Hardware/Disk/NECUPD765.*.cs" DependentUpon="NECUPD765.cs" />
|
||||
<Compile Update="Computers/SinclairSpectrum/Hardware/Disk/NECUPS765.Static.cs" DependentUpon="NECUPD765.cs" />
|
||||
<Compile Update="Computers/SinclairSpectrum/Machine/Pentagon128K/Pentagon128.*.cs" DependentUpon="Pentagon128.cs" />
|
||||
|
|
|
@ -5,7 +5,7 @@ using BizHawk.Emulation.Common;
|
|||
namespace BizHawk.Emulation.Cores.Computers.DOS
|
||||
{
|
||||
public partial class DOSBox
|
||||
{
|
||||
{
|
||||
// A class to store the current state of the mouse for delta and button activation calculation
|
||||
private class MouseState
|
||||
{
|
||||
|
@ -60,8 +60,8 @@ namespace BizHawk.Emulation.Cores.Computers.DOS
|
|||
controller.BoolButtons.Add(Inputs.Mouse + " " + MouseInputs.LeftButton);
|
||||
controller.BoolButtons.Add(Inputs.Mouse + " " + MouseInputs.MiddleButton);
|
||||
controller.BoolButtons.Add(Inputs.Mouse + " " + MouseInputs.RightButton);
|
||||
controller.AddAxis(Inputs.Mouse + " " + MouseInputs.PosX, (0).RangeTo(LibDOSBox.SVGA_MAX_WIDTH), LibDOSBox.SVGA_MAX_WIDTH / 2);
|
||||
controller.AddAxis(Inputs.Mouse + " " + MouseInputs.PosY, (0).RangeTo(LibDOSBox.SVGA_MAX_HEIGHT), LibDOSBox.SVGA_MAX_HEIGHT / 2);
|
||||
controller.AddAxis(Inputs.Mouse + " " + MouseInputs.PosX, 0.RangeTo(LibDOSBox.SVGA_MAX_WIDTH), LibDOSBox.SVGA_MAX_WIDTH / 2);
|
||||
controller.AddAxis(Inputs.Mouse + " " + MouseInputs.PosY, 0.RangeTo(LibDOSBox.SVGA_MAX_HEIGHT), LibDOSBox.SVGA_MAX_HEIGHT / 2);
|
||||
controller.AddAxis(Inputs.Mouse + " " + MouseInputs.SpeedX, (-LibDOSBox.SVGA_MAX_WIDTH / 2).RangeTo(LibDOSBox.SVGA_MAX_WIDTH / 2), 0);
|
||||
controller.AddAxis(Inputs.Mouse + " " + MouseInputs.SpeedY, (-LibDOSBox.SVGA_MAX_HEIGHT / 2).RangeTo(LibDOSBox.SVGA_MAX_HEIGHT / 2), 0);
|
||||
}
|
||||
|
|
|
@ -8,4 +8,4 @@ namespace BizHawk.Emulation.Cores.Computers.DOS
|
|||
public bool DriveLightOn { get; private set; }
|
||||
public string DriveLightIconDescription => "Drive Activity";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -287,7 +287,7 @@ namespace BizHawk.Emulation.Cores.Computers.DOS
|
|||
=> SettingsUtil.SetDefaultValues(this);
|
||||
|
||||
public SyncSettings Clone()
|
||||
=> (SyncSettings)MemberwiseClone();
|
||||
=> (SyncSettings) MemberwiseClone();
|
||||
|
||||
public static bool NeedsReboot(SyncSettings x, SyncSettings y)
|
||||
=> !DeepEquality.DeepEquals(x, y);
|
||||
|
|
|
@ -345,20 +345,20 @@ namespace BizHawk.Emulation.Cores.Computers.DOS
|
|||
// Setting joystick inputs
|
||||
if (_syncSettings.EnableJoystick1)
|
||||
{
|
||||
fi.joystick1.up = controller.IsPressed($"P1 {Inputs.Joystick} {JoystickButtons.Up}") ? 1 : 0;
|
||||
fi.joystick1.down = controller.IsPressed($"P1 {Inputs.Joystick} {JoystickButtons.Down}") ? 1 : 0;
|
||||
fi.joystick1.left = controller.IsPressed($"P1 {Inputs.Joystick} {JoystickButtons.Left}") ? 1 : 0;
|
||||
fi.joystick1.right = controller.IsPressed($"P1 {Inputs.Joystick} {JoystickButtons.Right}") ? 1 : 0;
|
||||
fi.joystick1.up = controller.IsPressed($"P1 {Inputs.Joystick} {JoystickButtons.Up}") ? 1 : 0;
|
||||
fi.joystick1.down = controller.IsPressed($"P1 {Inputs.Joystick} {JoystickButtons.Down}") ? 1 : 0;
|
||||
fi.joystick1.left = controller.IsPressed($"P1 {Inputs.Joystick} {JoystickButtons.Left}") ? 1 : 0;
|
||||
fi.joystick1.right = controller.IsPressed($"P1 {Inputs.Joystick} {JoystickButtons.Right}") ? 1 : 0;
|
||||
fi.joystick1.button1 = controller.IsPressed($"P1 {Inputs.Joystick} {JoystickButtons.Button1}") ? 1 : 0;
|
||||
fi.joystick1.button2 = controller.IsPressed($"P1 {Inputs.Joystick} {JoystickButtons.Button2}") ? 1 : 0;
|
||||
}
|
||||
|
||||
if (_syncSettings.EnableJoystick2)
|
||||
{
|
||||
fi.joystick2.up = controller.IsPressed($"P2 {Inputs.Joystick} {JoystickButtons.Up}") ? 1 : 0;
|
||||
fi.joystick2.down = controller.IsPressed($"P2 {Inputs.Joystick} {JoystickButtons.Down}") ? 1 : 0;
|
||||
fi.joystick2.left = controller.IsPressed($"P2 {Inputs.Joystick} {JoystickButtons.Left}") ? 1 : 0;
|
||||
fi.joystick2.right = controller.IsPressed($"P2 {Inputs.Joystick} {JoystickButtons.Right}") ? 1 : 0;
|
||||
fi.joystick2.up = controller.IsPressed($"P2 {Inputs.Joystick} {JoystickButtons.Up}") ? 1 : 0;
|
||||
fi.joystick2.down = controller.IsPressed($"P2 {Inputs.Joystick} {JoystickButtons.Down}") ? 1 : 0;
|
||||
fi.joystick2.left = controller.IsPressed($"P2 {Inputs.Joystick} {JoystickButtons.Left}") ? 1 : 0;
|
||||
fi.joystick2.right = controller.IsPressed($"P2 {Inputs.Joystick} {JoystickButtons.Right}") ? 1 : 0;
|
||||
fi.joystick2.button1 = controller.IsPressed($"P2 {Inputs.Joystick} {JoystickButtons.Button1}") ? 1 : 0;
|
||||
fi.joystick2.button2 = controller.IsPressed($"P2 {Inputs.Joystick} {JoystickButtons.Button2}") ? 1 : 0;
|
||||
}
|
||||
|
@ -397,10 +397,10 @@ namespace BizHawk.Emulation.Cores.Computers.DOS
|
|||
|
||||
// Updating mouse state
|
||||
_mouseState = nextState;
|
||||
}
|
||||
}
|
||||
|
||||
// Processing floppy disks swaps
|
||||
fi.driveActions.insertFloppyDisk = -1;
|
||||
// Processing floppy disks swaps
|
||||
fi.driveActions.insertFloppyDisk = -1;
|
||||
if (_floppyDiskCount > 1 && controller.IsPressed(Inputs.NextFloppyDisk) && !_nextFloppyDiskPressed)
|
||||
{
|
||||
_currentFloppyDisk = (_currentFloppyDisk + 1) % _floppyDiskCount;
|
||||
|
@ -426,7 +426,7 @@ namespace BizHawk.Emulation.Cores.Computers.DOS
|
|||
{
|
||||
unsafe
|
||||
{
|
||||
fi.Keys.Buffer[(int)key] = 1;
|
||||
fi.Keys.Buffer[(int) key] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -475,4 +475,4 @@ namespace BizHawk.Emulation.Cores.Computers.DOS
|
|||
public const string WHD = "__WritableHardDiskDrive";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -233,4 +233,4 @@ namespace BizHawk.Emulation.Cores.Computers.DOS
|
|||
Key_KeyPadPeriod
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -180,7 +180,7 @@ namespace BizHawk.Emulation.Cores.Waterbox
|
|||
if (data.Length != _saveramSize)
|
||||
{
|
||||
Console.WriteLine($"Could not push SaveRam into the core: the length of the data provided ({data.Length}) is different than expected ({_saveramSize})");
|
||||
|
||||
|
||||
// Here, the exception was too traumatic. The emulator shuts down when in debug mode, and is left in an unstable state on release.
|
||||
// Using a softer landing here, although returning true/false plus a string explanation would be more adequate.
|
||||
return;
|
||||
|
@ -194,7 +194,7 @@ namespace BizHawk.Emulation.Cores.Waterbox
|
|||
MemoryBlockUtils.CopySome(source, new MemoryDomainStream(area), area.Size);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected abstract LibWaterboxCore.FrameInfo FrameAdvancePrep(IController controller, bool render, bool rendersound);
|
||||
protected virtual void FrameAdvancePost()
|
||||
|
|
|
@ -190,11 +190,8 @@ namespace BizHawk.Emulation.DiscSystem
|
|||
if (DetectWii())
|
||||
return DiscType.Wii;
|
||||
|
||||
if (DetectISO9660())
|
||||
return DiscType.DOS;
|
||||
|
||||
if (DetectUDF())
|
||||
return DiscType.DOS;
|
||||
if (DetectISO9660()) return DiscType.DOS;
|
||||
if (DetectUDF()) return DiscType.DOS;
|
||||
|
||||
var discView = EDiscStreamView.DiscStreamView_Mode1_2048;
|
||||
if (_disc.TOC.SessionFormat == SessionFormat.Type20_CDXA)
|
||||
|
@ -405,7 +402,7 @@ namespace BizHawk.Emulation.DiscSystem
|
|||
return hexString == "5D1C9EA3";
|
||||
}
|
||||
|
||||
// Detects ISO9660 / Joliet CD formats (target for DOS / Windows)
|
||||
/// <summary>Detects ISO9660 / Joliet CD formats (target for DOS / Windows)</summary>
|
||||
/// <remarks><see href="https://en.wikipedia.org/wiki/ISO_9660"/></remarks>
|
||||
private bool DetectISO9660()
|
||||
{
|
||||
|
@ -414,7 +411,6 @@ namespace BizHawk.Emulation.DiscSystem
|
|||
return false;
|
||||
}
|
||||
|
||||
// Detects UDF
|
||||
/// <remarks><see href="https://www.cnwrecovery.com/manual/HowToRecogniseTypeOfCDDVD.html"/></remarks>
|
||||
private bool DetectUDF()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue