From 382ee2d1b9f722d618523afd05c0e9097805f6ae Mon Sep 17 00:00:00 2001 From: sin365 <353374337@qq.com> Date: Mon, 17 Nov 2025 13:34:06 +0800 Subject: [PATCH] =?UTF-8?q?MAME:NEOGEO/MC68000=E7=9A=84=E4=B8=80=E4=BA=9B?= =?UTF-8?q?=E5=87=8F=E5=B0=91=E4=B8=8B=E6=A0=87=E5=9C=B0=E5=9D=80=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=EF=BC=8C=E6=94=B9=E4=B8=BA=E6=8C=87=E9=92=88=E6=9C=AC?= =?UTF-8?q?=E8=BA=AB=E7=9B=B4=E6=8E=A5=E8=BF=90=E7=AE=97=E5=92=8C=E8=A7=A3?= =?UTF-8?q?=E5=BC=95=E7=94=A8=EF=BC=8C=E4=BB=A5=E5=8F=8A=E5=87=8F=E5=B0=91?= =?UTF-8?q?=E6=9F=90=E4=BA=9B=E9=87=8D=E5=A4=8D=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cpu/m68000/Instructions/BitArithemetic.cs | 40 +++++- .../Plugins/Mame.Core/cpu/m68000/MC68000.cs | 40 +++++- .../Assets/Plugins/Mame.Core/emu/Motion.cs | 50 ++++++-- .../Plugins/Mame.Core/mame/neogeo/Memory.cs | 119 ++++++++++++++---- .../Plugins/Mame.Core/mame/neogeo/Neogeo.cs | 51 +++++++- .../Plugins/Mame.Core/mame/neogeo/State.cs | 2 +- 6 files changed, 255 insertions(+), 47 deletions(-) diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Mame.Core/cpu/m68000/Instructions/BitArithemetic.cs b/AxibugEmuOnline.Client/Assets/Plugins/Mame.Core/cpu/m68000/Instructions/BitArithemetic.cs index bbbab669..125e457b 100644 --- a/AxibugEmuOnline.Client/Assets/Plugins/Mame.Core/cpu/m68000/Instructions/BitArithemetic.cs +++ b/AxibugEmuOnline.Client/Assets/Plugins/Mame.Core/cpu/m68000/Instructions/BitArithemetic.cs @@ -4,6 +4,44 @@ namespace cpu.m68000 { partial class MC68000 { + //void AND0() // AND , Dn + //{ + // int dstReg = (op >> 9) & 0x07; + // int size = (op >> 6) & 0x03; + // int srcMode = (op >> 3) & 0x07; + // int srcReg = op & 0x07; + + // V = false; + // C = false; + // switch (size) + // { + // case 0: // Byte + // D[dstReg].s8 &= ReadValueB(srcMode, srcReg); + // pendingCycles -= (srcMode == 0) ? 4 : 4 + EACyclesBW[srcMode, srcReg]; + // N = (D[dstReg].s8 & 0x80) != 0; + // Z = (D[dstReg].s8 == 0); + // return; + // case 1: // Word + // D[dstReg].s16 &= ReadValueW(srcMode, srcReg); + // pendingCycles -= (srcMode == 0) ? 4 : 4 + EACyclesBW[srcMode, srcReg]; + // N = (D[dstReg].s16 & 0x8000) != 0; + // Z = (D[dstReg].s16 == 0); + // return; + // case 2: // Long + // D[dstReg].s32 &= ReadValueL(srcMode, srcReg); + // if (srcMode == 0 || (srcMode == 7 && srcReg == 4)) + // { + // pendingCycles -= 8 + EACyclesL[srcMode, srcReg]; + // } + // else + // { + // pendingCycles -= 6 + EACyclesL[srcMode, srcReg]; + // } + // N = (D[dstReg].s32 & 0x80000000) != 0; + // Z = (D[dstReg].s32 == 0); + // return; + // } + //} void AND0() // AND , Dn { int dstReg = (op >> 9) & 0x07; @@ -13,7 +51,6 @@ namespace cpu.m68000 V = false; C = false; - switch (size) { case 0: // Byte @@ -44,7 +81,6 @@ namespace cpu.m68000 } } - void AND1() // AND Dn, { int srcReg = (op >> 9) & 0x07; diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Mame.Core/cpu/m68000/MC68000.cs b/AxibugEmuOnline.Client/Assets/Plugins/Mame.Core/cpu/m68000/MC68000.cs index 314bc5a0..05cce057 100644 --- a/AxibugEmuOnline.Client/Assets/Plugins/Mame.Core/cpu/m68000/MC68000.cs +++ b/AxibugEmuOnline.Client/Assets/Plugins/Mame.Core/cpu/m68000/MC68000.cs @@ -5,12 +5,50 @@ using System.Runtime.InteropServices; namespace cpu.m68000 { - public sealed partial class MC68000 : cpuexec_data + public unsafe sealed partial class MC68000 : cpuexec_data { public static MC68000 m1; // Machine State public Register[] D = new Register[8]; + + //#region //指针化 D + //static Register[] D_src; + //static GCHandle D_handle; + //public static Register* D; + //public static int DLength; + //public static bool D_IsNull => D == null; + //public static Register[] D_set + //{ + // set + // { + // D_handle.ReleaseGCHandle(); + // D_src = value; + // DLength = value.Length; + // D_src.GetObjectPtr(ref D_handle, ref D); + // } + //} + //#endregion + public Register[] A = new Register[8]; + + //#region //指针化 A + //static Register[] A_src; + //static GCHandle A_handle; + //public static Register* A; + //public static int ALength; + //public static bool A_IsNull => A == null; + //public static Register[] A_set + //{ + // set + // { + // A_handle.ReleaseGCHandle(); + // A_src = value; + // ALength = value.Length; + // A_src.GetObjectPtr(ref A_handle, ref A); + // } + //} + //#endregion + public int PC, PPC; private ulong totalExecutedCycles; private int pendingCycles; diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Mame.Core/emu/Motion.cs b/AxibugEmuOnline.Client/Assets/Plugins/Mame.Core/emu/Motion.cs index 2a8b153b..083a5b0d 100644 --- a/AxibugEmuOnline.Client/Assets/Plugins/Mame.Core/emu/Motion.cs +++ b/AxibugEmuOnline.Client/Assets/Plugins/Mame.Core/emu/Motion.cs @@ -133,19 +133,31 @@ int startY = Video.offsety; int endY = Video.offsety + Video.height; + int * bitmapcolorRect_target = &bitmapcolorRect[target_i]; if (single_step || Mame.paused) { byte bright = 0xa7; for (y = startY; y < endY; y++) { int stepIndex = y * Video.fullwidth; + + ushort* curbitmap_stepIndex = &curbitmap[stepIndex + startX]; for (x = startX; x < endX; x++, target_i++) { - i = stepIndex + x; - red = (int)(((entry_color[curbitmap[i]] & 0xff0000) >> 16) * bright / 0xff); - green = (int)(((entry_color[curbitmap[i]] & 0xff00) >> 8) * bright / 0xff); - blue = (int)((entry_color[curbitmap[i]] & 0xff) * bright / 0xff); - bitmapcolorRect[target_i] = (int)Palette.make_argb(0xff, red, green, blue); + //i = stepIndex + x; + + //red = (int)(((entry_color[curbitmap[i]] & 0xff0000) >> 16) * bright / 0xff); + //green = (int)(((entry_color[curbitmap[i]] & 0xff00) >> 8) * bright / 0xff); + //blue = (int)((entry_color[curbitmap[i]] & 0xff) * bright / 0xff); + red = (int)(((entry_color[*curbitmap_stepIndex] & 0xff0000) >> 16) * bright / 0xff); + green = (int)(((entry_color[*curbitmap_stepIndex] & 0xff00) >> 8) * bright / 0xff); + blue = (int)((entry_color[*curbitmap_stepIndex] & 0xff) * bright / 0xff); + + //bitmapcolorRect[target_i] = (int)Palette.make_argb(0xff, red, green, blue); + *bitmapcolorRect_target = (int)Palette.make_argb(0xff, red, green, blue); + bitmapcolorRect_target++; + + curbitmap_stepIndex++; } } } @@ -155,10 +167,15 @@ for (y = startY; y < endY; y++) { int stepIndex = y * Video.fullwidth; + ushort* curbitmap_stepIndex = &curbitmap[stepIndex + startX]; for (x = startX; x < endX; x++, target_i++) { - i = stepIndex + x; - bitmapcolorRect[target_i] = (int)entry_color[curbitmap[i]]; + //i = stepIndex + x; + //bitmapcolorRect[target_i] = (int)entry_color[curbitmap[i]]; + //*bitmapcolorRect_target = (int)entry_color[curbitmap[i]]; + *bitmapcolorRect_target = (int)entry_color[*curbitmap_stepIndex]; + bitmapcolorRect_target++; + curbitmap_stepIndex++; } } @@ -314,27 +331,32 @@ int endY = Video.offsety + Video.height; int* bitmapbaseN_curbitmap_0_Ptrs = &Video.bitmapbaseN_Ptrs[Video.curbitmap][0]; + int* bitmapcolorRect_Ptrunsafe_Ptr = &Video.bitmapcolorRect_Ptrunsafe[target_i]; if (single_step || Mame.paused) { byte bright = 0xa7; for (y = startY; y < endY; y++) { int stepIndex = y * Video.fullwidth; + int* stepIndex_Ptr = &bitmapbaseN_curbitmap_0_Ptrs[stepIndex + startX]; for (x = startX; x < endX; x++, target_i++) { //i = y * Video.fullwidth + x; - i = stepIndex + x; + //i = stepIndex + x; //red = ((Video.bitmapbaseN_Ptrs[Video.curbitmap][i] & 0xff0000) >> 16) * bright / 0xff; //green = ((Video.bitmapbaseN_Ptrs[Video.curbitmap][i] & 0xff00) >> 8) * bright / 0xff; //blue = (Video.bitmapbaseN_Ptrs[Video.curbitmap][i] & 0xff) * bright / 0xff; - int bitmapbaseN_curbitmap_i_value = bitmapbaseN_curbitmap_0_Ptrs[i]; + int bitmapbaseN_curbitmap_i_value = *stepIndex_Ptr; red = ((bitmapbaseN_curbitmap_i_value & 0xff0000) >> 16) * bright / 0xff; green = ((bitmapbaseN_curbitmap_i_value & 0xff00) >> 8) * bright / 0xff; blue = (bitmapbaseN_curbitmap_i_value & 0xff) * bright / 0xff; //Video.bitmapcolorRect_Ptrunsafe[target_i] = (int)Palette.make_argb(0xff, red, green, blue); - Video.bitmapcolorRect_Ptrunsafe[target_i] = (int)((((uint)(0xff) & 0xff) << 24) | (((uint)(blue) & 0xff) << 16) | (((uint)(green) & 0xff) << 8) | ((uint)(red) & 0xff)); + //Video.bitmapcolorRect_Ptrunsafe[target_i] = (int)((((uint)(0xff) & 0xff) << 24) | (((uint)(blue) & 0xff) << 16) | (((uint)(green) & 0xff) << 8) | ((uint)(red) & 0xff)); + *bitmapcolorRect_Ptrunsafe_Ptr = (int)((((uint)(0xff) & 0xff) << 24) | (((uint)(blue) & 0xff) << 16) | (((uint)(green) & 0xff) << 8) | ((uint)(red) & 0xff)); + bitmapcolorRect_Ptrunsafe_Ptr++; + stepIndex_Ptr++; } } } @@ -343,12 +365,16 @@ for (y = startY; y < endY; y++) { int stepIndex = y * Video.fullwidth; + int* stepIndex_Ptr = &bitmapbaseN_curbitmap_0_Ptrs[stepIndex + startX]; for (x = startX; x < endX; x++, target_i++) { //i = y * Video.fullwidth + x; - i = stepIndex + x; + //i = stepIndex + x; //Video.bitmapcolorRect_Ptrunsafe[target_i] = (int)(0xff000000 | (uint)Video.bitmapbaseN_Ptrs[Video.curbitmap][i]); - Video.bitmapcolorRect_Ptrunsafe[target_i] = (int)(0xff000000 | (uint)bitmapbaseN_curbitmap_0_Ptrs[i]); + //Video.bitmapcolorRect_Ptrunsafe[target_i] = (int)(0xff000000 | (uint)bitmapbaseN_curbitmap_0_Ptrs[i]); + *bitmapcolorRect_Ptrunsafe_Ptr = (int)(0xff000000 | (uint)*stepIndex_Ptr); + bitmapcolorRect_Ptrunsafe_Ptr++; + stepIndex_Ptr++; } } } diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Mame.Core/mame/neogeo/Memory.cs b/AxibugEmuOnline.Client/Assets/Plugins/Mame.Core/mame/neogeo/Memory.cs index bf4e30f9..427b8ba2 100644 --- a/AxibugEmuOnline.Client/Assets/Plugins/Mame.Core/mame/neogeo/Memory.cs +++ b/AxibugEmuOnline.Client/Assets/Plugins/Mame.Core/mame/neogeo/Memory.cs @@ -218,46 +218,52 @@ namespace MAME.Core //} //手动优化 - public static short MReadOpWord(int address) + public unsafe static short MReadOpWord(int address) { address &= 0xffffff; - short result = 0; if (address >= 0x000000 && address + 1 <= 0x00007f) { + byte* ptr = &Memory.mainrom[address]; if (main_cpu_vector_table_source == 0) { - result = (short)(mainbiosrom[address] * 0x100 + mainbiosrom[address + 1]); + return (short)(*ptr * 0x100 + *(ptr + 1)); } else if (main_cpu_vector_table_source == 1) { - result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]); + return (short)(*ptr * 0x100 + *(ptr + 1)); } + return 0; } else if (address >= 0x000080 && address + 1 <= 0x0fffff) { + byte* ptr = &Memory.mainrom[address]; //if (address >= 0x142B9 && address <= 0x142C9) //{ // //m68000Form.iStatus = 1; //} - result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]); + return (short)(*ptr * 0x100 + *(ptr + 1)); } else if (address >= 0x100000 && address + 1 <= 0x1fffff) { - result = (short)(Memory.mainram[address & 0xffff] * 0x100 + Memory.mainram[(address & 0xffff) + 1]); + byte* Memory_mainrom_address_and_0xffff = &Memory.mainrom[address & 0xffff]; + //result = (short)(Memory.mainram[address & 0xffff] * 0x100 + Memory.mainram[(address & 0xffff) + 1]); + return (short)(*Memory_mainrom_address_and_0xffff * 0x100 + *(Memory_mainrom_address_and_0xffff + 1)); } else if (address >= 0x200000 && address + 1 <= 0x2fffff) { - result = (short)(Memory.mainrom[main_cpu_bank_address + (address & 0xfffff)] * 0x100 + Memory.mainrom[main_cpu_bank_address + (address & 0xfffff) + 1]); + byte* ptr = &Memory.mainrom[main_cpu_bank_address + (address & 0xfffff)]; + //result = (short)(Memory.mainrom[main_cpu_bank_address + (address & 0xfffff)] * 0x100 + Memory.mainrom[main_cpu_bank_address + (address & 0xfffff) + 1]); + return (short)(*ptr * 0x100 + *(ptr + 1)); } else if (address >= 0xc00000 && address + 1 <= 0xcfffff) { - result = (short)(mainbiosrom[address & 0x1ffff] * 0x100 + mainbiosrom[(address & 0x1ffff) + 1]); + byte* ptr = &mainbiosrom[address & 0x1ffff]; + return (short)(*ptr * 0x100 + *(ptr + 1)); } else { - result = 0; + return 0; } - return result; } public static short MReadWord(int address) { @@ -534,7 +540,7 @@ namespace MAME.Core // int i1 = 1; // } //} - + //手动优化 public static void MWriteByte(int address, sbyte value) { @@ -559,7 +565,8 @@ namespace MAME.Core { int i1 = 1; } - else */if ((address & 0x01) == 1) + else */ + if ((address & 0x01) == 1) { //watchdog_w(); //减少一次堆栈 无意义套娃 @@ -2098,61 +2105,121 @@ namespace MAME.Core MWriteLong(address, value); } } + //public static byte ZReadOp(ushort address) + //{ + // byte result = 0; + // if (address >= 0x0000 && address <= 0x7fff) + // { + // result = Memory.audiorom[address]; + // } + // else if (address >= 0x8000 && address <= 0xbfff) + // { + // result = Memory.audiorom[audio_cpu_banks[3] * 0x4000 + address - 0x8000]; + // } + // else if (address >= 0xc000 && address <= 0xdfff) + // { + // result = Memory.audiorom[audio_cpu_banks[2] * 0x2000 + address - 0xc000]; + // } + // else if (address >= 0xe000 && address <= 0xefff) + // { + // result = Memory.audiorom[audio_cpu_banks[1] * 0x1000 + address - 0xe000]; + // } + // else if (address >= 0xf000 && address <= 0xf7ff) + // { + // result = Memory.audiorom[audio_cpu_banks[0] * 0x800 + address - 0xf000]; + // } + // else if (address >= 0xf800 && address <= 0xffff) + // { + // result = Memory.audioram[address - 0xf800]; + // } + // return result; + //} + + //手动优化 public static byte ZReadOp(ushort address) { - byte result = 0; if (address >= 0x0000 && address <= 0x7fff) { - result = Memory.audiorom[address]; + return *(Memory.audiorom + address); } else if (address >= 0x8000 && address <= 0xbfff) { - result = Memory.audiorom[audio_cpu_banks[3] * 0x4000 + address - 0x8000]; + return *(Memory.audiorom + (*(audio_cpu_banks + 3) * 0x4000 + address - 0x8000)); } else if (address >= 0xc000 && address <= 0xdfff) { - result = Memory.audiorom[audio_cpu_banks[2] * 0x2000 + address - 0xc000]; + return *(Memory.audiorom + (*(audio_cpu_banks + 2) * 0x2000 + address - 0xc000)); } else if (address >= 0xe000 && address <= 0xefff) { - result = Memory.audiorom[audio_cpu_banks[1] * 0x1000 + address - 0xe000]; + return *(Memory.audiorom + *(audio_cpu_banks + 1) * 0x1000 + address - 0xe000); } else if (address >= 0xf000 && address <= 0xf7ff) { - result = Memory.audiorom[audio_cpu_banks[0] * 0x800 + address - 0xf000]; + return *(Memory.audiorom + (*audio_cpu_banks * 0x800 + address - 0xf000)); } else if (address >= 0xf800 && address <= 0xffff) { - result = Memory.audioram[address - 0xf800]; + return *(Memory.audioram + (address - 0xf800)); } - return result; + return 0; } + //public static byte ZReadMemory(ushort address) + //{ + // byte result = 0; + // if (address >= 0x0000 && address <= 0x7fff) + // { + // result = Memory.audiorom[address]; + // } + // else if (address >= 0x8000 && address <= 0xbfff) + // { + // result = Memory.audiorom[audio_cpu_banks[3] * 0x4000 + address - 0x8000]; + // } + // else if (address >= 0xc000 && address <= 0xdfff) + // { + // result = Memory.audiorom[audio_cpu_banks[2] * 0x2000 + address - 0xc000]; + // } + // else if (address >= 0xe000 && address <= 0xefff) + // { + // result = Memory.audiorom[audio_cpu_banks[1] * 0x1000 + address - 0xe000]; + // } + // else if (address >= 0xf000 && address <= 0xf7ff) + // { + // result = Memory.audiorom[audio_cpu_banks[0] * 0x800 + address - 0xf000]; + // } + // else if (address >= 0xf800 && address <= 0xffff) + // { + // result = Memory.audioram[address - 0xf800]; + // } + // return result; + //} + public static byte ZReadMemory(ushort address) { byte result = 0; if (address >= 0x0000 && address <= 0x7fff) { - result = Memory.audiorom[address]; + result = *(Memory.audiorom + address); } else if (address >= 0x8000 && address <= 0xbfff) { - result = Memory.audiorom[audio_cpu_banks[3] * 0x4000 + address - 0x8000]; + result = *(Memory.audiorom + (*(audio_cpu_banks + 3) * 0x4000 + address - 0x8000)); } else if (address >= 0xc000 && address <= 0xdfff) { - result = Memory.audiorom[audio_cpu_banks[2] * 0x2000 + address - 0xc000]; + result = *(Memory.audiorom + (*(audio_cpu_banks + 2) * 0x2000 + address - 0xc000)); } else if (address >= 0xe000 && address <= 0xefff) { - result = Memory.audiorom[audio_cpu_banks[1] * 0x1000 + address - 0xe000]; + result = *(Memory.audiorom + (*(audio_cpu_banks + 1) * 0x1000 + address - 0xe000)); } else if (address >= 0xf000 && address <= 0xf7ff) { - result = Memory.audiorom[audio_cpu_banks[0] * 0x800 + address - 0xf000]; + result = *(Memory.audiorom + (*audio_cpu_banks * 0x800 + address - 0xf000)); } else if (address >= 0xf800 && address <= 0xffff) { - result = Memory.audioram[address - 0xf800]; + result = *(Memory.audioram + (address - 0xf800)); } return result; } diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Mame.Core/mame/neogeo/Neogeo.cs b/AxibugEmuOnline.Client/Assets/Plugins/Mame.Core/mame/neogeo/Neogeo.cs index 372125ed..82a9605b 100644 --- a/AxibugEmuOnline.Client/Assets/Plugins/Mame.Core/mame/neogeo/Neogeo.cs +++ b/AxibugEmuOnline.Client/Assets/Plugins/Mame.Core/mame/neogeo/Neogeo.cs @@ -24,8 +24,49 @@ namespace MAME.Core public static int main_cpu_bank_address; public static byte main_cpu_vector_table_source; //public static byte audio_result; - public static byte[] audio_cpu_banks; - public static byte[] mainbiosrom, /*mainram2,*/ audiobiosrom, fixedrom, fixedbiosrom, zoomyrom, /*spritesrom,*/ pvc_cartridge_ram; + //public static byte[] audio_cpu_banks; + + + #region //指针化 audio_cpu_banks + static byte[] audio_cpu_banks_src; + static GCHandle audio_cpu_banks_handle; + public static byte* audio_cpu_banks; + public static int audio_cpu_banksLength; + public static bool audio_cpu_banks_IsNull => audio_cpu_banks == null; + public static byte[] audio_cpu_banks_set + { + set + { + audio_cpu_banks_handle.ReleaseGCHandle(); + audio_cpu_banks_src = value; + audio_cpu_banksLength = value.Length; + audio_cpu_banks_src.GetObjectPtr(ref audio_cpu_banks_handle, ref audio_cpu_banks); + } + } + #endregion + + public static byte[]/* mainbiosrom, *//*mainram2,*/ audiobiosrom, fixedrom, fixedbiosrom, zoomyrom, /*spritesrom,*/ pvc_cartridge_ram; + + + #region //指针化 mainbiosrom + static byte[] mainbiosrom_src; + static GCHandle mainbiosrom_handle; + public static byte* mainbiosrom; + public static int mainbiosromLength; + public static bool mainbiosrom_IsNull => mainbiosrom == null; + public static byte[] mainbiosrom_set + { + set + { + mainbiosrom_handle.ReleaseGCHandle(); + mainbiosrom_src = value; + mainbiosromLength = value.Length; + mainbiosrom_src.GetObjectPtr(ref mainbiosrom_handle, ref mainbiosrom); + } + } + #endregion + + public static byte[] extra_ram = new byte[0x2000]; public static uint fatfury2_prot_data; public static ushort neogeo_rng; @@ -73,7 +114,7 @@ namespace MAME.Core public static void NeogeoInit() { - audio_cpu_banks = new byte[4]; + audio_cpu_banks_set = new byte[4]; pvc_cartridge_ram = new byte[0x2000]; Memory.Set_mainram(new byte[0x10000]); mainram2_set = new byte[0x10000]; @@ -83,7 +124,7 @@ namespace MAME.Core fixedbiosrom = MameMainMotion.resource.sfix; zoomyrom = MameMainMotion.resource._000_lo; audiobiosrom = MameMainMotion.resource.sm1; - mainbiosrom = MameMainMotion.resource.mainbios; + mainbiosrom_set = MameMainMotion.resource.mainbios; Memory.Set_mainrom(Machine.GetRom("maincpu.rom")); Memory.Set_audiorom(Machine.GetRom("audiocpu.rom")); fixedrom = Machine.GetRom("fixed.rom"); @@ -100,7 +141,7 @@ namespace MAME.Core { case "irrmaze": case "kizuna4p": - mainbiosrom = Machine.GetRom("mainbios.rom"); + mainbiosrom_set = Machine.GetRom("mainbios.rom"); break; case "kof99": case "kof99h": diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Mame.Core/mame/neogeo/State.cs b/AxibugEmuOnline.Client/Assets/Plugins/Mame.Core/mame/neogeo/State.cs index a7b777b1..183289ee 100644 --- a/AxibugEmuOnline.Client/Assets/Plugins/Mame.Core/mame/neogeo/State.cs +++ b/AxibugEmuOnline.Client/Assets/Plugins/Mame.Core/mame/neogeo/State.cs @@ -88,7 +88,7 @@ namespace MAME.Core controller_select = reader.ReadByte(); main_cpu_bank_address = reader.ReadInt32(); main_cpu_vector_table_source = reader.ReadByte(); - audio_cpu_banks = reader.ReadBytes(4); + audio_cpu_banks_set = reader.ReadBytes(4); save_ram_unlocked = reader.ReadByte(); audio_cpu_nmi_enabled = reader.ReadBoolean(); audio_cpu_nmi_pending = reader.ReadBoolean();