“规范指针”
This commit is contained in:
parent
69a6a816bc
commit
82fefaa86b
@ -8,9 +8,85 @@ namespace MAME.Core
|
|||||||
public unsafe class Memory
|
public unsafe class Memory
|
||||||
{
|
{
|
||||||
//public static byte[] mainrom, audiorom, mainram, audioram;
|
//public static byte[] mainrom, audiorom, mainram, audioram;
|
||||||
//public static byte[] ;
|
|
||||||
|
|
||||||
static byte[] mainrom, audiorom, mainram, audioram;
|
|
||||||
|
#region //指针化mainrom
|
||||||
|
static byte[] mainrom_src;
|
||||||
|
static GCHandle mainrom_handle;
|
||||||
|
public static byte* mainrom;
|
||||||
|
public static int mainromLength;
|
||||||
|
public static bool mainrom_IsNull => mainrom == null;
|
||||||
|
public static void Set_mainrom(byte[] data) { mainrom_set = data; }
|
||||||
|
public static byte[] mainrom_set
|
||||||
|
{
|
||||||
|
set
|
||||||
|
{
|
||||||
|
mainrom_handle.ReleaseGCHandle();
|
||||||
|
mainrom_src = value;
|
||||||
|
mainromLength = value.Length;
|
||||||
|
mainrom_src.GetObjectPtr(ref mainrom_handle, ref mainrom);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region //指针化audiorom
|
||||||
|
static byte[] audiorom_src;
|
||||||
|
static GCHandle audiorom_handle;
|
||||||
|
public static byte* audiorom;
|
||||||
|
public static int audioromLength;
|
||||||
|
public static bool audiorom_IsNull => audiorom == null;
|
||||||
|
public static void Set_audiorom(byte[] data) { audiorom_set = data; }
|
||||||
|
public static byte[] audiorom_set
|
||||||
|
{
|
||||||
|
set
|
||||||
|
{
|
||||||
|
audiorom_handle.ReleaseGCHandle();
|
||||||
|
audiorom_src = value;
|
||||||
|
audioromLength = value.Length;
|
||||||
|
audiorom_src.GetObjectPtr(ref audiorom_handle, ref audiorom);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region //指针化mainram
|
||||||
|
static byte[] mainram_src;
|
||||||
|
static GCHandle mainram_handle;
|
||||||
|
public static byte* mainram;
|
||||||
|
public static int mainramLength;
|
||||||
|
public static bool mainram_IsNull => mainram == null;
|
||||||
|
public static void Set_mainram(byte[] data) { mainram_set = data; }
|
||||||
|
public static byte[] mainram_set
|
||||||
|
{
|
||||||
|
set
|
||||||
|
{
|
||||||
|
mainram_handle.ReleaseGCHandle();
|
||||||
|
mainram_src = value;
|
||||||
|
mainramLength = value.Length;
|
||||||
|
mainram_src.GetObjectPtr(ref mainram_handle, ref mainram);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region //指针化audioram
|
||||||
|
static byte[] audioram_src;
|
||||||
|
static GCHandle audioram_handle;
|
||||||
|
public static byte* audioram;
|
||||||
|
public static int audioramLength;
|
||||||
|
public static bool audioram_IsNull => audioram == null;
|
||||||
|
public static void Set_audioram(byte[] data) { audioram_set = data; }
|
||||||
|
public static byte[] audioram_set
|
||||||
|
{
|
||||||
|
set
|
||||||
|
{
|
||||||
|
audioram_handle.ReleaseGCHandle();
|
||||||
|
audioram_src = value;
|
||||||
|
audioramLength = value.Length;
|
||||||
|
audioram_src.GetObjectPtr(ref audioram_handle, ref audioram);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
public static void memory_reset()
|
public static void memory_reset()
|
||||||
{
|
{
|
||||||
switch (Machine.sBoard)
|
switch (Machine.sBoard)
|
||||||
@ -331,111 +407,6 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static GCHandle mainrom_handle;
|
|
||||||
public static byte* mainrom_Ptr;
|
|
||||||
public static int mainrom_Lenght;
|
|
||||||
public static bool mainrom_IsNull => mainrom == null;
|
|
||||||
|
|
||||||
public static void Set_mainrom(byte[] data)
|
|
||||||
{
|
|
||||||
Release_mainrom();
|
|
||||||
mainrom = data;
|
|
||||||
mainrom_handle = GCHandle.Alloc(mainrom, GCHandleType.Pinned);
|
|
||||||
mainrom_Ptr = (byte*)mainrom_handle.AddrOfPinnedObject();
|
|
||||||
mainrom_Lenght = data.Length;
|
|
||||||
}
|
|
||||||
static void Release_mainrom()
|
|
||||||
{
|
|
||||||
if (mainrom != null)
|
|
||||||
{
|
|
||||||
if (mainrom_handle.IsAllocated)
|
|
||||||
mainrom_handle.Free();
|
|
||||||
}
|
|
||||||
mainrom = null;
|
|
||||||
mainrom_handle = default;
|
|
||||||
mainrom_Ptr = null;
|
|
||||||
mainrom_Lenght = default;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static GCHandle audiorom_handle;
|
|
||||||
public static byte* audiorom_Ptr;
|
|
||||||
|
|
||||||
public static bool audiorom_IsNull => audiorom == null;
|
|
||||||
|
|
||||||
public static void Set_audiorom(byte[] data)
|
|
||||||
{
|
|
||||||
Release_audiorom();
|
|
||||||
audiorom = data;
|
|
||||||
audiorom_handle = GCHandle.Alloc(audiorom, GCHandleType.Pinned);
|
|
||||||
audiorom_Ptr = (byte*)audiorom_handle.AddrOfPinnedObject();
|
|
||||||
}
|
|
||||||
static void Release_audiorom()
|
|
||||||
{
|
|
||||||
if (audiorom != null)
|
|
||||||
{
|
|
||||||
if (audiorom_handle.IsAllocated)
|
|
||||||
audiorom_handle.Free();
|
|
||||||
}
|
|
||||||
audiorom = null;
|
|
||||||
audiorom_handle = default;
|
|
||||||
audiorom_Ptr = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static GCHandle mainram_handle;
|
|
||||||
public static byte* mainram_Ptr;
|
|
||||||
public static int mainram_Lenght;
|
|
||||||
public static bool mainram_IsNull => mainram == null;
|
|
||||||
|
|
||||||
public static void Set_mainram(byte[] data)
|
|
||||||
{
|
|
||||||
Release_mainram();
|
|
||||||
mainram = data;
|
|
||||||
mainram_handle = GCHandle.Alloc(mainram, GCHandleType.Pinned);
|
|
||||||
mainram_Ptr = (byte*)mainram_handle.AddrOfPinnedObject();
|
|
||||||
mainram_Lenght = data.Length;
|
|
||||||
}
|
|
||||||
static void Release_mainram()
|
|
||||||
{
|
|
||||||
if (mainram != null)
|
|
||||||
{
|
|
||||||
if (mainram_handle.IsAllocated)
|
|
||||||
mainram_handle.Free();
|
|
||||||
}
|
|
||||||
mainram = null;
|
|
||||||
mainram_handle = default;
|
|
||||||
mainram_Ptr = null;
|
|
||||||
mainram_Lenght = default;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static GCHandle audioram_handle;
|
|
||||||
public static byte* audioram_Ptr;
|
|
||||||
public static int audioram_Lenght;
|
|
||||||
public static bool audioram_IsNull => audioram == null;
|
|
||||||
|
|
||||||
public static void Set_audioram(byte[] data)
|
|
||||||
{
|
|
||||||
Release_audioram();
|
|
||||||
audioram = data;
|
|
||||||
audioram_handle = GCHandle.Alloc(audioram, GCHandleType.Pinned);
|
|
||||||
audioram_Ptr = (byte*)audioram_handle.AddrOfPinnedObject();
|
|
||||||
audioram_Lenght = data.Length;
|
|
||||||
}
|
|
||||||
static void Release_audioram()
|
|
||||||
{
|
|
||||||
if (audioram != null)
|
|
||||||
{
|
|
||||||
if (audioram_handle.IsAllocated)
|
|
||||||
audioram_handle.Free();
|
|
||||||
}
|
|
||||||
audioram = null;
|
|
||||||
audioram_handle = default;
|
|
||||||
audioram_Ptr = null;
|
|
||||||
audioram_Lenght = default;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public unsafe static class AxiMemoryEx
|
public unsafe static class AxiMemoryEx
|
||||||
|
@ -15,16 +15,16 @@ namespace MAME.Core
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0x1dff)
|
if (address <= 0x1dff)
|
||||||
{
|
{
|
||||||
result = Memory.mainram_Ptr[address];
|
result = Memory.mainram[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0x4000 && address <= 0x5fff)
|
else if (address >= 0x4000 && address <= 0x5fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x4000;
|
int offset = address - 0x4000;
|
||||||
result = Memory.mainrom_Ptr[basebankmain + offset];
|
result = Memory.mainrom[basebankmain + offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0x6000 && address <= 0xffff)
|
else if (address >= 0x6000 && address <= 0xffff)
|
||||||
{
|
{
|
||||||
result = Memory.mainrom_Ptr[address];
|
result = Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -37,7 +37,7 @@ namespace MAME.Core
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0x1dff)
|
if (address <= 0x1dff)
|
||||||
{
|
{
|
||||||
result = Memory.mainram_Ptr[address];
|
result = Memory.mainram[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0x1e00 && address <= 0x1fff)
|
else if (address >= 0x1e00 && address <= 0x1fff)
|
||||||
{
|
{
|
||||||
@ -85,11 +85,11 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x4000 && address <= 0x5fff)
|
else if (address >= 0x4000 && address <= 0x5fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x4000;
|
int offset = address - 0x4000;
|
||||||
result = Memory.mainrom_Ptr[basebankmain + offset];
|
result = Memory.mainrom[basebankmain + offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0x6000 && address <= 0xffff)
|
else if (address >= 0x6000 && address <= 0xffff)
|
||||||
{
|
{
|
||||||
result = Memory.mainrom_Ptr[address];
|
result = Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -98,7 +98,7 @@ namespace MAME.Core
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0x1dff)
|
if (address <= 0x1dff)
|
||||||
{
|
{
|
||||||
result = Memory.mainram_Ptr[address];
|
result = Memory.mainram[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0x1e00 && address <= 0x1fff)
|
else if (address >= 0x1e00 && address <= 0x1fff)
|
||||||
{
|
{
|
||||||
@ -146,7 +146,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x4000 && address <= 0x5fff)
|
else if (address >= 0x4000 && address <= 0x5fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x4000;
|
int offset = address - 0x4000;
|
||||||
result = Memory.mainrom_Ptr[basebankmain + offset];
|
result = Memory.mainrom[basebankmain + offset];
|
||||||
}
|
}
|
||||||
else if (address == 0x6000)
|
else if (address == 0x6000)
|
||||||
{
|
{
|
||||||
@ -154,7 +154,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0x6001 && address <= 0xffff)
|
else if (address >= 0x6001 && address <= 0xffff)
|
||||||
{
|
{
|
||||||
result = Memory.mainrom_Ptr[address];
|
result = Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -162,7 +162,7 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
if (address <= 0x1dff)
|
if (address <= 0x1dff)
|
||||||
{
|
{
|
||||||
Memory.mainram_Ptr[address] = value;
|
Memory.mainram[address] = value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x1e00 && address <= 0x1fff)
|
else if (address >= 0x1e00 && address <= 0x1fff)
|
||||||
{
|
{
|
||||||
@ -222,7 +222,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0x4000 && address <= 0xffff)
|
else if (address >= 0x4000 && address <= 0xffff)
|
||||||
{
|
{
|
||||||
Memory.mainrom_Ptr[address] = value;
|
Memory.mainrom[address] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static byte ZReadOp_gng(ushort address)
|
public static byte ZReadOp_gng(ushort address)
|
||||||
@ -230,12 +230,12 @@ namespace MAME.Core
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0x7fff)
|
if (address <= 0x7fff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[address];
|
result = Memory.audiorom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0xc000 && address <= 0xc7ff)
|
else if (address >= 0xc000 && address <= 0xc7ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xc000;
|
int offset = address - 0xc000;
|
||||||
result = Memory.audioram_Ptr[offset];
|
result = Memory.audioram[offset];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -248,12 +248,12 @@ namespace MAME.Core
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0x7fff)
|
if (address <= 0x7fff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[address];
|
result = Memory.audiorom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0xc000 && address <= 0xc7ff)
|
else if (address >= 0xc000 && address <= 0xc7ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xc000;
|
int offset = address - 0xc000;
|
||||||
result = Memory.audioram_Ptr[offset];
|
result = Memory.audioram[offset];
|
||||||
}
|
}
|
||||||
else if (address == 0xc800)
|
else if (address == 0xc800)
|
||||||
{
|
{
|
||||||
@ -269,12 +269,12 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
if (address >= 0x0000 && address <= 0x7fff)
|
if (address >= 0x0000 && address <= 0x7fff)
|
||||||
{
|
{
|
||||||
Memory.audiorom_Ptr[address] = value;
|
Memory.audiorom[address] = value;
|
||||||
}
|
}
|
||||||
else if (address >= 0xc000 && address <= 0xc7ff)
|
else if (address >= 0xc000 && address <= 0xc7ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xc000;
|
int offset = address - 0xc000;
|
||||||
Memory.audioram_Ptr[offset] = value;
|
Memory.audioram[offset] = value;
|
||||||
}
|
}
|
||||||
else if (address == 0xe000)
|
else if (address == 0xe000)
|
||||||
{
|
{
|
||||||
@ -299,9 +299,9 @@ namespace MAME.Core
|
|||||||
sbyte result = 0;
|
sbyte result = 0;
|
||||||
if (address <= 0x04ffff)
|
if (address <= 0x04ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)(Memory.mainrom_Ptr[address]);
|
result = (sbyte)(Memory.mainrom[address]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -316,9 +316,9 @@ namespace MAME.Core
|
|||||||
sbyte result = 0;
|
sbyte result = 0;
|
||||||
if (address <= 0x04ffff)
|
if (address <= 0x04ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)(Memory.mainrom_Ptr[address]);
|
result = (sbyte)(Memory.mainrom[address]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -428,7 +428,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0xff8000 && address <= 0xffdfff)
|
else if (address >= 0xff8000 && address <= 0xffdfff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xff8000;
|
int offset = address - 0xff8000;
|
||||||
result = (sbyte)Memory.mainram_Ptr[offset];
|
result = (sbyte)Memory.mainram[offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0xffe000 && address <= 0xffffff)
|
else if (address >= 0xffe000 && address <= 0xffffff)
|
||||||
{
|
{
|
||||||
@ -450,9 +450,9 @@ namespace MAME.Core
|
|||||||
sbyte result = 0;
|
sbyte result = 0;
|
||||||
if (address <= 0x04ffff)
|
if (address <= 0x04ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)(Memory.mainrom_Ptr[address]);
|
result = (sbyte)(Memory.mainrom[address]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -562,7 +562,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0xff8000 && address <= 0xffdfff)
|
else if (address >= 0xff8000 && address <= 0xffdfff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xff8000;
|
int offset = address - 0xff8000;
|
||||||
result = (sbyte)Memory.mainram_Ptr[offset];
|
result = (sbyte)Memory.mainram[offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0xffe000 && address <= 0xffffff)
|
else if (address >= 0xffe000 && address <= 0xffffff)
|
||||||
{
|
{
|
||||||
@ -584,9 +584,9 @@ namespace MAME.Core
|
|||||||
sbyte result = 0;
|
sbyte result = 0;
|
||||||
if (address <= 0x04ffff)
|
if (address <= 0x04ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)(Memory.mainrom_Ptr[address]);
|
result = (sbyte)(Memory.mainrom[address]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -696,7 +696,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0xff8000 && address <= 0xffdfff)
|
else if (address >= 0xff8000 && address <= 0xffdfff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xff8000;
|
int offset = address - 0xff8000;
|
||||||
result = (sbyte)Memory.mainram_Ptr[offset];
|
result = (sbyte)Memory.mainram[offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0xffe000 && address <= 0xffffff)
|
else if (address >= 0xffe000 && address <= 0xffffff)
|
||||||
{
|
{
|
||||||
@ -718,9 +718,9 @@ namespace MAME.Core
|
|||||||
short result = 0;
|
short result = 0;
|
||||||
if (address <= 0x04ffff)
|
if (address <= 0x04ffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -735,9 +735,9 @@ namespace MAME.Core
|
|||||||
short result = 0;
|
short result = 0;
|
||||||
if (address <= 0x04ffff)
|
if (address <= 0x04ffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -784,7 +784,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0xff8000 && address + 1 <= 0xffdfff)
|
else if (address >= 0xff8000 && address + 1 <= 0xffdfff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xff8000;
|
int offset = address - 0xff8000;
|
||||||
result = (short)(Memory.mainram_Ptr[offset] * 0x100 + Memory.mainram_Ptr[offset + 1]);
|
result = (short)(Memory.mainram[offset] * 0x100 + Memory.mainram[offset + 1]);
|
||||||
}
|
}
|
||||||
else if (address >= 0xffe000 && address + 1 <= 0xffffff)
|
else if (address >= 0xffe000 && address + 1 <= 0xffffff)
|
||||||
{
|
{
|
||||||
@ -799,9 +799,9 @@ namespace MAME.Core
|
|||||||
short result = 0;
|
short result = 0;
|
||||||
if (address <= 0x04ffff)
|
if (address <= 0x04ffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -848,7 +848,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0xff8000 && address + 1 <= 0xffdfff)
|
else if (address >= 0xff8000 && address + 1 <= 0xffdfff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xff8000;
|
int offset = address - 0xff8000;
|
||||||
result = (short)(Memory.mainram_Ptr[offset] * 0x100 + Memory.mainram_Ptr[offset + 1]);
|
result = (short)(Memory.mainram[offset] * 0x100 + Memory.mainram[offset + 1]);
|
||||||
}
|
}
|
||||||
else if (address >= 0xffe000 && address + 1 <= 0xffffff)
|
else if (address >= 0xffe000 && address + 1 <= 0xffffff)
|
||||||
{
|
{
|
||||||
@ -863,9 +863,9 @@ namespace MAME.Core
|
|||||||
short result = 0;
|
short result = 0;
|
||||||
if (address <= 0x04ffff)
|
if (address <= 0x04ffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -912,7 +912,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0xff8000 && address + 1 <= 0xffdfff)
|
else if (address >= 0xff8000 && address + 1 <= 0xffdfff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xff8000;
|
int offset = address - 0xff8000;
|
||||||
result = (short)(Memory.mainram_Ptr[offset] * 0x100 + Memory.mainram_Ptr[offset + 1]);
|
result = (short)(Memory.mainram[offset] * 0x100 + Memory.mainram[offset + 1]);
|
||||||
}
|
}
|
||||||
else if (address >= 0xffe000 && address + 1 <= 0xffffff)
|
else if (address >= 0xffe000 && address + 1 <= 0xffffff)
|
||||||
{
|
{
|
||||||
@ -927,9 +927,9 @@ namespace MAME.Core
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address <= 0x04ffff)
|
if (address <= 0x04ffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -944,9 +944,9 @@ namespace MAME.Core
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address <= 0x04ffff)
|
if (address <= 0x04ffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -961,7 +961,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0xff8000 && address + 3 <= 0xffdfff)
|
else if (address >= 0xff8000 && address + 3 <= 0xffdfff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xff8000;
|
int offset = address - 0xff8000;
|
||||||
result = (int)(Memory.mainram_Ptr[offset] * 0x1000000 + Memory.mainram_Ptr[offset + 1] * 0x10000 + Memory.mainram_Ptr[offset + 2] * 0x100 + Memory.mainram_Ptr[offset + 3]);
|
result = (int)(Memory.mainram[offset] * 0x1000000 + Memory.mainram[offset + 1] * 0x10000 + Memory.mainram[offset + 2] * 0x100 + Memory.mainram[offset + 3]);
|
||||||
}
|
}
|
||||||
else if (address >= 0xffe000 && address + 3 <= 0xffffff)
|
else if (address >= 0xffe000 && address + 3 <= 0xffffff)
|
||||||
{
|
{
|
||||||
@ -975,9 +975,9 @@ namespace MAME.Core
|
|||||||
address &= 0xffffff;
|
address &= 0xffffff;
|
||||||
if (address >= 0x000000 && address <= 0x04ffff)
|
if (address >= 0x000000 && address <= 0x04ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
Memory.mainrom_Ptr[address] = (byte)value;
|
Memory.mainrom[address] = (byte)value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (address >= 0x800000 && address <= 0x800fff)
|
else if (address >= 0x800000 && address <= 0x800fff)
|
||||||
@ -1073,7 +1073,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0xff8000 && address <= 0xffdfff)
|
else if (address >= 0xff8000 && address <= 0xffdfff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xff8000;
|
int offset = address - 0xff8000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)value;
|
Memory.mainram[offset] = (byte)value;
|
||||||
}
|
}
|
||||||
else if (address >= 0xffe000 && address <= 0xffffff)
|
else if (address >= 0xffe000 && address <= 0xffffff)
|
||||||
{
|
{
|
||||||
@ -1093,10 +1093,10 @@ namespace MAME.Core
|
|||||||
address &= 0xffffff;
|
address &= 0xffffff;
|
||||||
if (address >= 0x000000 && address + 1 <= 0x04ffff)
|
if (address >= 0x000000 && address + 1 <= 0x04ffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
Memory.mainrom_Ptr[address] = (byte)(value >> 8);
|
Memory.mainrom[address] = (byte)(value >> 8);
|
||||||
Memory.mainrom_Ptr[address + 1] = (byte)value;
|
Memory.mainrom[address + 1] = (byte)value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (address >= 0x800000 && address + 1 <= 0x800fff)
|
else if (address >= 0x800000 && address + 1 <= 0x800fff)
|
||||||
@ -1136,8 +1136,8 @@ namespace MAME.Core
|
|||||||
else if (address >= 0xff8000 && address + 1 <= 0xffdfff)
|
else if (address >= 0xff8000 && address + 1 <= 0xffdfff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xff8000;
|
int offset = address - 0xff8000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)(value >> 8);
|
Memory.mainram[offset] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[offset + 1] = (byte)value;
|
Memory.mainram[offset + 1] = (byte)value;
|
||||||
}
|
}
|
||||||
else if (address >= 0xffe000 && address + 1 <= 0xffffff)
|
else if (address >= 0xffe000 && address + 1 <= 0xffffff)
|
||||||
{
|
{
|
||||||
@ -1150,12 +1150,12 @@ namespace MAME.Core
|
|||||||
address &= 0xffffff;
|
address &= 0xffffff;
|
||||||
if (address >= 0x000000 && address + 3 <= 0x04ffff)
|
if (address >= 0x000000 && address + 3 <= 0x04ffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
Memory.mainrom_Ptr[address] = (byte)(value >> 24);
|
Memory.mainrom[address] = (byte)(value >> 24);
|
||||||
Memory.mainrom_Ptr[address + 1] = (byte)(value >> 16);
|
Memory.mainrom[address + 1] = (byte)(value >> 16);
|
||||||
Memory.mainrom_Ptr[address + 2] = (byte)(value >> 8);
|
Memory.mainrom[address + 2] = (byte)(value >> 8);
|
||||||
Memory.mainrom_Ptr[address + 3] = (byte)value;
|
Memory.mainrom[address + 3] = (byte)value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (address >= 0x800000 && address + 3 <= 0x800fff)
|
else if (address >= 0x800000 && address + 3 <= 0x800fff)
|
||||||
@ -1173,10 +1173,10 @@ namespace MAME.Core
|
|||||||
else if (address >= 0xff8000 && address + 3 <= 0xffdfff)
|
else if (address >= 0xff8000 && address + 3 <= 0xffdfff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xff8000;
|
int offset = address - 0xff8000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)(value >> 24);
|
Memory.mainram[offset] = (byte)(value >> 24);
|
||||||
Memory.mainram_Ptr[offset + 1] = (byte)(value >> 16);
|
Memory.mainram[offset + 1] = (byte)(value >> 16);
|
||||||
Memory.mainram_Ptr[offset + 2] = (byte)(value >> 8);
|
Memory.mainram[offset + 2] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[offset + 3] = (byte)value;
|
Memory.mainram[offset + 3] = (byte)value;
|
||||||
}
|
}
|
||||||
else if (address >= 0xffe000 && address + 3 <= 0xffffff)
|
else if (address >= 0xffe000 && address + 3 <= 0xffffff)
|
||||||
{
|
{
|
||||||
@ -1190,12 +1190,12 @@ namespace MAME.Core
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0x7fff)
|
if (address <= 0x7fff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[address];
|
result = Memory.audiorom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0xc000 && address <= 0xc7ff)
|
else if (address >= 0xc000 && address <= 0xc7ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xc000;
|
int offset = address - 0xc000;
|
||||||
result = Memory.audioram_Ptr[offset];
|
result = Memory.audioram[offset];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1208,12 +1208,12 @@ namespace MAME.Core
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0x7fff)
|
if (address <= 0x7fff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[address];
|
result = Memory.audiorom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0xc000 && address <= 0xc7ff)
|
else if (address >= 0xc000 && address <= 0xc7ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xc000;
|
int offset = address - 0xc000;
|
||||||
result = Memory.audioram_Ptr[offset];
|
result = Memory.audioram[offset];
|
||||||
}
|
}
|
||||||
else if (address == 0xc800)
|
else if (address == 0xc800)
|
||||||
{
|
{
|
||||||
@ -1233,12 +1233,12 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
if (address >= 0x0000 && address <= 0x7fff)
|
if (address >= 0x0000 && address <= 0x7fff)
|
||||||
{
|
{
|
||||||
Memory.audiorom_Ptr[address] = value;
|
Memory.audiorom[address] = value;
|
||||||
}
|
}
|
||||||
else if (address >= 0xc000 && address <= 0xc7ff)
|
else if (address >= 0xc000 && address <= 0xc7ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xc000;
|
int offset = address - 0xc000;
|
||||||
Memory.audioram_Ptr[offset] = value;
|
Memory.audioram[offset] = value;
|
||||||
}
|
}
|
||||||
else if (address == 0xe000)
|
else if (address == 0xe000)
|
||||||
{
|
{
|
||||||
|
@ -25,9 +25,9 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
writer.Write(Palette.entry_color[i]);
|
writer.Write(Palette.entry_color[i]);
|
||||||
}
|
}
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x1e00);
|
writer.Write(Memory.mainram, 0, 0x1e00);
|
||||||
M6809.mm1[0].SaveStateBinary(writer);
|
M6809.mm1[0].SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram_Ptr, 0, 0x800);
|
writer.Write(Memory.audioram, 0, 0x800);
|
||||||
Z80A.zz1[0].SaveStateBinary(writer);
|
Z80A.zz1[0].SaveStateBinary(writer);
|
||||||
Cpuint.SaveStateBinary(writer);
|
Cpuint.SaveStateBinary(writer);
|
||||||
writer.Write(EmuTimer.global_basetime.seconds);
|
writer.Write(EmuTimer.global_basetime.seconds);
|
||||||
@ -124,9 +124,9 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
writer.Write(Palette.entry_color[i]);
|
writer.Write(Palette.entry_color[i]);
|
||||||
}
|
}
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x6000);
|
writer.Write(Memory.mainram, 0, 0x6000);
|
||||||
MC68000.m1.SaveStateBinary(writer);
|
MC68000.m1.SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram_Ptr, 0, 0x800);
|
writer.Write(Memory.audioram, 0, 0x800);
|
||||||
Z80A.zz1[0].SaveStateBinary(writer);
|
Z80A.zz1[0].SaveStateBinary(writer);
|
||||||
Z80A.zz1[1].SaveStateBinary(writer);
|
Z80A.zz1[1].SaveStateBinary(writer);
|
||||||
Cpuint.SaveStateBinary(writer);
|
Cpuint.SaveStateBinary(writer);
|
||||||
|
@ -14,9 +14,9 @@ namespace MAME.Core
|
|||||||
sbyte result = 0;
|
sbyte result = 0;
|
||||||
if (address <= 0x3fffff)
|
if (address <= 0x3fffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)(Memory.mainrom_Ptr[address]);
|
result = (sbyte)(Memory.mainrom[address]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -31,9 +31,9 @@ namespace MAME.Core
|
|||||||
sbyte result = 0;
|
sbyte result = 0;
|
||||||
if (address <= 0x3fffff)
|
if (address <= 0x3fffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)Memory.mainrom_Ptr[address];
|
result = (sbyte)Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -82,7 +82,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address <= 0xffffff)
|
else if (address >= 0xff0000 && address <= 0xffffff)
|
||||||
{
|
{
|
||||||
result = (sbyte)Memory.mainram_Ptr[address & 0xffff];
|
result = (sbyte)Memory.mainram[address & 0xffff];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -92,9 +92,9 @@ namespace MAME.Core
|
|||||||
short result = 0;
|
short result = 0;
|
||||||
if (address <= 0x3fffff)
|
if (address <= 0x3fffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -107,7 +107,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address + 1 <= 0xffffff)
|
else if (address >= 0xff0000 && address + 1 <= 0xffffff)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainram_Ptr[(address & 0xffff)] * 0x100 + Memory.mainram_Ptr[(address & 0xffff) + 1]);
|
result = (short)(Memory.mainram[(address & 0xffff)] * 0x100 + Memory.mainram[(address & 0xffff) + 1]);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -117,9 +117,9 @@ namespace MAME.Core
|
|||||||
short result = 0;
|
short result = 0;
|
||||||
if (address <= 0x3fffff)
|
if (address <= 0x3fffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -150,7 +150,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address + 1 <= 0xffffff)
|
else if (address >= 0xff0000 && address + 1 <= 0xffffff)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainram_Ptr[(address & 0xffff)] * 0x100 + Memory.mainram_Ptr[(address & 0xffff) + 1]);
|
result = (short)(Memory.mainram[(address & 0xffff)] * 0x100 + Memory.mainram[(address & 0xffff) + 1]);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -160,9 +160,9 @@ namespace MAME.Core
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address <= 0x3fffff)
|
if (address <= 0x3fffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -175,7 +175,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address + 3 <= 0xffffff)
|
else if (address >= 0xff0000 && address + 3 <= 0xffffff)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainram_Ptr[(address & 0xffff)] * 0x1000000 + Memory.mainram_Ptr[(address & 0xffff) + 1] * 0x10000 + Memory.mainram_Ptr[(address & 0xffff) + 2] * 0x100 + Memory.mainram_Ptr[(address & 0xffff) + 3]);
|
result = (int)(Memory.mainram[(address & 0xffff)] * 0x1000000 + Memory.mainram[(address & 0xffff) + 1] * 0x10000 + Memory.mainram[(address & 0xffff) + 2] * 0x100 + Memory.mainram[(address & 0xffff) + 3]);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -185,9 +185,9 @@ namespace MAME.Core
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address <= 0x3fffff)
|
if (address <= 0x3fffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -217,7 +217,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address + 3 <= 0xffffff)
|
else if (address >= 0xff0000 && address + 3 <= 0xffffff)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainram_Ptr[(address & 0xffff)] * 0x1000000 + Memory.mainram_Ptr[(address & 0xffff) + 1] * 0x10000 + Memory.mainram_Ptr[(address & 0xffff) + 2] * 0x100 + Memory.mainram_Ptr[(address & 0xffff) + 3]);
|
result = (int)(Memory.mainram[(address & 0xffff)] * 0x1000000 + Memory.mainram[(address & 0xffff) + 1] * 0x10000 + Memory.mainram[(address & 0xffff) + 2] * 0x100 + Memory.mainram[(address & 0xffff) + 3]);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -258,7 +258,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address <= 0xffffff)
|
else if (address >= 0xff0000 && address <= 0xffffff)
|
||||||
{
|
{
|
||||||
Memory.mainram_Ptr[(address & 0xffff)] = (byte)(value);
|
Memory.mainram[(address & 0xffff)] = (byte)(value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -296,8 +296,8 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address + 1 <= 0xffffff)
|
else if (address >= 0xff0000 && address + 1 <= 0xffffff)
|
||||||
{
|
{
|
||||||
Memory.mainram_Ptr[(address & 0xffff)] = (byte)(value >> 8);
|
Memory.mainram[(address & 0xffff)] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[(address & 0xffff) + 1] = (byte)(value);
|
Memory.mainram[(address & 0xffff) + 1] = (byte)(value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -340,10 +340,10 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address + 3 <= 0xffffff)
|
else if (address >= 0xff0000 && address + 3 <= 0xffffff)
|
||||||
{
|
{
|
||||||
Memory.mainram_Ptr[(address & 0xffff)] = (byte)(value >> 24);
|
Memory.mainram[(address & 0xffff)] = (byte)(value >> 24);
|
||||||
Memory.mainram_Ptr[(address & 0xffff) + 1] = (byte)(value >> 16);
|
Memory.mainram[(address & 0xffff) + 1] = (byte)(value >> 16);
|
||||||
Memory.mainram_Ptr[(address & 0xffff) + 2] = (byte)(value >> 8);
|
Memory.mainram[(address & 0xffff) + 2] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[(address & 0xffff) + 3] = (byte)(value);
|
Memory.mainram[(address & 0xffff) + 3] = (byte)(value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -355,7 +355,7 @@ namespace MAME.Core
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0x7fff)
|
if (address <= 0x7fff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[address & 0x7fff];
|
result = Memory.audiorom[address & 0x7fff];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -368,15 +368,15 @@ namespace MAME.Core
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address < 0x8000)
|
if (address < 0x8000)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[address & 0x7fff];
|
result = Memory.audiorom[address & 0x7fff];
|
||||||
}
|
}
|
||||||
else if (address >= 0x8000 && address <= 0xbfff)
|
else if (address >= 0x8000 && address <= 0xbfff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[basebanksnd + (address & 0x3fff)];
|
result = Memory.audiorom[basebanksnd + (address & 0x3fff)];
|
||||||
}
|
}
|
||||||
else if (address >= 0xd000 && address <= 0xd7ff)
|
else if (address >= 0xd000 && address <= 0xd7ff)
|
||||||
{
|
{
|
||||||
result = Memory.audioram_Ptr[address & 0x7ff];
|
result = Memory.audioram[address & 0x7ff];
|
||||||
}
|
}
|
||||||
else if (address == 0xf001)
|
else if (address == 0xf001)
|
||||||
{
|
{
|
||||||
@ -405,7 +405,7 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
if (address >= 0xd000 && address <= 0xd7ff)
|
if (address >= 0xd000 && address <= 0xd7ff)
|
||||||
{
|
{
|
||||||
Memory.audioram_Ptr[address & 0x7ff] = value;
|
Memory.audioram[address & 0x7ff] = value;
|
||||||
}
|
}
|
||||||
else if (address == 0xf000)
|
else if (address == 0xf000)
|
||||||
{
|
{
|
||||||
@ -438,9 +438,9 @@ namespace MAME.Core
|
|||||||
sbyte result = 0;
|
sbyte result = 0;
|
||||||
if (address <= 0x3fffff)
|
if (address <= 0x3fffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)(Memory.mainrom_Ptr[address]);
|
result = (sbyte)(Memory.mainrom[address]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -459,9 +459,9 @@ namespace MAME.Core
|
|||||||
sbyte result = 0;
|
sbyte result = 0;
|
||||||
if (address <= 0x3fffff)
|
if (address <= 0x3fffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)Memory.mainrom_Ptr[address];
|
result = (sbyte)Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -533,7 +533,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address <= 0xffffff)
|
else if (address >= 0xff0000 && address <= 0xffffff)
|
||||||
{
|
{
|
||||||
result = (sbyte)Memory.mainram_Ptr[address & 0xffff];
|
result = (sbyte)Memory.mainram[address & 0xffff];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -543,9 +543,9 @@ namespace MAME.Core
|
|||||||
short result = 0;
|
short result = 0;
|
||||||
if (address <= 0x3fffff)
|
if (address <= 0x3fffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -558,7 +558,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address + 1 <= 0xffffff)
|
else if (address >= 0xff0000 && address + 1 <= 0xffffff)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainram_Ptr[(address & 0xffff)] * 0x100 + Memory.mainram_Ptr[(address & 0xffff) + 1]);
|
result = (short)(Memory.mainram[(address & 0xffff)] * 0x100 + Memory.mainram[(address & 0xffff) + 1]);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -568,9 +568,9 @@ namespace MAME.Core
|
|||||||
short result = 0;
|
short result = 0;
|
||||||
if (address <= 0x3fffff)
|
if (address <= 0x3fffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -624,7 +624,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address + 1 <= 0xffffff)
|
else if (address >= 0xff0000 && address + 1 <= 0xffffff)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainram_Ptr[(address & 0xffff)] * 0x100 + Memory.mainram_Ptr[(address & 0xffff) + 1]);
|
result = (short)(Memory.mainram[(address & 0xffff)] * 0x100 + Memory.mainram[(address & 0xffff) + 1]);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -634,9 +634,9 @@ namespace MAME.Core
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address <= 0x3fffff)
|
if (address <= 0x3fffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -649,7 +649,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address + 3 <= 0xffffff)
|
else if (address >= 0xff0000 && address + 3 <= 0xffffff)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainram_Ptr[(address & 0xffff)] * 0x1000000 + Memory.mainram_Ptr[(address & 0xffff) + 1] * 0x10000 + Memory.mainram_Ptr[(address & 0xffff) + 2] * 0x100 + Memory.mainram_Ptr[(address & 0xffff) + 3]);
|
result = (int)(Memory.mainram[(address & 0xffff)] * 0x1000000 + Memory.mainram[(address & 0xffff) + 1] * 0x10000 + Memory.mainram[(address & 0xffff) + 2] * 0x100 + Memory.mainram[(address & 0xffff) + 3]);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -659,9 +659,9 @@ namespace MAME.Core
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address <= 0x3fffff)
|
if (address <= 0x3fffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -710,7 +710,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address + 3 <= 0xffffff)
|
else if (address >= 0xff0000 && address + 3 <= 0xffffff)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainram_Ptr[(address & 0xffff)] * 0x1000000 + Memory.mainram_Ptr[(address & 0xffff) + 1] * 0x10000 + Memory.mainram_Ptr[(address & 0xffff) + 2] * 0x100 + Memory.mainram_Ptr[(address & 0xffff) + 3]);
|
result = (int)(Memory.mainram[(address & 0xffff)] * 0x1000000 + Memory.mainram[(address & 0xffff) + 1] * 0x10000 + Memory.mainram[(address & 0xffff) + 2] * 0x100 + Memory.mainram[(address & 0xffff) + 3]);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -778,7 +778,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address <= 0xffffff)
|
else if (address >= 0xff0000 && address <= 0xffffff)
|
||||||
{
|
{
|
||||||
Memory.mainram_Ptr[(address & 0xffff)] = (byte)(value);
|
Memory.mainram[(address & 0xffff)] = (byte)(value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -831,8 +831,8 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address + 1 <= 0xffffff)
|
else if (address >= 0xff0000 && address + 1 <= 0xffffff)
|
||||||
{
|
{
|
||||||
Memory.mainram_Ptr[(address & 0xffff)] = (byte)(value >> 8);
|
Memory.mainram[(address & 0xffff)] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[(address & 0xffff) + 1] = (byte)(value);
|
Memory.mainram[(address & 0xffff) + 1] = (byte)(value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -890,10 +890,10 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address + 3 <= 0xffffff)
|
else if (address >= 0xff0000 && address + 3 <= 0xffffff)
|
||||||
{
|
{
|
||||||
Memory.mainram_Ptr[(address & 0xffff)] = (byte)(value >> 24);
|
Memory.mainram[(address & 0xffff)] = (byte)(value >> 24);
|
||||||
Memory.mainram_Ptr[(address & 0xffff) + 1] = (byte)(value >> 16);
|
Memory.mainram[(address & 0xffff) + 1] = (byte)(value >> 16);
|
||||||
Memory.mainram_Ptr[(address & 0xffff) + 2] = (byte)(value >> 8);
|
Memory.mainram[(address & 0xffff) + 2] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[(address & 0xffff) + 3] = (byte)(value);
|
Memory.mainram[(address & 0xffff) + 3] = (byte)(value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -945,9 +945,9 @@ namespace MAME.Core
|
|||||||
sbyte result = 0;
|
sbyte result = 0;
|
||||||
if (address <= 0x3fffff)
|
if (address <= 0x3fffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)Memory.mainrom_Ptr[address];
|
result = (sbyte)Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1061,7 +1061,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address <= 0xffffff)
|
else if (address >= 0xff0000 && address <= 0xffffff)
|
||||||
{
|
{
|
||||||
result = (sbyte)Memory.mainram_Ptr[address & 0xffff];
|
result = (sbyte)Memory.mainram[address & 0xffff];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -1109,9 +1109,9 @@ namespace MAME.Core
|
|||||||
short result = 0;
|
short result = 0;
|
||||||
if (address <= 0x3fffff)
|
if (address <= 0x3fffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1204,7 +1204,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address + 1 <= 0xffffff)
|
else if (address >= 0xff0000 && address + 1 <= 0xffffff)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainram_Ptr[(address & 0xffff)] * 0x100 + Memory.mainram_Ptr[(address & 0xffff) + 1]);
|
result = (short)(Memory.mainram[(address & 0xffff)] * 0x100 + Memory.mainram[(address & 0xffff) + 1]);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -1252,9 +1252,9 @@ namespace MAME.Core
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address <= 0x3fffff)
|
if (address <= 0x3fffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1355,7 +1355,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address + 3 <= 0xffffff)
|
else if (address >= 0xff0000 && address + 3 <= 0xffffff)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainram_Ptr[(address & 0xffff)] * 0x1000000 + Memory.mainram_Ptr[(address & 0xffff) + 1] * 0x10000 + Memory.mainram_Ptr[(address & 0xffff) + 2] * 0x100 + Memory.mainram_Ptr[(address & 0xffff) + 3]);
|
result = (int)(Memory.mainram[(address & 0xffff)] * 0x1000000 + Memory.mainram[(address & 0xffff) + 1] * 0x10000 + Memory.mainram[(address & 0xffff) + 2] * 0x100 + Memory.mainram[(address & 0xffff) + 3]);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -1466,7 +1466,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address <= 0xffffff)
|
else if (address >= 0xff0000 && address <= 0xffffff)
|
||||||
{
|
{
|
||||||
Memory.mainram_Ptr[(address & 0xffff)] = (byte)(value);
|
Memory.mainram[(address & 0xffff)] = (byte)(value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1571,8 +1571,8 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address + 1 <= 0xffffff)
|
else if (address >= 0xff0000 && address + 1 <= 0xffffff)
|
||||||
{
|
{
|
||||||
Memory.mainram_Ptr[address & 0xffff] = (byte)(value >> 8);
|
Memory.mainram[address & 0xffff] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[(address & 0xffff) + 1] = (byte)value;
|
Memory.mainram[(address & 0xffff) + 1] = (byte)value;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1695,10 +1695,10 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address + 3 <= 0xffffff)
|
else if (address >= 0xff0000 && address + 3 <= 0xffffff)
|
||||||
{
|
{
|
||||||
Memory.mainram_Ptr[(address & 0xffff)] = (byte)(value >> 24);
|
Memory.mainram[(address & 0xffff)] = (byte)(value >> 24);
|
||||||
Memory.mainram_Ptr[(address & 0xffff) + 1] = (byte)(value >> 16);
|
Memory.mainram[(address & 0xffff) + 1] = (byte)(value >> 16);
|
||||||
Memory.mainram_Ptr[(address & 0xffff) + 2] = (byte)(value >> 8);
|
Memory.mainram[(address & 0xffff) + 2] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[(address & 0xffff) + 3] = (byte)(value);
|
Memory.mainram[(address & 0xffff) + 3] = (byte)(value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1723,11 +1723,11 @@ namespace MAME.Core
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0x7fff)
|
if (address <= 0x7fff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[address & 0x7fff];
|
result = Memory.audiorom[address & 0x7fff];
|
||||||
}
|
}
|
||||||
else if (address >= 0x8000 && address <= 0xbfff)
|
else if (address >= 0x8000 && address <= 0xbfff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[basebanksnd + (address & 0x3fff)];
|
result = Memory.audiorom[basebanksnd + (address & 0x3fff)];
|
||||||
}
|
}
|
||||||
else if (address >= 0xc000 && address <= 0xcfff)
|
else if (address >= 0xc000 && address <= 0xcfff)
|
||||||
{
|
{
|
||||||
|
@ -193,9 +193,9 @@
|
|||||||
sbyte result = 0;
|
sbyte result = 0;
|
||||||
if (address <= 0x3fffff)
|
if (address <= 0x3fffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)Memory.mainrom_Ptr[address];
|
result = (sbyte)Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -233,7 +233,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address <= 0xffffff)
|
else if (address >= 0xff0000 && address <= 0xffffff)
|
||||||
{
|
{
|
||||||
result = (sbyte)Memory.mainram_Ptr[address & 0xffff];
|
result = (sbyte)Memory.mainram[address & 0xffff];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -243,9 +243,9 @@
|
|||||||
short result = 0;
|
short result = 0;
|
||||||
if (address <= 0x3fffff)
|
if (address <= 0x3fffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -276,7 +276,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address + 1 <= 0xffffff)
|
else if (address >= 0xff0000 && address + 1 <= 0xffffff)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainram_Ptr[(address & 0xffff)] * 0x100 + Memory.mainram_Ptr[(address & 0xffff) + 1]);
|
result = (short)(Memory.mainram[(address & 0xffff)] * 0x100 + Memory.mainram[(address & 0xffff) + 1]);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -286,9 +286,9 @@
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address <= 0x3fffff)
|
if (address <= 0x3fffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -318,7 +318,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address + 3 <= 0xffffff)
|
else if (address >= 0xff0000 && address + 3 <= 0xffffff)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainram_Ptr[(address & 0xffff)] * 0x1000000 + Memory.mainram_Ptr[(address & 0xffff) + 1] * 0x10000 + Memory.mainram_Ptr[(address & 0xffff) + 2] * 0x100 + Memory.mainram_Ptr[(address & 0xffff) + 3]);
|
result = (int)(Memory.mainram[(address & 0xffff)] * 0x1000000 + Memory.mainram[(address & 0xffff) + 1] * 0x10000 + Memory.mainram[(address & 0xffff) + 2] * 0x100 + Memory.mainram[(address & 0xffff) + 3]);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -367,7 +367,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address <= 0xffffff)
|
else if (address >= 0xff0000 && address <= 0xffffff)
|
||||||
{
|
{
|
||||||
Memory.mainram_Ptr[(address & 0xffff)] = (byte)(value);
|
Memory.mainram[(address & 0xffff)] = (byte)(value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -413,8 +413,8 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address + 1 <= 0xffffff)
|
else if (address >= 0xff0000 && address + 1 <= 0xffffff)
|
||||||
{
|
{
|
||||||
Memory.mainram_Ptr[(address & 0xffff)] = (byte)(value >> 8);
|
Memory.mainram[(address & 0xffff)] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[(address & 0xffff) + 1] = (byte)(value);
|
Memory.mainram[(address & 0xffff) + 1] = (byte)(value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -466,10 +466,10 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address + 3 <= 0xffffff)
|
else if (address >= 0xff0000 && address + 3 <= 0xffffff)
|
||||||
{
|
{
|
||||||
Memory.mainram_Ptr[(address & 0xffff)] = (byte)(value >> 24);
|
Memory.mainram[(address & 0xffff)] = (byte)(value >> 24);
|
||||||
Memory.mainram_Ptr[(address & 0xffff) + 1] = (byte)(value >> 16);
|
Memory.mainram[(address & 0xffff) + 1] = (byte)(value >> 16);
|
||||||
Memory.mainram_Ptr[(address & 0xffff) + 2] = (byte)(value >> 8);
|
Memory.mainram[(address & 0xffff) + 2] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[(address & 0xffff) + 3] = (byte)(value);
|
Memory.mainram[(address & 0xffff) + 3] = (byte)(value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -482,9 +482,9 @@
|
|||||||
sbyte result = 0;
|
sbyte result = 0;
|
||||||
if (address <= 0x3fffff)
|
if (address <= 0x3fffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)Memory.mainrom_Ptr[address];
|
result = (sbyte)Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -538,7 +538,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address <= 0xffffff)
|
else if (address >= 0xff0000 && address <= 0xffffff)
|
||||||
{
|
{
|
||||||
result = (sbyte)Memory.mainram_Ptr[address & 0xffff];
|
result = (sbyte)Memory.mainram[address & 0xffff];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -548,9 +548,9 @@
|
|||||||
short result = 0;
|
short result = 0;
|
||||||
if (address <= 0x3fffff)
|
if (address <= 0x3fffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -593,7 +593,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address + 1 <= 0xffffff)
|
else if (address >= 0xff0000 && address + 1 <= 0xffffff)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainram_Ptr[(address & 0xffff)] * 0x100 + Memory.mainram_Ptr[(address & 0xffff) + 1]);
|
result = (short)(Memory.mainram[(address & 0xffff)] * 0x100 + Memory.mainram[(address & 0xffff) + 1]);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -603,9 +603,9 @@
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address <= 0x3fffff)
|
if (address <= 0x3fffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -647,7 +647,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address + 3 <= 0xffffff)
|
else if (address >= 0xff0000 && address + 3 <= 0xffffff)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainram_Ptr[(address & 0xffff)] * 0x1000000 + Memory.mainram_Ptr[(address & 0xffff) + 1] * 0x10000 + Memory.mainram_Ptr[(address & 0xffff) + 2] * 0x100 + Memory.mainram_Ptr[(address & 0xffff) + 3]);
|
result = (int)(Memory.mainram[(address & 0xffff)] * 0x1000000 + Memory.mainram[(address & 0xffff) + 1] * 0x10000 + Memory.mainram[(address & 0xffff) + 2] * 0x100 + Memory.mainram[(address & 0xffff) + 3]);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -704,7 +704,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address <= 0xffffff)
|
else if (address >= 0xff0000 && address <= 0xffffff)
|
||||||
{
|
{
|
||||||
Memory.mainram_Ptr[(address & 0xffff)] = (byte)(value);
|
Memory.mainram[(address & 0xffff)] = (byte)(value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -760,8 +760,8 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address + 1 <= 0xffffff)
|
else if (address >= 0xff0000 && address + 1 <= 0xffffff)
|
||||||
{
|
{
|
||||||
Memory.mainram_Ptr[(address & 0xffff)] = (byte)(value >> 8);
|
Memory.mainram[(address & 0xffff)] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[(address & 0xffff) + 1] = (byte)(value);
|
Memory.mainram[(address & 0xffff) + 1] = (byte)(value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -827,10 +827,10 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address + 3 <= 0xffffff)
|
else if (address >= 0xff0000 && address + 3 <= 0xffffff)
|
||||||
{
|
{
|
||||||
Memory.mainram_Ptr[(address & 0xffff)] = (byte)(value >> 24);
|
Memory.mainram[(address & 0xffff)] = (byte)(value >> 24);
|
||||||
Memory.mainram_Ptr[(address & 0xffff) + 1] = (byte)(value >> 16);
|
Memory.mainram[(address & 0xffff) + 1] = (byte)(value >> 16);
|
||||||
Memory.mainram_Ptr[(address & 0xffff) + 2] = (byte)(value >> 8);
|
Memory.mainram[(address & 0xffff) + 2] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[(address & 0xffff) + 3] = (byte)(value);
|
Memory.mainram[(address & 0xffff) + 3] = (byte)(value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -958,9 +958,9 @@
|
|||||||
sbyte result = 0;
|
sbyte result = 0;
|
||||||
if (address <= 0x3fffff)
|
if (address <= 0x3fffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)(Memory.mainrom_Ptr[address]);
|
result = (sbyte)(Memory.mainrom[address]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -975,9 +975,9 @@
|
|||||||
sbyte result = 0;
|
sbyte result = 0;
|
||||||
if (address <= 0x3fffff)
|
if (address <= 0x3fffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)Memory.mainrom_Ptr[address];
|
result = (sbyte)Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1091,7 +1091,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address <= 0xffffef)
|
else if (address >= 0xff0000 && address <= 0xffffef)
|
||||||
{
|
{
|
||||||
result = (sbyte)Memory.mainram_Ptr[address & 0xffff];
|
result = (sbyte)Memory.mainram[address & 0xffff];
|
||||||
}
|
}
|
||||||
else if (address >= 0xfffff0 && address <= 0xfffffb)
|
else if (address >= 0xfffff0 && address <= 0xfffffb)
|
||||||
{
|
{
|
||||||
@ -1110,9 +1110,9 @@
|
|||||||
short result = 0;
|
short result = 0;
|
||||||
if (address <= 0x3fffff)
|
if (address <= 0x3fffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1127,9 +1127,9 @@
|
|||||||
short result = 0;
|
short result = 0;
|
||||||
if (address <= 0x3fffff)
|
if (address <= 0x3fffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1222,7 +1222,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address + 1 <= 0xffffef)
|
else if (address >= 0xff0000 && address + 1 <= 0xffffef)
|
||||||
{
|
{
|
||||||
return (short)(Memory.mainram_Ptr[(address & 0xffff)] * 0x100 + Memory.mainram_Ptr[(address & 0xffff) + 1]);
|
return (short)(Memory.mainram[(address & 0xffff)] * 0x100 + Memory.mainram[(address & 0xffff) + 1]);
|
||||||
}
|
}
|
||||||
else if (address >= 0xfffff0 && address + 1 <= 0xfffffb)
|
else if (address >= 0xfffff0 && address + 1 <= 0xfffffb)
|
||||||
{
|
{
|
||||||
@ -1241,9 +1241,9 @@
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address <= 0x3fffff)
|
if (address <= 0x3fffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1258,9 +1258,9 @@
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address <= 0x3fffff)
|
if (address <= 0x3fffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1362,7 +1362,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address + 3 <= 0xffffef)
|
else if (address >= 0xff0000 && address + 3 <= 0xffffef)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainram_Ptr[(address & 0xffff)] * 0x1000000 + Memory.mainram_Ptr[(address & 0xffff) + 1] * 0x10000 + Memory.mainram_Ptr[(address & 0xffff) + 2] * 0x100 + Memory.mainram_Ptr[(address & 0xffff) + 3]);
|
result = (int)(Memory.mainram[(address & 0xffff)] * 0x1000000 + Memory.mainram[(address & 0xffff) + 1] * 0x10000 + Memory.mainram[(address & 0xffff) + 2] * 0x100 + Memory.mainram[(address & 0xffff) + 3]);
|
||||||
}
|
}
|
||||||
else if (address >= 0xfffff0 && address + 3 <= 0xfffffb)
|
else if (address >= 0xfffff0 && address + 3 <= 0xfffffb)
|
||||||
{
|
{
|
||||||
@ -1483,7 +1483,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address <= 0xffffef)
|
else if (address >= 0xff0000 && address <= 0xffffef)
|
||||||
{
|
{
|
||||||
Memory.mainram_Ptr[(address & 0xffff)] = (byte)(value);
|
Memory.mainram[(address & 0xffff)] = (byte)(value);
|
||||||
}
|
}
|
||||||
else if (address >= 0xfffff0 && address <= 0xfffffb)
|
else if (address >= 0xfffff0 && address <= 0xfffffb)
|
||||||
{
|
{
|
||||||
@ -1599,8 +1599,8 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address + 1 <= 0xffffef)
|
else if (address >= 0xff0000 && address + 1 <= 0xffffef)
|
||||||
{
|
{
|
||||||
Memory.mainram_Ptr[address & 0xffff] = (byte)(value >> 8);
|
Memory.mainram[address & 0xffff] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[(address & 0xffff) + 1] = (byte)value;
|
Memory.mainram[(address & 0xffff) + 1] = (byte)value;
|
||||||
}
|
}
|
||||||
else if (address >= 0xfffff0 && address + 1 <= 0xfffffb)
|
else if (address >= 0xfffff0 && address + 1 <= 0xfffffb)
|
||||||
{
|
{
|
||||||
@ -1732,10 +1732,10 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0xff0000 && address + 3 <= 0xffffef)
|
else if (address >= 0xff0000 && address + 3 <= 0xffffef)
|
||||||
{
|
{
|
||||||
Memory.mainram_Ptr[(address & 0xffff)] = (byte)(value >> 24);
|
Memory.mainram[(address & 0xffff)] = (byte)(value >> 24);
|
||||||
Memory.mainram_Ptr[(address & 0xffff) + 1] = (byte)(value >> 16);
|
Memory.mainram[(address & 0xffff) + 1] = (byte)(value >> 16);
|
||||||
Memory.mainram_Ptr[(address & 0xffff) + 2] = (byte)(value >> 8);
|
Memory.mainram[(address & 0xffff) + 2] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[(address & 0xffff) + 3] = (byte)(value);
|
Memory.mainram[(address & 0xffff) + 3] = (byte)(value);
|
||||||
}
|
}
|
||||||
else if (address >= 0xfffff0 && address + 3 <= 0xfffffb)
|
else if (address >= 0xfffff0 && address + 3 <= 0xfffffb)
|
||||||
{
|
{
|
||||||
|
@ -25,10 +25,10 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
writer.Write(Palette.entry_color[i]);
|
writer.Write(Palette.entry_color[i]);
|
||||||
}
|
}
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x10000);
|
writer.Write(Memory.mainram, 0, 0x10000);
|
||||||
writer.Write(gfxram, 0, 0x30000);
|
writer.Write(gfxram, 0, 0x30000);
|
||||||
MC68000.m1.SaveStateBinary(writer);
|
MC68000.m1.SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram_Ptr, 0, 0x800);
|
writer.Write(Memory.audioram, 0, 0x800);
|
||||||
Z80A.zz1[0].SaveStateBinary(writer);
|
Z80A.zz1[0].SaveStateBinary(writer);
|
||||||
Cpuint.SaveStateBinary(writer);
|
Cpuint.SaveStateBinary(writer);
|
||||||
writer.Write(EmuTimer.global_basetime.seconds);
|
writer.Write(EmuTimer.global_basetime.seconds);
|
||||||
@ -95,10 +95,10 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
writer.Write(Palette.entry_color[i]);
|
writer.Write(Palette.entry_color[i]);
|
||||||
}
|
}
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x10000);
|
writer.Write(Memory.mainram, 0, 0x10000);
|
||||||
writer.Write(gfxram, 0, 0x30000);
|
writer.Write(gfxram, 0, 0x30000);
|
||||||
MC68000.m1.SaveStateBinary(writer);
|
MC68000.m1.SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram_Ptr, 0, 0x800);
|
writer.Write(Memory.audioram, 0, 0x800);
|
||||||
Z80A.zz1[0].SaveStateBinary(writer);
|
Z80A.zz1[0].SaveStateBinary(writer);
|
||||||
Cpuint.SaveStateBinary(writer);
|
Cpuint.SaveStateBinary(writer);
|
||||||
writer.Write(EmuTimer.global_basetime.seconds);
|
writer.Write(EmuTimer.global_basetime.seconds);
|
||||||
@ -158,10 +158,10 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
writer.Write(Palette.entry_color[i]);
|
writer.Write(Palette.entry_color[i]);
|
||||||
}
|
}
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x10000);
|
writer.Write(Memory.mainram, 0, 0x10000);
|
||||||
writer.Write(gfxram, 0, 0x30000);
|
writer.Write(gfxram, 0, 0x30000);
|
||||||
MC68000.m1.SaveStateBinary(writer);
|
MC68000.m1.SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram_Ptr, 0, 0x800);
|
writer.Write(Memory.audioram, 0, 0x800);
|
||||||
Z80A.zz1[0].SaveStateBinary(writer);
|
Z80A.zz1[0].SaveStateBinary(writer);
|
||||||
Cpuint.SaveStateBinary(writer);
|
Cpuint.SaveStateBinary(writer);
|
||||||
writer.Write(EmuTimer.global_basetime.seconds);
|
writer.Write(EmuTimer.global_basetime.seconds);
|
||||||
|
@ -9,21 +9,21 @@
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0x7ff)
|
if (address <= 0x7ff)
|
||||||
{
|
{
|
||||||
result = Memory.mainram_Ptr[address];
|
result = Memory.mainram[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0x4000 && address <= 0x5fff)
|
else if (address >= 0x4000 && address <= 0x5fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x4000;
|
int offset = address - 0x4000;
|
||||||
result = Memory.mainrom_Ptr[basebankmain1 + offset];
|
result = Memory.mainrom[basebankmain1 + offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0x6000 && address <= 0x7fff)
|
else if (address >= 0x6000 && address <= 0x7fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x6000;
|
int offset = address - 0x6000;
|
||||||
result = Memory.mainrom_Ptr[basebankmain2 + offset];
|
result = Memory.mainrom[basebankmain2 + offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0x8000 && address <= 0xffff)
|
else if (address >= 0x8000 && address <= 0xffff)
|
||||||
{
|
{
|
||||||
result = Memory.mainrom_Ptr[address];
|
result = Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -32,21 +32,21 @@
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0x7ff)
|
if (address <= 0x7ff)
|
||||||
{
|
{
|
||||||
result = Memory.mainram_Ptr[address];
|
result = Memory.mainram[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0x4000 && address <= 0x5fff)
|
else if (address >= 0x4000 && address <= 0x5fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x4000;
|
int offset = address - 0x4000;
|
||||||
result = Memory.mainrom_Ptr[basebankmain1 + offset];
|
result = Memory.mainrom[basebankmain1 + offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0x6000 && address <= 0x7fff)
|
else if (address >= 0x6000 && address <= 0x7fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x6000;
|
int offset = address - 0x6000;
|
||||||
result = Memory.mainrom_Ptr[basebankmain2 + offset];
|
result = Memory.mainrom[basebankmain2 + offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0x8000 && address <= 0xffff)
|
else if (address >= 0x8000 && address <= 0xffff)
|
||||||
{
|
{
|
||||||
result = Memory.mainrom_Ptr[address];
|
result = Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -55,7 +55,7 @@
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0x7ff)
|
if (address <= 0x7ff)
|
||||||
{
|
{
|
||||||
result = Memory.mainram_Ptr[address];
|
result = Memory.mainram[address];
|
||||||
}
|
}
|
||||||
else if (address == 0x1800)
|
else if (address == 0x1800)
|
||||||
{
|
{
|
||||||
@ -72,16 +72,16 @@
|
|||||||
else if (address >= 0x4000 && address <= 0x5fff)
|
else if (address >= 0x4000 && address <= 0x5fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x4000;
|
int offset = address - 0x4000;
|
||||||
result = Memory.mainrom_Ptr[basebankmain1 + offset];
|
result = Memory.mainrom[basebankmain1 + offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0x6000 && address <= 0x7fff)
|
else if (address >= 0x6000 && address <= 0x7fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x6000;
|
int offset = address - 0x6000;
|
||||||
result = Memory.mainrom_Ptr[basebankmain2 + offset];
|
result = Memory.mainrom[basebankmain2 + offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0x8000 && address <= 0xffff)
|
else if (address >= 0x8000 && address <= 0xffff)
|
||||||
{
|
{
|
||||||
result = Memory.mainrom_Ptr[address];
|
result = Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -89,7 +89,7 @@
|
|||||||
{
|
{
|
||||||
if (address <= 0x7ff)
|
if (address <= 0x7ff)
|
||||||
{
|
{
|
||||||
Memory.mainram_Ptr[address] = data;
|
Memory.mainram[address] = data;
|
||||||
}
|
}
|
||||||
else if (address >= 0x800 && address <= 0xfff)
|
else if (address >= 0x800 && address <= 0xfff)
|
||||||
{
|
{
|
||||||
@ -115,7 +115,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x4000 && address <= 0xffff)
|
else if (address >= 0x4000 && address <= 0xffff)
|
||||||
{
|
{
|
||||||
Memory.mainrom_Ptr[address] = data;
|
Memory.mainrom[address] = data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static byte D1ReadOp(ushort address)
|
public static byte D1ReadOp(ushort address)
|
||||||
@ -123,7 +123,7 @@
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0x7ff)
|
if (address <= 0x7ff)
|
||||||
{
|
{
|
||||||
result = Memory.audioram_Ptr[address];
|
result = Memory.audioram[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0x4000 && address <= 0x7fff)
|
else if (address >= 0x4000 && address <= 0x7fff)
|
||||||
{
|
{
|
||||||
@ -142,16 +142,16 @@
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0x7ff)
|
if (address <= 0x7ff)
|
||||||
{
|
{
|
||||||
result = Memory.audioram_Ptr[address];
|
result = Memory.audioram[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0x4000 && address <= 0x7fff)
|
else if (address >= 0x4000 && address <= 0x7fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x4000;
|
int offset = address - 0x4000;
|
||||||
result = Memory.audiorom_Ptr[basebanksnd + offset];
|
result = Memory.audiorom[basebanksnd + offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0x8000 && address <= 0xffff)
|
else if (address >= 0x8000 && address <= 0xffff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[address];
|
result = Memory.audiorom[address];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -160,16 +160,16 @@
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0x7ff)
|
if (address <= 0x7ff)
|
||||||
{
|
{
|
||||||
result = Memory.audioram_Ptr[address];
|
result = Memory.audioram[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0x4000 && address <= 0x7fff)
|
else if (address >= 0x4000 && address <= 0x7fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x4000;
|
int offset = address - 0x4000;
|
||||||
result = Memory.audiorom_Ptr[basebanksnd + offset];
|
result = Memory.audiorom[basebanksnd + offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0x8000 && address <= 0xffff)
|
else if (address >= 0x8000 && address <= 0xffff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[address];
|
result = Memory.audiorom[address];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -178,7 +178,7 @@
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0x7ff)
|
if (address <= 0x7ff)
|
||||||
{
|
{
|
||||||
result = Memory.audioram_Ptr[address];
|
result = Memory.audioram[address];
|
||||||
}
|
}
|
||||||
else if (address == 0x3000)
|
else if (address == 0x3000)
|
||||||
{
|
{
|
||||||
@ -191,11 +191,11 @@
|
|||||||
else if (address >= 0x4000 && address <= 0x7fff)
|
else if (address >= 0x4000 && address <= 0x7fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x4000;
|
int offset = address - 0x4000;
|
||||||
result = Memory.audiorom_Ptr[basebanksnd + offset];
|
result = Memory.audiorom[basebanksnd + offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0x8000 && address <= 0xffff)
|
else if (address >= 0x8000 && address <= 0xffff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[address];
|
result = Memory.audiorom[address];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -203,7 +203,7 @@
|
|||||||
{
|
{
|
||||||
if (address <= 0x7ff)
|
if (address <= 0x7ff)
|
||||||
{
|
{
|
||||||
Memory.audioram_Ptr[address] = data;
|
Memory.audioram[address] = data;
|
||||||
}
|
}
|
||||||
else if (address == 0x0800)
|
else if (address == 0x0800)
|
||||||
{
|
{
|
||||||
@ -231,7 +231,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x4000 && address <= 0xffff)
|
else if (address >= 0x4000 && address <= 0xffff)
|
||||||
{
|
{
|
||||||
Memory.audiorom_Ptr[address] = data;
|
Memory.audiorom[address] = data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,10 +18,10 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
writer.Write(Palette.entry_color[i]);
|
writer.Write(Palette.entry_color[i]);
|
||||||
}
|
}
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x800);
|
writer.Write(Memory.mainram, 0, 0x800);
|
||||||
writer.Write(Generic.videoram, 0, 0x800);
|
writer.Write(Generic.videoram, 0, 0x800);
|
||||||
writer.Write(Generic.spriteram, 0, 0x200);
|
writer.Write(Generic.spriteram, 0, 0x200);
|
||||||
writer.Write(Memory.audioram_Ptr, 0, 0x800);
|
writer.Write(Memory.audioram, 0, 0x800);
|
||||||
M6502.mm1[0].SaveStateBinary(writer);
|
M6502.mm1[0].SaveStateBinary(writer);
|
||||||
M6502.mm1[1].SaveStateBinary(writer);
|
M6502.mm1[1].SaveStateBinary(writer);
|
||||||
Cpuint.SaveStateBinary(writer);
|
Cpuint.SaveStateBinary(writer);
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0 && address <= 0x7ffff)
|
else if (address >= 0 && address <= 0x7ffff)
|
||||||
{
|
{
|
||||||
result = (sbyte)Memory.mainrom_Ptr[address];
|
result = (sbyte)Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -44,7 +44,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0 && address <= 0x7ffff)
|
else if (address >= 0 && address <= 0x7ffff)
|
||||||
{
|
{
|
||||||
result = (sbyte)Memory.mainrom_Ptr[address];
|
result = (sbyte)Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0x100000 && address <= 0x103fff)
|
else if (address >= 0x100000 && address <= 0x103fff)
|
||||||
{
|
{
|
||||||
@ -117,7 +117,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0 && address + 1 <= 0x7ffff)
|
else if (address >= 0 && address + 1 <= 0x7ffff)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -131,7 +131,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0 && address + 1 <= 0x7ffff)
|
else if (address >= 0 && address + 1 <= 0x7ffff)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else if (address >= 0x100000 && address + 1 <= 0x103fff)
|
else if (address >= 0x100000 && address + 1 <= 0x103fff)
|
||||||
{
|
{
|
||||||
@ -179,7 +179,7 @@
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address >= 0 && address + 3 <= 0x7ffff)
|
if (address >= 0 && address + 3 <= 0x7ffff)
|
||||||
{
|
{
|
||||||
result = Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3];
|
result = Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -189,7 +189,7 @@
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address >= 0 && address + 3 <= 0x7ffff)
|
if (address >= 0 && address + 3 <= 0x7ffff)
|
||||||
{
|
{
|
||||||
result = Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3];
|
result = Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3];
|
||||||
}
|
}
|
||||||
else if (address >= 0x100000 && address + 3 <= 0x103fff)
|
else if (address >= 0x100000 && address + 3 <= 0x103fff)
|
||||||
{
|
{
|
||||||
|
@ -352,7 +352,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x000000 && address <= 0x07ffff)
|
else if (address >= 0x000000 && address <= 0x07ffff)
|
||||||
{
|
{
|
||||||
result = (sbyte)Memory.mainrom_Ptr[address];
|
result = (sbyte)Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0x100000 && address <= 0x103fff)
|
else if (address >= 0x100000 && address <= 0x103fff)
|
||||||
{
|
{
|
||||||
@ -436,7 +436,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0 && address + 1 <= 0x7ffff)
|
else if (address >= 0 && address + 1 <= 0x7ffff)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -454,7 +454,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x000000 && address + 1 <= 0x07ffff)
|
else if (address >= 0x000000 && address + 1 <= 0x07ffff)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else if (address >= 0x100000 && address + 1 <= 0x103fff)
|
else if (address >= 0x100000 && address + 1 <= 0x103fff)
|
||||||
{
|
{
|
||||||
@ -496,7 +496,7 @@
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address >= 0x000000 && address + 3 <= 0x07ffff)
|
if (address >= 0x000000 && address + 3 <= 0x07ffff)
|
||||||
{
|
{
|
||||||
result = Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3];
|
result = Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3];
|
||||||
}
|
}
|
||||||
else if (address >= 0x100000 && address + 3 <= 0x103fff)
|
else if (address >= 0x100000 && address + 3 <= 0x103fff)
|
||||||
{
|
{
|
||||||
@ -790,7 +790,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x000000 && address + 1 <= 0x07ffff)
|
else if (address >= 0x000000 && address + 1 <= 0x07ffff)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else if (address >= 0x100000 && address + 1 <= 0x103fff)
|
else if (address >= 0x100000 && address + 1 <= 0x103fff)
|
||||||
{
|
{
|
||||||
@ -840,7 +840,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x000000 && address + 1 <= 0x07ffff)
|
else if (address >= 0x000000 && address + 1 <= 0x07ffff)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else if (address >= 0x100000 && address + 1 <= 0x103fff)
|
else if (address >= 0x100000 && address + 1 <= 0x103fff)
|
||||||
{
|
{
|
||||||
@ -900,9 +900,9 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x000000 && address <= 0x07ffff)
|
else if (address >= 0x000000 && address <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)(Memory.mainrom_Ptr[address]);
|
result = (sbyte)(Memory.mainrom[address]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -935,9 +935,9 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x000000 && address <= 0x07ffff)
|
else if (address >= 0x000000 && address <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)(Memory.mainrom_Ptr[address]);
|
result = (sbyte)(Memory.mainrom[address]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1023,9 +1023,9 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x000000 && address + 1 <= 0x07ffff)
|
else if (address >= 0x000000 && address + 1 <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1048,9 +1048,9 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x000000 && address + 1 <= 0x07ffff)
|
else if (address >= 0x000000 && address + 1 <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1101,9 +1101,9 @@
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address >= 0x000000 && address + 3 <= 0x07ffff)
|
if (address >= 0x000000 && address + 3 <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1118,9 +1118,9 @@
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address >= 0x000000 && address + 3 <= 0x07ffff)
|
if (address >= 0x000000 && address + 3 <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1435,9 +1435,9 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x000000 && address <= 0x07ffff)
|
else if (address >= 0x000000 && address <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)(Memory.mainrom_Ptr[address]);
|
result = (sbyte)(Memory.mainrom[address]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1474,9 +1474,9 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x000000 && address <= 0x07ffff)
|
else if (address >= 0x000000 && address <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)(Memory.mainrom_Ptr[address]);
|
result = (sbyte)(Memory.mainrom[address]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1486,7 +1486,7 @@
|
|||||||
else if (address >= 0x100000 && address <= 0x103fff)
|
else if (address >= 0x100000 && address <= 0x103fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
result = (sbyte)Memory.mainram_Ptr[offset];
|
result = (sbyte)Memory.mainram[offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0x1f0000 && address <= 0x1f3fff)
|
else if (address >= 0x1f0000 && address <= 0x1f3fff)
|
||||||
{
|
{
|
||||||
@ -1553,9 +1553,9 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x000000 && address + 1 <= 0x07ffff)
|
else if (address >= 0x000000 && address + 1 <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1578,9 +1578,9 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x000000 && address + 1 <= 0x07ffff)
|
else if (address >= 0x000000 && address + 1 <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1590,7 +1590,7 @@
|
|||||||
else if (address >= 0x100000 && address + 1 <= 0x103fff)
|
else if (address >= 0x100000 && address + 1 <= 0x103fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
result = (short)(Memory.mainram_Ptr[offset] * 0x100 + Memory.mainram_Ptr[offset + 1]);
|
result = (short)(Memory.mainram[offset] * 0x100 + Memory.mainram[offset + 1]);
|
||||||
}
|
}
|
||||||
else if (address >= 0x1f0000 && address + 1 <= 0x1f3fff)
|
else if (address >= 0x1f0000 && address + 1 <= 0x1f3fff)
|
||||||
{
|
{
|
||||||
@ -1632,9 +1632,9 @@
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address <= 0x010001)
|
if (address <= 0x010001)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1644,7 +1644,7 @@
|
|||||||
else if (address >= 0x100000 && address + 3 <= 0x103fff)
|
else if (address >= 0x100000 && address + 3 <= 0x103fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
result = (int)(Memory.mainram_Ptr[offset] * 0x1000000 + Memory.mainram_Ptr[offset + 1] * 0x10000 + Memory.mainram_Ptr[offset + 2] * 0x100 + Memory.mainram_Ptr[offset + 3]);
|
result = (int)(Memory.mainram[offset] * 0x1000000 + Memory.mainram[offset + 1] * 0x10000 + Memory.mainram[offset + 2] * 0x100 + Memory.mainram[offset + 3]);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -1654,10 +1654,10 @@
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address >= 0x000000 && address + 3 <= 0x07ffff)
|
if (address >= 0x000000 && address + 3 <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
int offset = (address - 0x010000) / 2;
|
int offset = (address - 0x010000) / 2;
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1667,7 +1667,7 @@
|
|||||||
else if (address >= 0x100000 && address + 3 <= 0x103fff)
|
else if (address >= 0x100000 && address + 3 <= 0x103fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
result = (int)(Memory.mainram_Ptr[offset] * 0x1000000 + Memory.mainram_Ptr[offset + 1] * 0x10000 + Memory.mainram_Ptr[offset + 2] * 0x100 + Memory.mainram_Ptr[offset + 3]);
|
result = (int)(Memory.mainram[offset] * 0x1000000 + Memory.mainram[offset + 1] * 0x10000 + Memory.mainram[offset + 2] * 0x100 + Memory.mainram[offset + 3]);
|
||||||
}
|
}
|
||||||
else if (address >= 0x1f0000 && address + 3 <= 0x1f3fff)
|
else if (address >= 0x1f0000 && address + 3 <= 0x1f3fff)
|
||||||
{
|
{
|
||||||
@ -1718,7 +1718,7 @@
|
|||||||
else if (address >= 0x100000 && address <= 0x103fff)
|
else if (address >= 0x100000 && address <= 0x103fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)(value);
|
Memory.mainram[offset] = (byte)(value);
|
||||||
}
|
}
|
||||||
else if (address >= 0x1f0000 && address <= 0x1f3fff)
|
else if (address >= 0x1f0000 && address <= 0x1f3fff)
|
||||||
{
|
{
|
||||||
@ -1841,8 +1841,8 @@
|
|||||||
else if (address >= 0x100000 && address + 1 <= 0x103fff)
|
else if (address >= 0x100000 && address + 1 <= 0x103fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)(value >> 8);
|
Memory.mainram[offset] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[offset + 1] = (byte)value;
|
Memory.mainram[offset + 1] = (byte)value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x1f0000 && address + 1 <= 0x1f3fff)
|
else if (address >= 0x1f0000 && address + 1 <= 0x1f3fff)
|
||||||
{
|
{
|
||||||
@ -1929,10 +1929,10 @@
|
|||||||
if (address >= 0x100000 && address + 3 <= 0x103fff)
|
if (address >= 0x100000 && address + 3 <= 0x103fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)(value >> 24);
|
Memory.mainram[offset] = (byte)(value >> 24);
|
||||||
Memory.mainram_Ptr[offset + 1] = (byte)(value >> 16);
|
Memory.mainram[offset + 1] = (byte)(value >> 16);
|
||||||
Memory.mainram_Ptr[offset + 2] = (byte)(value >> 8);
|
Memory.mainram[offset + 2] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[offset + 3] = (byte)value;
|
Memory.mainram[offset + 3] = (byte)value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x1f0000 && address + 3 <= 0x1f3fff)
|
else if (address >= 0x1f0000 && address + 3 <= 0x1f3fff)
|
||||||
{
|
{
|
||||||
@ -1978,9 +1978,9 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x000000 && address <= 0x07ffff)
|
else if (address >= 0x000000 && address <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)(Memory.mainrom_Ptr[address]);
|
result = (sbyte)(Memory.mainrom[address]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2021,9 +2021,9 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x000000 && address <= 0x07ffff)
|
else if (address >= 0x000000 && address <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)(Memory.mainrom_Ptr[address]);
|
result = (sbyte)(Memory.mainrom[address]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2105,9 +2105,9 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x000000 && address + 1 <= 0x07ffff)
|
else if (address >= 0x000000 && address + 1 <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2130,9 +2130,9 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x000000 && address + 1 <= 0x07ffff)
|
else if (address >= 0x000000 && address + 1 <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2187,9 +2187,9 @@
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address >= 0x000000 && address + 3 <= 0x07ffff)
|
if (address >= 0x000000 && address + 3 <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2204,10 +2204,10 @@
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address >= 0x000000 && address + 3 <= 0x07ffff)
|
if (address >= 0x000000 && address + 3 <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
int offset = (address - 0x000000) / 2;
|
int offset = (address - 0x000000) / 2;
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2501,9 +2501,9 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x000000 && address <= 0x07ffff)
|
else if (address >= 0x000000 && address <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)(Memory.mainrom_Ptr[address]);
|
result = (sbyte)(Memory.mainrom[address]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2562,9 +2562,9 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x000000 && address <= 0x07ffff)
|
else if (address >= 0x000000 && address <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)(Memory.mainrom_Ptr[address]);
|
result = (sbyte)(Memory.mainrom[address]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2682,9 +2682,9 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x000000 && address + 1 <= 0x07ffff)
|
else if (address >= 0x000000 && address + 1 <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2723,9 +2723,9 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x000000 && address + 1 <= 0x07ffff)
|
else if (address >= 0x000000 && address + 1 <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2799,9 +2799,9 @@
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address >= 0x000000 && address + 3 <= 0x07ffff)
|
if (address >= 0x000000 && address + 3 <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2816,10 +2816,10 @@
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address >= 0x000000 && address + 3 <= 0x07ffff)
|
if (address >= 0x000000 && address + 3 <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
int offset = (address - 0x000000) / 2;
|
int offset = (address - 0x000000) / 2;
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -3265,9 +3265,9 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x000000 && address <= 0x07ffff)
|
else if (address >= 0x000000 && address <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)(Memory.mainrom_Ptr[address]);
|
result = (sbyte)(Memory.mainrom[address]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -3297,9 +3297,9 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x000000 && address <= 0x07ffff)
|
else if (address >= 0x000000 && address <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)(Memory.mainrom_Ptr[address]);
|
result = (sbyte)(Memory.mainrom[address]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -3381,9 +3381,9 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x000000 && address + 1 <= 0x07ffff)
|
else if (address >= 0x000000 && address + 1 <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -3406,9 +3406,9 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x000000 && address + 1 <= 0x07ffff)
|
else if (address >= 0x000000 && address + 1 <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -3459,9 +3459,9 @@
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address >= 0x000000 && address + 3 <= 0x07ffff)
|
if (address >= 0x000000 && address + 3 <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -3476,10 +3476,10 @@
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address >= 0x000000 && address + 3 <= 0x07ffff)
|
if (address >= 0x000000 && address + 3 <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
int offset = (address - 0x023000) / 2;
|
int offset = (address - 0x023000) / 2;
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -925,12 +925,12 @@ namespace MAME.Core
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (addr <= 0x07ffff)
|
if (addr <= 0x07ffff)
|
||||||
{
|
{
|
||||||
result = Memory.mainrom_Ptr[addr];
|
result = Memory.mainrom[addr];
|
||||||
}
|
}
|
||||||
else if (addr >= 0x104000 && addr <= 0x107fff)
|
else if (addr >= 0x104000 && addr <= 0x107fff)
|
||||||
{
|
{
|
||||||
int offset = addr - 0x104000;
|
int offset = addr - 0x104000;
|
||||||
result = Memory.mainram_Ptr[offset];
|
result = Memory.mainram[offset];
|
||||||
}
|
}
|
||||||
else if (addr >= 0x180000 && addr <= 0x183fff)
|
else if (addr >= 0x180000 && addr <= 0x183fff)
|
||||||
{
|
{
|
||||||
@ -952,12 +952,12 @@ namespace MAME.Core
|
|||||||
addr *= 2;
|
addr *= 2;
|
||||||
if (addr <= 0x07ffff)
|
if (addr <= 0x07ffff)
|
||||||
{
|
{
|
||||||
result = (ushort)(Memory.mainrom_Ptr[addr] * 0x100 + Memory.mainrom_Ptr[addr + 1]);
|
result = (ushort)(Memory.mainrom[addr] * 0x100 + Memory.mainrom[addr + 1]);
|
||||||
}
|
}
|
||||||
else if (addr >= 0x104000 && addr <= 0x107fff)
|
else if (addr >= 0x104000 && addr <= 0x107fff)
|
||||||
{
|
{
|
||||||
int offset = addr - 0x104000;
|
int offset = addr - 0x104000;
|
||||||
result = (ushort)(Memory.mainram_Ptr[offset] * 0x100 + Memory.mainram_Ptr[offset + 1]);
|
result = (ushort)(Memory.mainram[offset] * 0x100 + Memory.mainram[offset + 1]);
|
||||||
}
|
}
|
||||||
else if (addr >= 0x180000 && addr <= 0x183fff)
|
else if (addr >= 0x180000 && addr <= 0x183fff)
|
||||||
{
|
{
|
||||||
@ -987,8 +987,8 @@ namespace MAME.Core
|
|||||||
else if (addr >= 0x104000 && addr <= 0x107fff)
|
else if (addr >= 0x104000 && addr <= 0x107fff)
|
||||||
{
|
{
|
||||||
int offset = (addr - 0x104000) / 2;
|
int offset = (addr - 0x104000) / 2;
|
||||||
Memory.mainram_Ptr[offset] = (byte)(data >> 8);
|
Memory.mainram[offset] = (byte)(data >> 8);
|
||||||
Memory.mainram_Ptr[offset + 1] = (byte)data;
|
Memory.mainram[offset + 1] = (byte)data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static void tmnt2_1c0800_w(int offset, ushort data)
|
public static void tmnt2_1c0800_w(int offset, ushort data)
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -8,9 +8,9 @@
|
|||||||
sbyte result = 0;
|
sbyte result = 0;
|
||||||
if (address <= 0x07ffff)
|
if (address <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)(Memory.mainrom_Ptr[address]);
|
result = (sbyte)(Memory.mainrom[address]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -20,7 +20,7 @@
|
|||||||
else if (address >= 0x204000 && address <= 0x207fff)
|
else if (address >= 0x204000 && address <= 0x207fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x204000;
|
int offset = address - 0x204000;
|
||||||
result = (sbyte)Memory.mainram_Ptr[offset];
|
result = (sbyte)Memory.mainram[offset];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -30,9 +30,9 @@
|
|||||||
sbyte result = 0;
|
sbyte result = 0;
|
||||||
if (address <= 0x07ffff)
|
if (address <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)(Memory.mainrom_Ptr[address]);
|
result = (sbyte)(Memory.mainrom[address]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -54,7 +54,7 @@
|
|||||||
else if (address >= 0x204000 && address <= 0x207fff)
|
else if (address >= 0x204000 && address <= 0x207fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x204000;
|
int offset = address - 0x204000;
|
||||||
result = (sbyte)Memory.mainram_Ptr[offset];
|
result = (sbyte)Memory.mainram[offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0x300000 && address <= 0x303fff)
|
else if (address >= 0x300000 && address <= 0x303fff)
|
||||||
{
|
{
|
||||||
@ -170,9 +170,9 @@
|
|||||||
short result = 0;
|
short result = 0;
|
||||||
if (address <= 0x07ffff)
|
if (address <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -182,7 +182,7 @@
|
|||||||
else if (address >= 0x204000 && address + 1 <= 0x207fff)
|
else if (address >= 0x204000 && address + 1 <= 0x207fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x204000;
|
int offset = address - 0x204000;
|
||||||
result = (short)(Memory.mainram_Ptr[offset] * 0x100 + Memory.mainram_Ptr[offset + 1]);
|
result = (short)(Memory.mainram[offset] * 0x100 + Memory.mainram[offset + 1]);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -192,9 +192,9 @@
|
|||||||
short result = 0;
|
short result = 0;
|
||||||
if (address <= 0x07ffff)
|
if (address <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -209,7 +209,7 @@
|
|||||||
else if (address >= 0x204000 && address + 1 <= 0x207fff)
|
else if (address >= 0x204000 && address + 1 <= 0x207fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x204000;
|
int offset = address - 0x204000;
|
||||||
result = (short)(Memory.mainram_Ptr[offset] * 0x100 + Memory.mainram_Ptr[offset + 1]);
|
result = (short)(Memory.mainram[offset] * 0x100 + Memory.mainram[offset + 1]);
|
||||||
}
|
}
|
||||||
else if (address >= 0x300000 && address + 1 <= 0x303fff)
|
else if (address >= 0x300000 && address + 1 <= 0x303fff)
|
||||||
{
|
{
|
||||||
@ -264,9 +264,9 @@
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address <= 0x07ffff)
|
if (address <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -276,7 +276,7 @@
|
|||||||
else if (address >= 0x204000 && address + 3 <= 0x207fff)
|
else if (address >= 0x204000 && address + 3 <= 0x207fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x204000;
|
int offset = address - 0x204000;
|
||||||
result = (int)(Memory.mainram_Ptr[offset] * 0x1000000 + Memory.mainram_Ptr[offset + 1] * 0x10000 + Memory.mainram_Ptr[offset + 2] * 0x100 + Memory.mainram_Ptr[offset + 3]);
|
result = (int)(Memory.mainram[offset] * 0x1000000 + Memory.mainram[offset + 1] * 0x10000 + Memory.mainram[offset + 2] * 0x100 + Memory.mainram[offset + 3]);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -286,10 +286,10 @@
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address <= 0x07ffff)
|
if (address <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
int offset = (address - 0x000000) / 2;
|
int offset = (address - 0x000000) / 2;
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -304,7 +304,7 @@
|
|||||||
else if (address >= 0x204000 && address + 3 <= 0x207fff)
|
else if (address >= 0x204000 && address + 3 <= 0x207fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x204000;
|
int offset = address - 0x204000;
|
||||||
result = (int)(Memory.mainram_Ptr[offset] * 0x1000000 + Memory.mainram_Ptr[offset + 1] * 0x10000 + Memory.mainram_Ptr[offset + 2] * 0x100 + Memory.mainram_Ptr[offset + 3]);
|
result = (int)(Memory.mainram[offset] * 0x1000000 + Memory.mainram[offset + 1] * 0x10000 + Memory.mainram[offset + 2] * 0x100 + Memory.mainram[offset + 3]);
|
||||||
}
|
}
|
||||||
else if (address >= 0x300000 && address + 3 <= 0x303fff)
|
else if (address >= 0x300000 && address + 3 <= 0x303fff)
|
||||||
{
|
{
|
||||||
@ -356,7 +356,7 @@
|
|||||||
else if (address >= 0x204000 && address <= 0x207fff)
|
else if (address >= 0x204000 && address <= 0x207fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x204000;
|
int offset = address - 0x204000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)value;
|
Memory.mainram[offset] = (byte)value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x300000 && address <= 0x303fff)
|
else if (address >= 0x300000 && address <= 0x303fff)
|
||||||
{
|
{
|
||||||
@ -472,8 +472,8 @@
|
|||||||
else if (address >= 0x204000 && address + 1 <= 0x207fff)
|
else if (address >= 0x204000 && address + 1 <= 0x207fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x204000;
|
int offset = address - 0x204000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)(value >> 8);
|
Memory.mainram[offset] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[offset + 1] = (byte)value;
|
Memory.mainram[offset + 1] = (byte)value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x300000 && address + 1 <= 0x303fff)
|
else if (address >= 0x300000 && address + 1 <= 0x303fff)
|
||||||
{
|
{
|
||||||
@ -534,10 +534,10 @@
|
|||||||
else if (address >= 0x204000 && address + 3 <= 0x207fff)
|
else if (address >= 0x204000 && address + 3 <= 0x207fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x204000;
|
int offset = address - 0x204000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)(value >> 24);
|
Memory.mainram[offset] = (byte)(value >> 24);
|
||||||
Memory.mainram_Ptr[offset + 1] = (byte)(value >> 16);
|
Memory.mainram[offset + 1] = (byte)(value >> 16);
|
||||||
Memory.mainram_Ptr[offset + 2] = (byte)(value >> 8);
|
Memory.mainram[offset + 2] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[offset + 3] = (byte)value;
|
Memory.mainram[offset + 3] = (byte)value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x300000 && address + 3 <= 0x303fff)
|
else if (address >= 0x300000 && address + 3 <= 0x303fff)
|
||||||
{
|
{
|
||||||
@ -576,9 +576,9 @@
|
|||||||
sbyte result = 0;
|
sbyte result = 0;
|
||||||
if (address <= 0x03ffff)
|
if (address <= 0x03ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)(Memory.mainrom_Ptr[address]);
|
result = (sbyte)(Memory.mainrom[address]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -588,7 +588,7 @@
|
|||||||
else if (address >= 0x100000 && address <= 0x103fff)
|
else if (address >= 0x100000 && address <= 0x103fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
result = (sbyte)Memory.mainram_Ptr[offset];
|
result = (sbyte)Memory.mainram[offset];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -598,9 +598,9 @@
|
|||||||
sbyte result = 0;
|
sbyte result = 0;
|
||||||
if (address <= 0x03ffff)
|
if (address <= 0x03ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)(Memory.mainrom_Ptr[address]);
|
result = (sbyte)(Memory.mainrom[address]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -610,7 +610,7 @@
|
|||||||
else if (address >= 0x100000 && address <= 0x103fff)
|
else if (address >= 0x100000 && address <= 0x103fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
result = (sbyte)Memory.mainram_Ptr[offset];
|
result = (sbyte)Memory.mainram[offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0x104000 && address <= 0x107fff)
|
else if (address >= 0x104000 && address <= 0x107fff)
|
||||||
{
|
{
|
||||||
@ -760,9 +760,9 @@
|
|||||||
short result = 0;
|
short result = 0;
|
||||||
if (address <= 0x03ffff)
|
if (address <= 0x03ffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -772,7 +772,7 @@
|
|||||||
else if (address >= 0x100000 && address + 1 <= 0x103fff)
|
else if (address >= 0x100000 && address + 1 <= 0x103fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
result = (short)(Memory.mainram_Ptr[offset] * 0x100 + Memory.mainram_Ptr[offset + 1]);
|
result = (short)(Memory.mainram[offset] * 0x100 + Memory.mainram[offset + 1]);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -782,9 +782,9 @@
|
|||||||
short result = 0;
|
short result = 0;
|
||||||
if (address <= 0x03ffff)
|
if (address <= 0x03ffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -794,7 +794,7 @@
|
|||||||
else if (address >= 0x100000 && address + 1 <= 0x103fff)
|
else if (address >= 0x100000 && address + 1 <= 0x103fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
result = (short)(Memory.mainram_Ptr[offset] * 0x100 + Memory.mainram_Ptr[offset + 1]);
|
result = (short)(Memory.mainram[offset] * 0x100 + Memory.mainram[offset + 1]);
|
||||||
}
|
}
|
||||||
else if (address >= 0x104000 && address + 1 <= 0x107fff)
|
else if (address >= 0x104000 && address + 1 <= 0x107fff)
|
||||||
{
|
{
|
||||||
@ -864,9 +864,9 @@
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address <= 0x03ffff)
|
if (address <= 0x03ffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -876,7 +876,7 @@
|
|||||||
else if (address >= 0x100000 && address + 3 <= 0x103fff)
|
else if (address >= 0x100000 && address + 3 <= 0x103fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
result = (int)(Memory.mainram_Ptr[offset] * 0x1000000 + Memory.mainram_Ptr[offset + 1] * 0x10000 + Memory.mainram_Ptr[offset + 2] * 0x100 + Memory.mainram_Ptr[offset + 3]);
|
result = (int)(Memory.mainram[offset] * 0x1000000 + Memory.mainram[offset + 1] * 0x10000 + Memory.mainram[offset + 2] * 0x100 + Memory.mainram[offset + 3]);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -886,10 +886,10 @@
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address <= 0x03ffff)
|
if (address <= 0x03ffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
int offset = (address - 0x000000) / 2;
|
int offset = (address - 0x000000) / 2;
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -899,7 +899,7 @@
|
|||||||
else if (address >= 0x100000 && address + 3 <= 0x103fff)
|
else if (address >= 0x100000 && address + 3 <= 0x103fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
result = (int)(Memory.mainram_Ptr[offset] * 0x1000000 + Memory.mainram_Ptr[offset + 1] * 0x10000 + Memory.mainram_Ptr[offset + 2] * 0x100 + Memory.mainram_Ptr[offset + 3]);
|
result = (int)(Memory.mainram[offset] * 0x1000000 + Memory.mainram[offset + 1] * 0x10000 + Memory.mainram[offset + 2] * 0x100 + Memory.mainram[offset + 3]);
|
||||||
}
|
}
|
||||||
else if (address >= 0x104000 && address + 3 <= 0x107fff)
|
else if (address >= 0x104000 && address + 3 <= 0x107fff)
|
||||||
{
|
{
|
||||||
@ -944,7 +944,7 @@
|
|||||||
if (address >= 0x100000 && address <= 0x103fff)
|
if (address >= 0x100000 && address <= 0x103fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)(value);
|
Memory.mainram[offset] = (byte)(value);
|
||||||
}
|
}
|
||||||
else if (address >= 0x104000 && address <= 0x107fff)
|
else if (address >= 0x104000 && address <= 0x107fff)
|
||||||
{
|
{
|
||||||
@ -1077,8 +1077,8 @@
|
|||||||
if (address >= 0x100000 && address + 1 <= 0x103fff)
|
if (address >= 0x100000 && address + 1 <= 0x103fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)(value >> 8);
|
Memory.mainram[offset] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[offset + 1] = (byte)value;
|
Memory.mainram[offset + 1] = (byte)value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x104000 && address + 1 <= 0x107fff)
|
else if (address >= 0x104000 && address + 1 <= 0x107fff)
|
||||||
{
|
{
|
||||||
@ -1141,10 +1141,10 @@
|
|||||||
if (address >= 0x100000 && address + 3 <= 0x103fff)
|
if (address >= 0x100000 && address + 3 <= 0x103fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)(value >> 24);
|
Memory.mainram[offset] = (byte)(value >> 24);
|
||||||
Memory.mainram_Ptr[offset + 1] = (byte)(value >> 16);
|
Memory.mainram[offset + 1] = (byte)(value >> 16);
|
||||||
Memory.mainram_Ptr[offset + 2] = (byte)(value >> 8);
|
Memory.mainram[offset + 2] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[offset + 3] = (byte)value;
|
Memory.mainram[offset + 3] = (byte)value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x104000 && address + 3 <= 0x107fff)
|
else if (address >= 0x104000 && address + 3 <= 0x107fff)
|
||||||
{
|
{
|
||||||
@ -1207,9 +1207,9 @@
|
|||||||
sbyte result = 0;
|
sbyte result = 0;
|
||||||
if (address <= 0x0fffff)
|
if (address <= 0x0fffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)(Memory.mainrom_Ptr[address]);
|
result = (sbyte)(Memory.mainrom[address]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1219,7 +1219,7 @@
|
|||||||
else if (address >= 0x104000 && address <= 0x107fff)
|
else if (address >= 0x104000 && address <= 0x107fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x104000;
|
int offset = address - 0x104000;
|
||||||
result = (sbyte)Memory.mainram_Ptr[offset];
|
result = (sbyte)Memory.mainram[offset];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -1229,9 +1229,9 @@
|
|||||||
sbyte result = 0;
|
sbyte result = 0;
|
||||||
if (address <= 0x0fffff)
|
if (address <= 0x0fffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)(Memory.mainrom_Ptr[address]);
|
result = (sbyte)(Memory.mainrom[address]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1241,7 +1241,7 @@
|
|||||||
else if (address >= 0x104000 && address <= 0x107fff)
|
else if (address >= 0x104000 && address <= 0x107fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x104000;
|
int offset = address - 0x104000;
|
||||||
result = (sbyte)Memory.mainram_Ptr[offset];
|
result = (sbyte)Memory.mainram[offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0x140000 && address <= 0x140fff)
|
else if (address >= 0x140000 && address <= 0x140fff)
|
||||||
{
|
{
|
||||||
@ -1386,9 +1386,9 @@
|
|||||||
short result = 0;
|
short result = 0;
|
||||||
if (address <= 0x0fffff)
|
if (address <= 0x0fffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1398,7 +1398,7 @@
|
|||||||
else if (address >= 0x104000 && address + 1 <= 0x107fff)
|
else if (address >= 0x104000 && address + 1 <= 0x107fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x104000;
|
int offset = address - 0x104000;
|
||||||
result = (short)(Memory.mainram_Ptr[offset] * 0x100 + Memory.mainram_Ptr[offset + 1]);
|
result = (short)(Memory.mainram[offset] * 0x100 + Memory.mainram[offset + 1]);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -1408,9 +1408,9 @@
|
|||||||
short result = 0;
|
short result = 0;
|
||||||
if (address <= 0x0fffff)
|
if (address <= 0x0fffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1420,7 +1420,7 @@
|
|||||||
else if (address >= 0x104000 && address + 1 <= 0x107fff)
|
else if (address >= 0x104000 && address + 1 <= 0x107fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x104000;
|
int offset = address - 0x104000;
|
||||||
result = (short)(Memory.mainram_Ptr[offset] * 0x100 + Memory.mainram_Ptr[offset + 1]);
|
result = (short)(Memory.mainram[offset] * 0x100 + Memory.mainram[offset + 1]);
|
||||||
}
|
}
|
||||||
else if (address >= 0x140000 && address + 1 <= 0x140fff)
|
else if (address >= 0x140000 && address + 1 <= 0x140fff)
|
||||||
{
|
{
|
||||||
@ -1494,9 +1494,9 @@
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address <= 0x0fffff)
|
if (address <= 0x0fffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1506,7 +1506,7 @@
|
|||||||
else if (address >= 0x104000 && address + 3 <= 0x107fff)
|
else if (address >= 0x104000 && address + 3 <= 0x107fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x104000;
|
int offset = address - 0x104000;
|
||||||
result = (int)(Memory.mainram_Ptr[offset] * 0x1000000 + Memory.mainram_Ptr[offset + 1] * 0x10000 + Memory.mainram_Ptr[offset + 2] * 0x100 + Memory.mainram_Ptr[offset + 3]);
|
result = (int)(Memory.mainram[offset] * 0x1000000 + Memory.mainram[offset + 1] * 0x10000 + Memory.mainram[offset + 2] * 0x100 + Memory.mainram[offset + 3]);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -1516,10 +1516,10 @@
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address <= 0x0fffff)
|
if (address <= 0x0fffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
int offset = (address - 0x000000) / 2;
|
int offset = (address - 0x000000) / 2;
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1529,7 +1529,7 @@
|
|||||||
else if (address >= 0x104000 && address + 3 <= 0x107fff)
|
else if (address >= 0x104000 && address + 3 <= 0x107fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x104000;
|
int offset = address - 0x104000;
|
||||||
result = (int)(Memory.mainram_Ptr[offset] * 0x1000000 + Memory.mainram_Ptr[offset + 1] * 0x10000 + Memory.mainram_Ptr[offset + 2] * 0x100 + Memory.mainram_Ptr[offset + 3]);
|
result = (int)(Memory.mainram[offset] * 0x1000000 + Memory.mainram[offset + 1] * 0x10000 + Memory.mainram[offset + 2] * 0x100 + Memory.mainram[offset + 3]);
|
||||||
}
|
}
|
||||||
else if (address >= 0x140000 && address + 3 <= 0x140fff)
|
else if (address >= 0x140000 && address + 3 <= 0x140fff)
|
||||||
{
|
{
|
||||||
@ -1569,7 +1569,7 @@
|
|||||||
if (address >= 0x104000 && address <= 0x107fff)
|
if (address >= 0x104000 && address <= 0x107fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x104000;
|
int offset = address - 0x104000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)(value);
|
Memory.mainram[offset] = (byte)(value);
|
||||||
}
|
}
|
||||||
else if (address >= 0x140000 && address <= 0x140fff)
|
else if (address >= 0x140000 && address <= 0x140fff)
|
||||||
{
|
{
|
||||||
@ -1699,8 +1699,8 @@
|
|||||||
if (address >= 0x104000 && address + 1 <= 0x107fff)
|
if (address >= 0x104000 && address + 1 <= 0x107fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x104000;
|
int offset = address - 0x104000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)(value >> 8);
|
Memory.mainram[offset] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[offset + 1] = (byte)value;
|
Memory.mainram[offset + 1] = (byte)value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x140000 && address + 1 <= 0x140fff)
|
else if (address >= 0x140000 && address + 1 <= 0x140fff)
|
||||||
{
|
{
|
||||||
@ -1768,10 +1768,10 @@
|
|||||||
if (address >= 0x104000 && address + 3 <= 0x107fff)
|
if (address >= 0x104000 && address + 3 <= 0x107fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x104000;
|
int offset = address - 0x104000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)(value >> 24);
|
Memory.mainram[offset] = (byte)(value >> 24);
|
||||||
Memory.mainram_Ptr[offset + 1] = (byte)(value >> 16);
|
Memory.mainram[offset + 1] = (byte)(value >> 16);
|
||||||
Memory.mainram_Ptr[offset + 2] = (byte)(value >> 8);
|
Memory.mainram[offset + 2] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[offset + 3] = (byte)value;
|
Memory.mainram[offset + 3] = (byte)value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x140000 && address + 3 <= 0x140fff)
|
else if (address >= 0x140000 && address + 3 <= 0x140fff)
|
||||||
{
|
{
|
||||||
@ -1824,9 +1824,9 @@
|
|||||||
sbyte result = 0;
|
sbyte result = 0;
|
||||||
if (address <= 0x03ffff)
|
if (address <= 0x03ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)(Memory.mainrom_Ptr[address]);
|
result = (sbyte)(Memory.mainrom[address]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1836,7 +1836,7 @@
|
|||||||
else if (address >= 0x100000 && address <= 0x103fff)
|
else if (address >= 0x100000 && address <= 0x103fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
result = (sbyte)Memory.mainram_Ptr[offset];
|
result = (sbyte)Memory.mainram[offset];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -1846,9 +1846,9 @@
|
|||||||
sbyte result = 0;
|
sbyte result = 0;
|
||||||
if (address <= 0x03ffff)
|
if (address <= 0x03ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)(Memory.mainrom_Ptr[address]);
|
result = (sbyte)(Memory.mainrom[address]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1858,7 +1858,7 @@
|
|||||||
else if (address >= 0x100000 && address <= 0x103fff)
|
else if (address >= 0x100000 && address <= 0x103fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
result = (sbyte)Memory.mainram_Ptr[offset];
|
result = (sbyte)Memory.mainram[offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0x200000 && address <= 0x200fff)
|
else if (address >= 0x200000 && address <= 0x200fff)
|
||||||
{
|
{
|
||||||
@ -1948,9 +1948,9 @@
|
|||||||
short result = 0;
|
short result = 0;
|
||||||
if (address <= 0x03ffff)
|
if (address <= 0x03ffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1960,7 +1960,7 @@
|
|||||||
else if (address >= 0x100000 && address + 1 <= 0x103fff)
|
else if (address >= 0x100000 && address + 1 <= 0x103fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
result = (short)(Memory.mainram_Ptr[offset] * 0x100 + Memory.mainram_Ptr[offset + 1]);
|
result = (short)(Memory.mainram[offset] * 0x100 + Memory.mainram[offset + 1]);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -1970,9 +1970,9 @@
|
|||||||
short result = 0;
|
short result = 0;
|
||||||
if (address <= 0x03ffff)
|
if (address <= 0x03ffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1982,7 +1982,7 @@
|
|||||||
else if (address >= 0x100000 && address + 1 <= 0x103fff)
|
else if (address >= 0x100000 && address + 1 <= 0x103fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
result = (short)(Memory.mainram_Ptr[offset] * 0x100 + Memory.mainram_Ptr[offset + 1]);
|
result = (short)(Memory.mainram[offset] * 0x100 + Memory.mainram[offset + 1]);
|
||||||
}
|
}
|
||||||
else if (address >= 0x200000 && address + 1 <= 0x200fff)
|
else if (address >= 0x200000 && address + 1 <= 0x200fff)
|
||||||
{
|
{
|
||||||
@ -2030,9 +2030,9 @@
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address <= 0x03ffff)
|
if (address <= 0x03ffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2042,7 +2042,7 @@
|
|||||||
else if (address >= 0x100000 && address + 3 <= 0x103fff)
|
else if (address >= 0x100000 && address + 3 <= 0x103fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
result = (int)(Memory.mainram_Ptr[offset] * 0x1000000 + Memory.mainram_Ptr[offset + 1] * 0x10000 + Memory.mainram_Ptr[offset + 2] * 0x100 + Memory.mainram_Ptr[offset + 3]);
|
result = (int)(Memory.mainram[offset] * 0x1000000 + Memory.mainram[offset + 1] * 0x10000 + Memory.mainram[offset + 2] * 0x100 + Memory.mainram[offset + 3]);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -2052,10 +2052,10 @@
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address <= 0x03ffff)
|
if (address <= 0x03ffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
int offset = (address - 0x000000) / 2;
|
int offset = (address - 0x000000) / 2;
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2065,7 +2065,7 @@
|
|||||||
else if (address >= 0x100000 && address + 3 <= 0x103fff)
|
else if (address >= 0x100000 && address + 3 <= 0x103fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
result = (int)(Memory.mainram_Ptr[offset] * 0x1000000 + Memory.mainram_Ptr[offset + 1] * 0x10000 + Memory.mainram_Ptr[offset + 2] * 0x100 + Memory.mainram_Ptr[offset + 3]);
|
result = (int)(Memory.mainram[offset] * 0x1000000 + Memory.mainram[offset + 1] * 0x10000 + Memory.mainram[offset + 2] * 0x100 + Memory.mainram[offset + 3]);
|
||||||
}
|
}
|
||||||
else if (address >= 0x200000 && address + 3 <= 0x200fff)
|
else if (address >= 0x200000 && address + 3 <= 0x200fff)
|
||||||
{
|
{
|
||||||
@ -2105,7 +2105,7 @@
|
|||||||
if (address >= 0x100000 && address <= 0x103fff)
|
if (address >= 0x100000 && address <= 0x103fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)(value);
|
Memory.mainram[offset] = (byte)(value);
|
||||||
}
|
}
|
||||||
else if (address >= 0x200000 && address <= 0x200fff)
|
else if (address >= 0x200000 && address <= 0x200fff)
|
||||||
{
|
{
|
||||||
@ -2199,8 +2199,8 @@
|
|||||||
if (address >= 0x100000 && address + 1 <= 0x103fff)
|
if (address >= 0x100000 && address + 1 <= 0x103fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)(value >> 8);
|
Memory.mainram[offset] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[offset + 1] = (byte)value;
|
Memory.mainram[offset + 1] = (byte)value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x200000 && address + 1 <= 0x200fff)
|
else if (address >= 0x200000 && address + 1 <= 0x200fff)
|
||||||
{
|
{
|
||||||
@ -2255,10 +2255,10 @@
|
|||||||
if (address >= 0x100000 && address + 3 <= 0x103fff)
|
if (address >= 0x100000 && address + 3 <= 0x103fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)(value >> 24);
|
Memory.mainram[offset] = (byte)(value >> 24);
|
||||||
Memory.mainram_Ptr[offset + 1] = (byte)(value >> 16);
|
Memory.mainram[offset + 1] = (byte)(value >> 16);
|
||||||
Memory.mainram_Ptr[offset + 2] = (byte)(value >> 8);
|
Memory.mainram[offset + 2] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[offset + 3] = (byte)value;
|
Memory.mainram[offset + 3] = (byte)value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x200000 && address + 3 <= 0x200fff)
|
else if (address >= 0x200000 && address + 3 <= 0x200fff)
|
||||||
{
|
{
|
||||||
@ -2307,9 +2307,9 @@
|
|||||||
sbyte result = 0;
|
sbyte result = 0;
|
||||||
if (address <= 0x07ffff)
|
if (address <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)(Memory.mainrom_Ptr[address]);
|
result = (sbyte)(Memory.mainrom[address]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2319,7 +2319,7 @@
|
|||||||
else if (address >= 0x100000 && address <= 0x103fff)
|
else if (address >= 0x100000 && address <= 0x103fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
result = (sbyte)Memory.mainram_Ptr[offset];
|
result = (sbyte)Memory.mainram[offset];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -2329,9 +2329,9 @@
|
|||||||
sbyte result = 0;
|
sbyte result = 0;
|
||||||
if (address <= 0x07ffff)
|
if (address <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)(Memory.mainrom_Ptr[address]);
|
result = (sbyte)(Memory.mainrom[address]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2341,7 +2341,7 @@
|
|||||||
else if (address >= 0x100000 && address <= 0x103fff)
|
else if (address >= 0x100000 && address <= 0x103fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
result = (sbyte)Memory.mainram_Ptr[offset];
|
result = (sbyte)Memory.mainram[offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0x104000 && address <= 0x107fff)
|
else if (address >= 0x104000 && address <= 0x107fff)
|
||||||
{
|
{
|
||||||
@ -2456,9 +2456,9 @@
|
|||||||
short result = 0;
|
short result = 0;
|
||||||
if (address <= 0x07ffff)
|
if (address <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2468,7 +2468,7 @@
|
|||||||
else if (address >= 0x100000 && address + 1 <= 0x103fff)
|
else if (address >= 0x100000 && address + 1 <= 0x103fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
result = (short)(Memory.mainram_Ptr[offset] * 0x100 + Memory.mainram_Ptr[offset + 1]);
|
result = (short)(Memory.mainram[offset] * 0x100 + Memory.mainram[offset + 1]);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -2478,9 +2478,9 @@
|
|||||||
short result = 0;
|
short result = 0;
|
||||||
if (address <= 0x07ffff)
|
if (address <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2490,7 +2490,7 @@
|
|||||||
else if (address >= 0x100000 && address + 1 <= 0x103fff)
|
else if (address >= 0x100000 && address + 1 <= 0x103fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
result = (short)(Memory.mainram_Ptr[offset] * 0x100 + Memory.mainram_Ptr[offset + 1]);
|
result = (short)(Memory.mainram[offset] * 0x100 + Memory.mainram[offset + 1]);
|
||||||
}
|
}
|
||||||
else if (address >= 0x104000 && address + 1 <= 0x107fff)
|
else if (address >= 0x104000 && address + 1 <= 0x107fff)
|
||||||
{
|
{
|
||||||
@ -2545,9 +2545,9 @@
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address <= 0x07ffff)
|
if (address <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2557,7 +2557,7 @@
|
|||||||
else if (address >= 0x100000 && address + 3 <= 0x103fff)
|
else if (address >= 0x100000 && address + 3 <= 0x103fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
result = (int)(Memory.mainram_Ptr[offset] * 0x1000000 + Memory.mainram_Ptr[offset + 1] * 0x10000 + Memory.mainram_Ptr[offset + 2] * 0x100 + Memory.mainram_Ptr[offset + 3]);
|
result = (int)(Memory.mainram[offset] * 0x1000000 + Memory.mainram[offset + 1] * 0x10000 + Memory.mainram[offset + 2] * 0x100 + Memory.mainram[offset + 3]);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -2567,10 +2567,10 @@
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address <= 0x07ffff)
|
if (address <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
int offset = (address - 0x000000) / 2;
|
int offset = (address - 0x000000) / 2;
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2580,7 +2580,7 @@
|
|||||||
else if (address >= 0x100000 && address + 3 <= 0x103fff)
|
else if (address >= 0x100000 && address + 3 <= 0x103fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
result = (int)(Memory.mainram_Ptr[offset] * 0x1000000 + Memory.mainram_Ptr[offset + 1] * 0x10000 + Memory.mainram_Ptr[offset + 2] * 0x100 + Memory.mainram_Ptr[offset + 3]);
|
result = (int)(Memory.mainram[offset] * 0x1000000 + Memory.mainram[offset + 1] * 0x10000 + Memory.mainram[offset + 2] * 0x100 + Memory.mainram[offset + 3]);
|
||||||
}
|
}
|
||||||
else if (address >= 0x104000 && address + 3 <= 0x107fff)
|
else if (address >= 0x104000 && address + 3 <= 0x107fff)
|
||||||
{
|
{
|
||||||
@ -2620,7 +2620,7 @@
|
|||||||
if (address >= 0x100000 && address <= 0x103fff)
|
if (address >= 0x100000 && address <= 0x103fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)(value);
|
Memory.mainram[offset] = (byte)(value);
|
||||||
}
|
}
|
||||||
else if (address >= 0x104000 && address <= 0x107fff)
|
else if (address >= 0x104000 && address <= 0x107fff)
|
||||||
{
|
{
|
||||||
@ -2756,8 +2756,8 @@
|
|||||||
if (address >= 0x100000 && address + 1 <= 0x103fff)
|
if (address >= 0x100000 && address + 1 <= 0x103fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)(value >> 8);
|
Memory.mainram[offset] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[offset + 1] = (byte)value;
|
Memory.mainram[offset + 1] = (byte)value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x104000 && address + 1 <= 0x107fff)
|
else if (address >= 0x104000 && address + 1 <= 0x107fff)
|
||||||
{
|
{
|
||||||
@ -2823,10 +2823,10 @@
|
|||||||
if (address >= 0x100000 && address + 3 <= 0x103fff)
|
if (address >= 0x100000 && address + 3 <= 0x103fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)(value >> 24);
|
Memory.mainram[offset] = (byte)(value >> 24);
|
||||||
Memory.mainram_Ptr[offset + 1] = (byte)(value >> 16);
|
Memory.mainram[offset + 1] = (byte)(value >> 16);
|
||||||
Memory.mainram_Ptr[offset + 2] = (byte)(value >> 8);
|
Memory.mainram[offset + 2] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[offset + 3] = (byte)value;
|
Memory.mainram[offset + 3] = (byte)value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x104000 && address + 3 <= 0x107fff)
|
else if (address >= 0x104000 && address + 3 <= 0x107fff)
|
||||||
{
|
{
|
||||||
@ -2888,12 +2888,12 @@
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0xefff)
|
if (address <= 0xefff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[address];
|
result = Memory.audiorom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0xf000 && address <= 0xf7ff)
|
else if (address >= 0xf000 && address <= 0xf7ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xf000;
|
int offset = address - 0xf000;
|
||||||
result = Memory.audioram_Ptr[offset];
|
result = Memory.audioram[offset];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2906,12 +2906,12 @@
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0xefff)
|
if (address <= 0xefff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[address];
|
result = Memory.audiorom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0xf000 && address <= 0xf7ff)
|
else if (address >= 0xf000 && address <= 0xf7ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xf000;
|
int offset = address - 0xf000;
|
||||||
result = Memory.audioram_Ptr[offset];
|
result = Memory.audioram[offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0xf800 && address <= 0xf82f)
|
else if (address >= 0xf800 && address <= 0xf82f)
|
||||||
{
|
{
|
||||||
@ -2925,7 +2925,7 @@
|
|||||||
if (address >= 0xf000 && address <= 0xf7ff)
|
if (address >= 0xf000 && address <= 0xf7ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xf000;
|
int offset = address - 0xf000;
|
||||||
Memory.audioram_Ptr[offset] = value;
|
Memory.audioram[offset] = value;
|
||||||
}
|
}
|
||||||
else if (address >= 0xf800 && address <= 0xf82f)
|
else if (address >= 0xf800 && address <= 0xf82f)
|
||||||
{
|
{
|
||||||
@ -2942,12 +2942,12 @@
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0xefff)
|
if (address <= 0xefff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[address];
|
result = Memory.audiorom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0xf000 && address <= 0xf7ff)
|
else if (address >= 0xf000 && address <= 0xf7ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xf000;
|
int offset = address - 0xf000;
|
||||||
result = Memory.audioram_Ptr[offset];
|
result = Memory.audioram[offset];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2960,12 +2960,12 @@
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0xefff)
|
if (address <= 0xefff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[address];
|
result = Memory.audiorom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0xf000 && address <= 0xf7ff)
|
else if (address >= 0xf000 && address <= 0xf7ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xf000;
|
int offset = address - 0xf000;
|
||||||
result = Memory.audioram_Ptr[offset];
|
result = Memory.audioram[offset];
|
||||||
}
|
}
|
||||||
else if (address == 0xf801 || address == 0xf811)
|
else if (address == 0xf801 || address == 0xf811)
|
||||||
{
|
{
|
||||||
@ -2983,7 +2983,7 @@
|
|||||||
if (address >= 0xf000 && address <= 0xf7ff)
|
if (address >= 0xf000 && address <= 0xf7ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xf000;
|
int offset = address - 0xf000;
|
||||||
Memory.audioram_Ptr[offset] = value;
|
Memory.audioram[offset] = value;
|
||||||
}
|
}
|
||||||
else if (address == 0xf800 || address == 0xf810)
|
else if (address == 0xf800 || address == 0xf810)
|
||||||
{
|
{
|
||||||
@ -3008,17 +3008,17 @@
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0x7fff)
|
if (address <= 0x7fff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[address];
|
result = Memory.audiorom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0x8000 && address <= 0xbfff)
|
else if (address >= 0x8000 && address <= 0xbfff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
result = Memory.audiorom_Ptr[basebanksnd + offset];
|
result = Memory.audiorom[basebanksnd + offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0xc000 && address <= 0xdfff)
|
else if (address >= 0xc000 && address <= 0xdfff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xc000;
|
int offset = address - 0xc000;
|
||||||
result = Memory.audioram_Ptr[offset];
|
result = Memory.audioram[offset];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -3031,17 +3031,17 @@
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0x7fff)
|
if (address <= 0x7fff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[address];
|
result = Memory.audiorom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0x8000 && address <= 0xbfff)
|
else if (address >= 0x8000 && address <= 0xbfff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
result = Memory.audiorom_Ptr[basebanksnd + offset];
|
result = Memory.audiorom[basebanksnd + offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0xc000 && address <= 0xdfff)
|
else if (address >= 0xc000 && address <= 0xdfff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xc000;
|
int offset = address - 0xc000;
|
||||||
result = Memory.audioram_Ptr[offset];
|
result = Memory.audioram[offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0xe000 && address <= 0xe0ff)
|
else if (address >= 0xe000 && address <= 0xe0ff)
|
||||||
{
|
{
|
||||||
@ -3068,12 +3068,12 @@
|
|||||||
if (address >= 0x8000 && address <= 0xbfff)
|
if (address >= 0x8000 && address <= 0xbfff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
Memory.audiorom_Ptr[basebanksnd + offset] = value;
|
Memory.audiorom[basebanksnd + offset] = value;
|
||||||
}
|
}
|
||||||
else if (address >= 0xc000 && address <= 0xdfff)
|
else if (address >= 0xc000 && address <= 0xdfff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xc000;
|
int offset = address - 0xc000;
|
||||||
Memory.audioram_Ptr[offset] = value;
|
Memory.audioram[offset] = value;
|
||||||
}
|
}
|
||||||
else if (address >= 0xe000 && address <= 0xe0ff)
|
else if (address >= 0xe000 && address <= 0xe0ff)
|
||||||
{
|
{
|
||||||
|
@ -45,10 +45,10 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
writer.Write(Palette.entry_color[i]);
|
writer.Write(Palette.entry_color[i]);
|
||||||
}
|
}
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x4000);
|
writer.Write(Memory.mainram, 0, 0x4000);
|
||||||
writer.Write(mainram2, 0, 0x4000);
|
writer.Write(mainram2, 0, 0x4000);
|
||||||
MC68000.m1.SaveStateBinary(writer);
|
MC68000.m1.SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram_Ptr, 0, 0x800);
|
writer.Write(Memory.audioram, 0, 0x800);
|
||||||
Cpuint.SaveStateBinary(writer);
|
Cpuint.SaveStateBinary(writer);
|
||||||
writer.Write(EmuTimer.global_basetime.seconds);
|
writer.Write(EmuTimer.global_basetime.seconds);
|
||||||
writer.Write(EmuTimer.global_basetime.attoseconds);
|
writer.Write(EmuTimer.global_basetime.attoseconds);
|
||||||
@ -151,10 +151,10 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
writer.Write(Palette.entry_color[i]);
|
writer.Write(Palette.entry_color[i]);
|
||||||
}
|
}
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x4000);
|
writer.Write(Memory.mainram, 0, 0x4000);
|
||||||
writer.Write(mainram2, 0, 0x4000);
|
writer.Write(mainram2, 0, 0x4000);
|
||||||
MC68000.m1.SaveStateBinary(writer);
|
MC68000.m1.SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram_Ptr, 0, 0x800);
|
writer.Write(Memory.audioram, 0, 0x800);
|
||||||
Z80A.zz1[0].SaveStateBinary(writer);
|
Z80A.zz1[0].SaveStateBinary(writer);
|
||||||
Cpuint.SaveStateBinary(writer);
|
Cpuint.SaveStateBinary(writer);
|
||||||
writer.Write(EmuTimer.global_basetime.seconds);
|
writer.Write(EmuTimer.global_basetime.seconds);
|
||||||
@ -280,9 +280,9 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
writer.Write(Palette.entry_color[i]);
|
writer.Write(Palette.entry_color[i]);
|
||||||
}
|
}
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x4000);
|
writer.Write(Memory.mainram, 0, 0x4000);
|
||||||
MC68000.m1.SaveStateBinary(writer);
|
MC68000.m1.SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram_Ptr, 0, 0x800);
|
writer.Write(Memory.audioram, 0, 0x800);
|
||||||
Z80A.zz1[0].SaveStateBinary(writer);
|
Z80A.zz1[0].SaveStateBinary(writer);
|
||||||
Cpuint.SaveStateBinary(writer);
|
Cpuint.SaveStateBinary(writer);
|
||||||
writer.Write(EmuTimer.global_basetime.seconds);
|
writer.Write(EmuTimer.global_basetime.seconds);
|
||||||
@ -419,9 +419,9 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
writer.Write(Palette.entry_color[i]);
|
writer.Write(Palette.entry_color[i]);
|
||||||
}
|
}
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x4000);
|
writer.Write(Memory.mainram, 0, 0x4000);
|
||||||
MC68000.m1.SaveStateBinary(writer);
|
MC68000.m1.SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram_Ptr, 0, 0x800);
|
writer.Write(Memory.audioram, 0, 0x800);
|
||||||
Z80A.zz1[0].SaveStateBinary(writer);
|
Z80A.zz1[0].SaveStateBinary(writer);
|
||||||
Cpuint.SaveStateBinary(writer);
|
Cpuint.SaveStateBinary(writer);
|
||||||
writer.Write(EmuTimer.global_basetime.seconds);
|
writer.Write(EmuTimer.global_basetime.seconds);
|
||||||
@ -525,9 +525,9 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
writer.Write(Palette.entry_color[i]);
|
writer.Write(Palette.entry_color[i]);
|
||||||
}
|
}
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x4000);
|
writer.Write(Memory.mainram, 0, 0x4000);
|
||||||
MC68000.m1.SaveStateBinary(writer);
|
MC68000.m1.SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram_Ptr, 0, 0x800);
|
writer.Write(Memory.audioram, 0, 0x800);
|
||||||
Z80A.zz1[0].SaveStateBinary(writer);
|
Z80A.zz1[0].SaveStateBinary(writer);
|
||||||
Cpuint.SaveStateBinary(writer);
|
Cpuint.SaveStateBinary(writer);
|
||||||
writer.Write(EmuTimer.global_basetime.seconds);
|
writer.Write(EmuTimer.global_basetime.seconds);
|
||||||
@ -629,9 +629,9 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
writer.Write(Palette.entry_color[i]);
|
writer.Write(Palette.entry_color[i]);
|
||||||
}
|
}
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x4000);
|
writer.Write(Memory.mainram, 0, 0x4000);
|
||||||
MC68000.m1.SaveStateBinary(writer);
|
MC68000.m1.SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram_Ptr, 0, 0x800);
|
writer.Write(Memory.audioram, 0, 0x800);
|
||||||
Z80A.zz1[0].SaveStateBinary(writer);
|
Z80A.zz1[0].SaveStateBinary(writer);
|
||||||
Cpuint.SaveStateBinary(writer);
|
Cpuint.SaveStateBinary(writer);
|
||||||
writer.Write(EmuTimer.global_basetime.seconds);
|
writer.Write(EmuTimer.global_basetime.seconds);
|
||||||
@ -736,9 +736,9 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
writer.Write(Palette.entry_color[i]);
|
writer.Write(Palette.entry_color[i]);
|
||||||
}
|
}
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x4000);
|
writer.Write(Memory.mainram, 0, 0x4000);
|
||||||
MC68000.m1.SaveStateBinary(writer);
|
MC68000.m1.SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram_Ptr, 0, 0x800);
|
writer.Write(Memory.audioram, 0, 0x800);
|
||||||
Z80A.zz1[0].SaveStateBinary(writer);
|
Z80A.zz1[0].SaveStateBinary(writer);
|
||||||
Cpuint.SaveStateBinary(writer);
|
Cpuint.SaveStateBinary(writer);
|
||||||
writer.Write(EmuTimer.global_basetime.seconds);
|
writer.Write(EmuTimer.global_basetime.seconds);
|
||||||
@ -838,10 +838,10 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
writer.Write(Palette.entry_color[i]);
|
writer.Write(Palette.entry_color[i]);
|
||||||
}
|
}
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x4000);
|
writer.Write(Memory.mainram, 0, 0x4000);
|
||||||
writer.Write(mainram2, 0, 0x80);
|
writer.Write(mainram2, 0, 0x80);
|
||||||
MC68000.m1.SaveStateBinary(writer);
|
MC68000.m1.SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram_Ptr, 0, 0x800);
|
writer.Write(Memory.audioram, 0, 0x800);
|
||||||
Z80A.zz1[0].SaveStateBinary(writer);
|
Z80A.zz1[0].SaveStateBinary(writer);
|
||||||
Cpuint.SaveStateBinary(writer);
|
Cpuint.SaveStateBinary(writer);
|
||||||
writer.Write(EmuTimer.global_basetime.seconds);
|
writer.Write(EmuTimer.global_basetime.seconds);
|
||||||
@ -946,10 +946,10 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
writer.Write(Palette.entry_color[i]);
|
writer.Write(Palette.entry_color[i]);
|
||||||
}
|
}
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x4000);
|
writer.Write(Memory.mainram, 0, 0x4000);
|
||||||
writer.Write(mainram2, 0, 0x80);
|
writer.Write(mainram2, 0, 0x80);
|
||||||
MC68000.m1.SaveStateBinary(writer);
|
MC68000.m1.SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram_Ptr, 0, 0x800);
|
writer.Write(Memory.audioram, 0, 0x800);
|
||||||
Z80A.zz1[0].SaveStateBinary(writer);
|
Z80A.zz1[0].SaveStateBinary(writer);
|
||||||
Cpuint.SaveStateBinary(writer);
|
Cpuint.SaveStateBinary(writer);
|
||||||
writer.Write(EmuTimer.global_basetime.seconds);
|
writer.Write(EmuTimer.global_basetime.seconds);
|
||||||
@ -1051,9 +1051,9 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
writer.Write(Palette.entry_color[i]);
|
writer.Write(Palette.entry_color[i]);
|
||||||
}
|
}
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x4000);
|
writer.Write(Memory.mainram, 0, 0x4000);
|
||||||
MC68000.m1.SaveStateBinary(writer);
|
MC68000.m1.SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram_Ptr, 0, 0x800);
|
writer.Write(Memory.audioram, 0, 0x800);
|
||||||
Z80A.zz1[0].SaveStateBinary(writer);
|
Z80A.zz1[0].SaveStateBinary(writer);
|
||||||
Cpuint.SaveStateBinary(writer);
|
Cpuint.SaveStateBinary(writer);
|
||||||
writer.Write(EmuTimer.global_basetime.seconds);
|
writer.Write(EmuTimer.global_basetime.seconds);
|
||||||
@ -1156,9 +1156,9 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
writer.Write(Palette.entry_color[i]);
|
writer.Write(Palette.entry_color[i]);
|
||||||
}
|
}
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x4000);
|
writer.Write(Memory.mainram, 0, 0x4000);
|
||||||
MC68000.m1.SaveStateBinary(writer);
|
MC68000.m1.SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram_Ptr, 0, 0x2000);
|
writer.Write(Memory.audioram, 0, 0x2000);
|
||||||
Z80A.zz1[0].SaveStateBinary(writer);
|
Z80A.zz1[0].SaveStateBinary(writer);
|
||||||
Cpuint.SaveStateBinary(writer);
|
Cpuint.SaveStateBinary(writer);
|
||||||
writer.Write(EmuTimer.global_basetime.seconds);
|
writer.Write(EmuTimer.global_basetime.seconds);
|
||||||
|
@ -137,20 +137,20 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
public static byte soundram_r(int offset)
|
public static byte soundram_r(int offset)
|
||||||
{
|
{
|
||||||
return Memory.audioram_Ptr[offset];
|
return Memory.audioram[offset];
|
||||||
}
|
}
|
||||||
public static ushort soundram_r2(int offset)
|
public static ushort soundram_r2(int offset)
|
||||||
{
|
{
|
||||||
return (ushort)(Memory.audioram_Ptr[offset * 2 + 0] | (Memory.audioram_Ptr[offset * 2 + 1] << 8));
|
return (ushort)(Memory.audioram[offset * 2 + 0] | (Memory.audioram[offset * 2 + 1] << 8));
|
||||||
}
|
}
|
||||||
public static void soundram_w(int offset, byte data)
|
public static void soundram_w(int offset, byte data)
|
||||||
{
|
{
|
||||||
Memory.audioram_Ptr[offset] = data;
|
Memory.audioram[offset] = data;
|
||||||
}
|
}
|
||||||
public static void soundram_w(int offset, ushort data)
|
public static void soundram_w(int offset, ushort data)
|
||||||
{
|
{
|
||||||
Memory.audioram_Ptr[offset * 2] = (byte)data;
|
Memory.audioram[offset * 2] = (byte)data;
|
||||||
Memory.audioram_Ptr[offset * 2 + 1] = (byte)(data >> 8);
|
Memory.audioram[offset * 2 + 1] = (byte)(data >> 8);
|
||||||
}
|
}
|
||||||
public static void machine_start_m72()
|
public static void machine_start_m72()
|
||||||
{
|
{
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address >= 0 && address <= 0xfffff)
|
if (address >= 0 && address <= 0xfffff)
|
||||||
{
|
{
|
||||||
result = Memory.mainrom_Ptr[address];
|
result = Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -20,11 +20,11 @@
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address >= 0 && address <= 0x7ffff)
|
if (address >= 0 && address <= 0x7ffff)
|
||||||
{
|
{
|
||||||
result = Memory.mainrom_Ptr[address];
|
result = Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0xa0000 && address <= 0xa3fff)
|
else if (address >= 0xa0000 && address <= 0xa3fff)
|
||||||
{
|
{
|
||||||
result = Memory.mainram_Ptr[address - 0xa0000];
|
result = Memory.mainram[address - 0xa0000];
|
||||||
}
|
}
|
||||||
else if (address >= 0xc0000 && address <= 0xc03ff)
|
else if (address >= 0xc0000 && address <= 0xc03ff)
|
||||||
{
|
{
|
||||||
@ -58,7 +58,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0xffff0 && address <= 0xfffff)
|
else if (address >= 0xffff0 && address <= 0xfffff)
|
||||||
{
|
{
|
||||||
result = Memory.mainrom_Ptr[address & 0xfffff];
|
result = Memory.mainrom[address & 0xfffff];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -68,11 +68,11 @@
|
|||||||
ushort result = 0;
|
ushort result = 0;
|
||||||
if (address >= 0 && address + 1 <= 0x7ffff)
|
if (address >= 0 && address + 1 <= 0x7ffff)
|
||||||
{
|
{
|
||||||
result = (ushort)(Memory.mainrom_Ptr[address] + Memory.mainrom_Ptr[address + 1] * 0x100);
|
result = (ushort)(Memory.mainrom[address] + Memory.mainrom[address + 1] * 0x100);
|
||||||
}
|
}
|
||||||
else if (address >= 0xa0000 && address + 1 <= 0xa3fff)
|
else if (address >= 0xa0000 && address + 1 <= 0xa3fff)
|
||||||
{
|
{
|
||||||
result = (ushort)(Memory.mainram_Ptr[address - 0xa0000] + Memory.mainram_Ptr[address - 0xa0000 + 1] * 0x100);
|
result = (ushort)(Memory.mainram[address - 0xa0000] + Memory.mainram[address - 0xa0000 + 1] * 0x100);
|
||||||
}
|
}
|
||||||
else if (address >= 0xc0000 && address + 1 <= 0xc03ff)
|
else if (address >= 0xc0000 && address + 1 <= 0xc03ff)
|
||||||
{
|
{
|
||||||
@ -106,7 +106,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0xffff0 && address + 1 <= 0xfffff)
|
else if (address >= 0xffff0 && address + 1 <= 0xfffff)
|
||||||
{
|
{
|
||||||
result = (ushort)(Memory.mainrom_Ptr[address] + Memory.mainrom_Ptr[address + 1] * 0x100);
|
result = (ushort)(Memory.mainrom[address] + Memory.mainrom[address + 1] * 0x100);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -115,7 +115,7 @@
|
|||||||
address &= 0xfffff;
|
address &= 0xfffff;
|
||||||
if (address >= 0xa0000 && address <= 0xa3fff)
|
if (address >= 0xa0000 && address <= 0xa3fff)
|
||||||
{
|
{
|
||||||
Memory.mainram_Ptr[address - 0xa0000] = value;
|
Memory.mainram[address - 0xa0000] = value;
|
||||||
}
|
}
|
||||||
else if (address >= 0xc0000 && address <= 0xc03ff)
|
else if (address >= 0xc0000 && address <= 0xc03ff)
|
||||||
{
|
{
|
||||||
@ -153,8 +153,8 @@
|
|||||||
address &= 0xfffff;
|
address &= 0xfffff;
|
||||||
if (address >= 0xa0000 && address + 1 <= 0xa3fff)
|
if (address >= 0xa0000 && address + 1 <= 0xa3fff)
|
||||||
{
|
{
|
||||||
Memory.mainram_Ptr[address - 0xa0000] = (byte)value;
|
Memory.mainram[address - 0xa0000] = (byte)value;
|
||||||
Memory.mainram_Ptr[address - 0xa0000 + 1] = (byte)(value >> 8);
|
Memory.mainram[address - 0xa0000 + 1] = (byte)(value >> 8);
|
||||||
}
|
}
|
||||||
else if (address >= 0xc0000 && address + 1 <= 0xc03ff)
|
else if (address >= 0xc0000 && address + 1 <= 0xc03ff)
|
||||||
{
|
{
|
||||||
@ -305,7 +305,7 @@
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address >= 0 && address <= 0x7ffff)
|
if (address >= 0 && address <= 0x7ffff)
|
||||||
{
|
{
|
||||||
result = Memory.mainrom_Ptr[address];
|
result = Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0x80000 && address <= 0x83fff)
|
else if (address >= 0x80000 && address <= 0x83fff)
|
||||||
{
|
{
|
||||||
@ -334,11 +334,11 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0xe0000 && address <= 0xe3fff)
|
else if (address >= 0xe0000 && address <= 0xe3fff)
|
||||||
{
|
{
|
||||||
result = Memory.mainram_Ptr[address - 0xe0000];
|
result = Memory.mainram[address - 0xe0000];
|
||||||
}
|
}
|
||||||
else if (address >= 0xffff0 && address <= 0xfffff)
|
else if (address >= 0xffff0 && address <= 0xfffff)
|
||||||
{
|
{
|
||||||
result = Memory.mainrom_Ptr[address & 0xfffff];
|
result = Memory.mainrom[address & 0xfffff];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -348,7 +348,7 @@
|
|||||||
ushort result = 0;
|
ushort result = 0;
|
||||||
if (address >= 0 && address + 1 <= 0x7ffff)
|
if (address >= 0 && address + 1 <= 0x7ffff)
|
||||||
{
|
{
|
||||||
result = (ushort)(Memory.mainrom_Ptr[address] + Memory.mainrom_Ptr[address + 1] * 0x100);
|
result = (ushort)(Memory.mainrom[address] + Memory.mainrom[address + 1] * 0x100);
|
||||||
}
|
}
|
||||||
else if (address >= 0x80000 && address + 1 <= 0x83fff)
|
else if (address >= 0x80000 && address + 1 <= 0x83fff)
|
||||||
{
|
{
|
||||||
@ -377,11 +377,11 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0xe0000 && address + 1 <= 0xe3fff)
|
else if (address >= 0xe0000 && address + 1 <= 0xe3fff)
|
||||||
{
|
{
|
||||||
result = (ushort)(Memory.mainram_Ptr[address - 0xe0000] + Memory.mainram_Ptr[address - 0xe0000 + 1] * 0x100);
|
result = (ushort)(Memory.mainram[address - 0xe0000] + Memory.mainram[address - 0xe0000 + 1] * 0x100);
|
||||||
}
|
}
|
||||||
else if (address >= 0xffff0 && address + 1 <= 0xfffff)
|
else if (address >= 0xffff0 && address + 1 <= 0xfffff)
|
||||||
{
|
{
|
||||||
result = (ushort)(Memory.mainrom_Ptr[address] + Memory.mainrom_Ptr[address + 1] * 0x100);
|
result = (ushort)(Memory.mainrom[address] + Memory.mainrom[address + 1] * 0x100);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -423,7 +423,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0xe0000 && address <= 0xe3fff)
|
else if (address >= 0xe0000 && address <= 0xe3fff)
|
||||||
{
|
{
|
||||||
Memory.mainram_Ptr[address - 0xe0000] = value;
|
Memory.mainram[address - 0xe0000] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static void NWriteWord_kengo(int address, ushort value)
|
public static void NWriteWord_kengo(int address, ushort value)
|
||||||
@ -464,8 +464,8 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0xe0000 && address + 1 <= 0xe3fff)
|
else if (address >= 0xe0000 && address + 1 <= 0xe3fff)
|
||||||
{
|
{
|
||||||
Memory.mainram_Ptr[address - 0xe0000] = (byte)value;
|
Memory.mainram[address - 0xe0000] = (byte)value;
|
||||||
Memory.mainram_Ptr[address - 0xe0000 + 1] = (byte)(value >> 8);
|
Memory.mainram[address - 0xe0000 + 1] = (byte)(value >> 8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static void NWriteIOByte_kengo(int address, byte value)
|
public static void NWriteIOByte_kengo(int address, byte value)
|
||||||
@ -535,7 +535,7 @@
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address >= 0 && address <= 0xffff)
|
if (address >= 0 && address <= 0xffff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[address];
|
result = Memory.audiorom[address];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -544,7 +544,7 @@
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address >= 0 && address <= 0xffff)
|
if (address >= 0 && address <= 0xffff)
|
||||||
{
|
{
|
||||||
result = Memory.audioram_Ptr[address];
|
result = Memory.audioram[address];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -553,11 +553,11 @@
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address >= 0 && address <= 0xefff)
|
if (address >= 0 && address <= 0xefff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[address];
|
result = Memory.audiorom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0xf000 && address <= 0xffff)
|
else if (address >= 0xf000 && address <= 0xffff)
|
||||||
{
|
{
|
||||||
result = Memory.audioram_Ptr[address - 0xf000];
|
result = Memory.audioram[address - 0xf000];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -565,14 +565,14 @@
|
|||||||
{
|
{
|
||||||
if (address >= 0x0000 && address <= 0xffff)
|
if (address >= 0x0000 && address <= 0xffff)
|
||||||
{
|
{
|
||||||
Memory.audioram_Ptr[address] = value;
|
Memory.audioram[address] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static void ZWriteMemory_rom(ushort address, byte value)
|
public static void ZWriteMemory_rom(ushort address, byte value)
|
||||||
{
|
{
|
||||||
if (address >= 0xf000 && address <= 0xffff)
|
if (address >= 0xf000 && address <= 0xffff)
|
||||||
{
|
{
|
||||||
Memory.audioram_Ptr[address - 0xf000] = value;
|
Memory.audioram[address - 0xf000] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static byte ZReadHardware(ushort address)
|
public static byte ZReadHardware(ushort address)
|
||||||
|
@ -15,7 +15,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
result = Memory.mainrom_Ptr[address];
|
result = Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -45,9 +45,9 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
writer.Write(Palette.entry_color[i]);
|
writer.Write(Palette.entry_color[i]);
|
||||||
}
|
}
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x4000);
|
writer.Write(Memory.mainram, 0, 0x4000);
|
||||||
Nec.nn1[0].SaveStateBinary(writer);
|
Nec.nn1[0].SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram_Ptr, 0, 0x10000);
|
writer.Write(Memory.audioram, 0, 0x10000);
|
||||||
Z80A.zz1[0].SaveStateBinary(writer);
|
Z80A.zz1[0].SaveStateBinary(writer);
|
||||||
Cpuint.SaveStateBinary(writer);
|
Cpuint.SaveStateBinary(writer);
|
||||||
Cpuint.SaveStateBinary_v(writer);
|
Cpuint.SaveStateBinary_v(writer);
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address >= 0 && address <= 0xfffff)
|
if (address >= 0 && address <= 0xfffff)
|
||||||
{
|
{
|
||||||
result = Memory.mainrom_Ptr[address];
|
result = Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -20,16 +20,16 @@
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address >= 0 && address <= 0x9ffff)
|
if (address >= 0 && address <= 0x9ffff)
|
||||||
{
|
{
|
||||||
result = Memory.mainrom_Ptr[address];
|
result = Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0xa0000 && address <= 0xbffff)
|
else if (address >= 0xa0000 && address <= 0xbffff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xa0000;
|
int offset = address - 0xa0000;
|
||||||
result = Memory.mainrom_Ptr[bankaddress + offset];
|
result = Memory.mainrom[bankaddress + offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0xc0000 && address <= 0xcffff)
|
else if (address >= 0xc0000 && address <= 0xcffff)
|
||||||
{
|
{
|
||||||
result = Memory.mainrom_Ptr[address];
|
result = Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0xd0000 && address <= 0xdffff)
|
else if (address >= 0xd0000 && address <= 0xdffff)
|
||||||
{
|
{
|
||||||
@ -46,7 +46,7 @@
|
|||||||
else if (address >= 0xe0000 && address <= 0xeffff)
|
else if (address >= 0xe0000 && address <= 0xeffff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xe0000;
|
int offset = address - 0xe0000;
|
||||||
result = Memory.mainram_Ptr[offset];
|
result = Memory.mainram[offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0xf8000 && address <= 0xf87ff)
|
else if (address >= 0xf8000 && address <= 0xf87ff)
|
||||||
{
|
{
|
||||||
@ -60,7 +60,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0xffff0 && address <= 0xfffff)
|
else if (address >= 0xffff0 && address <= 0xfffff)
|
||||||
{
|
{
|
||||||
result = Memory.mainrom_Ptr[address];
|
result = Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -70,16 +70,16 @@
|
|||||||
ushort result = 0;
|
ushort result = 0;
|
||||||
if (address >= 0 && address + 1 <= 0x9ffff)
|
if (address >= 0 && address + 1 <= 0x9ffff)
|
||||||
{
|
{
|
||||||
result = (ushort)(Memory.mainrom_Ptr[address] + Memory.mainrom_Ptr[address + 1] * 0x100);
|
result = (ushort)(Memory.mainrom[address] + Memory.mainrom[address + 1] * 0x100);
|
||||||
}
|
}
|
||||||
else if (address >= 0xa0000 && address + 1 <= 0xbffff)
|
else if (address >= 0xa0000 && address + 1 <= 0xbffff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xa0000;
|
int offset = address - 0xa0000;
|
||||||
result = (ushort)(Memory.mainrom_Ptr[bankaddress + offset] + Memory.mainrom_Ptr[bankaddress + offset + 1] * 0x100);
|
result = (ushort)(Memory.mainrom[bankaddress + offset] + Memory.mainrom[bankaddress + offset + 1] * 0x100);
|
||||||
}
|
}
|
||||||
else if (address >= 0xc0000 && address + 1 <= 0xcffff)
|
else if (address >= 0xc0000 && address + 1 <= 0xcffff)
|
||||||
{
|
{
|
||||||
result = (ushort)(Memory.mainrom_Ptr[address] + Memory.mainrom_Ptr[address + 1] * 0x100);
|
result = (ushort)(Memory.mainrom[address] + Memory.mainrom[address + 1] * 0x100);
|
||||||
}
|
}
|
||||||
else if (address >= 0xd0000 && address + 1 <= 0xdffff)
|
else if (address >= 0xd0000 && address + 1 <= 0xdffff)
|
||||||
{
|
{
|
||||||
@ -89,7 +89,7 @@
|
|||||||
else if (address >= 0xe0000 && address + 1 <= 0xeffff)
|
else if (address >= 0xe0000 && address + 1 <= 0xeffff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xe0000;
|
int offset = address - 0xe0000;
|
||||||
result = (ushort)(Memory.mainram_Ptr[offset] + Memory.mainram_Ptr[offset + 1] * 0x100);
|
result = (ushort)(Memory.mainram[offset] + Memory.mainram[offset + 1] * 0x100);
|
||||||
}
|
}
|
||||||
else if (address >= 0xf8000 && address + 1 <= 0xf87ff)
|
else if (address >= 0xf8000 && address + 1 <= 0xf87ff)
|
||||||
{
|
{
|
||||||
@ -103,7 +103,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0xffff0 && address + 1 <= 0xfffff)
|
else if (address >= 0xffff0 && address + 1 <= 0xfffff)
|
||||||
{
|
{
|
||||||
result = (ushort)(Memory.mainrom_Ptr[address] + Memory.mainrom_Ptr[address + 1] * 0x100);
|
result = (ushort)(Memory.mainrom[address] + Memory.mainrom[address + 1] * 0x100);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -126,7 +126,7 @@
|
|||||||
else if (address >= 0xe0000 && address <= 0xeffff)
|
else if (address >= 0xe0000 && address <= 0xeffff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xe0000;
|
int offset = address - 0xe0000;
|
||||||
Memory.mainram_Ptr[offset] = value;
|
Memory.mainram[offset] = value;
|
||||||
}
|
}
|
||||||
else if (address >= 0xf8000 && address <= 0xf87ff)
|
else if (address >= 0xf8000 && address <= 0xf87ff)
|
||||||
{
|
{
|
||||||
@ -170,8 +170,8 @@
|
|||||||
else if (address >= 0xe0000 && address + 1 <= 0xeffff)
|
else if (address >= 0xe0000 && address + 1 <= 0xeffff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xe0000;
|
int offset = address - 0xe0000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)value;
|
Memory.mainram[offset] = (byte)value;
|
||||||
Memory.mainram_Ptr[offset + 1] = (byte)(value >> 8);
|
Memory.mainram[offset + 1] = (byte)(value >> 8);
|
||||||
}
|
}
|
||||||
else if (address >= 0xf8000 && address + 1 <= 0xf87ff)
|
else if (address >= 0xf8000 && address + 1 <= 0xf87ff)
|
||||||
{
|
{
|
||||||
@ -363,12 +363,12 @@
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address >= 0 && address <= 0x1ffff)
|
if (address >= 0 && address <= 0x1ffff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[address];
|
result = Memory.audiorom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0xffff0 && address <= 0xfffff)
|
else if (address >= 0xffff0 && address <= 0xfffff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xe0000;
|
int offset = address - 0xe0000;
|
||||||
result = Memory.audiorom_Ptr[offset];
|
result = Memory.audiorom[offset];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -378,12 +378,12 @@
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address >= 0 && address <= 0x1ffff)
|
if (address >= 0 && address <= 0x1ffff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[address];
|
result = Memory.audiorom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0xa0000 && address <= 0xa3fff)
|
else if (address >= 0xa0000 && address <= 0xa3fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xa0000;
|
int offset = address - 0xa0000;
|
||||||
result = Memory.audioram_Ptr[offset];
|
result = Memory.audioram[offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0xa8000 && address <= 0xa803f)
|
else if (address >= 0xa8000 && address <= 0xa803f)
|
||||||
{
|
{
|
||||||
@ -401,7 +401,7 @@
|
|||||||
else if (address >= 0xffff0 && address <= 0xfffff)
|
else if (address >= 0xffff0 && address <= 0xfffff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xe0000;
|
int offset = address - 0xe0000;
|
||||||
result = Memory.mainrom_Ptr[offset];
|
result = Memory.mainrom[offset];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -411,12 +411,12 @@
|
|||||||
ushort result = 0;
|
ushort result = 0;
|
||||||
if (address >= 0 && address + 1 <= 0x1ffff)
|
if (address >= 0 && address + 1 <= 0x1ffff)
|
||||||
{
|
{
|
||||||
result = (ushort)(Memory.audiorom_Ptr[address] + Memory.audiorom_Ptr[address + 1] * 0x100);
|
result = (ushort)(Memory.audiorom[address] + Memory.audiorom[address + 1] * 0x100);
|
||||||
}
|
}
|
||||||
else if (address >= 0xa0000 && address + 1 <= 0xa3fff)
|
else if (address >= 0xa0000 && address + 1 <= 0xa3fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xa0000;
|
int offset = address - 0xa0000;
|
||||||
result = (ushort)(Memory.audioram_Ptr[offset] + Memory.audioram_Ptr[offset + 1] * 0x100);
|
result = (ushort)(Memory.audioram[offset] + Memory.audioram[offset + 1] * 0x100);
|
||||||
}
|
}
|
||||||
else if (address >= 0xa8000 && address + 1 <= 0xa803f)
|
else if (address >= 0xa8000 && address + 1 <= 0xa803f)
|
||||||
{
|
{
|
||||||
@ -434,7 +434,7 @@
|
|||||||
else if (address >= 0xffff0 && address + 1 <= 0xfffff)
|
else if (address >= 0xffff0 && address + 1 <= 0xfffff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xe0000;
|
int offset = address - 0xe0000;
|
||||||
result = (ushort)(Memory.mainrom_Ptr[offset] + Memory.mainrom_Ptr[offset + 1] * 0x100);
|
result = (ushort)(Memory.mainrom[offset] + Memory.mainrom[offset + 1] * 0x100);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -448,7 +448,7 @@
|
|||||||
else if (address >= 0xa0000 && address <= 0xa3fff)
|
else if (address >= 0xa0000 && address <= 0xa3fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xa0000;
|
int offset = address - 0xa0000;
|
||||||
Memory.audioram_Ptr[offset] = value;
|
Memory.audioram[offset] = value;
|
||||||
}
|
}
|
||||||
else if (address >= 0xa8000 && address <= 0xa803f)
|
else if (address >= 0xa8000 && address <= 0xa803f)
|
||||||
{
|
{
|
||||||
@ -482,8 +482,8 @@
|
|||||||
else if (address >= 0xa0000 && address + 1 <= 0xa3fff)
|
else if (address >= 0xa0000 && address + 1 <= 0xa3fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xa0000;
|
int offset = address - 0xa0000;
|
||||||
Memory.audioram_Ptr[offset] = (byte)value;
|
Memory.audioram[offset] = (byte)value;
|
||||||
Memory.audioram_Ptr[offset + 1] = (byte)(value >> 8);
|
Memory.audioram[offset + 1] = (byte)(value >> 8);
|
||||||
}
|
}
|
||||||
else if (address >= 0xa8000 && address + 1 <= 0xa803f)
|
else if (address >= 0xa8000 && address + 1 <= 0xa803f)
|
||||||
{
|
{
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address >= 0 && address <= 0x7ffff)
|
if (address >= 0 && address <= 0x7ffff)
|
||||||
{
|
{
|
||||||
result = Memory.mainrom_Ptr[address];
|
result = Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0x80000 && address <= 0x8ffff)
|
else if (address >= 0x80000 && address <= 0x8ffff)
|
||||||
{
|
{
|
||||||
@ -25,7 +25,7 @@
|
|||||||
else if (address >= 0xe0000 && address <= 0xeffff)
|
else if (address >= 0xe0000 && address <= 0xeffff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xe0000;
|
int offset = address - 0xe0000;
|
||||||
result = Memory.mainram_Ptr[offset];
|
result = Memory.mainram[offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0xf8000 && address <= 0xf87ff)
|
else if (address >= 0xf8000 && address <= 0xf87ff)
|
||||||
{
|
{
|
||||||
@ -39,7 +39,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0xffff0 && address <= 0xfffff)
|
else if (address >= 0xffff0 && address <= 0xfffff)
|
||||||
{
|
{
|
||||||
result = Memory.mainrom_Ptr[address];
|
result = Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -49,7 +49,7 @@
|
|||||||
ushort result = 0;
|
ushort result = 0;
|
||||||
if (address >= 0 && address + 1 <= 0x7ffff)
|
if (address >= 0 && address + 1 <= 0x7ffff)
|
||||||
{
|
{
|
||||||
result = (ushort)(Memory.mainrom_Ptr[address] + Memory.mainrom_Ptr[address + 1] * 0x100);
|
result = (ushort)(Memory.mainrom[address] + Memory.mainrom[address + 1] * 0x100);
|
||||||
}
|
}
|
||||||
else if (address >= 0x80000 && address + 1 <= 0x8ffff)
|
else if (address >= 0x80000 && address + 1 <= 0x8ffff)
|
||||||
{
|
{
|
||||||
@ -59,7 +59,7 @@
|
|||||||
else if (address >= 0xe0000 && address + 1 <= 0xeffff)
|
else if (address >= 0xe0000 && address + 1 <= 0xeffff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xe0000;
|
int offset = address - 0xe0000;
|
||||||
result = (ushort)(Memory.mainram_Ptr[offset] + Memory.mainram_Ptr[offset + 1] * 0x100);
|
result = (ushort)(Memory.mainram[offset] + Memory.mainram[offset + 1] * 0x100);
|
||||||
}
|
}
|
||||||
else if (address >= 0xf8000 && address + 1 <= 0xf87ff)
|
else if (address >= 0xf8000 && address + 1 <= 0xf87ff)
|
||||||
{
|
{
|
||||||
@ -73,7 +73,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0xffff0 && address + 1 <= 0xfffff)
|
else if (address >= 0xffff0 && address + 1 <= 0xfffff)
|
||||||
{
|
{
|
||||||
result = (ushort)(Memory.mainrom_Ptr[address] + Memory.mainrom_Ptr[address + 1] * 0x100);
|
result = (ushort)(Memory.mainrom[address] + Memory.mainrom[address + 1] * 0x100);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -96,7 +96,7 @@
|
|||||||
else if (address >= 0xe0000 && address <= 0xeffff)
|
else if (address >= 0xe0000 && address <= 0xeffff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xe0000;
|
int offset = address - 0xe0000;
|
||||||
Memory.mainram_Ptr[offset] = value;
|
Memory.mainram[offset] = value;
|
||||||
}
|
}
|
||||||
else if (address >= 0xf8000 && address <= 0xf87ff)
|
else if (address >= 0xf8000 && address <= 0xf87ff)
|
||||||
{
|
{
|
||||||
@ -140,8 +140,8 @@
|
|||||||
else if (address >= 0xe0000 && address + 1 <= 0xeffff)
|
else if (address >= 0xe0000 && address + 1 <= 0xeffff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xe0000;
|
int offset = address - 0xe0000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)value;
|
Memory.mainram[offset] = (byte)value;
|
||||||
Memory.mainram_Ptr[offset + 1] = (byte)(value >> 8);
|
Memory.mainram[offset + 1] = (byte)(value >> 8);
|
||||||
}
|
}
|
||||||
else if (address >= 0xf8000 && address + 1 <= 0xf87ff)
|
else if (address >= 0xf8000 && address + 1 <= 0xf87ff)
|
||||||
{
|
{
|
||||||
|
@ -59,9 +59,9 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
writer.Write(Palette.entry_color[i]);
|
writer.Write(Palette.entry_color[i]);
|
||||||
}
|
}
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x10000);
|
writer.Write(Memory.mainram, 0, 0x10000);
|
||||||
Nec.nn1[0].SaveStateBinary(writer);
|
Nec.nn1[0].SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram_Ptr, 0, 0x4000);
|
writer.Write(Memory.audioram, 0, 0x4000);
|
||||||
Nec.nn1[1].SaveStateBinary(writer);
|
Nec.nn1[1].SaveStateBinary(writer);
|
||||||
Cpuint.SaveStateBinary(writer);
|
Cpuint.SaveStateBinary(writer);
|
||||||
Cpuint.SaveStateBinary_v(writer);
|
Cpuint.SaveStateBinary_v(writer);
|
||||||
|
@ -18,20 +18,20 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (main_cpu_vector_table_source == 1)
|
else if (main_cpu_vector_table_source == 1)
|
||||||
{
|
{
|
||||||
result = (sbyte)Memory.mainrom_Ptr[address];
|
result = (sbyte)Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (address >= 0x000080 && address <= 0x0fffff)
|
else if (address >= 0x000080 && address <= 0x0fffff)
|
||||||
{
|
{
|
||||||
result = (sbyte)Memory.mainrom_Ptr[address];
|
result = (sbyte)Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0x100000 && address <= 0x1fffff)
|
else if (address >= 0x100000 && address <= 0x1fffff)
|
||||||
{
|
{
|
||||||
result = (sbyte)Memory.mainram_Ptr[address & 0xffff];
|
result = (sbyte)Memory.mainram[address & 0xffff];
|
||||||
}
|
}
|
||||||
else if (address >= 0x200000 && address <= 0x2fffff)
|
else if (address >= 0x200000 && address <= 0x2fffff)
|
||||||
{
|
{
|
||||||
result = (sbyte)Memory.mainrom_Ptr[main_cpu_bank_address + (address - 0x200000)];
|
result = (sbyte)Memory.mainrom[main_cpu_bank_address + (address - 0x200000)];
|
||||||
}
|
}
|
||||||
else if (address >= 0xc00000 && address <= 0xcfffff)
|
else if (address >= 0xc00000 && address <= 0xcfffff)
|
||||||
{
|
{
|
||||||
@ -55,20 +55,20 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (main_cpu_vector_table_source == 1)
|
else if (main_cpu_vector_table_source == 1)
|
||||||
{
|
{
|
||||||
result = (sbyte)Memory.mainrom_Ptr[address];
|
result = (sbyte)Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (address >= 0x000080 && address <= 0x0fffff)
|
else if (address >= 0x000080 && address <= 0x0fffff)
|
||||||
{
|
{
|
||||||
result = (sbyte)Memory.mainrom_Ptr[address];
|
result = (sbyte)Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0x100000 && address <= 0x1fffff)
|
else if (address >= 0x100000 && address <= 0x1fffff)
|
||||||
{
|
{
|
||||||
result = (sbyte)Memory.mainram_Ptr[address & 0xffff];
|
result = (sbyte)Memory.mainram[address & 0xffff];
|
||||||
}
|
}
|
||||||
else if (address >= 0x200000 && address <= 0x2fffff)
|
else if (address >= 0x200000 && address <= 0x2fffff)
|
||||||
{
|
{
|
||||||
result = (sbyte)Memory.mainrom_Ptr[main_cpu_bank_address + (address - 0x200000)];
|
result = (sbyte)Memory.mainrom[main_cpu_bank_address + (address - 0x200000)];
|
||||||
}
|
}
|
||||||
/*else if (address >= 0x300000 && address <= 0x300001)
|
/*else if (address >= 0x300000 && address <= 0x300001)
|
||||||
{
|
{
|
||||||
@ -187,7 +187,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (main_cpu_vector_table_source == 1)
|
else if (main_cpu_vector_table_source == 1)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (address >= 0x000080 && address + 1 <= 0x0fffff)
|
else if (address >= 0x000080 && address + 1 <= 0x0fffff)
|
||||||
@ -196,15 +196,15 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
//m68000Form.iStatus = 1;
|
//m68000Form.iStatus = 1;
|
||||||
}
|
}
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else if (address >= 0x100000 && address + 1 <= 0x1fffff)
|
else if (address >= 0x100000 && address + 1 <= 0x1fffff)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainram_Ptr[address & 0xffff] * 0x100 + Memory.mainram_Ptr[(address & 0xffff) + 1]);
|
result = (short)(Memory.mainram[address & 0xffff] * 0x100 + Memory.mainram[(address & 0xffff) + 1]);
|
||||||
}
|
}
|
||||||
else if (address >= 0x200000 && address + 1 <= 0x2fffff)
|
else if (address >= 0x200000 && address + 1 <= 0x2fffff)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[main_cpu_bank_address + (address & 0xfffff)] * 0x100 + Memory.mainrom_Ptr[main_cpu_bank_address + (address & 0xfffff) + 1]);
|
result = (short)(Memory.mainrom[main_cpu_bank_address + (address & 0xfffff)] * 0x100 + Memory.mainrom[main_cpu_bank_address + (address & 0xfffff) + 1]);
|
||||||
}
|
}
|
||||||
else if (address >= 0xc00000 && address + 1 <= 0xcfffff)
|
else if (address >= 0xc00000 && address + 1 <= 0xcfffff)
|
||||||
{
|
{
|
||||||
@ -228,7 +228,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (main_cpu_vector_table_source == 1)
|
else if (main_cpu_vector_table_source == 1)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (address >= 0x000080 && address + 1 <= 0x0fffff)
|
else if (address >= 0x000080 && address + 1 <= 0x0fffff)
|
||||||
@ -237,7 +237,7 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
//m68000Form.iStatus = 1;
|
//m68000Form.iStatus = 1;
|
||||||
}
|
}
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else if (address >= 0x100000 && address + 1 <= 0x1fffff)
|
else if (address >= 0x100000 && address + 1 <= 0x1fffff)
|
||||||
{
|
{
|
||||||
@ -245,11 +245,11 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
int i1 = 1;
|
int i1 = 1;
|
||||||
}
|
}
|
||||||
result = (short)(Memory.mainram_Ptr[address & 0xffff] * 0x100 + Memory.mainram_Ptr[(address & 0xffff) + 1]);
|
result = (short)(Memory.mainram[address & 0xffff] * 0x100 + Memory.mainram[(address & 0xffff) + 1]);
|
||||||
}
|
}
|
||||||
else if (address >= 0x200000 && address <= 0x2fffff)
|
else if (address >= 0x200000 && address <= 0x2fffff)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[main_cpu_bank_address + (address & 0xfffff)] * 0x100 + Memory.mainrom_Ptr[main_cpu_bank_address + (address & 0xfffff) + 1]);
|
result = (short)(Memory.mainrom[main_cpu_bank_address + (address & 0xfffff)] * 0x100 + Memory.mainrom[main_cpu_bank_address + (address & 0xfffff) + 1]);
|
||||||
}
|
}
|
||||||
/*else if (address >= 0x300000 && address <= 0x300001)
|
/*else if (address >= 0x300000 && address <= 0x300001)
|
||||||
{
|
{
|
||||||
@ -317,7 +317,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (main_cpu_vector_table_source == 1)
|
else if (main_cpu_vector_table_source == 1)
|
||||||
{
|
{
|
||||||
result = Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3];
|
result = Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (address >= 0x000080 && address + 3 <= 0x0fffff)
|
else if (address >= 0x000080 && address + 3 <= 0x0fffff)
|
||||||
@ -326,15 +326,15 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
//m68000Form.iStatus = 1;
|
//m68000Form.iStatus = 1;
|
||||||
}
|
}
|
||||||
result = Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3];
|
result = Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3];
|
||||||
}
|
}
|
||||||
else if (address >= 0x100000 && address + 3 <= 0x1fffff)
|
else if (address >= 0x100000 && address + 3 <= 0x1fffff)
|
||||||
{
|
{
|
||||||
result = Memory.mainram_Ptr[address & 0xffff] * 0x1000000 + Memory.mainram_Ptr[(address & 0xffff) + 1] * 0x10000 + Memory.mainram_Ptr[(address & 0xffff) + 2] * 0x100 + Memory.mainram_Ptr[(address & 0xffff) + 3];
|
result = Memory.mainram[address & 0xffff] * 0x1000000 + Memory.mainram[(address & 0xffff) + 1] * 0x10000 + Memory.mainram[(address & 0xffff) + 2] * 0x100 + Memory.mainram[(address & 0xffff) + 3];
|
||||||
}
|
}
|
||||||
else if (address >= 0x200000 && address + 3 <= 0x2fffff)
|
else if (address >= 0x200000 && address + 3 <= 0x2fffff)
|
||||||
{
|
{
|
||||||
result = Memory.mainrom_Ptr[main_cpu_bank_address + (address & 0xfffff)] * 0x1000000 + Memory.mainrom_Ptr[main_cpu_bank_address + (address & 0xfffff) + 1] * 0x10000 + Memory.mainrom_Ptr[main_cpu_bank_address + (address & 0xfffff) + 2] * 0x100 + Memory.mainrom_Ptr[main_cpu_bank_address + (address & 0xfffff) + 3];
|
result = Memory.mainrom[main_cpu_bank_address + (address & 0xfffff)] * 0x1000000 + Memory.mainrom[main_cpu_bank_address + (address & 0xfffff) + 1] * 0x10000 + Memory.mainrom[main_cpu_bank_address + (address & 0xfffff) + 2] * 0x100 + Memory.mainrom[main_cpu_bank_address + (address & 0xfffff) + 3];
|
||||||
}
|
}
|
||||||
else if (address >= 0xc00000 && address + 3 <= 0xcfffff)
|
else if (address >= 0xc00000 && address + 3 <= 0xcfffff)
|
||||||
{
|
{
|
||||||
@ -358,7 +358,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (main_cpu_vector_table_source == 1)
|
else if (main_cpu_vector_table_source == 1)
|
||||||
{
|
{
|
||||||
result = Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3];
|
result = Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (address >= 0x000080 && address + 3 <= 0x0fffff)
|
else if (address >= 0x000080 && address + 3 <= 0x0fffff)
|
||||||
@ -367,15 +367,15 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
//m68000Form.iStatus = 1;
|
//m68000Form.iStatus = 1;
|
||||||
}
|
}
|
||||||
result = Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3];
|
result = Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3];
|
||||||
}
|
}
|
||||||
else if (address >= 0x100000 && address + 3 <= 0x1fffff)
|
else if (address >= 0x100000 && address + 3 <= 0x1fffff)
|
||||||
{
|
{
|
||||||
result = Memory.mainram_Ptr[address & 0xffff] * 0x1000000 + Memory.mainram_Ptr[(address & 0xffff) + 1] * 0x10000 + Memory.mainram_Ptr[(address & 0xffff) + 2] * 0x100 + Memory.mainram_Ptr[(address & 0xffff) + 3];
|
result = Memory.mainram[address & 0xffff] * 0x1000000 + Memory.mainram[(address & 0xffff) + 1] * 0x10000 + Memory.mainram[(address & 0xffff) + 2] * 0x100 + Memory.mainram[(address & 0xffff) + 3];
|
||||||
}
|
}
|
||||||
else if (address >= 0x200000 && address + 3 <= 0x2fffff)
|
else if (address >= 0x200000 && address + 3 <= 0x2fffff)
|
||||||
{
|
{
|
||||||
result = Memory.mainrom_Ptr[main_cpu_bank_address + (address & 0xfffff)] * 0x1000000 + Memory.mainrom_Ptr[main_cpu_bank_address + (address & 0xfffff) + 1] * 0x10000 + Memory.mainrom_Ptr[main_cpu_bank_address + (address & 0xfffff) + 2] * 0x100 + Memory.mainrom_Ptr[main_cpu_bank_address + (address & 0xfffff) + 3];
|
result = Memory.mainrom[main_cpu_bank_address + (address & 0xfffff)] * 0x1000000 + Memory.mainrom[main_cpu_bank_address + (address & 0xfffff) + 1] * 0x10000 + Memory.mainrom[main_cpu_bank_address + (address & 0xfffff) + 2] * 0x100 + Memory.mainrom[main_cpu_bank_address + (address & 0xfffff) + 3];
|
||||||
}
|
}
|
||||||
else if (address >= 0x300000 && address <= 0x31ffff)
|
else if (address >= 0x300000 && address <= 0x31ffff)
|
||||||
{
|
{
|
||||||
@ -427,7 +427,7 @@ namespace MAME.Core
|
|||||||
int i2 = 1;
|
int i2 = 1;
|
||||||
//m68000Form.iStatus = 1;
|
//m68000Form.iStatus = 1;
|
||||||
}
|
}
|
||||||
Memory.mainram_Ptr[address & 0xffff] = (byte)value;
|
Memory.mainram[address & 0xffff] = (byte)value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x2ffff0 && address <= 0x2fffff)
|
else if (address >= 0x2ffff0 && address <= 0x2fffff)
|
||||||
{
|
{
|
||||||
@ -500,8 +500,8 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
int i1 = 1;
|
int i1 = 1;
|
||||||
}
|
}
|
||||||
Memory.mainram_Ptr[address & 0xffff] = (byte)(value >> 8);
|
Memory.mainram[address & 0xffff] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[(address & 0xffff) + 1] = (byte)value;
|
Memory.mainram[(address & 0xffff) + 1] = (byte)value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x2ffff0 && address <= 0x2fffff)
|
else if (address >= 0x2ffff0 && address <= 0x2fffff)
|
||||||
{
|
{
|
||||||
@ -551,10 +551,10 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
int i1 = 1;
|
int i1 = 1;
|
||||||
}
|
}
|
||||||
Memory.mainram_Ptr[address & 0xffff] = (byte)(value >> 24);
|
Memory.mainram[address & 0xffff] = (byte)(value >> 24);
|
||||||
Memory.mainram_Ptr[(address & 0xffff) + 1] = (byte)(value >> 16);
|
Memory.mainram[(address & 0xffff) + 1] = (byte)(value >> 16);
|
||||||
Memory.mainram_Ptr[(address & 0xffff) + 2] = (byte)(value >> 8);
|
Memory.mainram[(address & 0xffff) + 2] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[(address & 0xffff) + 3] = (byte)value;
|
Memory.mainram[(address & 0xffff) + 3] = (byte)value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x2ffff0 && address <= 0x2fffff)
|
else if (address >= 0x2ffff0 && address <= 0x2fffff)
|
||||||
{
|
{
|
||||||
@ -1975,27 +1975,27 @@ namespace MAME.Core
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address >= 0x0000 && address <= 0x7fff)
|
if (address >= 0x0000 && address <= 0x7fff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[address];
|
result = Memory.audiorom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0x8000 && address <= 0xbfff)
|
else if (address >= 0x8000 && address <= 0xbfff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[audio_cpu_banks[3] * 0x4000 + address - 0x8000];
|
result = Memory.audiorom[audio_cpu_banks[3] * 0x4000 + address - 0x8000];
|
||||||
}
|
}
|
||||||
else if (address >= 0xc000 && address <= 0xdfff)
|
else if (address >= 0xc000 && address <= 0xdfff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[audio_cpu_banks[2] * 0x2000 + address - 0xc000];
|
result = Memory.audiorom[audio_cpu_banks[2] * 0x2000 + address - 0xc000];
|
||||||
}
|
}
|
||||||
else if (address >= 0xe000 && address <= 0xefff)
|
else if (address >= 0xe000 && address <= 0xefff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[audio_cpu_banks[1] * 0x1000 + address - 0xe000];
|
result = Memory.audiorom[audio_cpu_banks[1] * 0x1000 + address - 0xe000];
|
||||||
}
|
}
|
||||||
else if (address >= 0xf000 && address <= 0xf7ff)
|
else if (address >= 0xf000 && address <= 0xf7ff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[audio_cpu_banks[0] * 0x800 + address - 0xf000];
|
result = Memory.audiorom[audio_cpu_banks[0] * 0x800 + address - 0xf000];
|
||||||
}
|
}
|
||||||
else if (address >= 0xf800 && address <= 0xffff)
|
else if (address >= 0xf800 && address <= 0xffff)
|
||||||
{
|
{
|
||||||
result = Memory.audioram_Ptr[address - 0xf800];
|
result = Memory.audioram[address - 0xf800];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -2004,27 +2004,27 @@ namespace MAME.Core
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address >= 0x0000 && address <= 0x7fff)
|
if (address >= 0x0000 && address <= 0x7fff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[address];
|
result = Memory.audiorom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0x8000 && address <= 0xbfff)
|
else if (address >= 0x8000 && address <= 0xbfff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[audio_cpu_banks[3] * 0x4000 + address - 0x8000];
|
result = Memory.audiorom[audio_cpu_banks[3] * 0x4000 + address - 0x8000];
|
||||||
}
|
}
|
||||||
else if (address >= 0xc000 && address <= 0xdfff)
|
else if (address >= 0xc000 && address <= 0xdfff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[audio_cpu_banks[2] * 0x2000 + address - 0xc000];
|
result = Memory.audiorom[audio_cpu_banks[2] * 0x2000 + address - 0xc000];
|
||||||
}
|
}
|
||||||
else if (address >= 0xe000 && address <= 0xefff)
|
else if (address >= 0xe000 && address <= 0xefff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[audio_cpu_banks[1] * 0x1000 + address - 0xe000];
|
result = Memory.audiorom[audio_cpu_banks[1] * 0x1000 + address - 0xe000];
|
||||||
}
|
}
|
||||||
else if (address >= 0xf000 && address <= 0xf7ff)
|
else if (address >= 0xf000 && address <= 0xf7ff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[audio_cpu_banks[0] * 0x800 + address - 0xf000];
|
result = Memory.audiorom[audio_cpu_banks[0] * 0x800 + address - 0xf000];
|
||||||
}
|
}
|
||||||
else if (address >= 0xf800 && address <= 0xffff)
|
else if (address >= 0xf800 && address <= 0xffff)
|
||||||
{
|
{
|
||||||
result = Memory.audioram_Ptr[address - 0xf800];
|
result = Memory.audioram[address - 0xf800];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -2032,7 +2032,7 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
if (address >= 0xf800 && address <= 0xffff)
|
if (address >= 0xf800 && address <= 0xffff)
|
||||||
{
|
{
|
||||||
Memory.audioram_Ptr[address - 0xf800] = value;
|
Memory.audioram[address - 0xf800] = value;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -262,7 +262,7 @@ namespace MAME.Core
|
|||||||
public static void main_cpu_bank_select_w(int data)
|
public static void main_cpu_bank_select_w(int data)
|
||||||
{
|
{
|
||||||
int bank_address;
|
int bank_address;
|
||||||
int len = Memory.mainrom_Lenght;
|
int len = Memory.mainromLength;
|
||||||
if ((len <= 0x100000) && ((data & 0x07) != 0))
|
if ((len <= 0x100000) && ((data & 0x07) != 0))
|
||||||
{
|
{
|
||||||
int i1 = 1;
|
int i1 = 1;
|
||||||
@ -313,7 +313,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
public static void machine_start_neogeo()
|
public static void machine_start_neogeo()
|
||||||
{
|
{
|
||||||
if (Memory.mainrom_Lenght > 0x100000)
|
if (Memory.mainromLength > 0x100000)
|
||||||
{
|
{
|
||||||
main_cpu_bank_address = 0x100000;
|
main_cpu_bank_address = 0x100000;
|
||||||
}
|
}
|
||||||
|
@ -63,16 +63,16 @@ namespace MAME.Core
|
|||||||
switch (value)
|
switch (value)
|
||||||
{
|
{
|
||||||
case 0x0090:
|
case 0x0090:
|
||||||
Memory.mainrom_Ptr[0x100] = 0x00;
|
Memory.mainrom[0x100] = 0x00;
|
||||||
Memory.mainrom_Ptr[0x101] = 0xc2;
|
Memory.mainrom[0x101] = 0xc2;
|
||||||
Memory.mainrom_Ptr[0x102] = 0x00;
|
Memory.mainrom[0x102] = 0x00;
|
||||||
Memory.mainrom_Ptr[0x103] = 0xfd;
|
Memory.mainrom[0x103] = 0xfd;
|
||||||
break;
|
break;
|
||||||
case 0x00f0:
|
case 0x00f0:
|
||||||
Memory.mainrom_Ptr[0x100] = 0x4e;
|
Memory.mainrom[0x100] = 0x4e;
|
||||||
Memory.mainrom_Ptr[0x101] = 0x45;
|
Memory.mainrom[0x101] = 0x45;
|
||||||
Memory.mainrom_Ptr[0x102] = 0x4f;
|
Memory.mainrom[0x102] = 0x4f;
|
||||||
Memory.mainrom_Ptr[0x103] = 0x2d;
|
Memory.mainrom[0x103] = 0x2d;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@ -305,7 +305,7 @@ namespace MAME.Core
|
|||||||
extra_ram[0x1ff1] = 0xa0;
|
extra_ram[0x1ff1] = 0xa0;
|
||||||
extra_ram[0x1ff2] &= 0x7f;
|
extra_ram[0x1ff2] &= 0x7f;
|
||||||
main_cpu_bank_address = address + 0x100000;
|
main_cpu_bank_address = address + 0x100000;
|
||||||
Memory.mainrom_Ptr[0x58197] = prt;
|
Memory.mainrom[0x58197] = prt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static void kof2003p_w(int offset)
|
public static void kof2003p_w(int offset)
|
||||||
@ -317,12 +317,12 @@ namespace MAME.Core
|
|||||||
extra_ram[0x1ff1] &= 0xfe;
|
extra_ram[0x1ff1] &= 0xfe;
|
||||||
extra_ram[0x1ff2] &= 0x7f;
|
extra_ram[0x1ff2] &= 0x7f;
|
||||||
main_cpu_bank_address = address + 0x100000;
|
main_cpu_bank_address = address + 0x100000;
|
||||||
Memory.mainrom_Ptr[0x58197] = prt;
|
Memory.mainrom[0x58197] = prt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static byte sbp_protection_r(int offset)
|
public static byte sbp_protection_r(int offset)
|
||||||
{
|
{
|
||||||
byte origdata = Memory.mainrom_Ptr[offset + 0x200];
|
byte origdata = Memory.mainrom[offset + 0x200];
|
||||||
byte data = (byte)BITSWAP8(origdata, 3, 2, 1, 0, 7, 6, 5, 4);
|
byte data = (byte)BITSWAP8(origdata, 3, 2, 1, 0, 7, 6, 5, 4);
|
||||||
int realoffset = 0x200 + offset;
|
int realoffset = 0x200 + offset;
|
||||||
if (realoffset == 0xd5e || realoffset == 0xd5f)
|
if (realoffset == 0xd5e || realoffset == 0xd5f)
|
||||||
@ -348,7 +348,7 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
if (extra_ram[0x1ffc] == 0 && extra_ram[0x1ffd] == 0)
|
if (extra_ram[0x1ffc] == 0 && extra_ram[0x1ffd] == 0)
|
||||||
{
|
{
|
||||||
Memory.mainrom_Ptr[0xe0000 + offset] = (byte)data;
|
Memory.mainrom[0xe0000 + offset] = (byte)data;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -359,8 +359,8 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
if (extra_ram[0x1ffc] == 0 && extra_ram[0x1ffd] == 0)
|
if (extra_ram[0x1ffc] == 0 && extra_ram[0x1ffd] == 0)
|
||||||
{
|
{
|
||||||
Memory.mainrom_Ptr[0xe0000 + offset] = (byte)(data >> 8);
|
Memory.mainrom[0xe0000 + offset] = (byte)(data >> 8);
|
||||||
Memory.mainrom_Ptr[0xe0000 + offset + 1] = (byte)data;
|
Memory.mainrom[0xe0000 + offset + 1] = (byte)data;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -383,8 +383,8 @@ namespace MAME.Core
|
|||||||
//Array.Copy(Memory.mainrom, ((data & 1) != 0) ? 0x810000 : 0x710000, Memory.mainrom, 0x10000, 0xcffff);
|
//Array.Copy(Memory.mainrom, ((data & 1) != 0) ? 0x810000 : 0x710000, Memory.mainrom, 0x10000, 0xcffff);
|
||||||
|
|
||||||
//TODO 验证拷贝可靠性
|
//TODO 验证拷贝可靠性
|
||||||
byte* source = Memory.mainrom_Ptr + ((data & 1) != 0 ? 0x810000 : 0x710000);
|
byte* source = Memory.mainrom + ((data & 1) != 0 ? 0x810000 : 0x710000);
|
||||||
byte* destination = Memory.mainrom_Ptr + 0x10000;
|
byte* destination = Memory.mainrom + 0x10000;
|
||||||
int length = 0xcffff; // 注意:这个长度是否正确取决于你的实际需求
|
int length = 0xcffff; // 注意:这个长度是否正确取决于你的实际需求
|
||||||
Buffer.MemoryCopy(source, destination, length, length);
|
Buffer.MemoryCopy(source, destination, length, length);
|
||||||
}
|
}
|
||||||
@ -407,8 +407,8 @@ namespace MAME.Core
|
|||||||
//Array.Copy(Memory.mainrom, ((data & 1) != 0) ? 0x810000 : 0x710000, Memory.mainrom, 0x10000, 0xcffff);
|
//Array.Copy(Memory.mainrom, ((data & 1) != 0) ? 0x810000 : 0x710000, Memory.mainrom, 0x10000, 0xcffff);
|
||||||
|
|
||||||
//TODO 验证拷贝可靠性
|
//TODO 验证拷贝可靠性
|
||||||
byte* source = Memory.mainrom_Ptr + ((data & 1) != 0 ? 0x810000 : 0x710000);
|
byte* source = Memory.mainrom + ((data & 1) != 0 ? 0x810000 : 0x710000);
|
||||||
byte* destination = Memory.mainrom_Ptr + 0x10000;
|
byte* destination = Memory.mainrom + 0x10000;
|
||||||
int length = 0xcffff; // 注意:这个长度是否正确取决于你的实际需求
|
int length = 0xcffff; // 注意:这个长度是否正确取决于你的实际需求
|
||||||
Buffer.MemoryCopy(source, destination, length, length);
|
Buffer.MemoryCopy(source, destination, length, length);
|
||||||
|
|
||||||
|
@ -46,9 +46,9 @@ namespace MAME.Core
|
|||||||
writer.Write(auto_animation_disabled);
|
writer.Write(auto_animation_disabled);
|
||||||
writer.Write(auto_animation_counter);
|
writer.Write(auto_animation_counter);
|
||||||
writer.Write(auto_animation_frame_counter);
|
writer.Write(auto_animation_frame_counter);
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x10000);
|
writer.Write(Memory.mainram, 0, 0x10000);
|
||||||
MC68000.m1.SaveStateBinary(writer);
|
MC68000.m1.SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram_Ptr, 0, 0x800);
|
writer.Write(Memory.audioram, 0, 0x800);
|
||||||
Z80A.zz1[0].SaveStateBinary(writer);
|
Z80A.zz1[0].SaveStateBinary(writer);
|
||||||
Cpuint.SaveStateBinary(writer);
|
Cpuint.SaveStateBinary(writer);
|
||||||
writer.Write(EmuTimer.global_basetime.seconds);
|
writer.Write(EmuTimer.global_basetime.seconds);
|
||||||
|
@ -14,9 +14,9 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x100000 && address <= 0x3fffff)
|
else if (address >= 0x100000 && address <= 0x3fffff)
|
||||||
{
|
{
|
||||||
if (address < 0x100000 + Memory.mainrom_Lenght)
|
if (address < 0x100000 + Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)(Memory.mainrom_Ptr[address - 0x100000]);
|
result = (sbyte)(Memory.mainrom[address - 0x100000]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -25,7 +25,7 @@
|
|||||||
}
|
}
|
||||||
/*else if (address >= 0x800000 && address <= 0x81ffff)
|
/*else if (address >= 0x800000 && address <= 0x81ffff)
|
||||||
{
|
{
|
||||||
result = (sbyte)Memory.mainram_Ptr[address - 0x800000];
|
result = (sbyte)Memory.mainram[address - 0x800000];
|
||||||
}*/
|
}*/
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -39,9 +39,9 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x100000 && address <= 0x3fffff)
|
else if (address >= 0x100000 && address <= 0x3fffff)
|
||||||
{
|
{
|
||||||
if (address < 0x100000 + Memory.mainrom_Lenght)
|
if (address < 0x100000 + Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)(Memory.mainrom_Ptr[address - 0x100000]);
|
result = (sbyte)(Memory.mainrom[address - 0x100000]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -50,7 +50,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x800000 && address <= 0x81ffff)
|
else if (address >= 0x800000 && address <= 0x81ffff)
|
||||||
{
|
{
|
||||||
result = (sbyte)Memory.mainram_Ptr[address - 0x800000];
|
result = (sbyte)Memory.mainram[address - 0x800000];
|
||||||
}
|
}
|
||||||
else if (address >= 0x900000 && address <= 0x903fff)
|
else if (address >= 0x900000 && address <= 0x903fff)
|
||||||
{
|
{
|
||||||
@ -128,9 +128,9 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x100000 && address + 1 <= 0x3fffff)
|
else if (address >= 0x100000 && address + 1 <= 0x3fffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < 0x100000 + Memory.mainrom_Lenght)
|
if (address + 1 < 0x100000 + Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address - 0x100000] * 0x100 + Memory.mainrom_Ptr[address - 0x100000 + 1]);
|
result = (short)(Memory.mainrom[address - 0x100000] * 0x100 + Memory.mainrom[address - 0x100000 + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -139,7 +139,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x800000 && address + 1 <= 0x81ffff)
|
else if (address >= 0x800000 && address + 1 <= 0x81ffff)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainram_Ptr[address - 0x800000] * 0x100 + Memory.mainram_Ptr[address - 0x800000 + 1]);
|
result = (short)(Memory.mainram[address - 0x800000] * 0x100 + Memory.mainram[address - 0x800000 + 1]);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -153,9 +153,9 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x100000 && address + 1 <= 0x3fffff)
|
else if (address >= 0x100000 && address + 1 <= 0x3fffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < 0x100000 + Memory.mainrom_Lenght)
|
if (address + 1 < 0x100000 + Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address - 0x100000] * 0x100 + Memory.mainrom_Ptr[address - 0x100000 + 1]);
|
result = (short)(Memory.mainrom[address - 0x100000] * 0x100 + Memory.mainrom[address - 0x100000 + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -164,7 +164,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x800000 && address + 1 <= 0x81ffff)
|
else if (address >= 0x800000 && address + 1 <= 0x81ffff)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainram_Ptr[address - 0x800000] * 0x100 + Memory.mainram_Ptr[address - 0x800000 + 1]);
|
result = (short)(Memory.mainram[address - 0x800000] * 0x100 + Memory.mainram[address - 0x800000 + 1]);
|
||||||
}
|
}
|
||||||
else if (address >= 0x900000 && address + 1 <= 0x903fff)
|
else if (address >= 0x900000 && address + 1 <= 0x903fff)
|
||||||
{
|
{
|
||||||
@ -235,9 +235,9 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x100000 && address + 3 <= 0x3fffff)
|
else if (address >= 0x100000 && address + 3 <= 0x3fffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < 0x100000 + Memory.mainrom_Lenght)
|
if (address + 3 < 0x100000 + Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = Memory.mainrom_Ptr[address - 0x100000] * 0x1000000 + Memory.mainrom_Ptr[address - 0x100000 + 1] * 0x10000 + Memory.mainrom_Ptr[address - 0x100000 + 2] * 0x100 + Memory.mainrom_Ptr[address - 0x100000 + 3];
|
result = Memory.mainrom[address - 0x100000] * 0x1000000 + Memory.mainrom[address - 0x100000 + 1] * 0x10000 + Memory.mainrom[address - 0x100000 + 2] * 0x100 + Memory.mainrom[address - 0x100000 + 3];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -246,7 +246,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x800000 && address + 3 <= 0x81ffff)
|
else if (address >= 0x800000 && address + 3 <= 0x81ffff)
|
||||||
{
|
{
|
||||||
result = Memory.mainram_Ptr[address - 0x800000] * 0x1000000 + Memory.mainram_Ptr[address - 0x800000 + 1] * 0x10000 + Memory.mainram_Ptr[address - 0x800000 + 2] * 0x100 + Memory.mainram_Ptr[address - 0x800000 + 3];
|
result = Memory.mainram[address - 0x800000] * 0x1000000 + Memory.mainram[address - 0x800000 + 1] * 0x10000 + Memory.mainram[address - 0x800000 + 2] * 0x100 + Memory.mainram[address - 0x800000 + 3];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -260,9 +260,9 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x100000 && address + 3 <= 0x3fffff)
|
else if (address >= 0x100000 && address + 3 <= 0x3fffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < 0x100000 + Memory.mainrom_Lenght)
|
if (address + 3 < 0x100000 + Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = Memory.mainrom_Ptr[address - 0x100000] * 0x1000000 + Memory.mainrom_Ptr[address - 0x100000 + 1] * 0x10000 + Memory.mainrom_Ptr[address - 0x100000 + 2] * 0x100 + Memory.mainrom_Ptr[address - 0x100000 + 3];
|
result = Memory.mainrom[address - 0x100000] * 0x1000000 + Memory.mainrom[address - 0x100000 + 1] * 0x10000 + Memory.mainrom[address - 0x100000 + 2] * 0x100 + Memory.mainrom[address - 0x100000 + 3];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -271,7 +271,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x800000 && address + 3 <= 0x81ffff)
|
else if (address >= 0x800000 && address + 3 <= 0x81ffff)
|
||||||
{
|
{
|
||||||
result = Memory.mainram_Ptr[address - 0x800000] * 0x1000000 + Memory.mainram_Ptr[address - 0x800000 + 1] * 0x10000 + Memory.mainram_Ptr[address - 0x800000 + 2] * 0x100 + Memory.mainram_Ptr[address - 0x800000 + 3];
|
result = Memory.mainram[address - 0x800000] * 0x1000000 + Memory.mainram[address - 0x800000 + 1] * 0x10000 + Memory.mainram[address - 0x800000 + 2] * 0x100 + Memory.mainram[address - 0x800000 + 3];
|
||||||
}
|
}
|
||||||
else if (address >= 0x900000 && address + 3 <= 0x903fff)
|
else if (address >= 0x900000 && address + 3 <= 0x903fff)
|
||||||
{
|
{
|
||||||
@ -342,7 +342,7 @@
|
|||||||
else if (address >= 0x800000 && address <= 0x81ffff)
|
else if (address >= 0x800000 && address <= 0x81ffff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x800000;
|
int offset = address - 0x800000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)value;
|
Memory.mainram[offset] = (byte)value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x900000 && address <= 0x903fff)
|
else if (address >= 0x900000 && address <= 0x903fff)
|
||||||
{
|
{
|
||||||
@ -431,8 +431,8 @@
|
|||||||
else if (address >= 0x800000 && address + 1 <= 0x81ffff)
|
else if (address >= 0x800000 && address + 1 <= 0x81ffff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x800000;
|
int offset = address - 0x800000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)(value >> 8);
|
Memory.mainram[offset] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[offset + 1] = (byte)value;
|
Memory.mainram[offset + 1] = (byte)value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x900000 && address + 1 <= 0x903fff)
|
else if (address >= 0x900000 && address + 1 <= 0x903fff)
|
||||||
{
|
{
|
||||||
@ -507,10 +507,10 @@
|
|||||||
else if (address >= 0x800000 && address + 3 <= 0x81ffff)
|
else if (address >= 0x800000 && address + 3 <= 0x81ffff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x800000;
|
int offset = address - 0x800000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)(value >> 24);
|
Memory.mainram[offset] = (byte)(value >> 24);
|
||||||
Memory.mainram_Ptr[offset + 1] = (byte)(value >> 16);
|
Memory.mainram[offset + 1] = (byte)(value >> 16);
|
||||||
Memory.mainram_Ptr[offset + 2] = (byte)(value >> 8);
|
Memory.mainram[offset + 2] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[offset + 3] = (byte)value;
|
Memory.mainram[offset + 3] = (byte)value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x900000 && address + 3 <= 0x903fff)
|
else if (address >= 0x900000 && address + 3 <= 0x903fff)
|
||||||
{
|
{
|
||||||
@ -587,12 +587,12 @@
|
|||||||
}
|
}
|
||||||
public static byte ZReadMemory(ushort address)
|
public static byte ZReadMemory(ushort address)
|
||||||
{
|
{
|
||||||
byte result = Memory.audioram_Ptr[address];
|
byte result = Memory.audioram[address];
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
public static void ZWriteMemory(ushort address, byte value)
|
public static void ZWriteMemory(ushort address, byte value)
|
||||||
{
|
{
|
||||||
Memory.audioram_Ptr[address] = value;
|
Memory.audioram[address] = value;
|
||||||
}
|
}
|
||||||
public static byte ZReadHardware(ushort address)
|
public static byte ZReadHardware(ushort address)
|
||||||
{
|
{
|
||||||
|
@ -103,12 +103,12 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
public unsafe static byte z80_ram_r(int offset)
|
public unsafe static byte z80_ram_r(int offset)
|
||||||
{
|
{
|
||||||
return Memory.audioram_Ptr[offset];
|
return Memory.audioram[offset];
|
||||||
}
|
}
|
||||||
public unsafe static void z80_ram_w(int offset, byte data)
|
public unsafe static void z80_ram_w(int offset, byte data)
|
||||||
{
|
{
|
||||||
int pc = MC68000.m1.PC;
|
int pc = MC68000.m1.PC;
|
||||||
Memory.audioram_Ptr[offset] = data;
|
Memory.audioram[offset] = data;
|
||||||
if (pc != 0xf12 && pc != 0xde2 && pc != 0x100c50 && pc != 0x100b20)
|
if (pc != 0xf12 && pc != 0xde2 && pc != 0x100c50 && pc != 0x100b20)
|
||||||
{
|
{
|
||||||
//error
|
//error
|
||||||
|
@ -33,9 +33,9 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
writer.Write(Palette.entry_color[i]);
|
writer.Write(Palette.entry_color[i]);
|
||||||
}
|
}
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x20000);
|
writer.Write(Memory.mainram, 0, 0x20000);
|
||||||
MC68000.m1.SaveStateBinary(writer);
|
MC68000.m1.SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram_Ptr, 0, 0x10000);
|
writer.Write(Memory.audioram, 0, 0x10000);
|
||||||
Z80A.zz1[0].SaveStateBinary(writer);
|
Z80A.zz1[0].SaveStateBinary(writer);
|
||||||
Cpuint.SaveStateBinary(writer);
|
Cpuint.SaveStateBinary(writer);
|
||||||
writer.Write(EmuTimer.global_basetime.seconds);
|
writer.Write(EmuTimer.global_basetime.seconds);
|
||||||
|
@ -398,7 +398,7 @@ namespace MAME.Core
|
|||||||
int i;
|
int i;
|
||||||
for (i = 0; i < 0x500; i++)
|
for (i = 0; i < 0x500; i++)
|
||||||
{
|
{
|
||||||
pgm_spritebufferram[i] = (ushort)(Memory.mainram_Ptr[i * 2] * 0x100 + Memory.mainram_Ptr[i * 2 + 1]);
|
pgm_spritebufferram[i] = (ushort)(Memory.mainram[i * 2] * 0x100 + Memory.mainram[i * 2 + 1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x8000 && address <= 0xbfff)
|
else if (address >= 0x8000 && address <= 0xbfff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
result = Memory.mainrom_Ptr[basebankmain + offset];
|
result = Memory.mainrom[basebankmain + offset];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -29,12 +29,12 @@ namespace MAME.Core
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0x7fff)
|
if (address <= 0x7fff)
|
||||||
{
|
{
|
||||||
result = Memory.mainrom_Ptr[address];
|
result = Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0x8000 && address <= 0xbfff)
|
else if (address >= 0x8000 && address <= 0xbfff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
result = Memory.mainrom_Ptr[basebankmain + offset];
|
result = Memory.mainrom[basebankmain + offset];
|
||||||
}
|
}
|
||||||
else if (address == 0xc000)
|
else if (address == 0xc000)
|
||||||
{
|
{
|
||||||
@ -64,7 +64,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0xc800 && address <= 0xdfff)
|
else if (address >= 0xc800 && address <= 0xdfff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xc800;
|
int offset = address - 0xc800;
|
||||||
result = Memory.mainram_Ptr[offset];
|
result = Memory.mainram[offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0xe000 && address <= 0xffff)
|
else if (address >= 0xe000 && address <= 0xffff)
|
||||||
{
|
{
|
||||||
@ -77,12 +77,12 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
if (address <= 0x7fff)
|
if (address <= 0x7fff)
|
||||||
{
|
{
|
||||||
Memory.mainrom_Ptr[address] = value;
|
Memory.mainrom[address] = value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x8000 && address <= 0xbfff)
|
else if (address >= 0x8000 && address <= 0xbfff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
Memory.mainrom_Ptr[basebankmain + offset] = value;
|
Memory.mainrom[basebankmain + offset] = value;
|
||||||
}
|
}
|
||||||
else if (address == 0xc200)
|
else if (address == 0xc200)
|
||||||
{
|
{
|
||||||
@ -116,7 +116,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0xc800 && address <= 0xdfff)
|
else if (address >= 0xc800 && address <= 0xdfff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xc800;
|
int offset = address - 0xc800;
|
||||||
Memory.mainram_Ptr[offset] = value;
|
Memory.mainram[offset] = value;
|
||||||
}
|
}
|
||||||
else if (address >= 0xe000 && address <= 0xffff)
|
else if (address >= 0xe000 && address <= 0xffff)
|
||||||
{
|
{
|
||||||
@ -141,7 +141,7 @@ namespace MAME.Core
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0x7fff)
|
if (address <= 0x7fff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[address];
|
result = Memory.audiorom[address];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -150,12 +150,12 @@ namespace MAME.Core
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0x7fff)
|
if (address <= 0x7fff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[address];
|
result = Memory.audiorom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0xc000 && address <= 0xc7ff)
|
else if (address >= 0xc000 && address <= 0xc7ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xc000;
|
int offset = address - 0xc000;
|
||||||
result = Memory.audioram_Ptr[offset];
|
result = Memory.audioram[offset];
|
||||||
}
|
}
|
||||||
else if (address == 0xc800)
|
else if (address == 0xc800)
|
||||||
{
|
{
|
||||||
@ -171,7 +171,7 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
if (address <= 0x7fff)
|
if (address <= 0x7fff)
|
||||||
{
|
{
|
||||||
Memory.audiorom_Ptr[address] = value;
|
Memory.audiorom[address] = value;
|
||||||
}
|
}
|
||||||
else if (address >= 0xa000 && address <= 0xa001)
|
else if (address >= 0xa000 && address <= 0xa001)
|
||||||
{
|
{
|
||||||
@ -186,7 +186,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0xc000 && address <= 0xc7ff)
|
else if (address >= 0xc000 && address <= 0xc7ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xc000;
|
int offset = address - 0xc000;
|
||||||
Memory.audioram_Ptr[offset] = value;
|
Memory.audioram[offset] = value;
|
||||||
}
|
}
|
||||||
else if (address == 0xd000)
|
else if (address == 0xd000)
|
||||||
{
|
{
|
||||||
|
@ -12,12 +12,12 @@ namespace MAME.Core
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0x7fff)
|
if (address <= 0x7fff)
|
||||||
{
|
{
|
||||||
result = Memory.mainrom_Ptr[address];
|
result = Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0x8000 && address <= 0xbfff)
|
else if (address >= 0x8000 && address <= 0xbfff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
result = Memory.mainrom_Ptr[basebankmain + offset];
|
result = Memory.mainrom[basebankmain + offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0xc000 && address <= 0xdcff)
|
else if (address >= 0xc000 && address <= 0xdcff)
|
||||||
{
|
{
|
||||||
@ -32,7 +32,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0xe000 && address <= 0xf7ff)
|
else if (address >= 0xe000 && address <= 0xf7ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xe000;
|
int offset = address - 0xe000;
|
||||||
result = Memory.mainram_Ptr[offset];
|
result = Memory.mainram[offset];
|
||||||
}
|
}
|
||||||
else if (address == 0xfa03)
|
else if (address == 0xfa03)
|
||||||
{
|
{
|
||||||
@ -73,12 +73,12 @@ namespace MAME.Core
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0x7fff)
|
if (address <= 0x7fff)
|
||||||
{
|
{
|
||||||
result = Memory.mainrom_Ptr[address];
|
result = Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0x8000 && address <= 0xbfff)
|
else if (address >= 0x8000 && address <= 0xbfff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
result = Memory.mainrom_Ptr[basebankmain + offset];
|
result = Memory.mainrom[basebankmain + offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0xc000 && address <= 0xdcff)
|
else if (address >= 0xc000 && address <= 0xdcff)
|
||||||
{
|
{
|
||||||
@ -93,7 +93,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0xe000 && address <= 0xf7ff)
|
else if (address >= 0xe000 && address <= 0xf7ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xe000;
|
int offset = address - 0xe000;
|
||||||
result = Memory.mainram_Ptr[offset];
|
result = Memory.mainram[offset];
|
||||||
}
|
}
|
||||||
else if (address == 0xfa03)
|
else if (address == 0xfa03)
|
||||||
{
|
{
|
||||||
@ -134,12 +134,12 @@ namespace MAME.Core
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0x7fff)
|
if (address <= 0x7fff)
|
||||||
{
|
{
|
||||||
result = Memory.mainrom_Ptr[address];
|
result = Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0x8000 && address <= 0xbfff)
|
else if (address >= 0x8000 && address <= 0xbfff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
result = Memory.mainrom_Ptr[basebankmain + offset];
|
result = Memory.mainrom[basebankmain + offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0xc000 && address <= 0xdcff)
|
else if (address >= 0xc000 && address <= 0xdcff)
|
||||||
{
|
{
|
||||||
@ -154,7 +154,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0xe000 && address <= 0xf7ff)
|
else if (address >= 0xe000 && address <= 0xf7ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xe000;
|
int offset = address - 0xe000;
|
||||||
result = Memory.mainram_Ptr[offset];
|
result = Memory.mainram[offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0xfc00 && address <= 0xfcff)
|
else if (address >= 0xfc00 && address <= 0xfcff)
|
||||||
{
|
{
|
||||||
@ -202,12 +202,12 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
if (address >= 0x0000 && address <= 0x7fff)
|
if (address >= 0x0000 && address <= 0x7fff)
|
||||||
{
|
{
|
||||||
Memory.audiorom_Ptr[address] = value;
|
Memory.audiorom[address] = value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x8000 && address <= 0xbfff)
|
else if (address >= 0x8000 && address <= 0xbfff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
Memory.mainrom_Ptr[basebankmain + offset] = value;
|
Memory.mainrom[basebankmain + offset] = value;
|
||||||
}
|
}
|
||||||
else if (address >= 0xc000 && address <= 0xdcff)
|
else if (address >= 0xc000 && address <= 0xdcff)
|
||||||
{
|
{
|
||||||
@ -222,7 +222,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0xe000 && address <= 0xf7ff)
|
else if (address >= 0xe000 && address <= 0xf7ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xe000;
|
int offset = address - 0xe000;
|
||||||
Memory.mainram_Ptr[offset] = value;
|
Memory.mainram[offset] = value;
|
||||||
}
|
}
|
||||||
else if (address >= 0xf800 && address <= 0xf9ff)
|
else if (address >= 0xf800 && address <= 0xf9ff)
|
||||||
{
|
{
|
||||||
@ -258,12 +258,12 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
if (address >= 0x0000 && address <= 0x7fff)
|
if (address >= 0x0000 && address <= 0x7fff)
|
||||||
{
|
{
|
||||||
Memory.audiorom_Ptr[address] = value;
|
Memory.audiorom[address] = value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x8000 && address <= 0xbfff)
|
else if (address >= 0x8000 && address <= 0xbfff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
Memory.mainrom_Ptr[basebankmain + offset] = value;
|
Memory.mainrom[basebankmain + offset] = value;
|
||||||
}
|
}
|
||||||
else if (address >= 0xc000 && address <= 0xdcff)
|
else if (address >= 0xc000 && address <= 0xdcff)
|
||||||
{
|
{
|
||||||
@ -278,7 +278,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0xe000 && address <= 0xf7ff)
|
else if (address >= 0xe000 && address <= 0xf7ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xe000;
|
int offset = address - 0xe000;
|
||||||
Memory.mainram_Ptr[offset] = value;
|
Memory.mainram[offset] = value;
|
||||||
}
|
}
|
||||||
else if (address >= 0xf800 && address <= 0xf9ff)
|
else if (address >= 0xf800 && address <= 0xf9ff)
|
||||||
{
|
{
|
||||||
@ -340,7 +340,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x8000 && address <= 0x97ff)
|
else if (address >= 0x8000 && address <= 0x97ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
result = Memory.mainram_Ptr[offset];
|
result = Memory.mainram[offset];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -354,7 +354,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x8000 && address <= 0x97ff)
|
else if (address >= 0x8000 && address <= 0x97ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
result = Memory.mainram_Ptr[offset];
|
result = Memory.mainram[offset];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -367,7 +367,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x8000 && address <= 0x97ff)
|
else if (address >= 0x8000 && address <= 0x97ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
Memory.mainram_Ptr[offset] = value;
|
Memory.mainram[offset] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static byte Z2ReadMemory_tokio(ushort address)
|
public static byte Z2ReadMemory_tokio(ushort address)
|
||||||
@ -375,12 +375,12 @@ namespace MAME.Core
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0x7fff)
|
if (address <= 0x7fff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[address];
|
result = Memory.audiorom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0x8000 && address <= 0x8fff)
|
else if (address >= 0x8000 && address <= 0x8fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
result = Memory.audioram_Ptr[offset];
|
result = Memory.audioram[offset];
|
||||||
}
|
}
|
||||||
else if (address == 0x9000)
|
else if (address == 0x9000)
|
||||||
{
|
{
|
||||||
@ -400,7 +400,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0xe000 && address <= 0xffff)
|
else if (address >= 0xe000 && address <= 0xffff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[address];
|
result = Memory.audiorom[address];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -408,12 +408,12 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
if (address <= 0x7fff)
|
if (address <= 0x7fff)
|
||||||
{
|
{
|
||||||
Memory.audiorom_Ptr[address] = value;
|
Memory.audiorom[address] = value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x8000 && address <= 0x8fff)
|
else if (address >= 0x8000 && address <= 0x8fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
Memory.audioram_Ptr[offset] = value;
|
Memory.audioram[offset] = value;
|
||||||
}
|
}
|
||||||
else if (address == 0x9000)
|
else if (address == 0x9000)
|
||||||
{
|
{
|
||||||
@ -437,7 +437,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0xe000 && address <= 0xffff)
|
else if (address >= 0xe000 && address <= 0xffff)
|
||||||
{
|
{
|
||||||
Memory.audiorom_Ptr[address] = value;
|
Memory.audiorom[address] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static byte Z0ReadOp_bublbobl(ushort address)
|
public static byte Z0ReadOp_bublbobl(ushort address)
|
||||||
@ -445,12 +445,12 @@ namespace MAME.Core
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0x7fff)
|
if (address <= 0x7fff)
|
||||||
{
|
{
|
||||||
result = Memory.mainrom_Ptr[address];
|
result = Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0x8000 && address <= 0xbfff)
|
else if (address >= 0x8000 && address <= 0xbfff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
result = Memory.mainrom_Ptr[basebankmain + offset];
|
result = Memory.mainrom[basebankmain + offset];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -463,12 +463,12 @@ namespace MAME.Core
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0x7fff)
|
if (address <= 0x7fff)
|
||||||
{
|
{
|
||||||
result = Memory.mainrom_Ptr[address];
|
result = Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0x8000 && address <= 0xbfff)
|
else if (address >= 0x8000 && address <= 0xbfff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
result = Memory.mainrom_Ptr[basebankmain + offset];
|
result = Memory.mainrom[basebankmain + offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0xc000 && address <= 0xdcff)
|
else if (address >= 0xc000 && address <= 0xdcff)
|
||||||
{
|
{
|
||||||
@ -483,7 +483,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0xe000 && address <= 0xf7ff)
|
else if (address >= 0xe000 && address <= 0xf7ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xe000;
|
int offset = address - 0xe000;
|
||||||
result = Memory.mainram_Ptr[offset];
|
result = Memory.mainram[offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0xfc00 && address <= 0xffff)
|
else if (address >= 0xfc00 && address <= 0xffff)
|
||||||
{
|
{
|
||||||
@ -500,12 +500,12 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
if (address >= 0x0000 && address <= 0x7fff)
|
if (address >= 0x0000 && address <= 0x7fff)
|
||||||
{
|
{
|
||||||
Memory.audiorom_Ptr[address] = value;
|
Memory.audiorom[address] = value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x8000 && address <= 0xbfff)
|
else if (address >= 0x8000 && address <= 0xbfff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
Memory.mainrom_Ptr[basebankmain + offset] = value;
|
Memory.mainrom[basebankmain + offset] = value;
|
||||||
}
|
}
|
||||||
else if (address >= 0xc000 && address <= 0xdcff)
|
else if (address >= 0xc000 && address <= 0xdcff)
|
||||||
{
|
{
|
||||||
@ -520,7 +520,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0xe000 && address <= 0xf7ff)
|
else if (address >= 0xe000 && address <= 0xf7ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xe000;
|
int offset = address - 0xe000;
|
||||||
Memory.mainram_Ptr[offset] = value;
|
Memory.mainram[offset] = value;
|
||||||
}
|
}
|
||||||
else if (address >= 0xf800 && address <= 0xf9ff)
|
else if (address >= 0xf800 && address <= 0xf9ff)
|
||||||
{
|
{
|
||||||
@ -567,7 +567,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0xe000 && address <= 0xf7ff)
|
else if (address >= 0xe000 && address <= 0xf7ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xe000;
|
int offset = address - 0xe000;
|
||||||
result = Memory.mainram_Ptr[offset];
|
result = Memory.mainram[offset];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -581,7 +581,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0xe000 && address <= 0xf7ff)
|
else if (address >= 0xe000 && address <= 0xf7ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xe000;
|
int offset = address - 0xe000;
|
||||||
result = Memory.mainram_Ptr[offset];
|
result = Memory.mainram[offset];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -594,7 +594,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0xe000 && address <= 0xf7ff)
|
else if (address >= 0xe000 && address <= 0xf7ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xe000;
|
int offset = address - 0xe000;
|
||||||
Memory.mainram_Ptr[offset] = value;
|
Memory.mainram[offset] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static byte Z1ReadHardware(ushort address)
|
public static byte Z1ReadHardware(ushort address)
|
||||||
@ -617,12 +617,12 @@ namespace MAME.Core
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0x7fff)
|
if (address <= 0x7fff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[address];
|
result = Memory.audiorom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0x8000 && address <= 0x8fff)
|
else if (address >= 0x8000 && address <= 0x8fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
result = Memory.audioram_Ptr[offset];
|
result = Memory.audioram[offset];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -631,12 +631,12 @@ namespace MAME.Core
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0x7fff)
|
if (address <= 0x7fff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[address];
|
result = Memory.audiorom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0x8000 && address <= 0x8fff)
|
else if (address >= 0x8000 && address <= 0x8fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
result = Memory.audioram_Ptr[offset];
|
result = Memory.audioram[offset];
|
||||||
}
|
}
|
||||||
else if (address == 0x9000)
|
else if (address == 0x9000)
|
||||||
{
|
{
|
||||||
@ -656,7 +656,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0xe000 && address <= 0xffff)
|
else if (address >= 0xe000 && address <= 0xffff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[address];
|
result = Memory.audiorom[address];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -664,12 +664,12 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
if (address <= 0x7fff)
|
if (address <= 0x7fff)
|
||||||
{
|
{
|
||||||
Memory.audiorom_Ptr[address] = value;
|
Memory.audiorom[address] = value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x8000 && address <= 0x8fff)
|
else if (address >= 0x8000 && address <= 0x8fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
Memory.audioram_Ptr[offset] = value;
|
Memory.audioram[offset] = value;
|
||||||
}
|
}
|
||||||
else if (address == 0x9000)
|
else if (address == 0x9000)
|
||||||
{
|
{
|
||||||
@ -697,7 +697,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0xe000 && address <= 0xffff)
|
else if (address >= 0xe000 && address <= 0xffff)
|
||||||
{
|
{
|
||||||
Memory.audiorom_Ptr[address] = value;
|
Memory.audiorom[address] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static byte Z2ReadHardware(ushort address)
|
public static byte Z2ReadHardware(ushort address)
|
||||||
@ -896,9 +896,9 @@ namespace MAME.Core
|
|||||||
sbyte result = 0;
|
sbyte result = 0;
|
||||||
if (address <= 0x03ffff)
|
if (address <= 0x03ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)(Memory.mainrom_Ptr[address]);
|
result = (sbyte)(Memory.mainrom[address]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -914,9 +914,9 @@ namespace MAME.Core
|
|||||||
int add1;
|
int add1;
|
||||||
if (address <= 0x03ffff)
|
if (address <= 0x03ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)(Memory.mainrom_Ptr[address]);
|
result = (sbyte)(Memory.mainrom[address]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -953,7 +953,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x100000 && address <= 0x107fff)
|
else if (address >= 0x100000 && address <= 0x107fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
result = (sbyte)Memory.mainram_Ptr[offset];
|
result = (sbyte)Memory.mainram[offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0x200000 && address <= 0x200fff)
|
else if (address >= 0x200000 && address <= 0x200fff)
|
||||||
{
|
{
|
||||||
@ -1038,9 +1038,9 @@ namespace MAME.Core
|
|||||||
short result = 0;
|
short result = 0;
|
||||||
if (address <= 0x03ffff)
|
if (address <= 0x03ffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1056,9 +1056,9 @@ namespace MAME.Core
|
|||||||
int add1;
|
int add1;
|
||||||
if (address <= 0x03ffff)
|
if (address <= 0x03ffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1081,7 +1081,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x100000 && address + 1 <= 0x107fff)
|
else if (address >= 0x100000 && address + 1 <= 0x107fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
result = (short)(Memory.mainram_Ptr[offset] * 0x100 + Memory.mainram_Ptr[offset + 1]);
|
result = (short)(Memory.mainram[offset] * 0x100 + Memory.mainram[offset + 1]);
|
||||||
}
|
}
|
||||||
else if (address >= 0x200000 && address + 1 <= 0x200fff)
|
else if (address >= 0x200000 && address + 1 <= 0x200fff)
|
||||||
{
|
{
|
||||||
@ -1124,9 +1124,9 @@ namespace MAME.Core
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address <= 0x03ffff)
|
if (address <= 0x03ffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1142,10 +1142,10 @@ namespace MAME.Core
|
|||||||
int add1;
|
int add1;
|
||||||
if (address <= 0x03ffff)
|
if (address <= 0x03ffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
int offset = (address - 0x000000) / 2;
|
int offset = (address - 0x000000) / 2;
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1164,7 +1164,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x100000 && address + 3 <= 0x107fff)
|
else if (address >= 0x100000 && address + 3 <= 0x107fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
result = (int)(Memory.mainram_Ptr[offset] * 0x1000000 + Memory.mainram_Ptr[offset + 1] * 0x10000 + Memory.mainram_Ptr[offset + 2] * 0x100 + Memory.mainram_Ptr[offset + 3]);
|
result = (int)(Memory.mainram[offset] * 0x1000000 + Memory.mainram[offset + 1] * 0x10000 + Memory.mainram[offset + 2] * 0x100 + Memory.mainram[offset + 3]);
|
||||||
}
|
}
|
||||||
else if (address >= 0x200000 && address + 3 <= 0x200fff)
|
else if (address >= 0x200000 && address + 3 <= 0x200fff)
|
||||||
{
|
{
|
||||||
@ -1198,9 +1198,9 @@ namespace MAME.Core
|
|||||||
address &= 0xffffff;
|
address &= 0xffffff;
|
||||||
if (address >= 0x000000 && address <= 0x03ffff)
|
if (address >= 0x000000 && address <= 0x03ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
Memory.mainrom_Ptr[address] = (byte)value;
|
Memory.mainrom[address] = (byte)value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (address >= 0x0ff000 && address <= 0x0ff7ff)
|
else if (address >= 0x0ff000 && address <= 0x0ff7ff)
|
||||||
@ -1229,7 +1229,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x100000 && address <= 0x107fff)
|
else if (address >= 0x100000 && address <= 0x107fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)value;
|
Memory.mainram[offset] = (byte)value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x200000 && address <= 0x200fff)
|
else if (address >= 0x200000 && address <= 0x200fff)
|
||||||
{
|
{
|
||||||
@ -1340,10 +1340,10 @@ namespace MAME.Core
|
|||||||
address &= 0xffffff;
|
address &= 0xffffff;
|
||||||
if (address >= 0x000000 && address + 1 <= 0x03ffff)
|
if (address >= 0x000000 && address + 1 <= 0x03ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
Memory.mainrom_Ptr[address] = (byte)(value >> 8);
|
Memory.mainrom[address] = (byte)(value >> 8);
|
||||||
Memory.mainrom_Ptr[address + 1] = (byte)value;
|
Memory.mainrom[address + 1] = (byte)value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (address >= 0x0ff000 && address + 1 <= 0x0ff7ff)
|
else if (address >= 0x0ff000 && address + 1 <= 0x0ff7ff)
|
||||||
@ -1362,8 +1362,8 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x100000 && address + 1 <= 0x107fff)
|
else if (address >= 0x100000 && address + 1 <= 0x107fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)(value >> 8);
|
Memory.mainram[offset] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[offset + 1] = (byte)value;
|
Memory.mainram[offset + 1] = (byte)value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x200000 && address + 1 <= 0x200fff)
|
else if (address >= 0x200000 && address + 1 <= 0x200fff)
|
||||||
{
|
{
|
||||||
@ -1424,12 +1424,12 @@ namespace MAME.Core
|
|||||||
address &= 0xffffff;
|
address &= 0xffffff;
|
||||||
if (address >= 0x000000 && address + 3 <= 0x03ffff)
|
if (address >= 0x000000 && address + 3 <= 0x03ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
Memory.mainrom_Ptr[address] = (byte)(value >> 24);
|
Memory.mainrom[address] = (byte)(value >> 24);
|
||||||
Memory.mainrom_Ptr[address + 1] = (byte)(value >> 16);
|
Memory.mainrom[address + 1] = (byte)(value >> 16);
|
||||||
Memory.mainrom_Ptr[address + 2] = (byte)(value >> 8);
|
Memory.mainrom[address + 2] = (byte)(value >> 8);
|
||||||
Memory.mainrom_Ptr[address + 3] = (byte)value;
|
Memory.mainrom[address + 3] = (byte)value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (address >= 0x0ff000 && address + 3 <= 0x0ff7ff)
|
else if (address >= 0x0ff000 && address + 3 <= 0x0ff7ff)
|
||||||
@ -1441,10 +1441,10 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x100000 && address + 3 <= 0x107fff)
|
else if (address >= 0x100000 && address + 3 <= 0x107fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)(value >> 24);
|
Memory.mainram[offset] = (byte)(value >> 24);
|
||||||
Memory.mainram_Ptr[offset + 1] = (byte)(value >> 16);
|
Memory.mainram[offset + 1] = (byte)(value >> 16);
|
||||||
Memory.mainram_Ptr[offset + 2] = (byte)(value >> 8);
|
Memory.mainram[offset + 2] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[offset + 3] = (byte)value;
|
Memory.mainram[offset + 3] = (byte)value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x200000 && address + 3 <= 0x200fff)
|
else if (address >= 0x200000 && address + 3 <= 0x200fff)
|
||||||
{
|
{
|
||||||
@ -1483,9 +1483,9 @@ namespace MAME.Core
|
|||||||
sbyte result = 0;
|
sbyte result = 0;
|
||||||
if (address <= 0x03ffff)
|
if (address <= 0x03ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)(Memory.mainrom_Ptr[address]);
|
result = (sbyte)(Memory.mainrom[address]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1519,7 +1519,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x100000 && address <= 0x107fff)
|
else if (address >= 0x100000 && address <= 0x107fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
result = (sbyte)Memory.mainram_Ptr[offset];
|
result = (sbyte)Memory.mainram[offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0x200000 && address <= 0x200fff)
|
else if (address >= 0x200000 && address <= 0x200fff)
|
||||||
{
|
{
|
||||||
@ -1604,9 +1604,9 @@ namespace MAME.Core
|
|||||||
short result = 0;
|
short result = 0;
|
||||||
if (address <= 0x03ffff)
|
if (address <= 0x03ffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1621,9 +1621,9 @@ namespace MAME.Core
|
|||||||
short result = 0;
|
short result = 0;
|
||||||
if (address <= 0x03ffff)
|
if (address <= 0x03ffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1643,7 +1643,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x100000 && address + 1 <= 0x107fff)
|
else if (address >= 0x100000 && address + 1 <= 0x107fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
result = (short)(Memory.mainram_Ptr[offset] * 0x100 + Memory.mainram_Ptr[offset + 1]);
|
result = (short)(Memory.mainram[offset] * 0x100 + Memory.mainram[offset + 1]);
|
||||||
}
|
}
|
||||||
else if (address >= 0x200000 && address + 1 <= 0x200fff)
|
else if (address >= 0x200000 && address + 1 <= 0x200fff)
|
||||||
{
|
{
|
||||||
@ -1686,9 +1686,9 @@ namespace MAME.Core
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address <= 0x03ffff)
|
if (address <= 0x03ffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1703,10 +1703,10 @@ namespace MAME.Core
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address <= 0x03ffff)
|
if (address <= 0x03ffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
int offset = (address - 0x000000) / 2;
|
int offset = (address - 0x000000) / 2;
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1726,7 +1726,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x100000 && address + 3 <= 0x107fff)
|
else if (address >= 0x100000 && address + 3 <= 0x107fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
result = (int)(Memory.mainram_Ptr[offset] * 0x1000000 + Memory.mainram_Ptr[offset + 1] * 0x10000 + Memory.mainram_Ptr[offset + 2] * 0x100 + Memory.mainram_Ptr[offset + 3]);
|
result = (int)(Memory.mainram[offset] * 0x1000000 + Memory.mainram[offset + 1] * 0x10000 + Memory.mainram[offset + 2] * 0x100 + Memory.mainram[offset + 3]);
|
||||||
}
|
}
|
||||||
else if (address >= 0x200000 && address + 3 <= 0x200fff)
|
else if (address >= 0x200000 && address + 3 <= 0x200fff)
|
||||||
{
|
{
|
||||||
@ -1760,9 +1760,9 @@ namespace MAME.Core
|
|||||||
address &= 0xffffff;
|
address &= 0xffffff;
|
||||||
if (address >= 0x000000 && address <= 0x03ffff)
|
if (address >= 0x000000 && address <= 0x03ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
Memory.mainrom_Ptr[address] = (byte)value;
|
Memory.mainrom[address] = (byte)value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (address >= 0x0ff000 && address <= 0x0fffff)
|
else if (address >= 0x0ff000 && address <= 0x0fffff)
|
||||||
@ -1780,7 +1780,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x100000 && address <= 0x107fff)
|
else if (address >= 0x100000 && address <= 0x107fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)value;
|
Memory.mainram[offset] = (byte)value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x200000 && address <= 0x200fff)
|
else if (address >= 0x200000 && address <= 0x200fff)
|
||||||
{
|
{
|
||||||
@ -1891,10 +1891,10 @@ namespace MAME.Core
|
|||||||
address &= 0xffffff;
|
address &= 0xffffff;
|
||||||
if (address >= 0x000000 && address + 1 <= 0x03ffff)
|
if (address >= 0x000000 && address + 1 <= 0x03ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
Memory.mainrom_Ptr[address] = (byte)(value >> 8);
|
Memory.mainrom[address] = (byte)(value >> 8);
|
||||||
Memory.mainrom_Ptr[address + 1] = (byte)value;
|
Memory.mainrom[address + 1] = (byte)value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (address >= 0x0ff000 && address + 1 <= 0x0fffff)
|
else if (address >= 0x0ff000 && address + 1 <= 0x0fffff)
|
||||||
@ -1905,8 +1905,8 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x100000 && address + 1 <= 0x107fff)
|
else if (address >= 0x100000 && address + 1 <= 0x107fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)(value >> 8);
|
Memory.mainram[offset] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[offset + 1] = (byte)value;
|
Memory.mainram[offset + 1] = (byte)value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x200000 && address + 1 <= 0x200fff)
|
else if (address >= 0x200000 && address + 1 <= 0x200fff)
|
||||||
{
|
{
|
||||||
@ -1967,12 +1967,12 @@ namespace MAME.Core
|
|||||||
address &= 0xffffff;
|
address &= 0xffffff;
|
||||||
if (address >= 0x000000 && address + 3 <= 0x03ffff)
|
if (address >= 0x000000 && address + 3 <= 0x03ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
Memory.mainrom_Ptr[address] = (byte)(value >> 24);
|
Memory.mainrom[address] = (byte)(value >> 24);
|
||||||
Memory.mainrom_Ptr[address + 1] = (byte)(value >> 16);
|
Memory.mainrom[address + 1] = (byte)(value >> 16);
|
||||||
Memory.mainrom_Ptr[address + 2] = (byte)(value >> 8);
|
Memory.mainrom[address + 2] = (byte)(value >> 8);
|
||||||
Memory.mainrom_Ptr[address + 3] = (byte)value;
|
Memory.mainrom[address + 3] = (byte)value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (address >= 0x0ff000 && address + 3 <= 0x0fffff)
|
else if (address >= 0x0ff000 && address + 3 <= 0x0fffff)
|
||||||
@ -1984,10 +1984,10 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x100000 && address + 3 <= 0x107fff)
|
else if (address >= 0x100000 && address + 3 <= 0x107fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)(value >> 24);
|
Memory.mainram[offset] = (byte)(value >> 24);
|
||||||
Memory.mainram_Ptr[offset + 1] = (byte)(value >> 16);
|
Memory.mainram[offset + 1] = (byte)(value >> 16);
|
||||||
Memory.mainram_Ptr[offset + 2] = (byte)(value >> 8);
|
Memory.mainram[offset + 2] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[offset + 3] = (byte)value;
|
Memory.mainram[offset + 3] = (byte)value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x200000 && address + 3 <= 0x200fff)
|
else if (address >= 0x200000 && address + 3 <= 0x200fff)
|
||||||
{
|
{
|
||||||
@ -2026,9 +2026,9 @@ namespace MAME.Core
|
|||||||
sbyte result = 0;
|
sbyte result = 0;
|
||||||
if (address <= 0x03ffff)
|
if (address <= 0x03ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)(Memory.mainrom_Ptr[address]);
|
result = (sbyte)(Memory.mainrom[address]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2038,7 +2038,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x100000 && address <= 0x107fff)
|
else if (address >= 0x100000 && address <= 0x107fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
result = (sbyte)Memory.mainram_Ptr[offset];
|
result = (sbyte)Memory.mainram[offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0x200000 && address <= 0x200fff)
|
else if (address >= 0x200000 && address <= 0x200fff)
|
||||||
{
|
{
|
||||||
@ -2123,9 +2123,9 @@ namespace MAME.Core
|
|||||||
short result = 0;
|
short result = 0;
|
||||||
if (address <= 0x03ffff)
|
if (address <= 0x03ffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2135,7 +2135,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x100000 && address + 1 <= 0x107fff)
|
else if (address >= 0x100000 && address + 1 <= 0x107fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
result = (short)(Memory.mainram_Ptr[offset] * 0x100 + Memory.mainram_Ptr[offset + 1]);
|
result = (short)(Memory.mainram[offset] * 0x100 + Memory.mainram[offset + 1]);
|
||||||
}
|
}
|
||||||
else if (address >= 0x200000 && address + 1 <= 0x200fff)
|
else if (address >= 0x200000 && address + 1 <= 0x200fff)
|
||||||
{
|
{
|
||||||
@ -2178,10 +2178,10 @@ namespace MAME.Core
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address <= 0x03ffff)
|
if (address <= 0x03ffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
int offset = (address - 0x000000) / 2;
|
int offset = (address - 0x000000) / 2;
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2191,7 +2191,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x100000 && address + 3 <= 0x107fff)
|
else if (address >= 0x100000 && address + 3 <= 0x107fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
result = (int)(Memory.mainram_Ptr[offset] * 0x1000000 + Memory.mainram_Ptr[offset + 1] * 0x10000 + Memory.mainram_Ptr[offset + 2] * 0x100 + Memory.mainram_Ptr[offset + 3]);
|
result = (int)(Memory.mainram[offset] * 0x1000000 + Memory.mainram[offset + 1] * 0x10000 + Memory.mainram[offset + 2] * 0x100 + Memory.mainram[offset + 3]);
|
||||||
}
|
}
|
||||||
else if (address >= 0x200000 && address + 3 <= 0x200fff)
|
else if (address >= 0x200000 && address + 3 <= 0x200fff)
|
||||||
{
|
{
|
||||||
@ -2225,15 +2225,15 @@ namespace MAME.Core
|
|||||||
address &= 0xffffff;
|
address &= 0xffffff;
|
||||||
if (address >= 0x000000 && address <= 0x03ffff)
|
if (address >= 0x000000 && address <= 0x03ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
Memory.mainrom_Ptr[address] = (byte)value;
|
Memory.mainrom[address] = (byte)value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (address >= 0x100000 && address <= 0x107fff)
|
else if (address >= 0x100000 && address <= 0x107fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)value;
|
Memory.mainram[offset] = (byte)value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x200000 && address <= 0x200fff)
|
else if (address >= 0x200000 && address <= 0x200fff)
|
||||||
{
|
{
|
||||||
@ -2344,17 +2344,17 @@ namespace MAME.Core
|
|||||||
address &= 0xffffff;
|
address &= 0xffffff;
|
||||||
if (address >= 0x000000 && address + 1 <= 0x03ffff)
|
if (address >= 0x000000 && address + 1 <= 0x03ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
Memory.mainrom_Ptr[address] = (byte)(value >> 8);
|
Memory.mainrom[address] = (byte)(value >> 8);
|
||||||
Memory.mainrom_Ptr[address + 1] = (byte)value;
|
Memory.mainrom[address + 1] = (byte)value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (address >= 0x100000 && address + 1 <= 0x107fff)
|
else if (address >= 0x100000 && address + 1 <= 0x107fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)(value >> 8);
|
Memory.mainram[offset] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[offset + 1] = (byte)value;
|
Memory.mainram[offset + 1] = (byte)value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x200000 && address + 1 <= 0x200fff)
|
else if (address >= 0x200000 && address + 1 <= 0x200fff)
|
||||||
{
|
{
|
||||||
@ -2415,21 +2415,21 @@ namespace MAME.Core
|
|||||||
address &= 0xffffff;
|
address &= 0xffffff;
|
||||||
if (address >= 0x000000 && address + 3 <= 0x03ffff)
|
if (address >= 0x000000 && address + 3 <= 0x03ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
Memory.mainrom_Ptr[address] = (byte)(value >> 24);
|
Memory.mainrom[address] = (byte)(value >> 24);
|
||||||
Memory.mainrom_Ptr[address + 1] = (byte)(value >> 16);
|
Memory.mainrom[address + 1] = (byte)(value >> 16);
|
||||||
Memory.mainrom_Ptr[address + 2] = (byte)(value >> 8);
|
Memory.mainrom[address + 2] = (byte)(value >> 8);
|
||||||
Memory.mainrom_Ptr[address + 3] = (byte)value;
|
Memory.mainrom[address + 3] = (byte)value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (address >= 0x100000 && address + 3 <= 0x107fff)
|
else if (address >= 0x100000 && address + 3 <= 0x107fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x100000;
|
int offset = address - 0x100000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)(value >> 24);
|
Memory.mainram[offset] = (byte)(value >> 24);
|
||||||
Memory.mainram_Ptr[offset + 1] = (byte)(value >> 16);
|
Memory.mainram[offset + 1] = (byte)(value >> 16);
|
||||||
Memory.mainram_Ptr[offset + 2] = (byte)(value >> 8);
|
Memory.mainram[offset + 2] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[offset + 3] = (byte)value;
|
Memory.mainram[offset + 3] = (byte)value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x200000 && address + 3 <= 0x200fff)
|
else if (address >= 0x200000 && address + 3 <= 0x200fff)
|
||||||
{
|
{
|
||||||
@ -2467,12 +2467,12 @@ namespace MAME.Core
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0x3fff)
|
if (address <= 0x3fff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[address];
|
result = Memory.audiorom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0x4000 && address <= 0x7fff)
|
else if (address >= 0x4000 && address <= 0x7fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x4000;
|
int offset = address - 0x4000;
|
||||||
result = Memory.audiorom_Ptr[basebanksnd + offset];
|
result = Memory.audiorom[basebanksnd + offset];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -2481,17 +2481,17 @@ namespace MAME.Core
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0x3fff)
|
if (address <= 0x3fff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[address];
|
result = Memory.audiorom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0x4000 && address <= 0x7fff)
|
else if (address >= 0x4000 && address <= 0x7fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x4000;
|
int offset = address - 0x4000;
|
||||||
result = Memory.audiorom_Ptr[basebanksnd + offset];
|
result = Memory.audiorom[basebanksnd + offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0x8000 && address <= 0x8fff)
|
else if (address >= 0x8000 && address <= 0x8fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
result = Memory.audioram_Ptr[offset];
|
result = Memory.audioram[offset];
|
||||||
}
|
}
|
||||||
else if (address == 0x9001)
|
else if (address == 0x9001)
|
||||||
{
|
{
|
||||||
@ -2500,7 +2500,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x9002 && address <= 0x9100)
|
else if (address >= 0x9002 && address <= 0x9100)
|
||||||
{
|
{
|
||||||
int offset = address - 0x9002;
|
int offset = address - 0x9002;
|
||||||
result = Memory.audioram_Ptr[offset];
|
result = Memory.audioram[offset];
|
||||||
}
|
}
|
||||||
else if (address == 0xa001)
|
else if (address == 0xa001)
|
||||||
{
|
{
|
||||||
@ -2512,17 +2512,17 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
if (address <= 0x3fff)
|
if (address <= 0x3fff)
|
||||||
{
|
{
|
||||||
Memory.audiorom_Ptr[address] = value;
|
Memory.audiorom[address] = value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x4000 && address <= 0x7fff)
|
else if (address >= 0x4000 && address <= 0x7fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x4000;
|
int offset = address - 0x4000;
|
||||||
Memory.audiorom_Ptr[basebanksnd + offset] = value;
|
Memory.audiorom[basebanksnd + offset] = value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x8000 && address <= 0x8fff)
|
else if (address >= 0x8000 && address <= 0x8fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
Memory.audioram_Ptr[offset] = value;
|
Memory.audioram[offset] = value;
|
||||||
}
|
}
|
||||||
else if (address == 0x9000)
|
else if (address == 0x9000)
|
||||||
{
|
{
|
||||||
@ -2599,7 +2599,7 @@ namespace MAME.Core
|
|||||||
else if (address == 0x8000)
|
else if (address == 0x8000)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
Memory.audioram_Ptr[offset] = value;
|
Memory.audioram[offset] = value;
|
||||||
}
|
}
|
||||||
else if (address == 0x9000)
|
else if (address == 0x9000)
|
||||||
{
|
{
|
||||||
|
@ -700,8 +700,8 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
if (coin_table[slot] != 0)
|
if (coin_table[slot] != 0)
|
||||||
{
|
{
|
||||||
cchip_coins_for_credit[slot] = (byte)((Memory.mainrom_Ptr[(coin_table[slot] + coin_offset[slot] + 0) / 2 * 2] * 0x100 + Memory.mainrom_Ptr[(coin_table[slot] + coin_offset[slot] + 0) / 2 * 2 + 1]) & 0xff);
|
cchip_coins_for_credit[slot] = (byte)((Memory.mainrom[(coin_table[slot] + coin_offset[slot] + 0) / 2 * 2] * 0x100 + Memory.mainrom[(coin_table[slot] + coin_offset[slot] + 0) / 2 * 2 + 1]) & 0xff);
|
||||||
cchip_credits_for_coin[slot] = (byte)((Memory.mainrom_Ptr[(coin_table[slot] + coin_offset[slot] + 2) / 2 * 2] * 0x100 + Memory.mainrom_Ptr[(coin_table[slot] + coin_offset[slot] + 2) / 2 * 2 + 1]) & 0xff);
|
cchip_credits_for_coin[slot] = (byte)((Memory.mainrom[(coin_table[slot] + coin_offset[slot] + 2) / 2 * 2] * 0x100 + Memory.mainrom[(coin_table[slot] + coin_offset[slot] + 2) / 2 * 2 + 1]) & 0xff);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -741,8 +741,8 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
if (coin_table[slot] != 0)
|
if (coin_table[slot] != 0)
|
||||||
{
|
{
|
||||||
cchip_coins_for_credit[slot] = (byte)((Memory.mainrom_Ptr[(coin_table[slot] + coin_offset[slot] + 0) / 2 * 2] * 0x100 + Memory.mainrom_Ptr[(coin_table[slot] + coin_offset[slot] + 0) / 2 * 2 + 1]) & 0xff);
|
cchip_coins_for_credit[slot] = (byte)((Memory.mainrom[(coin_table[slot] + coin_offset[slot] + 0) / 2 * 2] * 0x100 + Memory.mainrom[(coin_table[slot] + coin_offset[slot] + 0) / 2 * 2 + 1]) & 0xff);
|
||||||
cchip_credits_for_coin[slot] = (byte)((Memory.mainrom_Ptr[(coin_table[slot] + coin_offset[slot] + 2) / 2 * 2] * 0x100 + Memory.mainrom_Ptr[(coin_table[slot] + coin_offset[slot] + 2) / 2 * 2 + 1]) & 0xff);
|
cchip_credits_for_coin[slot] = (byte)((Memory.mainrom[(coin_table[slot] + coin_offset[slot] + 2) / 2 * 2] * 0x100 + Memory.mainrom[(coin_table[slot] + coin_offset[slot] + 2) / 2 * 2 + 1]) & 0xff);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,8 +25,8 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
writer.Write(Palette.entry_color[i]);
|
writer.Write(Palette.entry_color[i]);
|
||||||
}
|
}
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x1800);
|
writer.Write(Memory.mainram, 0, 0x1800);
|
||||||
writer.Write(Memory.audioram_Ptr, 0, 0x1000);
|
writer.Write(Memory.audioram, 0, 0x1000);
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
Z80A.zz1[i].SaveStateBinary(writer);
|
Z80A.zz1[i].SaveStateBinary(writer);
|
||||||
@ -133,8 +133,8 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
writer.Write(Palette.entry_color[i]);
|
writer.Write(Palette.entry_color[i]);
|
||||||
}
|
}
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x1800);
|
writer.Write(Memory.mainram, 0, 0x1800);
|
||||||
writer.Write(Memory.audioram_Ptr, 0, 0x1000);
|
writer.Write(Memory.audioram, 0, 0x1000);
|
||||||
writer.Write(mcuram, 0, 0xc0);
|
writer.Write(mcuram, 0, 0xc0);
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
@ -250,10 +250,10 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
writer.Write(Palette.entry_color[i]);
|
writer.Write(Palette.entry_color[i]);
|
||||||
}
|
}
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x1800);
|
writer.Write(Memory.mainram, 0, 0x1800);
|
||||||
writer.Write(mainram2, 0, 0x100);
|
writer.Write(mainram2, 0, 0x100);
|
||||||
writer.Write(mainram3, 0, 0x100);
|
writer.Write(mainram3, 0, 0x100);
|
||||||
writer.Write(Memory.audioram_Ptr, 0, 0x1000);
|
writer.Write(Memory.audioram, 0, 0x1000);
|
||||||
writer.Write(mcuram, 0, 0xc0);
|
writer.Write(mcuram, 0, 0xc0);
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
@ -362,8 +362,8 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
writer.Write(Palette.entry_color[i]);
|
writer.Write(Palette.entry_color[i]);
|
||||||
}
|
}
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x1800);
|
writer.Write(Memory.mainram, 0, 0x1800);
|
||||||
writer.Write(Memory.audioram_Ptr, 0, 0x1000);
|
writer.Write(Memory.audioram, 0, 0x1000);
|
||||||
writer.Write(mcuram, 0, 0xc0);
|
writer.Write(mcuram, 0, 0xc0);
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
@ -565,10 +565,10 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
writer.Write(Palette.entry_color[i]);
|
writer.Write(Palette.entry_color[i]);
|
||||||
}
|
}
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x8000);
|
writer.Write(Memory.mainram, 0, 0x8000);
|
||||||
writer.Write(mainram2, 0, 0x10000);
|
writer.Write(mainram2, 0, 0x10000);
|
||||||
MC68000.m1.SaveStateBinary(writer);
|
MC68000.m1.SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram_Ptr, 0, 0x1000);
|
writer.Write(Memory.audioram, 0, 0x1000);
|
||||||
for (i = 0; i < Z80A.nZ80; i++)
|
for (i = 0; i < Z80A.nZ80; i++)
|
||||||
{
|
{
|
||||||
Z80A.zz1[i].SaveStateBinary(writer);
|
Z80A.zz1[i].SaveStateBinary(writer);
|
||||||
|
@ -307,22 +307,22 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
public unsafe static void driver_init_opwolf()
|
public unsafe static void driver_init_opwolf()
|
||||||
{
|
{
|
||||||
opwolf_region = Memory.mainrom_Ptr[0x03ffff];
|
opwolf_region = Memory.mainrom[0x03ffff];
|
||||||
opwolf_cchip_init();
|
opwolf_cchip_init();
|
||||||
opwolf_gun_xoffs = 0xec - Memory.mainrom_Ptr[0x03ffb1];
|
opwolf_gun_xoffs = 0xec - Memory.mainrom[0x03ffb1];
|
||||||
opwolf_gun_yoffs = 0x1c - Memory.mainrom_Ptr[0x03ffaf];
|
opwolf_gun_yoffs = 0x1c - Memory.mainrom[0x03ffaf];
|
||||||
basebanksnd = 0x10000;
|
basebanksnd = 0x10000;
|
||||||
}
|
}
|
||||||
public unsafe static void driver_init_opwolfb()
|
public unsafe static void driver_init_opwolfb()
|
||||||
{
|
{
|
||||||
opwolf_region = Memory.mainrom_Ptr[0x03ffff];
|
opwolf_region = Memory.mainrom[0x03ffff];
|
||||||
opwolf_gun_xoffs = -2;
|
opwolf_gun_xoffs = -2;
|
||||||
opwolf_gun_yoffs = 17;
|
opwolf_gun_yoffs = 17;
|
||||||
basebanksnd = 0x10000;
|
basebanksnd = 0x10000;
|
||||||
}
|
}
|
||||||
public unsafe static void driver_init_opwolfp()
|
public unsafe static void driver_init_opwolfp()
|
||||||
{
|
{
|
||||||
opwolf_region = Memory.mainrom_Ptr[0x03ffff];
|
opwolf_region = Memory.mainrom[0x03ffff];
|
||||||
opwolf_gun_xoffs = 5;
|
opwolf_gun_xoffs = 5;
|
||||||
opwolf_gun_yoffs = 30;
|
opwolf_gun_yoffs = 30;
|
||||||
basebanksnd = 0x10000;
|
basebanksnd = 0x10000;
|
||||||
|
@ -12,7 +12,7 @@ namespace MAME.Core
|
|||||||
sbyte result = 0;
|
sbyte result = 0;
|
||||||
if (address <= 0x07ffff)
|
if (address <= 0x07ffff)
|
||||||
{
|
{
|
||||||
result = (sbyte)(Memory.mainrom_Ptr[address]);
|
result = (sbyte)(Memory.mainrom[address]);
|
||||||
}
|
}
|
||||||
else if (address >= 0x800000 && address <= 0x801fff)
|
else if (address >= 0x800000 && address <= 0x801fff)
|
||||||
{
|
{
|
||||||
@ -28,7 +28,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0x900000 && address <= 0x90ffff)
|
else if (address >= 0x900000 && address <= 0x90ffff)
|
||||||
{
|
{
|
||||||
result = (sbyte)Memory.mainram_Ptr[address - 0x900000];
|
result = (sbyte)Memory.mainram[address - 0x900000];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -38,9 +38,9 @@ namespace MAME.Core
|
|||||||
sbyte result = 0;
|
sbyte result = 0;
|
||||||
if (address <= 0x07ffff)
|
if (address <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)Memory.mainrom_Ptr[address];
|
result = (sbyte)Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -185,7 +185,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0x900000 && address <= 0x90ffff)
|
else if (address >= 0x900000 && address <= 0x90ffff)
|
||||||
{
|
{
|
||||||
result = (sbyte)Memory.mainram_Ptr[address - 0x900000];
|
result = (sbyte)Memory.mainram[address - 0x900000];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -195,9 +195,9 @@ namespace MAME.Core
|
|||||||
short result = 0;
|
short result = 0;
|
||||||
if (address <= 0x07ffff)
|
if (address <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -211,7 +211,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0x900000 && address + 1 <= 0x90ffff)
|
else if (address >= 0x900000 && address + 1 <= 0x90ffff)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainram_Ptr[address - 0x900000] * 0x100 + Memory.mainram_Ptr[address - 0x900000 + 1]);
|
result = (short)(Memory.mainram[address - 0x900000] * 0x100 + Memory.mainram[address - 0x900000 + 1]);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -221,9 +221,9 @@ namespace MAME.Core
|
|||||||
short result = 0;
|
short result = 0;
|
||||||
if (address <= 0x07ffff)
|
if (address <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -292,7 +292,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0x900000 && address + 1 <= 0x90ffff)
|
else if (address >= 0x900000 && address + 1 <= 0x90ffff)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainram_Ptr[address - 0x900000] * 0x100 + Memory.mainram_Ptr[address - 0x900000 + 1]);
|
result = (short)(Memory.mainram[address - 0x900000] * 0x100 + Memory.mainram[address - 0x900000 + 1]);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -302,9 +302,9 @@ namespace MAME.Core
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address <= 0x07ffff)
|
if (address <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -318,7 +318,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0x900000 && address + 3 <= 0x90ffff)
|
else if (address >= 0x900000 && address + 3 <= 0x90ffff)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainram_Ptr[address - 0x900000] * 0x1000000 + Memory.mainram_Ptr[address - 0x900000 + 1] * 0x10000 + Memory.mainram_Ptr[address - 0x900000 + 2] * 0x100 + Memory.mainram_Ptr[address - 0x900000 + 3]);
|
result = (int)(Memory.mainram[address - 0x900000] * 0x1000000 + Memory.mainram[address - 0x900000 + 1] * 0x10000 + Memory.mainram[address - 0x900000 + 2] * 0x100 + Memory.mainram[address - 0x900000 + 3]);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -328,9 +328,9 @@ namespace MAME.Core
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address <= 0x07ffff)
|
if (address <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -379,7 +379,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0x900000 && address + 3 <= 0x90ffff)
|
else if (address >= 0x900000 && address + 3 <= 0x90ffff)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainram_Ptr[address - 0x900000] * 0x1000000 + Memory.mainram_Ptr[address - 0x900000 + 1] * 0x10000 + Memory.mainram_Ptr[address - 0x900000 + 2] * 0x100 + Memory.mainram_Ptr[address - 0x900000 + 3]);
|
result = (int)(Memory.mainram[address - 0x900000] * 0x1000000 + Memory.mainram[address - 0x900000 + 1] * 0x10000 + Memory.mainram[address - 0x900000 + 2] * 0x100 + Memory.mainram[address - 0x900000 + 3]);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -388,9 +388,9 @@ namespace MAME.Core
|
|||||||
address &= 0xffffff;
|
address &= 0xffffff;
|
||||||
if (address >= 0x000000 && address <= 0x07ffff)
|
if (address >= 0x000000 && address <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
Memory.mainrom_Ptr[address] = (byte)value;
|
Memory.mainrom[address] = (byte)value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (address >= 0x400000 && address <= 0x40ffff)
|
else if (address >= 0x400000 && address <= 0x40ffff)
|
||||||
@ -515,7 +515,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x900000 && address <= 0x90ffff)
|
else if (address >= 0x900000 && address <= 0x90ffff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x900000;
|
int offset = address - 0x900000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)value;
|
Memory.mainram[offset] = (byte)value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static void MWriteWord_pbobble(int address, short value)
|
public static void MWriteWord_pbobble(int address, short value)
|
||||||
@ -523,10 +523,10 @@ namespace MAME.Core
|
|||||||
address &= 0xffffff;
|
address &= 0xffffff;
|
||||||
if (address >= 0x000000 && address + 1 <= 0x07ffff)
|
if (address >= 0x000000 && address + 1 <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
Memory.mainrom_Ptr[address] = (byte)(value >> 8);
|
Memory.mainrom[address] = (byte)(value >> 8);
|
||||||
Memory.mainrom_Ptr[address + 1] = (byte)value;
|
Memory.mainrom[address + 1] = (byte)value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (address >= 0x400000 && address + 1 <= 0x40ffff)
|
else if (address >= 0x400000 && address + 1 <= 0x40ffff)
|
||||||
@ -594,8 +594,8 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x900000 && address + 1 <= 0x90ffff)
|
else if (address >= 0x900000 && address + 1 <= 0x90ffff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x900000;
|
int offset = address - 0x900000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)(value >> 8);
|
Memory.mainram[offset] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[offset + 1] = (byte)value;
|
Memory.mainram[offset + 1] = (byte)value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static void MWriteLong_pbobble(int address, int value)
|
public static void MWriteLong_pbobble(int address, int value)
|
||||||
@ -603,12 +603,12 @@ namespace MAME.Core
|
|||||||
address &= 0xffffff;
|
address &= 0xffffff;
|
||||||
if (address >= 0x000000 && address + 3 <= 0x07ffff)
|
if (address >= 0x000000 && address + 3 <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
Memory.mainrom_Ptr[address] = (byte)(value >> 24);
|
Memory.mainrom[address] = (byte)(value >> 24);
|
||||||
Memory.mainrom_Ptr[address + 1] = (byte)(value >> 16);
|
Memory.mainrom[address + 1] = (byte)(value >> 16);
|
||||||
Memory.mainrom_Ptr[address + 2] = (byte)(value >> 8);
|
Memory.mainrom[address + 2] = (byte)(value >> 8);
|
||||||
Memory.mainrom_Ptr[address + 3] = (byte)value;
|
Memory.mainrom[address + 3] = (byte)value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (address >= 0x400000 && address + 3 <= 0x40ffff)
|
else if (address >= 0x400000 && address + 3 <= 0x40ffff)
|
||||||
@ -670,10 +670,10 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x900000 && address + 3 <= 0x90ffff)
|
else if (address >= 0x900000 && address + 3 <= 0x90ffff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x900000;
|
int offset = address - 0x900000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)(value >> 24);
|
Memory.mainram[offset] = (byte)(value >> 24);
|
||||||
Memory.mainram_Ptr[offset + 1] = (byte)(value >> 16);
|
Memory.mainram[offset + 1] = (byte)(value >> 16);
|
||||||
Memory.mainram_Ptr[offset + 2] = (byte)(value >> 8);
|
Memory.mainram[offset + 2] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[offset + 3] = (byte)value;
|
Memory.mainram[offset + 3] = (byte)value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static byte ZReadOp(ushort address)
|
public static byte ZReadOp(ushort address)
|
||||||
@ -681,7 +681,7 @@ namespace MAME.Core
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0x3fff)
|
if (address <= 0x3fff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[address & 0x7fff];
|
result = Memory.audiorom[address & 0x7fff];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -694,15 +694,15 @@ namespace MAME.Core
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0x3fff)
|
if (address <= 0x3fff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[address & 0x7fff];
|
result = Memory.audiorom[address & 0x7fff];
|
||||||
}
|
}
|
||||||
else if (address >= 0x4000 && address <= 0x7fff)
|
else if (address >= 0x4000 && address <= 0x7fff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[basebanksnd + (address & 0x3fff)];
|
result = Memory.audiorom[basebanksnd + (address & 0x3fff)];
|
||||||
}
|
}
|
||||||
else if (address >= 0xc000 && address <= 0xdfff)
|
else if (address >= 0xc000 && address <= 0xdfff)
|
||||||
{
|
{
|
||||||
result = Memory.audioram_Ptr[address - 0xc000];
|
result = Memory.audioram[address - 0xc000];
|
||||||
}
|
}
|
||||||
else if (address >= 0xe000 && address <= 0xe000)
|
else if (address >= 0xe000 && address <= 0xe000)
|
||||||
{
|
{
|
||||||
@ -734,11 +734,11 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
if (address <= 0x7fff)
|
if (address <= 0x7fff)
|
||||||
{
|
{
|
||||||
Memory.audiorom_Ptr[address] = value;
|
Memory.audiorom[address] = value;
|
||||||
}
|
}
|
||||||
else if (address >= 0xc000 && address <= 0xdfff)
|
else if (address >= 0xc000 && address <= 0xdfff)
|
||||||
{
|
{
|
||||||
Memory.audioram_Ptr[address - 0xc000] = value;
|
Memory.audioram[address - 0xc000] = value;
|
||||||
}
|
}
|
||||||
else if (address >= 0xe000 && address <= 0xe000)
|
else if (address >= 0xe000 && address <= 0xe000)
|
||||||
{
|
{
|
||||||
|
@ -8,9 +8,9 @@
|
|||||||
sbyte result = 0;
|
sbyte result = 0;
|
||||||
if (address <= 0x07ffff)
|
if (address <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)Memory.mainrom_Ptr[address];
|
result = (sbyte)Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -31,7 +31,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x400000 && address <= 0x403fff)
|
else if (address >= 0x400000 && address <= 0x403fff)
|
||||||
{
|
{
|
||||||
result = (sbyte)Memory.mainram_Ptr[address - 0x400000];
|
result = (sbyte)Memory.mainram[address - 0x400000];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -41,9 +41,9 @@
|
|||||||
sbyte result = 0;
|
sbyte result = 0;
|
||||||
if (address <= 0x07ffff)
|
if (address <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (sbyte)Memory.mainrom_Ptr[address];
|
result = (sbyte)Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -124,7 +124,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x400000 && address <= 0x403fff)
|
else if (address >= 0x400000 && address <= 0x403fff)
|
||||||
{
|
{
|
||||||
result = (sbyte)Memory.mainram_Ptr[address - 0x400000];
|
result = (sbyte)Memory.mainram[address - 0x400000];
|
||||||
}
|
}
|
||||||
else if (address >= 0x500000 && address <= 0x50ffff)
|
else if (address >= 0x500000 && address <= 0x50ffff)
|
||||||
{
|
{
|
||||||
@ -198,9 +198,9 @@
|
|||||||
short result = 0;
|
short result = 0;
|
||||||
if (address <= 0x07ffff)
|
if (address <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -214,7 +214,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x400000 && address + 1 <= 0x403fff)
|
else if (address >= 0x400000 && address + 1 <= 0x403fff)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainram_Ptr[address - 0x400000] * 0x100 + Memory.mainram_Ptr[address - 0x400000 + 1]);
|
result = (short)(Memory.mainram[address - 0x400000] * 0x100 + Memory.mainram[address - 0x400000 + 1]);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -224,9 +224,9 @@
|
|||||||
short result = 0;
|
short result = 0;
|
||||||
if (address <= 0x07ffff)
|
if (address <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainrom_Ptr[address] * 0x100 + Memory.mainrom_Ptr[address + 1]);
|
result = (short)(Memory.mainrom[address] * 0x100 + Memory.mainrom[address + 1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -265,7 +265,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x400000 && address + 1 <= 0x403fff)
|
else if (address >= 0x400000 && address + 1 <= 0x403fff)
|
||||||
{
|
{
|
||||||
result = (short)(Memory.mainram_Ptr[address - 0x400000] * 0x100 + Memory.mainram_Ptr[address - 0x400000 + 1]);
|
result = (short)(Memory.mainram[address - 0x400000] * 0x100 + Memory.mainram[address - 0x400000 + 1]);
|
||||||
}
|
}
|
||||||
else if (address >= 0x500000 && address + 1 <= 0x50ffff)
|
else if (address >= 0x500000 && address + 1 <= 0x50ffff)
|
||||||
{
|
{
|
||||||
@ -304,9 +304,9 @@
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address <= 0x07ffff)
|
if (address <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -320,7 +320,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x400000 && address + 3 <= 0x403fff)
|
else if (address >= 0x400000 && address + 3 <= 0x403fff)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainram_Ptr[address - 0x400000] * 0x1000000 + Memory.mainram_Ptr[address - 0x400000 + 1] * 0x10000 + Memory.mainram_Ptr[address - 0x400000 + 2] * 0x100 + Memory.mainram_Ptr[address - 0x400000 + 3]);
|
result = (int)(Memory.mainram[address - 0x400000] * 0x1000000 + Memory.mainram[address - 0x400000 + 1] * 0x10000 + Memory.mainram[address - 0x400000 + 2] * 0x100 + Memory.mainram[address - 0x400000 + 3]);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -330,9 +330,9 @@
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (address <= 0x07ffff)
|
if (address <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address + 3 < Memory.mainrom_Lenght)
|
if (address + 3 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainrom_Ptr[address] * 0x1000000 + Memory.mainrom_Ptr[address + 1] * 0x10000 + Memory.mainrom_Ptr[address + 2] * 0x100 + Memory.mainrom_Ptr[address + 3]);
|
result = (int)(Memory.mainrom[address] * 0x1000000 + Memory.mainrom[address + 1] * 0x10000 + Memory.mainrom[address + 2] * 0x100 + Memory.mainrom[address + 3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -351,7 +351,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0x400000 && address + 1 <= 0x403fff)
|
else if (address >= 0x400000 && address + 1 <= 0x403fff)
|
||||||
{
|
{
|
||||||
result = (int)(Memory.mainram_Ptr[address - 0x400000] * 0x1000000 + Memory.mainram_Ptr[address - 0x400000 + 1] * 0x10000 + Memory.mainram_Ptr[address - 0x400000 + 2] * 0x100 + Memory.mainram_Ptr[address - 0x400000 + 3]);
|
result = (int)(Memory.mainram[address - 0x400000] * 0x1000000 + Memory.mainram[address - 0x400000 + 1] * 0x10000 + Memory.mainram[address - 0x400000 + 2] * 0x100 + Memory.mainram[address - 0x400000 + 3]);
|
||||||
}
|
}
|
||||||
else if (address >= 0x500000 && address + 1 <= 0x50ffff)
|
else if (address >= 0x500000 && address + 1 <= 0x50ffff)
|
||||||
{
|
{
|
||||||
@ -389,9 +389,9 @@
|
|||||||
address &= 0xffffff;
|
address &= 0xffffff;
|
||||||
if (address >= 0x000000 && address <= 0x07ffff)
|
if (address >= 0x000000 && address <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address < Memory.mainrom_Lenght)
|
if (address < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
Memory.mainrom_Ptr[address] = (byte)value;
|
Memory.mainrom[address] = (byte)value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (address >= 0x100000 && address <= 0x100001)
|
else if (address >= 0x100000 && address <= 0x100001)
|
||||||
@ -432,7 +432,7 @@
|
|||||||
else if (address >= 0x400000 && address <= 0x403fff)
|
else if (address >= 0x400000 && address <= 0x403fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x400000;
|
int offset = address - 0x400000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)value;
|
Memory.mainram[offset] = (byte)value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x500000 && address <= 0x50ffff)
|
else if (address >= 0x500000 && address <= 0x50ffff)
|
||||||
{
|
{
|
||||||
@ -505,10 +505,10 @@
|
|||||||
address &= 0xffffff;
|
address &= 0xffffff;
|
||||||
if (address >= 0x000000 && address + 1 <= 0x07ffff)
|
if (address >= 0x000000 && address + 1 <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
Memory.mainrom_Ptr[address] = (byte)(value >> 8);
|
Memory.mainrom[address] = (byte)(value >> 8);
|
||||||
Memory.mainrom_Ptr[address + 1] = (byte)value;
|
Memory.mainrom[address + 1] = (byte)value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (address >= 0x100000 && address + 1 <= 0x100001)
|
else if (address >= 0x100000 && address + 1 <= 0x100001)
|
||||||
@ -536,8 +536,8 @@
|
|||||||
else if (address >= 0x400000 && address + 1 <= 0x403fff)
|
else if (address >= 0x400000 && address + 1 <= 0x403fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x400000;
|
int offset = address - 0x400000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)(value >> 8);
|
Memory.mainram[offset] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[offset + 1] = (byte)value;
|
Memory.mainram[offset + 1] = (byte)value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x500000 && address + 1 <= 0x50ffff)
|
else if (address >= 0x500000 && address + 1 <= 0x50ffff)
|
||||||
{
|
{
|
||||||
@ -576,12 +576,12 @@
|
|||||||
address &= 0xffffff;
|
address &= 0xffffff;
|
||||||
if (address >= 0x000000 && address + 3 <= 0x07ffff)
|
if (address >= 0x000000 && address + 3 <= 0x07ffff)
|
||||||
{
|
{
|
||||||
if (address + 1 < Memory.mainrom_Lenght)
|
if (address + 1 < Memory.mainromLength)
|
||||||
{
|
{
|
||||||
Memory.mainrom_Ptr[address] = (byte)(value >> 24);
|
Memory.mainrom[address] = (byte)(value >> 24);
|
||||||
Memory.mainrom_Ptr[address + 1] = (byte)(value >> 16);
|
Memory.mainrom[address + 1] = (byte)(value >> 16);
|
||||||
Memory.mainrom_Ptr[address + 2] = (byte)(value >> 8);
|
Memory.mainrom[address + 2] = (byte)(value >> 8);
|
||||||
Memory.mainrom_Ptr[address + 3] = (byte)value;
|
Memory.mainrom[address + 3] = (byte)value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (address >= 0x200000 && address + 3 <= 0x20000f)
|
else if (address >= 0x200000 && address + 3 <= 0x20000f)
|
||||||
@ -599,10 +599,10 @@
|
|||||||
else if (address >= 0x400000 && address + 3 <= 0x403fff)
|
else if (address >= 0x400000 && address + 3 <= 0x403fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x400000;
|
int offset = address - 0x400000;
|
||||||
Memory.mainram_Ptr[offset] = (byte)(value >> 24);
|
Memory.mainram[offset] = (byte)(value >> 24);
|
||||||
Memory.mainram_Ptr[offset + 1] = (byte)(value >> 16);
|
Memory.mainram[offset + 1] = (byte)(value >> 16);
|
||||||
Memory.mainram_Ptr[offset + 2] = (byte)(value >> 8);
|
Memory.mainram[offset + 2] = (byte)(value >> 8);
|
||||||
Memory.mainram_Ptr[offset + 3] = (byte)value;
|
Memory.mainram[offset + 3] = (byte)value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x500000 && address + 3 <= 0x50ffff)
|
else if (address >= 0x500000 && address + 3 <= 0x50ffff)
|
||||||
{
|
{
|
||||||
|
@ -53,10 +53,10 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
writer.Write(Palette.entry_color[i]);
|
writer.Write(Palette.entry_color[i]);
|
||||||
}
|
}
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x10000);
|
writer.Write(Memory.mainram, 0, 0x10000);
|
||||||
writer.Write(mainram2, 0, 0x1e80);
|
writer.Write(mainram2, 0, 0x1e80);
|
||||||
MC68000.m1.SaveStateBinary(writer);
|
MC68000.m1.SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram_Ptr, 0, 0x2000);
|
writer.Write(Memory.audioram, 0, 0x2000);
|
||||||
Z80A.zz1[0].SaveStateBinary(writer);
|
Z80A.zz1[0].SaveStateBinary(writer);
|
||||||
Cpuint.SaveStateBinary(writer);
|
Cpuint.SaveStateBinary(writer);
|
||||||
writer.Write(EmuTimer.global_basetime.seconds);
|
writer.Write(EmuTimer.global_basetime.seconds);
|
||||||
|
@ -11,11 +11,11 @@ namespace MAME.Core
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address >= 0 && address <= 0x7fff)
|
if (address >= 0 && address <= 0x7fff)
|
||||||
{
|
{
|
||||||
result = Memory.mainrom_Ptr[address];
|
result = Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0x8000 && address <= 0xbfff)
|
else if (address >= 0x8000 && address <= 0xbfff)
|
||||||
{
|
{
|
||||||
result = Memory.mainrom_Ptr[address];
|
result = Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -28,7 +28,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0x8000 && address <= 0xbfff)
|
else if (address >= 0x8000 && address <= 0xbfff)
|
||||||
{
|
{
|
||||||
result = Memory.mainrom_Ptr[address];
|
result = Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -37,16 +37,16 @@ namespace MAME.Core
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address >= 0 && address <= 0x7fff)
|
if (address >= 0 && address <= 0x7fff)
|
||||||
{
|
{
|
||||||
result = Memory.mainrom_Ptr[address];
|
result = Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0x8000 && address <= 0xbfff)
|
else if (address >= 0x8000 && address <= 0xbfff)
|
||||||
{
|
{
|
||||||
result = Memory.mainrom_Ptr[address];
|
result = Memory.mainrom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0xc000 && address <= 0xcfff)
|
else if (address >= 0xc000 && address <= 0xcfff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xc000;
|
int offset = address - 0xc000;
|
||||||
result = Memory.mainram_Ptr[offset];
|
result = Memory.mainram[offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0xd000 && address <= 0xd3ff)
|
else if (address >= 0xd000 && address <= 0xd3ff)
|
||||||
{
|
{
|
||||||
@ -121,16 +121,16 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
if (address >= 0x0000 && address <= 0x7fff)
|
if (address >= 0x0000 && address <= 0x7fff)
|
||||||
{
|
{
|
||||||
Memory.mainrom_Ptr[address] = value;
|
Memory.mainrom[address] = value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x8000 && address <= 0xbfff)
|
else if (address >= 0x8000 && address <= 0xbfff)
|
||||||
{
|
{
|
||||||
Memory.mainrom_Ptr[address] = value;
|
Memory.mainrom[address] = value;
|
||||||
}
|
}
|
||||||
else if (address >= 0xc000 && address <= 0xcfff)
|
else if (address >= 0xc000 && address <= 0xcfff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xc000;
|
int offset = address - 0xc000;
|
||||||
Memory.mainram_Ptr[offset] = value;
|
Memory.mainram[offset] = value;
|
||||||
}
|
}
|
||||||
else if (address >= 0xd000 && address <= 0xd3ff)
|
else if (address >= 0xd000 && address <= 0xd3ff)
|
||||||
{
|
{
|
||||||
@ -196,7 +196,7 @@ namespace MAME.Core
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address >= 0 && address <= 0x1fff)
|
if (address >= 0 && address <= 0x1fff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[address];
|
result = Memory.audiorom[address];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -205,12 +205,12 @@ namespace MAME.Core
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address >= 0 && address <= 0x1fff)
|
if (address >= 0 && address <= 0x1fff)
|
||||||
{
|
{
|
||||||
result = Memory.audiorom_Ptr[address];
|
result = Memory.audiorom[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0x4000 && address <= 0x47ff)
|
else if (address >= 0x4000 && address <= 0x47ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x4000;
|
int offset = address - 0x4000;
|
||||||
result = Memory.audioram_Ptr[offset];
|
result = Memory.audioram[offset];
|
||||||
}
|
}
|
||||||
else if (address == 0x8000)
|
else if (address == 0x8000)
|
||||||
{
|
{
|
||||||
@ -222,12 +222,12 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
if (address >= 0 && address <= 0x1fff)
|
if (address >= 0 && address <= 0x1fff)
|
||||||
{
|
{
|
||||||
Memory.audiorom_Ptr[address] = value;
|
Memory.audiorom[address] = value;
|
||||||
}
|
}
|
||||||
else if (address >= 0x4000 && address <= 0x47ff)
|
else if (address >= 0x4000 && address <= 0x47ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x4000;
|
int offset = address - 0x4000;
|
||||||
Memory.audioram_Ptr[offset] = value;
|
Memory.audioram[offset] = value;
|
||||||
}
|
}
|
||||||
else if (address == 0xffff)
|
else if (address == 0xffff)
|
||||||
{
|
{
|
||||||
|
@ -92,7 +92,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
result = Memory.mainram_Ptr[0];
|
result = Memory.mainram[0];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -15,14 +15,14 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
writer.Write(Palette.entry_color[i]);
|
writer.Write(Palette.entry_color[i]);
|
||||||
}
|
}
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x1000);
|
writer.Write(Memory.mainram, 0, 0x1000);
|
||||||
writer.Write(Generic.videoram, 0, 0x400);
|
writer.Write(Generic.videoram, 0, 0x400);
|
||||||
writer.Write(pbaction_videoram2, 0, 0x400);
|
writer.Write(pbaction_videoram2, 0, 0x400);
|
||||||
writer.Write(Generic.colorram, 0, 0x400);
|
writer.Write(Generic.colorram, 0, 0x400);
|
||||||
writer.Write(pbaction_colorram2, 0, 0x400);
|
writer.Write(pbaction_colorram2, 0, 0x400);
|
||||||
writer.Write(Generic.spriteram, 0, 0x80);
|
writer.Write(Generic.spriteram, 0, 0x80);
|
||||||
writer.Write(Generic.paletteram, 0, 0x200);
|
writer.Write(Generic.paletteram, 0, 0x200);
|
||||||
writer.Write(Memory.audioram_Ptr, 0, 0x800);
|
writer.Write(Memory.audioram, 0, 0x800);
|
||||||
Z80A.zz1[0].SaveStateBinary(writer);
|
Z80A.zz1[0].SaveStateBinary(writer);
|
||||||
Z80A.zz1[1].SaveStateBinary(writer);
|
Z80A.zz1[1].SaveStateBinary(writer);
|
||||||
Cpuint.SaveStateBinary(writer);
|
Cpuint.SaveStateBinary(writer);
|
||||||
|
@ -27,6 +27,7 @@ static $PtrDataType$[] $PtrDataname$_src;
|
|||||||
static GCHandle $PtrDataname$_handle;
|
static GCHandle $PtrDataname$_handle;
|
||||||
public static $PtrDataType$* $PtrDataname$;
|
public static $PtrDataType$* $PtrDataname$;
|
||||||
public static int $PtrDataname$Length;
|
public static int $PtrDataname$Length;
|
||||||
|
public static bool $PtrDataname$_IsNull => $PtrDataname$ == null;
|
||||||
public static $PtrDataType$[] $PtrDataname$_set
|
public static $PtrDataType$[] $PtrDataname$_set
|
||||||
{
|
{
|
||||||
set
|
set
|
||||||
|
Loading…
Reference in New Issue
Block a user