Compare commits
No commits in common. "main" and "bak_beforeInput" have entirely different histories.
main
...
bak_before
@ -1,36 +1,21 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace MAME.Core.AxiBitmap
|
||||
{
|
||||
|
||||
[StructLayout(LayoutKind.Explicit)]
|
||||
public struct AxiColor
|
||||
{
|
||||
[FieldOffset(0)]
|
||||
public int sdColor;
|
||||
[FieldOffset(0)]
|
||||
public byte r;
|
||||
[FieldOffset(1)]
|
||||
public byte g;
|
||||
[FieldOffset(2)]
|
||||
public byte b;
|
||||
[FieldOffset(3)]
|
||||
public byte a;
|
||||
|
||||
public byte r, g, b, a;
|
||||
// 构造函数
|
||||
public AxiColor(byte _r, byte _g, byte _b)
|
||||
{
|
||||
r = g = b = a = 0;
|
||||
sdColor = 0;
|
||||
r = _r;
|
||||
g = _g;
|
||||
b = _b;
|
||||
a = byte.MaxValue;
|
||||
a = 255;
|
||||
}
|
||||
|
||||
public AxiColor(byte _r, byte _g, byte _b, byte _a)
|
||||
{
|
||||
r = g = b = a = 0;
|
||||
sdColor = 0;
|
||||
r = _r;
|
||||
g = _g;
|
||||
b = _b;
|
||||
@ -38,17 +23,15 @@ namespace MAME.Core.AxiBitmap
|
||||
}
|
||||
public static AxiColor FromArgb(int argb)
|
||||
{
|
||||
return new AxiColor { sdColor = argb };
|
||||
byte a = (byte)((argb >> 24) & 0xFF);
|
||||
byte r = (byte)((argb >> 16) & 0xFF);
|
||||
byte g = (byte)((argb >> 8) & 0xFF);
|
||||
byte b = (byte)(argb & 0xFF);
|
||||
return new AxiColor { r = r, g = g, b = b, a = a };
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return String.Format("{0:X8}", sdColor);
|
||||
}
|
||||
|
||||
public static int ToArgb(AxiColor color)
|
||||
{
|
||||
return color.sdColor;
|
||||
return (color.a << 24) | (color.r << 16) | (color.g << 8) | color.b;
|
||||
}
|
||||
|
||||
#region 颜色定义
|
||||
@ -194,7 +177,86 @@ namespace MAME.Core.AxiBitmap
|
||||
#endregion
|
||||
}
|
||||
|
||||
public struct Rectangle
|
||||
{
|
||||
public int X;
|
||||
public int Y;
|
||||
public int Width;
|
||||
public int Height;
|
||||
public Rectangle(int x, int y, int width, int height)
|
||||
{
|
||||
X = x;
|
||||
Y = y;
|
||||
Width = width;
|
||||
Height = height;
|
||||
}
|
||||
public int Right => X + Width;
|
||||
public int Bottom => Y + Height;
|
||||
public int Area { get { return Width * Height; } }
|
||||
public bool Contains(int pointX, int pointY) { return pointX >= X && pointX < X + Width && pointY >= Y && pointY < Y + Height; }
|
||||
}
|
||||
public enum RotateFlipType
|
||||
{
|
||||
RotateNoneFlipNone = 0,
|
||||
Rotate90FlipNone = 1,
|
||||
Rotate180FlipNone = 2,
|
||||
Rotate270FlipNone = 3,
|
||||
RotateNoneFlipX = 4,
|
||||
Rotate90FlipX = 5,
|
||||
Rotate180FlipX = 6,
|
||||
Rotate270FlipX = 7,
|
||||
RotateNoneFlipY = Rotate180FlipX, // 注意:FlipY 可以通过FlipX两次来实现,但这里为了完整性列出
|
||||
Rotate90FlipY = 5, // 注意:FlipY在这里与FlipX相同角度的旋转结合,因为直接FlipY不是90度的倍数
|
||||
Rotate180FlipY = 6,
|
||||
Rotate270FlipY = 7,
|
||||
// 注意:上面的FlipY情况实际上在90度旋转的上下文中并不直接对应,因为FlipY通常意味着沿Y轴翻转,
|
||||
// 但在这里我们假设FlipX和FlipY在枚举中是为了完整性。在实际应用中,您可能只需要处理FlipNone。
|
||||
}
|
||||
|
||||
public class AxiBitmap
|
||||
{
|
||||
public AxiColor[] mData;
|
||||
public int Width;
|
||||
public int Height;
|
||||
|
||||
public AxiBitmap(int width, int height)
|
||||
{
|
||||
Width = width;
|
||||
Height = height;
|
||||
mData = new AxiColor[width * height];
|
||||
}
|
||||
|
||||
public void SetPixel(int x, int y, AxiColor color)
|
||||
{
|
||||
mData[y * Width + x] = color;
|
||||
}
|
||||
|
||||
public AxiColor GetPixel(int x, int y)
|
||||
{
|
||||
return mData[y * Width + x];
|
||||
}
|
||||
|
||||
|
||||
//public AxiBitmap Clone(Rectangle rect)
|
||||
//{
|
||||
// // 检查矩形是否超出位图边界
|
||||
// if (rect.X < 0 || rect.Right > Width || rect.Y < 0 || rect.Bottom > Height)
|
||||
// {
|
||||
// throw new ArgumentException("out of");
|
||||
// }
|
||||
|
||||
// AxiBitmap clonedBitmap = new AxiBitmap(rect.Width, rect.Height);
|
||||
|
||||
// int srcStartIndex = rect.Y * Width + rect.X;
|
||||
|
||||
// for (int y = 0; y < rect.Height; y++)
|
||||
// {
|
||||
// Array.Copy(mData, srcStartIndex + y * Width, clonedBitmap.mData, y * rect.Width, rect.Width);
|
||||
// }
|
||||
// return clonedBitmap;
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
public static class AxiBitmapEx
|
||||
{
|
||||
@ -202,29 +264,32 @@ namespace MAME.Core.AxiBitmap
|
||||
{
|
||||
return (color.a << 24) | (color.r << 16) | (color.g << 8) | color.b;
|
||||
}
|
||||
|
||||
|
||||
//public static void CloneIntColorArr(int[] baseBitmap, int[] targetBitmap, int baseWidth, int baseHeight, Rectangle rect)
|
||||
//public static AxiBitmap Clone(this AxiBitmap baseBitmap, Rectangle rect)
|
||||
//{
|
||||
// // 检查矩形是否超出位图边界
|
||||
// if (rect.X < 0 || rect.X + rect.Width > baseWidth || rect.Y < 0 || rect.Y + rect.Height > baseHeight)
|
||||
// unsafe
|
||||
// {
|
||||
// throw new ArgumentException("Rectangle is out of bitmap bounds.");
|
||||
// }
|
||||
// if (rect.X < 0 || rect.Right > baseBitmap.Width || rect.Y < 0 || rect.Bottom > baseBitmap.Height)
|
||||
// {
|
||||
// throw new ArgumentException("The rectangle is out of the bitmap bounds.");
|
||||
// }
|
||||
// AxiBitmap clonedBitmap = new AxiBitmap(rect.Width, rect.Height);
|
||||
|
||||
// int baseStartIndex = rect.Y * baseWidth + rect.X;
|
||||
// int targetStartIndex = rect.Y * rect.Width;
|
||||
|
||||
// for (int y = 0; y < rect.Height; y++)
|
||||
// {
|
||||
// // 注意这里使用了rect.Width作为要拷贝的元素数量,而不是baseWidth
|
||||
// Buffer.BlockCopy(baseBitmap, baseStartIndex + y * baseWidth, targetBitmap, targetStartIndex + y * rect.Width, rect.Width * sizeof(int));
|
||||
// // 或者使用Array.Copy,但要注意类型的大小(在这里是int)
|
||||
// // Array.Copy(baseBitmap, baseStartIndex + y * baseWidth, targetBitmap, targetStartIndex + y * rect.Width, rect.Width);
|
||||
// for (int y = 0; y < rect.Height; y++)
|
||||
// {
|
||||
// int srcStartIndex = (rect.Y + y) * baseBitmap.Width * sizeof(AxiColor) + rect.X * sizeof(AxiColor);
|
||||
// int dstStartIndex = y * rect.Width * sizeof(AxiColor);
|
||||
// Array.Copy(baseBitmap.mData, srcStartIndex, clonedBitmap.mData, dstStartIndex, rect.Width * sizeof(AxiColor));
|
||||
// }
|
||||
// return clonedBitmap;
|
||||
// }
|
||||
//}
|
||||
|
||||
public static void CloneIntColorArr(int[] baseBitmap, int[] targetBitmap, int Width, int Height, Rectangle rect)
|
||||
public static void Clear(this AxiBitmap baseBitmap, AxiColor color)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public static int[] CloneIntColorArr(int[] baseBitmap, int Width, int Height, Rectangle rect)
|
||||
{
|
||||
// 检查矩形是否超出位图边界
|
||||
if (rect.X < 0 || rect.Right > Width || rect.Y < 0 || rect.Bottom > Height)
|
||||
@ -232,32 +297,159 @@ namespace MAME.Core.AxiBitmap
|
||||
throw new ArgumentException("out of");
|
||||
}
|
||||
|
||||
//int[] result = new int[Width * Height];
|
||||
|
||||
int[] result = new int[rect.Width * rect.Height];
|
||||
|
||||
int srcStartIndex = rect.Y * Width + rect.X;
|
||||
|
||||
for (int y = 0; y < rect.Height; y++)
|
||||
{
|
||||
Array.Copy(baseBitmap, srcStartIndex + y * Width, targetBitmap, y * rect.Width, rect.Width);
|
||||
Array.Copy(baseBitmap, srcStartIndex + y * Width, result, y * rect.Width, rect.Width);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public struct Rectangle
|
||||
//public static int[] CloneIntColorArr(int[] baseBitmap, int Width, int Height, Rectangle rect)
|
||||
//{
|
||||
// unsafe
|
||||
// {
|
||||
// if (rect.X < 0 || rect.Right > Width || rect.Y < 0 || rect.Bottom > Height)
|
||||
// {
|
||||
// throw new ArgumentException("The rectangle is out of the bitmap bounds.");
|
||||
// }
|
||||
// int[] result = new int[Width * Height];
|
||||
// for (int y = 0; y < rect.Height; y++)
|
||||
// {
|
||||
// int srcStartIndex = (rect.Y + y) * Width * sizeof(int) + rect.X * sizeof(int);
|
||||
// int dstStartIndex = y * rect.Width * sizeof(int);
|
||||
// Array.Copy(baseBitmap, srcStartIndex, result, dstStartIndex, rect.Width * sizeof(int));
|
||||
// }
|
||||
// return result;
|
||||
// }
|
||||
//}
|
||||
|
||||
// DrawImage 方法,用于在当前 AxiBitmap 上绘制另一个 AxiBitmap 的一部分
|
||||
public static void DrawImage(this AxiBitmap baseBitmap, AxiBitmap source, Rectangle destRect, Rectangle srcRect)
|
||||
{
|
||||
public int X;
|
||||
public int Y;
|
||||
public int Width;
|
||||
public int Height;
|
||||
public Rectangle(int x, int y, int width, int height)
|
||||
|
||||
if (!source.Contains(srcRect.X, srcRect.Y, srcRect.Width, srcRect.Height))
|
||||
throw new ArgumentException("Err");
|
||||
|
||||
// 遍历源矩形的每个像素
|
||||
for (int y = srcRect.Y; y < srcRect.Bottom; y++)
|
||||
{
|
||||
X = x;
|
||||
Y = y;
|
||||
Width = width;
|
||||
Height = height;
|
||||
for (int x = srcRect.X; x < srcRect.Right; x++)
|
||||
{
|
||||
// 计算目标位置
|
||||
int destX = destRect.X + (x - srcRect.X);
|
||||
int destY = destRect.Y + (y - srcRect.Y);
|
||||
|
||||
// 确保目标位置在当前位图范围内(如果需要)
|
||||
// if (destX < 0 || destX >= Width || destY < 0 || destY >= Height)
|
||||
// continue; // 或者抛出异常,取决于你的需求
|
||||
|
||||
// 获取源像素并设置到目标位置
|
||||
AxiColor sourceColor = source.GetPixel(x, y);
|
||||
baseBitmap.SetPixel(destX, destY, sourceColor);
|
||||
|
||||
// 如果需要处理透明度混合,则在这里添加代码
|
||||
// 注意:你的 AxiColor 已经包含了 alpha 通道,但 SetPixel 并没有使用它
|
||||
// 你可能需要实现一个混合像素的方法,比如 BlendPixels
|
||||
}
|
||||
}
|
||||
public int Right => X + Width;
|
||||
public int Bottom => Y + Height;
|
||||
public int Area { get { return Width * Height; } }
|
||||
public bool Contains(int pointX, int pointY) { return pointX >= X && pointX < X + Width && pointY >= Y && pointY < Y + Height; }
|
||||
}
|
||||
|
||||
// 辅助方法,用于检查一个点是否在位图范围内
|
||||
private static bool Contains(this AxiBitmap baseBitmap, int x, int y, int width, int height)
|
||||
{
|
||||
return x >= 0 && x + width <= baseBitmap.Width && y >= 0 && y + height <= baseBitmap.Height;
|
||||
}
|
||||
|
||||
// ... 其他省略 ...
|
||||
|
||||
public static void RotateFlip(this AxiBitmap baseBitmap, RotateFlipType rotateFlipType)
|
||||
{
|
||||
// 先处理旋转部分
|
||||
switch (rotateFlipType)
|
||||
{
|
||||
case RotateFlipType.Rotate90FlipNone:
|
||||
Rotate90(baseBitmap);
|
||||
break;
|
||||
case RotateFlipType.Rotate180FlipNone:
|
||||
Rotate180(baseBitmap);
|
||||
break;
|
||||
case RotateFlipType.Rotate270FlipNone:
|
||||
Rotate270(baseBitmap);
|
||||
break;
|
||||
// 如果需要处理FlipX或FlipY,可以添加额外的case或方法
|
||||
default:
|
||||
// 无需旋转或翻转
|
||||
break;
|
||||
}
|
||||
|
||||
// 注意:这里没有处理FlipX或FlipY,因为通常它们不是通过旋转来实现的
|
||||
// 如果需要FlipX或FlipY,请添加额外的逻辑
|
||||
}
|
||||
|
||||
private static void Rotate90(this AxiBitmap baseBitmap)
|
||||
{
|
||||
int newWidth = baseBitmap.Height;
|
||||
int newHeight = baseBitmap.Width;
|
||||
AxiColor[] newData = new AxiColor[baseBitmap.mData.Length];
|
||||
|
||||
for (int x = 0; x < baseBitmap.Width; x++)
|
||||
{
|
||||
for (int y = 0; y < baseBitmap.Height; y++)
|
||||
{
|
||||
int oldIndex = (y * baseBitmap.Width + x);
|
||||
int newIndex = (newHeight - 1 - x) * newWidth + y;
|
||||
newData[newIndex] = baseBitmap.mData[oldIndex];
|
||||
}
|
||||
}
|
||||
|
||||
baseBitmap.mData = newData;
|
||||
baseBitmap.Width = newWidth;
|
||||
baseBitmap.Height = newHeight;
|
||||
}
|
||||
|
||||
private static void Rotate180(this AxiBitmap baseBitmap)
|
||||
{
|
||||
for (int y = 0; y < baseBitmap.Height / 2; y++)
|
||||
{
|
||||
for (int x = 0; x < baseBitmap.Width; x++)
|
||||
{
|
||||
int topLeftIndex = y * baseBitmap.Width + x;
|
||||
int bottomRightIndex = (baseBitmap.Height - 1 - y) * baseBitmap.Width + x;
|
||||
AxiColor temp = baseBitmap.mData[topLeftIndex];
|
||||
baseBitmap.mData[topLeftIndex] = baseBitmap.mData[bottomRightIndex];
|
||||
baseBitmap.mData[bottomRightIndex] = temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void Rotate270(this AxiBitmap baseBitmap)
|
||||
{
|
||||
// Rotate270 可以通过 Rotate90 两次或 Rotate180 后再 Rotate90 来实现
|
||||
// 这里直接实现 Rotate270 以避免额外的旋转调用
|
||||
int newWidth = baseBitmap.Height;
|
||||
int newHeight = baseBitmap.Width;
|
||||
AxiColor[] newData = new AxiColor[baseBitmap.mData.Length];
|
||||
|
||||
for (int x = 0; x < baseBitmap.Width; x++)
|
||||
{
|
||||
for (int y = 0; y < baseBitmap.Height; y++)
|
||||
{
|
||||
int oldIndex = (y * baseBitmap.Width + x);
|
||||
int newIndex = y * newWidth + (newWidth - 1 - x);
|
||||
newData[newIndex] = baseBitmap.mData[oldIndex];
|
||||
}
|
||||
}
|
||||
|
||||
baseBitmap.mData = newData;
|
||||
baseBitmap.Width = newWidth;
|
||||
baseBitmap.Height = newHeight;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
using MAME.Core;
|
||||
using MAME.Core.run_interface;
|
||||
using System;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public static class EmuLogger
|
||||
{
|
||||
|
@ -1,13 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ImageProcessor.Core" Version="1.1.0" />
|
||||
<PackageReference Include="LamarCodeGeneration" Version="6.3.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<_LastSelectedProfileId>G:\Sin365\MAME.Core\MAME.Core\Properties\PublishProfiles\FolderProfile.pubxml</_LastSelectedProfileId>
|
||||
</PropertyGroup>
|
||||
</Project>
|
@ -1,62 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
|
||||
namespace MAME.Core
|
||||
{
|
||||
public class MAMEEmu : IDisposable
|
||||
{
|
||||
MameMainMotion mameMainMotion;
|
||||
|
||||
//byte[] mGameTileData;
|
||||
//byte[] mtileListData;
|
||||
public MAMEEmu()
|
||||
{
|
||||
mameMainMotion = new MameMainMotion();
|
||||
}
|
||||
|
||||
public bool bRom => mameMainMotion.bRom;
|
||||
|
||||
public void Init(
|
||||
string RomDir,
|
||||
ILog ilog,
|
||||
IResources iRes,
|
||||
IVideoPlayer ivp,
|
||||
ISoundPlayer isp,
|
||||
IKeyboard ikb,
|
||||
IMouse imou
|
||||
) => mameMainMotion.Init(RomDir, ilog, iRes, ivp, isp, ikb, imou);
|
||||
public Dictionary<string, RomInfo> GetGameList() => mameMainMotion.GetGameList();
|
||||
public void LoadRom(string Name) => mameMainMotion.LoadRom(Name);
|
||||
public void GetGameScreenSize(out int _width, out int _height, out IntPtr _framePtr) => mameMainMotion.GetGameScreenSize(out _width, out _height, out _framePtr);
|
||||
public void StartGame() => mameMainMotion.StartGame();
|
||||
public void StopGame() => mameMainMotion.StopGame();
|
||||
|
||||
public void LoadState(BinaryReader sr)
|
||||
{
|
||||
Mame.paused = true;
|
||||
Thread.Sleep(20);
|
||||
State.loadstate_callback.Invoke(sr);
|
||||
Mame.postload();
|
||||
Thread.Sleep(20);
|
||||
Mame.paused = false;
|
||||
}
|
||||
|
||||
public void SaveState(BinaryWriter sw)
|
||||
{
|
||||
Mame.paused = true;
|
||||
Thread.Sleep(20);
|
||||
State.savestate_callback.Invoke(sw);
|
||||
Thread.Sleep(20);
|
||||
Mame.paused = false;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
mameMainMotion.StopGame();
|
||||
mameMainMotion = null;
|
||||
GC.Collect();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,11 +1,12 @@
|
||||
using cpu.m68000;
|
||||
using cpu.nec;
|
||||
using mame;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace MAME.Core.Common
|
||||
{
|
||||
public partial class CheatMotion
|
||||
public partial class cheatMotion
|
||||
{
|
||||
public enum LockState
|
||||
{
|
||||
@ -24,7 +25,7 @@ namespace MAME.Core
|
||||
#region
|
||||
List<string> mTxList_tbResult = new List<string>();
|
||||
#endregion
|
||||
public CheatMotion()
|
||||
public cheatMotion()
|
||||
{
|
||||
cheatForm_Load();
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace MAME.Core.Common
|
||||
{
|
||||
public partial class CpsMotion
|
||||
public partial class cpsMotion
|
||||
{
|
||||
private string[] sde2 = new string[] { "," };
|
||||
private int locationX, locationY;
|
||||
@ -31,7 +31,7 @@ namespace MAME.Core
|
||||
public string tbScrollsy = string.Empty;
|
||||
public List<string> tbResult = new List<string>();
|
||||
#endregion
|
||||
public CpsMotion()
|
||||
public cpsMotion()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
namespace MAME.Core
|
||||
namespace MAME.Core.Common
|
||||
{
|
||||
public class Konami68000Motion
|
||||
public class konami68000Motion
|
||||
{
|
||||
private int locationX, locationY;
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
public bool cbSprite = false;
|
||||
public string tbSprite;
|
||||
#endregion
|
||||
public Konami68000Motion()
|
||||
public konami68000Motion()
|
||||
{
|
||||
tbSprite = "0000-4000";
|
||||
}
|
||||
|
@ -2,9 +2,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace MAME.Core.Common
|
||||
{
|
||||
public class M68000Motion
|
||||
public class m68000Motion
|
||||
{
|
||||
private string[] sde6 = new string[1] { "," }, sde7 = new string[1] { ";" }, sde9 = new string[1] { "$" }, sde10 = new string[] { "+" };
|
||||
private bool bLogNew, bNew;
|
||||
@ -54,7 +54,7 @@ namespace MAME.Core
|
||||
M68000_STOP,
|
||||
}
|
||||
public static M68000State m68000State, m68000FState;
|
||||
public M68000Motion()
|
||||
public m68000Motion()
|
||||
{
|
||||
int i;
|
||||
mTxList_tbDs = new string[8];
|
||||
|
@ -1,10 +1,11 @@
|
||||
using cpu.m6809;
|
||||
using mame;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace MAME.Core.Common
|
||||
{
|
||||
|
||||
public partial class M6809Motion
|
||||
public partial class m6809Motion
|
||||
{
|
||||
//private Disassembler disassembler;
|
||||
private bool bLogNew;
|
||||
@ -33,7 +34,7 @@ namespace MAME.Core
|
||||
public string tbDisassemble = string.Empty;
|
||||
#endregion
|
||||
|
||||
public M6809Motion()
|
||||
public m6809Motion()
|
||||
{
|
||||
}
|
||||
public void GetData()
|
||||
|
@ -1,37 +1,36 @@
|
||||
using MAME.Core;
|
||||
using System;
|
||||
using mame;
|
||||
using MAME.Core.run_interface;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace MAME.Core.Common
|
||||
{
|
||||
public class MameMainMotion
|
||||
public class mainMotion
|
||||
{
|
||||
public string tsslStatus;
|
||||
public CheatMotion cheatmotion;
|
||||
public M68000Motion m68000motion;
|
||||
public Z80Motion z80motion;
|
||||
public M6809Motion m6809motion;
|
||||
public CpsMotion cpsmotion;
|
||||
public NeogeoMotion neogeomotion;
|
||||
public Konami68000Motion konami68000motion;
|
||||
public cheatMotion cheatmotion;
|
||||
public m68000Motion m68000motion;
|
||||
public z80Motion z80motion;
|
||||
public m6809Motion m6809motion;
|
||||
public cpsMotion cpsmotion;
|
||||
public neogeoMotion neogeomotion;
|
||||
public konami68000Motion konami68000motion;
|
||||
public string sSelect;
|
||||
public static Thread mainThread;
|
||||
public static Thread t1;
|
||||
|
||||
public static IResources resource;
|
||||
public bool bRom => Machine.bRom;
|
||||
|
||||
public MameMainMotion()
|
||||
public mainMotion()
|
||||
{
|
||||
neogeomotion = new NeogeoMotion();
|
||||
cheatmotion = new CheatMotion();
|
||||
m68000motion = new M68000Motion();
|
||||
m6809motion = new M6809Motion();
|
||||
z80motion = new Z80Motion();
|
||||
cpsmotion = new CpsMotion();
|
||||
konami68000motion = new Konami68000Motion();
|
||||
neogeomotion = new neogeoMotion();
|
||||
cheatmotion = new cheatMotion();
|
||||
m68000motion = new m68000Motion();
|
||||
m6809motion = new m6809Motion();
|
||||
z80motion = new z80Motion();
|
||||
cpsmotion = new cpsMotion();
|
||||
konami68000motion = new konami68000Motion();
|
||||
}
|
||||
|
||||
public void Init(
|
||||
@ -41,8 +40,7 @@ namespace MAME.Core
|
||||
IVideoPlayer ivp,
|
||||
ISoundPlayer isp,
|
||||
IKeyboard ikb,
|
||||
IMouse imou
|
||||
)
|
||||
IMouse imou)
|
||||
{
|
||||
Mame.RomRoot = RomDir;
|
||||
EmuLogger.BindFunc(ilog);
|
||||
@ -50,40 +48,33 @@ namespace MAME.Core
|
||||
Sound.BindFunc(isp);
|
||||
resource = iRes;
|
||||
|
||||
sSelect = string.Empty;
|
||||
//StreamReader sr1 = new StreamReader("mame.ini");
|
||||
//sr1.ReadLine();
|
||||
//sSelect = sr1.ReadLine();
|
||||
//sr1.Close();
|
||||
|
||||
//TODO 上次选择
|
||||
sSelect = "samsho2";
|
||||
|
||||
|
||||
RomInfo.Rom = new RomInfo();
|
||||
LoadROMXML();
|
||||
Keyboard.InitializeInput(ikb);
|
||||
Mouse.InitialMouse(imou);
|
||||
//TODO Wavebuffer
|
||||
//desc1.BufferBytes = 0x9400;
|
||||
Keyboard.InitializeInput(this, ikb);
|
||||
Mouse.InitialMouse(this, imou);
|
||||
}
|
||||
|
||||
private void LoadROMXML()
|
||||
{
|
||||
XElement xe = XElement.Parse(resource.mame);
|
||||
XElement xe = XElement.Parse(resource.Get_mame_xml());
|
||||
IEnumerable<XElement> elements = from ele in xe.Elements("game") select ele;
|
||||
showInfoByElements(elements);
|
||||
}
|
||||
|
||||
public Dictionary<string, RomInfo> GetGameList()
|
||||
{
|
||||
return RomInfo.dictName2Rom;
|
||||
}
|
||||
|
||||
public void GetGameScreenSize(out int _width, out int _height, out IntPtr _framePtr)
|
||||
{
|
||||
//_width = Video.fullwidth;
|
||||
//_height = Video.fullheight;
|
||||
//_framePtr = Video.bitmapcolor_Ptr;
|
||||
_width = Video.width;
|
||||
_height = Video.height;
|
||||
_framePtr = Video.bitmapcolorRect_Ptr;
|
||||
}
|
||||
|
||||
private void showInfoByElements(IEnumerable<XElement> elements)
|
||||
{
|
||||
RomInfo.romList = new List<RomInfo>();
|
||||
RomInfo.dictName2Rom = new Dictionary<string, RomInfo>();
|
||||
foreach (var ele in elements)
|
||||
{
|
||||
RomInfo rom = new RomInfo();
|
||||
@ -95,7 +86,6 @@ namespace MAME.Core
|
||||
rom.Year = ele.Element("year").Value;
|
||||
rom.Manufacturer = ele.Element("manufacturer").Value;
|
||||
RomInfo.romList.Add(rom);
|
||||
RomInfo.dictName2Rom[rom.Name] = rom;
|
||||
//loadform.listView1.Items.Add(new ListViewItem(new string[] { rom.Description, rom.Year, rom.Name, rom.Parent, rom.Direction, rom.Manufacturer, rom.Board }));
|
||||
}
|
||||
}
|
||||
@ -109,9 +99,9 @@ namespace MAME.Core
|
||||
return;
|
||||
}
|
||||
|
||||
EmuTimer.lt = new List<EmuTimer.emu_timer>();
|
||||
mame.Timer.lt = new List<mame.Timer.emu_timer>();
|
||||
sSelect = RomInfo.Rom.Name;
|
||||
Machine.mainMotion = this;
|
||||
Machine.FORM = this;
|
||||
Machine.rom = RomInfo.Rom;
|
||||
Machine.sName = Machine.rom.Name;
|
||||
Machine.sParent = Machine.rom.Parent;
|
||||
@ -126,96 +116,107 @@ namespace MAME.Core
|
||||
case "CPS-1":
|
||||
case "CPS-1(QSound)":
|
||||
case "CPS2":
|
||||
|
||||
Video.nMode = 1;
|
||||
Video.iMode = 2;
|
||||
//Video.nMode = 3;
|
||||
Video.nMode = 3;
|
||||
itemSelect();
|
||||
CPS.CPSInit();
|
||||
CPS.GDIInit();
|
||||
break;
|
||||
case "Data East":
|
||||
Video.nMode = 1;
|
||||
Video.iMode = 0;
|
||||
itemSelect();
|
||||
Dataeast.DataeastInit();
|
||||
Dataeast.GDIInit();
|
||||
break;
|
||||
case "Tehkan":
|
||||
Video.nMode = 1;
|
||||
Video.iMode = 0;
|
||||
itemSelect();
|
||||
Tehkan.PbactionInit();
|
||||
Tehkan.GDIInit();
|
||||
break;
|
||||
case "Neo Geo":
|
||||
Video.nMode = 1;
|
||||
Video.iMode = 0;
|
||||
itemSelect();
|
||||
Neogeo.NeogeoInit();
|
||||
Neogeo.GDIInit();
|
||||
break;
|
||||
case "SunA8":
|
||||
Video.nMode = 1;
|
||||
Video.iMode = 0;
|
||||
itemSelect();
|
||||
SunA8.SunA8Init();
|
||||
SunA8.GDIInit();
|
||||
break;
|
||||
case "Namco System 1":
|
||||
Video.nMode = 1;
|
||||
Video.iMode = 0;
|
||||
itemSelect();
|
||||
Namcos1.Namcos1Init();
|
||||
Namcos1.GDIInit();
|
||||
break;
|
||||
case "IGS011":
|
||||
Video.nMode = 1;
|
||||
Video.iMode = 0;
|
||||
itemSelect();
|
||||
IGS011.IGS011Init();
|
||||
IGS011.GDIInit();
|
||||
break;
|
||||
case "PGM":
|
||||
Video.nMode = 1;
|
||||
Video.iMode = 0;
|
||||
itemSelect();
|
||||
PGM.PGMInit();
|
||||
PGM.GDIInit();
|
||||
break;
|
||||
case "M72":
|
||||
Video.nMode = 1;
|
||||
Video.iMode = 0;
|
||||
itemSelect();
|
||||
M72.M72Init();
|
||||
M72.GDIInit();
|
||||
break;
|
||||
case "M92":
|
||||
Video.nMode = 1;
|
||||
Video.iMode = 0;
|
||||
itemSelect();
|
||||
M92.M92Init();
|
||||
M92.GDIInit();
|
||||
break;
|
||||
case "Taito":
|
||||
Video.nMode = 1;
|
||||
Video.iMode = 0;
|
||||
itemSelect();
|
||||
Taito.TaitoInit();
|
||||
Taito.GDIInit();
|
||||
break;
|
||||
case "Taito B":
|
||||
Video.nMode = 1;
|
||||
Video.iMode = 0;
|
||||
itemSelect();
|
||||
Taitob.TaitobInit();
|
||||
Taitob.GDIInit();
|
||||
break;
|
||||
case "Konami 68000":
|
||||
Video.nMode = 1;
|
||||
Video.iMode = 0;
|
||||
itemSelect();
|
||||
Konami68000.Konami68000Init();
|
||||
Konami68000.GDIInit();
|
||||
break;
|
||||
case "Capcom":
|
||||
Video.nMode = 1;
|
||||
Video.iMode = 0;
|
||||
itemSelect();
|
||||
Capcom.CapcomInit();
|
||||
Capcom.GDIInit();
|
||||
break;
|
||||
}
|
||||
if (Machine.bRom)
|
||||
{
|
||||
EmuLogger.Log("MAME.NET: " + Machine.sDescription + " [" + Machine.sName + "]");
|
||||
Mame.init_machine();
|
||||
Mame.init_machine(this);
|
||||
Generic.nvram_load();
|
||||
}
|
||||
else
|
||||
@ -224,24 +225,6 @@ namespace MAME.Core
|
||||
}
|
||||
}
|
||||
|
||||
public void StartGame()
|
||||
{
|
||||
M68000Motion.iStatus = 0;
|
||||
M68000Motion.iValue = 0;
|
||||
Mame.exit_pending = false;
|
||||
mainThread = new Thread(Mame.mame_execute);
|
||||
mainThread.Start();
|
||||
}
|
||||
|
||||
public void StopGame()
|
||||
{
|
||||
if (Machine.bRom)
|
||||
{
|
||||
Mame.exit_pending = true;
|
||||
Thread.Sleep(50);
|
||||
}
|
||||
}
|
||||
|
||||
private void itemSelect()
|
||||
{
|
||||
switch (Machine.sBoard)
|
@ -1,8 +1,11 @@
|
||||
using System.Collections.Generic;
|
||||
using mame;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace MAME.Core.Common
|
||||
{
|
||||
public partial class NeogeoMotion
|
||||
public partial class neogeoMotion
|
||||
{
|
||||
private string[] sde2 = new string[] { "," };
|
||||
private int locationX, locationY;
|
||||
@ -17,7 +20,7 @@ namespace MAME.Core
|
||||
bool cbL0 = false;
|
||||
bool cbL1 = false;
|
||||
#endregion
|
||||
public NeogeoMotion()
|
||||
public neogeoMotion()
|
||||
{
|
||||
tbResult = new List<string>();
|
||||
neogeoForm_Load();
|
||||
@ -32,5 +35,58 @@ namespace MAME.Core
|
||||
tbSOffset = "01cb0600";
|
||||
tbPensoffset = "ed0";
|
||||
}
|
||||
private void DumpRam()
|
||||
{
|
||||
int i, j;
|
||||
BinaryWriter bw1 = new BinaryWriter(new FileStream("dump1.dat", FileMode.Create));
|
||||
bw1.Write(Memory.mainram, 0, 0x10000);
|
||||
bw1.Close();
|
||||
BinaryWriter bw2 = new BinaryWriter(new FileStream("dump2.dat", FileMode.Create));
|
||||
bw2.Write(Neogeo.mainram2, 0, 0x10000);
|
||||
bw2.Close();
|
||||
BinaryWriter bw3 = new BinaryWriter(new FileStream("dump3.dat", FileMode.Create));
|
||||
for (i = 0; i < 0x10000; i++)
|
||||
{
|
||||
bw3.Write(Neogeo.neogeo_videoram[i]);
|
||||
}
|
||||
BinaryWriter bw4 = new BinaryWriter(new FileStream("dump4.dat", FileMode.Create));
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
for (j = 0; j < 0x1000; j++)
|
||||
{
|
||||
bw4.Write(Neogeo.palettes[i, j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
private void WriteRam()
|
||||
{
|
||||
int i, j;
|
||||
byte[] bb1 = new byte[0x10000], bb2 = new byte[0x10000], bb3 = new byte[0x20000], bb4 = new byte[0x4000];
|
||||
BinaryReader br1 = new BinaryReader(new FileStream("dump1.dat", FileMode.Open));
|
||||
br1.Read(bb1, 0, 0x10000);
|
||||
br1.Close();
|
||||
Array.Copy(bb1, Memory.mainram, 0x10000);
|
||||
BinaryReader br2 = new BinaryReader(new FileStream("dump2.dat", FileMode.Open));
|
||||
br2.Read(bb2, 0, 0x10000);
|
||||
br2.Close();
|
||||
Array.Copy(bb2, Neogeo.mainram2, 0x10000);
|
||||
BinaryReader br3 = new BinaryReader(new FileStream("dump3.dat", FileMode.Open));
|
||||
br3.Read(bb3, 0, 0x20000);
|
||||
br3.Close();
|
||||
for (i = 0; i < 0x10000; i++)
|
||||
{
|
||||
Neogeo.neogeo_videoram[i] = (ushort)(bb3[i * 2] + bb3[i * 2 + 1] * 0x100);
|
||||
}
|
||||
BinaryReader br4 = new BinaryReader(new FileStream("dump4.dat", FileMode.Open));
|
||||
br4.Read(bb4, 0, 0x4000);
|
||||
br4.Close();
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
for (j = 0; j < 0x1000; j++)
|
||||
{
|
||||
Neogeo.palettes[i, j] = (ushort)(bb4[i * 0x2000 + j * 2] + bb4[i * 0x2000 + j * 2 + 1] * 0x100);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
using cpu.z80;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace MAME.Core.Common
|
||||
{
|
||||
public enum CPUState
|
||||
{
|
||||
@ -12,7 +12,7 @@ namespace MAME.Core
|
||||
STEP3,
|
||||
STOP,
|
||||
}
|
||||
public partial class Z80Motion
|
||||
public partial class z80Motion
|
||||
{
|
||||
private Disassembler disassembler;
|
||||
private bool bLogNew;
|
||||
@ -55,7 +55,7 @@ namespace MAME.Core
|
||||
Z80A_STOP,
|
||||
}
|
||||
public static Z80AState z80State, z80FState;
|
||||
public Z80Motion()
|
||||
public z80Motion()
|
||||
{
|
||||
disassembler = new Disassembler();
|
||||
Disassembler.GenerateOpcodeSizes();
|
||||
|
@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Any CPU</Platform>
|
||||
<PublishDir>bin\Release\netstandard2.0\publish\</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<_TargetId>Folder</_TargetId>
|
||||
</PropertyGroup>
|
||||
</Project>
|
@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<History>True|2024-08-30T07:41:53.2597006Z||;True|2024-08-29T17:00:35.4694695+08:00||;True|2024-08-29T16:40:23.7314446+08:00||;True|2024-08-29T16:17:16.6219882+08:00||;False|2024-08-29T15:55:34.5778980+08:00||;True|2024-08-29T15:34:15.1410739+08:00||;False|2024-08-29T15:31:15.0815441+08:00||;False|2024-08-29T15:29:46.6749330+08:00||;False|2024-08-29T15:27:48.9116490+08:00||;False|2024-08-29T15:27:23.2208875+08:00||;True|2024-08-28T16:12:23.3416224+08:00||;True|2024-08-28T13:18:21.7983285+08:00||;True|2024-08-28T12:54:14.9742502+08:00||;True|2024-08-28T12:09:37.5280942+08:00||;True|2024-08-28T12:07:03.6717540+08:00||;True|2024-08-07T18:02:59.4096796+08:00||;False|2024-08-07T18:02:44.0239078+08:00||;True|2024-07-31T17:00:23.0585720+08:00||;True|2024-07-31T17:00:19.8123170+08:00||;True|2024-07-30T20:51:40.9773933+08:00||;True|2024-07-30T17:04:12.3440051+08:00||;True|2024-07-30T17:01:28.0849009+08:00||;True|2024-07-30T10:36:57.5301145+08:00||;</History>
|
||||
<LastFailureDetails />
|
||||
</PropertyGroup>
|
||||
</Project>
|
@ -1,47 +0,0 @@
|
||||
{
|
||||
"runtimeTarget": {
|
||||
"name": ".NETStandard,Version=v2.0/",
|
||||
"signature": ""
|
||||
},
|
||||
"compilationOptions": {},
|
||||
"targets": {
|
||||
".NETStandard,Version=v2.0": {},
|
||||
".NETStandard,Version=v2.0/": {
|
||||
"MAME.Core/1.0.0": {
|
||||
"dependencies": {
|
||||
"NETStandard.Library": "2.0.3"
|
||||
},
|
||||
"runtime": {
|
||||
"MAME.Core.dll": {}
|
||||
}
|
||||
},
|
||||
"Microsoft.NETCore.Platforms/1.1.0": {},
|
||||
"NETStandard.Library/2.0.3": {
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.Platforms": "1.1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"MAME.Core/1.0.0": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
},
|
||||
"Microsoft.NETCore.Platforms/1.1.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==",
|
||||
"path": "microsoft.netcore.platforms/1.1.0",
|
||||
"hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512"
|
||||
},
|
||||
"NETStandard.Library/2.0.3": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==",
|
||||
"path": "netstandard.library/2.0.3",
|
||||
"hashPath": "netstandard.library.2.0.3.nupkg.sha512"
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -1,47 +0,0 @@
|
||||
{
|
||||
"runtimeTarget": {
|
||||
"name": ".NETStandard,Version=v2.0/",
|
||||
"signature": ""
|
||||
},
|
||||
"compilationOptions": {},
|
||||
"targets": {
|
||||
".NETStandard,Version=v2.0": {},
|
||||
".NETStandard,Version=v2.0/": {
|
||||
"MAME.Core/1.0.0": {
|
||||
"dependencies": {
|
||||
"NETStandard.Library": "2.0.3"
|
||||
},
|
||||
"runtime": {
|
||||
"MAME.Core.dll": {}
|
||||
}
|
||||
},
|
||||
"Microsoft.NETCore.Platforms/1.1.0": {},
|
||||
"NETStandard.Library/2.0.3": {
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.Platforms": "1.1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"MAME.Core/1.0.0": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
},
|
||||
"Microsoft.NETCore.Platforms/1.1.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==",
|
||||
"path": "microsoft.netcore.platforms/1.1.0",
|
||||
"hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512"
|
||||
},
|
||||
"NETStandard.Library/2.0.3": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==",
|
||||
"path": "netstandard.library/2.0.3",
|
||||
"hashPath": "netstandard.library.2.0.3.nupkg.sha512"
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -1,47 +0,0 @@
|
||||
{
|
||||
"runtimeTarget": {
|
||||
"name": ".NETStandard,Version=v2.0/",
|
||||
"signature": ""
|
||||
},
|
||||
"compilationOptions": {},
|
||||
"targets": {
|
||||
".NETStandard,Version=v2.0": {},
|
||||
".NETStandard,Version=v2.0/": {
|
||||
"MAME.Core/1.0.0": {
|
||||
"dependencies": {
|
||||
"NETStandard.Library": "2.0.3"
|
||||
},
|
||||
"runtime": {
|
||||
"MAME.Core.dll": {}
|
||||
}
|
||||
},
|
||||
"Microsoft.NETCore.Platforms/1.1.0": {},
|
||||
"NETStandard.Library/2.0.3": {
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.Platforms": "1.1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"MAME.Core/1.0.0": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
},
|
||||
"Microsoft.NETCore.Platforms/1.1.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==",
|
||||
"path": "microsoft.netcore.platforms/1.1.0",
|
||||
"hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512"
|
||||
},
|
||||
"NETStandard.Library/2.0.3": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==",
|
||||
"path": "netstandard.library/2.0.3",
|
||||
"hashPath": "netstandard.library.2.0.3.nupkg.sha512"
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -1,7 +1,6 @@
|
||||
using MAME.Core;
|
||||
using mame;
|
||||
using System;
|
||||
using System.IO;
|
||||
//using System.IO;
|
||||
|
||||
namespace cpu.m6502
|
||||
{
|
||||
@ -141,6 +140,15 @@ namespace cpu.m6502
|
||||
}
|
||||
public int m6502_execute(int cycles)
|
||||
{
|
||||
StreamWriter sw30 = null, sw31 = null;
|
||||
if (Cpuexec.bLog0 == 1 && Cpuexec.bLog02)
|
||||
{
|
||||
sw30 = new StreamWriter(@"\VS2008\compare1\compare1\bin\Debug\20.txt", true);
|
||||
}
|
||||
if (Cpuexec.bLog1 == 1 && Cpuexec.bLog12)
|
||||
{
|
||||
sw31 = new StreamWriter(@"\VS2008\compare1\compare1\bin\Debug\21.txt", true);
|
||||
}
|
||||
pendingCycles = cycles;
|
||||
do
|
||||
{
|
||||
@ -181,8 +189,26 @@ namespace cpu.m6502
|
||||
pending_irq = 1;
|
||||
}
|
||||
}
|
||||
if (Cpuexec.bLog0 == 1 && Cpuexec.bLog02)
|
||||
{
|
||||
sw30.WriteLine(ppc.d.ToString("x") + "\t" + op.ToString("x") + "\t" + pendingCycles.ToString("x"));
|
||||
sw30.WriteLine(sp.LowWord.ToString("x") + "\t" + p.ToString("x") + "\t" + a.ToString("x") + "\t" + x.ToString("x") + "\t" + y.ToString("x") + "\t" + pending_irq.ToString("x") + "\t" + after_cli.ToString("x") + "\t" + nmi_state.ToString("x") + "\t" + irq_state.ToString("x") + "\t" + so_state.ToString("x"));
|
||||
}
|
||||
if (Cpuexec.bLog1 == 1 && Cpuexec.bLog12)
|
||||
{
|
||||
sw31.WriteLine(ppc.d.ToString("x") + "\t" + op.ToString("x") + "\t" + pendingCycles.ToString("x"));
|
||||
sw31.WriteLine(sp.LowWord.ToString("x") + "\t" + p.ToString("x") + "\t" + a.ToString("x") + "\t" + x.ToString("x") + "\t" + y.ToString("x") + "\t" + pending_irq.ToString("x") + "\t" + after_cli.ToString("x") + "\t" + nmi_state.ToString("x") + "\t" + irq_state.ToString("x") + "\t" + so_state.ToString("x"));
|
||||
}
|
||||
}
|
||||
while (pendingCycles > 0);
|
||||
if (Cpuexec.bLog0 == 1 && Cpuexec.bLog02)
|
||||
{
|
||||
sw30.Close();
|
||||
}
|
||||
if (Cpuexec.bLog1 == 1 && Cpuexec.bLog12)
|
||||
{
|
||||
sw31.Close();
|
||||
}
|
||||
return cycles - pendingCycles;
|
||||
}
|
||||
public override void set_irq_line(int irqline, LineState state)
|
||||
@ -191,7 +217,7 @@ namespace cpu.m6502
|
||||
}
|
||||
public override void cpunum_set_input_line_and_vector(int cpunum, int line, LineState state, int vector)
|
||||
{
|
||||
EmuTimer.timer_set_internal(Cpuint.cpunum_empty_event_queue, "cpunum_empty_event_queue");
|
||||
Timer.timer_set_internal(Cpuint.cpunum_empty_event_queue, "cpunum_empty_event_queue");
|
||||
}
|
||||
private void m6502_set_irq_line(int irqline, LineState state)
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
using MAME.Core;
|
||||
using mame;
|
||||
|
||||
namespace cpu.m6502
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
using MAME.Core;
|
||||
using mame;
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
@ -26,7 +26,7 @@ namespace cpu.m6800
|
||||
public byte trcsr, rmcr, rdr, tdr, rsr, tsr;
|
||||
public int rxbits, txbits, trcsr_read, tx;
|
||||
public M6800_TX_STATE txstate;
|
||||
public EmuTimer.emu_timer m6800_rx_timer, m6800_tx_timer;
|
||||
public Timer.emu_timer m6800_rx_timer, m6800_tx_timer;
|
||||
private byte TCSR_OLVL = 0x01, TCSR_IEDG = 0x02, TCSR_ETOI = 0x04, TCSR_EOCI = 0x08, TCSR_EICI = 0x10, TCSR_TOF = 0x20, TCSR_OCF = 0x40, TCSR_ICF = 0x80;
|
||||
protected byte M6800_WAI = 8, M6800_SLP = 0x10;
|
||||
private const byte M6800_IRQ_LINE = 0, M6800_TIN_LINE = 1;
|
||||
@ -246,8 +246,8 @@ namespace cpu.m6800
|
||||
cycles = cycles_63701;
|
||||
clock = 1536000;
|
||||
irq_callback = null;
|
||||
m6800_rx_timer = EmuTimer.timer_alloc_common(m6800_rx_tick, "m6800_rx_tick", false);
|
||||
m6800_tx_timer = EmuTimer.timer_alloc_common(m6800_tx_tick, "m6800_tx_tick", false);
|
||||
m6800_rx_timer = Timer.timer_alloc_common(m6800_rx_tick, "m6800_rx_tick", false);
|
||||
m6800_tx_timer = Timer.timer_alloc_common(m6800_tx_tick, "m6800_tx_tick", false);
|
||||
}
|
||||
public override void Reset()
|
||||
{
|
||||
@ -844,8 +844,8 @@ namespace cpu.m6800
|
||||
ram_ctrl |= 0x40;
|
||||
trcsr = M6800_TRCSR_TDRE;
|
||||
rmcr = 0;
|
||||
EmuTimer.timer_enable(m6800_rx_timer, false);
|
||||
EmuTimer.timer_enable(m6800_tx_timer, false);
|
||||
Timer.timer_enable(m6800_rx_timer, false);
|
||||
Timer.timer_enable(m6800_tx_timer, false);
|
||||
txstate = M6800_TX_STATE.INIT;
|
||||
txbits = rxbits = 0;
|
||||
trcsr_read = 0;
|
||||
@ -905,7 +905,7 @@ namespace cpu.m6800
|
||||
}
|
||||
public override void cpunum_set_input_line_and_vector(int cpunum, int line, LineState state, int vector)
|
||||
{
|
||||
EmuTimer.timer_set_internal(Cpuint.cpunum_empty_event_queue, "cpunum_empty_event_queue");
|
||||
Timer.timer_set_internal(Cpuint.cpunum_empty_event_queue, "cpunum_empty_event_queue");
|
||||
}
|
||||
public override int ExecuteCycles(int cycles)
|
||||
{
|
||||
@ -1167,16 +1167,16 @@ namespace cpu.m6800
|
||||
{
|
||||
case 0:
|
||||
case 3: // not implemented
|
||||
EmuTimer.timer_enable(m6800_rx_timer, false);
|
||||
EmuTimer.timer_enable(m6800_tx_timer, false);
|
||||
Timer.timer_enable(m6800_rx_timer, false);
|
||||
Timer.timer_enable(m6800_tx_timer, false);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
case 2:
|
||||
{
|
||||
int divisor = M6800_RMCR_SS[rmcr & M6800_RMCR_SS_MASK];
|
||||
EmuTimer.timer_adjust_periodic(m6800_rx_timer, Attotime.ATTOTIME_ZERO, new Atime(0, (long)(1e18 / (clock / divisor))));
|
||||
EmuTimer.timer_adjust_periodic(m6800_tx_timer, Attotime.ATTOTIME_ZERO, new Atime(0, (long)(1e18 / (clock / divisor))));
|
||||
Timer.timer_adjust_periodic(m6800_rx_timer, Attotime.ATTOTIME_ZERO, new Atime(0, (long)(1e18 / (clock / divisor))));
|
||||
Timer.timer_adjust_periodic(m6800_tx_timer, Attotime.ATTOTIME_ZERO, new Atime(0, (long)(1e18 / (clock / divisor))));
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -1345,8 +1345,8 @@ namespace cpu.m6800
|
||||
};
|
||||
clock = 1000000;
|
||||
irq_callback = Cpuint.cpu_3_irq_callback;
|
||||
m6800_rx_timer = EmuTimer.timer_alloc_common(m6800_rx_tick, "m6800_rx_tick", false);
|
||||
m6800_tx_timer = EmuTimer.timer_alloc_common(m6800_tx_tick, "m6800_tx_tick", false);
|
||||
m6800_rx_timer = Timer.timer_alloc_common(m6800_rx_tick, "m6800_rx_tick", false);
|
||||
m6800_tx_timer = Timer.timer_alloc_common(m6800_tx_tick, "m6800_tx_tick", false);
|
||||
}
|
||||
public override int ExecuteCycles(int cycles)
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
using MAME.Core;
|
||||
using mame;
|
||||
|
||||
namespace cpu.m6800
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
using MAME.Core;
|
||||
using mame;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
@ -192,7 +192,7 @@ namespace cpu.m68000
|
||||
}
|
||||
public override void cpunum_set_input_line_and_vector(int cpunum, int line, LineState state, int vector)
|
||||
{
|
||||
EmuTimer.timer_set_internal(Cpuint.cpunum_empty_event_queue, "cpunum_empty_event_queue");
|
||||
Timer.timer_set_internal(Cpuint.cpunum_empty_event_queue, "cpunum_empty_event_queue");
|
||||
}
|
||||
public void Pulse_Reset()
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
using MAME.Core;
|
||||
using mame;
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
@ -540,7 +540,7 @@ namespace cpu.m6805
|
||||
}
|
||||
public override void cpunum_set_input_line_and_vector(int cpunum, int line, LineState state, int vector)
|
||||
{
|
||||
EmuTimer.timer_set_internal(Cpuint.cpunum_empty_event_queue, "cpunum_empty_event_queue");
|
||||
Timer.timer_set_internal(Cpuint.cpunum_empty_event_queue, "cpunum_empty_event_queue");
|
||||
}
|
||||
public override int ExecuteCycles(int cycles)
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
using MAME.Core;
|
||||
using mame;
|
||||
|
||||
namespace cpu.m6805
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
using MAME.Core;
|
||||
using mame;
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
@ -555,7 +555,7 @@ namespace cpu.m6809
|
||||
}
|
||||
public override void cpunum_set_input_line_and_vector(int cpunum, int line, LineState state, int vector)
|
||||
{
|
||||
EmuTimer.timer_set_internal(Cpuint.cpunum_empty_event_queue, "cpunum_empty_event_queue");
|
||||
Timer.timer_set_internal(Cpuint.cpunum_empty_event_queue, "cpunum_empty_event_queue");
|
||||
}
|
||||
public override int ExecuteCycles(int cycles)
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
using MAME.Core;
|
||||
using mame;
|
||||
|
||||
namespace cpu.m6809
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
using MAME.Core;
|
||||
using mame;
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
@ -61,7 +61,7 @@ namespace cpu.nec
|
||||
{
|
||||
if (line >= 0 && line < 35)
|
||||
{
|
||||
Cpuint.lirq.Add(new irq(cpunum, line, state, vector, EmuTimer.get_current_time()));
|
||||
Cpuint.lirq.Add(new irq(cpunum, line, state, vector, Timer.get_current_time()));
|
||||
int event_index = Cpuint.input_event_index[cpunum, line]++;
|
||||
if (event_index >= 35)
|
||||
{
|
||||
@ -74,7 +74,7 @@ namespace cpu.nec
|
||||
//Cpuint.input_event_queue[cpunum][line][event_index] = input_event;
|
||||
//if (event_index == 0)
|
||||
{
|
||||
EmuTimer.timer_set_internal(Cpuint.cpunum_empty_event_queue, "cpunum_empty_event_queue");
|
||||
Timer.timer_set_internal(Cpuint.cpunum_empty_event_queue, "cpunum_empty_event_queue");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
using MAME.Core;
|
||||
using mame;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
@ -86,7 +86,7 @@ namespace cpu.z80
|
||||
public override void cpunum_set_input_line_and_vector(int cpunum, int line, LineState state, int vector)
|
||||
{
|
||||
Atime time1;
|
||||
time1 = EmuTimer.get_current_time();
|
||||
time1 = Timer.get_current_time();
|
||||
bool b1 = false;
|
||||
foreach (irq irq1 in Cpuint.lirq)
|
||||
{
|
||||
@ -109,7 +109,7 @@ namespace cpu.z80
|
||||
}
|
||||
else
|
||||
{
|
||||
EmuTimer.timer_set_internal(Cpuint.cpunum_empty_event_queue, "cpunum_empty_event_queue");
|
||||
Timer.timer_set_internal(Cpuint.cpunum_empty_event_queue, "cpunum_empty_event_queue");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public struct Atime
|
||||
{
|
||||
|
@ -5,10 +5,11 @@ using cpu.m6805;
|
||||
using cpu.m6809;
|
||||
using cpu.nec;
|
||||
using cpu.z80;
|
||||
using MAME.Core.Common;
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public class cpuexec_data
|
||||
{
|
||||
@ -25,7 +26,7 @@ namespace MAME.Core
|
||||
public int cycles_running;
|
||||
public int cycles_stolen;
|
||||
public int icount;
|
||||
public EmuTimer.emu_timer partial_frame_timer;
|
||||
public Timer.emu_timer partial_frame_timer;
|
||||
public Atime partial_frame_period;
|
||||
public virtual ulong TotalExecutedCycles { get; set; }
|
||||
public virtual int PendingCycles { get; set; }
|
||||
@ -42,14 +43,14 @@ namespace MAME.Core
|
||||
public static bool b11 = true, b12 = true, b13 = true, b14 = true;
|
||||
public static int iloops, activecpu, icpu, ncpu, iloops2;
|
||||
public static cpuexec_data[] cpu;
|
||||
public static EmuTimer.emu_timer timedint_timer;
|
||||
public static Timer.emu_timer timedint_timer;
|
||||
public static Atime timedint_period, timeslice_period;
|
||||
public delegate void vblank_delegate();
|
||||
public static vblank_delegate vblank_interrupt;
|
||||
public static Action vblank_interrupt2;
|
||||
public static EmuTimer.emu_timer interleave_boost_timer;
|
||||
public static EmuTimer.emu_timer interleave_boost_timer_end;
|
||||
public static EmuTimer.emu_timer timeslice_timer;
|
||||
public static Timer.emu_timer interleave_boost_timer;
|
||||
public static Timer.emu_timer interleave_boost_timer_end;
|
||||
public static Timer.emu_timer timeslice_timer;
|
||||
public static Atime perfect_interleave;
|
||||
public static int vblank_interrupts_per_frame;
|
||||
public static void cpuexec_init()
|
||||
@ -2117,46 +2118,46 @@ namespace MAME.Core
|
||||
case "Neo Geo":
|
||||
case "PGM":
|
||||
case "Taito B":
|
||||
M68000Motion.m68000State = M68000Motion.M68000State.M68000_RUN;
|
||||
MC68000.m1.debugger_start_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_start_debug;
|
||||
MC68000.m1.debugger_stop_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_stop_debug;
|
||||
Z80Motion.z80State = Z80Motion.Z80AState.Z80A_RUN;
|
||||
Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug;
|
||||
Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug;
|
||||
m68000Motion.m68000State = m68000Motion.M68000State.M68000_RUN;
|
||||
MC68000.m1.debugger_start_cpu_hook_callback = Machine.FORM.m68000motion.m68000_start_debug;
|
||||
MC68000.m1.debugger_stop_cpu_hook_callback = Machine.FORM.m68000motion.m68000_stop_debug;
|
||||
z80Motion.z80State = z80Motion.Z80AState.Z80A_RUN;
|
||||
Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.FORM.z80motion.z80_start_debug;
|
||||
Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.FORM.z80motion.z80_stop_debug;
|
||||
break;
|
||||
case "Tehkan":
|
||||
Z80Motion.z80State = Z80Motion.Z80AState.Z80A_RUN;
|
||||
Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug;
|
||||
Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug;
|
||||
z80Motion.z80State = z80Motion.Z80AState.Z80A_RUN;
|
||||
Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.FORM.z80motion.z80_start_debug;
|
||||
Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.FORM.z80motion.z80_stop_debug;
|
||||
Z80A.zz1[1].debugger_start_cpu_hook_callback = null_callback;
|
||||
Z80A.zz1[1].debugger_stop_cpu_hook_callback = null_callback;
|
||||
break;
|
||||
case "IGS011":
|
||||
M68000Motion.m68000State = M68000Motion.M68000State.M68000_RUN;
|
||||
MC68000.m1.debugger_start_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_start_debug;
|
||||
MC68000.m1.debugger_stop_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_stop_debug;
|
||||
m68000Motion.m68000State = m68000Motion.M68000State.M68000_RUN;
|
||||
MC68000.m1.debugger_start_cpu_hook_callback = Machine.FORM.m68000motion.m68000_start_debug;
|
||||
MC68000.m1.debugger_stop_cpu_hook_callback = Machine.FORM.m68000motion.m68000_stop_debug;
|
||||
break;
|
||||
case "SunA8":
|
||||
Z80Motion.z80State = Z80Motion.Z80AState.Z80A_RUN;
|
||||
Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug;
|
||||
Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug;
|
||||
z80Motion.z80State = z80Motion.Z80AState.Z80A_RUN;
|
||||
Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.FORM.z80motion.z80_start_debug;
|
||||
Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.FORM.z80motion.z80_stop_debug;
|
||||
Z80A.zz1[1].debugger_start_cpu_hook_callback = null_callback;
|
||||
Z80A.zz1[1].debugger_stop_cpu_hook_callback = null_callback;
|
||||
break;
|
||||
case "Namco System 1":
|
||||
M6809Motion.m6809State = CPUState.RUN;
|
||||
m6809Motion.m6809State = CPUState.RUN;
|
||||
M6809.mm1[0].DisassemblerInit();
|
||||
M6809.mm1[0].debugger_start_cpu_hook_callback = Machine.mainMotion.m6809motion.m6809_start_debug;
|
||||
M6809.mm1[0].debugger_stop_cpu_hook_callback = Machine.mainMotion.m6809motion.m6809_stop_debug;
|
||||
M6809.mm1[0].debugger_start_cpu_hook_callback = Machine.FORM.m6809motion.m6809_start_debug;
|
||||
M6809.mm1[0].debugger_stop_cpu_hook_callback = Machine.FORM.m6809motion.m6809_stop_debug;
|
||||
M6809.mm1[1].debugger_start_cpu_hook_callback = null_callback;
|
||||
M6809.mm1[1].debugger_stop_cpu_hook_callback = null_callback;
|
||||
M6809.mm1[2].debugger_start_cpu_hook_callback = null_callback;
|
||||
M6809.mm1[2].debugger_stop_cpu_hook_callback = null_callback;
|
||||
break;
|
||||
case "M72":
|
||||
Z80Motion.z80State = Z80Motion.Z80AState.Z80A_RUN;
|
||||
Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug;
|
||||
Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug;
|
||||
z80Motion.z80State = z80Motion.Z80AState.Z80A_RUN;
|
||||
Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.FORM.z80motion.z80_start_debug;
|
||||
Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.FORM.z80motion.z80_stop_debug;
|
||||
break;
|
||||
case "M92":
|
||||
break;
|
||||
@ -2185,35 +2186,35 @@ namespace MAME.Core
|
||||
case "boblcave":
|
||||
case "bublcave11":
|
||||
case "bublcave10":
|
||||
Z80Motion.z80State = Z80Motion.Z80AState.Z80A_RUN;
|
||||
Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug;
|
||||
Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug;
|
||||
Z80A.zz1[1].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug;
|
||||
Z80A.zz1[1].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug;
|
||||
Z80A.zz1[2].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug;
|
||||
Z80A.zz1[2].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug;
|
||||
z80Motion.z80State = z80Motion.Z80AState.Z80A_RUN;
|
||||
Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.FORM.z80motion.z80_start_debug;
|
||||
Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.FORM.z80motion.z80_stop_debug;
|
||||
Z80A.zz1[1].debugger_start_cpu_hook_callback = Machine.FORM.z80motion.z80_start_debug;
|
||||
Z80A.zz1[1].debugger_stop_cpu_hook_callback = Machine.FORM.z80motion.z80_stop_debug;
|
||||
Z80A.zz1[2].debugger_start_cpu_hook_callback = Machine.FORM.z80motion.z80_start_debug;
|
||||
Z80A.zz1[2].debugger_stop_cpu_hook_callback = Machine.FORM.z80motion.z80_stop_debug;
|
||||
break;
|
||||
case "opwolf":
|
||||
case "opwolfa":
|
||||
case "opwolfj":
|
||||
case "opwolfu":
|
||||
case "opwolfp":
|
||||
M68000Motion.m68000State = M68000Motion.M68000State.M68000_RUN;
|
||||
MC68000.m1.debugger_start_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_start_debug;
|
||||
MC68000.m1.debugger_stop_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_stop_debug;
|
||||
Z80Motion.z80State = Z80Motion.Z80AState.Z80A_RUN;
|
||||
Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug;
|
||||
Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug;
|
||||
m68000Motion.m68000State = m68000Motion.M68000State.M68000_RUN;
|
||||
MC68000.m1.debugger_start_cpu_hook_callback = Machine.FORM.m68000motion.m68000_start_debug;
|
||||
MC68000.m1.debugger_stop_cpu_hook_callback = Machine.FORM.m68000motion.m68000_stop_debug;
|
||||
z80Motion.z80State = z80Motion.Z80AState.Z80A_RUN;
|
||||
Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.FORM.z80motion.z80_start_debug;
|
||||
Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.FORM.z80motion.z80_stop_debug;
|
||||
break;
|
||||
case "opwolfb":
|
||||
M68000Motion.m68000State = M68000Motion.M68000State.M68000_RUN;
|
||||
MC68000.m1.debugger_start_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_start_debug;
|
||||
MC68000.m1.debugger_stop_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_stop_debug;
|
||||
Z80Motion.z80State = Z80Motion.Z80AState.Z80A_RUN;
|
||||
Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug;
|
||||
Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug;
|
||||
Z80A.zz1[1].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug;
|
||||
Z80A.zz1[1].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug;
|
||||
m68000Motion.m68000State = m68000Motion.M68000State.M68000_RUN;
|
||||
MC68000.m1.debugger_start_cpu_hook_callback = Machine.FORM.m68000motion.m68000_start_debug;
|
||||
MC68000.m1.debugger_stop_cpu_hook_callback = Machine.FORM.m68000motion.m68000_stop_debug;
|
||||
z80Motion.z80State = z80Motion.Z80AState.Z80A_RUN;
|
||||
Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.FORM.z80motion.z80_start_debug;
|
||||
Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.FORM.z80motion.z80_stop_debug;
|
||||
Z80A.zz1[1].debugger_start_cpu_hook_callback = Machine.FORM.z80motion.z80_start_debug;
|
||||
Z80A.zz1[1].debugger_stop_cpu_hook_callback = Machine.FORM.z80motion.z80_stop_debug;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@ -2221,17 +2222,17 @@ namespace MAME.Core
|
||||
switch (Machine.sName)
|
||||
{
|
||||
case "cuebrick":
|
||||
M68000Motion.m68000State = M68000Motion.M68000State.M68000_RUN;
|
||||
MC68000.m1.debugger_start_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_start_debug;
|
||||
MC68000.m1.debugger_stop_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_stop_debug;
|
||||
m68000Motion.m68000State = m68000Motion.M68000State.M68000_RUN;
|
||||
MC68000.m1.debugger_start_cpu_hook_callback = Machine.FORM.m68000motion.m68000_start_debug;
|
||||
MC68000.m1.debugger_stop_cpu_hook_callback = Machine.FORM.m68000motion.m68000_stop_debug;
|
||||
break;
|
||||
default:
|
||||
M68000Motion.m68000State = M68000Motion.M68000State.M68000_RUN;
|
||||
MC68000.m1.debugger_start_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_start_debug;
|
||||
MC68000.m1.debugger_stop_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_stop_debug;
|
||||
Z80Motion.z80State = Z80Motion.Z80AState.Z80A_RUN;
|
||||
Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug;
|
||||
Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug;
|
||||
m68000Motion.m68000State = m68000Motion.M68000State.M68000_RUN;
|
||||
MC68000.m1.debugger_start_cpu_hook_callback = Machine.FORM.m68000motion.m68000_start_debug;
|
||||
MC68000.m1.debugger_stop_cpu_hook_callback = Machine.FORM.m68000motion.m68000_stop_debug;
|
||||
z80Motion.z80State = z80Motion.Z80AState.Z80A_RUN;
|
||||
Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.FORM.z80motion.z80_start_debug;
|
||||
Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.FORM.z80motion.z80_stop_debug;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@ -2249,13 +2250,13 @@ namespace MAME.Core
|
||||
case "makaimurc":
|
||||
case "makaimurg":
|
||||
case "diamond":
|
||||
M6809Motion.m6809State = CPUState.RUN;
|
||||
m6809Motion.m6809State = CPUState.RUN;
|
||||
M6809.mm1[0].DisassemblerInit();
|
||||
M6809.mm1[0].debugger_start_cpu_hook_callback = Machine.mainMotion.m6809motion.m6809_start_debug;
|
||||
M6809.mm1[0].debugger_stop_cpu_hook_callback = Machine.mainMotion.m6809motion.m6809_stop_debug;
|
||||
Z80Motion.z80State = Z80Motion.Z80AState.Z80A_RUN;
|
||||
Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug;
|
||||
Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug;
|
||||
M6809.mm1[0].debugger_start_cpu_hook_callback = Machine.FORM.m6809motion.m6809_start_debug;
|
||||
M6809.mm1[0].debugger_stop_cpu_hook_callback = Machine.FORM.m6809motion.m6809_stop_debug;
|
||||
z80Motion.z80State = z80Motion.Z80AState.Z80A_RUN;
|
||||
Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.FORM.z80motion.z80_start_debug;
|
||||
Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.FORM.z80motion.z80_stop_debug;
|
||||
break;
|
||||
case "sf":
|
||||
case "sfua":
|
||||
@ -2263,14 +2264,14 @@ namespace MAME.Core
|
||||
case "sfjan":
|
||||
case "sfan":
|
||||
case "sfp":
|
||||
M68000Motion.m68000State = M68000Motion.M68000State.M68000_RUN;
|
||||
MC68000.m1.debugger_start_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_start_debug;
|
||||
MC68000.m1.debugger_stop_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_stop_debug;
|
||||
Z80Motion.z80State = Z80Motion.Z80AState.Z80A_RUN;
|
||||
Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug;
|
||||
Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug;
|
||||
Z80A.zz1[1].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug;
|
||||
Z80A.zz1[1].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug;
|
||||
m68000Motion.m68000State = m68000Motion.M68000State.M68000_RUN;
|
||||
MC68000.m1.debugger_start_cpu_hook_callback = Machine.FORM.m68000motion.m68000_start_debug;
|
||||
MC68000.m1.debugger_stop_cpu_hook_callback = Machine.FORM.m68000motion.m68000_stop_debug;
|
||||
z80Motion.z80State = z80Motion.Z80AState.Z80A_RUN;
|
||||
Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.FORM.z80motion.z80_start_debug;
|
||||
Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.FORM.z80motion.z80_stop_debug;
|
||||
Z80A.zz1[1].debugger_start_cpu_hook_callback = Machine.FORM.z80motion.z80_start_debug;
|
||||
Z80A.zz1[1].debugger_stop_cpu_hook_callback = Machine.FORM.z80motion.z80_stop_debug;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@ -2294,7 +2295,7 @@ namespace MAME.Core
|
||||
Generic.irq_1_0_line_hold();
|
||||
if (iloops2 > 1)
|
||||
{
|
||||
EmuTimer.timer_adjust_periodic(Cpuexec.cpu[1].partial_frame_timer, Cpuexec.cpu[1].partial_frame_period, Attotime.ATTOTIME_NEVER);
|
||||
Timer.timer_adjust_periodic(Cpuexec.cpu[1].partial_frame_timer, Cpuexec.cpu[1].partial_frame_period, Attotime.ATTOTIME_NEVER);
|
||||
}
|
||||
}
|
||||
public static byte null_callback1(int address)
|
||||
@ -2320,12 +2321,12 @@ namespace MAME.Core
|
||||
case "CPS-1(QSound)":
|
||||
case "CPS2":
|
||||
timedint_period = new Atime(0, (long)(1e18 / 250));
|
||||
timedint_timer = EmuTimer.timer_alloc_common(Generic.irq_1_0_line_hold, "irq_1_0_line_hold", false);
|
||||
EmuTimer.timer_adjust_periodic(timedint_timer, timedint_period, timedint_period);
|
||||
timedint_timer = Timer.timer_alloc_common(Generic.irq_1_0_line_hold, "irq_1_0_line_hold", false);
|
||||
Timer.timer_adjust_periodic(timedint_timer, timedint_period, timedint_period);
|
||||
break;
|
||||
case "Neo Geo":
|
||||
interleave_boost_timer = EmuTimer.timer_alloc_common(null_callback, "boost_callback", false);
|
||||
interleave_boost_timer_end = EmuTimer.timer_alloc_common(end_interleave_boost, "end_interleave_boost", false);
|
||||
interleave_boost_timer = Timer.timer_alloc_common(null_callback, "boost_callback", false);
|
||||
interleave_boost_timer_end = Timer.timer_alloc_common(end_interleave_boost, "end_interleave_boost", false);
|
||||
break;
|
||||
case "CPS1":
|
||||
case "Namco System 1":
|
||||
@ -2371,8 +2372,8 @@ namespace MAME.Core
|
||||
case "bublcave11":
|
||||
case "bublcave10":
|
||||
timeslice_period = new Atime(0, Video.screenstate.frame_period / 100);
|
||||
timeslice_timer = EmuTimer.timer_alloc_common(cpu_timeslicecallback, "cpu_timeslicecallback", false);
|
||||
EmuTimer.timer_adjust_periodic(timeslice_timer, timeslice_period, timeslice_period);
|
||||
timeslice_timer = Timer.timer_alloc_common(cpu_timeslicecallback, "cpu_timeslicecallback", false);
|
||||
Timer.timer_adjust_periodic(timeslice_timer, timeslice_period, timeslice_period);
|
||||
break;
|
||||
case "opwolf":
|
||||
case "opwolfa":
|
||||
@ -2381,15 +2382,15 @@ namespace MAME.Core
|
||||
case "opwolfb":
|
||||
case "opwolfp":
|
||||
timeslice_period = new Atime(0, Video.screenstate.frame_period / 10);
|
||||
timeslice_timer = EmuTimer.timer_alloc_common(cpu_timeslicecallback, "cpu_timeslicecallback", false);
|
||||
EmuTimer.timer_adjust_periodic(timeslice_timer, timeslice_period, timeslice_period);
|
||||
timeslice_timer = Timer.timer_alloc_common(cpu_timeslicecallback, "cpu_timeslicecallback", false);
|
||||
Timer.timer_adjust_periodic(timeslice_timer, timeslice_period, timeslice_period);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case "Taito B":
|
||||
timeslice_period = new Atime(0, Video.screenstate.frame_period / 10);
|
||||
timeslice_timer = EmuTimer.timer_alloc_common(cpu_timeslicecallback, "cpu_timeslicecallback", false);
|
||||
EmuTimer.timer_adjust_periodic(timeslice_timer, timeslice_period, timeslice_period);
|
||||
timeslice_timer = Timer.timer_alloc_common(cpu_timeslicecallback, "cpu_timeslicecallback", false);
|
||||
Timer.timer_adjust_periodic(timeslice_timer, timeslice_period, timeslice_period);
|
||||
break;
|
||||
case "Capcom":
|
||||
switch (Machine.sName)
|
||||
@ -2414,8 +2415,8 @@ namespace MAME.Core
|
||||
case "sfan":
|
||||
case "sfp":
|
||||
timedint_period = new Atime(0, (long)(1e18 / 8000));
|
||||
timedint_timer = EmuTimer.timer_alloc_common(Generic.irq_2_0_line_hold, "irq_2_0_line_hold", false);
|
||||
EmuTimer.timer_adjust_periodic(timedint_timer, timedint_period, timedint_period);
|
||||
timedint_timer = Timer.timer_alloc_common(Generic.irq_2_0_line_hold, "irq_2_0_line_hold", false);
|
||||
Timer.timer_adjust_periodic(timedint_timer, timedint_period, timedint_period);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@ -2423,8 +2424,8 @@ namespace MAME.Core
|
||||
}
|
||||
public static void cpuexec_timeslice()
|
||||
{
|
||||
Atime target = EmuTimer.lt[0].expire;
|
||||
Atime tbase = EmuTimer.global_basetime;
|
||||
Atime target = Timer.lt[0].expire;
|
||||
Atime tbase = Timer.global_basetime;
|
||||
int ran;
|
||||
Atime at;
|
||||
int i, j;
|
||||
@ -2470,19 +2471,19 @@ namespace MAME.Core
|
||||
cpu[icpu].suspend = cpu[icpu].nextsuspend;
|
||||
cpu[icpu].eatcycles = cpu[icpu].nexteatcycles;
|
||||
}
|
||||
EmuTimer.timer_set_global_time(target);
|
||||
if (EmuTimer.global_basetime.attoseconds == 0 && Machine.mainMotion.cheatmotion.lockState == CheatMotion.LockState.LOCK_SECOND)
|
||||
Timer.timer_set_global_time(target);
|
||||
if (Timer.global_basetime.attoseconds == 0 && Machine.FORM.cheatmotion.lockState == cheatMotion.LockState.LOCK_SECOND)
|
||||
{
|
||||
Machine.mainMotion.cheatmotion.ApplyCheat();
|
||||
Machine.FORM.cheatmotion.ApplyCheat();
|
||||
}
|
||||
}
|
||||
public static void cpu_boost_interleave(Atime timeslice_time, Atime boost_duration)
|
||||
{
|
||||
if (Attotime.attotime_compare(timeslice_time, perfect_interleave) < 0)
|
||||
timeslice_time = perfect_interleave;
|
||||
EmuTimer.timer_adjust_periodic(interleave_boost_timer, timeslice_time, timeslice_time);
|
||||
if (!EmuTimer.timer_enabled(interleave_boost_timer_end) || Attotime.attotime_compare(EmuTimer.timer_timeleft(interleave_boost_timer_end), boost_duration) < 0)
|
||||
EmuTimer.timer_adjust_periodic(interleave_boost_timer_end, boost_duration, Attotime.ATTOTIME_NEVER);
|
||||
Timer.timer_adjust_periodic(interleave_boost_timer, timeslice_time, timeslice_time);
|
||||
if (!Timer.timer_enabled(interleave_boost_timer_end) || Attotime.attotime_compare(Timer.timer_timeleft(interleave_boost_timer_end), boost_duration) < 0)
|
||||
Timer.timer_adjust_periodic(interleave_boost_timer_end, boost_duration, Attotime.ATTOTIME_NEVER);
|
||||
}
|
||||
public static void activecpu_abort_timeslice(int cpunum)
|
||||
{
|
||||
@ -2563,7 +2564,7 @@ namespace MAME.Core
|
||||
case "CPS2":
|
||||
iloops = 0;
|
||||
CPS.cps2_interrupt();
|
||||
EmuTimer.timer_adjust_periodic(Cpuexec.cpu[0].partial_frame_timer, Cpuexec.cpu[0].partial_frame_period, Attotime.ATTOTIME_NEVER);
|
||||
Timer.timer_adjust_periodic(Cpuexec.cpu[0].partial_frame_timer, Cpuexec.cpu[0].partial_frame_period, Attotime.ATTOTIME_NEVER);
|
||||
break;
|
||||
case "Data East":
|
||||
Generic.nmi_line_pulse0();
|
||||
@ -2572,7 +2573,7 @@ namespace MAME.Core
|
||||
iloops = 0;
|
||||
vblank_interrupt();
|
||||
Tehkan.pbaction_interrupt();
|
||||
EmuTimer.timer_adjust_periodic(Cpuexec.cpu[1].partial_frame_timer, Cpuexec.cpu[1].partial_frame_period, Attotime.ATTOTIME_NEVER);
|
||||
Timer.timer_adjust_periodic(Cpuexec.cpu[1].partial_frame_timer, Cpuexec.cpu[1].partial_frame_period, Attotime.ATTOTIME_NEVER);
|
||||
break;
|
||||
case "Neo Geo":
|
||||
break;
|
||||
@ -2580,8 +2581,8 @@ namespace MAME.Core
|
||||
iloops = 0;
|
||||
iloops2 = 0;
|
||||
Generic.irq_1_0_line_hold();
|
||||
EmuTimer.timer_adjust_periodic(Cpuexec.cpu[0].partial_frame_timer, Cpuexec.cpu[0].partial_frame_period, Attotime.ATTOTIME_NEVER);
|
||||
EmuTimer.timer_adjust_periodic(Cpuexec.cpu[1].partial_frame_timer, Cpuexec.cpu[1].partial_frame_period, Attotime.ATTOTIME_NEVER);
|
||||
Timer.timer_adjust_periodic(Cpuexec.cpu[0].partial_frame_timer, Cpuexec.cpu[0].partial_frame_period, Attotime.ATTOTIME_NEVER);
|
||||
Timer.timer_adjust_periodic(Cpuexec.cpu[1].partial_frame_timer, Cpuexec.cpu[1].partial_frame_period, Attotime.ATTOTIME_NEVER);
|
||||
break;
|
||||
case "Namco System 1":
|
||||
for (int cpunum = 0; cpunum < ncpu; cpunum++)
|
||||
@ -2605,7 +2606,7 @@ namespace MAME.Core
|
||||
case "drgnwrldv40k":
|
||||
iloops = 0;
|
||||
IGS011.lhb2_interrupt();
|
||||
EmuTimer.timer_adjust_periodic(Cpuexec.cpu[0].partial_frame_timer, Cpuexec.cpu[0].partial_frame_period, Attotime.ATTOTIME_NEVER);
|
||||
Timer.timer_adjust_periodic(Cpuexec.cpu[0].partial_frame_timer, Cpuexec.cpu[0].partial_frame_period, Attotime.ATTOTIME_NEVER);
|
||||
break;
|
||||
case "lhb":
|
||||
case "lhbv33c":
|
||||
@ -2613,7 +2614,7 @@ namespace MAME.Core
|
||||
case "ryukobou":
|
||||
iloops = 0;
|
||||
IGS011.lhb_interrupt();
|
||||
EmuTimer.timer_adjust_periodic(Cpuexec.cpu[0].partial_frame_timer, Cpuexec.cpu[0].partial_frame_period, Attotime.ATTOTIME_NEVER);
|
||||
Timer.timer_adjust_periodic(Cpuexec.cpu[0].partial_frame_timer, Cpuexec.cpu[0].partial_frame_period, Attotime.ATTOTIME_NEVER);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@ -2623,7 +2624,7 @@ namespace MAME.Core
|
||||
case "M72":
|
||||
iloops = 0;
|
||||
vblank_interrupt();
|
||||
EmuTimer.timer_adjust_periodic(Cpuexec.cpu[1].partial_frame_timer, Cpuexec.cpu[1].partial_frame_period, Attotime.ATTOTIME_NEVER);
|
||||
Timer.timer_adjust_periodic(Cpuexec.cpu[1].partial_frame_timer, Cpuexec.cpu[1].partial_frame_period, Attotime.ATTOTIME_NEVER);
|
||||
break;
|
||||
case "M92":
|
||||
break;
|
||||
@ -2676,7 +2677,7 @@ namespace MAME.Core
|
||||
}
|
||||
iloops = 0;
|
||||
vblank_interrupt();
|
||||
EmuTimer.timer_adjust_periodic(Cpuexec.cpu[3].partial_frame_timer, Cpuexec.cpu[3].partial_frame_period, Attotime.ATTOTIME_NEVER);
|
||||
Timer.timer_adjust_periodic(Cpuexec.cpu[3].partial_frame_timer, Cpuexec.cpu[3].partial_frame_period, Attotime.ATTOTIME_NEVER);
|
||||
break;
|
||||
case "opwolf":
|
||||
case "opwolfa":
|
||||
@ -2713,7 +2714,7 @@ namespace MAME.Core
|
||||
case "cuebrick":
|
||||
iloops = 0;
|
||||
vblank_interrupt();
|
||||
EmuTimer.timer_adjust_periodic(Cpuexec.cpu[0].partial_frame_timer, Cpuexec.cpu[0].partial_frame_period, Attotime.ATTOTIME_NEVER);
|
||||
Timer.timer_adjust_periodic(Cpuexec.cpu[0].partial_frame_timer, Cpuexec.cpu[0].partial_frame_period, Attotime.ATTOTIME_NEVER);
|
||||
break;
|
||||
default:
|
||||
vblank_interrupt();
|
||||
@ -2740,7 +2741,7 @@ namespace MAME.Core
|
||||
}
|
||||
iloops = 0;
|
||||
vblank_interrupt();
|
||||
EmuTimer.timer_adjust_periodic(Cpuexec.cpu[1].partial_frame_timer, Cpuexec.cpu[1].partial_frame_period, Attotime.ATTOTIME_NEVER);
|
||||
Timer.timer_adjust_periodic(Cpuexec.cpu[1].partial_frame_timer, Cpuexec.cpu[1].partial_frame_period, Attotime.ATTOTIME_NEVER);
|
||||
break;
|
||||
case "sf":
|
||||
case "sfua":
|
||||
@ -2771,7 +2772,7 @@ namespace MAME.Core
|
||||
vblank_interrupt();
|
||||
if (iloops > 1)
|
||||
{
|
||||
EmuTimer.timer_adjust_periodic(Cpuexec.cpu[0].partial_frame_timer, Cpuexec.cpu[0].partial_frame_period, Attotime.ATTOTIME_NEVER);
|
||||
Timer.timer_adjust_periodic(Cpuexec.cpu[0].partial_frame_timer, Cpuexec.cpu[0].partial_frame_period, Attotime.ATTOTIME_NEVER);
|
||||
}
|
||||
break;
|
||||
case "Tehkan":
|
||||
@ -2783,7 +2784,7 @@ namespace MAME.Core
|
||||
Tehkan.pbaction_interrupt();
|
||||
if (iloops > 1)
|
||||
{
|
||||
EmuTimer.timer_adjust_periodic(Cpuexec.cpu[1].partial_frame_timer, Cpuexec.cpu[1].partial_frame_period, Attotime.ATTOTIME_NEVER);
|
||||
Timer.timer_adjust_periodic(Cpuexec.cpu[1].partial_frame_timer, Cpuexec.cpu[1].partial_frame_period, Attotime.ATTOTIME_NEVER);
|
||||
}
|
||||
break;
|
||||
case "SunA8":
|
||||
@ -2795,7 +2796,7 @@ namespace MAME.Core
|
||||
SunA8.hardhea2_interrupt();
|
||||
if (iloops > 1)
|
||||
{
|
||||
EmuTimer.timer_adjust_periodic(Cpuexec.cpu[0].partial_frame_timer, Cpuexec.cpu[0].partial_frame_period, Attotime.ATTOTIME_NEVER);
|
||||
Timer.timer_adjust_periodic(Cpuexec.cpu[0].partial_frame_timer, Cpuexec.cpu[0].partial_frame_period, Attotime.ATTOTIME_NEVER);
|
||||
}
|
||||
break;
|
||||
case "M72":
|
||||
@ -2807,7 +2808,7 @@ namespace MAME.Core
|
||||
vblank_interrupt();
|
||||
if (iloops > 1)
|
||||
{
|
||||
EmuTimer.timer_adjust_periodic(Cpuexec.cpu[1].partial_frame_timer, Cpuexec.cpu[1].partial_frame_period, Attotime.ATTOTIME_NEVER);
|
||||
Timer.timer_adjust_periodic(Cpuexec.cpu[1].partial_frame_timer, Cpuexec.cpu[1].partial_frame_period, Attotime.ATTOTIME_NEVER);
|
||||
}
|
||||
break;
|
||||
case "Taito":
|
||||
@ -2822,7 +2823,7 @@ namespace MAME.Core
|
||||
vblank_interrupt();
|
||||
if (iloops > 1)
|
||||
{
|
||||
EmuTimer.timer_adjust_periodic(Cpuexec.cpu[3].partial_frame_timer, Cpuexec.cpu[3].partial_frame_period, Attotime.ATTOTIME_NEVER);
|
||||
Timer.timer_adjust_periodic(Cpuexec.cpu[3].partial_frame_timer, Cpuexec.cpu[3].partial_frame_period, Attotime.ATTOTIME_NEVER);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -2849,7 +2850,7 @@ namespace MAME.Core
|
||||
vblank_interrupt();
|
||||
if (iloops > 1)
|
||||
{
|
||||
EmuTimer.timer_adjust_periodic(Cpuexec.cpu[1].partial_frame_timer, Cpuexec.cpu[1].partial_frame_period, Attotime.ATTOTIME_NEVER);
|
||||
Timer.timer_adjust_periodic(Cpuexec.cpu[1].partial_frame_timer, Cpuexec.cpu[1].partial_frame_period, Attotime.ATTOTIME_NEVER);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -2862,7 +2863,7 @@ namespace MAME.Core
|
||||
}
|
||||
public static void end_interleave_boost()
|
||||
{
|
||||
EmuTimer.timer_adjust_periodic(interleave_boost_timer, Attotime.ATTOTIME_NEVER, Attotime.ATTOTIME_NEVER);
|
||||
Timer.timer_adjust_periodic(interleave_boost_timer, Attotime.ATTOTIME_NEVER, Attotime.ATTOTIME_NEVER);
|
||||
}
|
||||
public static void compute_perfect_interleave()
|
||||
{
|
||||
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
[StructLayout(LayoutKind.Explicit)]
|
||||
[Serializable()]
|
||||
@ -134,7 +134,7 @@ namespace MAME.Core
|
||||
public static void cpunum_set_input_line(int cpunum, int line, LineState state)
|
||||
{
|
||||
int vector = (line >= 0 && line < 35) ? interrupt_vector[cpunum, line] : 0xff;
|
||||
lirq.Add(new irq(cpunum, line, state, vector, EmuTimer.get_current_time()));
|
||||
lirq.Add(new irq(cpunum, line, state, vector, Timer.get_current_time()));
|
||||
Cpuexec.cpu[cpunum].cpunum_set_input_line_and_vector(cpunum, line, state, vector);
|
||||
}
|
||||
public static void cpunum_set_input_line_vector(int cpunum, int line, int vector)
|
||||
@ -149,8 +149,8 @@ namespace MAME.Core
|
||||
{
|
||||
if (line >= 0 && line < 35)
|
||||
{
|
||||
lirq.Add(new irq(cpunum, line, state, vector, EmuTimer.get_current_time()));
|
||||
EmuTimer.timer_set_internal(Cpuint.cpunum_empty_event_queue, "cpunum_empty_event_queue");
|
||||
lirq.Add(new irq(cpunum, line, state, vector, Timer.get_current_time()));
|
||||
Timer.timer_set_internal(Cpuint.cpunum_empty_event_queue, "cpunum_empty_event_queue");
|
||||
}
|
||||
}
|
||||
public static void cpunum_empty_event_queue()
|
||||
@ -162,7 +162,7 @@ namespace MAME.Core
|
||||
}
|
||||
foreach (irq irq1 in lirq)
|
||||
{
|
||||
if (Attotime.attotime_compare(irq1.time, EmuTimer.global_basetime) <= 0)
|
||||
if (Attotime.attotime_compare(irq1.time, Timer.global_basetime) <= 0)
|
||||
{
|
||||
input_line_state[irq1.cpunum, irq1.line] = (byte)irq1.state;
|
||||
input_line_vector[irq1.cpunum, irq1.line] = irq1.vector;
|
||||
|
@ -1,4 +1,7 @@
|
||||
namespace MAME.Core
|
||||
using Bitmap = MAME.Core.AxiBitmap.AxiBitmap;
|
||||
using Color = MAME.Core.AxiBitmap.AxiColor;
|
||||
|
||||
namespace mame
|
||||
{
|
||||
public class Crosshair
|
||||
{
|
||||
@ -6,6 +9,7 @@
|
||||
{
|
||||
public bool[] used;
|
||||
public bool[] visible;
|
||||
public Bitmap[] bitmap;
|
||||
/*bitmap_t * bitmap[MAX_PLAYERS];
|
||||
render_texture * texture[MAX_PLAYERS];
|
||||
const device_config *screen[MAX_PLAYERS];*/
|
||||
@ -82,6 +86,7 @@
|
||||
{
|
||||
global.used = new bool[8];
|
||||
global.visible = new bool[8];
|
||||
global.bitmap = new Bitmap[8];
|
||||
global.x = new int[8];
|
||||
global.y = new int[8];
|
||||
switch (Machine.sName)
|
||||
@ -94,6 +99,7 @@
|
||||
case "opwolfp":
|
||||
global.used[0] = true;
|
||||
global.visible[0] = true;
|
||||
create_bitmap(0);
|
||||
Video.drawcrosshair = Video.drawcrosshair_opwolf;
|
||||
break;
|
||||
default:
|
||||
@ -101,6 +107,30 @@
|
||||
break;
|
||||
}
|
||||
}
|
||||
public static void create_bitmap(int player)
|
||||
{
|
||||
global.bitmap[player] = new Bitmap(100, 100);
|
||||
int x, y;
|
||||
uint color = crosshair_colors[player];
|
||||
for (y = 0; y < 100; y++)
|
||||
{
|
||||
for (x = 0; x < 100; x++)
|
||||
{
|
||||
global.bitmap[player].SetPixel(x, y, Color.FromArgb(0xffffff));
|
||||
}
|
||||
}
|
||||
for (y = 0; y < 50; y++)
|
||||
{
|
||||
for (x = 0; x < 100; x++)
|
||||
{
|
||||
if (((crosshair_raw_top[y * (107 / 8) + x / 8] << (x % 8)) & 0x80) != 0)
|
||||
{
|
||||
global.bitmap[player].SetPixel(x, y, Color.FromArgb(unchecked((int)(0xff000000 | color))));
|
||||
global.bitmap[player].SetPixel(x, 99 - y, Color.FromArgb(unchecked((int)(0xff000000 | color))));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public static void animate_opwolf()
|
||||
{
|
||||
int player;
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public partial class Drawgfx
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System.IO;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
/*public enum eeprom_command
|
||||
{
|
||||
|
@ -1,8 +1,10 @@
|
||||
using MAME.Core.AxiBitmap;
|
||||
using System;
|
||||
using Bitmap = MAME.Core.AxiBitmap.AxiBitmap;
|
||||
using Color = MAME.Core.AxiBitmap.AxiColor;
|
||||
using Rectangle = MAME.Core.AxiBitmap.Rectangle;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
partial class Video
|
||||
{
|
||||
@ -32,6 +34,17 @@ namespace MAME.Core
|
||||
// return bm2;
|
||||
//}
|
||||
|
||||
public static Bitmap drawcrosshair_opwolf(Bitmap bm1)
|
||||
{
|
||||
Bitmap bm2 = bm1;
|
||||
bm2.DrawImage(
|
||||
MultiplyAlpha(Crosshair.global.bitmap[0], (float)Crosshair.global.fade / 0xff),
|
||||
new Rectangle(Crosshair.global.x[0] - 10,
|
||||
Crosshair.global.y[0] - 10, 20, 20),
|
||||
new Rectangle(0, 0, 100, 100));
|
||||
return bm2;
|
||||
}
|
||||
|
||||
public static int[] drawcrosshair_opwolf(int[] bm1)
|
||||
{
|
||||
int[] bm2 = bm1;
|
||||
@ -54,6 +67,33 @@ namespace MAME.Core
|
||||
return result;
|
||||
}*/
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="bitmap"></param>
|
||||
/// <param name="factor"></param>
|
||||
/// <returns></returns>
|
||||
public static Bitmap MultiplyAlpha(Bitmap bitmap, float factor)
|
||||
{
|
||||
Bitmap result = new Bitmap(bitmap.Width, bitmap.Height);
|
||||
for (int y = 0; y < bitmap.Height; y++)
|
||||
{
|
||||
for (int x = 0; x < bitmap.Width; x++)
|
||||
{
|
||||
Color originalColor = bitmap.GetPixel(x, y);
|
||||
byte newAlpha = (byte)Math.Min(255, (int)(originalColor.a * factor));
|
||||
Color newColor = new Color
|
||||
{
|
||||
r = originalColor.r,
|
||||
g = originalColor.g,
|
||||
b = originalColor.b,
|
||||
a = newAlpha
|
||||
};
|
||||
result.SetPixel(x, y, newColor);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@ -89,27 +129,27 @@ namespace MAME.Core
|
||||
// bitmapGDI.UnlockBits(bitmapData);
|
||||
// if (Wintime.osd_ticks() < popup_text_end)
|
||||
// {
|
||||
// Machine.mainMotion.tsslStatus = sDrawText;
|
||||
// Machine.FORM.tsslStatus = sDrawText;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// popup_text_end = 0;
|
||||
// if (Mame.paused)
|
||||
// {
|
||||
// Machine.mainMotion.tsslStatus = "pause";
|
||||
// Machine.FORM.tsslStatus = "pause";
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// switch (Mame.playState)
|
||||
// {
|
||||
// case Mame.PlayState.PLAY_RECORDRUNNING:
|
||||
// Machine.mainMotion.tsslStatus = "record";
|
||||
// Machine.FORM.tsslStatus = "record";
|
||||
// break;
|
||||
// case Mame.PlayState.PLAY_REPLAYRUNNING:
|
||||
// Machine.mainMotion.tsslStatus = "replay";
|
||||
// Machine.FORM.tsslStatus = "replay";
|
||||
// break;
|
||||
// default:
|
||||
// Machine.mainMotion.tsslStatus = "run";
|
||||
// Machine.FORM.tsslStatus = "run";
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
@ -130,7 +170,7 @@ namespace MAME.Core
|
||||
// bbmp[iMode].RotateFlip(RotateFlipType.Rotate270FlipNone);
|
||||
// break;
|
||||
// }
|
||||
// //Machine.mainMotion.pictureBox1.Image = bbmp[iMode];
|
||||
// //Machine.FORM.pictureBox1.Image = bbmp[iMode];
|
||||
// SubmitVideo(bbmp[iMode]);
|
||||
// }
|
||||
// catch
|
||||
@ -144,29 +184,25 @@ namespace MAME.Core
|
||||
{
|
||||
try
|
||||
{
|
||||
//TODO
|
||||
//int[] TempData = AxiBitmapEx.CloneIntColorArr(Video.bitmapcolor, Video.fullwidth, Video.fullheight, new Rectangle(offsetx, offsety, width, height));
|
||||
//drawcrosshair(TempData);
|
||||
int[] TempData = AxiBitmapEx.CloneIntColorArr(Video.bitmapcolor, Video.fullwidth, Video.fullheight, new Rectangle(offsetx, offsety, width, height));
|
||||
drawcrosshair(TempData);
|
||||
//bbmp[iMode] = drawcrosshair(bitmapGDI.Clone(new Rectangle(offsetx, offsety, width, height)));
|
||||
//switch (Machine.sDirection)
|
||||
//{
|
||||
// case "":
|
||||
// break;
|
||||
// case "90":
|
||||
// bbmp[iMode].RotateFlip(RotateFlipType.Rotate90FlipNone);
|
||||
// break;
|
||||
// case "180":
|
||||
// bbmp[iMode].RotateFlip(RotateFlipType.Rotate180FlipNone);
|
||||
// break;
|
||||
// case "270":
|
||||
// bbmp[iMode].RotateFlip(RotateFlipType.Rotate270FlipNone);
|
||||
// break;
|
||||
//}
|
||||
//Machine.mainMotion.pictureBox1.Image = bbmp[iMode];
|
||||
|
||||
//AxiBitmapEx.CloneIntColorArr(Video.bitmapcolor,Video.bitmapcolorRect, Video.fullwidth, Video.fullheight, new Rectangle(offsetx, offsety, width, height));
|
||||
SubmitVideo(Video.bitmapcolorRect, Video.screenstate.frame_number);
|
||||
//SubmitVideo(Video.bitmapcolor);
|
||||
switch (Machine.sDirection)
|
||||
{
|
||||
case "":
|
||||
break;
|
||||
case "90":
|
||||
bbmp[iMode].RotateFlip(RotateFlipType.Rotate90FlipNone);
|
||||
break;
|
||||
case "180":
|
||||
bbmp[iMode].RotateFlip(RotateFlipType.Rotate180FlipNone);
|
||||
break;
|
||||
case "270":
|
||||
bbmp[iMode].RotateFlip(RotateFlipType.Rotate270FlipNone);
|
||||
break;
|
||||
}
|
||||
//Machine.FORM.pictureBox1.Image = bbmp[iMode];
|
||||
SubmitVideo(Video.bitmapcolor);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@ -174,6 +210,37 @@ namespace MAME.Core
|
||||
}
|
||||
}
|
||||
|
||||
public static void CopyDataFrom(AxiBitmap destBitmap, byte[] sourceData, int sourceStride)
|
||||
{
|
||||
int pixelCount = destBitmap.Width * destBitmap.Height;
|
||||
if (sourceData.Length < pixelCount * 4) // 假设每个AxiColor是4字节
|
||||
throw new ArgumentException("Source data is too small.");
|
||||
|
||||
// 注意:这里我们假设sourceStride是源数据的每行字节数,它可能包含额外的填充字节
|
||||
// 以确保每行的开始都是4的倍数。但是,对于紧密打包的AxiColor数组,我们可以忽略它。
|
||||
|
||||
for (int y = 0; y < destBitmap.Height; y++)
|
||||
{
|
||||
int sourceOffset = y * sourceStride; // 但对于紧密打包的AxiColor,这将是 y * (destBitmap.Width * 4)
|
||||
// 然而,由于我们知道sourceData是直接对应于AxiColor的,我们可以简化为:
|
||||
sourceOffset = y * destBitmap.Width * 4; // 假设没有行填充
|
||||
|
||||
for (int x = 0; x < destBitmap.Width; x++)
|
||||
{
|
||||
int index = y * destBitmap.Width + x;
|
||||
int sourceIndex = sourceOffset + x * 4;
|
||||
|
||||
byte r = sourceData[sourceIndex];
|
||||
byte g = sourceData[sourceIndex + 1];
|
||||
byte b = sourceData[sourceIndex + 2];
|
||||
byte a = sourceData[sourceIndex + 3];
|
||||
|
||||
destBitmap.mData[index] = new AxiColor { r = r, g = g, b = b, a = a };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
using cpu.m68000;
|
||||
using System;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public class Generic
|
||||
{
|
||||
@ -157,7 +157,7 @@ namespace MAME.Core
|
||||
if (enabled == 0)
|
||||
{
|
||||
objcpunum = cpunum;
|
||||
EmuTimer.timer_set_internal(clear_all_lines, "clear_all_lines");
|
||||
Timer.timer_set_internal(clear_all_lines, "clear_all_lines");
|
||||
}
|
||||
}
|
||||
public static void interrupt_enable_w(byte data)
|
||||
|
@ -1,6 +1,6 @@
|
||||
using MAME.Core;
|
||||
using MAME.Core.run_interface;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public class analog_field_state
|
||||
{
|
||||
@ -564,7 +564,7 @@ namespace MAME.Core
|
||||
value = analog.accum;
|
||||
if (analog.interpolate && portdata.last_delta_nsec != 0)
|
||||
{
|
||||
nsec_since_last = Attotime.attotime_to_attoseconds(Attotime.attotime_sub(EmuTimer.get_current_time(), portdata.last_frame_time)) / Attotime.ATTOSECONDS_PER_NANOSECOND;
|
||||
nsec_since_last = Attotime.attotime_to_attoseconds(Attotime.attotime_sub(Timer.get_current_time(), portdata.last_frame_time)) / Attotime.ATTOSECONDS_PER_NANOSECOND;
|
||||
value = (int)(analog.previous + ((long)(analog.accum - analog.previous) * nsec_since_last / portdata.last_delta_nsec));
|
||||
}
|
||||
result = (uint)apply_analog_settings(value, analog);
|
||||
@ -600,7 +600,7 @@ namespace MAME.Core
|
||||
}
|
||||
private static void frame_update()
|
||||
{
|
||||
Atime curtime = EmuTimer.get_current_time();
|
||||
Atime curtime = Timer.get_current_time();
|
||||
portdata.last_delta_nsec = Attotime.attotime_to_attoseconds(Attotime.attotime_sub(curtime, portdata.last_frame_time)) / Attotime.ATTOSECONDS_PER_NANOSECOND;
|
||||
portdata.last_frame_time = curtime;
|
||||
if (Mame.playState != Mame.PlayState.PLAY_REPLAYRUNNING)
|
||||
@ -643,13 +643,13 @@ namespace MAME.Core
|
||||
int value2;
|
||||
value2 = apply_analog_min_max(analog, analog.accum);
|
||||
analog.previous = analog.accum = value2;
|
||||
if (Keyboard.IsPressed(MotionKey.P1_BTN_2))//if (Keyboard.IsPressed(Corekey.K))
|
||||
if (Keyboard.IsPressed(Key.K))
|
||||
{
|
||||
keypressed = true;
|
||||
delta -= analog.delta * 0x200;
|
||||
analog.lastdigital = 1;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.L))
|
||||
if (Keyboard.IsPressed(Key.L))
|
||||
{
|
||||
keypressed = true;
|
||||
delta += analog.delta * 0x200;
|
||||
@ -678,13 +678,13 @@ namespace MAME.Core
|
||||
int value2;
|
||||
value2 = apply_analog_min_max(analog, analog.accum);
|
||||
analog.previous = analog.accum = value2;
|
||||
if (Keyboard.IsPressed(MotionKey.P2_BTN_2))//if (Keyboard.IsPressed(Corekey.NumPad2))
|
||||
if (Keyboard.IsPressed(Key.NumPad2))
|
||||
{
|
||||
keypressed = true;
|
||||
delta -= analog.delta * 0x200;
|
||||
analog.lastdigital = 1;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.NumPad3))
|
||||
if (Keyboard.IsPressed(Key.NumPad3))
|
||||
{
|
||||
keypressed = true;
|
||||
delta += analog.delta * 0x200;
|
||||
@ -701,13 +701,13 @@ namespace MAME.Core
|
||||
int value2;
|
||||
value2 = apply_analog_min_max(analog, analog.accum);
|
||||
analog.previous = analog.accum = value2;
|
||||
if (Keyboard.IsPressed(MotionKey.P1_BTN_3))//if (Keyboard.IsPressed(MotionKey.P1_BTN_3))//if (Keyboard.IsPressed(Corekey.U))
|
||||
if (Keyboard.IsPressed(Key.U))
|
||||
{
|
||||
keypressed = true;
|
||||
delta -= analog_p0.delta * 0x200;
|
||||
analog.lastdigital = 1;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_BTN_4))//if (Keyboard.IsPressed(Corekey.I))
|
||||
if (Keyboard.IsPressed(Key.I))
|
||||
{
|
||||
keypressed = true;
|
||||
delta += analog_p0.delta * 0x200;
|
||||
@ -724,13 +724,13 @@ namespace MAME.Core
|
||||
int value2;
|
||||
value2 = apply_analog_min_max(analog, analog.accum);
|
||||
analog.previous = analog.accum = value2;
|
||||
if (Keyboard.IsPressed(MotionKey.P2_BTN_3))//if (Keyboard.IsPressed(Corekey.NumPad4))
|
||||
if (Keyboard.IsPressed(Key.NumPad4))
|
||||
{
|
||||
keypressed = true;
|
||||
delta -= analog.delta * 0x200;
|
||||
analog.lastdigital = 1;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_BTN_4))//if (Keyboard.IsPressed(MotionKey.P2_BTN_4))//if (Keyboard.IsPressed(Corekey.NumPad5))
|
||||
if (Keyboard.IsPressed(Key.NumPad5))
|
||||
{
|
||||
keypressed = true;
|
||||
delta += analog.delta * 0x200;
|
||||
@ -747,13 +747,13 @@ namespace MAME.Core
|
||||
int value2;
|
||||
value2 = apply_analog_min_max(analog, analog.accum);
|
||||
analog.previous = analog.accum = value2;
|
||||
if (Keyboard.IsPressed(MotionKey.P1_LEFT))//if (Keyboard.IsPressed(Corekey.A))
|
||||
if (Keyboard.IsPressed(Key.A))
|
||||
{
|
||||
keypressed = true;
|
||||
delta -= analog.delta * 0x200;
|
||||
analog.lastdigital = 1;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_RIGHT))//if (Keyboard.IsPressed(Corekey.D))
|
||||
if (Keyboard.IsPressed(Key.D))
|
||||
{
|
||||
keypressed = true;
|
||||
delta += analog.delta * 0x200;
|
||||
@ -770,13 +770,13 @@ namespace MAME.Core
|
||||
int value2;
|
||||
value2 = apply_analog_min_max(analog, analog.accum);
|
||||
analog.previous = analog.accum = value2;
|
||||
if (Keyboard.IsPressed(MotionKey.P1_DOWN))//if (Keyboard.IsPressed(Corekey.S))
|
||||
if (Keyboard.IsPressed(Key.S))
|
||||
{
|
||||
keypressed = true;
|
||||
delta -= analog.delta * 0x200;
|
||||
analog.lastdigital = 1;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_UP))//if (Keyboard.IsPressed(Corekey.W))
|
||||
if (Keyboard.IsPressed(Key.W))
|
||||
{
|
||||
keypressed = true;
|
||||
delta += analog.delta * 0x200;
|
||||
@ -793,13 +793,13 @@ namespace MAME.Core
|
||||
int value2;
|
||||
value2 = apply_analog_min_max(analog, analog.accum);
|
||||
analog.previous = analog.accum = value2;
|
||||
if (Keyboard.IsPressed(MotionKey.P1_LEFT))//if (Keyboard.IsPressed(Corekey.A))
|
||||
if (Keyboard.IsPressed(Key.A))
|
||||
{
|
||||
keypressed = true;
|
||||
delta -= analog.delta * 0x200;
|
||||
analog.lastdigital = 1;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_RIGHT))//if (Keyboard.IsPressed(Corekey.D))
|
||||
if (Keyboard.IsPressed(Key.D))
|
||||
{
|
||||
keypressed = true;
|
||||
delta += analog.delta * 0x200;
|
||||
@ -816,13 +816,13 @@ namespace MAME.Core
|
||||
int value2;
|
||||
value2 = apply_analog_min_max(analog, analog.accum);
|
||||
analog.previous = analog.accum = value2;
|
||||
if (Keyboard.IsPressed(MotionKey.P2_LEFT))//if (Keyboard.IsPressed(Corekey.Left))
|
||||
if (Keyboard.IsPressed(Key.Left))
|
||||
{
|
||||
keypressed = true;
|
||||
delta -= analog.delta * 0x200;
|
||||
analog.lastdigital = 1;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_RIGHT))//if (Keyboard.IsPressed(Corekey.Right))
|
||||
if (Keyboard.IsPressed(Key.Right))
|
||||
{
|
||||
keypressed = true;
|
||||
delta += analog.delta * 0x200;
|
||||
@ -847,13 +847,13 @@ namespace MAME.Core
|
||||
delta = rawvalue;
|
||||
analog.lastdigital = 0;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_LEFT))//if (Keyboard.IsPressed(Corekey.A))
|
||||
if (Keyboard.IsPressed(Key.A))
|
||||
{
|
||||
keypressed = true;
|
||||
delta -= analog.delta * 0x200;
|
||||
analog.lastdigital = 1;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_RIGHT))//if (Keyboard.IsPressed(Corekey.D))
|
||||
if (Keyboard.IsPressed(Key.D))
|
||||
{
|
||||
keypressed = true;
|
||||
delta += analog.delta * 0x200;
|
||||
@ -892,13 +892,13 @@ namespace MAME.Core
|
||||
delta = rawvalue;
|
||||
analog.lastdigital = 0;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_UP))//if (Keyboard.IsPressed(Corekey.W))
|
||||
if (Keyboard.IsPressed(Key.W))
|
||||
{
|
||||
keypressed = true;
|
||||
delta -= analog.delta * 0x200;
|
||||
analog.lastdigital = 1;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_DOWN))//if (Keyboard.IsPressed(Corekey.S))
|
||||
if (Keyboard.IsPressed(Key.S))
|
||||
{
|
||||
keypressed = true;
|
||||
delta += analog.delta * 0x200;
|
||||
|
@ -1,23 +1,23 @@
|
||||
using MAME.Core;
|
||||
using MAME.Core.run_interface;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public partial class Inptport
|
||||
{
|
||||
private static List<KeyStruct> lks;
|
||||
public static List<Corekey> lk;
|
||||
public static List<Key> lk;
|
||||
public class KeyStruct
|
||||
{
|
||||
public Corekey key;
|
||||
public Key key;
|
||||
public char c;
|
||||
public KeyStruct(Corekey _key, char _c)
|
||||
public KeyStruct(Key _key, char _c)
|
||||
{
|
||||
key = _key;
|
||||
c = _c;
|
||||
}
|
||||
}
|
||||
public static char getcharbykey(Corekey key1)
|
||||
public static char getcharbykey(Key key1)
|
||||
{
|
||||
char c1 = ' ';
|
||||
foreach (KeyStruct ks in lks)
|
||||
@ -32,80 +32,80 @@ namespace MAME.Core
|
||||
}
|
||||
public static void input_init()
|
||||
{
|
||||
lk = new List<Corekey>();
|
||||
lk.Add(Corekey.D1);
|
||||
lk.Add(Corekey.D2);
|
||||
lk.Add(Corekey.D3);
|
||||
lk.Add(Corekey.D4);
|
||||
lk.Add(Corekey.D5);
|
||||
lk.Add(Corekey.D6);
|
||||
lk.Add(Corekey.D7);
|
||||
lk.Add(Corekey.D8);
|
||||
lk.Add(Corekey.D9);
|
||||
lk.Add(Corekey.D0);
|
||||
lk.Add(Corekey.A);
|
||||
lk.Add(Corekey.B);
|
||||
lk.Add(Corekey.C);
|
||||
lk.Add(Corekey.D);
|
||||
lk.Add(Corekey.E);
|
||||
lk.Add(Corekey.F);
|
||||
lk.Add(Corekey.G);
|
||||
lk.Add(Corekey.H);
|
||||
lk.Add(Corekey.I);
|
||||
lk.Add(Corekey.J);
|
||||
lk.Add(Corekey.K);
|
||||
lk.Add(Corekey.L);
|
||||
lk.Add(Corekey.M);
|
||||
lk.Add(Corekey.N);
|
||||
lk.Add(Corekey.O);
|
||||
lk.Add(Corekey.P);
|
||||
lk.Add(Corekey.Q);
|
||||
lk.Add(Corekey.R);
|
||||
lk.Add(Corekey.S);
|
||||
lk.Add(Corekey.T);
|
||||
lk.Add(Corekey.U);
|
||||
lk.Add(Corekey.V);
|
||||
lk.Add(Corekey.W);
|
||||
lk.Add(Corekey.X);
|
||||
lk.Add(Corekey.Y);
|
||||
lk.Add(Corekey.Z);
|
||||
lk = new List<Key>();
|
||||
lk.Add(Key.D1);
|
||||
lk.Add(Key.D2);
|
||||
lk.Add(Key.D3);
|
||||
lk.Add(Key.D4);
|
||||
lk.Add(Key.D5);
|
||||
lk.Add(Key.D6);
|
||||
lk.Add(Key.D7);
|
||||
lk.Add(Key.D8);
|
||||
lk.Add(Key.D9);
|
||||
lk.Add(Key.D0);
|
||||
lk.Add(Key.A);
|
||||
lk.Add(Key.B);
|
||||
lk.Add(Key.C);
|
||||
lk.Add(Key.D);
|
||||
lk.Add(Key.E);
|
||||
lk.Add(Key.F);
|
||||
lk.Add(Key.G);
|
||||
lk.Add(Key.H);
|
||||
lk.Add(Key.I);
|
||||
lk.Add(Key.J);
|
||||
lk.Add(Key.K);
|
||||
lk.Add(Key.L);
|
||||
lk.Add(Key.M);
|
||||
lk.Add(Key.N);
|
||||
lk.Add(Key.O);
|
||||
lk.Add(Key.P);
|
||||
lk.Add(Key.Q);
|
||||
lk.Add(Key.R);
|
||||
lk.Add(Key.S);
|
||||
lk.Add(Key.T);
|
||||
lk.Add(Key.U);
|
||||
lk.Add(Key.V);
|
||||
lk.Add(Key.W);
|
||||
lk.Add(Key.X);
|
||||
lk.Add(Key.Y);
|
||||
lk.Add(Key.Z);
|
||||
lks = new List<KeyStruct>();
|
||||
lks.Add(new KeyStruct(Corekey.D1, '1'));
|
||||
lks.Add(new KeyStruct(Corekey.D2, '2'));
|
||||
lks.Add(new KeyStruct(Corekey.D3, '3'));
|
||||
lks.Add(new KeyStruct(Corekey.D4, '4'));
|
||||
lks.Add(new KeyStruct(Corekey.D5, '5'));
|
||||
lks.Add(new KeyStruct(Corekey.D6, '6'));
|
||||
lks.Add(new KeyStruct(Corekey.D7, '7'));
|
||||
lks.Add(new KeyStruct(Corekey.D8, '8'));
|
||||
lks.Add(new KeyStruct(Corekey.D9, '9'));
|
||||
lks.Add(new KeyStruct(Corekey.D0, '0'));
|
||||
lks.Add(new KeyStruct(Corekey.A, 'a'));
|
||||
lks.Add(new KeyStruct(Corekey.B, 'b'));
|
||||
lks.Add(new KeyStruct(Corekey.C, 'c'));
|
||||
lks.Add(new KeyStruct(Corekey.D, 'd'));
|
||||
lks.Add(new KeyStruct(Corekey.E, 'e'));
|
||||
lks.Add(new KeyStruct(Corekey.F, 'f'));
|
||||
lks.Add(new KeyStruct(Corekey.G, 'g'));
|
||||
lks.Add(new KeyStruct(Corekey.H, 'h'));
|
||||
lks.Add(new KeyStruct(Corekey.I, 'i'));
|
||||
lks.Add(new KeyStruct(Corekey.J, 'j'));
|
||||
lks.Add(new KeyStruct(Corekey.K, 'k'));
|
||||
lks.Add(new KeyStruct(Corekey.L, 'l'));
|
||||
lks.Add(new KeyStruct(Corekey.M, 'm'));
|
||||
lks.Add(new KeyStruct(Corekey.N, 'n'));
|
||||
lks.Add(new KeyStruct(Corekey.O, 'o'));
|
||||
lks.Add(new KeyStruct(Corekey.P, 'p'));
|
||||
lks.Add(new KeyStruct(Corekey.Q, 'q'));
|
||||
lks.Add(new KeyStruct(Corekey.R, 'r'));
|
||||
lks.Add(new KeyStruct(Corekey.S, 's'));
|
||||
lks.Add(new KeyStruct(Corekey.T, 't'));
|
||||
lks.Add(new KeyStruct(Corekey.U, 'u'));
|
||||
lks.Add(new KeyStruct(Corekey.V, 'v'));
|
||||
lks.Add(new KeyStruct(Corekey.W, 'w'));
|
||||
lks.Add(new KeyStruct(Corekey.X, 'x'));
|
||||
lks.Add(new KeyStruct(Corekey.Y, 'y'));
|
||||
lks.Add(new KeyStruct(Corekey.Z, 'z'));
|
||||
lks.Add(new KeyStruct(Key.D1, '1'));
|
||||
lks.Add(new KeyStruct(Key.D2, '2'));
|
||||
lks.Add(new KeyStruct(Key.D3, '3'));
|
||||
lks.Add(new KeyStruct(Key.D4, '4'));
|
||||
lks.Add(new KeyStruct(Key.D5, '5'));
|
||||
lks.Add(new KeyStruct(Key.D6, '6'));
|
||||
lks.Add(new KeyStruct(Key.D7, '7'));
|
||||
lks.Add(new KeyStruct(Key.D8, '8'));
|
||||
lks.Add(new KeyStruct(Key.D9, '9'));
|
||||
lks.Add(new KeyStruct(Key.D0, '0'));
|
||||
lks.Add(new KeyStruct(Key.A, 'a'));
|
||||
lks.Add(new KeyStruct(Key.B, 'b'));
|
||||
lks.Add(new KeyStruct(Key.C, 'c'));
|
||||
lks.Add(new KeyStruct(Key.D, 'd'));
|
||||
lks.Add(new KeyStruct(Key.E, 'e'));
|
||||
lks.Add(new KeyStruct(Key.F, 'f'));
|
||||
lks.Add(new KeyStruct(Key.G, 'g'));
|
||||
lks.Add(new KeyStruct(Key.H, 'h'));
|
||||
lks.Add(new KeyStruct(Key.I, 'i'));
|
||||
lks.Add(new KeyStruct(Key.J, 'j'));
|
||||
lks.Add(new KeyStruct(Key.K, 'k'));
|
||||
lks.Add(new KeyStruct(Key.L, 'l'));
|
||||
lks.Add(new KeyStruct(Key.M, 'm'));
|
||||
lks.Add(new KeyStruct(Key.N, 'n'));
|
||||
lks.Add(new KeyStruct(Key.O, 'o'));
|
||||
lks.Add(new KeyStruct(Key.P, 'p'));
|
||||
lks.Add(new KeyStruct(Key.Q, 'q'));
|
||||
lks.Add(new KeyStruct(Key.R, 'r'));
|
||||
lks.Add(new KeyStruct(Key.S, 's'));
|
||||
lks.Add(new KeyStruct(Key.T, 't'));
|
||||
lks.Add(new KeyStruct(Key.U, 'u'));
|
||||
lks.Add(new KeyStruct(Key.V, 'v'));
|
||||
lks.Add(new KeyStruct(Key.W, 'w'));
|
||||
lks.Add(new KeyStruct(Key.X, 'x'));
|
||||
lks.Add(new KeyStruct(Key.Y, 'y'));
|
||||
lks.Add(new KeyStruct(Key.Z, 'z'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,7 @@
|
||||
using MAME.Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using MAME.Core.Common;
|
||||
using MAME.Core.run_interface;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public class Keyboard
|
||||
{
|
||||
@ -10,101 +9,52 @@ namespace MAME.Core
|
||||
|
||||
static IKeyboard mKeyboard;
|
||||
|
||||
//const int CheckMaxEnumIdx = 33;
|
||||
|
||||
class KeyState
|
||||
{
|
||||
public bool IsPressed;
|
||||
public bool IsTriggered;
|
||||
public bool WasPressed;
|
||||
};
|
||||
private static Dictionary<MotionKey, KeyState> m_KeyStates = new Dictionary<MotionKey, KeyState>();
|
||||
|
||||
static MotionKey[] mKeyName;
|
||||
public static void InitializeInput(IKeyboard ikb)
|
||||
public static void InitializeInput(mainMotion form1, IKeyboard ikb)
|
||||
{
|
||||
mKeyboard = ikb;
|
||||
List<MotionKey> temp = new List<MotionKey>();
|
||||
foreach (MotionKey mkey in Enum.GetValues(typeof(MotionKey)))
|
||||
{
|
||||
//if (mkey > MotionKey.FinalKey)
|
||||
// break;
|
||||
m_KeyStates[mkey] = new KeyState();
|
||||
temp.Add(mkey);
|
||||
}
|
||||
mKeyName = temp.ToArray();
|
||||
}
|
||||
|
||||
public static bool IsPressed(MotionKey key)
|
||||
public static bool IsPressed(Key key)
|
||||
{
|
||||
return m_KeyStates[key].IsPressed;
|
||||
return mKeyboard.IsPressed(key);
|
||||
}
|
||||
public static bool IsTriggered(MotionKey key)
|
||||
public static bool IsTriggered(Key key)
|
||||
{
|
||||
return m_KeyStates[key].IsTriggered;
|
||||
return mKeyboard.IsTriggered(key);
|
||||
}
|
||||
|
||||
public static void Update()
|
||||
{
|
||||
for (byte i = 0; i < mKeyName.Length; i++)
|
||||
//TODO
|
||||
/*for (int i = 0; i < 256; i++)
|
||||
{
|
||||
m_KeyStates[mKeyName[i]].IsPressed = false;
|
||||
m_KeyStates[i].IsPressed = false;
|
||||
}
|
||||
foreach (MotionKey key in mKeyboard.GetPressedKeys())
|
||||
foreach (Key key in dIDevice.GetPressedKeys())
|
||||
{
|
||||
m_KeyStates[key].IsPressed = true;
|
||||
m_KeyStates[(int)key].IsPressed = true;
|
||||
}
|
||||
for (int i = 0; i < mKeyName.Length; i++)
|
||||
for (int i = 0; i < 256; i++)
|
||||
{
|
||||
MotionKey key = mKeyName[i];
|
||||
if (m_KeyStates[key].IsPressed)
|
||||
if (m_KeyStates[i].IsPressed)
|
||||
{
|
||||
if (m_KeyStates[key].WasPressed)
|
||||
if (m_KeyStates[i].WasPressed)
|
||||
{
|
||||
m_KeyStates[key].IsTriggered = false;
|
||||
m_KeyStates[i].IsTriggered = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_KeyStates[key].WasPressed = true;
|
||||
m_KeyStates[key].IsTriggered = true;
|
||||
m_KeyStates[i].WasPressed = true;
|
||||
m_KeyStates[i].IsTriggered = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_KeyStates[key].WasPressed = false;
|
||||
m_KeyStates[key].IsTriggered = false;
|
||||
m_KeyStates[i].WasPressed = false;
|
||||
m_KeyStates[i].IsTriggered = false;
|
||||
}
|
||||
}
|
||||
//byte finalIndex = CheckMaxEnumIdx;
|
||||
//for (byte i = 0; i < finalIndex; i++)
|
||||
//{
|
||||
// m_KeyStates[i].IsPressed = false;
|
||||
//}
|
||||
//foreach (MotionKey key in mKeyboard.GetPressedKeys())
|
||||
//{
|
||||
// m_KeyStates[(int)key].IsPressed = true;
|
||||
//}
|
||||
//for (int i = 0; i < finalIndex; i++)
|
||||
//{
|
||||
// if (m_KeyStates[i].IsPressed)
|
||||
// {
|
||||
// if (m_KeyStates[i].WasPressed)
|
||||
// {
|
||||
// m_KeyStates[i].IsTriggered = false;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// m_KeyStates[i].WasPressed = true;
|
||||
// m_KeyStates[i].IsTriggered = true;
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// m_KeyStates[i].WasPressed = false;
|
||||
// m_KeyStates[i].IsTriggered = false;
|
||||
// }
|
||||
//}
|
||||
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
@ -1,13 +1,14 @@
|
||||
using System.Collections.Generic;
|
||||
using MAME.Core.Common;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public class Machine
|
||||
{
|
||||
public static string sName, sParent, sBoard, sDirection, sDescription, sManufacturer;
|
||||
public static List<string> lsParents;
|
||||
public static MameMainMotion mainMotion;
|
||||
public static mainMotion FORM;
|
||||
public static RomInfo rom;
|
||||
public static bool bRom;
|
||||
public delegate void machine_delegate();
|
||||
@ -263,7 +264,7 @@ namespace MAME.Core
|
||||
public static byte[] GetNeogeoRom(string sFile)
|
||||
{
|
||||
byte[] bb1;
|
||||
string path = System.IO.Path.Combine(Mame.RomRoot + "/neogeo/", sFile);
|
||||
string path = System.IO.Path.Combine(Mame.RomRoot + "/" + "roms/neogeo/", sFile);
|
||||
if (File.Exists(path))
|
||||
{
|
||||
EmuLogger.Log($"Had File => {path}");
|
||||
@ -287,7 +288,7 @@ namespace MAME.Core
|
||||
int n1;
|
||||
foreach (string s1 in lsParents)
|
||||
{
|
||||
string path = System.IO.Path.Combine(Mame.RomRoot + "/" + s1 + "/", sFile);
|
||||
string path = System.IO.Path.Combine(Mame.RomRoot + "/" + "roms/" + s1 + "/", sFile);
|
||||
if (File.Exists(path))
|
||||
{
|
||||
EmuLogger.Log($"Had File => {path}");
|
||||
|
@ -1,7 +1,9 @@
|
||||
using MAME.Core;
|
||||
using MAME.Core.Common;
|
||||
using MAME.Core.run_interface;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public class Mame
|
||||
{
|
||||
@ -21,7 +23,7 @@ namespace MAME.Core
|
||||
public static PlayState playState;
|
||||
public static bool is_foreground;
|
||||
public static bool paused, exit_pending;
|
||||
public static EmuTimer.emu_timer soft_reset_timer;
|
||||
public static Timer.emu_timer soft_reset_timer;
|
||||
public static BinaryReader brRecord = null;
|
||||
public static BinaryWriter bwRecord = null;
|
||||
public static bool bPP = true;
|
||||
@ -45,9 +47,7 @@ namespace MAME.Core
|
||||
public static void mame_execute()
|
||||
{
|
||||
soft_reset();
|
||||
//mame_pause(true);
|
||||
//开始不暂停
|
||||
mame_pause(false);
|
||||
mame_pause(true);
|
||||
while (!exit_pending)
|
||||
{
|
||||
if (!paused)
|
||||
@ -83,11 +83,9 @@ namespace MAME.Core
|
||||
handlestate();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void mame_schedule_soft_reset()
|
||||
{
|
||||
EmuTimer.timer_adjust_periodic(soft_reset_timer, Attotime.ATTOTIME_ZERO, Attotime.ATTOTIME_NEVER);
|
||||
Timer.timer_adjust_periodic(soft_reset_timer, Attotime.ATTOTIME_ZERO, Attotime.ATTOTIME_NEVER);
|
||||
mame_pause(false);
|
||||
if (Cpuexec.activecpu >= 0)
|
||||
{
|
||||
@ -130,14 +128,14 @@ namespace MAME.Core
|
||||
handle_replay();
|
||||
}
|
||||
}
|
||||
public static void init_machine()
|
||||
public static void init_machine(mainMotion form)
|
||||
{
|
||||
Inptport.input_init();
|
||||
Palette.palette_init();
|
||||
Generic.generic_machine_init();
|
||||
EmuTimer.timer_init();
|
||||
soft_reset_timer = EmuTimer.timer_alloc_common(soft_reset, "soft_reset", false);
|
||||
Window.osd_init();
|
||||
Timer.timer_init();
|
||||
soft_reset_timer = Timer.timer_alloc_common(soft_reset, "soft_reset", false);
|
||||
Window.osd_init(form);
|
||||
Inptport.input_port_init();
|
||||
Cpuexec.cpuexec_init();
|
||||
Watchdog.watchdog_init();
|
||||
@ -173,7 +171,7 @@ namespace MAME.Core
|
||||
Watchdog.watchdog_internal_reset();
|
||||
Sound.sound_reset();
|
||||
playState = PlayState.PLAY_RUNNING;
|
||||
EmuTimer.timer_set_global_time(EmuTimer.get_current_time());
|
||||
Timer.timer_set_global_time(Timer.get_current_time());
|
||||
}
|
||||
private static void handle_save()
|
||||
{
|
||||
@ -183,7 +181,7 @@ namespace MAME.Core
|
||||
{
|
||||
Video.sDrawText = "Select position to save to";
|
||||
Video.popup_text_end = Wintime.osd_ticks() + Wintime.ticks_per_second * 1000;
|
||||
if (Keyboard.IsTriggered(MotionKey.Escape))
|
||||
if (Keyboard.IsTriggered(Key.Escape))
|
||||
{
|
||||
Video.sDrawText = "Save cancelled";
|
||||
Video.popup_text_end = Wintime.osd_ticks() + Wintime.ticks_per_second * 2;
|
||||
@ -192,6 +190,30 @@ namespace MAME.Core
|
||||
Motion.motion_handler_callback = Motion.handler_ingame;
|
||||
return;
|
||||
}
|
||||
char file;
|
||||
foreach (Key key1 in Inptport.lk)
|
||||
{
|
||||
if (Keyboard.IsTriggered(key1))
|
||||
{
|
||||
file = Inptport.getcharbykey(key1);
|
||||
if (!Directory.Exists("sta\\" + Machine.sName))
|
||||
{
|
||||
Directory.CreateDirectory("sta\\" + Machine.sName);
|
||||
}
|
||||
FileStream fs1 = new FileStream("sta\\" + Machine.sName + "\\" + file + ".sta", FileMode.Create);
|
||||
BinaryWriter bw1 = new BinaryWriter(fs1);
|
||||
State.savestate_callback(bw1);
|
||||
bw1.Close();
|
||||
fs1.Close();
|
||||
Video.sDrawText = "Save to position " + file;
|
||||
Video.popup_text_end = Wintime.osd_ticks() + Wintime.ticks_per_second * 2;
|
||||
playState = PlayState.PLAY_RUNNING;
|
||||
Motion.motion_handler_callback = Motion.handler_ingame;
|
||||
Thread.Sleep(500);
|
||||
mame_pause(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
private static void handle_load()
|
||||
@ -202,7 +224,7 @@ namespace MAME.Core
|
||||
{
|
||||
Video.sDrawText = "Select position to load from";
|
||||
Video.popup_text_end = Wintime.osd_ticks() + Wintime.ticks_per_second * 1000;
|
||||
if (Keyboard.IsTriggered(MotionKey.Escape))
|
||||
if (Keyboard.IsTriggered(Key.Escape))
|
||||
{
|
||||
Video.sDrawText = "Load cancelled";
|
||||
Video.popup_text_end = Wintime.osd_ticks() + Wintime.ticks_per_second * 2;
|
||||
@ -211,6 +233,43 @@ namespace MAME.Core
|
||||
Motion.motion_handler_callback = Motion.handler_ingame;
|
||||
return;
|
||||
}
|
||||
char file;
|
||||
foreach (Key key1 in Inptport.lk)
|
||||
{
|
||||
if (Keyboard.IsTriggered(key1))
|
||||
{
|
||||
file = Inptport.getcharbykey(key1);
|
||||
if (!File.Exists("sta\\" + Machine.sName + "\\" + file + ".sta"))
|
||||
{
|
||||
Video.sDrawText = "Load fail";
|
||||
Video.popup_text_end = Wintime.osd_ticks() + Wintime.ticks_per_second * 2;
|
||||
playState = PlayState.PLAY_RUNNING;
|
||||
Thread.Sleep(500);
|
||||
mame_pause(false);
|
||||
Motion.motion_handler_callback = Motion.handler_ingame;
|
||||
return;
|
||||
}
|
||||
FileStream fs1 = new FileStream("sta\\" + Machine.sName + "\\" + file + ".sta", FileMode.Open);
|
||||
BinaryReader br1 = new BinaryReader(fs1);
|
||||
State.loadstate_callback(br1);
|
||||
br1.Close();
|
||||
fs1.Close();
|
||||
postload();
|
||||
Video.sDrawText = "Load from position " + file;
|
||||
Video.popup_text_end = Wintime.osd_ticks() + Wintime.ticks_per_second * 2;
|
||||
/*FileStream fs2 = new FileStream(@"\VS2008\compare1\compare1\bin\Debug\sta1\" + Machine.sName + "\\" + file + ".sta", FileMode.Create);
|
||||
BinaryWriter bw1 = new BinaryWriter(fs2);
|
||||
State.savestate_callback(bw1);
|
||||
bw1.Close();
|
||||
fs2.Close();
|
||||
return;*/
|
||||
playState = PlayState.PLAY_RUNNING;
|
||||
Motion.motion_handler_callback = Motion.handler_ingame;
|
||||
Thread.Sleep(500);
|
||||
mame_pause(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
private static void handle_record()
|
||||
@ -223,7 +282,7 @@ namespace MAME.Core
|
||||
{
|
||||
Video.sDrawText = "Select position to record to";
|
||||
Video.popup_text_end = Wintime.osd_ticks() + Wintime.ticks_per_second * 1000;
|
||||
if (Keyboard.IsTriggered(MotionKey.Escape))
|
||||
if (Keyboard.IsTriggered(Key.Escape))
|
||||
{
|
||||
Video.sDrawText = "Record cancelled";
|
||||
Video.popup_text_end = Wintime.osd_ticks() + Wintime.ticks_per_second * 2;
|
||||
@ -232,6 +291,39 @@ namespace MAME.Core
|
||||
Motion.motion_handler_callback = Motion.handler_ingame;
|
||||
return;
|
||||
}
|
||||
char file;
|
||||
foreach (Key key1 in Inptport.lk)
|
||||
{
|
||||
if (Keyboard.IsTriggered(key1))
|
||||
{
|
||||
file = Inptport.getcharbykey(key1);
|
||||
if (!Directory.Exists("inp\\" + Machine.sName))
|
||||
{
|
||||
Directory.CreateDirectory("inp\\" + Machine.sName);
|
||||
}
|
||||
FileStream fs1 = new FileStream("inp\\" + Machine.sName + "\\" + file + ".sta", FileMode.Create);
|
||||
BinaryWriter bw1 = new BinaryWriter(fs1);
|
||||
State.savestate_callback(bw1);
|
||||
bw1.Close();
|
||||
fs1.Close();
|
||||
if (bwRecord != null)
|
||||
{
|
||||
bwRecord.Close();
|
||||
bwRecord = null;
|
||||
}
|
||||
FileStream fs2 = new FileStream("inp\\" + Machine.sName + "\\" + file + ".inp", FileMode.Create);
|
||||
bwRecord = new BinaryWriter(fs2);
|
||||
Memory.memory_reset2();
|
||||
Inptport.record_port_callback();
|
||||
Video.sDrawText = "Record to position " + file;
|
||||
Video.popup_text_end = Wintime.osd_ticks() + Wintime.ticks_per_second * 2;
|
||||
playState = PlayState.PLAY_RECORDRUNNING;
|
||||
Motion.motion_handler_callback = Motion.handler_ingame;
|
||||
Thread.Sleep(500);
|
||||
mame_pause(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (playState == PlayState.PLAY_RECORDEND)
|
||||
{
|
||||
@ -253,7 +345,7 @@ namespace MAME.Core
|
||||
{
|
||||
Video.sDrawText = "Select position to replay from";
|
||||
Video.popup_text_end = Wintime.osd_ticks() + Wintime.ticks_per_second * 1000;
|
||||
if (Keyboard.IsTriggered(MotionKey.Escape))
|
||||
if (Keyboard.IsTriggered(Key.Escape))
|
||||
{
|
||||
Video.sDrawText = "Replay cancelled";
|
||||
Video.popup_text_end = Wintime.osd_ticks() + Wintime.ticks_per_second * 2;
|
||||
@ -262,6 +354,63 @@ namespace MAME.Core
|
||||
Motion.motion_handler_callback = Motion.handler_ingame;
|
||||
return;
|
||||
}
|
||||
char file;
|
||||
foreach (Key key1 in Inptport.lk)
|
||||
{
|
||||
if (Keyboard.IsTriggered(key1))
|
||||
{
|
||||
file = Inptport.getcharbykey(key1);
|
||||
if (!File.Exists("inp\\" + Machine.sName + "\\" + file + ".sta") || !File.Exists("inp\\" + Machine.sName + "\\" + file + ".inp"))
|
||||
{
|
||||
Video.sDrawText = "Replay fail";
|
||||
Video.popup_text_end = Wintime.osd_ticks() + Wintime.ticks_per_second * 2;
|
||||
playState = PlayState.PLAY_RUNNING;
|
||||
Thread.Sleep(500);
|
||||
mame_pause(false);
|
||||
Motion.motion_handler_callback = Motion.handler_ingame;
|
||||
return;
|
||||
}
|
||||
if (bwRecord != null)
|
||||
{
|
||||
bwRecord.Close();
|
||||
bwRecord = null;
|
||||
}
|
||||
if (fsRecord != null)
|
||||
{
|
||||
fsRecord.Close();
|
||||
fsRecord = null;
|
||||
}
|
||||
if (brRecord != null)
|
||||
{
|
||||
brRecord.Close();
|
||||
brRecord = null;
|
||||
}
|
||||
FileStream fs1 = new FileStream("inp\\" + Machine.sName + "\\" + file + ".sta", FileMode.Open);
|
||||
BinaryReader br1 = new BinaryReader(fs1);
|
||||
State.loadstate_callback(br1);
|
||||
br1.Close();
|
||||
fs1.Close();
|
||||
postload();
|
||||
/*FileStream fs2 = new FileStream(@"\VS2008\compare1\compare1\bin\Debug\inp1\" + Machine.sName + "\\" + file + ".sta", FileMode.Create);
|
||||
BinaryWriter bw1 = new BinaryWriter(fs2);
|
||||
State.savestate_callback(bw1);
|
||||
bw1.Close();
|
||||
fs2.Close();
|
||||
return;*/
|
||||
fsRecord = new FileStream("inp\\" + Machine.sName + "\\" + file + ".inp", FileMode.Open);
|
||||
brRecord = new BinaryReader(fsRecord);
|
||||
Memory.memory_reset();
|
||||
Inptport.bReplayRead = true;
|
||||
Inptport.replay_port_callback();
|
||||
Video.sDrawText = "Replay from position " + file;
|
||||
Video.popup_text_end = Wintime.osd_ticks() + Wintime.ticks_per_second * 2;
|
||||
playState = PlayState.PLAY_REPLAYRUNNING;
|
||||
Motion.motion_handler_callback = Motion.handler_ingame;
|
||||
Thread.Sleep(500);
|
||||
mame_pause(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (playState == PlayState.PLAY_REPLAYEND)
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public class Memory
|
||||
{
|
||||
|
@ -1,6 +1,7 @@
|
||||
using MAME.Core;
|
||||
using MAME.Core.Common;
|
||||
using MAME.Core.run_interface;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
/// <summary>
|
||||
/// 原依赖Form的内容
|
||||
@ -11,6 +12,11 @@ namespace MAME.Core
|
||||
public delegate void motion_delegate();
|
||||
public static motion_delegate motion_handler_callback, motion_update_callback;
|
||||
public static bool single_step;
|
||||
//public static mainMotion mainmotion;
|
||||
public static void init()
|
||||
{
|
||||
//mainmotion = motion;
|
||||
}
|
||||
public static void ui_update_and_render()
|
||||
{
|
||||
motion_update_callback();
|
||||
@ -18,423 +24,167 @@ namespace MAME.Core
|
||||
}
|
||||
public static void ui_updateC()
|
||||
{
|
||||
//不再填充完整画布
|
||||
//{
|
||||
// int i;
|
||||
// int red, green, blue;
|
||||
// if (single_step || Mame.paused)
|
||||
// {
|
||||
// byte bright = 0xa7;
|
||||
// for (i = 0; i < Video.fullwidth * Video.fullheight; i++)
|
||||
// {
|
||||
// red = (int)(((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff0000) >> 16) * bright / 0xff);
|
||||
// green = (int)(((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff00) >> 8) * bright / 0xff);
|
||||
// blue = (int)((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff) * bright / 0xff);
|
||||
// Video.bitmapcolor[i] = (int)Palette.make_argb(0xff, red, green, blue);
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// for (i = 0; i < Video.fullwidth * Video.fullheight; i++)
|
||||
// {
|
||||
// Video.bitmapcolor[i] = (int)Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]];
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
int i;
|
||||
int red, green, blue;
|
||||
if (single_step || Mame.paused)
|
||||
{
|
||||
int i;
|
||||
int target_i = 0;
|
||||
int x, y;
|
||||
int red, green, blue;
|
||||
|
||||
int startX = Video.offsetx;
|
||||
int endX = Video.offsetx + Video.width;
|
||||
int startY = Video.offsety;
|
||||
int endY = Video.offsety + Video.height;
|
||||
|
||||
if (single_step || Mame.paused)
|
||||
byte bright = 0xa7;
|
||||
for (i = 0; i < Video.fullwidth * Video.fullheight; i++)
|
||||
{
|
||||
byte bright = 0xa7;
|
||||
for (y = startY; y < endY; y++)
|
||||
{
|
||||
for (x = startX; x < endX; x++, target_i++)
|
||||
{
|
||||
i = (y * Video.fullwidth) + x;
|
||||
red = (int)(((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff0000) >> 16) * bright / 0xff);
|
||||
green = (int)(((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff00) >> 8) * bright / 0xff);
|
||||
blue = (int)((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff) * bright / 0xff);
|
||||
Video.bitmapcolorRect[target_i] = (int)Palette.make_argb(0xff, red, green, blue);
|
||||
}
|
||||
}
|
||||
red = (int)(((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff0000) >> 16) * bright / 0xff);
|
||||
green = (int)(((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff00) >> 8) * bright / 0xff);
|
||||
blue = (int)((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff) * bright / 0xff);
|
||||
Video.bitmapcolor[i] = (int)Palette.make_argb(0xff, red, green, blue);
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < Video.fullwidth * Video.fullheight; i++)
|
||||
{
|
||||
|
||||
for (y = startY; y < endY; y++)
|
||||
{
|
||||
for (x = startX; x < endX; x++, target_i++)
|
||||
{
|
||||
i = (y * Video.fullwidth) + x;
|
||||
Video.bitmapcolorRect[target_i] = (int)Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]];
|
||||
}
|
||||
}
|
||||
Video.bitmapcolor[i] = (int)Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]];
|
||||
}
|
||||
}
|
||||
}
|
||||
public static void ui_updateTehkan()
|
||||
{
|
||||
//不再填充完整画布
|
||||
//{
|
||||
// int i;
|
||||
// int red, green, blue;
|
||||
// if (single_step || Mame.paused)
|
||||
// {
|
||||
// byte bright = 0xa7;
|
||||
// for (i = 0; i < Video.fullwidth * Video.fullheight; i++)
|
||||
// {
|
||||
// if (Video.bitmapbase[Video.curbitmap][i] < 0x100)
|
||||
// {
|
||||
// red = (int)(((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff0000) >> 16) * bright / 0xff);
|
||||
// green = (int)(((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff00) >> 8) * bright / 0xff);
|
||||
// blue = (int)((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff) * bright / 0xff);
|
||||
// Video.bitmapcolor[i] = (int)Palette.make_argb(0xff, red, green, blue);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// int i1 = 1;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// for (i = 0; i < Video.fullwidth * Video.fullheight; i++)
|
||||
// {
|
||||
// if (Video.bitmapbase[Video.curbitmap][i] < 0x100)
|
||||
// {
|
||||
// Video.bitmapcolor[i] = (int)Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]];
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Video.bitmapcolor[i] = (int)Palette.entry_color[0];
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
int i;
|
||||
int red, green, blue;
|
||||
if (single_step || Mame.paused)
|
||||
{
|
||||
int i;
|
||||
int target_i = 0;
|
||||
int x, y;
|
||||
int red, green, blue;
|
||||
|
||||
int startX = Video.offsetx;
|
||||
int endX = Video.offsetx + Video.width;
|
||||
int startY = Video.offsety;
|
||||
int endY = Video.offsety + Video.height;
|
||||
|
||||
if (single_step || Mame.paused)
|
||||
byte bright = 0xa7;
|
||||
for (i = 0; i < Video.fullwidth * Video.fullheight; i++)
|
||||
{
|
||||
byte bright = 0xa7;
|
||||
for (y = startY; y < endY; y++)
|
||||
if (Video.bitmapbase[Video.curbitmap][i] < 0x100)
|
||||
{
|
||||
for (x = startX; x < endX; x++, target_i++)
|
||||
{
|
||||
i = y * Video.fullwidth + x;
|
||||
if (Video.bitmapbase[Video.curbitmap][i] < 0x100)
|
||||
{
|
||||
red = (int)(((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff0000) >> 16) * bright / 0xff);
|
||||
green = (int)(((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff00) >> 8) * bright / 0xff);
|
||||
blue = (int)((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff) * bright / 0xff);
|
||||
Video.bitmapcolorRect[target_i] = (int)Palette.make_argb(0xff, red, green, blue);
|
||||
}
|
||||
else
|
||||
{
|
||||
int i1 = 1;
|
||||
}
|
||||
}
|
||||
red = (int)(((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff0000) >> 16) * bright / 0xff);
|
||||
green = (int)(((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff00) >> 8) * bright / 0xff);
|
||||
blue = (int)((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff) * bright / 0xff);
|
||||
Video.bitmapcolor[i] = (int)Palette.make_argb(0xff, red, green, blue);
|
||||
}
|
||||
else
|
||||
{
|
||||
int i1 = 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < Video.fullwidth * Video.fullheight; i++)
|
||||
{
|
||||
for (y = startY; y < endY; y++)
|
||||
if (Video.bitmapbase[Video.curbitmap][i] < 0x100)
|
||||
{
|
||||
for (x = startX; x < endX; x++, target_i++)
|
||||
{
|
||||
i = y * Video.fullwidth + x;
|
||||
if (Video.bitmapbase[Video.curbitmap][i] < 0x100)
|
||||
{
|
||||
Video.bitmapcolorRect[target_i] = (int)Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]];
|
||||
}
|
||||
else
|
||||
{
|
||||
Video.bitmapcolorRect[target_i] = (int)Palette.entry_color[0];
|
||||
}
|
||||
}
|
||||
Video.bitmapcolor[i] = (int)Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]];
|
||||
}
|
||||
else
|
||||
{
|
||||
Video.bitmapcolor[i] = (int)Palette.entry_color[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public static void ui_updateN()
|
||||
{
|
||||
//不再填充完整画布
|
||||
//{
|
||||
// int i;
|
||||
// int red, green, blue;
|
||||
// if (single_step || Mame.paused)
|
||||
// {
|
||||
// byte bright = 0xa7;
|
||||
// for (i = 0; i < Video.fullwidth * Video.fullheight; i++)
|
||||
// {
|
||||
// red = ((Video.bitmapbaseN[Video.curbitmap][i] & 0xff0000) >> 16) * bright / 0xff;
|
||||
// green = ((Video.bitmapbaseN[Video.curbitmap][i] & 0xff00) >> 8) * bright / 0xff;
|
||||
// blue = (Video.bitmapbaseN[Video.curbitmap][i] & 0xff) * bright / 0xff;
|
||||
// Video.bitmapcolor[i] = (int)Palette.make_argb(0xff, red, green, blue);
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// for (i = 0; i < Video.fullwidth * Video.fullheight; i++)
|
||||
// {
|
||||
// Video.bitmapcolor[i] = (int)(0xff000000 | (uint)Video.bitmapbaseN[Video.curbitmap][i]);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
int i;
|
||||
int red, green, blue;
|
||||
if (single_step || Mame.paused)
|
||||
{
|
||||
int i;
|
||||
int target_i = 0;
|
||||
int x, y;
|
||||
int red, green, blue;
|
||||
|
||||
int startX = Video.offsetx;
|
||||
int endX = Video.offsetx + Video.width;
|
||||
int startY = Video.offsety;
|
||||
int endY = Video.offsety + Video.height;
|
||||
if (single_step || Mame.paused)
|
||||
byte bright = 0xa7;
|
||||
for (i = 0; i < Video.fullwidth * Video.fullheight; i++)
|
||||
{
|
||||
byte bright = 0xa7;
|
||||
for (y = startY; y < endY; y++)
|
||||
{
|
||||
for (x = startX; x < endX; x++, target_i++)
|
||||
{
|
||||
i = y * Video.fullwidth + x;
|
||||
red = ((Video.bitmapbaseN[Video.curbitmap][i] & 0xff0000) >> 16) * bright / 0xff;
|
||||
green = ((Video.bitmapbaseN[Video.curbitmap][i] & 0xff00) >> 8) * bright / 0xff;
|
||||
blue = (Video.bitmapbaseN[Video.curbitmap][i] & 0xff) * bright / 0xff;
|
||||
Video.bitmapcolorRect[target_i] = (int)Palette.make_argb(0xff, red, green, blue);
|
||||
}
|
||||
}
|
||||
red = ((Video.bitmapbaseN[Video.curbitmap][i] & 0xff0000) >> 16) * bright / 0xff;
|
||||
green = ((Video.bitmapbaseN[Video.curbitmap][i] & 0xff00) >> 8) * bright / 0xff;
|
||||
blue = (Video.bitmapbaseN[Video.curbitmap][i] & 0xff) * bright / 0xff;
|
||||
Video.bitmapcolor[i] = (int)Palette.make_argb(0xff, red, green, blue);
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < Video.fullwidth * Video.fullheight; i++)
|
||||
{
|
||||
for (y = startY; y < endY; y++)
|
||||
{
|
||||
for (x = startX; x < endX; x++, target_i++)
|
||||
{
|
||||
i = y * Video.fullwidth + x;
|
||||
Video.bitmapcolorRect[target_i] = (int)(0xff000000 | (uint)Video.bitmapbaseN[Video.curbitmap][i]);
|
||||
}
|
||||
}
|
||||
Video.bitmapcolor[i] = (int)(0xff000000 | (uint)Video.bitmapbaseN[Video.curbitmap][i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
public static void ui_updateNa()
|
||||
{
|
||||
//不再填充完整画布
|
||||
//{
|
||||
// int i;
|
||||
// int red, green, blue;
|
||||
// if (single_step || Mame.paused)
|
||||
// {
|
||||
// byte bright = 0xa7;
|
||||
// for (i = 0; i < Video.fullwidth * Video.fullheight; i++)
|
||||
// {
|
||||
// red = (int)(((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff0000) >> 16) * bright / 0xff);
|
||||
// green = (int)(((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff00) >> 8) * bright / 0xff);
|
||||
// blue = (int)((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff) * bright / 0xff);
|
||||
// Video.bitmapcolor[i] = (int)Palette.make_argb(0xff, red, green, blue);
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// for (i = 0; i < Video.fullwidth * Video.fullheight; i++)
|
||||
// {
|
||||
// Video.bitmapcolor[i] = (int)Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]];
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
int i;
|
||||
int red, green, blue;
|
||||
if (single_step || Mame.paused)
|
||||
{
|
||||
int i;
|
||||
int target_i = 0;
|
||||
int x, y;
|
||||
int red, green, blue;
|
||||
|
||||
int startX = Video.offsetx;
|
||||
int endX = Video.offsetx + Video.width;
|
||||
int startY = Video.offsety;
|
||||
int endY = Video.offsety + Video.height;
|
||||
if (single_step || Mame.paused)
|
||||
byte bright = 0xa7;
|
||||
for (i = 0; i < Video.fullwidth * Video.fullheight; i++)
|
||||
{
|
||||
byte bright = 0xa7;
|
||||
for (y = startY; y < endY; y++)
|
||||
{
|
||||
for (x = startX; x < endX; x++, target_i++)
|
||||
{
|
||||
i = y * Video.fullwidth + x;
|
||||
red = (int)(((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff0000) >> 16) * bright / 0xff);
|
||||
green = (int)(((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff00) >> 8) * bright / 0xff);
|
||||
blue = (int)((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff) * bright / 0xff);
|
||||
Video.bitmapcolorRect[target_i] = (int)Palette.make_argb(0xff, red, green, blue);
|
||||
}
|
||||
}
|
||||
red = (int)(((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff0000) >> 16) * bright / 0xff);
|
||||
green = (int)(((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff00) >> 8) * bright / 0xff);
|
||||
blue = (int)((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff) * bright / 0xff);
|
||||
Video.bitmapcolor[i] = (int)Palette.make_argb(0xff, red, green, blue);
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < Video.fullwidth * Video.fullheight; i++)
|
||||
{
|
||||
for (y = startY; y < endY; y++)
|
||||
{
|
||||
for (x = startX; x < endX; x++, target_i++)
|
||||
{
|
||||
i = y * Video.fullwidth + x;
|
||||
Video.bitmapcolorRect[target_i] = (int)Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]];
|
||||
}
|
||||
}
|
||||
Video.bitmapcolor[i] = (int)Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]];
|
||||
}
|
||||
}
|
||||
}
|
||||
public static void ui_updateIGS011()
|
||||
{
|
||||
//不再填充完整画布
|
||||
//{
|
||||
// int i;
|
||||
// int red, green, blue;
|
||||
// if (single_step || Mame.paused)
|
||||
// {
|
||||
// byte bright = 0xa7;
|
||||
// for (i = 0; i < Video.fullwidth * Video.fullheight; i++)
|
||||
// {
|
||||
// red = (int)(((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff0000) >> 16) * bright / 0xff);
|
||||
// green = (int)(((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff00) >> 8) * bright / 0xff);
|
||||
// blue = (int)((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff) * bright / 0xff);
|
||||
// Video.bitmapcolor[i] = (int)Palette.make_argb(0xff, red, green, blue);
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// for (i = 0; i < Video.fullwidth * Video.fullheight; i++)
|
||||
// {
|
||||
// Video.bitmapcolor[i] = (int)Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]];
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
int i;
|
||||
int red, green, blue;
|
||||
if (single_step || Mame.paused)
|
||||
{
|
||||
int i;
|
||||
int target_i = 0;
|
||||
int x, y;
|
||||
int red, green, blue;
|
||||
|
||||
int startX = Video.offsetx;
|
||||
int endX = Video.offsetx + Video.width;
|
||||
int startY = Video.offsety;
|
||||
int endY = Video.offsety + Video.height;
|
||||
|
||||
if (single_step || Mame.paused)
|
||||
byte bright = 0xa7;
|
||||
for (i = 0; i < Video.fullwidth * Video.fullheight; i++)
|
||||
{
|
||||
byte bright = 0xa7;
|
||||
for (y = startY; y < endY; y++)
|
||||
{
|
||||
for (x = startX; x < endX; x++, target_i++)
|
||||
{
|
||||
i = y * Video.fullwidth + x;
|
||||
red = (int)(((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff0000) >> 16) * bright / 0xff);
|
||||
green = (int)(((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff00) >> 8) * bright / 0xff);
|
||||
blue = (int)((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff) * bright / 0xff);
|
||||
Video.bitmapcolorRect[target_i] = (int)Palette.make_argb(0xff, red, green, blue);
|
||||
}
|
||||
}
|
||||
red = (int)(((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff0000) >> 16) * bright / 0xff);
|
||||
green = (int)(((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff00) >> 8) * bright / 0xff);
|
||||
blue = (int)((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff) * bright / 0xff);
|
||||
Video.bitmapcolor[i] = (int)Palette.make_argb(0xff, red, green, blue);
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < Video.fullwidth * Video.fullheight; i++)
|
||||
{
|
||||
for (y = startY; y < endY; y++)
|
||||
{
|
||||
for (x = startX; x < endX; x++, target_i++)
|
||||
{
|
||||
i = y * Video.fullwidth + x;
|
||||
Video.bitmapcolorRect[target_i] = (int)Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]];
|
||||
}
|
||||
}
|
||||
Video.bitmapcolor[i] = (int)Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]];
|
||||
}
|
||||
}
|
||||
}
|
||||
public static void ui_updatePGM()
|
||||
{
|
||||
//不再填充完整画布
|
||||
//{
|
||||
// int i;
|
||||
// int red, green, blue;
|
||||
// if (single_step || Mame.paused)
|
||||
// {
|
||||
// byte bright = 0xa7;
|
||||
// for (i = 0; i < Video.fullwidth * Video.fullheight; i++)
|
||||
// {
|
||||
// red = (int)(((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff0000) >> 16) * bright / 0xff);
|
||||
// green = (int)(((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff00) >> 8) * bright / 0xff);
|
||||
// blue = (int)((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff) * bright / 0xff);
|
||||
// Video.bitmapcolor[i] = (int)Palette.make_argb(0xff, red, green, blue);
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// for (i = 0; i < Video.fullwidth * Video.fullheight; i++)
|
||||
// {
|
||||
// Video.bitmapcolor[i] = (int)Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]];
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
int i;
|
||||
int red, green, blue;
|
||||
if (single_step || Mame.paused)
|
||||
{
|
||||
int i;
|
||||
int target_i = 0;
|
||||
int x, y;
|
||||
int red, green, blue;
|
||||
|
||||
int startX = Video.offsetx;
|
||||
int endX = Video.offsetx + Video.width;
|
||||
int startY = Video.offsety;
|
||||
int endY = Video.offsety + Video.height;
|
||||
|
||||
if (single_step || Mame.paused)
|
||||
byte bright = 0xa7;
|
||||
for (i = 0; i < Video.fullwidth * Video.fullheight; i++)
|
||||
{
|
||||
byte bright = 0xa7;
|
||||
for (y = startY; y < endY; y++)
|
||||
{
|
||||
for (x = startX; x < endX; x++, target_i++)
|
||||
{
|
||||
i = y * Video.fullwidth + x;
|
||||
red = (int)(((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff0000) >> 16) * bright / 0xff);
|
||||
green = (int)(((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff00) >> 8) * bright / 0xff);
|
||||
blue = (int)((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff) * bright / 0xff);
|
||||
Video.bitmapcolorRect[target_i] = (int)Palette.make_argb(0xff, red, green, blue);
|
||||
}
|
||||
}
|
||||
red = (int)(((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff0000) >> 16) * bright / 0xff);
|
||||
green = (int)(((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff00) >> 8) * bright / 0xff);
|
||||
blue = (int)((Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]] & 0xff) * bright / 0xff);
|
||||
Video.bitmapcolor[i] = (int)Palette.make_argb(0xff, red, green, blue);
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < Video.fullwidth * Video.fullheight; i++)
|
||||
{
|
||||
for (y = startY; y < endY; y++)
|
||||
{
|
||||
for (x = startX; x < endX; x++, target_i++)
|
||||
{
|
||||
i = y * Video.fullwidth + x;
|
||||
Video.bitmapcolorRect[target_i] = (int)Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]];
|
||||
}
|
||||
}
|
||||
Video.bitmapcolor[i] = (int)Palette.entry_color[Video.bitmapbase[Video.curbitmap][i]];
|
||||
}
|
||||
}
|
||||
}
|
||||
public static void handler_ingame()
|
||||
{
|
||||
//Mame.handle2 = GetForegroundWindow();
|
||||
//if (Mame.handle1 == Mame.handle2)
|
||||
//{
|
||||
// Mame.is_foreground = true;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// Mame.is_foreground = false;
|
||||
//}
|
||||
Mame.is_foreground = true;
|
||||
bool is_paused = Mame.mame_is_paused();
|
||||
if (single_step)
|
||||
@ -444,15 +194,15 @@ namespace MAME.Core
|
||||
}
|
||||
if (Mame.is_foreground)
|
||||
{
|
||||
if (Keyboard.IsPressed(MotionKey.F3))
|
||||
if (Keyboard.IsPressed(Key.F3))
|
||||
{
|
||||
cpurun();
|
||||
Mame.playState = Mame.PlayState.PLAY_RESET;
|
||||
}
|
||||
if (Keyboard.IsTriggered(MotionKey.F7))
|
||||
if (Keyboard.IsTriggered(Key.F7))
|
||||
{
|
||||
cpurun();
|
||||
if (Keyboard.IsPressed(MotionKey.LeftShift) || Keyboard.IsPressed(MotionKey.RightShift))
|
||||
if (Keyboard.IsPressed(Key.LeftShift) || Keyboard.IsPressed(Key.RightShift))
|
||||
{
|
||||
Mame.playState = Mame.PlayState.PLAY_SAVE;
|
||||
}
|
||||
@ -462,10 +212,10 @@ namespace MAME.Core
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (Keyboard.IsTriggered(MotionKey.F8))
|
||||
if (Keyboard.IsTriggered(Key.F8))
|
||||
{
|
||||
cpurun();
|
||||
if (Keyboard.IsPressed(MotionKey.LeftShift) || Keyboard.IsPressed(MotionKey.RightShift))
|
||||
if (Keyboard.IsPressed(Key.LeftShift) || Keyboard.IsPressed(Key.RightShift))
|
||||
{
|
||||
if (Mame.playState == Mame.PlayState.PLAY_RECORDRUNNING)
|
||||
{
|
||||
@ -482,9 +232,9 @@ namespace MAME.Core
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (Keyboard.IsTriggered(MotionKey.EMU_PAUSED))
|
||||
if (Keyboard.IsTriggered(Key.P))
|
||||
{
|
||||
if (is_paused && (Keyboard.IsPressed(MotionKey.LeftShift) || Keyboard.IsPressed(MotionKey.RightShift)))
|
||||
if (is_paused && (Keyboard.IsPressed(Key.LeftShift) || Keyboard.IsPressed(Key.RightShift)))
|
||||
{
|
||||
single_step = true;
|
||||
Mame.mame_pause(false);
|
||||
@ -494,7 +244,7 @@ namespace MAME.Core
|
||||
Mame.mame_pause(!Mame.mame_is_paused());
|
||||
}
|
||||
}
|
||||
if (Keyboard.IsTriggered(MotionKey.F10))
|
||||
if (Keyboard.IsTriggered(Key.F10))
|
||||
{
|
||||
Keyboard.bF10 = true;
|
||||
bool b1 = Video.global_throttle;
|
||||
@ -504,10 +254,10 @@ namespace MAME.Core
|
||||
}
|
||||
public static void cpurun()
|
||||
{
|
||||
M68000Motion.m68000State = M68000Motion.M68000State.M68000_RUN;
|
||||
Machine.mainMotion.m68000motion.mTx_tsslStatus = "run";
|
||||
Z80Motion.z80State = Z80Motion.Z80AState.Z80A_RUN;
|
||||
Machine.mainMotion.z80motion.mTx_tsslStatus = "run";
|
||||
m68000Motion.m68000State = m68000Motion.M68000State.M68000_RUN;
|
||||
Machine.FORM.m68000motion.mTx_tsslStatus = "run";
|
||||
z80Motion.z80State = z80Motion.Z80AState.Z80A_RUN;
|
||||
Machine.FORM.z80motion.mTx_tsslStatus = "run";
|
||||
}
|
||||
private static double ui_get_line_height()
|
||||
{
|
||||
|
@ -1,13 +1,14 @@
|
||||
using MAME.Core;
|
||||
using MAME.Core.Common;
|
||||
using MAME.Core.run_interface;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public class Mouse
|
||||
{
|
||||
public static int deltaX, deltaY, oldX, oldY;
|
||||
public static byte[] buttons;
|
||||
static IMouse iMouse;
|
||||
public static void InitialMouse(IMouse im)
|
||||
public static void InitialMouse(mainMotion form1, IMouse im)
|
||||
{
|
||||
iMouse = im;
|
||||
}
|
||||
@ -15,13 +16,12 @@ namespace MAME.Core
|
||||
public static void Update()
|
||||
{
|
||||
int X, Y;
|
||||
iMouse.MouseXY(out X, out Y, out byte[] MouseButtons);
|
||||
iMouse.MouseXY(out X, out Y);
|
||||
deltaX = X - oldX;
|
||||
deltaY = Y - oldY;
|
||||
oldX = X;
|
||||
oldY = Y;
|
||||
buttons = MouseButtons;
|
||||
|
||||
//TODO
|
||||
//MouseState mouseState = mouseDevice.CurrentMouseState;
|
||||
//deltaX = mouseState.X - oldX;
|
||||
//deltaY = mouseState.Y - oldY;
|
||||
|
@ -1,7 +1,7 @@
|
||||
using MAME.Core.AxiBitmap;
|
||||
using Color = MAME.Core.AxiBitmap.AxiColor;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public class Palette
|
||||
{
|
||||
@ -20,22 +20,19 @@ namespace MAME.Core
|
||||
case "CPS-1":
|
||||
case "CPS-1(QSound)":
|
||||
case "CPS2":
|
||||
//trans_color = Color.Magenta;
|
||||
trans_color = Color.Black;
|
||||
trans_color = Color.Magenta;
|
||||
trans_uint = (uint)trans_color.ToArgb();
|
||||
numcolors = 0xc00;
|
||||
palette_set_callback = palette_entry_set_color1;
|
||||
break;
|
||||
case "Data East":
|
||||
//trans_color = Color.Magenta;
|
||||
trans_color = Color.Black;
|
||||
trans_color = Color.Magenta;
|
||||
trans_uint = (uint)trans_color.ToArgb();
|
||||
numcolors = 0x200;
|
||||
palette_set_callback = palette_entry_set_color2;
|
||||
break;
|
||||
case "Tehkan":
|
||||
//trans_color = Color.Magenta;
|
||||
trans_color = Color.Black;
|
||||
trans_color = Color.Magenta;
|
||||
trans_uint = (uint)trans_color.ToArgb();
|
||||
numcolors = 0x100;
|
||||
palette_set_callback = palette_entry_set_color2;
|
||||
@ -59,8 +56,7 @@ namespace MAME.Core
|
||||
palette_set_callback = palette_entry_set_color1;
|
||||
break;
|
||||
case "PGM":
|
||||
//trans_color = Color.Magenta;
|
||||
trans_color = Color.Black;
|
||||
trans_color = Color.Magenta;
|
||||
trans_uint = (uint)trans_color.ToArgb();
|
||||
numcolors = 0x901;
|
||||
palette_set_callback = palette_entry_set_color2;
|
||||
@ -102,8 +98,7 @@ namespace MAME.Core
|
||||
case "boblcave":
|
||||
case "bublcave11":
|
||||
case "bublcave10":
|
||||
//trans_color = Color.Magenta;
|
||||
trans_color = Color.Black;
|
||||
trans_color = Color.Magenta;
|
||||
numcolors = 0x100;
|
||||
break;
|
||||
case "opwolf":
|
||||
@ -120,8 +115,7 @@ namespace MAME.Core
|
||||
palette_set_callback = palette_entry_set_color2;
|
||||
break;
|
||||
case "Taito B":
|
||||
//trans_color = Color.Magenta;
|
||||
trans_color = Color.Black;
|
||||
trans_color = Color.Magenta;
|
||||
trans_uint = (uint)trans_color.ToArgb();
|
||||
numcolors = 0x1000;
|
||||
palette_set_callback = palette_entry_set_color3;
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System.IO;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public class Pd4900a
|
||||
{
|
||||
|
@ -1,11 +1,10 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public class RomInfo
|
||||
{
|
||||
public static List<RomInfo> romList;
|
||||
public static Dictionary<string, RomInfo> dictName2Rom;
|
||||
public static RomInfo Rom;
|
||||
public string Name, Board;
|
||||
public string Parent;
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System.IO;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public class State
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
enum trans_t
|
||||
{
|
||||
|
@ -3,9 +3,9 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public class EmuTimer
|
||||
public class Timer
|
||||
{
|
||||
public static List<emu_timer> lt;
|
||||
private static List<emu_timer2> lt2;
|
@ -1,9 +1,9 @@
|
||||
using MAME.Core;
|
||||
using MAME.Core.run_interface;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using Bitmap = MAME.Core.AxiBitmap.AxiBitmap;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public struct screen_state
|
||||
{
|
||||
@ -27,8 +27,8 @@ namespace MAME.Core
|
||||
public static screen_state screenstate;
|
||||
public static int video_attributes;
|
||||
private static int PAUSED_REFRESH_RATE = 30, VIDEO_UPDATE_AFTER_VBLANK = 4;
|
||||
public static EmuTimer.emu_timer vblank_begin_timer, vblank_end_timer;
|
||||
public static EmuTimer.emu_timer scanline0_timer, scanline_timer;
|
||||
public static Timer.emu_timer vblank_begin_timer, vblank_end_timer;
|
||||
public static Timer.emu_timer scanline0_timer, scanline_timer;
|
||||
private static Atime throttle_emutime, throttle_realtime, speed_last_emutime, overall_emutime;
|
||||
private static long throttle_last_ticks;
|
||||
private static long average_oversleep;
|
||||
@ -38,22 +38,12 @@ namespace MAME.Core
|
||||
private static int[] popcount;
|
||||
public static ushort[][] bitmapbase;
|
||||
public static int[][] bitmapbaseN;
|
||||
//public static int[] bitmapcolor;
|
||||
|
||||
/** bitmapcolor的指针管理 **/
|
||||
//不再拷贝完整画布
|
||||
//public static int[] bitmapcolor;
|
||||
//static GCHandle bitmapcolor_handle;
|
||||
//public static IntPtr bitmapcolor_Ptr;
|
||||
|
||||
public static int[] bitmapcolorRect;
|
||||
static GCHandle bitmapcolorRect_handle;
|
||||
public static IntPtr bitmapcolorRect_Ptr;
|
||||
/** end **/
|
||||
|
||||
public static int[] bitmapcolor;
|
||||
public static int fullwidth, fullheight;
|
||||
public static bool global_throttle;
|
||||
public static int scanline_param;
|
||||
private static Bitmap bitmapGDI;
|
||||
private static Bitmap[] bbmp;
|
||||
public static RECT new_clip;
|
||||
public static int curbitmap;
|
||||
public static string sDrawText;
|
||||
@ -72,7 +62,7 @@ namespace MAME.Core
|
||||
|
||||
|
||||
#region 抽象出去
|
||||
static Action<int[],long> Act_SubmitVideo;
|
||||
static Action<int[]> Act_SubmitVideo;
|
||||
|
||||
public static void BindFunc(IVideoPlayer Ivp)
|
||||
{
|
||||
@ -81,9 +71,9 @@ namespace MAME.Core
|
||||
Act_SubmitVideo += Ivp.SubmitVideo;
|
||||
}
|
||||
|
||||
static void SubmitVideo(int[] Bitmap, long frame_number)
|
||||
static void SubmitVideo(int[] Bitmap)
|
||||
{
|
||||
Act_SubmitVideo.Invoke(Bitmap, frame_number);
|
||||
Act_SubmitVideo?.Invoke(Bitmap);
|
||||
}
|
||||
#endregion
|
||||
|
||||
@ -119,10 +109,15 @@ namespace MAME.Core
|
||||
frame_update_time = new Atime(0, (long)(1e18 / 59.61));//59.61Hz
|
||||
screenstate.vblank_period = 0;
|
||||
video_attributes = 0;
|
||||
bitmapGDI = new Bitmap(Video.fullwidth, Video.fullheight);
|
||||
Motion.motion_update_callback = Motion.ui_updateC;
|
||||
bitmapbase = new ushort[2][];
|
||||
bitmapbase[0] = new ushort[0x200 * 0x200];
|
||||
bitmapbase[1] = new ushort[0x200 * 0x200];
|
||||
bbmp = new Bitmap[3];
|
||||
bbmp[0] = new Bitmap(512, 512);
|
||||
bbmp[1] = new Bitmap(512, 256);
|
||||
bbmp[2] = new Bitmap(384, 224);
|
||||
video_update_callback = CPS.video_update_cps1;
|
||||
video_eof_callback = CPS.video_eof_cps1;
|
||||
break;
|
||||
@ -138,10 +133,15 @@ namespace MAME.Core
|
||||
frame_update_time = new Atime(0, (long)(1e18 / 8000000) * 512 * 262);//59.637404580152669Hz
|
||||
screenstate.vblank_period = 0;
|
||||
video_attributes = 0;
|
||||
bitmapGDI = new Bitmap(Video.fullwidth, Video.fullheight);
|
||||
Motion.motion_update_callback = Motion.ui_updateC;
|
||||
bitmapbase = new ushort[2][];
|
||||
bitmapbase[0] = new ushort[0x200 * 0x200];
|
||||
bitmapbase[1] = new ushort[0x200 * 0x200];
|
||||
bbmp = new Bitmap[3];
|
||||
bbmp[0] = new Bitmap(512, 512);
|
||||
bbmp[1] = new Bitmap(512, 256);
|
||||
bbmp[2] = new Bitmap(384, 224);
|
||||
video_update_callback = CPS.video_update_cps1;
|
||||
video_eof_callback = CPS.video_eof_cps1;
|
||||
break;
|
||||
@ -157,10 +157,13 @@ namespace MAME.Core
|
||||
frame_update_time = new Atime(0, (long)(1e18 / 60));
|
||||
screenstate.vblank_period = 0;
|
||||
video_attributes = 0;
|
||||
bitmapGDI = new Bitmap(Video.fullwidth, Video.fullheight);
|
||||
Motion.motion_update_callback = Motion.ui_updateC;
|
||||
bitmapbase = new ushort[2][];
|
||||
bitmapbase[0] = new ushort[0x100 * 0x100];
|
||||
bitmapbase[1] = new ushort[0x100 * 0x100];
|
||||
bbmp = new Bitmap[1];
|
||||
bbmp[0] = new Bitmap(256, 256);
|
||||
video_update_callback = Dataeast.video_update_pcktgal;
|
||||
video_eof_callback = Dataeast.video_eof_pcktgal;
|
||||
switch (Machine.sName)
|
||||
@ -187,10 +190,13 @@ namespace MAME.Core
|
||||
frame_update_time = new Atime(0, (long)(1e18 / 60));
|
||||
screenstate.vblank_period = 0;
|
||||
video_attributes = 0;
|
||||
bitmapGDI = new Bitmap(Video.fullwidth, Video.fullheight);
|
||||
Motion.motion_update_callback = Motion.ui_updateTehkan;
|
||||
bitmapbase = new ushort[2][];
|
||||
bitmapbase[0] = new ushort[0x100 * 0x100];
|
||||
bitmapbase[1] = new ushort[0x100 * 0x100];
|
||||
bbmp = new Bitmap[1];
|
||||
bbmp[0] = new Bitmap(256, 256);
|
||||
video_update_callback = Tehkan.video_update_pbaction;
|
||||
video_eof_callback = Tehkan.video_eof_pbaction;
|
||||
break;
|
||||
@ -210,6 +216,8 @@ namespace MAME.Core
|
||||
bitmapbaseN = new int[2][];
|
||||
bitmapbaseN[0] = new int[384 * 264];
|
||||
bitmapbaseN[1] = new int[384 * 264];
|
||||
bbmp = new Bitmap[1];
|
||||
bbmp[0] = new Bitmap(320, 224);
|
||||
video_update_callback = Neogeo.video_update_neogeo;
|
||||
video_eof_callback = Neogeo.video_eof_neogeo;
|
||||
break;
|
||||
@ -229,6 +237,8 @@ namespace MAME.Core
|
||||
bitmapbase = new ushort[2][];
|
||||
bitmapbase[0] = new ushort[0x100 * 0x100];
|
||||
bitmapbase[1] = new ushort[0x100 * 0x100];
|
||||
bbmp = new Bitmap[1];
|
||||
bbmp[0] = new Bitmap(256, 224);
|
||||
video_update_callback = SunA8.video_update_suna8;
|
||||
video_eof_callback = SunA8.video_eof_suna8;
|
||||
break;
|
||||
@ -245,9 +255,13 @@ namespace MAME.Core
|
||||
screenstate.vblank_period = 0;
|
||||
video_attributes = 0;
|
||||
Motion.motion_update_callback = Motion.ui_updateNa;
|
||||
bitmapGDI = new Bitmap(Video.fullwidth, Video.fullheight);
|
||||
bitmapbase = new ushort[2][];
|
||||
bitmapbase[0] = new ushort[0x200 * 0x200];
|
||||
bitmapbase[1] = new ushort[0x200 * 0x200];
|
||||
bbmp = new Bitmap[2];
|
||||
bbmp[0] = new Bitmap(512, 512);
|
||||
bbmp[1] = new Bitmap(288, 224);
|
||||
video_update_callback = Namcos1.video_update_namcos1;
|
||||
video_eof_callback = Namcos1.video_eof_namcos1;
|
||||
break;
|
||||
@ -264,9 +278,12 @@ namespace MAME.Core
|
||||
screenstate.vblank_period = 0;
|
||||
video_attributes = 0;
|
||||
Motion.motion_update_callback = Motion.ui_updateIGS011;
|
||||
bitmapGDI = new Bitmap(Video.fullwidth, Video.fullheight);
|
||||
bitmapbase = new ushort[2][];
|
||||
bitmapbase[0] = new ushort[0x200 * 0x200];
|
||||
bitmapbase[1] = new ushort[0x200 * 0x200];
|
||||
bbmp = new Bitmap[1];
|
||||
bbmp[0] = new Bitmap(512, 240);
|
||||
video_update_callback = IGS011.video_update_igs011;
|
||||
video_eof_callback = IGS011.video_eof_igs011;
|
||||
break;
|
||||
@ -283,9 +300,12 @@ namespace MAME.Core
|
||||
screenstate.vblank_period = 0;
|
||||
video_attributes = 0;
|
||||
Motion.motion_update_callback = Motion.ui_updatePGM;
|
||||
bitmapGDI = new Bitmap(Video.fullwidth, Video.fullheight);
|
||||
bitmapbase = new ushort[2][];
|
||||
bitmapbase[0] = new ushort[0x200 * 0x200];
|
||||
bitmapbase[1] = new ushort[0x200 * 0x200];
|
||||
bbmp = new Bitmap[1];
|
||||
bbmp[0] = new Bitmap(448, 224);
|
||||
video_update_callback = PGM.video_update_pgm;
|
||||
video_eof_callback = PGM.video_eof_pgm;
|
||||
break;
|
||||
@ -305,6 +325,8 @@ namespace MAME.Core
|
||||
bitmapbase = new ushort[2][];
|
||||
bitmapbase[0] = new ushort[0x200 * 0x200];//0x11c
|
||||
bitmapbase[1] = new ushort[0x200 * 0x200];//0x11c
|
||||
bbmp = new Bitmap[1];
|
||||
bbmp[0] = new Bitmap(512, 284);
|
||||
video_update_callback = M72.video_update_m72;
|
||||
video_eof_callback = M72.video_eof_m72;
|
||||
break;
|
||||
@ -324,6 +346,8 @@ namespace MAME.Core
|
||||
bitmapbase = new ushort[2][];
|
||||
bitmapbase[0] = new ushort[0x200 * 0x200];
|
||||
bitmapbase[1] = new ushort[0x200 * 0x200];
|
||||
bbmp = new Bitmap[1];
|
||||
bbmp[0] = new Bitmap(0x200, 0x100);
|
||||
video_update_callback = M92.video_update_m92;
|
||||
video_eof_callback = M92.video_eof_m92;
|
||||
break;
|
||||
@ -367,6 +391,8 @@ namespace MAME.Core
|
||||
bitmapbase = new ushort[2][];
|
||||
bitmapbase[0] = new ushort[0x100 * 0x100];
|
||||
bitmapbase[1] = new ushort[0x100 * 0x100];
|
||||
bbmp = new Bitmap[1];
|
||||
bbmp[0] = new Bitmap(256, 224);
|
||||
video_update_callback = Taito.video_update_bublbobl;
|
||||
video_eof_callback = Taito.video_eof_taito;
|
||||
break;
|
||||
@ -389,6 +415,8 @@ namespace MAME.Core
|
||||
bitmapbase = new ushort[2][];
|
||||
bitmapbase[0] = new ushort[0x140 * 0x100];
|
||||
bitmapbase[1] = new ushort[0x140 * 0x100];
|
||||
bbmp = new Bitmap[1];
|
||||
bbmp[0] = new Bitmap(320, 240);
|
||||
video_update_callback = Taito.video_update_opwolf;
|
||||
video_eof_callback = Taito.video_eof_taito;
|
||||
break;
|
||||
@ -410,6 +438,8 @@ namespace MAME.Core
|
||||
bitmapbase = new ushort[2][];
|
||||
bitmapbase[0] = new ushort[0x200 * 0x100];
|
||||
bitmapbase[1] = new ushort[0x200 * 0x100];
|
||||
bbmp = new Bitmap[1];
|
||||
bbmp[0] = new Bitmap(320, 224);
|
||||
video_update_callback = Taitob.video_update_taitob;
|
||||
video_eof_callback = Taitob.video_eof_taitob;
|
||||
break;
|
||||
@ -425,6 +455,8 @@ namespace MAME.Core
|
||||
bitmapbase = new ushort[2][];
|
||||
bitmapbase[0] = new ushort[0x200 * 0x100];
|
||||
bitmapbase[1] = new ushort[0x200 * 0x100];
|
||||
bbmp = new Bitmap[1];
|
||||
bbmp[0] = new Bitmap(288, 224);
|
||||
video_eof_callback = Konami68000.video_eof;
|
||||
switch (Machine.sName)
|
||||
{
|
||||
@ -575,6 +607,8 @@ namespace MAME.Core
|
||||
bitmapbase = new ushort[2][];
|
||||
bitmapbase[0] = new ushort[0x100 * 0x100];
|
||||
bitmapbase[1] = new ushort[0x100 * 0x100];
|
||||
bbmp = new Bitmap[1];
|
||||
bbmp[0] = new Bitmap(256, 224);
|
||||
video_update_callback = Capcom.video_update_gng;
|
||||
video_eof_callback = Capcom.video_eof_gng;
|
||||
break;
|
||||
@ -599,6 +633,8 @@ namespace MAME.Core
|
||||
bitmapbase = new ushort[2][];
|
||||
bitmapbase[0] = new ushort[0x200 * 0x100];
|
||||
bitmapbase[1] = new ushort[0x200 * 0x100];
|
||||
bbmp = new Bitmap[1];
|
||||
bbmp[0] = new Bitmap(384, 224);
|
||||
video_update_callback = Capcom.video_update_sf;
|
||||
video_eof_callback = Capcom.video_eof;
|
||||
break;
|
||||
@ -609,53 +645,13 @@ namespace MAME.Core
|
||||
screenstate.scantime = screenstate.frame_period / screenstate.height;
|
||||
screenstate.pixeltime = screenstate.frame_period / (screenstate.height * screenstate.width);
|
||||
screenstate.frame_number = 0;
|
||||
|
||||
|
||||
//bitmapcolor = new int[Video.fullwidth * Video.fullheight];
|
||||
/** bitmapcolor的指针管理 **/
|
||||
//不再拷贝完整画布
|
||||
//if (bitmapcolor != null)
|
||||
//{
|
||||
// // 释放句柄
|
||||
// if (bitmapcolor_handle.IsAllocated)
|
||||
// {
|
||||
// bitmapcolor_handle.Free();
|
||||
// }
|
||||
//}
|
||||
//bitmapcolor = new int[Video.fullwidth * Video.fullheight];
|
||||
//// 固定数组,防止垃圾回收器移动它
|
||||
//bitmapcolor_handle = GCHandle.Alloc(bitmapcolor, GCHandleType.Pinned);
|
||||
//// 获取数组的指针
|
||||
//bitmapcolor_Ptr = bitmapcolor_handle.AddrOfPinnedObject();
|
||||
|
||||
|
||||
|
||||
|
||||
if (bitmapcolorRect != null)
|
||||
{
|
||||
// 释放句柄
|
||||
if (bitmapcolorRect_handle.IsAllocated)
|
||||
{
|
||||
bitmapcolorRect_handle.Free();
|
||||
}
|
||||
}
|
||||
bitmapcolorRect = new int[width * height];
|
||||
// 固定数组,防止垃圾回收器移动它
|
||||
bitmapcolorRect_handle = GCHandle.Alloc(bitmapcolorRect, GCHandleType.Pinned);
|
||||
// 获取数组的指针
|
||||
bitmapcolorRect_Ptr = bitmapcolorRect_handle.AddrOfPinnedObject();
|
||||
|
||||
/** end **/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
vblank_begin_timer = EmuTimer.timer_alloc_common(vblank_begin_callback, "vblank_begin_callback", false);
|
||||
EmuTimer.timer_adjust_periodic(vblank_begin_timer, video_screen_get_time_until_vblank_start(), Attotime.ATTOTIME_NEVER);
|
||||
scanline0_timer = EmuTimer.timer_alloc_common(scanline0_callback, "scanline0_callback", false);
|
||||
EmuTimer.timer_adjust_periodic(scanline0_timer, video_screen_get_time_until_pos(0, 0), Attotime.ATTOTIME_NEVER);
|
||||
vblank_end_timer = EmuTimer.timer_alloc_common(vblank_end_callback, "vblank_end_callback", false);
|
||||
bitmapGDI = new Bitmap(Video.fullwidth, Video.fullheight);
|
||||
bitmapcolor = new int[Video.fullwidth * Video.fullheight];
|
||||
vblank_begin_timer = Timer.timer_alloc_common(vblank_begin_callback, "vblank_begin_callback", false);
|
||||
Timer.timer_adjust_periodic(vblank_begin_timer, video_screen_get_time_until_vblank_start(), Attotime.ATTOTIME_NEVER);
|
||||
scanline0_timer = Timer.timer_alloc_common(scanline0_callback, "scanline0_callback", false);
|
||||
Timer.timer_adjust_periodic(scanline0_timer, video_screen_get_time_until_pos(0, 0), Attotime.ATTOTIME_NEVER);
|
||||
vblank_end_timer = Timer.timer_alloc_common(vblank_end_callback, "vblank_end_callback", false);
|
||||
switch (Machine.sBoard)
|
||||
{
|
||||
case "CPS-1":
|
||||
@ -666,19 +662,19 @@ namespace MAME.Core
|
||||
break;
|
||||
case "CPS2":
|
||||
Cpuexec.cpu[0].partial_frame_period = Attotime.attotime_div(Video.frame_update_time, 262);
|
||||
Cpuexec.cpu[0].partial_frame_timer = EmuTimer.timer_alloc_common(Cpuexec.trigger_partial_frame_interrupt, "trigger_partial_frame_interrupt", false);
|
||||
Cpuexec.cpu[0].partial_frame_timer = Timer.timer_alloc_common(Cpuexec.trigger_partial_frame_interrupt, "trigger_partial_frame_interrupt", false);
|
||||
break;
|
||||
case "Tehkan":
|
||||
Cpuexec.cpu[1].partial_frame_period = Attotime.attotime_div(Video.frame_update_time, 2);
|
||||
Cpuexec.cpu[1].partial_frame_timer = EmuTimer.timer_alloc_common(Cpuexec.trigger_partial_frame_interrupt, "trigger_partial_frame_interrupt", false);
|
||||
Cpuexec.cpu[1].partial_frame_timer = Timer.timer_alloc_common(Cpuexec.trigger_partial_frame_interrupt, "trigger_partial_frame_interrupt", false);
|
||||
break;
|
||||
case "Neo Geo":
|
||||
break;
|
||||
case "SunA8":
|
||||
Cpuexec.cpu[0].partial_frame_period = Attotime.attotime_div(Video.frame_update_time, 0x100);
|
||||
Cpuexec.cpu[0].partial_frame_timer = EmuTimer.timer_alloc_common(Cpuexec.trigger_partial_frame_interrupt, "trigger_partial_frame_interrupt", false);
|
||||
Cpuexec.cpu[0].partial_frame_timer = Timer.timer_alloc_common(Cpuexec.trigger_partial_frame_interrupt, "trigger_partial_frame_interrupt", false);
|
||||
Cpuexec.cpu[1].partial_frame_period = Attotime.attotime_div(Video.frame_update_time, 4);
|
||||
Cpuexec.cpu[1].partial_frame_timer = EmuTimer.timer_alloc_common(Cpuexec.trigger2, "trigger2", false);
|
||||
Cpuexec.cpu[1].partial_frame_timer = Timer.timer_alloc_common(Cpuexec.trigger2, "trigger2", false);
|
||||
break;
|
||||
case "IGS011":
|
||||
switch (Machine.sName)
|
||||
@ -693,27 +689,27 @@ namespace MAME.Core
|
||||
case "drgnwrldv40k":
|
||||
case "lhb2":
|
||||
Cpuexec.cpu[0].partial_frame_period = Attotime.attotime_div(Video.frame_update_time, 5);
|
||||
Cpuexec.cpu[0].partial_frame_timer = EmuTimer.timer_alloc_common(Cpuexec.trigger_partial_frame_interrupt, "trigger_partial_frame_interrupt", false);
|
||||
Cpuexec.cpu[0].partial_frame_timer = Timer.timer_alloc_common(Cpuexec.trigger_partial_frame_interrupt, "trigger_partial_frame_interrupt", false);
|
||||
break;
|
||||
case "lhb":
|
||||
case "lhbv33c":
|
||||
case "dbc":
|
||||
case "ryukobou":
|
||||
Cpuexec.cpu[0].partial_frame_period = Attotime.attotime_div(Video.frame_update_time, 4);
|
||||
Cpuexec.cpu[0].partial_frame_timer = EmuTimer.timer_alloc_common(Cpuexec.trigger_partial_frame_interrupt, "trigger_partial_frame_interrupt", false);
|
||||
Cpuexec.cpu[0].partial_frame_timer = Timer.timer_alloc_common(Cpuexec.trigger_partial_frame_interrupt, "trigger_partial_frame_interrupt", false);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case "M72":
|
||||
Cpuexec.cpu[1].partial_frame_period = Attotime.attotime_div(Video.frame_update_time, 128);
|
||||
Cpuexec.cpu[1].partial_frame_timer = EmuTimer.timer_alloc_common(Cpuexec.trigger_partial_frame_interrupt, "trigger_partial_frame_interrupt", false);
|
||||
Cpuexec.cpu[1].partial_frame_timer = Timer.timer_alloc_common(Cpuexec.trigger_partial_frame_interrupt, "trigger_partial_frame_interrupt", false);
|
||||
break;
|
||||
case "Taito":
|
||||
switch (Machine.sName)
|
||||
{
|
||||
case "bub68705":
|
||||
Cpuexec.cpu[3].partial_frame_period = Attotime.attotime_div(Video.frame_update_time, 2);
|
||||
Cpuexec.cpu[3].partial_frame_timer = EmuTimer.timer_alloc_common(Cpuexec.trigger_partial_frame_interrupt, "trigger_partial_frame_interrupt", false);
|
||||
Cpuexec.cpu[3].partial_frame_timer = Timer.timer_alloc_common(Cpuexec.trigger_partial_frame_interrupt, "trigger_partial_frame_interrupt", false);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@ -722,7 +718,7 @@ namespace MAME.Core
|
||||
{
|
||||
case "cuebrick":
|
||||
Cpuexec.cpu[0].partial_frame_period = Attotime.attotime_div(Video.frame_update_time, 10);
|
||||
Cpuexec.cpu[0].partial_frame_timer = EmuTimer.timer_alloc_common(Cpuexec.trigger_partial_frame_interrupt, "trigger_partial_frame_interrupt", false);
|
||||
Cpuexec.cpu[0].partial_frame_timer = Timer.timer_alloc_common(Cpuexec.trigger_partial_frame_interrupt, "trigger_partial_frame_interrupt", false);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@ -741,7 +737,7 @@ namespace MAME.Core
|
||||
case "makaimurg":
|
||||
case "diamond":
|
||||
Cpuexec.cpu[1].partial_frame_period = Attotime.attotime_div(Video.frame_update_time, 4);
|
||||
Cpuexec.cpu[1].partial_frame_timer = EmuTimer.timer_alloc_common(Cpuexec.trigger_partial_frame_interrupt, "trigger_partial_frame_interrupt", false);
|
||||
Cpuexec.cpu[1].partial_frame_timer = Timer.timer_alloc_common(Cpuexec.trigger_partial_frame_interrupt, "trigger_partial_frame_interrupt", false);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@ -791,7 +787,7 @@ namespace MAME.Core
|
||||
}
|
||||
public static int video_screen_get_vpos()
|
||||
{
|
||||
long delta = Attotime.attotime_to_attoseconds(Attotime.attotime_sub(EmuTimer.get_current_time(), screenstate.vblank_start_time));
|
||||
long delta = Attotime.attotime_to_attoseconds(Attotime.attotime_sub(Timer.get_current_time(), screenstate.vblank_start_time));
|
||||
int vpos;
|
||||
delta += screenstate.pixeltime / 2;
|
||||
vpos = (int)(delta / screenstate.scantime);
|
||||
@ -799,11 +795,11 @@ namespace MAME.Core
|
||||
}
|
||||
public static bool video_screen_get_vblank()
|
||||
{
|
||||
return (Attotime.attotime_compare(EmuTimer.get_current_time(), screenstate.vblank_end_time) < 0);
|
||||
return (Attotime.attotime_compare(Timer.get_current_time(), screenstate.vblank_end_time) < 0);
|
||||
}
|
||||
public static Atime video_screen_get_time_until_pos(int vpos, int hpos)
|
||||
{
|
||||
long curdelta = Attotime.attotime_to_attoseconds(Attotime.attotime_sub(EmuTimer.get_current_time(), screenstate.vblank_start_time));
|
||||
long curdelta = Attotime.attotime_to_attoseconds(Attotime.attotime_sub(Timer.get_current_time(), screenstate.vblank_start_time));
|
||||
long targetdelta;
|
||||
vpos += screenstate.height - (screenstate.visarea.max_y + 1);
|
||||
vpos %= screenstate.height;
|
||||
@ -821,7 +817,7 @@ namespace MAME.Core
|
||||
public static Atime video_screen_get_time_until_vblank_end()
|
||||
{
|
||||
Atime ret;
|
||||
Atime current_time = EmuTimer.get_current_time();
|
||||
Atime current_time = Timer.get_current_time();
|
||||
if (video_screen_get_vblank())
|
||||
{
|
||||
ret = Attotime.attotime_sub(screenstate.vblank_end_time, current_time);
|
||||
@ -842,21 +838,21 @@ namespace MAME.Core
|
||||
}
|
||||
public static void vblank_begin_callback()
|
||||
{
|
||||
screenstate.vblank_start_time = EmuTimer.global_basetime;// Timer.get_current_time();
|
||||
screenstate.vblank_start_time = Timer.global_basetime;// Timer.get_current_time();
|
||||
screenstate.vblank_end_time = Attotime.attotime_add_attoseconds(screenstate.vblank_start_time, screenstate.vblank_period);
|
||||
Cpuexec.on_vblank();
|
||||
if ((video_attributes & VIDEO_UPDATE_AFTER_VBLANK) == 0)
|
||||
{
|
||||
video_frame_update();
|
||||
}
|
||||
EmuTimer.timer_adjust_periodic(vblank_begin_timer, video_screen_get_time_until_vblank_start(), Attotime.ATTOTIME_NEVER);
|
||||
Timer.timer_adjust_periodic(vblank_begin_timer, video_screen_get_time_until_vblank_start(), Attotime.ATTOTIME_NEVER);
|
||||
if (screenstate.vblank_period == 0)
|
||||
{
|
||||
vblank_end_callback();
|
||||
}
|
||||
else
|
||||
{
|
||||
EmuTimer.timer_adjust_periodic(vblank_end_timer, video_screen_get_time_until_vblank_end(), Attotime.ATTOTIME_NEVER);
|
||||
Timer.timer_adjust_periodic(vblank_end_timer, video_screen_get_time_until_vblank_end(), Attotime.ATTOTIME_NEVER);
|
||||
}
|
||||
}
|
||||
public static void vblank_end_callback()
|
||||
@ -870,7 +866,7 @@ namespace MAME.Core
|
||||
public static void scanline0_callback()
|
||||
{
|
||||
screenstate.last_partial_scan = 0;
|
||||
EmuTimer.timer_adjust_periodic(scanline0_timer, video_screen_get_time_until_pos(0, 0), Attotime.ATTOTIME_NEVER);
|
||||
Timer.timer_adjust_periodic(scanline0_timer, video_screen_get_time_until_pos(0, 0), Attotime.ATTOTIME_NEVER);
|
||||
}
|
||||
public static void scanline_update_callback()
|
||||
{
|
||||
@ -882,11 +878,11 @@ namespace MAME.Core
|
||||
scanline = screenstate.visarea.min_y;
|
||||
}
|
||||
scanline_param = scanline;
|
||||
EmuTimer.timer_adjust_periodic(scanline_timer, video_screen_get_time_until_pos(scanline, 0), Attotime.ATTOTIME_NEVER);
|
||||
Timer.timer_adjust_periodic(scanline_timer, video_screen_get_time_until_pos(scanline, 0), Attotime.ATTOTIME_NEVER);
|
||||
}
|
||||
public static void video_frame_update()
|
||||
{
|
||||
Atime current_time = EmuTimer.global_basetime;
|
||||
Atime current_time = Timer.global_basetime;
|
||||
if (!Mame.paused)
|
||||
{
|
||||
finish_screen_updates();
|
||||
@ -895,9 +891,9 @@ namespace MAME.Core
|
||||
Mouse.Update();
|
||||
Inptport.frame_update_callback();
|
||||
Motion.ui_update_and_render();
|
||||
if (Machine.mainMotion.cheatmotion.lockState == CheatMotion.LockState.LOCK_FRAME)
|
||||
if (Machine.FORM.cheatmotion.lockState == MAME.Core.Common.cheatMotion.LockState.LOCK_FRAME)
|
||||
{
|
||||
Machine.mainMotion.cheatmotion.ApplyCheat();
|
||||
Machine.FORM.cheatmotion.ApplyCheat();
|
||||
}
|
||||
GDIDraw();
|
||||
if (effective_throttle())
|
||||
|
@ -1,13 +1,13 @@
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public class Watchdog
|
||||
{
|
||||
public static bool watchdog_enabled;
|
||||
public static EmuTimer.emu_timer watchdog_timer;
|
||||
public static Timer.emu_timer watchdog_timer;
|
||||
public static Atime watchdog_time;
|
||||
public static void watchdog_init()
|
||||
{
|
||||
watchdog_timer = EmuTimer.timer_alloc_common(watchdog_callback, "watchdog_callback", false);
|
||||
watchdog_timer = Timer.timer_alloc_common(watchdog_callback, "watchdog_callback", false);
|
||||
switch (Machine.sBoard)
|
||||
{
|
||||
case "CPS-1":
|
||||
@ -45,15 +45,15 @@
|
||||
{
|
||||
if (!watchdog_enabled)
|
||||
{
|
||||
EmuTimer.timer_adjust_periodic(watchdog_timer, Attotime.ATTOTIME_NEVER, Attotime.ATTOTIME_NEVER);
|
||||
Timer.timer_adjust_periodic(watchdog_timer, Attotime.ATTOTIME_NEVER, Attotime.ATTOTIME_NEVER);
|
||||
}
|
||||
else if (Attotime.attotime_compare(watchdog_time, Attotime.ATTOTIME_ZERO) != 0)
|
||||
{
|
||||
EmuTimer.timer_adjust_periodic(watchdog_timer, watchdog_time, Attotime.ATTOTIME_NEVER);
|
||||
Timer.timer_adjust_periodic(watchdog_timer, watchdog_time, Attotime.ATTOTIME_NEVER);
|
||||
}
|
||||
else
|
||||
{
|
||||
EmuTimer.timer_adjust_periodic(watchdog_timer, new Atime(3, 0), Attotime.ATTOTIME_NEVER);
|
||||
Timer.timer_adjust_periodic(watchdog_timer, new Atime(3, 0), Attotime.ATTOTIME_NEVER);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,10 @@
|
||||
namespace MAME.Core
|
||||
using MAME.Core.Common;
|
||||
|
||||
namespace mame
|
||||
{
|
||||
public class Window
|
||||
{
|
||||
private static MameMainMotion _myParentForm;
|
||||
private static mainMotion _myParentForm;
|
||||
//[DllImport("kernel32.dll ")]
|
||||
//private static extern uint GetTickCount();
|
||||
|
||||
@ -45,8 +47,9 @@
|
||||
}
|
||||
winwindow_process_events(true);
|
||||
}
|
||||
public static void osd_init()
|
||||
public static void osd_init(mainMotion form)
|
||||
{
|
||||
_myParentForm = form;
|
||||
wininput_init();
|
||||
}
|
||||
public static void wininput_init()
|
||||
|
@ -1,7 +1,7 @@
|
||||
using System.Diagnostics;
|
||||
using System.Threading;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public class Wintime
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
using cpu.m68000;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public partial class Capcom
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public partial class Drawgfx
|
||||
{
|
||||
|
12
MAME.Core/mame/capcom/Gdi.cs
Normal file
12
MAME.Core/mame/capcom/Gdi.cs
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
namespace mame
|
||||
{
|
||||
public partial class Capcom
|
||||
{
|
||||
public static bool bBg, bFg, bTx, bSprite;
|
||||
public static void GDIInit()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public partial class Capcom
|
||||
{
|
||||
|
@ -1,12 +1,12 @@
|
||||
using MAME.Core;
|
||||
using MAME.Core.run_interface;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public partial class Capcom
|
||||
{
|
||||
public static void loop_inputports_gng()
|
||||
{
|
||||
if (Keyboard.IsPressed(MotionKey.P1_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D5))
|
||||
if (Keyboard.IsPressed(Key.D5))
|
||||
{
|
||||
bytes &= unchecked((byte)~0x40);
|
||||
}
|
||||
@ -14,7 +14,7 @@ namespace MAME.Core
|
||||
{
|
||||
bytes |= 0x40;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D6))
|
||||
if (Keyboard.IsPressed(Key.D6))
|
||||
{
|
||||
bytes &= unchecked((byte)~0x80);
|
||||
}
|
||||
@ -22,7 +22,7 @@ namespace MAME.Core
|
||||
{
|
||||
bytes |= 0x80;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_GAMESTART))//if (Keyboard.IsPressed(Corekey.D1))
|
||||
if (Keyboard.IsPressed(Key.D1))
|
||||
{
|
||||
bytes &= unchecked((byte)~0x01);
|
||||
}
|
||||
@ -30,7 +30,7 @@ namespace MAME.Core
|
||||
{
|
||||
bytes |= 0x01;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_GAMESTART))//if (Keyboard.IsPressed(Corekey.D2))
|
||||
if (Keyboard.IsPressed(Key.D2))
|
||||
{
|
||||
bytes &= unchecked((byte)~0x02);
|
||||
}
|
||||
@ -38,7 +38,7 @@ namespace MAME.Core
|
||||
{
|
||||
bytes |= 0x02;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_RIGHT))//if (Keyboard.IsPressed(Corekey.D))
|
||||
if (Keyboard.IsPressed(Key.D))
|
||||
{
|
||||
byte1 &= unchecked((byte)~0x01);
|
||||
}
|
||||
@ -46,7 +46,7 @@ namespace MAME.Core
|
||||
{
|
||||
byte1 |= 0x01;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_LEFT))//if (Keyboard.IsPressed(Corekey.A))
|
||||
if (Keyboard.IsPressed(Key.A))
|
||||
{
|
||||
byte1 &= unchecked((byte)~0x02);
|
||||
}
|
||||
@ -54,7 +54,7 @@ namespace MAME.Core
|
||||
{
|
||||
byte1 |= 0x02;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_DOWN))//if (Keyboard.IsPressed(Corekey.S))
|
||||
if (Keyboard.IsPressed(Key.S))
|
||||
{
|
||||
byte1 &= unchecked((byte)~0x04);
|
||||
}
|
||||
@ -62,7 +62,7 @@ namespace MAME.Core
|
||||
{
|
||||
byte1 |= 0x04;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_UP))//if (Keyboard.IsPressed(Corekey.W))
|
||||
if (Keyboard.IsPressed(Key.W))
|
||||
{
|
||||
byte1 &= unchecked((byte)~0x08);
|
||||
}
|
||||
@ -70,7 +70,7 @@ namespace MAME.Core
|
||||
{
|
||||
byte1 |= 0x08;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_BTN_1))//if (Keyboard.IsPressed(Corekey.J))
|
||||
if (Keyboard.IsPressed(Key.J))
|
||||
{
|
||||
byte1 &= unchecked((byte)~0x10);
|
||||
}
|
||||
@ -78,7 +78,7 @@ namespace MAME.Core
|
||||
{
|
||||
byte1 |= 0x10;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_BTN_2))//if (Keyboard.IsPressed(Corekey.K))
|
||||
if (Keyboard.IsPressed(Key.K))
|
||||
{
|
||||
byte1 &= unchecked((byte)~0x20);
|
||||
}
|
||||
@ -86,7 +86,7 @@ namespace MAME.Core
|
||||
{
|
||||
byte1 |= 0x20;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_RIGHT))//if (Keyboard.IsPressed(Corekey.Right))
|
||||
if (Keyboard.IsPressed(Key.Right))
|
||||
{
|
||||
byte2 &= unchecked((byte)~0x01);
|
||||
}
|
||||
@ -94,7 +94,7 @@ namespace MAME.Core
|
||||
{
|
||||
byte2 |= 0x01;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_LEFT))//if (Keyboard.IsPressed(Corekey.Left))
|
||||
if (Keyboard.IsPressed(Key.Left))
|
||||
{
|
||||
byte2 &= unchecked((byte)~0x02);
|
||||
}
|
||||
@ -102,7 +102,7 @@ namespace MAME.Core
|
||||
{
|
||||
byte2 |= 0x02;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_DOWN)) //if (Keyboard.IsPressed(Corekey.Down))
|
||||
if (Keyboard.IsPressed(Key.Down))
|
||||
{
|
||||
byte2 &= unchecked((byte)~0x04);
|
||||
}
|
||||
@ -110,7 +110,7 @@ namespace MAME.Core
|
||||
{
|
||||
byte2 |= 0x04;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_UP))//if (Keyboard.IsPressed(Corekey.Up))
|
||||
if (Keyboard.IsPressed(Key.Up))
|
||||
{
|
||||
byte2 &= unchecked((byte)~0x08);
|
||||
}
|
||||
@ -118,7 +118,7 @@ namespace MAME.Core
|
||||
{
|
||||
byte2 |= 0x08;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_BTN_1))//if (Keyboard.IsPressed(Corekey.NumPad1))
|
||||
if (Keyboard.IsPressed(Key.NumPad1))
|
||||
{
|
||||
byte2 &= unchecked((byte)~0x10);
|
||||
}
|
||||
@ -126,7 +126,7 @@ namespace MAME.Core
|
||||
{
|
||||
byte2 |= 0x10;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_BTN_2))//if (Keyboard.IsPressed(Corekey.NumPad2))
|
||||
if (Keyboard.IsPressed(Key.NumPad2))
|
||||
{
|
||||
byte2 &= unchecked((byte)~0x20);
|
||||
}
|
||||
@ -134,7 +134,7 @@ namespace MAME.Core
|
||||
{
|
||||
byte2 |= 0x20;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.UNKNOW_R)) //if (Keyboard.IsPressed(Corekey.R))
|
||||
if (Keyboard.IsPressed(Key.R))
|
||||
{
|
||||
bytes &= unchecked((byte)~0x20);
|
||||
}
|
||||
@ -145,7 +145,7 @@ namespace MAME.Core
|
||||
}
|
||||
public static void loop_inputports_diamond()
|
||||
{
|
||||
if (Keyboard.IsPressed(MotionKey.P1_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D5))
|
||||
if (Keyboard.IsPressed(Key.D5))
|
||||
{
|
||||
bytes &= unchecked((byte)~0x40);
|
||||
}
|
||||
@ -153,7 +153,7 @@ namespace MAME.Core
|
||||
{
|
||||
bytes |= 0x40;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D6))
|
||||
if (Keyboard.IsPressed(Key.D6))
|
||||
{
|
||||
bytes &= unchecked((byte)~0x80);
|
||||
}
|
||||
@ -161,7 +161,7 @@ namespace MAME.Core
|
||||
{
|
||||
bytes |= 0x80;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_GAMESTART))//if (Keyboard.IsPressed(Corekey.D1))
|
||||
if (Keyboard.IsPressed(Key.D1))
|
||||
{
|
||||
bytes &= unchecked((byte)~0x01);
|
||||
}
|
||||
@ -169,7 +169,7 @@ namespace MAME.Core
|
||||
{
|
||||
bytes |= 0x01;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_GAMESTART))//if (Keyboard.IsPressed(Corekey.D2))
|
||||
if (Keyboard.IsPressed(Key.D2))
|
||||
{
|
||||
bytes &= unchecked((byte)~0x02);
|
||||
}
|
||||
@ -177,7 +177,7 @@ namespace MAME.Core
|
||||
{
|
||||
bytes |= 0x02;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_RIGHT))//if (Keyboard.IsPressed(Corekey.D))
|
||||
if (Keyboard.IsPressed(Key.D))
|
||||
{
|
||||
byte1 &= unchecked((byte)~0x01);
|
||||
}
|
||||
@ -185,7 +185,7 @@ namespace MAME.Core
|
||||
{
|
||||
byte1 |= 0x01;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_LEFT))//if (Keyboard.IsPressed(Corekey.A))
|
||||
if (Keyboard.IsPressed(Key.A))
|
||||
{
|
||||
byte1 &= unchecked((byte)~0x02);
|
||||
}
|
||||
@ -193,7 +193,7 @@ namespace MAME.Core
|
||||
{
|
||||
byte1 |= 0x02;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_DOWN))//if (Keyboard.IsPressed(Corekey.S))
|
||||
if (Keyboard.IsPressed(Key.S))
|
||||
{
|
||||
byte1 &= unchecked((byte)~0x04);
|
||||
}
|
||||
@ -201,7 +201,7 @@ namespace MAME.Core
|
||||
{
|
||||
byte1 |= 0x04;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_UP))//if (Keyboard.IsPressed(Corekey.W))
|
||||
if (Keyboard.IsPressed(Key.W))
|
||||
{
|
||||
byte1 &= unchecked((byte)~0x08);
|
||||
}
|
||||
@ -209,7 +209,7 @@ namespace MAME.Core
|
||||
{
|
||||
byte1 |= 0x08;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_BTN_1))//if (Keyboard.IsPressed(Corekey.J))
|
||||
if (Keyboard.IsPressed(Key.J))
|
||||
{
|
||||
byte1 &= unchecked((byte)~0x10);
|
||||
}
|
||||
@ -220,7 +220,7 @@ namespace MAME.Core
|
||||
}
|
||||
public static void loop_inputports_sfus()
|
||||
{
|
||||
if (Keyboard.IsPressed(MotionKey.P1_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D5))
|
||||
if (Keyboard.IsPressed(Key.D5))
|
||||
{
|
||||
short0 &= ~0x0001;
|
||||
}
|
||||
@ -228,7 +228,7 @@ namespace MAME.Core
|
||||
{
|
||||
short0 |= 0x0001;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D6))
|
||||
if (Keyboard.IsPressed(Key.D6))
|
||||
{
|
||||
short0 &= ~0x0002;
|
||||
}
|
||||
@ -236,7 +236,7 @@ namespace MAME.Core
|
||||
{
|
||||
short0 |= 0x0002;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_GAMESTART))//if (Keyboard.IsPressed(Corekey.D1))
|
||||
if (Keyboard.IsPressed(Key.D1))
|
||||
{
|
||||
shorts &= ~0x0001;
|
||||
}
|
||||
@ -244,7 +244,7 @@ namespace MAME.Core
|
||||
{
|
||||
shorts |= 0x0001;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_GAMESTART))//if (Keyboard.IsPressed(Corekey.D2))
|
||||
if (Keyboard.IsPressed(Key.D2))
|
||||
{
|
||||
shorts &= ~0x0002;
|
||||
}
|
||||
@ -252,7 +252,7 @@ namespace MAME.Core
|
||||
{
|
||||
shorts |= 0x0002;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_RIGHT))//if (Keyboard.IsPressed(Corekey.D))
|
||||
if (Keyboard.IsPressed(Key.D))
|
||||
{
|
||||
short1 &= ~0x0001;
|
||||
}
|
||||
@ -260,7 +260,7 @@ namespace MAME.Core
|
||||
{
|
||||
short1 |= 0x0001;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_LEFT))//if (Keyboard.IsPressed(Corekey.A))
|
||||
if (Keyboard.IsPressed(Key.A))
|
||||
{
|
||||
short1 &= ~0x0002;
|
||||
}
|
||||
@ -268,7 +268,7 @@ namespace MAME.Core
|
||||
{
|
||||
short1 |= 0x0002;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_DOWN))//if (Keyboard.IsPressed(Corekey.S))
|
||||
if (Keyboard.IsPressed(Key.S))
|
||||
{
|
||||
short1 &= ~0x0004;
|
||||
}
|
||||
@ -276,7 +276,7 @@ namespace MAME.Core
|
||||
{
|
||||
short1 |= 0x0004;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_UP))//if (Keyboard.IsPressed(Corekey.W))
|
||||
if (Keyboard.IsPressed(Key.W))
|
||||
{
|
||||
short1 &= ~0x0008;
|
||||
}
|
||||
@ -284,7 +284,7 @@ namespace MAME.Core
|
||||
{
|
||||
short1 |= 0x0008;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_BTN_1))//if (Keyboard.IsPressed(Corekey.J))
|
||||
if (Keyboard.IsPressed(Key.J))
|
||||
{
|
||||
short1 &= ~0x0010;
|
||||
}
|
||||
@ -292,7 +292,7 @@ namespace MAME.Core
|
||||
{
|
||||
short1 |= 0x0010;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_BTN_2))//if (Keyboard.IsPressed(Corekey.K))
|
||||
if (Keyboard.IsPressed(Key.K))
|
||||
{
|
||||
short1 &= ~0x0020;
|
||||
}
|
||||
@ -300,7 +300,7 @@ namespace MAME.Core
|
||||
{
|
||||
short1 |= 0x0020;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.L))
|
||||
if (Keyboard.IsPressed(Key.L))
|
||||
{
|
||||
short0 &= ~0x0200;
|
||||
}
|
||||
@ -308,7 +308,7 @@ namespace MAME.Core
|
||||
{
|
||||
short0 |= 0x0200;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_BTN_3))//if (Keyboard.IsPressed(Corekey.U))
|
||||
if (Keyboard.IsPressed(Key.U))
|
||||
{
|
||||
short1 &= ~0x0040;
|
||||
}
|
||||
@ -316,7 +316,7 @@ namespace MAME.Core
|
||||
{
|
||||
short1 |= 0x0040;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_BTN_4))//if (Keyboard.IsPressed(Corekey.I))
|
||||
if (Keyboard.IsPressed(Key.I))
|
||||
{
|
||||
short1 &= ~0x0080;
|
||||
}
|
||||
@ -324,7 +324,7 @@ namespace MAME.Core
|
||||
{
|
||||
short1 |= 0x0080;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.O))
|
||||
if (Keyboard.IsPressed(Key.O))
|
||||
{
|
||||
short0 &= ~0x0004;
|
||||
}
|
||||
@ -332,7 +332,7 @@ namespace MAME.Core
|
||||
{
|
||||
short0 |= 0x0004;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_RIGHT))//if (Keyboard.IsPressed(Corekey.Right))
|
||||
if (Keyboard.IsPressed(Key.Right))
|
||||
{
|
||||
short1 &= ~0x0100;
|
||||
}
|
||||
@ -340,7 +340,7 @@ namespace MAME.Core
|
||||
{
|
||||
short1 |= 0x0100;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_LEFT))//if (Keyboard.IsPressed(Corekey.Left))
|
||||
if (Keyboard.IsPressed(Key.Left))
|
||||
{
|
||||
short1 &= ~0x0200;
|
||||
}
|
||||
@ -348,7 +348,7 @@ namespace MAME.Core
|
||||
{
|
||||
short1 |= 0x0200;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_DOWN)) //if (Keyboard.IsPressed(Corekey.Down))
|
||||
if (Keyboard.IsPressed(Key.Down))
|
||||
{
|
||||
short1 &= ~0x0400;
|
||||
}
|
||||
@ -356,7 +356,7 @@ namespace MAME.Core
|
||||
{
|
||||
short1 |= 0x0400;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_UP))//if (Keyboard.IsPressed(Corekey.Up))
|
||||
if (Keyboard.IsPressed(Key.Up))
|
||||
{
|
||||
short1 &= ~0x0800;
|
||||
}
|
||||
@ -364,7 +364,7 @@ namespace MAME.Core
|
||||
{
|
||||
short1 |= 0x0800;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_BTN_1))//if (Keyboard.IsPressed(Corekey.NumPad1))
|
||||
if (Keyboard.IsPressed(Key.NumPad1))
|
||||
{
|
||||
short1 &= ~0x1000;
|
||||
}
|
||||
@ -372,7 +372,7 @@ namespace MAME.Core
|
||||
{
|
||||
short1 |= 0x1000;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_BTN_2))//if (Keyboard.IsPressed(Corekey.NumPad2))
|
||||
if (Keyboard.IsPressed(Key.NumPad2))
|
||||
{
|
||||
short1 &= ~0x2000;
|
||||
}
|
||||
@ -380,7 +380,7 @@ namespace MAME.Core
|
||||
{
|
||||
short1 |= 0x2000;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.NumPad3))
|
||||
if (Keyboard.IsPressed(Key.NumPad3))
|
||||
{
|
||||
short0 &= ~0x0400;
|
||||
}
|
||||
@ -388,7 +388,7 @@ namespace MAME.Core
|
||||
{
|
||||
short0 |= 0x0400;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_BTN_3))//if (Keyboard.IsPressed(Corekey.NumPad4))
|
||||
if (Keyboard.IsPressed(Key.NumPad4))
|
||||
{
|
||||
short1 &= ~0x4000;
|
||||
}
|
||||
@ -396,7 +396,7 @@ namespace MAME.Core
|
||||
{
|
||||
short1 |= 0x4000;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_BTN_4))//if (Keyboard.IsPressed(Corekey.NumPad5))
|
||||
if (Keyboard.IsPressed(Key.NumPad5))
|
||||
{
|
||||
short1 &= unchecked((short)~0x8000);
|
||||
}
|
||||
@ -404,7 +404,7 @@ namespace MAME.Core
|
||||
{
|
||||
short1 |= unchecked((short)0x8000);
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_UNKNOW_F))//if (Keyboard.IsPressed(Corekey.NumPad6))
|
||||
if (Keyboard.IsPressed(Key.NumPad6))
|
||||
{
|
||||
short0 &= ~0x0100;
|
||||
}
|
||||
@ -412,7 +412,7 @@ namespace MAME.Core
|
||||
{
|
||||
short0 |= 0x0100;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.UNKNOW_R)) //if (Keyboard.IsPressed(Corekey.R))
|
||||
if (Keyboard.IsPressed(Key.R))
|
||||
{
|
||||
shorts &= ~0x0004;
|
||||
}
|
||||
@ -420,7 +420,7 @@ namespace MAME.Core
|
||||
{
|
||||
shorts |= 0x0004;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.UNKNOW_T)) //if (Keyboard.IsPressed(Corekey.T))
|
||||
if (Keyboard.IsPressed(Key.T))
|
||||
{
|
||||
//sbyte0 &= ~0x40;
|
||||
}
|
||||
@ -431,7 +431,7 @@ namespace MAME.Core
|
||||
}
|
||||
public static void loop_inputports_sfjp()
|
||||
{
|
||||
if (Keyboard.IsPressed(MotionKey.P1_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D5))
|
||||
if (Keyboard.IsPressed(Key.D5))
|
||||
{
|
||||
shortc &= ~0x0001;
|
||||
}
|
||||
@ -439,7 +439,7 @@ namespace MAME.Core
|
||||
{
|
||||
shortc |= 0x0001;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D6))
|
||||
if (Keyboard.IsPressed(Key.D6))
|
||||
{
|
||||
shortc &= ~0x0002;
|
||||
}
|
||||
@ -447,7 +447,7 @@ namespace MAME.Core
|
||||
{
|
||||
shortc |= 0x0002;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_GAMESTART))//if (Keyboard.IsPressed(Corekey.D1))
|
||||
if (Keyboard.IsPressed(Key.D1))
|
||||
{
|
||||
shorts &= ~0x0001;
|
||||
}
|
||||
@ -455,7 +455,7 @@ namespace MAME.Core
|
||||
{
|
||||
shorts |= 0x0001;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_GAMESTART))//if (Keyboard.IsPressed(Corekey.D2))
|
||||
if (Keyboard.IsPressed(Key.D2))
|
||||
{
|
||||
shorts &= ~0x0002;
|
||||
}
|
||||
@ -463,7 +463,7 @@ namespace MAME.Core
|
||||
{
|
||||
shorts |= 0x0002;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_RIGHT))//if (Keyboard.IsPressed(Corekey.D))
|
||||
if (Keyboard.IsPressed(Key.D))
|
||||
{
|
||||
short1 &= ~0x0001;
|
||||
}
|
||||
@ -471,7 +471,7 @@ namespace MAME.Core
|
||||
{
|
||||
short1 |= 0x0001;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_LEFT))//if (Keyboard.IsPressed(Corekey.A))
|
||||
if (Keyboard.IsPressed(Key.A))
|
||||
{
|
||||
short1 &= ~0x0002;
|
||||
}
|
||||
@ -479,7 +479,7 @@ namespace MAME.Core
|
||||
{
|
||||
short1 |= 0x0002;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_DOWN))//if (Keyboard.IsPressed(Corekey.S))
|
||||
if (Keyboard.IsPressed(Key.S))
|
||||
{
|
||||
short1 &= ~0x0004;
|
||||
}
|
||||
@ -487,7 +487,7 @@ namespace MAME.Core
|
||||
{
|
||||
short1 |= 0x0004;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_UP))//if (Keyboard.IsPressed(Corekey.W))
|
||||
if (Keyboard.IsPressed(Key.W))
|
||||
{
|
||||
short1 &= ~0x0008;
|
||||
}
|
||||
@ -495,7 +495,7 @@ namespace MAME.Core
|
||||
{
|
||||
short1 |= 0x0008;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_BTN_1))//if (Keyboard.IsPressed(Corekey.J))
|
||||
if (Keyboard.IsPressed(Key.J))
|
||||
{
|
||||
short1 &= ~0x0100;
|
||||
}
|
||||
@ -503,7 +503,7 @@ namespace MAME.Core
|
||||
{
|
||||
short1 |= 0x0100;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_BTN_2))//if (Keyboard.IsPressed(Corekey.K))
|
||||
if (Keyboard.IsPressed(Key.K))
|
||||
{
|
||||
short1 &= ~0x0200;
|
||||
}
|
||||
@ -511,7 +511,7 @@ namespace MAME.Core
|
||||
{
|
||||
short1 |= 0x0200;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.L))
|
||||
if (Keyboard.IsPressed(Key.L))
|
||||
{
|
||||
short1 &= ~0x0400;
|
||||
}
|
||||
@ -519,7 +519,7 @@ namespace MAME.Core
|
||||
{
|
||||
short1 |= 0x0400;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_BTN_3))//if (Keyboard.IsPressed(Corekey.U))
|
||||
if (Keyboard.IsPressed(Key.U))
|
||||
{
|
||||
short1 &= ~0x1000;
|
||||
}
|
||||
@ -527,7 +527,7 @@ namespace MAME.Core
|
||||
{
|
||||
short1 |= 0x1000;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_BTN_4))//if (Keyboard.IsPressed(Corekey.I))
|
||||
if (Keyboard.IsPressed(Key.I))
|
||||
{
|
||||
short1 &= ~0x2000;
|
||||
}
|
||||
@ -535,7 +535,7 @@ namespace MAME.Core
|
||||
{
|
||||
short1 |= 0x2000;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.O))
|
||||
if (Keyboard.IsPressed(Key.O))
|
||||
{
|
||||
short1 &= ~0x4000;
|
||||
}
|
||||
@ -543,7 +543,7 @@ namespace MAME.Core
|
||||
{
|
||||
short1 |= 0x4000;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_RIGHT))//if (Keyboard.IsPressed(Corekey.Right))
|
||||
if (Keyboard.IsPressed(Key.Right))
|
||||
{
|
||||
short2 &= ~0x0001;
|
||||
}
|
||||
@ -551,7 +551,7 @@ namespace MAME.Core
|
||||
{
|
||||
short2 |= 0x0001;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_LEFT))//if (Keyboard.IsPressed(Corekey.Left))
|
||||
if (Keyboard.IsPressed(Key.Left))
|
||||
{
|
||||
short2 &= ~0x0002;
|
||||
}
|
||||
@ -559,7 +559,7 @@ namespace MAME.Core
|
||||
{
|
||||
short2 |= 0x0002;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_DOWN)) //if (Keyboard.IsPressed(Corekey.Down))
|
||||
if (Keyboard.IsPressed(Key.Down))
|
||||
{
|
||||
short2 &= ~0x0004;
|
||||
}
|
||||
@ -567,7 +567,7 @@ namespace MAME.Core
|
||||
{
|
||||
short2 |= 0x0004;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_UP))//if (Keyboard.IsPressed(Corekey.Up))
|
||||
if (Keyboard.IsPressed(Key.Up))
|
||||
{
|
||||
short2 &= ~0x0008;
|
||||
}
|
||||
@ -575,7 +575,7 @@ namespace MAME.Core
|
||||
{
|
||||
short2 |= 0x0008;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_BTN_1))//if (Keyboard.IsPressed(Corekey.NumPad1))
|
||||
if (Keyboard.IsPressed(Key.NumPad1))
|
||||
{
|
||||
short2 &= ~0x0100;
|
||||
}
|
||||
@ -583,7 +583,7 @@ namespace MAME.Core
|
||||
{
|
||||
short2 |= 0x0100;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_BTN_2))//if (Keyboard.IsPressed(Corekey.NumPad2))
|
||||
if (Keyboard.IsPressed(Key.NumPad2))
|
||||
{
|
||||
short2 &= ~0x0200;
|
||||
}
|
||||
@ -591,7 +591,7 @@ namespace MAME.Core
|
||||
{
|
||||
short2 |= 0x0200;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.NumPad3))
|
||||
if (Keyboard.IsPressed(Key.NumPad3))
|
||||
{
|
||||
short2 &= ~0x0400;
|
||||
}
|
||||
@ -599,7 +599,7 @@ namespace MAME.Core
|
||||
{
|
||||
short2 |= 0x0400;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_BTN_3))//if (Keyboard.IsPressed(Corekey.NumPad4))
|
||||
if (Keyboard.IsPressed(Key.NumPad4))
|
||||
{
|
||||
short2 &= ~0x1000;
|
||||
}
|
||||
@ -607,7 +607,7 @@ namespace MAME.Core
|
||||
{
|
||||
short2 |= 0x1000;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_BTN_4))//if (Keyboard.IsPressed(Corekey.NumPad5))
|
||||
if (Keyboard.IsPressed(Key.NumPad5))
|
||||
{
|
||||
short2 &= ~0x2000;
|
||||
}
|
||||
@ -615,7 +615,7 @@ namespace MAME.Core
|
||||
{
|
||||
short2 |= 0x2000;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_UNKNOW_F))//if (Keyboard.IsPressed(Corekey.NumPad6))
|
||||
if (Keyboard.IsPressed(Key.NumPad6))
|
||||
{
|
||||
short2 &= ~0x4000;
|
||||
}
|
||||
@ -623,7 +623,7 @@ namespace MAME.Core
|
||||
{
|
||||
short2 |= 0x4000;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.UNKNOW_R)) //if (Keyboard.IsPressed(Corekey.R))
|
||||
if (Keyboard.IsPressed(Key.R))
|
||||
{
|
||||
shorts &= ~0x0004;
|
||||
}
|
||||
@ -631,7 +631,7 @@ namespace MAME.Core
|
||||
{
|
||||
shorts |= 0x0004;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.UNKNOW_T)) //if (Keyboard.IsPressed(Corekey.T))
|
||||
if (Keyboard.IsPressed(Key.T))
|
||||
{
|
||||
//sbyte0 &= ~0x40;
|
||||
}
|
||||
@ -642,7 +642,7 @@ namespace MAME.Core
|
||||
}
|
||||
public static void loop_inputports_sfan()
|
||||
{
|
||||
if (Keyboard.IsPressed(MotionKey.P1_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D5))
|
||||
if (Keyboard.IsPressed(Key.D5))
|
||||
{
|
||||
shortc &= ~0x0001;
|
||||
}
|
||||
@ -650,7 +650,7 @@ namespace MAME.Core
|
||||
{
|
||||
shortc |= 0x0001;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D6))
|
||||
if (Keyboard.IsPressed(Key.D6))
|
||||
{
|
||||
shortc &= ~0x0002;
|
||||
}
|
||||
@ -658,7 +658,7 @@ namespace MAME.Core
|
||||
{
|
||||
shortc |= 0x0002;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_GAMESTART))//if (Keyboard.IsPressed(Corekey.D1))
|
||||
if (Keyboard.IsPressed(Key.D1))
|
||||
{
|
||||
shorts &= ~0x0001;
|
||||
}
|
||||
@ -666,7 +666,7 @@ namespace MAME.Core
|
||||
{
|
||||
shorts |= 0x0001;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_GAMESTART))//if (Keyboard.IsPressed(Corekey.D2))
|
||||
if (Keyboard.IsPressed(Key.D2))
|
||||
{
|
||||
shorts &= ~0x0002;
|
||||
}
|
||||
@ -674,7 +674,7 @@ namespace MAME.Core
|
||||
{
|
||||
shorts |= 0x0002;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_RIGHT))//if (Keyboard.IsPressed(Corekey.D))
|
||||
if (Keyboard.IsPressed(Key.D))
|
||||
{
|
||||
short0 &= ~0x0001;
|
||||
}
|
||||
@ -682,7 +682,7 @@ namespace MAME.Core
|
||||
{
|
||||
short0 |= 0x0001;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_LEFT))//if (Keyboard.IsPressed(Corekey.A))
|
||||
if (Keyboard.IsPressed(Key.A))
|
||||
{
|
||||
short0 &= ~0x0002;
|
||||
}
|
||||
@ -690,7 +690,7 @@ namespace MAME.Core
|
||||
{
|
||||
short0 |= 0x0002;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_DOWN))//if (Keyboard.IsPressed(Corekey.S))
|
||||
if (Keyboard.IsPressed(Key.S))
|
||||
{
|
||||
short0 &= ~0x0004;
|
||||
}
|
||||
@ -698,7 +698,7 @@ namespace MAME.Core
|
||||
{
|
||||
short0 |= 0x0004;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_UP))//if (Keyboard.IsPressed(Corekey.W))
|
||||
if (Keyboard.IsPressed(Key.W))
|
||||
{
|
||||
short0 &= ~0x0008;
|
||||
}
|
||||
@ -706,7 +706,7 @@ namespace MAME.Core
|
||||
{
|
||||
short0 |= 0x0008;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_BTN_1))//if (Keyboard.IsPressed(Corekey.J))
|
||||
if (Keyboard.IsPressed(Key.J))
|
||||
{
|
||||
sbyte1 |= 0x01;
|
||||
}
|
||||
@ -714,7 +714,7 @@ namespace MAME.Core
|
||||
{
|
||||
sbyte1 &= ~0x01;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_BTN_2))//if (Keyboard.IsPressed(Corekey.K))
|
||||
if (Keyboard.IsPressed(Key.K))
|
||||
{
|
||||
sbyte1 |= 0x02;
|
||||
}
|
||||
@ -722,7 +722,7 @@ namespace MAME.Core
|
||||
{
|
||||
sbyte1 &= ~0x02;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.L))
|
||||
if (Keyboard.IsPressed(Key.L))
|
||||
{
|
||||
sbyte1 |= 0x04;
|
||||
}
|
||||
@ -730,7 +730,7 @@ namespace MAME.Core
|
||||
{
|
||||
sbyte1 &= ~0x04;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_BTN_3))//if (Keyboard.IsPressed(Corekey.U))
|
||||
if (Keyboard.IsPressed(Key.U))
|
||||
{
|
||||
sbyte2 |= 0x01;
|
||||
}
|
||||
@ -738,7 +738,7 @@ namespace MAME.Core
|
||||
{
|
||||
sbyte2 &= ~0x01;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_BTN_4))//if (Keyboard.IsPressed(Corekey.I))
|
||||
if (Keyboard.IsPressed(Key.I))
|
||||
{
|
||||
sbyte2 |= 0x02;
|
||||
}
|
||||
@ -746,7 +746,7 @@ namespace MAME.Core
|
||||
{
|
||||
sbyte2 &= ~0x02;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.O))
|
||||
if (Keyboard.IsPressed(Key.O))
|
||||
{
|
||||
sbyte2 |= 0x04;
|
||||
}
|
||||
@ -754,7 +754,7 @@ namespace MAME.Core
|
||||
{
|
||||
sbyte2 &= ~0x04;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_RIGHT))//if (Keyboard.IsPressed(Corekey.Right))
|
||||
if (Keyboard.IsPressed(Key.Right))
|
||||
{
|
||||
short0 &= ~0x0100;
|
||||
}
|
||||
@ -762,7 +762,7 @@ namespace MAME.Core
|
||||
{
|
||||
short0 |= 0x0100;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_LEFT))//if (Keyboard.IsPressed(Corekey.Left))
|
||||
if (Keyboard.IsPressed(Key.Left))
|
||||
{
|
||||
short0 &= ~0x0200;
|
||||
}
|
||||
@ -770,7 +770,7 @@ namespace MAME.Core
|
||||
{
|
||||
short0 |= 0x0200;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_DOWN)) //if (Keyboard.IsPressed(Corekey.Down))
|
||||
if (Keyboard.IsPressed(Key.Down))
|
||||
{
|
||||
short0 &= ~0x0400;
|
||||
}
|
||||
@ -778,7 +778,7 @@ namespace MAME.Core
|
||||
{
|
||||
short0 |= 0x0400;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_UP))//if (Keyboard.IsPressed(Corekey.Up))
|
||||
if (Keyboard.IsPressed(Key.Up))
|
||||
{
|
||||
short0 &= ~0x0800;
|
||||
}
|
||||
@ -786,7 +786,7 @@ namespace MAME.Core
|
||||
{
|
||||
short0 |= 0x0800;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_BTN_1))//if (Keyboard.IsPressed(Corekey.NumPad1))
|
||||
if (Keyboard.IsPressed(Key.NumPad1))
|
||||
{
|
||||
sbyte3 |= 0x01;
|
||||
}
|
||||
@ -794,7 +794,7 @@ namespace MAME.Core
|
||||
{
|
||||
sbyte3 &= ~0x01;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_BTN_2))//if (Keyboard.IsPressed(Corekey.NumPad2))
|
||||
if (Keyboard.IsPressed(Key.NumPad2))
|
||||
{
|
||||
sbyte3 |= 0x02;
|
||||
}
|
||||
@ -802,7 +802,7 @@ namespace MAME.Core
|
||||
{
|
||||
sbyte3 &= ~0x02;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.NumPad3))
|
||||
if (Keyboard.IsPressed(Key.NumPad3))
|
||||
{
|
||||
sbyte3 |= 0x04;
|
||||
}
|
||||
@ -810,7 +810,7 @@ namespace MAME.Core
|
||||
{
|
||||
sbyte3 &= ~0x04;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_BTN_3))//if (Keyboard.IsPressed(Corekey.NumPad4))
|
||||
if (Keyboard.IsPressed(Key.NumPad4))
|
||||
{
|
||||
sbyte4 |= 0x01;
|
||||
}
|
||||
@ -818,7 +818,7 @@ namespace MAME.Core
|
||||
{
|
||||
sbyte4 &= ~0x01;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_BTN_4))//if (Keyboard.IsPressed(Corekey.NumPad5))
|
||||
if (Keyboard.IsPressed(Key.NumPad5))
|
||||
{
|
||||
sbyte4 &= ~0x02;
|
||||
}
|
||||
@ -826,7 +826,7 @@ namespace MAME.Core
|
||||
{
|
||||
sbyte4 |= 0x02;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_UNKNOW_F))//if (Keyboard.IsPressed(Corekey.NumPad6))
|
||||
if (Keyboard.IsPressed(Key.NumPad6))
|
||||
{
|
||||
sbyte4 |= 0x04;
|
||||
}
|
||||
@ -834,7 +834,7 @@ namespace MAME.Core
|
||||
{
|
||||
sbyte4 &= ~0x04;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.UNKNOW_R)) //if (Keyboard.IsPressed(Corekey.R))
|
||||
if (Keyboard.IsPressed(Key.R))
|
||||
{
|
||||
shorts &= ~0x0004;
|
||||
}
|
||||
@ -842,7 +842,7 @@ namespace MAME.Core
|
||||
{
|
||||
shorts |= 0x0004;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.UNKNOW_T)) //if (Keyboard.IsPressed(Corekey.T))
|
||||
if (Keyboard.IsPressed(Key.T))
|
||||
{
|
||||
//sbyte0 &= ~0x40;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
using cpu.z80;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public partial class Capcom
|
||||
{
|
||||
|
@ -3,7 +3,7 @@ using cpu.m6809;
|
||||
using cpu.z80;
|
||||
using System.IO;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public partial class Capcom
|
||||
{
|
||||
@ -30,12 +30,12 @@ namespace MAME.Core
|
||||
writer.Write(Memory.audioram, 0, 0x800);
|
||||
Z80A.zz1[0].SaveStateBinary(writer);
|
||||
Cpuint.SaveStateBinary(writer);
|
||||
writer.Write(EmuTimer.global_basetime.seconds);
|
||||
writer.Write(EmuTimer.global_basetime.attoseconds);
|
||||
writer.Write(Timer.global_basetime.seconds);
|
||||
writer.Write(Timer.global_basetime.attoseconds);
|
||||
Video.SaveStateBinary(writer);
|
||||
writer.Write(Sound.last_update_second);
|
||||
Cpuexec.SaveStateBinary(writer);
|
||||
EmuTimer.SaveStateBinary(writer);
|
||||
Timer.SaveStateBinary(writer);
|
||||
AY8910.AA8910[0].SaveStateBinary(writer);
|
||||
AY8910.AA8910[1].SaveStateBinary(writer);
|
||||
YM2203.FF2203[0].SaveStateBinary(writer);
|
||||
@ -76,12 +76,12 @@ namespace MAME.Core
|
||||
Memory.audioram = reader.ReadBytes(0x800);
|
||||
Z80A.zz1[0].LoadStateBinary(reader);
|
||||
Cpuint.LoadStateBinary(reader);
|
||||
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
||||
EmuTimer.global_basetime.attoseconds = reader.ReadInt64();
|
||||
Timer.global_basetime.seconds = reader.ReadInt32();
|
||||
Timer.global_basetime.attoseconds = reader.ReadInt64();
|
||||
Video.LoadStateBinary(reader);
|
||||
Sound.last_update_second = reader.ReadInt32();
|
||||
Cpuexec.LoadStateBinary(reader);
|
||||
EmuTimer.LoadStateBinary(reader);
|
||||
Timer.LoadStateBinary(reader);
|
||||
AY8910.AA8910[0].LoadStateBinary(reader);
|
||||
AY8910.AA8910[1].LoadStateBinary(reader);
|
||||
YM2203.FF2203[0].LoadStateBinary(reader);
|
||||
@ -130,12 +130,12 @@ namespace MAME.Core
|
||||
Z80A.zz1[0].SaveStateBinary(writer);
|
||||
Z80A.zz1[1].SaveStateBinary(writer);
|
||||
Cpuint.SaveStateBinary(writer);
|
||||
writer.Write(EmuTimer.global_basetime.seconds);
|
||||
writer.Write(EmuTimer.global_basetime.attoseconds);
|
||||
writer.Write(Timer.global_basetime.seconds);
|
||||
writer.Write(Timer.global_basetime.attoseconds);
|
||||
Video.SaveStateBinary(writer);
|
||||
writer.Write(Sound.last_update_second);
|
||||
Cpuexec.SaveStateBinary(writer);
|
||||
EmuTimer.SaveStateBinary(writer);
|
||||
Timer.SaveStateBinary(writer);
|
||||
YM2151.SaveStateBinary(writer);
|
||||
MSM5205.mm1[0].SaveStateBinary(writer);
|
||||
MSM5205.mm1[1].SaveStateBinary(writer);
|
||||
@ -179,12 +179,12 @@ namespace MAME.Core
|
||||
Z80A.zz1[0].LoadStateBinary(reader);
|
||||
Z80A.zz1[1].LoadStateBinary(reader);
|
||||
Cpuint.LoadStateBinary(reader);
|
||||
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
||||
EmuTimer.global_basetime.attoseconds = reader.ReadInt64();
|
||||
Timer.global_basetime.seconds = reader.ReadInt32();
|
||||
Timer.global_basetime.attoseconds = reader.ReadInt64();
|
||||
Video.LoadStateBinary(reader);
|
||||
Sound.last_update_second = reader.ReadInt32();
|
||||
Cpuexec.LoadStateBinary(reader);
|
||||
EmuTimer.LoadStateBinary(reader);
|
||||
Timer.LoadStateBinary(reader);
|
||||
YM2151.LoadStateBinary(reader);
|
||||
MSM5205.mm1[0].LoadStateBinary(reader);
|
||||
MSM5205.mm1[1].LoadStateBinary(reader);
|
||||
|
@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public partial class Capcom
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public partial class Capcom
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public partial class CPS
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public partial class Drawgfx
|
||||
{
|
||||
|
63
MAME.Core/mame/cps/Gdi.cs
Normal file
63
MAME.Core/mame/cps/Gdi.cs
Normal file
@ -0,0 +1,63 @@
|
||||
using Bitmap = MAME.Core.AxiBitmap.AxiBitmap;
|
||||
using Color = MAME.Core.AxiBitmap.AxiColor;
|
||||
|
||||
namespace mame
|
||||
{
|
||||
public partial class CPS
|
||||
{
|
||||
private static string[] sde2;
|
||||
private static int base_cps1_objG;
|
||||
private static int[] maskG;
|
||||
private static int[] mapsizeG;
|
||||
public static Color[] cc1G;
|
||||
public static Color m_ColorG;
|
||||
public static int nColorG, nSpriteG;
|
||||
private static byte[,] flagsmap0G, flagsmap1G, flagsmap2G;
|
||||
private static byte[,] pen_to_flags0G, pen_to_flags1G, pen_to_flags2G;
|
||||
public static byte[,] priority_bitmapG;
|
||||
private static int videocontrolG;
|
||||
public static int scrollx0, scrolly0;
|
||||
public static int scrollx1, scrolly1;
|
||||
public static int scrollx2, scrolly2;
|
||||
public static int scrollxSG, scrollySG;
|
||||
public static int[] iiCutColorG;
|
||||
public static int l0G, l1G, l2G, l3G;
|
||||
public static bool bRender0G, bRender1G, bRender2G, bRender3G;
|
||||
private static bool enable0G, enable1G, enable2G;
|
||||
private static int baseTilemap0G, baseTilemap1G, baseTilemap2G, basePaletteG;
|
||||
public static byte[] bbPaletteG;
|
||||
private static int layercontrolG, scrollrows1G;
|
||||
private static int[] rowscroll1G;
|
||||
public static int[] cps1_scrollxG, cps1_scrollyG;
|
||||
public delegate Bitmap gettileDelegateG();
|
||||
public static gettileDelegateG[] gettileDelegatesG;
|
||||
public delegate void gethighDelegateG();
|
||||
public static gethighDelegateG[] gethighDelegatesG;
|
||||
public static void GDIInit()
|
||||
{
|
||||
maskG = new int[4];
|
||||
mapsizeG = new int[3] { 0x200, 0x400, 0x800 };
|
||||
nColorG = 0xc00;
|
||||
sde2 = new string[] { "," };
|
||||
scrollxSG = 0;
|
||||
scrollySG = 0;
|
||||
bbPaletteG = new byte[nColorG * 2];
|
||||
rowscroll1G = new int[1024];
|
||||
cps1_scrollxG = new int[3];
|
||||
cps1_scrollyG = new int[3];
|
||||
gettileDelegatesG = new gettileDelegateG[]{
|
||||
};
|
||||
gethighDelegatesG = new gethighDelegateG[]{
|
||||
null,
|
||||
};
|
||||
flagsmap0G = new byte[0x200, 0x200];
|
||||
flagsmap1G = new byte[0x400, 0x400];
|
||||
flagsmap2G = new byte[0x800, 0x800];
|
||||
pen_to_flags0G = new byte[4, 16];
|
||||
pen_to_flags1G = new byte[4, 16];
|
||||
pen_to_flags2G = new byte[4, 16];
|
||||
priority_bitmapG = new byte[0x200, 0x200];
|
||||
cc1G = new Color[nColorG];
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
using cpu.z80;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public partial class CPS
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public partial class CPS
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
using cpu.z80;
|
||||
using System.IO;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public partial class CPS
|
||||
{
|
||||
@ -31,8 +31,8 @@ namespace MAME.Core
|
||||
writer.Write(Memory.audioram, 0, 0x800);
|
||||
Z80A.zz1[0].SaveStateBinary(writer);
|
||||
Cpuint.SaveStateBinary(writer);
|
||||
writer.Write(EmuTimer.global_basetime.seconds);
|
||||
writer.Write(EmuTimer.global_basetime.attoseconds);
|
||||
writer.Write(Timer.global_basetime.seconds);
|
||||
writer.Write(Timer.global_basetime.attoseconds);
|
||||
writer.Write(Video.screenstate.frame_number);
|
||||
writer.Write(Sound.last_update_second);
|
||||
for (i = 0; i < 2; i++)
|
||||
@ -44,7 +44,7 @@ namespace MAME.Core
|
||||
writer.Write(Cpuexec.cpu[i].localtime.seconds);
|
||||
writer.Write(Cpuexec.cpu[i].localtime.attoseconds);
|
||||
}
|
||||
EmuTimer.SaveStateBinary(writer);
|
||||
Timer.SaveStateBinary(writer);
|
||||
YM2151.SaveStateBinary(writer);
|
||||
OKI6295.SaveStateBinary(writer);
|
||||
for (i = 0; i < 2; i++)
|
||||
@ -101,8 +101,8 @@ namespace MAME.Core
|
||||
writer.Write(Memory.audioram, 0, 0x800);
|
||||
Z80A.zz1[0].SaveStateBinary(writer);
|
||||
Cpuint.SaveStateBinary(writer);
|
||||
writer.Write(EmuTimer.global_basetime.seconds);
|
||||
writer.Write(EmuTimer.global_basetime.attoseconds);
|
||||
writer.Write(Timer.global_basetime.seconds);
|
||||
writer.Write(Timer.global_basetime.attoseconds);
|
||||
writer.Write(Video.screenstate.frame_number);
|
||||
writer.Write(Sound.last_update_second);
|
||||
for (i = 0; i < 2; i++)
|
||||
@ -114,7 +114,7 @@ namespace MAME.Core
|
||||
writer.Write(Cpuexec.cpu[i].localtime.seconds);
|
||||
writer.Write(Cpuexec.cpu[i].localtime.attoseconds);
|
||||
}
|
||||
EmuTimer.SaveStateBinary(writer);
|
||||
Timer.SaveStateBinary(writer);
|
||||
writer.Write(qsound_sharedram1);
|
||||
writer.Write(qsound_sharedram2);
|
||||
QSound.SaveStateBinary(writer);
|
||||
@ -164,8 +164,8 @@ namespace MAME.Core
|
||||
writer.Write(Memory.audioram, 0, 0x800);
|
||||
Z80A.zz1[0].SaveStateBinary(writer);
|
||||
Cpuint.SaveStateBinary(writer);
|
||||
writer.Write(EmuTimer.global_basetime.seconds);
|
||||
writer.Write(EmuTimer.global_basetime.attoseconds);
|
||||
writer.Write(Timer.global_basetime.seconds);
|
||||
writer.Write(Timer.global_basetime.attoseconds);
|
||||
writer.Write(Video.screenstate.frame_number);
|
||||
writer.Write(Sound.last_update_second);
|
||||
for (i = 0; i < 2; i++)
|
||||
@ -177,7 +177,7 @@ namespace MAME.Core
|
||||
writer.Write(Cpuexec.cpu[i].localtime.seconds);
|
||||
writer.Write(Cpuexec.cpu[i].localtime.attoseconds);
|
||||
}
|
||||
EmuTimer.SaveStateBinary(writer);
|
||||
Timer.SaveStateBinary(writer);
|
||||
writer.Write(qsound_sharedram1);
|
||||
writer.Write(qsound_sharedram2);
|
||||
QSound.SaveStateBinary(writer);
|
||||
@ -212,8 +212,8 @@ namespace MAME.Core
|
||||
Memory.audioram = reader.ReadBytes(0x800);
|
||||
Z80A.zz1[0].LoadStateBinary(reader);
|
||||
Cpuint.LoadStateBinary(reader);
|
||||
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
||||
EmuTimer.global_basetime.attoseconds = reader.ReadInt64();
|
||||
Timer.global_basetime.seconds = reader.ReadInt32();
|
||||
Timer.global_basetime.attoseconds = reader.ReadInt64();
|
||||
Video.screenstate.frame_number = reader.ReadInt64();
|
||||
Sound.last_update_second = reader.ReadInt32();
|
||||
for (i = 0; i < 2; i++)
|
||||
@ -225,7 +225,7 @@ namespace MAME.Core
|
||||
Cpuexec.cpu[i].localtime.seconds = reader.ReadInt32();
|
||||
Cpuexec.cpu[i].localtime.attoseconds = reader.ReadInt64();
|
||||
}
|
||||
EmuTimer.LoadStateBinary(reader);
|
||||
Timer.LoadStateBinary(reader);
|
||||
YM2151.LoadStateBinary(reader);
|
||||
OKI6295.LoadStateBinary(reader);
|
||||
for (i = 0; i < 2; i++)
|
||||
@ -282,8 +282,8 @@ namespace MAME.Core
|
||||
Memory.audioram = reader.ReadBytes(0x800);
|
||||
Z80A.zz1[0].LoadStateBinary(reader);
|
||||
Cpuint.LoadStateBinary(reader);
|
||||
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
||||
EmuTimer.global_basetime.attoseconds = reader.ReadInt64();
|
||||
Timer.global_basetime.seconds = reader.ReadInt32();
|
||||
Timer.global_basetime.attoseconds = reader.ReadInt64();
|
||||
Video.screenstate.frame_number = reader.ReadInt64();
|
||||
Sound.last_update_second = reader.ReadInt32();
|
||||
for (i = 0; i < 2; i++)
|
||||
@ -295,7 +295,7 @@ namespace MAME.Core
|
||||
Cpuexec.cpu[i].localtime.seconds = reader.ReadInt32();
|
||||
Cpuexec.cpu[i].localtime.attoseconds = reader.ReadInt64();
|
||||
}
|
||||
EmuTimer.LoadStateBinary(reader);
|
||||
Timer.LoadStateBinary(reader);
|
||||
qsound_sharedram1 = reader.ReadBytes(0x1000);
|
||||
qsound_sharedram2 = reader.ReadBytes(0x1000);
|
||||
QSound.LoadStateBinary(reader);
|
||||
@ -345,8 +345,8 @@ namespace MAME.Core
|
||||
Memory.audioram = reader.ReadBytes(0x800);
|
||||
Z80A.zz1[0].LoadStateBinary(reader);
|
||||
Cpuint.LoadStateBinary(reader);
|
||||
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
||||
EmuTimer.global_basetime.attoseconds = reader.ReadInt64();
|
||||
Timer.global_basetime.seconds = reader.ReadInt32();
|
||||
Timer.global_basetime.attoseconds = reader.ReadInt64();
|
||||
Video.screenstate.frame_number = reader.ReadInt64();
|
||||
Sound.last_update_second = reader.ReadInt32();
|
||||
for (i = 0; i < 2; i++)
|
||||
@ -358,7 +358,7 @@ namespace MAME.Core
|
||||
Cpuexec.cpu[i].localtime.seconds = reader.ReadInt32();
|
||||
Cpuexec.cpu[i].localtime.attoseconds = reader.ReadInt64();
|
||||
}
|
||||
EmuTimer.LoadStateBinary(reader);
|
||||
Timer.LoadStateBinary(reader);
|
||||
qsound_sharedram1 = reader.ReadBytes(0x1000);
|
||||
qsound_sharedram2 = reader.ReadBytes(0x1000);
|
||||
QSound.LoadStateBinary(reader);
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public partial class CPS
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public partial class CPS
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public partial class Drawgfx
|
||||
{
|
||||
|
11
MAME.Core/mame/dataeast/Gdi.cs
Normal file
11
MAME.Core/mame/dataeast/Gdi.cs
Normal file
@ -0,0 +1,11 @@
|
||||
namespace mame
|
||||
{
|
||||
public partial class Dataeast
|
||||
{
|
||||
public static bool bBg, bFg, bSprite;
|
||||
public static void GDIInit()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
using MAME.Core;
|
||||
using MAME.Core.run_interface;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public partial class Dataeast
|
||||
{
|
||||
@ -19,7 +19,7 @@ namespace MAME.Core
|
||||
public static List<fr1> lfr = new List<fr1>();
|
||||
public static void loop_inputports_dataeast_pcktgal()
|
||||
{
|
||||
if (Keyboard.IsPressed(MotionKey.P1_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D5))
|
||||
if (Keyboard.IsPressed(Key.D5))
|
||||
{
|
||||
byte2 &= unchecked((byte)~0x10);
|
||||
}
|
||||
@ -27,7 +27,7 @@ namespace MAME.Core
|
||||
{
|
||||
byte2 |= 0x10;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D6))
|
||||
if (Keyboard.IsPressed(Key.D6))
|
||||
{
|
||||
byte2 &= unchecked((byte)~0x20);
|
||||
}
|
||||
@ -35,7 +35,7 @@ namespace MAME.Core
|
||||
{
|
||||
byte2 |= 0x20;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_GAMESTART))//if (Keyboard.IsPressed(Corekey.D1))
|
||||
if (Keyboard.IsPressed(Key.D1))
|
||||
{
|
||||
byte1 &= unchecked((byte)~0x10);
|
||||
}
|
||||
@ -43,7 +43,7 @@ namespace MAME.Core
|
||||
{
|
||||
byte1 |= 0x10;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_GAMESTART))//if (Keyboard.IsPressed(Corekey.D2))
|
||||
if (Keyboard.IsPressed(Key.D2))
|
||||
{
|
||||
byte1 &= unchecked((byte)~0x20);
|
||||
}
|
||||
@ -51,7 +51,7 @@ namespace MAME.Core
|
||||
{
|
||||
byte1 |= 0x20;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_RIGHT))//if (Keyboard.IsPressed(Corekey.D))
|
||||
if (Keyboard.IsPressed(Key.D))
|
||||
{
|
||||
byte1 &= unchecked((byte)~0x01);
|
||||
}
|
||||
@ -59,7 +59,7 @@ namespace MAME.Core
|
||||
{
|
||||
byte1 |= 0x01;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_LEFT))//if (Keyboard.IsPressed(Corekey.A))
|
||||
if (Keyboard.IsPressed(Key.A))
|
||||
{
|
||||
byte1 &= unchecked((byte)~0x02);
|
||||
}
|
||||
@ -67,7 +67,7 @@ namespace MAME.Core
|
||||
{
|
||||
byte1 |= 0x02;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_DOWN))//if (Keyboard.IsPressed(Corekey.S))
|
||||
if (Keyboard.IsPressed(Key.S))
|
||||
{
|
||||
byte1 &= unchecked((byte)~0x04);
|
||||
}
|
||||
@ -75,7 +75,7 @@ namespace MAME.Core
|
||||
{
|
||||
byte1 |= 0x04;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_UP))//if (Keyboard.IsPressed(Corekey.W))
|
||||
if (Keyboard.IsPressed(Key.W))
|
||||
{
|
||||
byte1 &= unchecked((byte)~0x08);
|
||||
}
|
||||
@ -83,7 +83,7 @@ namespace MAME.Core
|
||||
{
|
||||
byte1 |= 0x08;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_BTN_1))//if (Keyboard.IsPressed(Corekey.J))
|
||||
if (Keyboard.IsPressed(Key.J))
|
||||
{
|
||||
byte1 &= unchecked((byte)~0x80);
|
||||
}
|
||||
@ -91,7 +91,7 @@ namespace MAME.Core
|
||||
{
|
||||
byte1 |= 0x80;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_BTN_2))//if (Keyboard.IsPressed(Corekey.K))
|
||||
if (Keyboard.IsPressed(Key.K))
|
||||
{
|
||||
byte1 &= unchecked((byte)~0x40);
|
||||
}
|
||||
@ -99,7 +99,7 @@ namespace MAME.Core
|
||||
{
|
||||
byte1 |= 0x40;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_RIGHT))//if (Keyboard.IsPressed(Corekey.Right))
|
||||
if (Keyboard.IsPressed(Key.Right))
|
||||
{
|
||||
byte2 &= unchecked((byte)~0x01);
|
||||
}
|
||||
@ -107,7 +107,7 @@ namespace MAME.Core
|
||||
{
|
||||
byte2 |= 0x01;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_LEFT))//if (Keyboard.IsPressed(Corekey.Left))
|
||||
if (Keyboard.IsPressed(Key.Left))
|
||||
{
|
||||
byte2 &= unchecked((byte)~0x02);
|
||||
}
|
||||
@ -115,7 +115,7 @@ namespace MAME.Core
|
||||
{
|
||||
byte2 |= 0x02;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_DOWN)) //if (Keyboard.IsPressed(Corekey.Down))
|
||||
if (Keyboard.IsPressed(Key.Down))
|
||||
{
|
||||
byte2 &= unchecked((byte)~0x04);
|
||||
}
|
||||
@ -123,7 +123,7 @@ namespace MAME.Core
|
||||
{
|
||||
byte2 |= 0x04;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_UP))//if (Keyboard.IsPressed(Corekey.Up))
|
||||
if (Keyboard.IsPressed(Key.Up))
|
||||
{
|
||||
byte2 &= unchecked((byte)~0x08);
|
||||
}
|
||||
@ -131,7 +131,7 @@ namespace MAME.Core
|
||||
{
|
||||
byte2 |= 0x08;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_BTN_1))//if (Keyboard.IsPressed(Corekey.NumPad1))
|
||||
if (Keyboard.IsPressed(Key.NumPad1))
|
||||
{
|
||||
byte2 &= unchecked((byte)~0x80);
|
||||
}
|
||||
@ -139,7 +139,7 @@ namespace MAME.Core
|
||||
{
|
||||
byte2 |= 0x80;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_BTN_2))//if (Keyboard.IsPressed(Corekey.NumPad2))
|
||||
if (Keyboard.IsPressed(Key.NumPad2))
|
||||
{
|
||||
byte2 &= unchecked((byte)~0x40);
|
||||
}
|
||||
@ -147,7 +147,7 @@ namespace MAME.Core
|
||||
{
|
||||
byte2 |= 0x40;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.UNKNOW_N))//if (Keyboard.IsPressed(Corekey.N))
|
||||
if (Keyboard.IsTriggered(Key.N))
|
||||
{
|
||||
lfr = new List<fr1>();
|
||||
lfr.Add(new fr1((int)(Video.screenstate.frame_number + 1), 0x7f));
|
||||
@ -155,26 +155,25 @@ namespace MAME.Core
|
||||
lfr.Add(new fr1((int)(Video.screenstate.frame_number + 2 + i3), 0x7f));
|
||||
lfr.Add(new fr1((int)(Video.screenstate.frame_number + 2 + i3 + 1), 0xff));
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_BTN_3))//if (Keyboard.IsPressed(Corekey.U))
|
||||
if (Keyboard.IsTriggered(Key.U))
|
||||
{
|
||||
lfr = new List<fr1>();
|
||||
lfr.Add(new fr1((int)(Video.screenstate.frame_number + 1), 0xf7));
|
||||
lfr.Add(new fr1((int)(Video.screenstate.frame_number + 2), 0xff));
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_BTN_4))//if (Keyboard.IsPressed(Corekey.I))
|
||||
if (Keyboard.IsTriggered(Key.I))
|
||||
{
|
||||
lfr = new List<fr1>();
|
||||
lfr.Add(new fr1((int)(Video.screenstate.frame_number + 1), 0xfb));
|
||||
lfr.Add(new fr1((int)(Video.screenstate.frame_number + 2), 0xff));
|
||||
}
|
||||
|
||||
if (Keyboard.IsPressed(MotionKey.UNKNOW_V))//if (Keyboard.IsPressed(Corekey.V))
|
||||
if (Keyboard.IsTriggered(Key.V))
|
||||
{
|
||||
lfr = new List<fr1>();
|
||||
lfr.Add(new fr1((int)(Video.screenstate.frame_number + 1), 0xfd));
|
||||
lfr.Add(new fr1((int)(Video.screenstate.frame_number + 2), 0xff));
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.UNKNOW_B))//if (Keyboard.IsPressed(Corekey.B))
|
||||
if (Keyboard.IsTriggered(Key.B))
|
||||
{
|
||||
lfr = new List<fr1>();
|
||||
lfr.Add(new fr1((int)(Video.screenstate.frame_number + 1), 0xfe));
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public partial class Dataeast
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public partial class Dataeast
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
using cpu.m6502;
|
||||
using System.IO;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public partial class Dataeast
|
||||
{
|
||||
@ -25,12 +25,12 @@ namespace MAME.Core
|
||||
M6502.mm1[0].SaveStateBinary(writer);
|
||||
M6502.mm1[1].SaveStateBinary(writer);
|
||||
Cpuint.SaveStateBinary(writer);
|
||||
writer.Write(EmuTimer.global_basetime.seconds);
|
||||
writer.Write(EmuTimer.global_basetime.attoseconds);
|
||||
writer.Write(Timer.global_basetime.seconds);
|
||||
writer.Write(Timer.global_basetime.attoseconds);
|
||||
Video.SaveStateBinary(writer);
|
||||
writer.Write(Sound.last_update_second);
|
||||
Cpuexec.SaveStateBinary(writer);
|
||||
EmuTimer.SaveStateBinary(writer);
|
||||
Timer.SaveStateBinary(writer);
|
||||
AY8910.AA8910[0].SaveStateBinary(writer);
|
||||
YM2203.FF2203[0].SaveStateBinary(writer);
|
||||
YM3812.SaveStateBinary(writer);
|
||||
@ -68,12 +68,12 @@ namespace MAME.Core
|
||||
M6502.mm1[0].LoadStateBinary(reader);
|
||||
M6502.mm1[1].LoadStateBinary(reader);
|
||||
Cpuint.LoadStateBinary(reader);
|
||||
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
||||
EmuTimer.global_basetime.attoseconds = reader.ReadInt64();
|
||||
Timer.global_basetime.seconds = reader.ReadInt32();
|
||||
Timer.global_basetime.attoseconds = reader.ReadInt64();
|
||||
Video.LoadStateBinary(reader);
|
||||
Sound.last_update_second = reader.ReadInt32();
|
||||
Cpuexec.LoadStateBinary(reader);
|
||||
EmuTimer.LoadStateBinary(reader);
|
||||
Timer.LoadStateBinary(reader);
|
||||
AY8910.AA8910[0].LoadStateBinary(reader);
|
||||
YM2203.FF2203[0].LoadStateBinary(reader);
|
||||
YM3812.LoadStateBinary(reader);
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public partial class Dataeast
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public partial class Dataeast
|
||||
{
|
||||
|
10
MAME.Core/mame/igs011/Gdi.cs
Normal file
10
MAME.Core/mame/igs011/Gdi.cs
Normal file
@ -0,0 +1,10 @@
|
||||
namespace mame
|
||||
{
|
||||
public partial class IGS011
|
||||
{
|
||||
public static void GDIInit()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public partial class IGS011
|
||||
{
|
||||
|
@ -1,12 +1,12 @@
|
||||
using MAME.Core;
|
||||
using MAME.Core.run_interface;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public partial class IGS011
|
||||
{
|
||||
public static void loop_inputports_igs011_drgnwrld()
|
||||
{
|
||||
if (Keyboard.IsPressed(MotionKey.P1_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D5))
|
||||
if (Keyboard.IsPressed(Key.D5))
|
||||
{
|
||||
sbytec &= ~0x01;
|
||||
}
|
||||
@ -14,7 +14,7 @@ namespace MAME.Core
|
||||
{
|
||||
sbytec |= 0x01;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D6))
|
||||
if (Keyboard.IsPressed(Key.D6))
|
||||
{
|
||||
sbytec &= ~0x02;
|
||||
}
|
||||
@ -22,7 +22,7 @@ namespace MAME.Core
|
||||
{
|
||||
sbytec |= 0x02;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_GAMESTART))//if (Keyboard.IsPressed(Corekey.D1))
|
||||
if (Keyboard.IsPressed(Key.D1))
|
||||
{
|
||||
sbyte0 &= ~0x01;
|
||||
}
|
||||
@ -30,7 +30,7 @@ namespace MAME.Core
|
||||
{
|
||||
sbyte0 |= 0x01;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_GAMESTART))//if (Keyboard.IsPressed(Corekey.D2))
|
||||
if (Keyboard.IsPressed(Key.D2))
|
||||
{
|
||||
sbyte2 &= ~0x10;
|
||||
}
|
||||
@ -38,8 +38,7 @@ namespace MAME.Core
|
||||
{
|
||||
sbyte2 |= 0x10;
|
||||
}
|
||||
//if (Keyboard.IsPressed(Corekey.D))// || Mouse.deltaX > 0)
|
||||
if (Keyboard.IsPressed(MotionKey.P1_RIGHT))// || Mouse.deltaX > 0)
|
||||
if (Keyboard.IsPressed(Key.D))// || Mouse.deltaX > 0)
|
||||
{
|
||||
sbyte0 &= ~0x10;
|
||||
}
|
||||
@ -47,7 +46,7 @@ namespace MAME.Core
|
||||
{
|
||||
sbyte0 |= 0x10;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_LEFT))//if (Keyboard.IsPressed(Corekey.A))// || Mouse.deltaX < 0)
|
||||
if (Keyboard.IsPressed(Key.A))// || Mouse.deltaX < 0)
|
||||
{
|
||||
sbyte2 &= ~0x02;
|
||||
}
|
||||
@ -55,7 +54,7 @@ namespace MAME.Core
|
||||
{
|
||||
sbyte2 |= 0x02;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_DOWN))//if (Keyboard.IsPressed(Corekey.S))// || Mouse.deltaY > 0)
|
||||
if (Keyboard.IsPressed(Key.S))// || Mouse.deltaY > 0)
|
||||
{
|
||||
sbyte0 &= ~0x04;
|
||||
}
|
||||
@ -63,7 +62,7 @@ namespace MAME.Core
|
||||
{
|
||||
sbyte0 |= 0x04;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_UP))//if (Keyboard.IsPressed(Corekey.W))// || Mouse.deltaY < 0)
|
||||
if (Keyboard.IsPressed(Key.W))// || Mouse.deltaY < 0)
|
||||
{
|
||||
sbyte2 &= ~0x01;
|
||||
}
|
||||
@ -71,7 +70,7 @@ namespace MAME.Core
|
||||
{
|
||||
sbyte2 |= 0x01;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_BTN_1))//if (Keyboard.IsPressed(Corekey.J))// || Mouse.buttons[0] != 0)
|
||||
if (Keyboard.IsPressed(Key.J))// || Mouse.buttons[0] != 0)
|
||||
{
|
||||
sbyte2 &= ~0x04;
|
||||
}
|
||||
@ -79,7 +78,7 @@ namespace MAME.Core
|
||||
{
|
||||
sbyte2 |= 0x04;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_BTN_2))//if (Keyboard.IsPressed(Corekey.K))// || Mouse.buttons[1] != 0)
|
||||
if (Keyboard.IsPressed(Key.K))// || Mouse.buttons[1] != 0)
|
||||
{
|
||||
sbyte0 &= ~0x40;
|
||||
}
|
||||
@ -87,7 +86,7 @@ namespace MAME.Core
|
||||
{
|
||||
sbyte0 |= 0x40;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.L))
|
||||
if (Keyboard.IsPressed(Key.L))
|
||||
{
|
||||
sbyte2 &= ~0x08;
|
||||
}
|
||||
@ -95,7 +94,7 @@ namespace MAME.Core
|
||||
{
|
||||
sbyte2 |= 0x08;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_BTN_3))//if (Keyboard.IsPressed(Corekey.U))
|
||||
if (Keyboard.IsPressed(Key.U))
|
||||
{
|
||||
|
||||
}
|
||||
@ -103,7 +102,7 @@ namespace MAME.Core
|
||||
{
|
||||
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_BTN_4))//if (Keyboard.IsPressed(Corekey.I))
|
||||
if (Keyboard.IsPressed(Key.I))
|
||||
{
|
||||
|
||||
}
|
||||
@ -111,7 +110,7 @@ namespace MAME.Core
|
||||
{
|
||||
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.O))
|
||||
if (Keyboard.IsPressed(Key.O))
|
||||
{
|
||||
|
||||
}
|
||||
@ -119,7 +118,7 @@ namespace MAME.Core
|
||||
{
|
||||
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_RIGHT))//if (Keyboard.IsPressed(Corekey.Right))
|
||||
if (Keyboard.IsPressed(Key.Right))
|
||||
{
|
||||
sbyte2 &= ~0x40;
|
||||
}
|
||||
@ -127,7 +126,7 @@ namespace MAME.Core
|
||||
{
|
||||
sbyte2 |= 0x40;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_LEFT))//if (Keyboard.IsPressed(Corekey.Left))
|
||||
if (Keyboard.IsPressed(Key.Left))
|
||||
{
|
||||
sbyte1 &= ~0x08;
|
||||
}
|
||||
@ -135,7 +134,7 @@ namespace MAME.Core
|
||||
{
|
||||
sbyte1 |= 0x08;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_DOWN)) //if (Keyboard.IsPressed(Corekey.Down))
|
||||
if (Keyboard.IsPressed(Key.Down))
|
||||
{
|
||||
sbyte2 &= ~0x20;
|
||||
}
|
||||
@ -143,7 +142,7 @@ namespace MAME.Core
|
||||
{
|
||||
sbyte2 |= 0x20;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_UP))//if (Keyboard.IsPressed(Corekey.Up))
|
||||
if (Keyboard.IsPressed(Key.Up))
|
||||
{
|
||||
sbyte1 &= ~0x02;
|
||||
}
|
||||
@ -151,7 +150,7 @@ namespace MAME.Core
|
||||
{
|
||||
sbyte1 |= 0x02;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_BTN_1))//if (Keyboard.IsPressed(Corekey.NumPad1))
|
||||
if (Keyboard.IsPressed(Key.NumPad1))
|
||||
{
|
||||
sbyte1 &= ~0x20;
|
||||
}
|
||||
@ -159,7 +158,7 @@ namespace MAME.Core
|
||||
{
|
||||
sbyte1 |= 0x20;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_BTN_2))//if (Keyboard.IsPressed(Corekey.NumPad2))
|
||||
if (Keyboard.IsPressed(Key.NumPad2))
|
||||
{
|
||||
sbyte2 &= unchecked((sbyte)~0x80);
|
||||
}
|
||||
@ -167,7 +166,7 @@ namespace MAME.Core
|
||||
{
|
||||
sbyte2 |= unchecked((sbyte)0x80);
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.NumPad3))
|
||||
if (Keyboard.IsPressed(Key.NumPad3))
|
||||
{
|
||||
sbyte1 &= unchecked((sbyte)~0x80);
|
||||
}
|
||||
@ -175,7 +174,7 @@ namespace MAME.Core
|
||||
{
|
||||
sbyte1 |= unchecked((sbyte)0x80);
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_BTN_3))//if (Keyboard.IsPressed(Corekey.NumPad4))
|
||||
if (Keyboard.IsPressed(Key.NumPad4))
|
||||
{
|
||||
|
||||
}
|
||||
@ -183,7 +182,7 @@ namespace MAME.Core
|
||||
{
|
||||
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_BTN_4))//if (Keyboard.IsPressed(Corekey.NumPad5))
|
||||
if (Keyboard.IsPressed(Key.NumPad5))
|
||||
{
|
||||
|
||||
}
|
||||
@ -191,7 +190,7 @@ namespace MAME.Core
|
||||
{
|
||||
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_UNKNOW_F))//if (Keyboard.IsPressed(Corekey.NumPad6))
|
||||
if (Keyboard.IsPressed(Key.NumPad6))
|
||||
{
|
||||
|
||||
}
|
||||
@ -199,7 +198,7 @@ namespace MAME.Core
|
||||
{
|
||||
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.UNKNOW_R)) //if (Keyboard.IsPressed(Corekey.R))
|
||||
if (Keyboard.IsPressed(Key.R))
|
||||
{
|
||||
sbytec &= ~0x08;
|
||||
}
|
||||
@ -207,7 +206,7 @@ namespace MAME.Core
|
||||
{
|
||||
sbytec |= 0x08;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.UNKNOW_T)) //if (Keyboard.IsPressed(Corekey.T))
|
||||
if (Keyboard.IsPressed(Key.T))
|
||||
{
|
||||
sbytec &= ~0x10;
|
||||
}
|
||||
@ -218,8 +217,7 @@ namespace MAME.Core
|
||||
}
|
||||
public static void loop_inputports_igs011_lhb()
|
||||
{
|
||||
/*
|
||||
if (Keyboard.IsPressed(MotionKey.P1_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D5))
|
||||
if (Keyboard.IsPressed(Key.D5))
|
||||
{
|
||||
sbytec &= ~0x10;
|
||||
}
|
||||
@ -227,7 +225,7 @@ namespace MAME.Core
|
||||
{
|
||||
sbytec |= 0x10;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_GAMESTART))//if (Keyboard.IsPressed(Corekey.D1))
|
||||
if (Keyboard.IsPressed(Key.D1))
|
||||
{
|
||||
bkey0 &= unchecked((byte)~0x20);
|
||||
}
|
||||
@ -235,7 +233,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey0 |= 0x20;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_GAMESTART))//if (Keyboard.IsPressed(Corekey.D2))
|
||||
if (Keyboard.IsPressed(Key.D2))
|
||||
{
|
||||
bkey1 &= unchecked((byte)~0x20);
|
||||
}
|
||||
@ -243,7 +241,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey1 |= 0x20;
|
||||
}
|
||||
if (Keyboard.IsPressed(Corekey.D3))
|
||||
if (Keyboard.IsPressed(Key.D3))
|
||||
{
|
||||
bkey4 &= unchecked((byte)~0x10);
|
||||
}
|
||||
@ -251,7 +249,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey4 |= 0x10;
|
||||
}
|
||||
if (Keyboard.IsPressed(Corekey.D4))
|
||||
if (Keyboard.IsPressed(Key.D4))
|
||||
{
|
||||
bkey4 &= unchecked((byte)~0x20);
|
||||
}
|
||||
@ -259,7 +257,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey4 |= 0x20;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_LEFT))//if (Keyboard.IsPressed(Corekey.A))
|
||||
if (Keyboard.IsPressed(Key.A))
|
||||
{
|
||||
bkey0 &= unchecked((byte)~0x01);
|
||||
}
|
||||
@ -267,7 +265,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey0 |= 0x01;
|
||||
}
|
||||
if (Keyboard.IsPressed(Corekey.B))
|
||||
if (Keyboard.IsPressed(Key.B))
|
||||
{
|
||||
bkey1 &= unchecked((byte)~0x01);
|
||||
}
|
||||
@ -275,7 +273,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey1 |= 0x01;
|
||||
}
|
||||
if (Keyboard.IsPressed(Corekey.C))
|
||||
if (Keyboard.IsPressed(Key.C))
|
||||
{
|
||||
bkey2 &= unchecked((byte)~0x01);
|
||||
}
|
||||
@ -283,7 +281,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey2 |= 0x01;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_RIGHT))//if (Keyboard.IsPressed(Corekey.D))
|
||||
if (Keyboard.IsPressed(Key.D))
|
||||
{
|
||||
bkey3 &= unchecked((byte)~0x01);
|
||||
}
|
||||
@ -291,7 +289,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey3 |= 0x01;
|
||||
}
|
||||
if (Keyboard.IsPressed(Corekey.E))
|
||||
if (Keyboard.IsPressed(Key.E))
|
||||
{
|
||||
bkey0 &= unchecked((byte)~0x02);
|
||||
}
|
||||
@ -299,7 +297,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey0 |= 0x02;
|
||||
}
|
||||
if (Keyboard.IsPressed(Corekey.F))
|
||||
if (Keyboard.IsPressed(Key.F))
|
||||
{
|
||||
bkey1 &= unchecked((byte)~0x02);
|
||||
}
|
||||
@ -307,7 +305,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey1 |= 0x02;
|
||||
}
|
||||
if (Keyboard.IsPressed(Corekey.G))
|
||||
if (Keyboard.IsPressed(Key.G))
|
||||
{
|
||||
bkey2 &= unchecked((byte)~0x02);
|
||||
}
|
||||
@ -315,7 +313,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey2 |= 0x02;
|
||||
}
|
||||
if (Keyboard.IsPressed(Corekey.H))
|
||||
if (Keyboard.IsPressed(Key.H))
|
||||
{
|
||||
bkey3 &= unchecked((byte)~0x02);
|
||||
}
|
||||
@ -323,7 +321,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey3 |= 0x02;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_BTN_4))//if (Keyboard.IsPressed(Corekey.I))
|
||||
if (Keyboard.IsPressed(Key.I))
|
||||
{
|
||||
bkey0 &= unchecked((byte)~0x04);
|
||||
}
|
||||
@ -331,7 +329,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey0 |= 0x04;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_BTN_1))//if (Keyboard.IsPressed(Corekey.J))
|
||||
if (Keyboard.IsPressed(Key.J))
|
||||
{
|
||||
bkey1 &= unchecked((byte)~0x04);
|
||||
}
|
||||
@ -339,7 +337,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey1 |= 0x04;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_BTN_2))//if (Keyboard.IsPressed(Corekey.K))
|
||||
if (Keyboard.IsPressed(Key.K))
|
||||
{
|
||||
bkey2 &= unchecked((byte)~0x04);
|
||||
}
|
||||
@ -347,7 +345,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey2 |= 0x04;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.L))
|
||||
if (Keyboard.IsPressed(Key.L))
|
||||
{
|
||||
bkey3 &= unchecked((byte)~0x04);
|
||||
}
|
||||
@ -355,7 +353,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey3 |= 0x04;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.UNKNOW_M))//if (Keyboard.IsPressed(Corekey.M))
|
||||
if (Keyboard.IsPressed(Key.M))
|
||||
{
|
||||
bkey0 &= unchecked((byte)~0x08);
|
||||
}
|
||||
@ -363,7 +361,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey0 |= 0x08;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.UNKNOW_N))//if (Keyboard.IsPressed(Corekey.N))
|
||||
if (Keyboard.IsPressed(Key.N))
|
||||
{
|
||||
bkey1 &= unchecked((byte)~0x08);
|
||||
}
|
||||
@ -371,7 +369,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey1 |= 0x08;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.O))
|
||||
if (Keyboard.IsPressed(Key.O))
|
||||
{
|
||||
bkey4 &= unchecked((byte)~0x04);
|
||||
}
|
||||
@ -379,7 +377,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey4 |= 0x04;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.UNKNOW_Q))//if (Keyboard.IsPressed(Corekey.Q))
|
||||
if (Keyboard.IsPressed(Key.Q))
|
||||
{
|
||||
bkey0 &= unchecked((byte)~0x10);
|
||||
}
|
||||
@ -387,7 +385,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey0 |= 0x10;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.UNKNOW_R)) //if (Keyboard.IsPressed(Corekey.R))
|
||||
if (Keyboard.IsPressed(Key.R))
|
||||
{
|
||||
bkey1 &= unchecked((byte)~0x10);
|
||||
}
|
||||
@ -395,7 +393,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey1 |= 0x10;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.UNKNOW_T)) //if (Keyboard.IsPressed(Corekey.T))
|
||||
if (Keyboard.IsPressed(Key.T))
|
||||
{
|
||||
bkey2 &= unchecked((byte)~0x08);
|
||||
}
|
||||
@ -403,7 +401,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey2 |= 0x08;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_BTN_3))//if (Keyboard.IsPressed(Corekey.U))
|
||||
if (Keyboard.IsPressed(Key.U))
|
||||
{
|
||||
bkey4 &= unchecked((byte)~0x02);
|
||||
}
|
||||
@ -411,7 +409,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey4 |= 0x02;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_UP))//if (Keyboard.IsPressed(Corekey.W))
|
||||
if (Keyboard.IsPressed(Key.W))
|
||||
{
|
||||
bkey3 &= unchecked((byte)~0x08);
|
||||
}
|
||||
@ -419,7 +417,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey3 |= 0x08;
|
||||
}
|
||||
if (Keyboard.IsPressed(Corekey.Y))
|
||||
if (Keyboard.IsPressed(Key.Y))
|
||||
{
|
||||
bkey4 &= unchecked((byte)~0x01);
|
||||
}
|
||||
@ -427,7 +425,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey4 |= 0x01;
|
||||
}
|
||||
if (Keyboard.IsPressed(Corekey.Z))
|
||||
if (Keyboard.IsPressed(Key.Z))
|
||||
{
|
||||
bkey2 &= unchecked((byte)~0x10);
|
||||
}
|
||||
@ -435,12 +433,10 @@ namespace MAME.Core
|
||||
{
|
||||
bkey2 |= 0x10;
|
||||
}
|
||||
*/
|
||||
}
|
||||
public static void loop_inputports_igs011_lhb2()
|
||||
{
|
||||
/*
|
||||
if (Keyboard.IsPressed(MotionKey.P1_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D5))
|
||||
if (Keyboard.IsPressed(Key.D5))
|
||||
{
|
||||
sbytec &= ~0x10;
|
||||
}
|
||||
@ -448,7 +444,7 @@ namespace MAME.Core
|
||||
{
|
||||
sbytec |= 0x10;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_GAMESTART))//if (Keyboard.IsPressed(Corekey.D1))
|
||||
if (Keyboard.IsPressed(Key.D1))
|
||||
{
|
||||
bkey0 &= unchecked((byte)~0x20);
|
||||
}
|
||||
@ -456,7 +452,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey0 |= 0x20;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P2_GAMESTART))//if (Keyboard.IsPressed(Corekey.D2))
|
||||
if (Keyboard.IsPressed(Key.D2))
|
||||
{
|
||||
bkey1 &= unchecked((byte)~0x20);
|
||||
}
|
||||
@ -464,7 +460,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey1 |= 0x20;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_LEFT))//if (Keyboard.IsPressed(Corekey.A))
|
||||
if (Keyboard.IsPressed(Key.A))
|
||||
{
|
||||
bkey0 &= unchecked((byte)~0x01);
|
||||
}
|
||||
@ -472,7 +468,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey0 |= 0x01;
|
||||
}
|
||||
if (Keyboard.IsPressed(Corekey.B))
|
||||
if (Keyboard.IsPressed(Key.B))
|
||||
{
|
||||
bkey1 &= unchecked((byte)~0x01);
|
||||
}
|
||||
@ -480,7 +476,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey1 |= 0x01;
|
||||
}
|
||||
if (Keyboard.IsPressed(Corekey.C))
|
||||
if (Keyboard.IsPressed(Key.C))
|
||||
{
|
||||
bkey2 &= unchecked((byte)~0x01);
|
||||
}
|
||||
@ -488,7 +484,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey2 |= 0x01;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_RIGHT))//if (Keyboard.IsPressed(Corekey.D))
|
||||
if (Keyboard.IsPressed(Key.D))
|
||||
{
|
||||
bkey3 &= unchecked((byte)~0x01);
|
||||
}
|
||||
@ -496,7 +492,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey3 |= 0x01;
|
||||
}
|
||||
if (Keyboard.IsPressed(Corekey.E))
|
||||
if (Keyboard.IsPressed(Key.E))
|
||||
{
|
||||
bkey0 &= unchecked((byte)~0x02);
|
||||
}
|
||||
@ -504,7 +500,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey0 |= 0x02;
|
||||
}
|
||||
if (Keyboard.IsPressed(Corekey.F))
|
||||
if (Keyboard.IsPressed(Key.F))
|
||||
{
|
||||
bkey1 &= unchecked((byte)~0x02);
|
||||
}
|
||||
@ -512,7 +508,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey1 |= 0x02;
|
||||
}
|
||||
if (Keyboard.IsPressed(Corekey.G))
|
||||
if (Keyboard.IsPressed(Key.G))
|
||||
{
|
||||
bkey2 &= unchecked((byte)~0x02);
|
||||
}
|
||||
@ -520,7 +516,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey2 |= 0x02;
|
||||
}
|
||||
if (Keyboard.IsPressed(Corekey.H))
|
||||
if (Keyboard.IsPressed(Key.H))
|
||||
{
|
||||
bkey3 &= unchecked((byte)~0x02);
|
||||
}
|
||||
@ -528,7 +524,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey3 |= 0x02;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_BTN_4))//if (Keyboard.IsPressed(Corekey.I))
|
||||
if (Keyboard.IsPressed(Key.I))
|
||||
{
|
||||
bkey0 &= unchecked((byte)~0x04);
|
||||
}
|
||||
@ -536,7 +532,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey0 |= 0x04;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_BTN_1))//if (Keyboard.IsPressed(Corekey.J))
|
||||
if (Keyboard.IsPressed(Key.J))
|
||||
{
|
||||
bkey1 &= unchecked((byte)~0x04);
|
||||
}
|
||||
@ -544,7 +540,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey1 |= 0x04;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_BTN_2))//if (Keyboard.IsPressed(Corekey.K))
|
||||
if (Keyboard.IsPressed(Key.K))
|
||||
{
|
||||
bkey2 &= unchecked((byte)~0x04);
|
||||
}
|
||||
@ -552,7 +548,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey2 |= 0x04;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.L))
|
||||
if (Keyboard.IsPressed(Key.L))
|
||||
{
|
||||
bkey3 &= unchecked((byte)~0x04);
|
||||
}
|
||||
@ -560,7 +556,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey3 |= 0x04;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.UNKNOW_M))//if (Keyboard.IsPressed(Corekey.M))
|
||||
if (Keyboard.IsPressed(Key.M))
|
||||
{
|
||||
bkey0 &= unchecked((byte)~0x08);
|
||||
}
|
||||
@ -568,7 +564,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey0 |= 0x08;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.UNKNOW_N))//if (Keyboard.IsPressed(Corekey.N))
|
||||
if (Keyboard.IsPressed(Key.N))
|
||||
{
|
||||
bkey1 &= unchecked((byte)~0x08);
|
||||
}
|
||||
@ -576,7 +572,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey1 |= 0x08;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.UNKNOW_Q))//if (Keyboard.IsPressed(Corekey.Q))
|
||||
if (Keyboard.IsPressed(Key.Q))
|
||||
{
|
||||
bkey0 &= unchecked((byte)~0x10);
|
||||
}
|
||||
@ -584,7 +580,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey0 |= 0x10;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.UNKNOW_R)) //if (Keyboard.IsPressed(Corekey.R))
|
||||
if (Keyboard.IsPressed(Key.R))
|
||||
{
|
||||
bkey1 &= unchecked((byte)~0x10);
|
||||
}
|
||||
@ -592,7 +588,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey1 |= 0x10;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.UNKNOW_T)) //if (Keyboard.IsPressed(Corekey.T))
|
||||
if (Keyboard.IsPressed(Key.T))
|
||||
{
|
||||
bkey2 &= unchecked((byte)~0x08);
|
||||
}
|
||||
@ -600,7 +596,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey2 |= 0x08;
|
||||
}
|
||||
if (Keyboard.IsPressed(MotionKey.P1_UP))//if (Keyboard.IsPressed(Corekey.W))
|
||||
if (Keyboard.IsPressed(Key.W))
|
||||
{
|
||||
bkey3 &= unchecked((byte)~0x08);
|
||||
}
|
||||
@ -608,7 +604,7 @@ namespace MAME.Core
|
||||
{
|
||||
bkey3 |= 0x08;
|
||||
}
|
||||
if (Keyboard.IsPressed(Corekey.Z))
|
||||
if (Keyboard.IsPressed(Key.Z))
|
||||
{
|
||||
bkey2 &= unchecked((byte)~0x10);
|
||||
}
|
||||
@ -616,7 +612,6 @@ namespace MAME.Core
|
||||
{
|
||||
bkey2 |= 0x10;
|
||||
}
|
||||
*/
|
||||
}
|
||||
public static void record_port_drgnwrld()
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public partial class IGS011
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public partial class IGS011
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public partial class IGS011
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
using cpu.m68000;
|
||||
using System.IO;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public partial class IGS011
|
||||
{
|
||||
@ -59,12 +59,12 @@ namespace MAME.Core
|
||||
writer.Write(blitter.flags);
|
||||
MC68000.m1.SaveStateBinary(writer);
|
||||
Cpuint.SaveStateBinary(writer);
|
||||
writer.Write(EmuTimer.global_basetime.seconds);
|
||||
writer.Write(EmuTimer.global_basetime.attoseconds);
|
||||
writer.Write(Timer.global_basetime.seconds);
|
||||
writer.Write(Timer.global_basetime.attoseconds);
|
||||
Video.SaveStateBinary(writer);
|
||||
writer.Write(Sound.last_update_second);
|
||||
Cpuexec.SaveStateBinary(writer);
|
||||
EmuTimer.SaveStateBinary(writer);
|
||||
Timer.SaveStateBinary(writer);
|
||||
OKI6295.SaveStateBinary(writer);
|
||||
YM3812.SaveStateBinary(writer);
|
||||
writer.Write(Sound.okistream.output_sampindex);
|
||||
@ -128,12 +128,12 @@ namespace MAME.Core
|
||||
blitter.flags = reader.ReadUInt16();
|
||||
MC68000.m1.LoadStateBinary(reader);
|
||||
Cpuint.LoadStateBinary(reader);
|
||||
EmuTimer.global_basetime.seconds = reader.ReadInt32();
|
||||
EmuTimer.global_basetime.attoseconds = reader.ReadInt64();
|
||||
Timer.global_basetime.seconds = reader.ReadInt32();
|
||||
Timer.global_basetime.attoseconds = reader.ReadInt64();
|
||||
Video.LoadStateBinary(reader);
|
||||
Sound.last_update_second = reader.ReadInt32();
|
||||
Cpuexec.LoadStateBinary(reader);
|
||||
EmuTimer.LoadStateBinary(reader);
|
||||
Timer.LoadStateBinary(reader);
|
||||
OKI6295.LoadStateBinary(reader);
|
||||
YM3812.LoadStateBinary(reader);
|
||||
Sound.okistream.output_sampindex = reader.ReadInt32();
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public partial class IGS011
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public partial class Konami68000
|
||||
{
|
||||
|
20
MAME.Core/mame/konami68000/Gdi.cs
Normal file
20
MAME.Core/mame/konami68000/Gdi.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using System.Collections.Generic;
|
||||
using Bitmap = MAME.Core.AxiBitmap.AxiBitmap;
|
||||
|
||||
namespace mame
|
||||
{
|
||||
public partial class Konami68000
|
||||
{
|
||||
private static string[] sde2 = new string[] { "," }, sde6 = new string[] { "-" };
|
||||
public static bool bTile0, bTile1, bTile2, bSprite;
|
||||
public delegate Bitmap GetBitmap();
|
||||
public static GetBitmap[] GetTilemaps;
|
||||
public static GetBitmap GetSprite;
|
||||
private static List<int> lSprite;
|
||||
public static int min_priority, max_priority;
|
||||
public static void GDIInit()
|
||||
{
|
||||
lSprite = new List<int>();
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
using cpu.m68000;
|
||||
using System;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public partial class Konami68000
|
||||
{
|
||||
@ -603,8 +603,8 @@ namespace MAME.Core
|
||||
public static void sound_arm_nmi_w()
|
||||
{
|
||||
Cpuint.cpunum_set_input_line(1, (int)LineState.INPUT_LINE_NMI, LineState.CLEAR_LINE);
|
||||
EmuTimer.emu_timer timer = EmuTimer.timer_alloc_common(nmi_callback, "nmi_callback", true);
|
||||
EmuTimer.timer_adjust_periodic(timer, new Atime(0, (long)50e12), Attotime.ATTOTIME_NEVER);
|
||||
Timer.emu_timer timer = Timer.timer_alloc_common(nmi_callback, "nmi_callback", true);
|
||||
Timer.timer_adjust_periodic(timer, new Atime(0, (long)50e12), Attotime.ATTOTIME_NEVER);
|
||||
}
|
||||
public static ushort punkshot_kludge_r()
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System.IO;
|
||||
|
||||
namespace MAME.Core
|
||||
namespace mame
|
||||
{
|
||||
public partial class Konami68000
|
||||
{
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user