diff --git a/BizHawk.Client.Common/BizHawk.Client.Common.csproj b/BizHawk.Client.Common/BizHawk.Client.Common.csproj index 805f752786..ad62cb179f 100644 --- a/BizHawk.Client.Common/BizHawk.Client.Common.csproj +++ b/BizHawk.Client.Common/BizHawk.Client.Common.csproj @@ -268,6 +268,7 @@ + diff --git a/BizHawk.Client.Common/tools/Watch/WatchList/WatchDisplayTypeComparer.cs b/BizHawk.Client.Common/tools/Watch/WatchList/WatchDisplayTypeComparer.cs new file mode 100644 index 0000000000..59ca6ad1ba --- /dev/null +++ b/BizHawk.Client.Common/tools/Watch/WatchList/WatchDisplayTypeComparer.cs @@ -0,0 +1,44 @@ +using System.Collections.Generic; + +namespace BizHawk.Client.Common +{ + /// + /// This class hold a collection + /// + public sealed partial class WatchList + { + /// + /// Nested private class that defines how to compare two es based on their full display type + /// + private sealed class WatchFullDisplayTypeComparer + : WatchEqualityComparer, IComparer + { + /// + /// Compares two es and determines which has greater size. + /// If they are equal, comparison will done on the display type and then on endianness + /// + /// First + /// Second + /// 0 for equality, 1 if x comes first; -1 if y comes first + public int Compare(Watch x, Watch y) + { + if (Equals(x, y)) + { + return 0; + } + + if (x.Size.Equals(y.Size)) + { + if (x.Type.Equals(y.Type)) + { + return x.BigEndian.CompareTo(y.BigEndian); + } + + return x.Type.CompareTo(y.Type); + } + + return x.Size.CompareTo(y.Size); + } + } + } +} diff --git a/BizHawk.Client.Common/tools/Watch/WatchList/WatchList.cs b/BizHawk.Client.Common/tools/Watch/WatchList/WatchList.cs index 37d4b0da37..833e3595e8 100644 --- a/BizHawk.Client.Common/tools/Watch/WatchList/WatchList.cs +++ b/BizHawk.Client.Common/tools/Watch/WatchList/WatchList.cs @@ -26,11 +26,13 @@ namespace BizHawk.Client.Common public const string PREV = "PrevColumn"; public const string CHANGES = "ChangesColumn"; public const string DIFF = "DiffColumn"; + public const string TYPE = "TypeColumn"; public const string DOMAIN = "DomainColumn"; public const string NOTES = "NotesColumn"; private static readonly WatchDomainComparer DomainComparer = new WatchDomainComparer(); private static readonly WatchAddressComparer AddressComparer = new WatchAddressComparer(); + private static readonly WatchFullDisplayTypeComparer DisplayTypeComparer = new WatchFullDisplayTypeComparer(); private static readonly WatchValueComparer ValueComparer = new WatchValueComparer(); private static readonly WatchPreviousValueComparer PreviousValueComparer = new WatchPreviousValueComparer(); private static readonly WatchValueDifferenceComparer ValueDifferenceComparer = new WatchValueDifferenceComparer(); @@ -297,6 +299,19 @@ namespace BizHawk.Client.Common break; + case TYPE: + if (reverse) + { + _watchList.Sort(DisplayTypeComparer); + _watchList.Reverse(); + } + else + { + _watchList.Sort(DisplayTypeComparer); + } + + break; + case NOTES: if (reverse) { diff --git a/BizHawk.Client.EmuHawk/Input/GamePad360.cs b/BizHawk.Client.EmuHawk/Input/GamePad360.cs index a93d1dd1b2..00078cdeac 100644 --- a/BizHawk.Client.EmuHawk/Input/GamePad360.cs +++ b/BizHawk.Client.EmuHawk/Input/GamePad360.cs @@ -165,11 +165,19 @@ namespace BizHawk.Client.EmuHawk public IEnumerable> GetFloats() { var g = state.Gamepad; - const float f = 3.2768f; + + //constant for adapting a +/- 32768 range to a +/-10000-based range + const float f = 32768 / 10000.0f; + + //constant for adapting a 0-255 range to a 0-10000-based range + const float f255 = 255 / 10000.0f; + yield return new Tuple("LeftThumbX", g.sThumbLX / f); yield return new Tuple("LeftThumbY", g.sThumbLY / f); yield return new Tuple("RightThumbX", g.sThumbRX / f); yield return new Tuple("RightThumbY", g.sThumbRY / f); + yield return new Tuple("LeftTrigger", g.bLeftTrigger / f255); + yield return new Tuple("RightTrigger", g.bRightTrigger / f255); yield break; } diff --git a/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.Designer.cs b/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.Designer.cs index 293d08a104..7daaf35e86 100644 --- a/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.Designer.cs +++ b/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.Designer.cs @@ -114,6 +114,7 @@ this.PrevColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.ChangesColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.DiffColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.TypeColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.DomainColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.NotesColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.ListViewContextMenu.SuspendLayout(); @@ -850,6 +851,7 @@ this.PrevColumn, this.ChangesColumn, this.DiffColumn, + this.TypeColumn, this.DomainColumn, this.NotesColumn}); this.WatchListView.ContextMenuStrip = this.ListViewContextMenu; @@ -907,6 +909,12 @@ this.DiffColumn.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.DiffColumn.Width = 59; // + // TypeColumn + // + this.TypeColumn.Name = "TypeColumn"; + this.TypeColumn.Text = "Type"; + this.TypeColumn.Width = 55; + // // DomainColumn // this.DomainColumn.Name = "DomainColumn"; @@ -959,6 +967,7 @@ private System.Windows.Forms.ColumnHeader PrevColumn; private System.Windows.Forms.ColumnHeader ChangesColumn; private System.Windows.Forms.ColumnHeader DiffColumn; + private System.Windows.Forms.ColumnHeader TypeColumn; private System.Windows.Forms.ColumnHeader DomainColumn; private System.Windows.Forms.ColumnHeader NotesColumn; private MenuStripEx RamWatchMenu; @@ -1040,4 +1049,4 @@ private System.Windows.Forms.ToolStripMenuItem WriteBreakpointContextMenuItem; private System.Windows.Forms.ToolStripMenuItem newToolStripMenuItem; } -} \ No newline at end of file +} diff --git a/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.cs b/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.cs index 3382d14e04..8d017a8d14 100644 --- a/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.cs +++ b/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.cs @@ -73,8 +73,9 @@ namespace BizHawk.Client.EmuHawk new Column { Name = WatchList.PREV, Visible = false, Index = 2, Width = 59 }, new Column { Name = WatchList.CHANGES, Visible = true, Index = 3, Width = 55 }, new Column { Name = WatchList.DIFF, Visible = false, Index = 4, Width = 59 }, - new Column { Name = WatchList.DOMAIN, Visible = true, Index = 5, Width = 55 }, - new Column { Name = WatchList.NOTES, Visible = true, Index = 6, Width = 128 }, + new Column { Name = WatchList.TYPE, Visible = false, Index = 5, Width = 55 }, + new Column { Name = WatchList.DOMAIN, Visible = true, Index = 6, Width = 55 }, + new Column { Name = WatchList.NOTES, Visible = true, Index = 7, Width = 128 }, }; } @@ -428,6 +429,39 @@ namespace BizHawk.Client.EmuHawk } } + private string ComputeDisplayType(Watch w) + { + String s = w.Size == WatchSize.Byte ? "1" : (w.Size == WatchSize.Word ? "2" : "4"); + switch (w.Type) + { + case Common.DisplayType.Binary: + s += "b"; + break; + case Common.DisplayType.FixedPoint_12_4: + s += "F"; + break; + case Common.DisplayType.FixedPoint_16_16: + s += "F6"; + break; + case Common.DisplayType.FixedPoint_20_12: + s += "F2"; + break; + case Common.DisplayType.Float: + s += "f"; + break; + case Common.DisplayType.Hex: + s += "h"; + break; + case Common.DisplayType.Signed: + s += "s"; + break; + case Common.DisplayType.Unsigned: + s += "u"; + break; + } + return s + (w.BigEndian ? "B" : "L"); + } + private string GetColumnValue(string name, int index) { switch (name) @@ -444,6 +478,8 @@ namespace BizHawk.Client.EmuHawk return _watches[index].ChangeCount.ToString(); case WatchList.DIFF: return _watches[index].Diff; + case WatchList.TYPE: + return ComputeDisplayType(_watches[index]); case WatchList.DOMAIN: return _watches[index].Domain.Name; case WatchList.NOTES: @@ -619,6 +655,9 @@ namespace BizHawk.Client.EmuHawk case WatchList.DIFF: text = _watches[index].Diff; break; + case WatchList.TYPE: + text = ComputeDisplayType(_watches[index]); + break; case WatchList.DOMAIN: text = _watches[index].Domain.Name; break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.cs index f503f1af1f..7720dc4595 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.cs @@ -3,7 +3,7 @@ using BizHawk.Emulation.Common; namespace BizHawk.Emulation.Cores.Nintendo.GBA { - [Core("mGBA", "endrift", true, true, "0.6.0 (24ab81f8db7745586cef246be8957ad272aded9b)", "https://mgba.io/", false)] + [Core("mGBA", "endrift", true, true, "0.6.1 (c3e9258bc3a1e8a0e68ff73d5ff9674b56257eb7)", "https://mgba.io/", false)] [ServiceNotApplicable(typeof(IDriveLight), typeof(IRegionable))] public partial class MGBAHawk : IEmulator, IVideoProvider, ISoundProvider, IGBAGPUViewable, ISaveRam, IStatable, IInputPollable, ISettable, diff --git a/libmupen64plus/GLideN64 b/libmupen64plus/GLideN64 index e944753875..7ea2de6dda 160000 --- a/libmupen64plus/GLideN64 +++ b/libmupen64plus/GLideN64 @@ -1 +1 @@ -Subproject commit e94475387505141fc8d4b4107f6db09dae9e106f +Subproject commit 7ea2de6ddac62351de472e69a84fd90b59ec95ad diff --git a/output/dll/mgba.dll b/output/dll/mgba.dll index df75e9790d..e902245ec3 100644 Binary files a/output/dll/mgba.dll and b/output/dll/mgba.dll differ diff --git a/output/dll/mupen64plus-video-GLideN64.dll b/output/dll/mupen64plus-video-GLideN64.dll index 79746df3bc..1b51968f13 100644 Binary files a/output/dll/mupen64plus-video-GLideN64.dll and b/output/dll/mupen64plus-video-GLideN64.dll differ diff --git a/output/dll/picodrive.wbx.gz b/output/dll/picodrive.wbx.gz index d1426e85ab..2eb86b2571 100644 Binary files a/output/dll/picodrive.wbx.gz and b/output/dll/picodrive.wbx.gz differ diff --git a/waterbox/picodrive/bizhawk.c b/waterbox/picodrive/bizhawk.c index 35e52d3059..801bbc55bf 100644 --- a/waterbox/picodrive/bizhawk.c +++ b/waterbox/picodrive/bizhawk.c @@ -253,7 +253,7 @@ ECL_EXPORT void GetMemoryAreas(MemoryArea *m) m[5].Data = Pico.rom; m[5].Name = "MD CART"; m[5].Size = Pico.romsize; - m[5].Flags = MEMORYAREA_FLAGS_WORDSIZE2 | MEMORYAREA_FLAGS_SWAPPED; + m[5].Flags = MEMORYAREA_FLAGS_WORDSIZE2 | MEMORYAREA_FLAGS_SWAPPED | MEMORYAREA_FLAGS_YUGEENDIAN; if (Pico32xMem) {