diff --git a/Core/BandaiKaraoke.h b/Core/BandaiKaraoke.h index b4b35ba1..7a0211ac 100644 --- a/Core/BandaiKaraoke.h +++ b/Core/BandaiKaraoke.h @@ -12,7 +12,7 @@ protected: uint16_t GetCHRPageSize() override { return 0x2000; } bool AllowRegisterRead() override { return true; } bool HasBusConflicts() override { return true; } - ConsoleFeatures GetAvailableFeatures() { return ConsoleFeatures::BandaiMicrophone; } + ConsoleFeatures GetAvailableFeatures() override { return ConsoleFeatures::BandaiMicrophone; } void InitMapper() override { diff --git a/Core/EmulationSettings.cpp b/Core/EmulationSettings.cpp index 224c54c5..e1eabb04 100644 --- a/Core/EmulationSettings.cpp +++ b/Core/EmulationSettings.cpp @@ -86,7 +86,7 @@ ControllerType EmulationSettings::_controllerTypes[4] = { ControllerType::None, KeyMappingSet EmulationSettings::_controllerKeys[4] = { KeyMappingSet(), KeyMappingSet(), KeyMappingSet(), KeyMappingSet() }; bool EmulationSettings::_needControllerUpdate = false; uint32_t EmulationSettings::_zapperDetectionRadius = 0; -std::unordered_map EmulationSettings::_mouseSensitivity; +std::unordered_map EmulationSettings::_mouseSensitivity; int32_t EmulationSettings::_inputPollScanline = 240; uint32_t EmulationSettings::_defaultPpuPalette[64] = { /* 2C02 */ 0xFF666666, 0xFF002A88, 0xFF1412A7, 0xFF3B00A4, 0xFF5C007E, 0xFF6E0040, 0xFF6C0600, 0xFF561D00, 0xFF333500, 0xFF0B4800, 0xFF005200, 0xFF004F08, 0xFF00404D, 0xFF000000, 0xFF000000, 0xFF000000, 0xFFADADAD, 0xFF155FD9, 0xFF4240FF, 0xFF7527FE, 0xFFA01ACC, 0xFFB71E7B, 0xFFB53120, 0xFF994E00, 0xFF6B6D00, 0xFF388700, 0xFF0C9300, 0xFF008F32, 0xFF007C8D, 0xFF000000, 0xFF000000, 0xFF000000, 0xFFFFFEFF, 0xFF64B0FF, 0xFF9290FF, 0xFFC676FF, 0xFFF36AFF, 0xFFFE6ECC, 0xFFFE8170, 0xFFEA9E22, 0xFFBCBE00, 0xFF88D800, 0xFF5CE430, 0xFF45E082, 0xFF48CDDE, 0xFF4F4F4F, 0xFF000000, 0xFF000000, 0xFFFFFEFF, 0xFFC0DFFF, 0xFFD3D2FF, 0xFFE8C8FF, 0xFFFBC2FF, 0xFFFEC4EA, 0xFFFECCC5, 0xFFF7D8A5, 0xFFE4E594, 0xFFCFEF96, 0xFFBDF4AB, 0xFFB3F3CC, 0xFFB5EBF2, 0xFFB8B8B8, 0xFF000000, 0xFF000000 }; diff --git a/Core/EmulationSettings.h b/Core/EmulationSettings.h index 90b00115..6b95e08e 100644 --- a/Core/EmulationSettings.h +++ b/Core/EmulationSettings.h @@ -613,7 +613,7 @@ private: static KeyMappingSet _controllerKeys[4]; static bool _needControllerUpdate; static uint32_t _zapperDetectionRadius; - static std::unordered_map _mouseSensitivity; + static std::unordered_map _mouseSensitivity; static int32_t _inputPollScanline; static int32_t _nsfAutoDetectSilenceDelay; @@ -1296,12 +1296,12 @@ public: static void SetMouseSensitivity(MouseDevice device, double sensitivity) { - _mouseSensitivity[device] = sensitivity; + _mouseSensitivity[(int)device] = sensitivity; } static double GetMouseSensitivity(MouseDevice device) { - auto result = _mouseSensitivity.find(device); + auto result = _mouseSensitivity.find((int)device); if(result != _mouseSensitivity.end()) { return result->second; } else { diff --git a/Core/HdPackLoader.cpp b/Core/HdPackLoader.cpp index 0d3cd4fb..f1f2b24b 100644 --- a/Core/HdPackLoader.cpp +++ b/Core/HdPackLoader.cpp @@ -120,6 +120,7 @@ bool HdPackLoader::LoadFile(string filename, vector &fileData) bool HdPackLoader::LoadPack() { + string currentLine; try { vector hdDefinition; if(!LoadFile("hires.txt", hdDefinition)) { @@ -129,7 +130,10 @@ bool HdPackLoader::LoadPack() InitializeGlobalConditions(); for(string lineContent : StringUtilities::Split(string(hdDefinition.data(), hdDefinition.data() + hdDefinition.size()), '\n')) { - lineContent = lineContent.substr(0, lineContent.length() - 1); + if(lineContent[lineContent.size() - 1] == '\r') { + lineContent = lineContent.substr(0, lineContent.size() - 1); + } + currentLine = lineContent; vector conditions; if(lineContent.substr(0, 1) == "[") { @@ -181,7 +185,7 @@ bool HdPackLoader::LoadPack() return true; } catch(std::exception ex) { - MessageManager::Log(string("[HDPack] Error loading HDPack: ") + ex.what()); + MessageManager::Log(string("[HDPack] Error loading HDPack: ") + ex.what() + " on line: " + currentLine); return false; } } diff --git a/GUI.NET/Debugger/Controls/ctrlSpriteViewer.Designer.cs b/GUI.NET/Debugger/Controls/ctrlSpriteViewer.Designer.cs index 2a910571..fe11451b 100644 --- a/GUI.NET/Debugger/Controls/ctrlSpriteViewer.Designer.cs +++ b/GUI.NET/Debugger/Controls/ctrlSpriteViewer.Designer.cs @@ -167,7 +167,7 @@ // this.picPreview.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.picPreview.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.tableLayoutPanel4.SetColumnSpan(this.picPreview, 3); + this.tableLayoutPanel4.SetColumnSpan(this.picPreview, 4); this.picPreview.ContextMenuStrip = this.ctxMenu; this.picPreview.Location = new System.Drawing.Point(94, 257); this.picPreview.Name = "picPreview"; @@ -269,7 +269,7 @@ this.txtPosition.Location = new System.Drawing.Point(94, 55); this.txtPosition.Name = "txtPosition"; this.txtPosition.ReadOnly = true; - this.txtPosition.Size = new System.Drawing.Size(53, 20); + this.txtPosition.Size = new System.Drawing.Size(66, 20); this.txtPosition.TabIndex = 18; // // lblTileIndex diff --git a/GUI.NET/InteropEmu.cs b/GUI.NET/InteropEmu.cs index 17228e42..2233ec8d 100644 --- a/GUI.NET/InteropEmu.cs +++ b/GUI.NET/InteropEmu.cs @@ -1205,7 +1205,7 @@ namespace Mesen.GUI [MarshalAs(UnmanagedType.I1)] public bool Enabled; public Byte OutputVolume; - public UInt32 Frequency; + public double Frequency; public ApuLengthCounterState LengthCounter; public ApuEnvelopeState Envelope; @@ -1218,7 +1218,7 @@ namespace Mesen.GUI [MarshalAs(UnmanagedType.I1)] public bool Enabled; - public UInt32 Frequency; + public double Frequency; public Byte OutputVolume; public ApuLengthCounterState LengthCounter; @@ -1233,7 +1233,7 @@ namespace Mesen.GUI [MarshalAs(UnmanagedType.I1)] public bool Enabled; - public UInt32 Frequency; + public double Frequency; public Byte OutputVolume; public ApuLengthCounterState LengthCounter; @@ -1252,7 +1252,7 @@ namespace Mesen.GUI public UInt16 Period; public UInt16 BytesRemaining; - public UInt32 Frequency; + public double SampleRate; public Byte OutputVolume; }