audioram 全局指针访问
This commit is contained in:
parent
aef97c8eeb
commit
81cebcefc0
@ -7,9 +7,9 @@ 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[] audioram;
|
//public static byte[] ;
|
||||||
|
|
||||||
static byte[] mainrom, audiorom, mainram;
|
static byte[] mainrom, audiorom, mainram, audioram;
|
||||||
public static void memory_reset()
|
public static void memory_reset()
|
||||||
{
|
{
|
||||||
switch (Machine.sBoard)
|
switch (Machine.sBoard)
|
||||||
@ -381,6 +381,7 @@ namespace MAME.Core
|
|||||||
audiorom_Ptr = null;
|
audiorom_Ptr = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static GCHandle mainram_handle;
|
static GCHandle mainram_handle;
|
||||||
public static byte* mainram_Ptr;
|
public static byte* mainram_Ptr;
|
||||||
public static int mainram_Lenght;
|
public static int mainram_Lenght;
|
||||||
@ -408,6 +409,32 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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 MemoryEx
|
public unsafe static class MemoryEx
|
||||||
|
@ -58,7 +58,7 @@ namespace MAME.Core
|
|||||||
gfx3rom[i * 2 + 1] = (byte)(gfx32rom[i] & 0x0f);
|
gfx3rom[i * 2 + 1] = (byte)(gfx32rom[i] & 0x0f);
|
||||||
}
|
}
|
||||||
Memory.Set_mainram(new byte[0x1e00]);
|
Memory.Set_mainram(new byte[0x1e00]);
|
||||||
Memory.audioram = new byte[0x800];
|
Memory.Set_audioram(new byte[0x800]);
|
||||||
Generic.paletteram = new byte[0x100];
|
Generic.paletteram = new byte[0x100];
|
||||||
Generic.paletteram_2 = new byte[0x100];
|
Generic.paletteram_2 = new byte[0x100];
|
||||||
if (Memory.mainrom_IsNull|| Memory.audiorom_IsNull || gfx12rom == null || gfx22rom == null || gfx32rom == null)
|
if (Memory.mainrom_IsNull|| Memory.audiorom_IsNull || gfx12rom == null || gfx22rom == null || gfx32rom == null)
|
||||||
@ -113,7 +113,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
gfx5rom = Machine.GetRom("gfx5.rom");
|
gfx5rom = Machine.GetRom("gfx5.rom");
|
||||||
Memory.Set_mainram(new byte[0x6000]);
|
Memory.Set_mainram(new byte[0x6000]);
|
||||||
Memory.audioram = new byte[0x800];
|
Memory.Set_audioram(new byte[0x800]);
|
||||||
if (Memory.mainrom_IsNull || Memory.audiorom_IsNull || gfx12rom == null || gfx22rom == null || gfx32rom == null || gfx42rom == null || gfx5rom == null)
|
if (Memory.mainrom_IsNull || Memory.audiorom_IsNull || gfx12rom == null || gfx22rom == null || gfx32rom == null || gfx42rom == null || gfx5rom == null)
|
||||||
{
|
{
|
||||||
Machine.bRom = false;
|
Machine.bRom = false;
|
||||||
|
@ -235,7 +235,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0xc000 && address <= 0xc7ff)
|
else if (address >= 0xc000 && address <= 0xc7ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xc000;
|
int offset = address - 0xc000;
|
||||||
result = Memory.audioram[offset];
|
result = Memory.audioram_Ptr[offset];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -253,7 +253,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0xc000 && address <= 0xc7ff)
|
else if (address >= 0xc000 && address <= 0xc7ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xc000;
|
int offset = address - 0xc000;
|
||||||
result = Memory.audioram[offset];
|
result = Memory.audioram_Ptr[offset];
|
||||||
}
|
}
|
||||||
else if (address == 0xc800)
|
else if (address == 0xc800)
|
||||||
{
|
{
|
||||||
@ -274,7 +274,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[offset] = value;
|
Memory.audioram_Ptr[offset] = value;
|
||||||
}
|
}
|
||||||
else if (address == 0xe000)
|
else if (address == 0xe000)
|
||||||
{
|
{
|
||||||
@ -1195,7 +1195,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0xc000 && address <= 0xc7ff)
|
else if (address >= 0xc000 && address <= 0xc7ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xc000;
|
int offset = address - 0xc000;
|
||||||
result = Memory.audioram[offset];
|
result = Memory.audioram_Ptr[offset];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1213,7 +1213,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0xc000 && address <= 0xc7ff)
|
else if (address >= 0xc000 && address <= 0xc7ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xc000;
|
int offset = address - 0xc000;
|
||||||
result = Memory.audioram[offset];
|
result = Memory.audioram_Ptr[offset];
|
||||||
}
|
}
|
||||||
else if (address == 0xc800)
|
else if (address == 0xc800)
|
||||||
{
|
{
|
||||||
@ -1238,7 +1238,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[offset] = value;
|
Memory.audioram_Ptr[offset] = value;
|
||||||
}
|
}
|
||||||
else if (address == 0xe000)
|
else if (address == 0xe000)
|
||||||
{
|
{
|
||||||
|
@ -27,7 +27,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x1e00);
|
writer.Write(Memory.mainram_Ptr, 0, 0x1e00);
|
||||||
M6809.mm1[0].SaveStateBinary(writer);
|
M6809.mm1[0].SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram, 0, 0x800);
|
writer.Write(Memory.audioram_Ptr, 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);
|
||||||
@ -73,7 +73,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
Memory.Set_mainram(reader.ReadBytes(0x1e00));
|
Memory.Set_mainram(reader.ReadBytes(0x1e00));
|
||||||
M6809.mm1[0].LoadStateBinary(reader);
|
M6809.mm1[0].LoadStateBinary(reader);
|
||||||
Memory.audioram = reader.ReadBytes(0x800);
|
Memory.Set_audioram(reader.ReadBytes(0x800));
|
||||||
Z80A.zz1[0].LoadStateBinary(reader);
|
Z80A.zz1[0].LoadStateBinary(reader);
|
||||||
Cpuint.LoadStateBinary(reader);
|
Cpuint.LoadStateBinary(reader);
|
||||||
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
||||||
@ -126,7 +126,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x6000);
|
writer.Write(Memory.mainram_Ptr, 0, 0x6000);
|
||||||
MC68000.m1.SaveStateBinary(writer);
|
MC68000.m1.SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram, 0, 0x800);
|
writer.Write(Memory.audioram_Ptr, 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);
|
||||||
@ -175,7 +175,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
Memory.Set_mainram(reader.ReadBytes(0x6000));
|
Memory.Set_mainram(reader.ReadBytes(0x6000));
|
||||||
MC68000.m1.LoadStateBinary(reader);
|
MC68000.m1.LoadStateBinary(reader);
|
||||||
Memory.audioram = reader.ReadBytes(0x800);
|
Memory.Set_audioram(reader.ReadBytes(0x800));
|
||||||
Z80A.zz1[0].LoadStateBinary(reader);
|
Z80A.zz1[0].LoadStateBinary(reader);
|
||||||
Z80A.zz1[1].LoadStateBinary(reader);
|
Z80A.zz1[1].LoadStateBinary(reader);
|
||||||
Cpuint.LoadStateBinary(reader);
|
Cpuint.LoadStateBinary(reader);
|
||||||
|
@ -50,7 +50,7 @@ namespace MAME.Core
|
|||||||
cps_b_regs = new ushort[0x20];
|
cps_b_regs = new ushort[0x20];
|
||||||
gfxram = new byte[0x30000];
|
gfxram = new byte[0x30000];
|
||||||
Memory.Set_mainram(new byte[0x10000]);
|
Memory.Set_mainram(new byte[0x10000]);
|
||||||
Memory.audioram = new byte[0x800];
|
Memory.Set_audioram(new byte[0x800]);
|
||||||
Machine.bRom = true;
|
Machine.bRom = true;
|
||||||
Memory.Set_mainrom(Machine.GetRom("maincpu.rom"));
|
Memory.Set_mainrom(Machine.GetRom("maincpu.rom"));
|
||||||
gfxrom = Machine.GetRom("gfx.rom");
|
gfxrom = Machine.GetRom("gfx.rom");
|
||||||
|
@ -376,7 +376,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0xd000 && address <= 0xd7ff)
|
else if (address >= 0xd000 && address <= 0xd7ff)
|
||||||
{
|
{
|
||||||
result = Memory.audioram[address & 0x7ff];
|
result = Memory.audioram_Ptr[address & 0x7ff];
|
||||||
}
|
}
|
||||||
else if (address == 0xf001)
|
else if (address == 0xf001)
|
||||||
{
|
{
|
||||||
@ -404,7 +404,7 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
if (address >= 0xd000 && address <= 0xd7ff)
|
if (address >= 0xd000 && address <= 0xd7ff)
|
||||||
{
|
{
|
||||||
Memory.audioram[address & 0x7ff] = value;
|
Memory.audioram_Ptr[address & 0x7ff] = value;
|
||||||
}
|
}
|
||||||
else if (address == 0xf000)
|
else if (address == 0xf000)
|
||||||
{
|
{
|
||||||
|
@ -28,7 +28,7 @@ namespace MAME.Core
|
|||||||
writer.Write(Memory.mainram_Ptr, 0, 0x10000);
|
writer.Write(Memory.mainram_Ptr, 0, 0x10000);
|
||||||
writer.Write(gfxram, 0, 0x30000);
|
writer.Write(gfxram, 0, 0x30000);
|
||||||
MC68000.m1.SaveStateBinary(writer);
|
MC68000.m1.SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram, 0, 0x800);
|
writer.Write(Memory.audioram_Ptr, 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);
|
||||||
@ -98,7 +98,7 @@ namespace MAME.Core
|
|||||||
writer.Write(Memory.mainram_Ptr, 0, 0x10000);
|
writer.Write(Memory.mainram_Ptr, 0, 0x10000);
|
||||||
writer.Write(gfxram, 0, 0x30000);
|
writer.Write(gfxram, 0, 0x30000);
|
||||||
MC68000.m1.SaveStateBinary(writer);
|
MC68000.m1.SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram, 0, 0x800);
|
writer.Write(Memory.audioram_Ptr, 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);
|
||||||
@ -161,7 +161,7 @@ namespace MAME.Core
|
|||||||
writer.Write(Memory.mainram_Ptr, 0, 0x10000);
|
writer.Write(Memory.mainram_Ptr, 0, 0x10000);
|
||||||
writer.Write(gfxram, 0, 0x30000);
|
writer.Write(gfxram, 0, 0x30000);
|
||||||
MC68000.m1.SaveStateBinary(writer);
|
MC68000.m1.SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram, 0, 0x800);
|
writer.Write(Memory.audioram_Ptr, 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);
|
||||||
@ -209,7 +209,7 @@ namespace MAME.Core
|
|||||||
Memory.Set_mainram(reader.ReadBytes(0x10000));
|
Memory.Set_mainram(reader.ReadBytes(0x10000));
|
||||||
gfxram = reader.ReadBytes(0x30000);
|
gfxram = reader.ReadBytes(0x30000);
|
||||||
MC68000.m1.LoadStateBinary(reader);
|
MC68000.m1.LoadStateBinary(reader);
|
||||||
Memory.audioram = reader.ReadBytes(0x800);
|
Memory.Set_audioram(reader.ReadBytes(0x800));
|
||||||
Z80A.zz1[0].LoadStateBinary(reader);
|
Z80A.zz1[0].LoadStateBinary(reader);
|
||||||
Cpuint.LoadStateBinary(reader);
|
Cpuint.LoadStateBinary(reader);
|
||||||
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
||||||
@ -279,7 +279,7 @@ namespace MAME.Core
|
|||||||
Memory.Set_mainram(reader.ReadBytes(0x10000));
|
Memory.Set_mainram(reader.ReadBytes(0x10000));
|
||||||
gfxram = reader.ReadBytes(0x30000);
|
gfxram = reader.ReadBytes(0x30000);
|
||||||
MC68000.m1.LoadStateBinary(reader);
|
MC68000.m1.LoadStateBinary(reader);
|
||||||
Memory.audioram = reader.ReadBytes(0x800);
|
Memory.Set_audioram(reader.ReadBytes(0x800));
|
||||||
Z80A.zz1[0].LoadStateBinary(reader);
|
Z80A.zz1[0].LoadStateBinary(reader);
|
||||||
Cpuint.LoadStateBinary(reader);
|
Cpuint.LoadStateBinary(reader);
|
||||||
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
||||||
@ -342,7 +342,7 @@ namespace MAME.Core
|
|||||||
Memory.Set_mainram(reader.ReadBytes(0x10000));
|
Memory.Set_mainram(reader.ReadBytes(0x10000));
|
||||||
gfxram = reader.ReadBytes(0x30000);
|
gfxram = reader.ReadBytes(0x30000);
|
||||||
MC68000.m1.LoadStateBinary(reader);
|
MC68000.m1.LoadStateBinary(reader);
|
||||||
Memory.audioram = reader.ReadBytes(0x800);
|
Memory.Set_audioram(reader.ReadBytes(0x800));
|
||||||
Z80A.zz1[0].LoadStateBinary(reader);
|
Z80A.zz1[0].LoadStateBinary(reader);
|
||||||
Cpuint.LoadStateBinary(reader);
|
Cpuint.LoadStateBinary(reader);
|
||||||
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
||||||
|
@ -123,7 +123,7 @@
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0x7ff)
|
if (address <= 0x7ff)
|
||||||
{
|
{
|
||||||
result = Memory.audioram[address];
|
result = Memory.audioram_Ptr[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0x4000 && address <= 0x7fff)
|
else if (address >= 0x4000 && address <= 0x7fff)
|
||||||
{
|
{
|
||||||
@ -142,7 +142,7 @@
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0x7ff)
|
if (address <= 0x7ff)
|
||||||
{
|
{
|
||||||
result = Memory.audioram[address];
|
result = Memory.audioram_Ptr[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0x4000 && address <= 0x7fff)
|
else if (address >= 0x4000 && address <= 0x7fff)
|
||||||
{
|
{
|
||||||
@ -160,7 +160,7 @@
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0x7ff)
|
if (address <= 0x7ff)
|
||||||
{
|
{
|
||||||
result = Memory.audioram[address];
|
result = Memory.audioram_Ptr[address];
|
||||||
}
|
}
|
||||||
else if (address >= 0x4000 && address <= 0x7fff)
|
else if (address >= 0x4000 && address <= 0x7fff)
|
||||||
{
|
{
|
||||||
@ -178,7 +178,7 @@
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address <= 0x7ff)
|
if (address <= 0x7ff)
|
||||||
{
|
{
|
||||||
result = Memory.audioram[address];
|
result = Memory.audioram_Ptr[address];
|
||||||
}
|
}
|
||||||
else if (address == 0x3000)
|
else if (address == 0x3000)
|
||||||
{
|
{
|
||||||
@ -203,7 +203,7 @@
|
|||||||
{
|
{
|
||||||
if (address <= 0x7ff)
|
if (address <= 0x7ff)
|
||||||
{
|
{
|
||||||
Memory.audioram[address] = data;
|
Memory.audioram_Ptr[address] = data;
|
||||||
}
|
}
|
||||||
else if (address == 0x0800)
|
else if (address == 0x0800)
|
||||||
{
|
{
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
int i, n;
|
int i, n;
|
||||||
Machine.bRom = true;
|
Machine.bRom = true;
|
||||||
Memory.Set_mainram(new byte[0x800]);
|
Memory.Set_mainram(new byte[0x800]);
|
||||||
Memory.audioram = new byte[0x800];
|
Memory.Set_audioram(new byte[0x800]);
|
||||||
Generic.spriteram = new byte[0x200];
|
Generic.spriteram = new byte[0x200];
|
||||||
Generic.videoram = new byte[0x800];
|
Generic.videoram = new byte[0x800];
|
||||||
switch (Machine.sName)
|
switch (Machine.sName)
|
||||||
|
@ -21,7 +21,7 @@ namespace MAME.Core
|
|||||||
writer.Write(Memory.mainram_Ptr, 0, 0x800);
|
writer.Write(Memory.mainram_Ptr, 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, 0, 0x800);
|
writer.Write(Memory.audioram_Ptr, 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);
|
||||||
@ -64,7 +64,7 @@ namespace MAME.Core
|
|||||||
Memory.Set_mainram(reader.ReadBytes(0x800));
|
Memory.Set_mainram(reader.ReadBytes(0x800));
|
||||||
Generic.videoram = reader.ReadBytes(0x800);
|
Generic.videoram = reader.ReadBytes(0x800);
|
||||||
Generic.spriteram = reader.ReadBytes(0x200);
|
Generic.spriteram = reader.ReadBytes(0x200);
|
||||||
Memory.audioram = reader.ReadBytes(0x800);
|
Memory.Set_audioram(reader.ReadBytes(0x800));
|
||||||
M6502.mm1[0].LoadStateBinary(reader);
|
M6502.mm1[0].LoadStateBinary(reader);
|
||||||
M6502.mm1[1].LoadStateBinary(reader);
|
M6502.mm1[1].LoadStateBinary(reader);
|
||||||
Cpuint.LoadStateBinary(reader);
|
Cpuint.LoadStateBinary(reader);
|
||||||
|
@ -22,7 +22,7 @@ namespace MAME.Core
|
|||||||
init_eeprom_count = 10;
|
init_eeprom_count = 10;
|
||||||
toggle = 0;
|
toggle = 0;
|
||||||
Memory.Set_mainram(new byte[0x4000]);
|
Memory.Set_mainram(new byte[0x4000]);
|
||||||
Memory.audioram = new byte[0x2000];//0x800 prmrsocr_0x2000
|
Memory.Set_audioram(new byte[0x2000]);//0x800 prmrsocr_0x2000
|
||||||
mainram2 = new byte[0x4000];//0x4000 tmnt2_ssriders_0x80
|
mainram2 = new byte[0x4000];//0x4000 tmnt2_ssriders_0x80
|
||||||
layer_colorbase = new int[3];
|
layer_colorbase = new int[3];
|
||||||
cuebrick_nvram = new ushort[0x400 * 0x20];
|
cuebrick_nvram = new ushort[0x400 * 0x20];
|
||||||
|
@ -3201,7 +3201,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x8000 && address <= 0x87ff)
|
else if (address >= 0x8000 && address <= 0x87ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
result = Memory.audioram[offset];
|
result = Memory.audioram_Ptr[offset];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -3219,7 +3219,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x8000 && address <= 0x87ff)
|
else if (address >= 0x8000 && address <= 0x87ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
result = Memory.audioram[offset];
|
result = Memory.audioram_Ptr[offset];
|
||||||
}
|
}
|
||||||
else if (address == 0xa000)
|
else if (address == 0xa000)
|
||||||
{
|
{
|
||||||
@ -3241,7 +3241,7 @@ namespace MAME.Core
|
|||||||
if (address >= 0x8000 && address <= 0x87ff)
|
if (address >= 0x8000 && address <= 0x87ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
Memory.audioram[offset] = value;
|
Memory.audioram_Ptr[offset] = value;
|
||||||
}
|
}
|
||||||
else if (address >= 0xb000 && address <= 0xb00d)
|
else if (address >= 0xb000 && address <= 0xb00d)
|
||||||
{
|
{
|
||||||
@ -3267,7 +3267,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x8000 && address <= 0x87ff)
|
else if (address >= 0x8000 && address <= 0x87ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
result = Memory.audioram[offset];
|
result = Memory.audioram_Ptr[offset];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -3285,7 +3285,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x8000 && address <= 0x87ff)
|
else if (address >= 0x8000 && address <= 0x87ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
result = Memory.audioram[offset];
|
result = Memory.audioram_Ptr[offset];
|
||||||
}
|
}
|
||||||
else if (address == 0x9000)
|
else if (address == 0x9000)
|
||||||
{
|
{
|
||||||
@ -3315,7 +3315,7 @@ namespace MAME.Core
|
|||||||
if (address >= 0x8000 && address <= 0x87ff)
|
if (address >= 0x8000 && address <= 0x87ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
Memory.audioram[offset] = value;
|
Memory.audioram_Ptr[offset] = value;
|
||||||
}
|
}
|
||||||
else if (address == 0x9000)
|
else if (address == 0x9000)
|
||||||
{
|
{
|
||||||
@ -3353,7 +3353,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0xf000 && address <= 0xf7ff)
|
else if (address >= 0xf000 && address <= 0xf7ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xf000;
|
int offset = address - 0xf000;
|
||||||
result = Memory.audioram[offset];
|
result = Memory.audioram_Ptr[offset];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -3371,7 +3371,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0xf000 && address <= 0xf7ff)
|
else if (address >= 0xf000 && address <= 0xf7ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xf000;
|
int offset = address - 0xf000;
|
||||||
result = Memory.audioram[offset];
|
result = Memory.audioram_Ptr[offset];
|
||||||
}
|
}
|
||||||
else if (address == 0xf801)
|
else if (address == 0xf801)
|
||||||
{
|
{
|
||||||
@ -3389,7 +3389,7 @@ namespace MAME.Core
|
|||||||
if (address >= 0xf000 && address <= 0xf7ff)
|
if (address >= 0xf000 && address <= 0xf7ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xf000;
|
int offset = address - 0xf000;
|
||||||
Memory.audioram[offset] = value;
|
Memory.audioram_Ptr[offset] = value;
|
||||||
}
|
}
|
||||||
else if (address == 0xf800)
|
else if (address == 0xf800)
|
||||||
{
|
{
|
||||||
@ -3419,7 +3419,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x8000 && address <= 0x87ff)
|
else if (address >= 0x8000 && address <= 0x87ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
result = Memory.audioram[offset];
|
result = Memory.audioram_Ptr[offset];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -3437,7 +3437,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x8000 && address <= 0x87ff)
|
else if (address >= 0x8000 && address <= 0x87ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
result = Memory.audioram[offset];
|
result = Memory.audioram_Ptr[offset];
|
||||||
}
|
}
|
||||||
else if (address == 0xa001)
|
else if (address == 0xa001)
|
||||||
{
|
{
|
||||||
@ -3455,7 +3455,7 @@ namespace MAME.Core
|
|||||||
if (address >= 0x8000 && address <= 0x87ff)
|
if (address >= 0x8000 && address <= 0x87ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
Memory.audioram[offset] = value;
|
Memory.audioram_Ptr[offset] = value;
|
||||||
}
|
}
|
||||||
else if (address == 0xa000)
|
else if (address == 0xa000)
|
||||||
{
|
{
|
||||||
@ -3481,7 +3481,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0xf000 && address <= 0xf7ff)
|
else if (address >= 0xf000 && address <= 0xf7ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xf000;
|
int offset = address - 0xf000;
|
||||||
result = Memory.audioram[offset];
|
result = Memory.audioram_Ptr[offset];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -3499,7 +3499,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0xf000 && address <= 0xf7ff)
|
else if (address >= 0xf000 && address <= 0xf7ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xf000;
|
int offset = address - 0xf000;
|
||||||
result = Memory.audioram[offset];
|
result = Memory.audioram_Ptr[offset];
|
||||||
}
|
}
|
||||||
else if (address == 0xf801)
|
else if (address == 0xf801)
|
||||||
{
|
{
|
||||||
@ -3517,7 +3517,7 @@ namespace MAME.Core
|
|||||||
if (address >= 0xf000 && address <= 0xf7ff)
|
if (address >= 0xf000 && address <= 0xf7ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xf000;
|
int offset = address - 0xf000;
|
||||||
Memory.audioram[offset] = value;
|
Memory.audioram_Ptr[offset] = value;
|
||||||
}
|
}
|
||||||
else if (address == 0xf800)
|
else if (address == 0xf800)
|
||||||
{
|
{
|
||||||
|
@ -2893,7 +2893,7 @@
|
|||||||
else if (address >= 0xf000 && address <= 0xf7ff)
|
else if (address >= 0xf000 && address <= 0xf7ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xf000;
|
int offset = address - 0xf000;
|
||||||
result = Memory.audioram[offset];
|
result = Memory.audioram_Ptr[offset];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2911,7 +2911,7 @@
|
|||||||
else if (address >= 0xf000 && address <= 0xf7ff)
|
else if (address >= 0xf000 && address <= 0xf7ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xf000;
|
int offset = address - 0xf000;
|
||||||
result = Memory.audioram[offset];
|
result = Memory.audioram_Ptr[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[offset] = value;
|
Memory.audioram_Ptr[offset] = value;
|
||||||
}
|
}
|
||||||
else if (address >= 0xf800 && address <= 0xf82f)
|
else if (address >= 0xf800 && address <= 0xf82f)
|
||||||
{
|
{
|
||||||
@ -2947,7 +2947,7 @@
|
|||||||
else if (address >= 0xf000 && address <= 0xf7ff)
|
else if (address >= 0xf000 && address <= 0xf7ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xf000;
|
int offset = address - 0xf000;
|
||||||
result = Memory.audioram[offset];
|
result = Memory.audioram_Ptr[offset];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2965,7 +2965,7 @@
|
|||||||
else if (address >= 0xf000 && address <= 0xf7ff)
|
else if (address >= 0xf000 && address <= 0xf7ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xf000;
|
int offset = address - 0xf000;
|
||||||
result = Memory.audioram[offset];
|
result = Memory.audioram_Ptr[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[offset] = value;
|
Memory.audioram_Ptr[offset] = value;
|
||||||
}
|
}
|
||||||
else if (address == 0xf800 || address == 0xf810)
|
else if (address == 0xf800 || address == 0xf810)
|
||||||
{
|
{
|
||||||
@ -3018,7 +3018,7 @@
|
|||||||
else if (address >= 0xc000 && address <= 0xdfff)
|
else if (address >= 0xc000 && address <= 0xdfff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xc000;
|
int offset = address - 0xc000;
|
||||||
result = Memory.audioram[offset];
|
result = Memory.audioram_Ptr[offset];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -3041,7 +3041,7 @@
|
|||||||
else if (address >= 0xc000 && address <= 0xdfff)
|
else if (address >= 0xc000 && address <= 0xdfff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xc000;
|
int offset = address - 0xc000;
|
||||||
result = Memory.audioram[offset];
|
result = Memory.audioram_Ptr[offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0xe000 && address <= 0xe0ff)
|
else if (address >= 0xe000 && address <= 0xe0ff)
|
||||||
{
|
{
|
||||||
@ -3073,7 +3073,7 @@
|
|||||||
else if (address >= 0xc000 && address <= 0xdfff)
|
else if (address >= 0xc000 && address <= 0xdfff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xc000;
|
int offset = address - 0xc000;
|
||||||
Memory.audioram[offset] = value;
|
Memory.audioram_Ptr[offset] = value;
|
||||||
}
|
}
|
||||||
else if (address >= 0xe000 && address <= 0xe0ff)
|
else if (address >= 0xe000 && address <= 0xe0ff)
|
||||||
{
|
{
|
||||||
|
@ -48,7 +48,7 @@ namespace MAME.Core
|
|||||||
writer.Write(Memory.mainram_Ptr, 0, 0x4000);
|
writer.Write(Memory.mainram_Ptr, 0, 0x4000);
|
||||||
writer.Write(mainram2, 0, 0x4000);
|
writer.Write(mainram2, 0, 0x4000);
|
||||||
MC68000.m1.SaveStateBinary(writer);
|
MC68000.m1.SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram, 0, 0x800);
|
writer.Write(Memory.audioram_Ptr, 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);
|
||||||
@ -104,7 +104,7 @@ namespace MAME.Core
|
|||||||
Memory.Set_mainram(reader.ReadBytes(0x4000));
|
Memory.Set_mainram(reader.ReadBytes(0x4000));
|
||||||
mainram2 = reader.ReadBytes(0x4000);
|
mainram2 = reader.ReadBytes(0x4000);
|
||||||
MC68000.m1.LoadStateBinary(reader);
|
MC68000.m1.LoadStateBinary(reader);
|
||||||
Memory.audioram = reader.ReadBytes(0x800);
|
Memory.Set_audioram(reader.ReadBytes(0x800));
|
||||||
Cpuint.LoadStateBinary(reader);
|
Cpuint.LoadStateBinary(reader);
|
||||||
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
||||||
EmuTimer.global_basetime.attoseconds = reader.ReadInt64();
|
EmuTimer.global_basetime.attoseconds = reader.ReadInt64();
|
||||||
@ -154,7 +154,7 @@ namespace MAME.Core
|
|||||||
writer.Write(Memory.mainram_Ptr, 0, 0x4000);
|
writer.Write(Memory.mainram_Ptr, 0, 0x4000);
|
||||||
writer.Write(mainram2, 0, 0x4000);
|
writer.Write(mainram2, 0, 0x4000);
|
||||||
MC68000.m1.SaveStateBinary(writer);
|
MC68000.m1.SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram, 0, 0x800);
|
writer.Write(Memory.audioram_Ptr, 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);
|
||||||
@ -216,7 +216,7 @@ namespace MAME.Core
|
|||||||
Memory.Set_mainram(reader.ReadBytes(0x4000));
|
Memory.Set_mainram(reader.ReadBytes(0x4000));
|
||||||
mainram2 = reader.ReadBytes(0x4000);
|
mainram2 = reader.ReadBytes(0x4000);
|
||||||
MC68000.m1.LoadStateBinary(reader);
|
MC68000.m1.LoadStateBinary(reader);
|
||||||
Memory.audioram = reader.ReadBytes(0x800);
|
Memory.Set_audioram(reader.ReadBytes(0x800));
|
||||||
Z80A.zz1[0].LoadStateBinary(reader);
|
Z80A.zz1[0].LoadStateBinary(reader);
|
||||||
Cpuint.LoadStateBinary(reader);
|
Cpuint.LoadStateBinary(reader);
|
||||||
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
||||||
@ -282,7 +282,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x4000);
|
writer.Write(Memory.mainram_Ptr, 0, 0x4000);
|
||||||
MC68000.m1.SaveStateBinary(writer);
|
MC68000.m1.SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram, 0, 0x800);
|
writer.Write(Memory.audioram_Ptr, 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);
|
||||||
@ -354,7 +354,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
Memory.Set_mainram(reader.ReadBytes(0x4000));
|
Memory.Set_mainram(reader.ReadBytes(0x4000));
|
||||||
MC68000.m1.LoadStateBinary(reader);
|
MC68000.m1.LoadStateBinary(reader);
|
||||||
Memory.audioram = reader.ReadBytes(0x800);
|
Memory.Set_audioram(reader.ReadBytes(0x800));
|
||||||
Z80A.zz1[0].LoadStateBinary(reader);
|
Z80A.zz1[0].LoadStateBinary(reader);
|
||||||
Cpuint.LoadStateBinary(reader);
|
Cpuint.LoadStateBinary(reader);
|
||||||
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
||||||
@ -421,7 +421,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x4000);
|
writer.Write(Memory.mainram_Ptr, 0, 0x4000);
|
||||||
MC68000.m1.SaveStateBinary(writer);
|
MC68000.m1.SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram, 0, 0x800);
|
writer.Write(Memory.audioram_Ptr, 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);
|
||||||
@ -474,7 +474,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
Memory.Set_mainram(reader.ReadBytes(0x4000));
|
Memory.Set_mainram(reader.ReadBytes(0x4000));
|
||||||
MC68000.m1.LoadStateBinary(reader);
|
MC68000.m1.LoadStateBinary(reader);
|
||||||
Memory.audioram = reader.ReadBytes(0x800);
|
Memory.Set_audioram(reader.ReadBytes(0x800));
|
||||||
Z80A.zz1[0].LoadStateBinary(reader);
|
Z80A.zz1[0].LoadStateBinary(reader);
|
||||||
Cpuint.LoadStateBinary(reader);
|
Cpuint.LoadStateBinary(reader);
|
||||||
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
||||||
@ -527,7 +527,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x4000);
|
writer.Write(Memory.mainram_Ptr, 0, 0x4000);
|
||||||
MC68000.m1.SaveStateBinary(writer);
|
MC68000.m1.SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram, 0, 0x800);
|
writer.Write(Memory.audioram_Ptr, 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);
|
||||||
@ -580,7 +580,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
Memory.Set_mainram(reader.ReadBytes(0x4000));
|
Memory.Set_mainram(reader.ReadBytes(0x4000));
|
||||||
MC68000.m1.LoadStateBinary(reader);
|
MC68000.m1.LoadStateBinary(reader);
|
||||||
Memory.audioram = reader.ReadBytes(0x800);
|
Memory.Set_audioram(reader.ReadBytes(0x800));
|
||||||
Z80A.zz1[0].LoadStateBinary(reader);
|
Z80A.zz1[0].LoadStateBinary(reader);
|
||||||
Cpuint.LoadStateBinary(reader);
|
Cpuint.LoadStateBinary(reader);
|
||||||
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
||||||
@ -631,7 +631,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x4000);
|
writer.Write(Memory.mainram_Ptr, 0, 0x4000);
|
||||||
MC68000.m1.SaveStateBinary(writer);
|
MC68000.m1.SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram, 0, 0x800);
|
writer.Write(Memory.audioram_Ptr, 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);
|
||||||
@ -683,7 +683,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
Memory.Set_mainram(reader.ReadBytes(0x4000));
|
Memory.Set_mainram(reader.ReadBytes(0x4000));
|
||||||
MC68000.m1.LoadStateBinary(reader);
|
MC68000.m1.LoadStateBinary(reader);
|
||||||
Memory.audioram = reader.ReadBytes(0x800);
|
Memory.Set_audioram(reader.ReadBytes(0x800));
|
||||||
Z80A.zz1[0].LoadStateBinary(reader);
|
Z80A.zz1[0].LoadStateBinary(reader);
|
||||||
Cpuint.LoadStateBinary(reader);
|
Cpuint.LoadStateBinary(reader);
|
||||||
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
||||||
@ -738,7 +738,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x4000);
|
writer.Write(Memory.mainram_Ptr, 0, 0x4000);
|
||||||
MC68000.m1.SaveStateBinary(writer);
|
MC68000.m1.SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram, 0, 0x800);
|
writer.Write(Memory.audioram_Ptr, 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);
|
||||||
@ -789,7 +789,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
Memory.Set_mainram(reader.ReadBytes(0x4000));
|
Memory.Set_mainram(reader.ReadBytes(0x4000));
|
||||||
MC68000.m1.LoadStateBinary(reader);
|
MC68000.m1.LoadStateBinary(reader);
|
||||||
Memory.audioram = reader.ReadBytes(0x800);
|
Memory.Set_audioram(reader.ReadBytes(0x800));
|
||||||
Z80A.zz1[0].LoadStateBinary(reader);
|
Z80A.zz1[0].LoadStateBinary(reader);
|
||||||
Cpuint.LoadStateBinary(reader);
|
Cpuint.LoadStateBinary(reader);
|
||||||
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
||||||
@ -841,7 +841,7 @@ namespace MAME.Core
|
|||||||
writer.Write(Memory.mainram_Ptr, 0, 0x4000);
|
writer.Write(Memory.mainram_Ptr, 0, 0x4000);
|
||||||
writer.Write(mainram2, 0, 0x80);
|
writer.Write(mainram2, 0, 0x80);
|
||||||
MC68000.m1.SaveStateBinary(writer);
|
MC68000.m1.SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram, 0, 0x800);
|
writer.Write(Memory.audioram_Ptr, 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);
|
||||||
@ -897,7 +897,7 @@ namespace MAME.Core
|
|||||||
Memory.Set_mainram(reader.ReadBytes(0x4000));
|
Memory.Set_mainram(reader.ReadBytes(0x4000));
|
||||||
mainram2 = reader.ReadBytes(0x80);
|
mainram2 = reader.ReadBytes(0x80);
|
||||||
MC68000.m1.LoadStateBinary(reader);
|
MC68000.m1.LoadStateBinary(reader);
|
||||||
Memory.audioram = reader.ReadBytes(0x800);
|
Memory.Set_audioram(reader.ReadBytes(0x800));
|
||||||
Z80A.zz1[0].LoadStateBinary(reader);
|
Z80A.zz1[0].LoadStateBinary(reader);
|
||||||
Cpuint.LoadStateBinary(reader);
|
Cpuint.LoadStateBinary(reader);
|
||||||
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
||||||
@ -949,7 +949,7 @@ namespace MAME.Core
|
|||||||
writer.Write(Memory.mainram_Ptr, 0, 0x4000);
|
writer.Write(Memory.mainram_Ptr, 0, 0x4000);
|
||||||
writer.Write(mainram2, 0, 0x80);
|
writer.Write(mainram2, 0, 0x80);
|
||||||
MC68000.m1.SaveStateBinary(writer);
|
MC68000.m1.SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram, 0, 0x800);
|
writer.Write(Memory.audioram_Ptr, 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);
|
||||||
@ -1001,7 +1001,7 @@ namespace MAME.Core
|
|||||||
Memory.Set_mainram(reader.ReadBytes(0x4000));
|
Memory.Set_mainram(reader.ReadBytes(0x4000));
|
||||||
mainram2 = reader.ReadBytes(0x80);
|
mainram2 = reader.ReadBytes(0x80);
|
||||||
MC68000.m1.LoadStateBinary(reader);
|
MC68000.m1.LoadStateBinary(reader);
|
||||||
Memory.audioram = reader.ReadBytes(0x800);
|
Memory.Set_audioram(reader.ReadBytes(0x800));
|
||||||
Z80A.zz1[0].LoadStateBinary(reader);
|
Z80A.zz1[0].LoadStateBinary(reader);
|
||||||
Cpuint.LoadStateBinary(reader);
|
Cpuint.LoadStateBinary(reader);
|
||||||
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
||||||
@ -1053,7 +1053,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x4000);
|
writer.Write(Memory.mainram_Ptr, 0, 0x4000);
|
||||||
MC68000.m1.SaveStateBinary(writer);
|
MC68000.m1.SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram, 0, 0x800);
|
writer.Write(Memory.audioram_Ptr, 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);
|
||||||
@ -1105,7 +1105,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
Memory.Set_mainram(reader.ReadBytes(0x4000));
|
Memory.Set_mainram(reader.ReadBytes(0x4000));
|
||||||
MC68000.m1.LoadStateBinary(reader);
|
MC68000.m1.LoadStateBinary(reader);
|
||||||
Memory.audioram = reader.ReadBytes(0x800);
|
Memory.Set_audioram(reader.ReadBytes(0x800));
|
||||||
Z80A.zz1[0].LoadStateBinary(reader);
|
Z80A.zz1[0].LoadStateBinary(reader);
|
||||||
Cpuint.LoadStateBinary(reader);
|
Cpuint.LoadStateBinary(reader);
|
||||||
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
||||||
@ -1158,7 +1158,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x4000);
|
writer.Write(Memory.mainram_Ptr, 0, 0x4000);
|
||||||
MC68000.m1.SaveStateBinary(writer);
|
MC68000.m1.SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram, 0, 0x2000);
|
writer.Write(Memory.audioram_Ptr, 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);
|
||||||
@ -1216,7 +1216,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
Memory.Set_mainram(reader.ReadBytes(0x4000));
|
Memory.Set_mainram(reader.ReadBytes(0x4000));
|
||||||
MC68000.m1.LoadStateBinary(reader);
|
MC68000.m1.LoadStateBinary(reader);
|
||||||
Memory.audioram = reader.ReadBytes(0x2000);
|
Memory.Set_audioram(reader.ReadBytes(0x2000));
|
||||||
Z80A.zz1[0].LoadStateBinary(reader);
|
Z80A.zz1[0].LoadStateBinary(reader);
|
||||||
Cpuint.LoadStateBinary(reader);
|
Cpuint.LoadStateBinary(reader);
|
||||||
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace MAME.Core
|
namespace MAME.Core
|
||||||
{
|
{
|
||||||
public partial class M72
|
public unsafe partial class M72
|
||||||
{
|
{
|
||||||
public static byte[] protection_ram;
|
public static byte[] protection_ram;
|
||||||
public static EmuTimer.emu_timer scanline_timer;
|
public static EmuTimer.emu_timer scanline_timer;
|
||||||
@ -78,7 +78,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
samplesrom = Machine.GetRom("samples.rom");
|
samplesrom = Machine.GetRom("samples.rom");
|
||||||
Memory.Set_mainram(new byte[0x4000]);
|
Memory.Set_mainram(new byte[0x4000]);
|
||||||
Memory.audioram = new byte[0x10000];
|
Memory.Set_audioram(new byte[0x10000]);
|
||||||
dsw = 0xffbf;
|
dsw = 0xffbf;
|
||||||
if (Memory.mainrom_IsNull || Memory.audiorom_IsNull || sprites1rom == null || gfx21rom == null || samplesrom == null)
|
if (Memory.mainrom_IsNull || Memory.audiorom_IsNull || sprites1rom == null || gfx21rom == null || samplesrom == null)
|
||||||
{
|
{
|
||||||
@ -137,20 +137,20 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
public static byte soundram_r(int offset)
|
public static byte soundram_r(int offset)
|
||||||
{
|
{
|
||||||
return Memory.audioram[offset];
|
return Memory.audioram_Ptr[offset];
|
||||||
}
|
}
|
||||||
public static ushort soundram_r2(int offset)
|
public static ushort soundram_r2(int offset)
|
||||||
{
|
{
|
||||||
return (ushort)(Memory.audioram[offset * 2 + 0] | (Memory.audioram[offset * 2 + 1] << 8));
|
return (ushort)(Memory.audioram_Ptr[offset * 2 + 0] | (Memory.audioram_Ptr[offset * 2 + 1] << 8));
|
||||||
}
|
}
|
||||||
public static void soundram_w(int offset, byte data)
|
public static void soundram_w(int offset, byte data)
|
||||||
{
|
{
|
||||||
Memory.audioram[offset] = data;
|
Memory.audioram_Ptr[offset] = data;
|
||||||
}
|
}
|
||||||
public static void soundram_w(int offset, ushort data)
|
public static void soundram_w(int offset, ushort data)
|
||||||
{
|
{
|
||||||
Memory.audioram[offset * 2] = (byte)data;
|
Memory.audioram_Ptr[offset * 2] = (byte)data;
|
||||||
Memory.audioram[offset * 2 + 1] = (byte)(data >> 8);
|
Memory.audioram_Ptr[offset * 2 + 1] = (byte)(data >> 8);
|
||||||
}
|
}
|
||||||
public static void machine_start_m72()
|
public static void machine_start_m72()
|
||||||
{
|
{
|
||||||
|
@ -544,7 +544,7 @@
|
|||||||
byte result = 0;
|
byte result = 0;
|
||||||
if (address >= 0 && address <= 0xffff)
|
if (address >= 0 && address <= 0xffff)
|
||||||
{
|
{
|
||||||
result = Memory.audioram[address];
|
result = Memory.audioram_Ptr[address];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -557,7 +557,7 @@
|
|||||||
}
|
}
|
||||||
else if (address >= 0xf000 && address <= 0xffff)
|
else if (address >= 0xf000 && address <= 0xffff)
|
||||||
{
|
{
|
||||||
result = Memory.audioram[address - 0xf000];
|
result = Memory.audioram_Ptr[address - 0xf000];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -565,14 +565,14 @@
|
|||||||
{
|
{
|
||||||
if (address >= 0x0000 && address <= 0xffff)
|
if (address >= 0x0000 && address <= 0xffff)
|
||||||
{
|
{
|
||||||
Memory.audioram[address] = value;
|
Memory.audioram_Ptr[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[address - 0xf000] = value;
|
Memory.audioram_Ptr[address - 0xf000] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static byte ZReadHardware(ushort address)
|
public static byte ZReadHardware(ushort address)
|
||||||
|
@ -47,7 +47,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x4000);
|
writer.Write(Memory.mainram_Ptr, 0, 0x4000);
|
||||||
Nec.nn1[0].SaveStateBinary(writer);
|
Nec.nn1[0].SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram, 0, 0x10000);
|
writer.Write(Memory.audioram_Ptr, 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);
|
||||||
@ -108,7 +108,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
Memory.Set_mainram(reader.ReadBytes(0x4000));
|
Memory.Set_mainram(reader.ReadBytes(0x4000));
|
||||||
Nec.nn1[0].LoadStateBinary(reader);
|
Nec.nn1[0].LoadStateBinary(reader);
|
||||||
Memory.audioram = reader.ReadBytes(0x10000);
|
Memory.Set_audioram(reader.ReadBytes(0x10000));
|
||||||
Z80A.zz1[0].LoadStateBinary(reader);
|
Z80A.zz1[0].LoadStateBinary(reader);
|
||||||
Cpuint.LoadStateBinary(reader);
|
Cpuint.LoadStateBinary(reader);
|
||||||
Cpuint.LoadStateBinary_v(reader);
|
Cpuint.LoadStateBinary_v(reader);
|
||||||
|
@ -240,7 +240,7 @@ namespace MAME.Core
|
|||||||
Memory.Set_audiorom(Machine.GetRom("soundcpu.rom"));
|
Memory.Set_audiorom(Machine.GetRom("soundcpu.rom"));
|
||||||
Iremga20.iremrom = Machine.GetRom("irem.rom");
|
Iremga20.iremrom = Machine.GetRom("irem.rom");
|
||||||
Memory.Set_mainram(new byte[0x10000]);
|
Memory.Set_mainram(new byte[0x10000]);
|
||||||
Memory.audioram = new byte[0x4000];
|
Memory.Set_audioram(new byte[0x4000]);
|
||||||
gfx1rom = Machine.GetRom("gfx1.rom");
|
gfx1rom = Machine.GetRom("gfx1.rom");
|
||||||
n1 = gfx1rom.Length;
|
n1 = gfx1rom.Length;
|
||||||
gfx11rom = new byte[n1 * 2];
|
gfx11rom = new byte[n1 * 2];
|
||||||
|
@ -383,7 +383,7 @@
|
|||||||
else if (address >= 0xa0000 && address <= 0xa3fff)
|
else if (address >= 0xa0000 && address <= 0xa3fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xa0000;
|
int offset = address - 0xa0000;
|
||||||
result = Memory.audioram[offset];
|
result = Memory.audioram_Ptr[offset];
|
||||||
}
|
}
|
||||||
else if (address >= 0xa8000 && address <= 0xa803f)
|
else if (address >= 0xa8000 && address <= 0xa803f)
|
||||||
{
|
{
|
||||||
@ -416,7 +416,7 @@
|
|||||||
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[offset] + Memory.audioram[offset + 1] * 0x100);
|
result = (ushort)(Memory.audioram_Ptr[offset] + Memory.audioram_Ptr[offset + 1] * 0x100);
|
||||||
}
|
}
|
||||||
else if (address >= 0xa8000 && address + 1 <= 0xa803f)
|
else if (address >= 0xa8000 && address + 1 <= 0xa803f)
|
||||||
{
|
{
|
||||||
@ -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[offset] = value;
|
Memory.audioram_Ptr[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[offset] = (byte)value;
|
Memory.audioram_Ptr[offset] = (byte)value;
|
||||||
Memory.audioram[offset + 1] = (byte)(value >> 8);
|
Memory.audioram_Ptr[offset + 1] = (byte)(value >> 8);
|
||||||
}
|
}
|
||||||
else if (address >= 0xa8000 && address + 1 <= 0xa803f)
|
else if (address >= 0xa8000 && address + 1 <= 0xa803f)
|
||||||
{
|
{
|
||||||
|
@ -61,7 +61,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x10000);
|
writer.Write(Memory.mainram_Ptr, 0, 0x10000);
|
||||||
Nec.nn1[0].SaveStateBinary(writer);
|
Nec.nn1[0].SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram, 0, 0x4000);
|
writer.Write(Memory.audioram_Ptr, 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);
|
||||||
@ -138,7 +138,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
Memory.Set_mainram(reader.ReadBytes(0x10000));
|
Memory.Set_mainram(reader.ReadBytes(0x10000));
|
||||||
Nec.nn1[0].LoadStateBinary(reader);
|
Nec.nn1[0].LoadStateBinary(reader);
|
||||||
Memory.audioram = reader.ReadBytes(0x4000);
|
Memory.Set_audioram(reader.ReadBytes(0x4000));
|
||||||
Nec.nn1[1].LoadStateBinary(reader);
|
Nec.nn1[1].LoadStateBinary(reader);
|
||||||
Cpuint.LoadStateBinary(reader);
|
Cpuint.LoadStateBinary(reader);
|
||||||
Cpuint.LoadStateBinary_v(reader);
|
Cpuint.LoadStateBinary_v(reader);
|
||||||
|
@ -2001,7 +2001,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0xf800 && address <= 0xffff)
|
else if (address >= 0xf800 && address <= 0xffff)
|
||||||
{
|
{
|
||||||
result = Memory.audioram[address - 0xf800];
|
result = Memory.audioram_Ptr[address - 0xf800];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -2030,7 +2030,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0xf800 && address <= 0xffff)
|
else if (address >= 0xf800 && address <= 0xffff)
|
||||||
{
|
{
|
||||||
result = Memory.audioram[address - 0xf800];
|
result = Memory.audioram_Ptr[address - 0xf800];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -2038,7 +2038,7 @@ namespace MAME.Core
|
|||||||
{
|
{
|
||||||
if (address >= 0xf800 && address <= 0xffff)
|
if (address >= 0xf800 && address <= 0xffff)
|
||||||
{
|
{
|
||||||
Memory.audioram[address - 0xf800] = value;
|
Memory.audioram_Ptr[address - 0xf800] = value;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -37,7 +37,7 @@ namespace MAME.Core
|
|||||||
pvc_cartridge_ram = new byte[0x2000];
|
pvc_cartridge_ram = new byte[0x2000];
|
||||||
Memory.Set_mainram(new byte[0x10000]);
|
Memory.Set_mainram(new byte[0x10000]);
|
||||||
mainram2 = new byte[0x10000];
|
mainram2 = new byte[0x10000];
|
||||||
Memory.audioram = new byte[0x800];
|
Memory.Set_audioram(new byte[0x800]);
|
||||||
Machine.bRom = true;
|
Machine.bRom = true;
|
||||||
dsw = 0xff;
|
dsw = 0xff;
|
||||||
fixedbiosrom = MameMainMotion.resource.sfix;
|
fixedbiosrom = MameMainMotion.resource.sfix;
|
||||||
|
@ -48,7 +48,7 @@ namespace MAME.Core
|
|||||||
writer.Write(auto_animation_frame_counter);
|
writer.Write(auto_animation_frame_counter);
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x10000);
|
writer.Write(Memory.mainram_Ptr, 0, 0x10000);
|
||||||
MC68000.m1.SaveStateBinary(writer);
|
MC68000.m1.SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram, 0, 0x800);
|
writer.Write(Memory.audioram_Ptr, 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);
|
||||||
@ -119,7 +119,7 @@ namespace MAME.Core
|
|||||||
auto_animation_frame_counter = reader.ReadInt32();
|
auto_animation_frame_counter = reader.ReadInt32();
|
||||||
Memory.Set_mainram(reader.ReadBytes(0x10000));
|
Memory.Set_mainram(reader.ReadBytes(0x10000));
|
||||||
MC68000.m1.LoadStateBinary(reader);
|
MC68000.m1.LoadStateBinary(reader);
|
||||||
Memory.audioram = reader.ReadBytes(0x800);
|
Memory.Set_audioram(reader.ReadBytes(0x800));
|
||||||
Z80A.zz1[0].LoadStateBinary(reader);
|
Z80A.zz1[0].LoadStateBinary(reader);
|
||||||
Cpuint.LoadStateBinary(reader);
|
Cpuint.LoadStateBinary(reader);
|
||||||
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
||||||
|
@ -587,12 +587,12 @@
|
|||||||
}
|
}
|
||||||
public static byte ZReadMemory(ushort address)
|
public static byte ZReadMemory(ushort address)
|
||||||
{
|
{
|
||||||
byte result = Memory.audioram[address];
|
byte result = Memory.audioram_Ptr[address];
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
public static void ZWriteMemory(ushort address, byte value)
|
public static void ZWriteMemory(ushort address, byte value)
|
||||||
{
|
{
|
||||||
Memory.audioram[address] = value;
|
Memory.audioram_Ptr[address] = value;
|
||||||
}
|
}
|
||||||
public static byte ZReadHardware(ushort address)
|
public static byte ZReadHardware(ushort address)
|
||||||
{
|
{
|
||||||
|
@ -52,7 +52,7 @@ namespace MAME.Core
|
|||||||
pgm_rowscrollram = new byte[0x800];
|
pgm_rowscrollram = new byte[0x800];
|
||||||
Generic.paletteram16 = new ushort[0x900];
|
Generic.paletteram16 = new ushort[0x900];
|
||||||
pgm_videoregs = new byte[0x10000];
|
pgm_videoregs = new byte[0x10000];
|
||||||
Memory.audioram = new byte[0x10000];
|
Memory.Set_audioram(new byte[0x10000]);
|
||||||
if (Memory.mainrom_IsNull || sprmaskrom == null || pgm_sprite_a_region == null)
|
if (Memory.mainrom_IsNull || sprmaskrom == null || pgm_sprite_a_region == null)
|
||||||
{
|
{
|
||||||
Machine.bRom = false;
|
Machine.bRom = false;
|
||||||
@ -101,14 +101,14 @@ namespace MAME.Core
|
|||||||
Cpuint.cpunum_set_input_line(1, (int)LineState.INPUT_LINE_HALT, LineState.ASSERT_LINE);
|
Cpuint.cpunum_set_input_line(1, (int)LineState.INPUT_LINE_HALT, LineState.ASSERT_LINE);
|
||||||
device_reset();
|
device_reset();
|
||||||
}
|
}
|
||||||
public static byte z80_ram_r(int offset)
|
public unsafe static byte z80_ram_r(int offset)
|
||||||
{
|
{
|
||||||
return Memory.audioram[offset];
|
return Memory.audioram_Ptr[offset];
|
||||||
}
|
}
|
||||||
public 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[offset] = data;
|
Memory.audioram_Ptr[offset] = data;
|
||||||
if (pc != 0xf12 && pc != 0xde2 && pc != 0x100c50 && pc != 0x100b20)
|
if (pc != 0xf12 && pc != 0xde2 && pc != 0x100c50 && pc != 0x100b20)
|
||||||
{
|
{
|
||||||
//error
|
//error
|
||||||
|
@ -35,7 +35,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
writer.Write(Memory.mainram_Ptr, 0, 0x20000);
|
writer.Write(Memory.mainram_Ptr, 0, 0x20000);
|
||||||
MC68000.m1.SaveStateBinary(writer);
|
MC68000.m1.SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram, 0, 0x10000);
|
writer.Write(Memory.audioram_Ptr, 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);
|
||||||
@ -87,7 +87,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
Memory.Set_mainram(reader.ReadBytes(0x20000));
|
Memory.Set_mainram(reader.ReadBytes(0x20000));
|
||||||
MC68000.m1.LoadStateBinary(reader);
|
MC68000.m1.LoadStateBinary(reader);
|
||||||
Memory.audioram = reader.ReadBytes(0x10000);
|
Memory.Set_audioram(reader.ReadBytes(0x10000));
|
||||||
Z80A.zz1[0].LoadStateBinary(reader);
|
Z80A.zz1[0].LoadStateBinary(reader);
|
||||||
Cpuint.LoadStateBinary(reader);
|
Cpuint.LoadStateBinary(reader);
|
||||||
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
||||||
|
@ -155,7 +155,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0xc000 && address <= 0xc7ff)
|
else if (address >= 0xc000 && address <= 0xc7ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0xc000;
|
int offset = address - 0xc000;
|
||||||
result = Memory.audioram[offset];
|
result = Memory.audioram_Ptr[offset];
|
||||||
}
|
}
|
||||||
else if (address == 0xc800)
|
else if (address == 0xc800)
|
||||||
{
|
{
|
||||||
@ -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[offset] = value;
|
Memory.audioram_Ptr[offset] = value;
|
||||||
}
|
}
|
||||||
else if (address == 0xd000)
|
else if (address == 0xd000)
|
||||||
{
|
{
|
||||||
|
@ -37,7 +37,7 @@ namespace MAME.Core
|
|||||||
gfx1rom[i * 2 + 1] = (byte)(gfx12rom[i] & 0x0f);
|
gfx1rom[i * 2 + 1] = (byte)(gfx12rom[i] & 0x0f);
|
||||||
}
|
}
|
||||||
Memory.Set_mainram(new byte[0x1800]);
|
Memory.Set_mainram(new byte[0x1800]);
|
||||||
Memory.audioram = new byte[0x800];
|
Memory.Set_audioram(new byte[0x800]);
|
||||||
Generic.paletteram = new byte[0x200];
|
Generic.paletteram = new byte[0x200];
|
||||||
if (mainromop == null || Memory.mainrom_IsNull || Memory.audiorom_IsNull || samplesrom == null || gfx12rom == null)
|
if (mainromop == null || Memory.mainrom_IsNull || Memory.audiorom_IsNull || samplesrom == null || gfx12rom == null)
|
||||||
{
|
{
|
||||||
|
@ -380,7 +380,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x8000 && address <= 0x8fff)
|
else if (address >= 0x8000 && address <= 0x8fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
result = Memory.audioram[offset];
|
result = Memory.audioram_Ptr[offset];
|
||||||
}
|
}
|
||||||
else if (address == 0x9000)
|
else if (address == 0x9000)
|
||||||
{
|
{
|
||||||
@ -413,7 +413,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x8000 && address <= 0x8fff)
|
else if (address >= 0x8000 && address <= 0x8fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
Memory.audioram[offset] = value;
|
Memory.audioram_Ptr[offset] = value;
|
||||||
}
|
}
|
||||||
else if (address == 0x9000)
|
else if (address == 0x9000)
|
||||||
{
|
{
|
||||||
@ -622,7 +622,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x8000 && address <= 0x8fff)
|
else if (address >= 0x8000 && address <= 0x8fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
result = Memory.audioram[offset];
|
result = Memory.audioram_Ptr[offset];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -636,7 +636,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x8000 && address <= 0x8fff)
|
else if (address >= 0x8000 && address <= 0x8fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
result = Memory.audioram[offset];
|
result = Memory.audioram_Ptr[offset];
|
||||||
}
|
}
|
||||||
else if (address == 0x9000)
|
else if (address == 0x9000)
|
||||||
{
|
{
|
||||||
@ -669,7 +669,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x8000 && address <= 0x8fff)
|
else if (address >= 0x8000 && address <= 0x8fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
Memory.audioram[offset] = value;
|
Memory.audioram_Ptr[offset] = value;
|
||||||
}
|
}
|
||||||
else if (address == 0x9000)
|
else if (address == 0x9000)
|
||||||
{
|
{
|
||||||
@ -2491,7 +2491,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x8000 && address <= 0x8fff)
|
else if (address >= 0x8000 && address <= 0x8fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
result = Memory.audioram[offset];
|
result = Memory.audioram_Ptr[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[offset];
|
result = Memory.audioram_Ptr[offset];
|
||||||
}
|
}
|
||||||
else if (address == 0xa001)
|
else if (address == 0xa001)
|
||||||
{
|
{
|
||||||
@ -2522,7 +2522,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x8000 && address <= 0x8fff)
|
else if (address >= 0x8000 && address <= 0x8fff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x8000;
|
int offset = address - 0x8000;
|
||||||
Memory.audioram[offset] = value;
|
Memory.audioram_Ptr[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[offset] = value;
|
Memory.audioram_Ptr[offset] = value;
|
||||||
}
|
}
|
||||||
else if (address == 0x9000)
|
else if (address == 0x9000)
|
||||||
{
|
{
|
||||||
|
@ -26,7 +26,7 @@ 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_Ptr, 0, 0x1800);
|
||||||
writer.Write(Memory.audioram, 0, 0x1000);
|
writer.Write(Memory.audioram_Ptr, 0, 0x1000);
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
Z80A.zz1[i].SaveStateBinary(writer);
|
Z80A.zz1[i].SaveStateBinary(writer);
|
||||||
@ -75,7 +75,7 @@ namespace MAME.Core
|
|||||||
Palette.entry_color[i] = reader.ReadUInt32();
|
Palette.entry_color[i] = reader.ReadUInt32();
|
||||||
}
|
}
|
||||||
Memory.Set_mainram(reader.ReadBytes(0x1800));
|
Memory.Set_mainram(reader.ReadBytes(0x1800));
|
||||||
Memory.audioram = reader.ReadBytes(0x1000);
|
Memory.Set_audioram(reader.ReadBytes(0x1000));
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
Z80A.zz1[i].LoadStateBinary(reader);
|
Z80A.zz1[i].LoadStateBinary(reader);
|
||||||
@ -134,7 +134,7 @@ 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_Ptr, 0, 0x1800);
|
||||||
writer.Write(Memory.audioram, 0, 0x1000);
|
writer.Write(Memory.audioram_Ptr, 0, 0x1000);
|
||||||
writer.Write(mcuram, 0, 0xc0);
|
writer.Write(mcuram, 0, 0xc0);
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
@ -198,7 +198,7 @@ namespace MAME.Core
|
|||||||
Palette.entry_color[i] = reader.ReadUInt32();
|
Palette.entry_color[i] = reader.ReadUInt32();
|
||||||
}
|
}
|
||||||
Memory.Set_mainram(reader.ReadBytes(0x1800));
|
Memory.Set_mainram(reader.ReadBytes(0x1800));
|
||||||
Memory.audioram = reader.ReadBytes(0x1000);
|
Memory.Set_audioram(reader.ReadBytes(0x1000));
|
||||||
mcuram = reader.ReadBytes(0xc0);
|
mcuram = reader.ReadBytes(0xc0);
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
@ -253,7 +253,7 @@ namespace MAME.Core
|
|||||||
writer.Write(Memory.mainram_Ptr, 0, 0x1800);
|
writer.Write(Memory.mainram_Ptr, 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, 0, 0x1000);
|
writer.Write(Memory.audioram_Ptr, 0, 0x1000);
|
||||||
writer.Write(mcuram, 0, 0xc0);
|
writer.Write(mcuram, 0, 0xc0);
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
@ -307,7 +307,7 @@ namespace MAME.Core
|
|||||||
Memory.Set_mainram(reader.ReadBytes(0x1800));
|
Memory.Set_mainram(reader.ReadBytes(0x1800));
|
||||||
mainram2 = reader.ReadBytes(0x100);
|
mainram2 = reader.ReadBytes(0x100);
|
||||||
mainram3 = reader.ReadBytes(0x100);
|
mainram3 = reader.ReadBytes(0x100);
|
||||||
Memory.audioram = reader.ReadBytes(0x1000);
|
Memory.Set_audioram(reader.ReadBytes(0x1000));
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
Z80A.zz1[i].LoadStateBinary(reader);
|
Z80A.zz1[i].LoadStateBinary(reader);
|
||||||
@ -363,7 +363,7 @@ 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_Ptr, 0, 0x1800);
|
||||||
writer.Write(Memory.audioram, 0, 0x1000);
|
writer.Write(Memory.audioram_Ptr, 0, 0x1000);
|
||||||
writer.Write(mcuram, 0, 0xc0);
|
writer.Write(mcuram, 0, 0xc0);
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
@ -421,7 +421,7 @@ namespace MAME.Core
|
|||||||
Palette.entry_color[i] = reader.ReadUInt32();
|
Palette.entry_color[i] = reader.ReadUInt32();
|
||||||
}
|
}
|
||||||
Memory.Set_mainram(reader.ReadBytes(0x1800));
|
Memory.Set_mainram(reader.ReadBytes(0x1800));
|
||||||
Memory.audioram = reader.ReadBytes(0x1000);
|
Memory.Set_audioram(reader.ReadBytes(0x1000));
|
||||||
mcuram = reader.ReadBytes(0xc0);
|
mcuram = reader.ReadBytes(0xc0);
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
@ -568,7 +568,7 @@ namespace MAME.Core
|
|||||||
writer.Write(Memory.mainram_Ptr, 0, 0x8000);
|
writer.Write(Memory.mainram_Ptr, 0, 0x8000);
|
||||||
writer.Write(mainram2, 0, 0x10000);
|
writer.Write(mainram2, 0, 0x10000);
|
||||||
MC68000.m1.SaveStateBinary(writer);
|
MC68000.m1.SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram, 0, 0x1000);
|
writer.Write(Memory.audioram_Ptr, 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);
|
||||||
@ -705,7 +705,7 @@ namespace MAME.Core
|
|||||||
Memory.Set_mainram(reader.ReadBytes(0x8000));
|
Memory.Set_mainram(reader.ReadBytes(0x8000));
|
||||||
mainram2 = reader.ReadBytes(0x10000);
|
mainram2 = reader.ReadBytes(0x10000);
|
||||||
MC68000.m1.LoadStateBinary(reader);
|
MC68000.m1.LoadStateBinary(reader);
|
||||||
Memory.audioram = reader.ReadBytes(0x1000);
|
Memory.Set_audioram(reader.ReadBytes(0x1000));
|
||||||
for (i = 0; i < Z80A.nZ80; i++)
|
for (i = 0; i < Z80A.nZ80; i++)
|
||||||
{
|
{
|
||||||
Z80A.zz1[i].LoadStateBinary(reader);
|
Z80A.zz1[i].LoadStateBinary(reader);
|
||||||
|
@ -19,7 +19,7 @@ namespace MAME.Core
|
|||||||
videoram = new byte[0x1d00];
|
videoram = new byte[0x1d00];
|
||||||
bublbobl_objectram = new byte[0x300];
|
bublbobl_objectram = new byte[0x300];
|
||||||
Memory.Set_mainram(new byte[0x1800]);
|
Memory.Set_mainram(new byte[0x1800]);
|
||||||
Memory.audioram = new byte[0x1000];
|
Memory.Set_audioram(new byte[0x1000]);
|
||||||
Generic.paletteram = new byte[0x200];
|
Generic.paletteram = new byte[0x200];
|
||||||
//bublbobl_mcu_sharedram = new byte[0x400];
|
//bublbobl_mcu_sharedram = new byte[0x400];
|
||||||
Memory.Set_mainrom(Machine.GetRom("maincpu.rom"));
|
Memory.Set_mainrom(Machine.GetRom("maincpu.rom"));
|
||||||
@ -57,7 +57,7 @@ namespace MAME.Core
|
|||||||
videoram = new byte[0x1d00];
|
videoram = new byte[0x1d00];
|
||||||
bublbobl_objectram = new byte[0x300];
|
bublbobl_objectram = new byte[0x300];
|
||||||
Memory.Set_mainram(new byte[0x1800]);
|
Memory.Set_mainram(new byte[0x1800]);
|
||||||
Memory.audioram = new byte[0x1000];
|
Memory.Set_audioram(new byte[0x1000]);
|
||||||
mcuram = new byte[0xc0];
|
mcuram = new byte[0xc0];
|
||||||
Generic.paletteram = new byte[0x200];
|
Generic.paletteram = new byte[0x200];
|
||||||
bublbobl_mcu_sharedram = new byte[0x400];
|
bublbobl_mcu_sharedram = new byte[0x400];
|
||||||
@ -99,7 +99,7 @@ namespace MAME.Core
|
|||||||
videoram = new byte[0x1d00];
|
videoram = new byte[0x1d00];
|
||||||
bublbobl_objectram = new byte[0x300];
|
bublbobl_objectram = new byte[0x300];
|
||||||
Memory.Set_mainram(new byte[0x1800]);
|
Memory.Set_mainram(new byte[0x1800]);
|
||||||
Memory.audioram = new byte[0x1000];
|
Memory.Set_audioram(new byte[0x1000]);
|
||||||
Generic.paletteram = new byte[0x200];
|
Generic.paletteram = new byte[0x200];
|
||||||
Memory.Set_mainrom(Machine.GetRom("maincpu.rom"));
|
Memory.Set_mainrom(Machine.GetRom("maincpu.rom"));
|
||||||
slaverom = Machine.GetRom("slave.rom");
|
slaverom = Machine.GetRom("slave.rom");
|
||||||
@ -132,7 +132,7 @@ namespace MAME.Core
|
|||||||
videoram = new byte[0x1d00];
|
videoram = new byte[0x1d00];
|
||||||
bublbobl_objectram = new byte[0x300];
|
bublbobl_objectram = new byte[0x300];
|
||||||
Memory.Set_mainram(new byte[0x1800]);
|
Memory.Set_mainram(new byte[0x1800]);
|
||||||
Memory.audioram = new byte[0x1000];
|
Memory.Set_audioram(new byte[0x1000]);
|
||||||
Generic.paletteram = new byte[0x200];
|
Generic.paletteram = new byte[0x200];
|
||||||
Memory.Set_mainrom(Machine.GetRom("maincpu.rom"));
|
Memory.Set_mainrom(Machine.GetRom("maincpu.rom"));
|
||||||
slaverom = Machine.GetRom("slave.rom");
|
slaverom = Machine.GetRom("slave.rom");
|
||||||
@ -167,7 +167,7 @@ namespace MAME.Core
|
|||||||
cchip_ram = new byte[0x2000];
|
cchip_ram = new byte[0x2000];
|
||||||
Generic.paletteram16 = new ushort[0x800];
|
Generic.paletteram16 = new ushort[0x800];
|
||||||
Memory.Set_mainram(new byte[0x8000]);
|
Memory.Set_mainram(new byte[0x8000]);
|
||||||
Memory.audioram = new byte[0x1000];
|
Memory.Set_audioram(new byte[0x1000]);
|
||||||
Memory.Set_mainrom(Machine.GetRom("maincpu.rom"));
|
Memory.Set_mainrom(Machine.GetRom("maincpu.rom"));
|
||||||
bb1 = Machine.GetRom("audiocpu.rom");
|
bb1 = Machine.GetRom("audiocpu.rom");
|
||||||
//Memory.audiorom = new byte[0x20000];
|
//Memory.audiorom = new byte[0x20000];
|
||||||
@ -211,7 +211,7 @@ namespace MAME.Core
|
|||||||
cchip_ram = new byte[0x2000];
|
cchip_ram = new byte[0x2000];
|
||||||
Generic.paletteram16 = new ushort[0x800];
|
Generic.paletteram16 = new ushort[0x800];
|
||||||
Memory.Set_mainram(new byte[0x8000]);
|
Memory.Set_mainram(new byte[0x8000]);
|
||||||
Memory.audioram = new byte[0x1000];
|
Memory.Set_audioram(new byte[0x1000]);
|
||||||
Memory.Set_mainrom(Machine.GetRom("maincpu.rom"));
|
Memory.Set_mainrom(Machine.GetRom("maincpu.rom"));
|
||||||
bb1 = Machine.GetRom("audiocpu.rom");
|
bb1 = Machine.GetRom("audiocpu.rom");
|
||||||
//Memory.audiorom = new byte[0x20000];
|
//Memory.audiorom = new byte[0x20000];
|
||||||
@ -256,7 +256,7 @@ namespace MAME.Core
|
|||||||
cchip_ram = new byte[0x2000];
|
cchip_ram = new byte[0x2000];
|
||||||
Generic.paletteram16 = new ushort[0x800];
|
Generic.paletteram16 = new ushort[0x800];
|
||||||
Memory.Set_mainram(new byte[0x8000]);
|
Memory.Set_mainram(new byte[0x8000]);
|
||||||
Memory.audioram = new byte[0x1000];
|
Memory.Set_audioram(new byte[0x1000]);
|
||||||
Memory.Set_mainrom(Machine.GetRom("maincpu.rom"));
|
Memory.Set_mainrom(Machine.GetRom("maincpu.rom"));
|
||||||
bb1 = Machine.GetRom("audiocpu.rom");
|
bb1 = Machine.GetRom("audiocpu.rom");
|
||||||
//Memory.audiorom = new byte[0x20000];
|
//Memory.audiorom = new byte[0x20000];
|
||||||
|
@ -702,7 +702,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0xc000 && address <= 0xdfff)
|
else if (address >= 0xc000 && address <= 0xdfff)
|
||||||
{
|
{
|
||||||
result = Memory.audioram[address - 0xc000];
|
result = Memory.audioram_Ptr[address - 0xc000];
|
||||||
}
|
}
|
||||||
else if (address >= 0xe000 && address <= 0xe000)
|
else if (address >= 0xe000 && address <= 0xe000)
|
||||||
{
|
{
|
||||||
@ -738,7 +738,7 @@ namespace MAME.Core
|
|||||||
}
|
}
|
||||||
else if (address >= 0xc000 && address <= 0xdfff)
|
else if (address >= 0xc000 && address <= 0xdfff)
|
||||||
{
|
{
|
||||||
Memory.audioram[address - 0xc000] = value;
|
Memory.audioram_Ptr[address - 0xc000] = value;
|
||||||
}
|
}
|
||||||
else if (address >= 0xe000 && address <= 0xe000)
|
else if (address >= 0xe000 && address <= 0xe000)
|
||||||
{
|
{
|
||||||
|
@ -56,7 +56,7 @@ namespace MAME.Core
|
|||||||
writer.Write(Memory.mainram_Ptr, 0, 0x10000);
|
writer.Write(Memory.mainram_Ptr, 0, 0x10000);
|
||||||
writer.Write(mainram2, 0, 0x1e80);
|
writer.Write(mainram2, 0, 0x1e80);
|
||||||
MC68000.m1.SaveStateBinary(writer);
|
MC68000.m1.SaveStateBinary(writer);
|
||||||
writer.Write(Memory.audioram, 0, 0x2000);
|
writer.Write(Memory.audioram_Ptr, 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);
|
||||||
@ -145,7 +145,7 @@ namespace MAME.Core
|
|||||||
Memory.Set_mainram(reader.ReadBytes(0x10000));
|
Memory.Set_mainram(reader.ReadBytes(0x10000));
|
||||||
mainram2 = reader.ReadBytes(0x1e80);
|
mainram2 = reader.ReadBytes(0x1e80);
|
||||||
MC68000.m1.LoadStateBinary(reader);
|
MC68000.m1.LoadStateBinary(reader);
|
||||||
Memory.audioram = reader.ReadBytes(0x2000);
|
Memory.Set_audioram(reader.ReadBytes(0x2000));
|
||||||
Z80A.zz1[0].LoadStateBinary(reader);
|
Z80A.zz1[0].LoadStateBinary(reader);
|
||||||
Cpuint.LoadStateBinary(reader);
|
Cpuint.LoadStateBinary(reader);
|
||||||
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
||||||
|
@ -22,7 +22,7 @@ namespace MAME.Core
|
|||||||
Memory.Set_mainram(new byte[0x10000]);
|
Memory.Set_mainram(new byte[0x10000]);
|
||||||
mainram2 = new byte[0x1e80];
|
mainram2 = new byte[0x1e80];
|
||||||
mainram3 = new byte[0x2000];
|
mainram3 = new byte[0x2000];
|
||||||
Memory.audioram = new byte[0x2000];
|
Memory.Set_audioram(new byte[0x2000]);
|
||||||
bg_rambank = new ushort[2];
|
bg_rambank = new ushort[2];
|
||||||
fg_rambank = new ushort[2];
|
fg_rambank = new ushort[2];
|
||||||
pixel_scroll = new ushort[2];
|
pixel_scroll = new ushort[2];
|
||||||
|
@ -210,7 +210,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x4000 && address <= 0x47ff)
|
else if (address >= 0x4000 && address <= 0x47ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x4000;
|
int offset = address - 0x4000;
|
||||||
result = Memory.audioram[offset];
|
result = Memory.audioram_Ptr[offset];
|
||||||
}
|
}
|
||||||
else if (address == 0x8000)
|
else if (address == 0x8000)
|
||||||
{
|
{
|
||||||
@ -227,7 +227,7 @@ namespace MAME.Core
|
|||||||
else if (address >= 0x4000 && address <= 0x47ff)
|
else if (address >= 0x4000 && address <= 0x47ff)
|
||||||
{
|
{
|
||||||
int offset = address - 0x4000;
|
int offset = address - 0x4000;
|
||||||
Memory.audioram[offset] = value;
|
Memory.audioram_Ptr[offset] = value;
|
||||||
}
|
}
|
||||||
else if (address == 0xffff)
|
else if (address == 0xffff)
|
||||||
{
|
{
|
||||||
|
@ -22,7 +22,7 @@ namespace MAME.Core
|
|||||||
gfx3rom = Machine.GetRom("gfx3.rom");
|
gfx3rom = Machine.GetRom("gfx3.rom");
|
||||||
gfx32rom = Machine.GetRom("gfx32.rom");
|
gfx32rom = Machine.GetRom("gfx32.rom");
|
||||||
Memory.Set_mainram(new byte[0x1000]);
|
Memory.Set_mainram(new byte[0x1000]);
|
||||||
Memory.audioram = new byte[0x800];
|
Memory.Set_audioram(new byte[0x800]);
|
||||||
Generic.videoram = new byte[0x400];
|
Generic.videoram = new byte[0x400];
|
||||||
pbaction_videoram2 = new byte[0x400];
|
pbaction_videoram2 = new byte[0x400];
|
||||||
Generic.colorram = new byte[0x400];
|
Generic.colorram = new byte[0x400];
|
||||||
@ -46,7 +46,7 @@ namespace MAME.Core
|
|||||||
gfx3rom = Machine.GetRom("gfx3.rom");
|
gfx3rom = Machine.GetRom("gfx3.rom");
|
||||||
gfx32rom = Machine.GetRom("gfx32.rom");
|
gfx32rom = Machine.GetRom("gfx32.rom");
|
||||||
Memory.Set_mainram(new byte[0x1000]);
|
Memory.Set_mainram(new byte[0x1000]);
|
||||||
Memory.audioram = new byte[0x800];
|
Memory.Set_audioram(new byte[0x800]);
|
||||||
Generic.videoram = new byte[0x400];
|
Generic.videoram = new byte[0x400];
|
||||||
pbaction_videoram2 = new byte[0x400];
|
pbaction_videoram2 = new byte[0x400];
|
||||||
Generic.colorram = new byte[0x400];
|
Generic.colorram = new byte[0x400];
|
||||||
|
@ -22,7 +22,7 @@ namespace MAME.Core
|
|||||||
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, 0, 0x800);
|
writer.Write(Memory.audioram_Ptr, 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);
|
||||||
@ -63,7 +63,7 @@ namespace MAME.Core
|
|||||||
pbaction_colorram2 = reader.ReadBytes(0x400);
|
pbaction_colorram2 = reader.ReadBytes(0x400);
|
||||||
Generic.spriteram = reader.ReadBytes(0x80);
|
Generic.spriteram = reader.ReadBytes(0x80);
|
||||||
Generic.paletteram = reader.ReadBytes(0x200);
|
Generic.paletteram = reader.ReadBytes(0x200);
|
||||||
Memory.audioram = reader.ReadBytes(0x800);
|
Memory.Set_audioram(reader.ReadBytes(0x800));
|
||||||
Z80A.zz1[0].LoadStateBinary(reader);
|
Z80A.zz1[0].LoadStateBinary(reader);
|
||||||
Z80A.zz1[1].LoadStateBinary(reader);
|
Z80A.zz1[1].LoadStateBinary(reader);
|
||||||
Cpuint.LoadStateBinary(reader);
|
Cpuint.LoadStateBinary(reader);
|
||||||
|
Loading…
Reference in New Issue
Block a user