diff --git a/Common.ruleset b/Common.ruleset index b8390a8fa7..67ebfd691b 100644 --- a/Common.ruleset +++ b/Common.ruleset @@ -2,7 +2,7 @@ - + diff --git a/src/BizHawk.Client.Common/movie/bk2/Bk2Movie.IO.cs b/src/BizHawk.Client.Common/movie/bk2/Bk2Movie.IO.cs index a5d5482d44..18dd79c5a6 100644 --- a/src/BizHawk.Client.Common/movie/bk2/Bk2Movie.IO.cs +++ b/src/BizHawk.Client.Common/movie/bk2/Bk2Movie.IO.cs @@ -156,7 +156,7 @@ namespace BizHawk.Client.Common protected void LoadBk2Fields(ZipStateLoader bl, bool preload) { - bl.GetLump(BinaryStateLump.Movieheader, true, delegate(TextReader tr) + bl.GetLump(BinaryStateLump.Movieheader, abort: true, tr => { string line; while ((line = tr.ReadLine()) != null) @@ -176,7 +176,7 @@ namespace BizHawk.Client.Common } }); - bl.GetLump(BinaryStateLump.Input, true, delegate(TextReader tr) + bl.GetLump(BinaryStateLump.Input, abort: true, tr => { IsCountingRerecords = false; ExtractInputLog(tr, out _); @@ -188,7 +188,7 @@ namespace BizHawk.Client.Common return; } - bl.GetLump(BinaryStateLump.Comments, false, delegate(TextReader tr) + bl.GetLump(BinaryStateLump.Comments, abort: false, tr => { string line; while ((line = tr.ReadLine()) != null) @@ -200,7 +200,7 @@ namespace BizHawk.Client.Common } }); - bl.GetLump(BinaryStateLump.Subtitles, false, delegate(TextReader tr) + bl.GetLump(BinaryStateLump.Subtitles, abort: false, tr => { string line; while ((line = tr.ReadLine()) != null) @@ -214,7 +214,7 @@ namespace BizHawk.Client.Common Subtitles.Sort(); }); - bl.GetLump(BinaryStateLump.SyncSettings, false, delegate(TextReader tr) + bl.GetLump(BinaryStateLump.SyncSettings, abort: false, tr => { string line; while ((line = tr.ReadLine()) != null) @@ -229,16 +229,10 @@ namespace BizHawk.Client.Common if (StartsFromSavestate) { bl.GetCoreState( - delegate(BinaryReader br, long length) - { - BinarySavestate = br.ReadBytes((int)length); - }, - delegate(TextReader tr) - { - TextSavestate = tr.ReadToEnd(); - }); + (br, length) => BinarySavestate = br.ReadBytes((int) length), + tr => TextSavestate = tr.ReadToEnd()); bl.GetLump(BinaryStateLump.Framebuffer, false, - delegate(BinaryReader br, long length) + (br, length) => { SavestateFramebuffer = new int[length / sizeof(int)]; for (int i = 0; i < SavestateFramebuffer.Length; i++) @@ -250,10 +244,7 @@ namespace BizHawk.Client.Common else if (StartsFromSaveRam) { bl.GetLump(BinaryStateLump.MovieSaveRam, false, - delegate(BinaryReader br, long length) - { - SaveRam = br.ReadBytes((int)length); - }); + (br, length) => SaveRam = br.ReadBytes((int) length)); } } } diff --git a/src/BizHawk.Client.Common/movie/tasproj/TasBranch.cs b/src/BizHawk.Client.Common/movie/tasproj/TasBranch.cs index 22984e6d68..d12bde45af 100644 --- a/src/BizHawk.Client.Common/movie/tasproj/TasBranch.cs +++ b/src/BizHawk.Client.Common/movie/tasproj/TasBranch.cs @@ -123,7 +123,7 @@ namespace BizHawk.Client.Common var nusertext = new IndexedStateLump(BinaryStateLump.BranchUserText); foreach (var b in this) { - bs.PutLump(nheader, delegate(TextWriter tw) + bs.PutLump(nheader, tw => { // if this header needs more stuff in it, handle it sensibly tw.WriteLine(JsonConvert.SerializeObject(new @@ -134,12 +134,9 @@ namespace BizHawk.Client.Common })); }); - bs.PutLump(ncore, delegate(Stream s) - { - s.Write(b.CoreData, 0, b.CoreData.Length); - }); + bs.PutLump(ncore, (Stream s) => s.Write(b.CoreData, 0, b.CoreData.Length)); - bs.PutLump(ninput, delegate(TextWriter tw) + bs.PutLump(ninput, tw => { int todo = b.InputLog.Count; for (int i = 0; i < todo; i++) @@ -148,27 +145,21 @@ namespace BizHawk.Client.Common } }); - bs.PutLump(nframebuffer, delegate(Stream s) + bs.PutLump(nframebuffer, s => { var vp = new BitmapBufferVideoProvider(b.OSDFrameBuffer); _quickBmpFile.Save(vp, s, b.OSDFrameBuffer.Width, b.OSDFrameBuffer.Height); }); - bs.PutLump(ncoreframebuffer, delegate(Stream s) + bs.PutLump(ncoreframebuffer, s => { var vp = new BitmapBufferVideoProvider(b.CoreFrameBuffer); _quickBmpFile.Save(vp, s, b.CoreFrameBuffer.Width, b.CoreFrameBuffer.Height); }); - bs.PutLump(nmarkers, delegate(TextWriter tw) - { - tw.WriteLine(b.Markers.ToString()); - }); + bs.PutLump(nmarkers, tw => tw.WriteLine(b.Markers.ToString())); - bs.PutLump(nusertext, delegate(TextWriter tw) - { - tw.WriteLine(b.UserText); - }); + bs.PutLump(nusertext, tw => tw.WriteLine(b.UserText)); nheader.Increment(); ncore.Increment(); @@ -196,7 +187,7 @@ namespace BizHawk.Client.Common { var b = new TasBranch(); - if (!bl.GetLump(nheader, false, delegate(TextReader tr) + if (!bl.GetLump(nheader, abort: false, tr => { var header = (dynamic)JsonConvert.DeserializeObject(tr.ReadLine()); b.Frame = (int)header.Frame; @@ -226,13 +217,13 @@ namespace BizHawk.Client.Common return; } - bl.GetLump(ncore, true, delegate(Stream s, long length) + bl.GetLump(ncore, abort: true, (Stream s, long length) => { b.CoreData = new byte[length]; s.Read(b.CoreData, 0, b.CoreData.Length); }); - bl.GetLump(ninput, true, delegate(TextReader tr) + bl.GetLump(ninput, abort: true, tr => { b.InputLog = StringLogUtil.MakeStringLog(); string line; @@ -242,20 +233,20 @@ namespace BizHawk.Client.Common } }); - bl.GetLump(nframebuffer, true, delegate(Stream s, long length) + bl.GetLump(nframebuffer, abort: true, (s, _) => { _quickBmpFile.LoadAuto(s, out var vp); b.OSDFrameBuffer = new BitmapBuffer(vp.BufferWidth, vp.BufferHeight, vp.GetVideoBuffer()); }); - bl.GetLump(ncoreframebuffer, false, delegate(Stream s, long length) + bl.GetLump(ncoreframebuffer, abort: false, (s, _) => { _quickBmpFile.LoadAuto(s, out var vp); b.CoreFrameBuffer = new BitmapBuffer(vp.BufferWidth, vp.BufferHeight, vp.GetVideoBuffer()); }); b.Markers = new TasMovieMarkerList(movie); - bl.GetLump(nmarkers, false, delegate(TextReader tr) + bl.GetLump(nmarkers, abort: false, tr => { string line; while ((line = tr.ReadLine()) != null) @@ -267,7 +258,7 @@ namespace BizHawk.Client.Common } }); - bl.GetLump(nusertext, false, delegate(TextReader tr) + bl.GetLump(nusertext, abort: false, tr => { string line; if ((line = tr.ReadLine()) != null) diff --git a/src/BizHawk.Client.Common/movie/tasproj/TasMovie.IO.cs b/src/BizHawk.Client.Common/movie/tasproj/TasMovie.IO.cs index 5bfafb8c9d..744d4d1fbe 100644 --- a/src/BizHawk.Client.Common/movie/tasproj/TasMovie.IO.cs +++ b/src/BizHawk.Client.Common/movie/tasproj/TasMovie.IO.cs @@ -81,12 +81,9 @@ namespace BizHawk.Client.Common private void LoadTasprojExtras(ZipStateLoader bl) { - bl.GetLump(BinaryStateLump.LagLog, false, delegate(TextReader tr) - { - LagLog.Load(tr); - }); + bl.GetLump(BinaryStateLump.LagLog, abort: false, tr => LagLog.Load(tr)); - bl.GetLump(BinaryStateLump.Markers, false, delegate(TextReader tr) + bl.GetLump(BinaryStateLump.Markers, abort: false, tr => { string line; while ((line = tr.ReadLine()) != null) @@ -101,7 +98,7 @@ namespace BizHawk.Client.Common if (GetClientSettingsOnLoad != null) { string clientSettings = ""; - bl.GetLump(BinaryStateLump.ClientSettings, false, delegate(TextReader tr) + bl.GetLump(BinaryStateLump.ClientSettings, abort: false, tr => { string line; while ((line = tr.ReadLine()) != null) @@ -119,7 +116,7 @@ namespace BizHawk.Client.Common } } - bl.GetLump(BinaryStateLump.VerificationLog, false, delegate(TextReader tr) + bl.GetLump(BinaryStateLump.VerificationLog, abort: false, tr => { VerificationLog.Clear(); while (true) @@ -139,7 +136,7 @@ namespace BizHawk.Client.Common Branches.Load(bl, this); - bl.GetLump(BinaryStateLump.Session, false, delegate(TextReader tr) + bl.GetLump(BinaryStateLump.Session, abort: false, tr => { var json = tr.ReadToEnd(); try @@ -153,7 +150,7 @@ namespace BizHawk.Client.Common }); ZwinderStateManagerSettings settings = new ZwinderStateManagerSettings(); - bl.GetLump(BinaryStateLump.StateHistorySettings, false, delegate(TextReader tr) + bl.GetLump(BinaryStateLump.StateHistorySettings, abort: false, tr => { var json = tr.ReadToEnd(); try @@ -166,7 +163,7 @@ namespace BizHawk.Client.Common } }); - bl.GetLump(BinaryStateLump.StateHistory, false, delegate(BinaryReader br, long length) + bl.GetLump(BinaryStateLump.StateHistory, abort: false, (br, _) => { try { diff --git a/src/BizHawk.Client.Common/savestates/SavestateFile.cs b/src/BizHawk.Client.Common/savestates/SavestateFile.cs index 763f438c3d..820a32226d 100644 --- a/src/BizHawk.Client.Common/savestates/SavestateFile.cs +++ b/src/BizHawk.Client.Common/savestates/SavestateFile.cs @@ -97,7 +97,7 @@ namespace BizHawk.Client.Common if (_movieSession.Movie.IsActive()) { bs.PutLump(BinaryStateLump.Input, - delegate(TextWriter tw) + tw => { // this never should have been a core's responsibility tw.WriteLine("Frame {0}", _emulator.Frame); @@ -108,7 +108,7 @@ namespace BizHawk.Client.Common if (_userBag.Any()) { bs.PutLump(BinaryStateLump.UserData, - delegate(TextWriter tw) + tw => { var data = ConfigService.SaveWithType(_userBag); tw.WriteLine(data); @@ -117,11 +117,7 @@ namespace BizHawk.Client.Common if (_movieSession.Movie.IsActive() && _movieSession.Movie is ITasMovie) { - bs.PutLump(BinaryStateLump.LagLog, - delegate(TextWriter tw) - { - ((ITasMovie)_movieSession.Movie).LagLog.Save(tw); - }); + bs.PutLump(BinaryStateLump.LagLog, tw => ((ITasMovie) _movieSession.Movie).LagLog.Save(tw)); } } @@ -177,7 +173,7 @@ namespace BizHawk.Client.Common } string userData = ""; - bl.GetLump(BinaryStateLump.UserData, false, delegate(TextReader tr) + bl.GetLump(BinaryStateLump.UserData, abort: false, tr => { string line; while ((line = tr.ReadLine()) != null) @@ -198,10 +194,7 @@ namespace BizHawk.Client.Common if (_movieSession.Movie.IsActive() && _movieSession.Movie is ITasMovie) { - bl.GetLump(BinaryStateLump.LagLog, false, delegate(TextReader tr) - { - ((ITasMovie)_movieSession.Movie).LagLog.Load(tr); - }); + bl.GetLump(BinaryStateLump.LagLog, abort: false, tr => ((ITasMovie) _movieSession.Movie).LagLog.Load(tr)); } return true; diff --git a/src/BizHawk.Client.Common/savestates/ZipStateLoader.cs b/src/BizHawk.Client.Common/savestates/ZipStateLoader.cs index fba6e6e80f..c6fe35647d 100644 --- a/src/BizHawk.Client.Common/savestates/ZipStateLoader.cs +++ b/src/BizHawk.Client.Common/savestates/ZipStateLoader.cs @@ -123,31 +123,13 @@ namespace BizHawk.Client.Common } public bool GetLump(BinaryStateLump lump, bool abort, Action callback) - { - return GetLump(lump, abort, delegate(Stream s, long unused) - { - var br = new BinaryReader(s); - callback(br); - }); - } + => GetLump(lump, abort, (s, _) => callback(new(s))); public bool GetLump(BinaryStateLump lump, bool abort, Action callback) - { - return GetLump(lump, abort, delegate(Stream s, long length) - { - var br = new BinaryReader(s); - callback(br, length); - }); - } + => GetLump(lump, abort, (s, length) => callback(new(s), length)); public bool GetLump(BinaryStateLump lump, bool abort, Action callback) - { - return GetLump(lump, abort, delegate(Stream s, long unused) - { - var tr = new StreamReader(s); - callback(tr); - }); - } + => GetLump(lump, abort, (s, _) => callback(new StreamReader(s))); /// couldn't find Binary or Text savestate public void GetCoreState(Action callbackBinary, Action callbackText) diff --git a/src/BizHawk.Client.Common/savestates/ZipStateSaver.cs b/src/BizHawk.Client.Common/savestates/ZipStateSaver.cs index 491fc157e7..f304b51657 100644 --- a/src/BizHawk.Client.Common/savestates/ZipStateSaver.cs +++ b/src/BizHawk.Client.Common/savestates/ZipStateSaver.cs @@ -42,7 +42,7 @@ namespace BizHawk.Client.Common public void PutLump(BinaryStateLump lump, Action callback) { - PutLump(lump, delegate(Stream s) + PutLump(lump, s => { var bw = new BinaryWriter(s); callback(bw); @@ -52,7 +52,7 @@ namespace BizHawk.Client.Common public void PutLump(BinaryStateLump lump, Action callback) { - PutLump(lump, delegate(Stream s) + PutLump(lump, s => { TextWriter tw = new StreamWriter(s); callback(tw); diff --git a/src/BizHawk.Emulation.Cores/Arcades/MAME/MAME.MemoryDomains.cs b/src/BizHawk.Emulation.Cores/Arcades/MAME/MAME.MemoryDomains.cs index d363396d4a..515b3c9854 100644 --- a/src/BizHawk.Emulation.Cores/Arcades/MAME/MAME.MemoryDomains.cs +++ b/src/BizHawk.Emulation.Cores/Arcades/MAME/MAME.MemoryDomains.cs @@ -87,10 +87,7 @@ namespace BizHawk.Emulation.Cores.Arcades.MAME var name = $"{ deviceName } : { read } : 0x{ firstOffset:X}-0x{ lastOffset:X}"; domains.Add(new MemoryDomainDelegate(name, lastOffset - firstOffset + 1, endian, - delegate (long addr) - { - return _peek(addr, firstOffset, size); - }, + addr => _peek(addr, firstOffset, size), read == "rom" ? null : (long addr, byte val) => _poke(addr, val, firstOffset, size), @@ -99,10 +96,7 @@ namespace BizHawk.Emulation.Cores.Arcades.MAME } domains.Add(new MemoryDomainDelegate(deviceName + " : System Bus", size, endian, - delegate (long addr) - { - return _peek(addr, 0, size); - }, + addr => _peek(addr, 0, size), null, dataWidth)); _memoryDomains = new MemoryDomainList(domains); diff --git a/src/BizHawk.Emulation.Cores/CPUs/HuC6280/HuC6280_CDL.cs b/src/BizHawk.Emulation.Cores/CPUs/HuC6280/HuC6280_CDL.cs index 52cf918872..73dd223f77 100644 --- a/src/BizHawk.Emulation.Cores/CPUs/HuC6280/HuC6280_CDL.cs +++ b/src/BizHawk.Emulation.Cores/CPUs/HuC6280/HuC6280_CDL.cs @@ -26,15 +26,8 @@ namespace BizHawk.Emulation.Cores.Components.H6280 string dis = DisassembleExt( 0, out unused, - delegate(ushort addr) - { - return md.PeekByte(addr + i); - }, - delegate(ushort addr) - { - return md.PeekUshort(addr + i, false); - } - ); + addr => md.PeekByte(addr + i), + addr => md.PeekUshort(addr + i, bigEndian: false)); w.WriteLine("0x{0:x8}: {1}", i, dis); } } diff --git a/src/BizHawk.Emulation.Cores/Calculators/Emu83/Emu83.IMemoryDomains.cs b/src/BizHawk.Emulation.Cores/Calculators/Emu83/Emu83.IMemoryDomains.cs index c4b4aeb217..83909a5e9f 100644 --- a/src/BizHawk.Emulation.Cores/Calculators/Emu83/Emu83.IMemoryDomains.cs +++ b/src/BizHawk.Emulation.Cores/Calculators/Emu83/Emu83.IMemoryDomains.cs @@ -31,7 +31,7 @@ namespace BizHawk.Emulation.Cores.Calculators.Emu83 CreateMemoryDomain(LibEmu83.MemoryArea_t.MEM_VRAM, "VRAM"); _memoryDomains.Add(new MemoryDomainDelegate("System Bus", 0x10000, MemoryDomain.Endian.Little, - delegate(long addr) + addr => { if (addr < 0 || addr >= 0x10000) { @@ -40,7 +40,7 @@ namespace BizHawk.Emulation.Cores.Calculators.Emu83 return LibEmu83.TI83_ReadMemory(Context, (ushort)addr); }, - delegate(long addr, byte val) + (addr, val) => { if (addr < 0 || addr >= 0x10000) { diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.IMemoryDomains.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.IMemoryDomains.cs index 2d646a45f9..b13b40298f 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.IMemoryDomains.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.IMemoryDomains.cs @@ -38,7 +38,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA mm.Add(_cwram = new MemoryDomainDelegate("Combined WRAM", (256 + 32) * 1024, le, null, null, 4)); mm.Add(new MemoryDomainDelegate("System Bus", 0x10000000, le, - delegate (long addr) + addr => { var a = (uint)addr; if (a >= 0x10000000) @@ -48,7 +48,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA return LibmGBA.BizReadBus(Core, a); }, - delegate (long addr, byte val) + (addr, val) => { var a = (uint)addr; if (a >= 0x10000000) diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.IMemoryDomains.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.IMemoryDomains.cs index 5d0e1fcbb3..379d44f913 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.IMemoryDomains.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.IMemoryDomains.cs @@ -37,7 +37,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy // also add a special memory domain for the system bus, where calls get sent directly to the core each time _memoryDomains.Add(new MemoryDomainDelegate("System Bus", 65536, MemoryDomain.Endian.Little, - delegate(long addr) + addr => { if (addr < 0 || addr >= 65536) { @@ -46,7 +46,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy return LibGambatte.gambatte_cpuread(GambatteState, (ushort)addr); }, - delegate(long addr, byte val) + (addr, val) => { if (addr < 0 || addr >= 65536) { diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.IMemoryDomains.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.IMemoryDomains.cs index 16a3d4d57f..c6b055f5d5 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.IMemoryDomains.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.IMemoryDomains.cs @@ -32,7 +32,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES "System Bus", 0x10000, MemoryDomain.Endian.Unknown, - delegate(long addr) + addr => { if (addr < 0 || addr >= 0x10000) { @@ -41,7 +41,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES return QN.qn_peek_prgbus(Context, (int)addr); }, - delegate(long addr, byte val) + (addr, val) => { if (addr < 0 || addr >= 0x10000) { diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SameBoy/SameBoy.IMemoryDomains.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SameBoy/SameBoy.IMemoryDomains.cs index 1b6139b5f6..48026c2659 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SameBoy/SameBoy.IMemoryDomains.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SameBoy/SameBoy.IMemoryDomains.cs @@ -44,7 +44,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Sameboy // also add a special memory domain for the system bus, where calls get sent directly to the core each time _memoryDomains.Add(new MemoryDomainDelegate("System Bus", 65536, MemoryDomain.Endian.Little, - delegate(long addr) + addr => { if (addr < 0 || addr >= 65536) { @@ -53,7 +53,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Sameboy return LibSameboy.sameboy_cpuread(SameboyState, (ushort)addr); }, - delegate(long addr, byte val) + (addr, val) => { if (addr < 0 || addr >= 65536) { diff --git a/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.IMemoryDomains.cs b/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.IMemoryDomains.cs index 7ccf7c48b2..4d9afe7859 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.IMemoryDomains.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.IMemoryDomains.cs @@ -34,14 +34,14 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx // vram pokes need to go through hook which invalidates cached tiles byte* p = (byte*)area; mm.Add(new MemoryDomainDelegate(name, size, MemoryDomain.Endian.Unknown, - delegate (long addr) + addr => { if (addr < 0 || addr >= 65536) throw new ArgumentOutOfRangeException(); using (_elf.EnterExit()) return p[addr ^ 1]; }, - delegate (long addr, byte val) + (addr, val) => { if (addr < 0 || addr >= 65536) throw new ArgumentOutOfRangeException(); @@ -59,14 +59,14 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx } } var m68Bus = new MemoryDomainDelegate("M68K BUS", 0x1000000, MemoryDomain.Endian.Big, - delegate (long addr) + addr => { var a = (uint)addr; if (a >= 0x1000000) throw new ArgumentOutOfRangeException(); return Core.gpgx_peek_m68k_bus(a); }, - delegate (long addr, byte val) + (addr, val) => { var a = (uint)addr; if (a >= 0x1000000) @@ -79,14 +79,14 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx if (IsMegaCD) { var s68Bus = new MemoryDomainDelegate("S68K BUS", 0x1000000, MemoryDomain.Endian.Big, - delegate (long addr) + addr => { var a = (uint)addr; if (a >= 0x1000000) throw new ArgumentOutOfRangeException(); return Core.gpgx_peek_s68k_bus(a); }, - delegate (long addr, byte val) + (addr, val) => { var a = (uint)addr; if (a >= 0x1000000)