diff --git a/MAME.Core/AxiBitmap/AxiBitmap.cs b/MAME.Core/AxiBitmap/AxiBitmap.cs index fdb4275..5d6cd8a 100644 --- a/MAME.Core/AxiBitmap/AxiBitmap.cs +++ b/MAME.Core/AxiBitmap/AxiBitmap.cs @@ -177,279 +177,11 @@ 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 { public static int ToArgb(this AxiColor color) { return (color.a << 24) | (color.r << 16) | (color.g << 8) | color.b; } - //public static AxiBitmap Clone(this AxiBitmap baseBitmap, Rectangle rect) - //{ - // unsafe - // { - // 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); - - // 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 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) - { - 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, result, y * rect.Width, rect.Width); - } - - return result; - } - - //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) - { - - if (!source.Contains(srcRect.X, srcRect.Y, srcRect.Width, srcRect.Height)) - throw new ArgumentException("Err"); - - // 遍历源矩形的每个像素 - for (int y = srcRect.Y; y < srcRect.Bottom; y++) - { - 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 - } - } - } - - // 辅助方法,用于检查一个点是否在位图范围内 - 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; - } } } diff --git a/MAME.Core/Motion/neogeoMotion.cs b/MAME.Core/Motion/neogeoMotion.cs index 0a55ffd..acac3cc 100644 --- a/MAME.Core/Motion/neogeoMotion.cs +++ b/MAME.Core/Motion/neogeoMotion.cs @@ -35,58 +35,5 @@ namespace MAME.Core.Common 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); - } - } - } } } diff --git a/MAME.Core/cpu/m6502/M6502.cs b/MAME.Core/cpu/m6502/M6502.cs index 33a1a2a..f591157 100644 --- a/MAME.Core/cpu/m6502/M6502.cs +++ b/MAME.Core/cpu/m6502/M6502.cs @@ -1,6 +1,7 @@ using mame; using System; using System.IO; +//using System.IO; namespace cpu.m6502 { @@ -140,15 +141,6 @@ 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 { @@ -189,26 +181,8 @@ 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) diff --git a/MAME.Core/emu/Crosshair.cs b/MAME.Core/emu/Crosshair.cs index 4f01b4f..8887564 100644 --- a/MAME.Core/emu/Crosshair.cs +++ b/MAME.Core/emu/Crosshair.cs @@ -1,4 +1,4 @@ -using Bitmap = MAME.Core.AxiBitmap.AxiBitmap; + using Color = MAME.Core.AxiBitmap.AxiColor; namespace mame @@ -9,7 +9,6 @@ namespace mame { 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];*/ @@ -86,7 +85,6 @@ namespace mame { 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) @@ -99,7 +97,6 @@ namespace mame case "opwolfp": global.used[0] = true; global.visible[0] = true; - create_bitmap(0); Video.drawcrosshair = Video.drawcrosshair_opwolf; break; default: @@ -107,30 +104,6 @@ namespace mame 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; diff --git a/MAME.Core/emu/Gdi.cs b/MAME.Core/emu/Gdi.cs index 3dbc79a..aa39164 100644 --- a/MAME.Core/emu/Gdi.cs +++ b/MAME.Core/emu/Gdi.cs @@ -1,8 +1,6 @@ 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 { @@ -34,17 +32,6 @@ namespace mame // 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; @@ -67,33 +54,6 @@ namespace mame return result; }*/ - /// - /// - /// - /// - /// - /// - 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; - } /// /// @@ -184,23 +144,23 @@ namespace mame { try { - 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; - } + //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); } @@ -210,37 +170,6 @@ namespace mame } } - 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 }; - } - } - } - - } } \ No newline at end of file diff --git a/MAME.Core/emu/Inptport.cs b/MAME.Core/emu/Inptport.cs index 3c42d15..08ff6f3 100644 --- a/MAME.Core/emu/Inptport.cs +++ b/MAME.Core/emu/Inptport.cs @@ -643,13 +643,13 @@ namespace mame int value2; value2 = apply_analog_min_max(analog, analog.accum); analog.previous = analog.accum = value2; - if (Keyboard.IsPressed(Key.K)) + if (Keyboard.IsPressed(Corekey.K)) { keypressed = true; delta -= analog.delta * 0x200; analog.lastdigital = 1; } - if (Keyboard.IsPressed(Key.L)) + if (Keyboard.IsPressed(Corekey.L)) { keypressed = true; delta += analog.delta * 0x200; @@ -678,13 +678,13 @@ namespace mame int value2; value2 = apply_analog_min_max(analog, analog.accum); analog.previous = analog.accum = value2; - if (Keyboard.IsPressed(Key.NumPad2)) + if (Keyboard.IsPressed(Corekey.NumPad2)) { keypressed = true; delta -= analog.delta * 0x200; analog.lastdigital = 1; } - if (Keyboard.IsPressed(Key.NumPad3)) + if (Keyboard.IsPressed(Corekey.NumPad3)) { keypressed = true; delta += analog.delta * 0x200; @@ -701,13 +701,13 @@ namespace mame int value2; value2 = apply_analog_min_max(analog, analog.accum); analog.previous = analog.accum = value2; - if (Keyboard.IsPressed(Key.U)) + if (Keyboard.IsPressed(Corekey.U)) { keypressed = true; delta -= analog_p0.delta * 0x200; analog.lastdigital = 1; } - if (Keyboard.IsPressed(Key.I)) + if (Keyboard.IsPressed(Corekey.I)) { keypressed = true; delta += analog_p0.delta * 0x200; @@ -724,13 +724,13 @@ namespace mame int value2; value2 = apply_analog_min_max(analog, analog.accum); analog.previous = analog.accum = value2; - if (Keyboard.IsPressed(Key.NumPad4)) + if (Keyboard.IsPressed(Corekey.NumPad4)) { keypressed = true; delta -= analog.delta * 0x200; analog.lastdigital = 1; } - if (Keyboard.IsPressed(Key.NumPad5)) + if (Keyboard.IsPressed(Corekey.NumPad5)) { keypressed = true; delta += analog.delta * 0x200; @@ -747,13 +747,13 @@ namespace mame int value2; value2 = apply_analog_min_max(analog, analog.accum); analog.previous = analog.accum = value2; - if (Keyboard.IsPressed(Key.A)) + if (Keyboard.IsPressed(Corekey.A)) { keypressed = true; delta -= analog.delta * 0x200; analog.lastdigital = 1; } - if (Keyboard.IsPressed(Key.D)) + if (Keyboard.IsPressed(Corekey.D)) { keypressed = true; delta += analog.delta * 0x200; @@ -770,13 +770,13 @@ namespace mame int value2; value2 = apply_analog_min_max(analog, analog.accum); analog.previous = analog.accum = value2; - if (Keyboard.IsPressed(Key.S)) + if (Keyboard.IsPressed(Corekey.S)) { keypressed = true; delta -= analog.delta * 0x200; analog.lastdigital = 1; } - if (Keyboard.IsPressed(Key.W)) + if (Keyboard.IsPressed(Corekey.W)) { keypressed = true; delta += analog.delta * 0x200; @@ -793,13 +793,13 @@ namespace mame int value2; value2 = apply_analog_min_max(analog, analog.accum); analog.previous = analog.accum = value2; - if (Keyboard.IsPressed(Key.A)) + if (Keyboard.IsPressed(Corekey.A)) { keypressed = true; delta -= analog.delta * 0x200; analog.lastdigital = 1; } - if (Keyboard.IsPressed(Key.D)) + if (Keyboard.IsPressed(Corekey.D)) { keypressed = true; delta += analog.delta * 0x200; @@ -816,13 +816,13 @@ namespace mame int value2; value2 = apply_analog_min_max(analog, analog.accum); analog.previous = analog.accum = value2; - if (Keyboard.IsPressed(Key.Left)) + if (Keyboard.IsPressed(Corekey.Left)) { keypressed = true; delta -= analog.delta * 0x200; analog.lastdigital = 1; } - if (Keyboard.IsPressed(Key.Right)) + if (Keyboard.IsPressed(Corekey.Right)) { keypressed = true; delta += analog.delta * 0x200; @@ -847,13 +847,13 @@ namespace mame delta = rawvalue; analog.lastdigital = 0; } - if (Keyboard.IsPressed(Key.A)) + if (Keyboard.IsPressed(Corekey.A)) { keypressed = true; delta -= analog.delta * 0x200; analog.lastdigital = 1; } - if (Keyboard.IsPressed(Key.D)) + if (Keyboard.IsPressed(Corekey.D)) { keypressed = true; delta += analog.delta * 0x200; @@ -892,13 +892,13 @@ namespace mame delta = rawvalue; analog.lastdigital = 0; } - if (Keyboard.IsPressed(Key.W)) + if (Keyboard.IsPressed(Corekey.W)) { keypressed = true; delta -= analog.delta * 0x200; analog.lastdigital = 1; } - if (Keyboard.IsPressed(Key.S)) + if (Keyboard.IsPressed(Corekey.S)) { keypressed = true; delta += analog.delta * 0x200; diff --git a/MAME.Core/emu/KeyStruct.cs b/MAME.Core/emu/KeyStruct.cs index 8a22b01..cd37985 100644 --- a/MAME.Core/emu/KeyStruct.cs +++ b/MAME.Core/emu/KeyStruct.cs @@ -6,18 +6,18 @@ namespace mame public partial class Inptport { private static List lks; - public static List lk; + public static List lk; public class KeyStruct { - public Key key; + public Corekey key; public char c; - public KeyStruct(Key _key, char _c) + public KeyStruct(Corekey _key, char _c) { key = _key; c = _c; } } - public static char getcharbykey(Key key1) + public static char getcharbykey(Corekey key1) { char c1 = ' '; foreach (KeyStruct ks in lks) @@ -32,80 +32,80 @@ namespace mame } public static void input_init() { - lk = new List(); - 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); + lk = new List(); + 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); lks = new List(); - 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')); + 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')); } } } diff --git a/MAME.Core/emu/Keyboard.cs b/MAME.Core/emu/Keyboard.cs index ceb39da..12a4552 100644 --- a/MAME.Core/emu/Keyboard.cs +++ b/MAME.Core/emu/Keyboard.cs @@ -14,11 +14,11 @@ namespace mame mKeyboard = ikb; } - public static bool IsPressed(Key key) + public static bool IsPressed(Corekey key) { return mKeyboard.IsPressed(key); } - public static bool IsTriggered(Key key) + public static bool IsTriggered(Corekey key) { return mKeyboard.IsTriggered(key); } diff --git a/MAME.Core/emu/Mame.cs b/MAME.Core/emu/Mame.cs index fd1724d..95d9990 100644 --- a/MAME.Core/emu/Mame.cs +++ b/MAME.Core/emu/Mame.cs @@ -1,7 +1,6 @@ using MAME.Core.Common; using MAME.Core.run_interface; using System.IO; -using System.Threading; namespace mame { @@ -181,7 +180,7 @@ namespace mame { Video.sDrawText = "Select position to save to"; Video.popup_text_end = Wintime.osd_ticks() + Wintime.ticks_per_second * 1000; - if (Keyboard.IsTriggered(Key.Escape)) + if (Keyboard.IsTriggered(Corekey.Escape)) { Video.sDrawText = "Save cancelled"; Video.popup_text_end = Wintime.osd_ticks() + Wintime.ticks_per_second * 2; @@ -190,30 +189,6 @@ namespace mame 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() @@ -224,7 +199,7 @@ namespace mame { Video.sDrawText = "Select position to load from"; Video.popup_text_end = Wintime.osd_ticks() + Wintime.ticks_per_second * 1000; - if (Keyboard.IsTriggered(Key.Escape)) + if (Keyboard.IsTriggered(Corekey.Escape)) { Video.sDrawText = "Load cancelled"; Video.popup_text_end = Wintime.osd_ticks() + Wintime.ticks_per_second * 2; @@ -233,43 +208,6 @@ namespace mame 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() @@ -282,7 +220,7 @@ namespace mame { Video.sDrawText = "Select position to record to"; Video.popup_text_end = Wintime.osd_ticks() + Wintime.ticks_per_second * 1000; - if (Keyboard.IsTriggered(Key.Escape)) + if (Keyboard.IsTriggered(Corekey.Escape)) { Video.sDrawText = "Record cancelled"; Video.popup_text_end = Wintime.osd_ticks() + Wintime.ticks_per_second * 2; @@ -291,39 +229,6 @@ namespace mame 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) { @@ -345,7 +250,7 @@ namespace mame { Video.sDrawText = "Select position to replay from"; Video.popup_text_end = Wintime.osd_ticks() + Wintime.ticks_per_second * 1000; - if (Keyboard.IsTriggered(Key.Escape)) + if (Keyboard.IsTriggered(Corekey.Escape)) { Video.sDrawText = "Replay cancelled"; Video.popup_text_end = Wintime.osd_ticks() + Wintime.ticks_per_second * 2; @@ -354,63 +259,6 @@ namespace mame 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) diff --git a/MAME.Core/emu/Motion.cs b/MAME.Core/emu/Motion.cs index c0c0d07..64cde73 100644 --- a/MAME.Core/emu/Motion.cs +++ b/MAME.Core/emu/Motion.cs @@ -194,15 +194,15 @@ namespace mame } if (Mame.is_foreground) { - if (Keyboard.IsPressed(Key.F3)) + if (Keyboard.IsPressed(Corekey.F3)) { cpurun(); Mame.playState = Mame.PlayState.PLAY_RESET; } - if (Keyboard.IsTriggered(Key.F7)) + if (Keyboard.IsTriggered(Corekey.F7)) { cpurun(); - if (Keyboard.IsPressed(Key.LeftShift) || Keyboard.IsPressed(Key.RightShift)) + if (Keyboard.IsPressed(Corekey.LeftShift) || Keyboard.IsPressed(Corekey.RightShift)) { Mame.playState = Mame.PlayState.PLAY_SAVE; } @@ -212,10 +212,10 @@ namespace mame } return; } - if (Keyboard.IsTriggered(Key.F8)) + if (Keyboard.IsTriggered(Corekey.F8)) { cpurun(); - if (Keyboard.IsPressed(Key.LeftShift) || Keyboard.IsPressed(Key.RightShift)) + if (Keyboard.IsPressed(Corekey.LeftShift) || Keyboard.IsPressed(Corekey.RightShift)) { if (Mame.playState == Mame.PlayState.PLAY_RECORDRUNNING) { @@ -232,9 +232,9 @@ namespace mame } return; } - if (Keyboard.IsTriggered(Key.P)) + if (Keyboard.IsTriggered(Corekey.P)) { - if (is_paused && (Keyboard.IsPressed(Key.LeftShift) || Keyboard.IsPressed(Key.RightShift))) + if (is_paused && (Keyboard.IsPressed(Corekey.LeftShift) || Keyboard.IsPressed(Corekey.RightShift))) { single_step = true; Mame.mame_pause(false); @@ -244,7 +244,7 @@ namespace mame Mame.mame_pause(!Mame.mame_is_paused()); } } - if (Keyboard.IsTriggered(Key.F10)) + if (Keyboard.IsTriggered(Corekey.F10)) { Keyboard.bF10 = true; bool b1 = Video.global_throttle; diff --git a/MAME.Core/emu/Video.cs b/MAME.Core/emu/Video.cs index cdcd423..da9d3bf 100644 --- a/MAME.Core/emu/Video.cs +++ b/MAME.Core/emu/Video.cs @@ -1,7 +1,6 @@ using MAME.Core.run_interface; using System; using System.IO; -using Bitmap = MAME.Core.AxiBitmap.AxiBitmap; namespace mame { @@ -42,8 +41,6 @@ namespace mame 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; @@ -109,15 +106,10 @@ namespace mame 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; @@ -133,15 +125,10 @@ namespace mame 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,13 +144,10 @@ namespace mame 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) @@ -190,13 +174,10 @@ namespace mame 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; @@ -216,8 +197,6 @@ namespace mame 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; @@ -237,8 +216,6 @@ namespace mame 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; @@ -255,13 +232,9 @@ namespace mame 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; @@ -278,12 +251,9 @@ namespace mame 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; @@ -300,12 +270,9 @@ namespace mame 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; @@ -325,8 +292,6 @@ namespace mame 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; @@ -346,8 +311,6 @@ namespace mame 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; @@ -391,8 +354,6 @@ namespace mame 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; @@ -415,8 +376,6 @@ namespace mame 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; @@ -438,8 +397,6 @@ namespace mame 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; @@ -455,8 +412,6 @@ namespace mame 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) { @@ -607,8 +562,6 @@ namespace mame 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; @@ -633,8 +586,6 @@ namespace mame 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; @@ -645,7 +596,6 @@ namespace mame screenstate.scantime = screenstate.frame_period / screenstate.height; screenstate.pixeltime = screenstate.frame_period / (screenstate.height * screenstate.width); screenstate.frame_number = 0; - 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); diff --git a/MAME.Core/mame/capcom/Input.cs b/MAME.Core/mame/capcom/Input.cs index 06683f2..b41fb6f 100644 --- a/MAME.Core/mame/capcom/Input.cs +++ b/MAME.Core/mame/capcom/Input.cs @@ -6,7 +6,7 @@ namespace mame { public static void loop_inputports_gng() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { bytes &= unchecked((byte)~0x40); } @@ -14,7 +14,7 @@ namespace mame { bytes |= 0x40; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { bytes &= unchecked((byte)~0x80); } @@ -22,7 +22,7 @@ namespace mame { bytes |= 0x80; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { bytes &= unchecked((byte)~0x01); } @@ -30,7 +30,7 @@ namespace mame { bytes |= 0x01; } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { bytes &= unchecked((byte)~0x02); } @@ -38,7 +38,7 @@ namespace mame { bytes |= 0x02; } - if (Keyboard.IsPressed(Key.D)) + if (Keyboard.IsPressed(Corekey.D)) { byte1 &= unchecked((byte)~0x01); } @@ -46,7 +46,7 @@ namespace mame { byte1 |= 0x01; } - if (Keyboard.IsPressed(Key.A)) + if (Keyboard.IsPressed(Corekey.A)) { byte1 &= unchecked((byte)~0x02); } @@ -54,7 +54,7 @@ namespace mame { byte1 |= 0x02; } - if (Keyboard.IsPressed(Key.S)) + if (Keyboard.IsPressed(Corekey.S)) { byte1 &= unchecked((byte)~0x04); } @@ -62,7 +62,7 @@ namespace mame { byte1 |= 0x04; } - if (Keyboard.IsPressed(Key.W)) + if (Keyboard.IsPressed(Corekey.W)) { byte1 &= unchecked((byte)~0x08); } @@ -70,7 +70,7 @@ namespace mame { byte1 |= 0x08; } - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { byte1 &= unchecked((byte)~0x10); } @@ -78,7 +78,7 @@ namespace mame { byte1 |= 0x10; } - if (Keyboard.IsPressed(Key.K)) + if (Keyboard.IsPressed(Corekey.K)) { byte1 &= unchecked((byte)~0x20); } @@ -86,7 +86,7 @@ namespace mame { byte1 |= 0x20; } - if (Keyboard.IsPressed(Key.Right)) + if (Keyboard.IsPressed(Corekey.Right)) { byte2 &= unchecked((byte)~0x01); } @@ -94,7 +94,7 @@ namespace mame { byte2 |= 0x01; } - if (Keyboard.IsPressed(Key.Left)) + if (Keyboard.IsPressed(Corekey.Left)) { byte2 &= unchecked((byte)~0x02); } @@ -102,7 +102,7 @@ namespace mame { byte2 |= 0x02; } - if (Keyboard.IsPressed(Key.Down)) + if (Keyboard.IsPressed(Corekey.Down)) { byte2 &= unchecked((byte)~0x04); } @@ -110,7 +110,7 @@ namespace mame { byte2 |= 0x04; } - if (Keyboard.IsPressed(Key.Up)) + if (Keyboard.IsPressed(Corekey.Up)) { byte2 &= unchecked((byte)~0x08); } @@ -118,7 +118,7 @@ namespace mame { byte2 |= 0x08; } - if (Keyboard.IsPressed(Key.NumPad1)) + if (Keyboard.IsPressed(Corekey.NumPad1)) { byte2 &= unchecked((byte)~0x10); } @@ -126,7 +126,7 @@ namespace mame { byte2 |= 0x10; } - if (Keyboard.IsPressed(Key.NumPad2)) + if (Keyboard.IsPressed(Corekey.NumPad2)) { byte2 &= unchecked((byte)~0x20); } @@ -134,7 +134,7 @@ namespace mame { byte2 |= 0x20; } - if (Keyboard.IsPressed(Key.R)) + if (Keyboard.IsPressed(Corekey.R)) { bytes &= unchecked((byte)~0x20); } @@ -145,7 +145,7 @@ namespace mame } public static void loop_inputports_diamond() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { bytes &= unchecked((byte)~0x40); } @@ -153,7 +153,7 @@ namespace mame { bytes |= 0x40; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { bytes &= unchecked((byte)~0x80); } @@ -161,7 +161,7 @@ namespace mame { bytes |= 0x80; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { bytes &= unchecked((byte)~0x01); } @@ -169,7 +169,7 @@ namespace mame { bytes |= 0x01; } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { bytes &= unchecked((byte)~0x02); } @@ -177,7 +177,7 @@ namespace mame { bytes |= 0x02; } - if (Keyboard.IsPressed(Key.D)) + if (Keyboard.IsPressed(Corekey.D)) { byte1 &= unchecked((byte)~0x01); } @@ -185,7 +185,7 @@ namespace mame { byte1 |= 0x01; } - if (Keyboard.IsPressed(Key.A)) + if (Keyboard.IsPressed(Corekey.A)) { byte1 &= unchecked((byte)~0x02); } @@ -193,7 +193,7 @@ namespace mame { byte1 |= 0x02; } - if (Keyboard.IsPressed(Key.S)) + if (Keyboard.IsPressed(Corekey.S)) { byte1 &= unchecked((byte)~0x04); } @@ -201,7 +201,7 @@ namespace mame { byte1 |= 0x04; } - if (Keyboard.IsPressed(Key.W)) + if (Keyboard.IsPressed(Corekey.W)) { byte1 &= unchecked((byte)~0x08); } @@ -209,7 +209,7 @@ namespace mame { byte1 |= 0x08; } - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { byte1 &= unchecked((byte)~0x10); } @@ -220,7 +220,7 @@ namespace mame } public static void loop_inputports_sfus() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { short0 &= ~0x0001; } @@ -228,7 +228,7 @@ namespace mame { short0 |= 0x0001; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { short0 &= ~0x0002; } @@ -236,7 +236,7 @@ namespace mame { short0 |= 0x0002; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { shorts &= ~0x0001; } @@ -244,7 +244,7 @@ namespace mame { shorts |= 0x0001; } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { shorts &= ~0x0002; } @@ -252,7 +252,7 @@ namespace mame { shorts |= 0x0002; } - if (Keyboard.IsPressed(Key.D)) + if (Keyboard.IsPressed(Corekey.D)) { short1 &= ~0x0001; } @@ -260,7 +260,7 @@ namespace mame { short1 |= 0x0001; } - if (Keyboard.IsPressed(Key.A)) + if (Keyboard.IsPressed(Corekey.A)) { short1 &= ~0x0002; } @@ -268,7 +268,7 @@ namespace mame { short1 |= 0x0002; } - if (Keyboard.IsPressed(Key.S)) + if (Keyboard.IsPressed(Corekey.S)) { short1 &= ~0x0004; } @@ -276,7 +276,7 @@ namespace mame { short1 |= 0x0004; } - if (Keyboard.IsPressed(Key.W)) + if (Keyboard.IsPressed(Corekey.W)) { short1 &= ~0x0008; } @@ -284,7 +284,7 @@ namespace mame { short1 |= 0x0008; } - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { short1 &= ~0x0010; } @@ -292,7 +292,7 @@ namespace mame { short1 |= 0x0010; } - if (Keyboard.IsPressed(Key.K)) + if (Keyboard.IsPressed(Corekey.K)) { short1 &= ~0x0020; } @@ -300,7 +300,7 @@ namespace mame { short1 |= 0x0020; } - if (Keyboard.IsPressed(Key.L)) + if (Keyboard.IsPressed(Corekey.L)) { short0 &= ~0x0200; } @@ -308,7 +308,7 @@ namespace mame { short0 |= 0x0200; } - if (Keyboard.IsPressed(Key.U)) + if (Keyboard.IsPressed(Corekey.U)) { short1 &= ~0x0040; } @@ -316,7 +316,7 @@ namespace mame { short1 |= 0x0040; } - if (Keyboard.IsPressed(Key.I)) + if (Keyboard.IsPressed(Corekey.I)) { short1 &= ~0x0080; } @@ -324,7 +324,7 @@ namespace mame { short1 |= 0x0080; } - if (Keyboard.IsPressed(Key.O)) + if (Keyboard.IsPressed(Corekey.O)) { short0 &= ~0x0004; } @@ -332,7 +332,7 @@ namespace mame { short0 |= 0x0004; } - if (Keyboard.IsPressed(Key.Right)) + if (Keyboard.IsPressed(Corekey.Right)) { short1 &= ~0x0100; } @@ -340,7 +340,7 @@ namespace mame { short1 |= 0x0100; } - if (Keyboard.IsPressed(Key.Left)) + if (Keyboard.IsPressed(Corekey.Left)) { short1 &= ~0x0200; } @@ -348,7 +348,7 @@ namespace mame { short1 |= 0x0200; } - if (Keyboard.IsPressed(Key.Down)) + if (Keyboard.IsPressed(Corekey.Down)) { short1 &= ~0x0400; } @@ -356,7 +356,7 @@ namespace mame { short1 |= 0x0400; } - if (Keyboard.IsPressed(Key.Up)) + if (Keyboard.IsPressed(Corekey.Up)) { short1 &= ~0x0800; } @@ -364,7 +364,7 @@ namespace mame { short1 |= 0x0800; } - if (Keyboard.IsPressed(Key.NumPad1)) + if (Keyboard.IsPressed(Corekey.NumPad1)) { short1 &= ~0x1000; } @@ -372,7 +372,7 @@ namespace mame { short1 |= 0x1000; } - if (Keyboard.IsPressed(Key.NumPad2)) + if (Keyboard.IsPressed(Corekey.NumPad2)) { short1 &= ~0x2000; } @@ -380,7 +380,7 @@ namespace mame { short1 |= 0x2000; } - if (Keyboard.IsPressed(Key.NumPad3)) + if (Keyboard.IsPressed(Corekey.NumPad3)) { short0 &= ~0x0400; } @@ -388,7 +388,7 @@ namespace mame { short0 |= 0x0400; } - if (Keyboard.IsPressed(Key.NumPad4)) + if (Keyboard.IsPressed(Corekey.NumPad4)) { short1 &= ~0x4000; } @@ -396,7 +396,7 @@ namespace mame { short1 |= 0x4000; } - if (Keyboard.IsPressed(Key.NumPad5)) + if (Keyboard.IsPressed(Corekey.NumPad5)) { short1 &= unchecked((short)~0x8000); } @@ -404,7 +404,7 @@ namespace mame { short1 |= unchecked((short)0x8000); } - if (Keyboard.IsPressed(Key.NumPad6)) + if (Keyboard.IsPressed(Corekey.NumPad6)) { short0 &= ~0x0100; } @@ -412,7 +412,7 @@ namespace mame { short0 |= 0x0100; } - if (Keyboard.IsPressed(Key.R)) + if (Keyboard.IsPressed(Corekey.R)) { shorts &= ~0x0004; } @@ -420,7 +420,7 @@ namespace mame { shorts |= 0x0004; } - if (Keyboard.IsPressed(Key.T)) + if (Keyboard.IsPressed(Corekey.T)) { //sbyte0 &= ~0x40; } @@ -431,7 +431,7 @@ namespace mame } public static void loop_inputports_sfjp() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { shortc &= ~0x0001; } @@ -439,7 +439,7 @@ namespace mame { shortc |= 0x0001; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { shortc &= ~0x0002; } @@ -447,7 +447,7 @@ namespace mame { shortc |= 0x0002; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { shorts &= ~0x0001; } @@ -455,7 +455,7 @@ namespace mame { shorts |= 0x0001; } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { shorts &= ~0x0002; } @@ -463,7 +463,7 @@ namespace mame { shorts |= 0x0002; } - if (Keyboard.IsPressed(Key.D)) + if (Keyboard.IsPressed(Corekey.D)) { short1 &= ~0x0001; } @@ -471,7 +471,7 @@ namespace mame { short1 |= 0x0001; } - if (Keyboard.IsPressed(Key.A)) + if (Keyboard.IsPressed(Corekey.A)) { short1 &= ~0x0002; } @@ -479,7 +479,7 @@ namespace mame { short1 |= 0x0002; } - if (Keyboard.IsPressed(Key.S)) + if (Keyboard.IsPressed(Corekey.S)) { short1 &= ~0x0004; } @@ -487,7 +487,7 @@ namespace mame { short1 |= 0x0004; } - if (Keyboard.IsPressed(Key.W)) + if (Keyboard.IsPressed(Corekey.W)) { short1 &= ~0x0008; } @@ -495,7 +495,7 @@ namespace mame { short1 |= 0x0008; } - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { short1 &= ~0x0100; } @@ -503,7 +503,7 @@ namespace mame { short1 |= 0x0100; } - if (Keyboard.IsPressed(Key.K)) + if (Keyboard.IsPressed(Corekey.K)) { short1 &= ~0x0200; } @@ -511,7 +511,7 @@ namespace mame { short1 |= 0x0200; } - if (Keyboard.IsPressed(Key.L)) + if (Keyboard.IsPressed(Corekey.L)) { short1 &= ~0x0400; } @@ -519,7 +519,7 @@ namespace mame { short1 |= 0x0400; } - if (Keyboard.IsPressed(Key.U)) + if (Keyboard.IsPressed(Corekey.U)) { short1 &= ~0x1000; } @@ -527,7 +527,7 @@ namespace mame { short1 |= 0x1000; } - if (Keyboard.IsPressed(Key.I)) + if (Keyboard.IsPressed(Corekey.I)) { short1 &= ~0x2000; } @@ -535,7 +535,7 @@ namespace mame { short1 |= 0x2000; } - if (Keyboard.IsPressed(Key.O)) + if (Keyboard.IsPressed(Corekey.O)) { short1 &= ~0x4000; } @@ -543,7 +543,7 @@ namespace mame { short1 |= 0x4000; } - if (Keyboard.IsPressed(Key.Right)) + if (Keyboard.IsPressed(Corekey.Right)) { short2 &= ~0x0001; } @@ -551,7 +551,7 @@ namespace mame { short2 |= 0x0001; } - if (Keyboard.IsPressed(Key.Left)) + if (Keyboard.IsPressed(Corekey.Left)) { short2 &= ~0x0002; } @@ -559,7 +559,7 @@ namespace mame { short2 |= 0x0002; } - if (Keyboard.IsPressed(Key.Down)) + if (Keyboard.IsPressed(Corekey.Down)) { short2 &= ~0x0004; } @@ -567,7 +567,7 @@ namespace mame { short2 |= 0x0004; } - if (Keyboard.IsPressed(Key.Up)) + if (Keyboard.IsPressed(Corekey.Up)) { short2 &= ~0x0008; } @@ -575,7 +575,7 @@ namespace mame { short2 |= 0x0008; } - if (Keyboard.IsPressed(Key.NumPad1)) + if (Keyboard.IsPressed(Corekey.NumPad1)) { short2 &= ~0x0100; } @@ -583,7 +583,7 @@ namespace mame { short2 |= 0x0100; } - if (Keyboard.IsPressed(Key.NumPad2)) + if (Keyboard.IsPressed(Corekey.NumPad2)) { short2 &= ~0x0200; } @@ -591,7 +591,7 @@ namespace mame { short2 |= 0x0200; } - if (Keyboard.IsPressed(Key.NumPad3)) + if (Keyboard.IsPressed(Corekey.NumPad3)) { short2 &= ~0x0400; } @@ -599,7 +599,7 @@ namespace mame { short2 |= 0x0400; } - if (Keyboard.IsPressed(Key.NumPad4)) + if (Keyboard.IsPressed(Corekey.NumPad4)) { short2 &= ~0x1000; } @@ -607,7 +607,7 @@ namespace mame { short2 |= 0x1000; } - if (Keyboard.IsPressed(Key.NumPad5)) + if (Keyboard.IsPressed(Corekey.NumPad5)) { short2 &= ~0x2000; } @@ -615,7 +615,7 @@ namespace mame { short2 |= 0x2000; } - if (Keyboard.IsPressed(Key.NumPad6)) + if (Keyboard.IsPressed(Corekey.NumPad6)) { short2 &= ~0x4000; } @@ -623,7 +623,7 @@ namespace mame { short2 |= 0x4000; } - if (Keyboard.IsPressed(Key.R)) + if (Keyboard.IsPressed(Corekey.R)) { shorts &= ~0x0004; } @@ -631,7 +631,7 @@ namespace mame { shorts |= 0x0004; } - if (Keyboard.IsPressed(Key.T)) + if (Keyboard.IsPressed(Corekey.T)) { //sbyte0 &= ~0x40; } @@ -642,7 +642,7 @@ namespace mame } public static void loop_inputports_sfan() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { shortc &= ~0x0001; } @@ -650,7 +650,7 @@ namespace mame { shortc |= 0x0001; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { shortc &= ~0x0002; } @@ -658,7 +658,7 @@ namespace mame { shortc |= 0x0002; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { shorts &= ~0x0001; } @@ -666,7 +666,7 @@ namespace mame { shorts |= 0x0001; } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { shorts &= ~0x0002; } @@ -674,7 +674,7 @@ namespace mame { shorts |= 0x0002; } - if (Keyboard.IsPressed(Key.D)) + if (Keyboard.IsPressed(Corekey.D)) { short0 &= ~0x0001; } @@ -682,7 +682,7 @@ namespace mame { short0 |= 0x0001; } - if (Keyboard.IsPressed(Key.A)) + if (Keyboard.IsPressed(Corekey.A)) { short0 &= ~0x0002; } @@ -690,7 +690,7 @@ namespace mame { short0 |= 0x0002; } - if (Keyboard.IsPressed(Key.S)) + if (Keyboard.IsPressed(Corekey.S)) { short0 &= ~0x0004; } @@ -698,7 +698,7 @@ namespace mame { short0 |= 0x0004; } - if (Keyboard.IsPressed(Key.W)) + if (Keyboard.IsPressed(Corekey.W)) { short0 &= ~0x0008; } @@ -706,7 +706,7 @@ namespace mame { short0 |= 0x0008; } - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { sbyte1 |= 0x01; } @@ -714,7 +714,7 @@ namespace mame { sbyte1 &= ~0x01; } - if (Keyboard.IsPressed(Key.K)) + if (Keyboard.IsPressed(Corekey.K)) { sbyte1 |= 0x02; } @@ -722,7 +722,7 @@ namespace mame { sbyte1 &= ~0x02; } - if (Keyboard.IsPressed(Key.L)) + if (Keyboard.IsPressed(Corekey.L)) { sbyte1 |= 0x04; } @@ -730,7 +730,7 @@ namespace mame { sbyte1 &= ~0x04; } - if (Keyboard.IsPressed(Key.U)) + if (Keyboard.IsPressed(Corekey.U)) { sbyte2 |= 0x01; } @@ -738,7 +738,7 @@ namespace mame { sbyte2 &= ~0x01; } - if (Keyboard.IsPressed(Key.I)) + if (Keyboard.IsPressed(Corekey.I)) { sbyte2 |= 0x02; } @@ -746,7 +746,7 @@ namespace mame { sbyte2 &= ~0x02; } - if (Keyboard.IsPressed(Key.O)) + if (Keyboard.IsPressed(Corekey.O)) { sbyte2 |= 0x04; } @@ -754,7 +754,7 @@ namespace mame { sbyte2 &= ~0x04; } - if (Keyboard.IsPressed(Key.Right)) + if (Keyboard.IsPressed(Corekey.Right)) { short0 &= ~0x0100; } @@ -762,7 +762,7 @@ namespace mame { short0 |= 0x0100; } - if (Keyboard.IsPressed(Key.Left)) + if (Keyboard.IsPressed(Corekey.Left)) { short0 &= ~0x0200; } @@ -770,7 +770,7 @@ namespace mame { short0 |= 0x0200; } - if (Keyboard.IsPressed(Key.Down)) + if (Keyboard.IsPressed(Corekey.Down)) { short0 &= ~0x0400; } @@ -778,7 +778,7 @@ namespace mame { short0 |= 0x0400; } - if (Keyboard.IsPressed(Key.Up)) + if (Keyboard.IsPressed(Corekey.Up)) { short0 &= ~0x0800; } @@ -786,7 +786,7 @@ namespace mame { short0 |= 0x0800; } - if (Keyboard.IsPressed(Key.NumPad1)) + if (Keyboard.IsPressed(Corekey.NumPad1)) { sbyte3 |= 0x01; } @@ -794,7 +794,7 @@ namespace mame { sbyte3 &= ~0x01; } - if (Keyboard.IsPressed(Key.NumPad2)) + if (Keyboard.IsPressed(Corekey.NumPad2)) { sbyte3 |= 0x02; } @@ -802,7 +802,7 @@ namespace mame { sbyte3 &= ~0x02; } - if (Keyboard.IsPressed(Key.NumPad3)) + if (Keyboard.IsPressed(Corekey.NumPad3)) { sbyte3 |= 0x04; } @@ -810,7 +810,7 @@ namespace mame { sbyte3 &= ~0x04; } - if (Keyboard.IsPressed(Key.NumPad4)) + if (Keyboard.IsPressed(Corekey.NumPad4)) { sbyte4 |= 0x01; } @@ -818,7 +818,7 @@ namespace mame { sbyte4 &= ~0x01; } - if (Keyboard.IsPressed(Key.NumPad5)) + if (Keyboard.IsPressed(Corekey.NumPad5)) { sbyte4 &= ~0x02; } @@ -826,7 +826,7 @@ namespace mame { sbyte4 |= 0x02; } - if (Keyboard.IsPressed(Key.NumPad6)) + if (Keyboard.IsPressed(Corekey.NumPad6)) { sbyte4 |= 0x04; } @@ -834,7 +834,7 @@ namespace mame { sbyte4 &= ~0x04; } - if (Keyboard.IsPressed(Key.R)) + if (Keyboard.IsPressed(Corekey.R)) { shorts &= ~0x0004; } @@ -842,7 +842,7 @@ namespace mame { shorts |= 0x0004; } - if (Keyboard.IsPressed(Key.T)) + if (Keyboard.IsPressed(Corekey.T)) { //sbyte0 &= ~0x40; } diff --git a/MAME.Core/mame/cps/Gdi.cs b/MAME.Core/mame/cps/Gdi.cs index 066e6a0..dcee8e0 100644 --- a/MAME.Core/mame/cps/Gdi.cs +++ b/MAME.Core/mame/cps/Gdi.cs @@ -1,4 +1,4 @@ -using Bitmap = MAME.Core.AxiBitmap.AxiBitmap; + using Color = MAME.Core.AxiBitmap.AxiColor; namespace mame @@ -29,8 +29,6 @@ namespace mame 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() @@ -45,11 +43,6 @@ namespace mame 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]; diff --git a/MAME.Core/mame/cps/Input.cs b/MAME.Core/mame/cps/Input.cs index 953c6fb..0392811 100644 --- a/MAME.Core/mame/cps/Input.cs +++ b/MAME.Core/mame/cps/Input.cs @@ -6,7 +6,7 @@ namespace mame { public static void loop_inputports_cps1_6b() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { sbyte0 &= ~0x01; } @@ -14,7 +14,7 @@ namespace mame { sbyte0 |= 0x01; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { sbyte0 &= ~0x02; } @@ -22,7 +22,7 @@ namespace mame { sbyte0 |= 0x02; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { sbyte0 &= ~0x10; } @@ -30,7 +30,7 @@ namespace mame { sbyte0 |= 0x10; } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { sbyte0 &= ~0x20; } @@ -38,7 +38,7 @@ namespace mame { sbyte0 |= 0x20; } - if (Keyboard.IsPressed(Key.D)) + if (Keyboard.IsPressed(Corekey.D)) { short1 &= ~0x01; } @@ -46,7 +46,7 @@ namespace mame { short1 |= 0x01; } - if (Keyboard.IsPressed(Key.A)) + if (Keyboard.IsPressed(Corekey.A)) { short1 &= ~0x02; } @@ -54,7 +54,7 @@ namespace mame { short1 |= 0x02; } - if (Keyboard.IsPressed(Key.S)) + if (Keyboard.IsPressed(Corekey.S)) { short1 &= ~0x04; } @@ -62,7 +62,7 @@ namespace mame { short1 |= 0x04; } - if (Keyboard.IsPressed(Key.W)) + if (Keyboard.IsPressed(Corekey.W)) { short1 &= ~0x08; } @@ -70,7 +70,7 @@ namespace mame { short1 |= 0x08; } - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { short1 &= ~0x10; } @@ -78,7 +78,7 @@ namespace mame { short1 |= 0x10; } - if (Keyboard.IsPressed(Key.K)) + if (Keyboard.IsPressed(Corekey.K)) { short1 &= ~0x20; } @@ -86,7 +86,7 @@ namespace mame { short1 |= 0x20; } - if (Keyboard.IsPressed(Key.L)) + if (Keyboard.IsPressed(Corekey.L)) { short1 &= ~0x40; } @@ -94,7 +94,7 @@ namespace mame { short1 |= 0x40; } - if (Keyboard.IsPressed(Key.U)) + if (Keyboard.IsPressed(Corekey.U)) { short2 &= ~0x01; } @@ -102,7 +102,7 @@ namespace mame { short2 |= 0x01; } - if (Keyboard.IsPressed(Key.I)) + if (Keyboard.IsPressed(Corekey.I)) { short2 &= ~0x02; } @@ -110,7 +110,7 @@ namespace mame { short2 |= 0x02; } - if (Keyboard.IsPressed(Key.O)) + if (Keyboard.IsPressed(Corekey.O)) { short2 &= ~0x04; } @@ -118,7 +118,7 @@ namespace mame { short2 |= 0x04; } - if (Keyboard.IsPressed(Key.Right)) + if (Keyboard.IsPressed(Corekey.Right)) { short1 &= ~0x0100; } @@ -126,7 +126,7 @@ namespace mame { short1 |= 0x0100; } - if (Keyboard.IsPressed(Key.Left)) + if (Keyboard.IsPressed(Corekey.Left)) { short1 &= ~0x0200; } @@ -134,7 +134,7 @@ namespace mame { short1 |= 0x0200; } - if (Keyboard.IsPressed(Key.Down)) + if (Keyboard.IsPressed(Corekey.Down)) { short1 &= ~0x0400; } @@ -142,7 +142,7 @@ namespace mame { short1 |= 0x0400; } - if (Keyboard.IsPressed(Key.Up)) + if (Keyboard.IsPressed(Corekey.Up)) { short1 &= ~0x0800; } @@ -150,7 +150,7 @@ namespace mame { short1 |= 0x0800; } - if (Keyboard.IsPressed(Key.NumPad1)) + if (Keyboard.IsPressed(Corekey.NumPad1)) { short1 &= ~0x1000; } @@ -158,7 +158,7 @@ namespace mame { short1 |= 0x1000; } - if (Keyboard.IsPressed(Key.NumPad2)) + if (Keyboard.IsPressed(Corekey.NumPad2)) { short1 &= ~0x2000; } @@ -166,7 +166,7 @@ namespace mame { short1 |= 0x2000; } - if (Keyboard.IsPressed(Key.NumPad3)) + if (Keyboard.IsPressed(Corekey.NumPad3)) { short1 &= ~0x4000; } @@ -174,7 +174,7 @@ namespace mame { short1 |= 0x4000; } - if (Keyboard.IsPressed(Key.NumPad4)) + if (Keyboard.IsPressed(Corekey.NumPad4)) { short2 &= ~0x10; } @@ -182,7 +182,7 @@ namespace mame { short2 |= 0x10; } - if (Keyboard.IsPressed(Key.NumPad5)) + if (Keyboard.IsPressed(Corekey.NumPad5)) { short2 &= ~0x20; } @@ -190,7 +190,7 @@ namespace mame { short2 |= 0x20; } - if (Keyboard.IsPressed(Key.NumPad6)) + if (Keyboard.IsPressed(Corekey.NumPad6)) { short2 &= ~0x40; } @@ -198,7 +198,7 @@ namespace mame { short2 |= 0x40; } - if (Keyboard.IsPressed(Key.R)) + if (Keyboard.IsPressed(Corekey.R)) { sbyte0 &= ~0x04; } @@ -206,7 +206,7 @@ namespace mame { sbyte0 |= 0x04; } - if (Keyboard.IsPressed(Key.T)) + if (Keyboard.IsPressed(Corekey.T)) { sbyte0 &= ~0x40; } @@ -217,7 +217,7 @@ namespace mame } public static void loop_inputports_cps1_forgottn() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { sbyte0 &= ~0x01; } @@ -225,7 +225,7 @@ namespace mame { sbyte0 |= 0x01; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { sbyte0 &= ~0x02; } @@ -233,7 +233,7 @@ namespace mame { sbyte0 |= 0x02; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { sbyte0 &= ~0x10; } @@ -241,7 +241,7 @@ namespace mame { sbyte0 |= 0x10; } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { sbyte0 &= ~0x20; } @@ -249,7 +249,7 @@ namespace mame { sbyte0 |= 0x20; } - if (Keyboard.IsPressed(Key.D)) + if (Keyboard.IsPressed(Corekey.D)) { short1 &= ~0x01; } @@ -257,7 +257,7 @@ namespace mame { short1 |= 0x01; } - if (Keyboard.IsPressed(Key.A)) + if (Keyboard.IsPressed(Corekey.A)) { short1 &= ~0x02; } @@ -265,7 +265,7 @@ namespace mame { short1 |= 0x02; } - if (Keyboard.IsPressed(Key.S)) + if (Keyboard.IsPressed(Corekey.S)) { short1 &= ~0x04; } @@ -273,7 +273,7 @@ namespace mame { short1 |= 0x04; } - if (Keyboard.IsPressed(Key.W)) + if (Keyboard.IsPressed(Corekey.W)) { short1 &= ~0x08; } @@ -281,7 +281,7 @@ namespace mame { short1 |= 0x08; } - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { short1 &= ~0x10; } @@ -289,7 +289,7 @@ namespace mame { short1 |= 0x10; } - if (Keyboard.IsPressed(Key.Right)) + if (Keyboard.IsPressed(Corekey.Right)) { short1 &= ~0x0100; } @@ -297,7 +297,7 @@ namespace mame { short1 |= 0x0100; } - if (Keyboard.IsPressed(Key.Left)) + if (Keyboard.IsPressed(Corekey.Left)) { short1 &= ~0x0200; } @@ -305,7 +305,7 @@ namespace mame { short1 |= 0x0200; } - if (Keyboard.IsPressed(Key.Down)) + if (Keyboard.IsPressed(Corekey.Down)) { short1 &= ~0x0400; } @@ -313,7 +313,7 @@ namespace mame { short1 |= 0x0400; } - if (Keyboard.IsPressed(Key.Up)) + if (Keyboard.IsPressed(Corekey.Up)) { short1 &= ~0x0800; } @@ -321,7 +321,7 @@ namespace mame { short1 |= 0x0800; } - if (Keyboard.IsPressed(Key.NumPad1)) + if (Keyboard.IsPressed(Corekey.NumPad1)) { short1 &= ~0x1000; } @@ -329,7 +329,7 @@ namespace mame { short1 |= 0x1000; } - if (Keyboard.IsPressed(Key.R)) + if (Keyboard.IsPressed(Corekey.R)) { sbyte0 &= ~0x04; } @@ -337,7 +337,7 @@ namespace mame { sbyte0 |= 0x04; } - if (Keyboard.IsPressed(Key.T)) + if (Keyboard.IsPressed(Corekey.T)) { sbyte0 &= ~0x40; } @@ -350,7 +350,7 @@ namespace mame } public static void loop_inputports_cps1_sf2hack() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { sbyte0 &= ~0x01; } @@ -358,7 +358,7 @@ namespace mame { sbyte0 |= 0x01; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { sbyte0 &= ~0x02; } @@ -366,7 +366,7 @@ namespace mame { sbyte0 |= 0x02; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { sbyte0 &= ~0x10; } @@ -374,7 +374,7 @@ namespace mame { sbyte0 |= 0x10; } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { sbyte0 &= ~0x20; } @@ -382,7 +382,7 @@ namespace mame { sbyte0 |= 0x20; } - if (Keyboard.IsPressed(Key.D)) + if (Keyboard.IsPressed(Corekey.D)) { short1 &= ~0x01; } @@ -390,7 +390,7 @@ namespace mame { short1 |= 0x01; } - if (Keyboard.IsPressed(Key.A)) + if (Keyboard.IsPressed(Corekey.A)) { short1 &= ~0x02; } @@ -398,7 +398,7 @@ namespace mame { short1 |= 0x02; } - if (Keyboard.IsPressed(Key.S)) + if (Keyboard.IsPressed(Corekey.S)) { short1 &= ~0x04; } @@ -406,7 +406,7 @@ namespace mame { short1 |= 0x04; } - if (Keyboard.IsPressed(Key.W)) + if (Keyboard.IsPressed(Corekey.W)) { short1 &= ~0x08; } @@ -414,7 +414,7 @@ namespace mame { short1 |= 0x08; } - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { short1 &= ~0x10; } @@ -422,7 +422,7 @@ namespace mame { short1 |= 0x10; } - if (Keyboard.IsPressed(Key.K)) + if (Keyboard.IsPressed(Corekey.K)) { short1 &= ~0x20; } @@ -430,7 +430,7 @@ namespace mame { short1 |= 0x20; } - if (Keyboard.IsPressed(Key.L)) + if (Keyboard.IsPressed(Corekey.L)) { short1 &= ~0x40; } @@ -438,7 +438,7 @@ namespace mame { short1 |= 0x40; } - if (Keyboard.IsPressed(Key.U)) + if (Keyboard.IsPressed(Corekey.U)) { short2 &= ~0x0100; } @@ -446,7 +446,7 @@ namespace mame { short2 |= 0x0100; } - if (Keyboard.IsPressed(Key.I)) + if (Keyboard.IsPressed(Corekey.I)) { short2 &= ~0x0200; } @@ -454,7 +454,7 @@ namespace mame { short2 |= 0x0200; } - if (Keyboard.IsPressed(Key.O)) + if (Keyboard.IsPressed(Corekey.O)) { short2 &= ~0x0400; } @@ -462,7 +462,7 @@ namespace mame { short2 |= 0x0400; } - if (Keyboard.IsPressed(Key.Right)) + if (Keyboard.IsPressed(Corekey.Right)) { short1 &= ~0x0100; } @@ -470,7 +470,7 @@ namespace mame { short1 |= 0x0100; } - if (Keyboard.IsPressed(Key.Left)) + if (Keyboard.IsPressed(Corekey.Left)) { short1 &= ~0x0200; } @@ -478,7 +478,7 @@ namespace mame { short1 |= 0x0200; } - if (Keyboard.IsPressed(Key.Down)) + if (Keyboard.IsPressed(Corekey.Down)) { short1 &= ~0x0400; } @@ -486,7 +486,7 @@ namespace mame { short1 |= 0x0400; } - if (Keyboard.IsPressed(Key.Up)) + if (Keyboard.IsPressed(Corekey.Up)) { short1 &= ~0x0800; } @@ -494,7 +494,7 @@ namespace mame { short1 |= 0x0800; } - if (Keyboard.IsPressed(Key.NumPad1)) + if (Keyboard.IsPressed(Corekey.NumPad1)) { short1 &= ~0x1000; } @@ -502,7 +502,7 @@ namespace mame { short1 |= 0x1000; } - if (Keyboard.IsPressed(Key.NumPad2)) + if (Keyboard.IsPressed(Corekey.NumPad2)) { short1 &= ~0x2000; } @@ -510,7 +510,7 @@ namespace mame { short1 |= 0x2000; } - if (Keyboard.IsPressed(Key.NumPad3)) + if (Keyboard.IsPressed(Corekey.NumPad3)) { short1 &= ~0x4000; } @@ -518,7 +518,7 @@ namespace mame { short1 |= 0x4000; } - if (Keyboard.IsPressed(Key.NumPad4)) + if (Keyboard.IsPressed(Corekey.NumPad4)) { short2 &= ~0x1000; } @@ -526,7 +526,7 @@ namespace mame { short2 |= 0x1000; } - if (Keyboard.IsPressed(Key.NumPad5)) + if (Keyboard.IsPressed(Corekey.NumPad5)) { short2 &= ~0x2000; } @@ -534,7 +534,7 @@ namespace mame { short2 |= 0x2000; } - if (Keyboard.IsPressed(Key.NumPad6)) + if (Keyboard.IsPressed(Corekey.NumPad6)) { short2 &= ~0x4000; } @@ -542,7 +542,7 @@ namespace mame { short2 |= 0x4000; } - if (Keyboard.IsPressed(Key.R)) + if (Keyboard.IsPressed(Corekey.R)) { sbyte0 &= ~0x04; } @@ -550,7 +550,7 @@ namespace mame { sbyte0 |= 0x04; } - if (Keyboard.IsPressed(Key.T)) + if (Keyboard.IsPressed(Corekey.T)) { sbyte0 &= ~0x40; } @@ -561,7 +561,7 @@ namespace mame } public static void loop_inputports_cps1_cworld2j() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { sbyte0 &= ~0x01; } @@ -569,7 +569,7 @@ namespace mame { sbyte0 |= 0x01; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { sbyte0 &= ~0x02; } @@ -577,7 +577,7 @@ namespace mame { sbyte0 |= 0x02; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { sbyte0 &= ~0x10; } @@ -585,7 +585,7 @@ namespace mame { sbyte0 |= 0x10; } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { sbyte0 &= ~0x20; } @@ -593,7 +593,7 @@ namespace mame { sbyte0 |= 0x20; } - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { short1 &= ~0x10; } @@ -601,7 +601,7 @@ namespace mame { short1 |= 0x10; } - if (Keyboard.IsPressed(Key.K)) + if (Keyboard.IsPressed(Corekey.K)) { short1 &= ~0x20; } @@ -609,7 +609,7 @@ namespace mame { short1 |= 0x20; } - if (Keyboard.IsPressed(Key.L)) + if (Keyboard.IsPressed(Corekey.L)) { short1 &= ~0x40; } @@ -617,7 +617,7 @@ namespace mame { short1 |= 0x40; } - if (Keyboard.IsPressed(Key.U)) + if (Keyboard.IsPressed(Corekey.U)) { short1 &= ~0x80; } @@ -625,7 +625,7 @@ namespace mame { short1 |= 0x80; } - if (Keyboard.IsPressed(Key.NumPad1)) + if (Keyboard.IsPressed(Corekey.NumPad1)) { short1 &= ~0x1000; } @@ -633,7 +633,7 @@ namespace mame { short1 |= 0x1000; } - if (Keyboard.IsPressed(Key.NumPad2)) + if (Keyboard.IsPressed(Corekey.NumPad2)) { short1 &= ~0x2000; } @@ -641,7 +641,7 @@ namespace mame { short1 |= 0x2000; } - if (Keyboard.IsPressed(Key.NumPad3)) + if (Keyboard.IsPressed(Corekey.NumPad3)) { short1 &= ~0x4000; } @@ -649,7 +649,7 @@ namespace mame { short1 |= 0x4000; } - if (Keyboard.IsPressed(Key.NumPad4)) + if (Keyboard.IsPressed(Corekey.NumPad4)) { short1 &= unchecked((short)~0x8000); } @@ -657,7 +657,7 @@ namespace mame { short1 |= unchecked((short)0x8000); } - if (Keyboard.IsPressed(Key.R)) + if (Keyboard.IsPressed(Corekey.R)) { sbyte0 &= ~0x04; } @@ -665,7 +665,7 @@ namespace mame { sbyte0 |= 0x04; } - if (Keyboard.IsPressed(Key.T)) + if (Keyboard.IsPressed(Corekey.T)) { sbyte0 &= ~0x40; } @@ -676,7 +676,7 @@ namespace mame } public static void loop_inputports_cps2_2p6b() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { short2 &= ~0x1000; } @@ -684,7 +684,7 @@ namespace mame { short2 |= 0x1000; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { short2 &= ~0x2000; } @@ -692,7 +692,7 @@ namespace mame { short2 |= 0x2000; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { short2 &= ~0x0100; } @@ -700,7 +700,7 @@ namespace mame { short2 |= 0x0100; } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { short2 &= ~0x0200; } @@ -708,7 +708,7 @@ namespace mame { short2 |= 0x0200; } - if (Keyboard.IsPressed(Key.D)) + if (Keyboard.IsPressed(Corekey.D)) { short0 &= ~0x0001; } @@ -716,7 +716,7 @@ namespace mame { short0 |= 0x0001; } - if (Keyboard.IsPressed(Key.A)) + if (Keyboard.IsPressed(Corekey.A)) { short0 &= ~0x0002; } @@ -724,7 +724,7 @@ namespace mame { short0 |= 0x0002; } - if (Keyboard.IsPressed(Key.S)) + if (Keyboard.IsPressed(Corekey.S)) { short0 &= ~0x0004; } @@ -732,7 +732,7 @@ namespace mame { short0 |= 0x0004; } - if (Keyboard.IsPressed(Key.W)) + if (Keyboard.IsPressed(Corekey.W)) { short0 &= ~0x0008; } @@ -740,7 +740,7 @@ namespace mame { short0 |= 0x0008; } - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { short0 &= ~0x0010; } @@ -748,7 +748,7 @@ namespace mame { short0 |= 0x0010; } - if (Keyboard.IsPressed(Key.K)) + if (Keyboard.IsPressed(Corekey.K)) { short0 &= ~0x0020; } @@ -756,7 +756,7 @@ namespace mame { short0 |= 0x0020; } - if (Keyboard.IsPressed(Key.L)) + if (Keyboard.IsPressed(Corekey.L)) { short0 &= ~0x0040; } @@ -764,7 +764,7 @@ namespace mame { short0 |= 0x0040; } - if (Keyboard.IsPressed(Key.U)) + if (Keyboard.IsPressed(Corekey.U)) { short1 &= ~0x0001; } @@ -772,7 +772,7 @@ namespace mame { short1 |= 0x0001; } - if (Keyboard.IsPressed(Key.I)) + if (Keyboard.IsPressed(Corekey.I)) { short1 &= ~0x0002; } @@ -780,7 +780,7 @@ namespace mame { short1 |= 0x0002; } - if (Keyboard.IsPressed(Key.O)) + if (Keyboard.IsPressed(Corekey.O)) { short1 &= ~0x0004; } @@ -788,7 +788,7 @@ namespace mame { short1 |= 0x0004; } - if (Keyboard.IsPressed(Key.Right)) + if (Keyboard.IsPressed(Corekey.Right)) { short0 &= ~0x0100; } @@ -796,7 +796,7 @@ namespace mame { short0 |= 0x0100; } - if (Keyboard.IsPressed(Key.Left)) + if (Keyboard.IsPressed(Corekey.Left)) { short0 &= ~0x0200; } @@ -804,7 +804,7 @@ namespace mame { short0 |= 0x0200; } - if (Keyboard.IsPressed(Key.Down)) + if (Keyboard.IsPressed(Corekey.Down)) { short0 &= ~0x0400; } @@ -812,7 +812,7 @@ namespace mame { short0 |= 0x0400; } - if (Keyboard.IsPressed(Key.Up)) + if (Keyboard.IsPressed(Corekey.Up)) { short0 &= ~0x0800; } @@ -820,7 +820,7 @@ namespace mame { short0 |= 0x0800; } - if (Keyboard.IsPressed(Key.NumPad1)) + if (Keyboard.IsPressed(Corekey.NumPad1)) { short0 &= ~0x1000; } @@ -828,7 +828,7 @@ namespace mame { short0 |= 0x1000; } - if (Keyboard.IsPressed(Key.NumPad2)) + if (Keyboard.IsPressed(Corekey.NumPad2)) { short0 &= ~0x2000; } @@ -836,7 +836,7 @@ namespace mame { short0 |= 0x2000; } - if (Keyboard.IsPressed(Key.NumPad3)) + if (Keyboard.IsPressed(Corekey.NumPad3)) { short0 &= ~0x4000; } @@ -844,7 +844,7 @@ namespace mame { short0 |= 0x4000; } - if (Keyboard.IsPressed(Key.NumPad4)) + if (Keyboard.IsPressed(Corekey.NumPad4)) { short1 &= ~0x0010; } @@ -852,7 +852,7 @@ namespace mame { short1 |= 0x0010; } - if (Keyboard.IsPressed(Key.NumPad5)) + if (Keyboard.IsPressed(Corekey.NumPad5)) { short1 &= ~0x0020; } @@ -860,7 +860,7 @@ namespace mame { short1 |= 0x0020; } - if (Keyboard.IsPressed(Key.NumPad6)) + if (Keyboard.IsPressed(Corekey.NumPad6)) { short2 &= ~0x4000; } @@ -868,7 +868,7 @@ namespace mame { short2 |= 0x4000; } - if (Keyboard.IsPressed(Key.R)) + if (Keyboard.IsPressed(Corekey.R)) { short2 &= ~0x0004; } @@ -876,7 +876,7 @@ namespace mame { short2 |= 0x0004; } - if (Keyboard.IsPressed(Key.T)) + if (Keyboard.IsPressed(Corekey.T)) { short2 &= ~0x0002; } @@ -887,7 +887,7 @@ namespace mame } public static void loop_inputports_cps2_pzloop2() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { short2 &= ~0x1000; } @@ -895,7 +895,7 @@ namespace mame { short2 |= 0x1000; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { short2 &= ~0x2000; } @@ -903,7 +903,7 @@ namespace mame { short2 |= 0x2000; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { short2 &= ~0x0100; } @@ -911,7 +911,7 @@ namespace mame { short2 |= 0x0100; } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { short2 &= ~0x0200; } @@ -919,7 +919,7 @@ namespace mame { short2 |= 0x0200; } - if (Keyboard.IsPressed(Key.D)) + if (Keyboard.IsPressed(Corekey.D)) { short0 &= ~0x0001; } @@ -927,7 +927,7 @@ namespace mame { short0 |= 0x0001; } - if (Keyboard.IsPressed(Key.A)) + if (Keyboard.IsPressed(Corekey.A)) { short0 &= ~0x0002; } @@ -935,7 +935,7 @@ namespace mame { short0 |= 0x0002; } - if (Keyboard.IsPressed(Key.S)) + if (Keyboard.IsPressed(Corekey.S)) { short0 &= ~0x0004; } @@ -943,7 +943,7 @@ namespace mame { short0 |= 0x0004; } - if (Keyboard.IsPressed(Key.W)) + if (Keyboard.IsPressed(Corekey.W)) { short0 &= ~0x0008; } @@ -959,7 +959,7 @@ namespace mame { short0 |= 0x000c; } - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { short0 &= ~0x0010; } @@ -967,7 +967,7 @@ namespace mame { short0 |= 0x0010; } - if (Keyboard.IsPressed(Key.K)) + if (Keyboard.IsPressed(Corekey.K)) { short0 &= ~0x0020; } @@ -975,7 +975,7 @@ namespace mame { short0 |= 0x0020; } - if (Keyboard.IsPressed(Key.L)) + if (Keyboard.IsPressed(Corekey.L)) { short0 &= ~0x0040; } @@ -983,7 +983,7 @@ namespace mame { short0 |= 0x0040; } - if (Keyboard.IsPressed(Key.U)) + if (Keyboard.IsPressed(Corekey.U)) { short1 &= ~0x0001; } @@ -991,7 +991,7 @@ namespace mame { short1 |= 0x0001; } - if (Keyboard.IsPressed(Key.I)) + if (Keyboard.IsPressed(Corekey.I)) { short1 &= ~0x0002; } @@ -999,7 +999,7 @@ namespace mame { short1 |= 0x0002; } - if (Keyboard.IsPressed(Key.O)) + if (Keyboard.IsPressed(Corekey.O)) { short1 &= ~0x0004; } @@ -1007,7 +1007,7 @@ namespace mame { short1 |= 0x0004; } - if (Keyboard.IsPressed(Key.Right)) + if (Keyboard.IsPressed(Corekey.Right)) { short0 &= ~0x0100; } @@ -1015,7 +1015,7 @@ namespace mame { short0 |= 0x0100; } - if (Keyboard.IsPressed(Key.Left)) + if (Keyboard.IsPressed(Corekey.Left)) { short0 &= ~0x0200; } @@ -1023,7 +1023,7 @@ namespace mame { short0 |= 0x0200; } - if (Keyboard.IsPressed(Key.Down)) + if (Keyboard.IsPressed(Corekey.Down)) { short0 &= ~0x0400; } @@ -1031,7 +1031,7 @@ namespace mame { short0 |= 0x0400; } - if (Keyboard.IsPressed(Key.Up)) + if (Keyboard.IsPressed(Corekey.Up)) { short0 &= ~0x0800; } @@ -1047,7 +1047,7 @@ namespace mame { short0 |= 0x0c00; } - if (Keyboard.IsPressed(Key.NumPad1)) + if (Keyboard.IsPressed(Corekey.NumPad1)) { short0 &= ~0x1000; } @@ -1055,7 +1055,7 @@ namespace mame { short0 |= 0x1000; } - if (Keyboard.IsPressed(Key.NumPad2)) + if (Keyboard.IsPressed(Corekey.NumPad2)) { short0 &= ~0x2000; } @@ -1063,7 +1063,7 @@ namespace mame { short0 |= 0x2000; } - if (Keyboard.IsPressed(Key.NumPad3)) + if (Keyboard.IsPressed(Corekey.NumPad3)) { short0 &= ~0x4000; } @@ -1071,7 +1071,7 @@ namespace mame { short0 |= 0x4000; } - if (Keyboard.IsPressed(Key.NumPad4)) + if (Keyboard.IsPressed(Corekey.NumPad4)) { short1 &= ~0x0010; } @@ -1079,7 +1079,7 @@ namespace mame { short1 |= 0x0010; } - if (Keyboard.IsPressed(Key.NumPad5)) + if (Keyboard.IsPressed(Corekey.NumPad5)) { short1 &= ~0x0020; } @@ -1087,7 +1087,7 @@ namespace mame { short1 |= 0x0020; } - if (Keyboard.IsPressed(Key.NumPad6)) + if (Keyboard.IsPressed(Corekey.NumPad6)) { short2 &= ~0x4000; } @@ -1095,7 +1095,7 @@ namespace mame { short2 |= 0x4000; } - if (Keyboard.IsPressed(Key.R)) + if (Keyboard.IsPressed(Corekey.R)) { short2 &= ~0x0004; } @@ -1103,7 +1103,7 @@ namespace mame { short2 |= 0x0004; } - if (Keyboard.IsPressed(Key.T)) + if (Keyboard.IsPressed(Corekey.T)) { short2 &= ~0x0002; } @@ -1114,7 +1114,7 @@ namespace mame } public static void loop_inputports_cps2_ecofghtr() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { short2 &= ~0x1000; } @@ -1122,7 +1122,7 @@ namespace mame { short2 |= 0x1000; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { short2 &= ~0x2000; } @@ -1130,7 +1130,7 @@ namespace mame { short2 |= 0x2000; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { short2 &= ~0x0100; } @@ -1138,7 +1138,7 @@ namespace mame { short2 |= 0x0100; } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { short2 &= ~0x0200; } @@ -1146,7 +1146,7 @@ namespace mame { short2 |= 0x0200; } - if (Keyboard.IsPressed(Key.D)) + if (Keyboard.IsPressed(Corekey.D)) { short0 &= ~0x0001; } @@ -1154,7 +1154,7 @@ namespace mame { short0 |= 0x0001; } - if (Keyboard.IsPressed(Key.A)) + if (Keyboard.IsPressed(Corekey.A)) { short0 &= ~0x0002; } @@ -1162,7 +1162,7 @@ namespace mame { short0 |= 0x0002; } - if (Keyboard.IsPressed(Key.S)) + if (Keyboard.IsPressed(Corekey.S)) { short0 &= ~0x0004; } @@ -1170,7 +1170,7 @@ namespace mame { short0 |= 0x0004; } - if (Keyboard.IsPressed(Key.W)) + if (Keyboard.IsPressed(Corekey.W)) { short0 &= ~0x0008; } @@ -1178,7 +1178,7 @@ namespace mame { short0 |= 0x0008; } - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { short0 &= ~0x0010; } @@ -1186,7 +1186,7 @@ namespace mame { short0 |= 0x0010; } - if (Keyboard.IsPressed(Key.K)) + if (Keyboard.IsPressed(Corekey.K)) { short0 &= ~0x0020; } @@ -1194,7 +1194,7 @@ namespace mame { short0 |= 0x0020; } - if (Keyboard.IsPressed(Key.L)) + if (Keyboard.IsPressed(Corekey.L)) { short0 &= ~0x0040; } @@ -1202,7 +1202,7 @@ namespace mame { short0 |= 0x0040; } - if (Keyboard.IsPressed(Key.Right)) + if (Keyboard.IsPressed(Corekey.Right)) { short0 &= ~0x0100; } @@ -1210,7 +1210,7 @@ namespace mame { short0 |= 0x0100; } - if (Keyboard.IsPressed(Key.Left)) + if (Keyboard.IsPressed(Corekey.Left)) { short0 &= ~0x0200; } @@ -1218,7 +1218,7 @@ namespace mame { short0 |= 0x0200; } - if (Keyboard.IsPressed(Key.Down)) + if (Keyboard.IsPressed(Corekey.Down)) { short0 &= ~0x0400; } @@ -1226,7 +1226,7 @@ namespace mame { short0 |= 0x0400; } - if (Keyboard.IsPressed(Key.Up)) + if (Keyboard.IsPressed(Corekey.Up)) { short0 &= ~0x0800; } @@ -1234,7 +1234,7 @@ namespace mame { short0 |= 0x0800; } - if (Keyboard.IsPressed(Key.NumPad1)) + if (Keyboard.IsPressed(Corekey.NumPad1)) { short0 &= ~0x1000; } @@ -1242,7 +1242,7 @@ namespace mame { short0 |= 0x1000; } - if (Keyboard.IsPressed(Key.NumPad2)) + if (Keyboard.IsPressed(Corekey.NumPad2)) { short0 &= ~0x2000; } @@ -1250,7 +1250,7 @@ namespace mame { short0 |= 0x2000; } - if (Keyboard.IsPressed(Key.NumPad3)) + if (Keyboard.IsPressed(Corekey.NumPad3)) { short0 &= ~0x4000; } @@ -1258,7 +1258,7 @@ namespace mame { short0 |= 0x4000; } - if (Keyboard.IsPressed(Key.R)) + if (Keyboard.IsPressed(Corekey.R)) { short2 &= ~0x0004; } @@ -1266,7 +1266,7 @@ namespace mame { short2 |= 0x0004; } - if (Keyboard.IsPressed(Key.T)) + if (Keyboard.IsPressed(Corekey.T)) { short2 &= ~0x0002; } @@ -1279,7 +1279,7 @@ namespace mame } public static void loop_inputports_cps2_qndream() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { short2 &= ~0x1000; } @@ -1287,7 +1287,7 @@ namespace mame { short2 |= 0x1000; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { short2 &= ~0x2000; } @@ -1295,7 +1295,7 @@ namespace mame { short2 |= 0x2000; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { short2 &= ~0x0100; } @@ -1303,7 +1303,7 @@ namespace mame { short2 |= 0x0100; } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { short2 &= ~0x0200; } @@ -1311,7 +1311,7 @@ namespace mame { short2 |= 0x0200; } - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { short0 &= ~0x0008; } @@ -1319,7 +1319,7 @@ namespace mame { short0 |= 0x0008; } - if (Keyboard.IsPressed(Key.K)) + if (Keyboard.IsPressed(Corekey.K)) { short0 &= ~0x0004; } @@ -1327,7 +1327,7 @@ namespace mame { short0 |= 0x0004; } - if (Keyboard.IsPressed(Key.L)) + if (Keyboard.IsPressed(Corekey.L)) { short0 &= ~0x0002; } @@ -1335,7 +1335,7 @@ namespace mame { short0 |= 0x0002; } - if (Keyboard.IsPressed(Key.U)) + if (Keyboard.IsPressed(Corekey.U)) { short0 &= ~0x0001; } @@ -1343,7 +1343,7 @@ namespace mame { short0 |= 0x0001; } - if (Keyboard.IsPressed(Key.NumPad1)) + if (Keyboard.IsPressed(Corekey.NumPad1)) { short0 &= ~0x0800; } @@ -1351,7 +1351,7 @@ namespace mame { short0 |= 0x0800; } - if (Keyboard.IsPressed(Key.NumPad2)) + if (Keyboard.IsPressed(Corekey.NumPad2)) { short0 &= ~0x0400; } @@ -1359,7 +1359,7 @@ namespace mame { short0 |= 0x0400; } - if (Keyboard.IsPressed(Key.NumPad3)) + if (Keyboard.IsPressed(Corekey.NumPad3)) { short0 &= ~0x0200; } @@ -1367,7 +1367,7 @@ namespace mame { short0 |= 0x0200; } - if (Keyboard.IsPressed(Key.NumPad4)) + if (Keyboard.IsPressed(Corekey.NumPad4)) { short0 &= ~0x0100; } @@ -1375,7 +1375,7 @@ namespace mame { short0 |= 0x0100; } - if (Keyboard.IsPressed(Key.R)) + if (Keyboard.IsPressed(Corekey.R)) { short2 &= ~0x0004; } @@ -1383,7 +1383,7 @@ namespace mame { short2 |= 0x0004; } - if (Keyboard.IsPressed(Key.T)) + if (Keyboard.IsPressed(Corekey.T)) { short2 &= ~0x0002; } diff --git a/MAME.Core/mame/dataeast/Input.cs b/MAME.Core/mame/dataeast/Input.cs index bb006b0..da2cf31 100644 --- a/MAME.Core/mame/dataeast/Input.cs +++ b/MAME.Core/mame/dataeast/Input.cs @@ -19,7 +19,7 @@ namespace mame public static List lfr = new List(); public static void loop_inputports_dataeast_pcktgal() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { byte2 &= unchecked((byte)~0x10); } @@ -27,7 +27,7 @@ namespace mame { byte2 |= 0x10; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { byte2 &= unchecked((byte)~0x20); } @@ -35,7 +35,7 @@ namespace mame { byte2 |= 0x20; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { byte1 &= unchecked((byte)~0x10); } @@ -43,7 +43,7 @@ namespace mame { byte1 |= 0x10; } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { byte1 &= unchecked((byte)~0x20); } @@ -51,7 +51,7 @@ namespace mame { byte1 |= 0x20; } - if (Keyboard.IsPressed(Key.D)) + if (Keyboard.IsPressed(Corekey.D)) { byte1 &= unchecked((byte)~0x01); } @@ -59,7 +59,7 @@ namespace mame { byte1 |= 0x01; } - if (Keyboard.IsPressed(Key.A)) + if (Keyboard.IsPressed(Corekey.A)) { byte1 &= unchecked((byte)~0x02); } @@ -67,7 +67,7 @@ namespace mame { byte1 |= 0x02; } - if (Keyboard.IsPressed(Key.S)) + if (Keyboard.IsPressed(Corekey.S)) { byte1 &= unchecked((byte)~0x04); } @@ -75,7 +75,7 @@ namespace mame { byte1 |= 0x04; } - if (Keyboard.IsPressed(Key.W)) + if (Keyboard.IsPressed(Corekey.W)) { byte1 &= unchecked((byte)~0x08); } @@ -83,7 +83,7 @@ namespace mame { byte1 |= 0x08; } - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { byte1 &= unchecked((byte)~0x80); } @@ -91,7 +91,7 @@ namespace mame { byte1 |= 0x80; } - if (Keyboard.IsPressed(Key.K)) + if (Keyboard.IsPressed(Corekey.K)) { byte1 &= unchecked((byte)~0x40); } @@ -99,7 +99,7 @@ namespace mame { byte1 |= 0x40; } - if (Keyboard.IsPressed(Key.Right)) + if (Keyboard.IsPressed(Corekey.Right)) { byte2 &= unchecked((byte)~0x01); } @@ -107,7 +107,7 @@ namespace mame { byte2 |= 0x01; } - if (Keyboard.IsPressed(Key.Left)) + if (Keyboard.IsPressed(Corekey.Left)) { byte2 &= unchecked((byte)~0x02); } @@ -115,7 +115,7 @@ namespace mame { byte2 |= 0x02; } - if (Keyboard.IsPressed(Key.Down)) + if (Keyboard.IsPressed(Corekey.Down)) { byte2 &= unchecked((byte)~0x04); } @@ -123,7 +123,7 @@ namespace mame { byte2 |= 0x04; } - if (Keyboard.IsPressed(Key.Up)) + if (Keyboard.IsPressed(Corekey.Up)) { byte2 &= unchecked((byte)~0x08); } @@ -131,7 +131,7 @@ namespace mame { byte2 |= 0x08; } - if (Keyboard.IsPressed(Key.NumPad1)) + if (Keyboard.IsPressed(Corekey.NumPad1)) { byte2 &= unchecked((byte)~0x80); } @@ -139,7 +139,7 @@ namespace mame { byte2 |= 0x80; } - if (Keyboard.IsPressed(Key.NumPad2)) + if (Keyboard.IsPressed(Corekey.NumPad2)) { byte2 &= unchecked((byte)~0x40); } @@ -147,7 +147,7 @@ namespace mame { byte2 |= 0x40; } - if (Keyboard.IsTriggered(Key.N)) + if (Keyboard.IsTriggered(Corekey.N)) { lfr = new List(); lfr.Add(new fr1((int)(Video.screenstate.frame_number + 1), 0x7f)); @@ -155,25 +155,25 @@ namespace mame 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.IsTriggered(Key.U)) + if (Keyboard.IsTriggered(Corekey.U)) { lfr = new List(); lfr.Add(new fr1((int)(Video.screenstate.frame_number + 1), 0xf7)); lfr.Add(new fr1((int)(Video.screenstate.frame_number + 2), 0xff)); } - if (Keyboard.IsTriggered(Key.I)) + if (Keyboard.IsTriggered(Corekey.I)) { lfr = new List(); lfr.Add(new fr1((int)(Video.screenstate.frame_number + 1), 0xfb)); lfr.Add(new fr1((int)(Video.screenstate.frame_number + 2), 0xff)); } - if (Keyboard.IsTriggered(Key.V)) + if (Keyboard.IsTriggered(Corekey.V)) { lfr = new List(); lfr.Add(new fr1((int)(Video.screenstate.frame_number + 1), 0xfd)); lfr.Add(new fr1((int)(Video.screenstate.frame_number + 2), 0xff)); } - if (Keyboard.IsTriggered(Key.B)) + if (Keyboard.IsTriggered(Corekey.B)) { lfr = new List(); lfr.Add(new fr1((int)(Video.screenstate.frame_number + 1), 0xfe)); diff --git a/MAME.Core/mame/igs011/Input.cs b/MAME.Core/mame/igs011/Input.cs index d15c4a2..c1fcc3f 100644 --- a/MAME.Core/mame/igs011/Input.cs +++ b/MAME.Core/mame/igs011/Input.cs @@ -6,7 +6,7 @@ namespace mame { public static void loop_inputports_igs011_drgnwrld() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { sbytec &= ~0x01; } @@ -14,7 +14,7 @@ namespace mame { sbytec |= 0x01; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { sbytec &= ~0x02; } @@ -22,7 +22,7 @@ namespace mame { sbytec |= 0x02; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { sbyte0 &= ~0x01; } @@ -30,7 +30,7 @@ namespace mame { sbyte0 |= 0x01; } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { sbyte2 &= ~0x10; } @@ -38,7 +38,7 @@ namespace mame { sbyte2 |= 0x10; } - if (Keyboard.IsPressed(Key.D))// || Mouse.deltaX > 0) + if (Keyboard.IsPressed(Corekey.D))// || Mouse.deltaX > 0) { sbyte0 &= ~0x10; } @@ -46,7 +46,7 @@ namespace mame { sbyte0 |= 0x10; } - if (Keyboard.IsPressed(Key.A))// || Mouse.deltaX < 0) + if (Keyboard.IsPressed(Corekey.A))// || Mouse.deltaX < 0) { sbyte2 &= ~0x02; } @@ -54,7 +54,7 @@ namespace mame { sbyte2 |= 0x02; } - if (Keyboard.IsPressed(Key.S))// || Mouse.deltaY > 0) + if (Keyboard.IsPressed(Corekey.S))// || Mouse.deltaY > 0) { sbyte0 &= ~0x04; } @@ -62,7 +62,7 @@ namespace mame { sbyte0 |= 0x04; } - if (Keyboard.IsPressed(Key.W))// || Mouse.deltaY < 0) + if (Keyboard.IsPressed(Corekey.W))// || Mouse.deltaY < 0) { sbyte2 &= ~0x01; } @@ -70,7 +70,7 @@ namespace mame { sbyte2 |= 0x01; } - if (Keyboard.IsPressed(Key.J))// || Mouse.buttons[0] != 0) + if (Keyboard.IsPressed(Corekey.J))// || Mouse.buttons[0] != 0) { sbyte2 &= ~0x04; } @@ -78,7 +78,7 @@ namespace mame { sbyte2 |= 0x04; } - if (Keyboard.IsPressed(Key.K))// || Mouse.buttons[1] != 0) + if (Keyboard.IsPressed(Corekey.K))// || Mouse.buttons[1] != 0) { sbyte0 &= ~0x40; } @@ -86,7 +86,7 @@ namespace mame { sbyte0 |= 0x40; } - if (Keyboard.IsPressed(Key.L)) + if (Keyboard.IsPressed(Corekey.L)) { sbyte2 &= ~0x08; } @@ -94,7 +94,7 @@ namespace mame { sbyte2 |= 0x08; } - if (Keyboard.IsPressed(Key.U)) + if (Keyboard.IsPressed(Corekey.U)) { } @@ -102,7 +102,7 @@ namespace mame { } - if (Keyboard.IsPressed(Key.I)) + if (Keyboard.IsPressed(Corekey.I)) { } @@ -110,7 +110,7 @@ namespace mame { } - if (Keyboard.IsPressed(Key.O)) + if (Keyboard.IsPressed(Corekey.O)) { } @@ -118,7 +118,7 @@ namespace mame { } - if (Keyboard.IsPressed(Key.Right)) + if (Keyboard.IsPressed(Corekey.Right)) { sbyte2 &= ~0x40; } @@ -126,7 +126,7 @@ namespace mame { sbyte2 |= 0x40; } - if (Keyboard.IsPressed(Key.Left)) + if (Keyboard.IsPressed(Corekey.Left)) { sbyte1 &= ~0x08; } @@ -134,7 +134,7 @@ namespace mame { sbyte1 |= 0x08; } - if (Keyboard.IsPressed(Key.Down)) + if (Keyboard.IsPressed(Corekey.Down)) { sbyte2 &= ~0x20; } @@ -142,7 +142,7 @@ namespace mame { sbyte2 |= 0x20; } - if (Keyboard.IsPressed(Key.Up)) + if (Keyboard.IsPressed(Corekey.Up)) { sbyte1 &= ~0x02; } @@ -150,7 +150,7 @@ namespace mame { sbyte1 |= 0x02; } - if (Keyboard.IsPressed(Key.NumPad1)) + if (Keyboard.IsPressed(Corekey.NumPad1)) { sbyte1 &= ~0x20; } @@ -158,7 +158,7 @@ namespace mame { sbyte1 |= 0x20; } - if (Keyboard.IsPressed(Key.NumPad2)) + if (Keyboard.IsPressed(Corekey.NumPad2)) { sbyte2 &= unchecked((sbyte)~0x80); } @@ -166,7 +166,7 @@ namespace mame { sbyte2 |= unchecked((sbyte)0x80); } - if (Keyboard.IsPressed(Key.NumPad3)) + if (Keyboard.IsPressed(Corekey.NumPad3)) { sbyte1 &= unchecked((sbyte)~0x80); } @@ -174,7 +174,7 @@ namespace mame { sbyte1 |= unchecked((sbyte)0x80); } - if (Keyboard.IsPressed(Key.NumPad4)) + if (Keyboard.IsPressed(Corekey.NumPad4)) { } @@ -182,7 +182,7 @@ namespace mame { } - if (Keyboard.IsPressed(Key.NumPad5)) + if (Keyboard.IsPressed(Corekey.NumPad5)) { } @@ -190,7 +190,7 @@ namespace mame { } - if (Keyboard.IsPressed(Key.NumPad6)) + if (Keyboard.IsPressed(Corekey.NumPad6)) { } @@ -198,7 +198,7 @@ namespace mame { } - if (Keyboard.IsPressed(Key.R)) + if (Keyboard.IsPressed(Corekey.R)) { sbytec &= ~0x08; } @@ -206,7 +206,7 @@ namespace mame { sbytec |= 0x08; } - if (Keyboard.IsPressed(Key.T)) + if (Keyboard.IsPressed(Corekey.T)) { sbytec &= ~0x10; } @@ -217,7 +217,7 @@ namespace mame } public static void loop_inputports_igs011_lhb() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { sbytec &= ~0x10; } @@ -225,7 +225,7 @@ namespace mame { sbytec |= 0x10; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { bkey0 &= unchecked((byte)~0x20); } @@ -233,7 +233,7 @@ namespace mame { bkey0 |= 0x20; } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { bkey1 &= unchecked((byte)~0x20); } @@ -241,7 +241,7 @@ namespace mame { bkey1 |= 0x20; } - if (Keyboard.IsPressed(Key.D3)) + if (Keyboard.IsPressed(Corekey.D3)) { bkey4 &= unchecked((byte)~0x10); } @@ -249,7 +249,7 @@ namespace mame { bkey4 |= 0x10; } - if (Keyboard.IsPressed(Key.D4)) + if (Keyboard.IsPressed(Corekey.D4)) { bkey4 &= unchecked((byte)~0x20); } @@ -257,7 +257,7 @@ namespace mame { bkey4 |= 0x20; } - if (Keyboard.IsPressed(Key.A)) + if (Keyboard.IsPressed(Corekey.A)) { bkey0 &= unchecked((byte)~0x01); } @@ -265,7 +265,7 @@ namespace mame { bkey0 |= 0x01; } - if (Keyboard.IsPressed(Key.B)) + if (Keyboard.IsPressed(Corekey.B)) { bkey1 &= unchecked((byte)~0x01); } @@ -273,7 +273,7 @@ namespace mame { bkey1 |= 0x01; } - if (Keyboard.IsPressed(Key.C)) + if (Keyboard.IsPressed(Corekey.C)) { bkey2 &= unchecked((byte)~0x01); } @@ -281,7 +281,7 @@ namespace mame { bkey2 |= 0x01; } - if (Keyboard.IsPressed(Key.D)) + if (Keyboard.IsPressed(Corekey.D)) { bkey3 &= unchecked((byte)~0x01); } @@ -289,7 +289,7 @@ namespace mame { bkey3 |= 0x01; } - if (Keyboard.IsPressed(Key.E)) + if (Keyboard.IsPressed(Corekey.E)) { bkey0 &= unchecked((byte)~0x02); } @@ -297,7 +297,7 @@ namespace mame { bkey0 |= 0x02; } - if (Keyboard.IsPressed(Key.F)) + if (Keyboard.IsPressed(Corekey.F)) { bkey1 &= unchecked((byte)~0x02); } @@ -305,7 +305,7 @@ namespace mame { bkey1 |= 0x02; } - if (Keyboard.IsPressed(Key.G)) + if (Keyboard.IsPressed(Corekey.G)) { bkey2 &= unchecked((byte)~0x02); } @@ -313,7 +313,7 @@ namespace mame { bkey2 |= 0x02; } - if (Keyboard.IsPressed(Key.H)) + if (Keyboard.IsPressed(Corekey.H)) { bkey3 &= unchecked((byte)~0x02); } @@ -321,7 +321,7 @@ namespace mame { bkey3 |= 0x02; } - if (Keyboard.IsPressed(Key.I)) + if (Keyboard.IsPressed(Corekey.I)) { bkey0 &= unchecked((byte)~0x04); } @@ -329,7 +329,7 @@ namespace mame { bkey0 |= 0x04; } - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { bkey1 &= unchecked((byte)~0x04); } @@ -337,7 +337,7 @@ namespace mame { bkey1 |= 0x04; } - if (Keyboard.IsPressed(Key.K)) + if (Keyboard.IsPressed(Corekey.K)) { bkey2 &= unchecked((byte)~0x04); } @@ -345,7 +345,7 @@ namespace mame { bkey2 |= 0x04; } - if (Keyboard.IsPressed(Key.L)) + if (Keyboard.IsPressed(Corekey.L)) { bkey3 &= unchecked((byte)~0x04); } @@ -353,7 +353,7 @@ namespace mame { bkey3 |= 0x04; } - if (Keyboard.IsPressed(Key.M)) + if (Keyboard.IsPressed(Corekey.M)) { bkey0 &= unchecked((byte)~0x08); } @@ -361,7 +361,7 @@ namespace mame { bkey0 |= 0x08; } - if (Keyboard.IsPressed(Key.N)) + if (Keyboard.IsPressed(Corekey.N)) { bkey1 &= unchecked((byte)~0x08); } @@ -369,7 +369,7 @@ namespace mame { bkey1 |= 0x08; } - if (Keyboard.IsPressed(Key.O)) + if (Keyboard.IsPressed(Corekey.O)) { bkey4 &= unchecked((byte)~0x04); } @@ -377,7 +377,7 @@ namespace mame { bkey4 |= 0x04; } - if (Keyboard.IsPressed(Key.Q)) + if (Keyboard.IsPressed(Corekey.Q)) { bkey0 &= unchecked((byte)~0x10); } @@ -385,7 +385,7 @@ namespace mame { bkey0 |= 0x10; } - if (Keyboard.IsPressed(Key.R)) + if (Keyboard.IsPressed(Corekey.R)) { bkey1 &= unchecked((byte)~0x10); } @@ -393,7 +393,7 @@ namespace mame { bkey1 |= 0x10; } - if (Keyboard.IsPressed(Key.T)) + if (Keyboard.IsPressed(Corekey.T)) { bkey2 &= unchecked((byte)~0x08); } @@ -401,7 +401,7 @@ namespace mame { bkey2 |= 0x08; } - if (Keyboard.IsPressed(Key.U)) + if (Keyboard.IsPressed(Corekey.U)) { bkey4 &= unchecked((byte)~0x02); } @@ -409,7 +409,7 @@ namespace mame { bkey4 |= 0x02; } - if (Keyboard.IsPressed(Key.W)) + if (Keyboard.IsPressed(Corekey.W)) { bkey3 &= unchecked((byte)~0x08); } @@ -417,7 +417,7 @@ namespace mame { bkey3 |= 0x08; } - if (Keyboard.IsPressed(Key.Y)) + if (Keyboard.IsPressed(Corekey.Y)) { bkey4 &= unchecked((byte)~0x01); } @@ -425,7 +425,7 @@ namespace mame { bkey4 |= 0x01; } - if (Keyboard.IsPressed(Key.Z)) + if (Keyboard.IsPressed(Corekey.Z)) { bkey2 &= unchecked((byte)~0x10); } @@ -436,7 +436,7 @@ namespace mame } public static void loop_inputports_igs011_lhb2() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { sbytec &= ~0x10; } @@ -444,7 +444,7 @@ namespace mame { sbytec |= 0x10; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { bkey0 &= unchecked((byte)~0x20); } @@ -452,7 +452,7 @@ namespace mame { bkey0 |= 0x20; } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { bkey1 &= unchecked((byte)~0x20); } @@ -460,7 +460,7 @@ namespace mame { bkey1 |= 0x20; } - if (Keyboard.IsPressed(Key.A)) + if (Keyboard.IsPressed(Corekey.A)) { bkey0 &= unchecked((byte)~0x01); } @@ -468,7 +468,7 @@ namespace mame { bkey0 |= 0x01; } - if (Keyboard.IsPressed(Key.B)) + if (Keyboard.IsPressed(Corekey.B)) { bkey1 &= unchecked((byte)~0x01); } @@ -476,7 +476,7 @@ namespace mame { bkey1 |= 0x01; } - if (Keyboard.IsPressed(Key.C)) + if (Keyboard.IsPressed(Corekey.C)) { bkey2 &= unchecked((byte)~0x01); } @@ -484,7 +484,7 @@ namespace mame { bkey2 |= 0x01; } - if (Keyboard.IsPressed(Key.D)) + if (Keyboard.IsPressed(Corekey.D)) { bkey3 &= unchecked((byte)~0x01); } @@ -492,7 +492,7 @@ namespace mame { bkey3 |= 0x01; } - if (Keyboard.IsPressed(Key.E)) + if (Keyboard.IsPressed(Corekey.E)) { bkey0 &= unchecked((byte)~0x02); } @@ -500,7 +500,7 @@ namespace mame { bkey0 |= 0x02; } - if (Keyboard.IsPressed(Key.F)) + if (Keyboard.IsPressed(Corekey.F)) { bkey1 &= unchecked((byte)~0x02); } @@ -508,7 +508,7 @@ namespace mame { bkey1 |= 0x02; } - if (Keyboard.IsPressed(Key.G)) + if (Keyboard.IsPressed(Corekey.G)) { bkey2 &= unchecked((byte)~0x02); } @@ -516,7 +516,7 @@ namespace mame { bkey2 |= 0x02; } - if (Keyboard.IsPressed(Key.H)) + if (Keyboard.IsPressed(Corekey.H)) { bkey3 &= unchecked((byte)~0x02); } @@ -524,7 +524,7 @@ namespace mame { bkey3 |= 0x02; } - if (Keyboard.IsPressed(Key.I)) + if (Keyboard.IsPressed(Corekey.I)) { bkey0 &= unchecked((byte)~0x04); } @@ -532,7 +532,7 @@ namespace mame { bkey0 |= 0x04; } - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { bkey1 &= unchecked((byte)~0x04); } @@ -540,7 +540,7 @@ namespace mame { bkey1 |= 0x04; } - if (Keyboard.IsPressed(Key.K)) + if (Keyboard.IsPressed(Corekey.K)) { bkey2 &= unchecked((byte)~0x04); } @@ -548,7 +548,7 @@ namespace mame { bkey2 |= 0x04; } - if (Keyboard.IsPressed(Key.L)) + if (Keyboard.IsPressed(Corekey.L)) { bkey3 &= unchecked((byte)~0x04); } @@ -556,7 +556,7 @@ namespace mame { bkey3 |= 0x04; } - if (Keyboard.IsPressed(Key.M)) + if (Keyboard.IsPressed(Corekey.M)) { bkey0 &= unchecked((byte)~0x08); } @@ -564,7 +564,7 @@ namespace mame { bkey0 |= 0x08; } - if (Keyboard.IsPressed(Key.N)) + if (Keyboard.IsPressed(Corekey.N)) { bkey1 &= unchecked((byte)~0x08); } @@ -572,7 +572,7 @@ namespace mame { bkey1 |= 0x08; } - if (Keyboard.IsPressed(Key.Q)) + if (Keyboard.IsPressed(Corekey.Q)) { bkey0 &= unchecked((byte)~0x10); } @@ -580,7 +580,7 @@ namespace mame { bkey0 |= 0x10; } - if (Keyboard.IsPressed(Key.R)) + if (Keyboard.IsPressed(Corekey.R)) { bkey1 &= unchecked((byte)~0x10); } @@ -588,7 +588,7 @@ namespace mame { bkey1 |= 0x10; } - if (Keyboard.IsPressed(Key.T)) + if (Keyboard.IsPressed(Corekey.T)) { bkey2 &= unchecked((byte)~0x08); } @@ -596,7 +596,7 @@ namespace mame { bkey2 |= 0x08; } - if (Keyboard.IsPressed(Key.W)) + if (Keyboard.IsPressed(Corekey.W)) { bkey3 &= unchecked((byte)~0x08); } @@ -604,7 +604,7 @@ namespace mame { bkey3 |= 0x08; } - if (Keyboard.IsPressed(Key.Z)) + if (Keyboard.IsPressed(Corekey.Z)) { bkey2 &= unchecked((byte)~0x10); } diff --git a/MAME.Core/mame/konami68000/Gdi.cs b/MAME.Core/mame/konami68000/Gdi.cs index 8273450..171513f 100644 --- a/MAME.Core/mame/konami68000/Gdi.cs +++ b/MAME.Core/mame/konami68000/Gdi.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using Bitmap = MAME.Core.AxiBitmap.AxiBitmap; namespace mame { @@ -7,9 +6,6 @@ namespace mame { 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 lSprite; public static int min_priority, max_priority; public static void GDIInit() diff --git a/MAME.Core/mame/konami68000/Input.cs b/MAME.Core/mame/konami68000/Input.cs index cbfe292..7e4b233 100644 --- a/MAME.Core/mame/konami68000/Input.cs +++ b/MAME.Core/mame/konami68000/Input.cs @@ -10,7 +10,7 @@ namespace mame } public static void loop_inputports_konami68000_cuebrick() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { sbyte0 &= ~0x01; } @@ -18,7 +18,7 @@ namespace mame { sbyte0 |= 0x01; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { sbyte0 &= ~0x02; } @@ -26,7 +26,7 @@ namespace mame { sbyte0 |= 0x02; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { sbyte0 &= ~0x08; } @@ -34,7 +34,7 @@ namespace mame { sbyte0 |= 0x08; } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { sbyte0 &= ~0x10; } @@ -42,7 +42,7 @@ namespace mame { sbyte0 |= 0x10; } - if (Keyboard.IsPressed(Key.D)) + if (Keyboard.IsPressed(Corekey.D)) { sbyte1 &= ~0x02; } @@ -50,7 +50,7 @@ namespace mame { sbyte1 |= 0x02; } - if (Keyboard.IsPressed(Key.A)) + if (Keyboard.IsPressed(Corekey.A)) { sbyte1 &= ~0x01; } @@ -58,7 +58,7 @@ namespace mame { sbyte1 |= 0x01; } - if (Keyboard.IsPressed(Key.S)) + if (Keyboard.IsPressed(Corekey.S)) { sbyte1 &= ~0x08; } @@ -66,7 +66,7 @@ namespace mame { sbyte1 |= 0x08; } - if (Keyboard.IsPressed(Key.W)) + if (Keyboard.IsPressed(Corekey.W)) { sbyte1 &= ~0x04; } @@ -74,7 +74,7 @@ namespace mame { sbyte1 |= 0x04; } - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { sbyte1 &= ~0x10; } @@ -82,7 +82,7 @@ namespace mame { sbyte1 |= 0x10; } - if (Keyboard.IsPressed(Key.K)) + if (Keyboard.IsPressed(Corekey.K)) { sbyte1 &= ~0x20; } @@ -90,7 +90,7 @@ namespace mame { sbyte1 |= 0x20; } - if (Keyboard.IsPressed(Key.L)) + if (Keyboard.IsPressed(Corekey.L)) { sbyte1 &= ~0x40; } @@ -98,7 +98,7 @@ namespace mame { sbyte1 |= 0x40; } - if (Keyboard.IsPressed(Key.Right)) + if (Keyboard.IsPressed(Corekey.Right)) { sbyte2 &= ~0x02; } @@ -106,7 +106,7 @@ namespace mame { sbyte2 |= 0x02; } - if (Keyboard.IsPressed(Key.Left)) + if (Keyboard.IsPressed(Corekey.Left)) { sbyte2 &= ~0x01; } @@ -114,7 +114,7 @@ namespace mame { sbyte2 |= 0x01; } - if (Keyboard.IsPressed(Key.Down)) + if (Keyboard.IsPressed(Corekey.Down)) { sbyte2 &= ~0x08; } @@ -122,7 +122,7 @@ namespace mame { sbyte2 |= 0x08; } - if (Keyboard.IsPressed(Key.Up)) + if (Keyboard.IsPressed(Corekey.Up)) { sbyte2 &= ~0x04; } @@ -130,7 +130,7 @@ namespace mame { sbyte2 |= 0x04; } - if (Keyboard.IsPressed(Key.NumPad1)) + if (Keyboard.IsPressed(Corekey.NumPad1)) { sbyte2 &= ~0x10; } @@ -138,7 +138,7 @@ namespace mame { sbyte2 |= 0x10; } - if (Keyboard.IsPressed(Key.NumPad2)) + if (Keyboard.IsPressed(Corekey.NumPad2)) { sbyte2 &= ~0x20; } @@ -146,7 +146,7 @@ namespace mame { sbyte2 |= 0x20; } - if (Keyboard.IsPressed(Key.NumPad3)) + if (Keyboard.IsPressed(Corekey.NumPad3)) { sbyte2 &= ~0x40; } @@ -154,7 +154,7 @@ namespace mame { sbyte2 |= 0x40; } - if (Keyboard.IsPressed(Key.R)) + if (Keyboard.IsPressed(Corekey.R)) { sbyte0 &= ~0x40; } @@ -162,7 +162,7 @@ namespace mame { sbyte0 |= 0x40; } - if (Keyboard.IsPressed(Key.T)) + if (Keyboard.IsPressed(Corekey.T)) { //sbyte0 &= ~0x20; } @@ -173,7 +173,7 @@ namespace mame } public static void loop_inputports_konami68000_tmnt() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { sbyte0 &= ~0x01; } @@ -181,7 +181,7 @@ namespace mame { sbyte0 |= 0x01; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { sbyte0 &= ~0x02; } @@ -189,7 +189,7 @@ namespace mame { sbyte0 |= 0x02; } - if (Keyboard.IsPressed(Key.D)) + if (Keyboard.IsPressed(Corekey.D)) { sbyte1 &= ~0x02; } @@ -197,7 +197,7 @@ namespace mame { sbyte1 |= 0x02; } - if (Keyboard.IsPressed(Key.A)) + if (Keyboard.IsPressed(Corekey.A)) { sbyte1 &= ~0x01; } @@ -205,7 +205,7 @@ namespace mame { sbyte1 |= 0x01; } - if (Keyboard.IsPressed(Key.S)) + if (Keyboard.IsPressed(Corekey.S)) { sbyte1 &= ~0x08; } @@ -213,7 +213,7 @@ namespace mame { sbyte1 |= 0x08; } - if (Keyboard.IsPressed(Key.W)) + if (Keyboard.IsPressed(Corekey.W)) { sbyte1 &= ~0x04; } @@ -221,7 +221,7 @@ namespace mame { sbyte1 |= 0x04; } - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { sbyte1 &= ~0x10; } @@ -229,7 +229,7 @@ namespace mame { sbyte1 |= 0x10; } - if (Keyboard.IsPressed(Key.K)) + if (Keyboard.IsPressed(Corekey.K)) { sbyte1 &= ~0x20; } @@ -237,7 +237,7 @@ namespace mame { sbyte1 |= 0x20; } - if (Keyboard.IsPressed(Key.L)) + if (Keyboard.IsPressed(Corekey.L)) { //sbyte1 &= ~0x04; } @@ -245,7 +245,7 @@ namespace mame { //sbyte1 |= 0x04; } - if (Keyboard.IsPressed(Key.Right)) + if (Keyboard.IsPressed(Corekey.Right)) { sbyte2 &= ~0x02; } @@ -253,7 +253,7 @@ namespace mame { sbyte2 |= 0x02; } - if (Keyboard.IsPressed(Key.Left)) + if (Keyboard.IsPressed(Corekey.Left)) { sbyte2 &= ~0x01; } @@ -261,7 +261,7 @@ namespace mame { sbyte2 |= 0x01; } - if (Keyboard.IsPressed(Key.Down)) + if (Keyboard.IsPressed(Corekey.Down)) { sbyte2 &= ~0x08; } @@ -269,7 +269,7 @@ namespace mame { sbyte2 |= 0x08; } - if (Keyboard.IsPressed(Key.Up)) + if (Keyboard.IsPressed(Corekey.Up)) { sbyte2 &= ~0x04; } @@ -277,7 +277,7 @@ namespace mame { sbyte2 |= 0x04; } - if (Keyboard.IsPressed(Key.NumPad1)) + if (Keyboard.IsPressed(Corekey.NumPad1)) { sbyte2 &= ~0x10; } @@ -285,7 +285,7 @@ namespace mame { sbyte2 |= 0x10; } - if (Keyboard.IsPressed(Key.NumPad2)) + if (Keyboard.IsPressed(Corekey.NumPad2)) { sbyte2 &= ~0x20; } @@ -293,7 +293,7 @@ namespace mame { sbyte2 |= 0x20; } - if (Keyboard.IsPressed(Key.NumPad3)) + if (Keyboard.IsPressed(Corekey.NumPad3)) { //sbyte1 &= ~0x40; } @@ -301,7 +301,7 @@ namespace mame { //sbyte1 |= 0x40; } - if (Keyboard.IsPressed(Key.R)) + if (Keyboard.IsPressed(Corekey.R)) { sbyte0 &= ~0x10; } @@ -309,7 +309,7 @@ namespace mame { sbyte0 |= 0x10; } - if (Keyboard.IsPressed(Key.T)) + if (Keyboard.IsPressed(Corekey.T)) { sbyte0 &= ~0x20; } @@ -320,7 +320,7 @@ namespace mame } public static void loop_inputports_konami68000_blswhstl() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { sbyte0 &= ~0x01; } @@ -328,7 +328,7 @@ namespace mame { sbyte0 |= 0x01; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { sbyte0 &= ~0x02; } @@ -336,7 +336,7 @@ namespace mame { sbyte0 |= 0x02; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { sbyte0 &= ~0x10; } @@ -344,7 +344,7 @@ namespace mame { sbyte0 |= 0x10; } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { sbyte0 &= ~0x20; } @@ -352,7 +352,7 @@ namespace mame { sbyte0 |= 0x20; } - if (Keyboard.IsPressed(Key.D)) + if (Keyboard.IsPressed(Corekey.D)) { sbyte1 &= ~0x02; } @@ -360,7 +360,7 @@ namespace mame { sbyte1 |= 0x02; } - if (Keyboard.IsPressed(Key.A)) + if (Keyboard.IsPressed(Corekey.A)) { sbyte1 &= ~0x01; } @@ -368,7 +368,7 @@ namespace mame { sbyte1 |= 0x01; } - if (Keyboard.IsPressed(Key.S)) + if (Keyboard.IsPressed(Corekey.S)) { sbyte1 &= ~0x08; } @@ -376,7 +376,7 @@ namespace mame { sbyte1 |= 0x08; } - if (Keyboard.IsPressed(Key.W)) + if (Keyboard.IsPressed(Corekey.W)) { sbyte1 &= ~0x04; } @@ -384,7 +384,7 @@ namespace mame { sbyte1 |= 0x04; } - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { sbyte1 &= ~0x10; } @@ -392,7 +392,7 @@ namespace mame { sbyte1 |= 0x10; } - if (Keyboard.IsPressed(Key.K)) + if (Keyboard.IsPressed(Corekey.K)) { sbyte1 &= ~0x20; } @@ -400,7 +400,7 @@ namespace mame { sbyte1 |= 0x20; } - if (Keyboard.IsPressed(Key.L)) + if (Keyboard.IsPressed(Corekey.L)) { //sbyte1 &= ~0x04; } @@ -408,7 +408,7 @@ namespace mame { //sbyte1 |= 0x04; } - if (Keyboard.IsPressed(Key.Right)) + if (Keyboard.IsPressed(Corekey.Right)) { sbyte2 &= ~0x02; } @@ -416,7 +416,7 @@ namespace mame { sbyte2 |= 0x02; } - if (Keyboard.IsPressed(Key.Left)) + if (Keyboard.IsPressed(Corekey.Left)) { sbyte2 &= ~0x01; } @@ -424,7 +424,7 @@ namespace mame { sbyte2 |= 0x01; } - if (Keyboard.IsPressed(Key.Down)) + if (Keyboard.IsPressed(Corekey.Down)) { sbyte2 &= ~0x08; } @@ -432,7 +432,7 @@ namespace mame { sbyte2 |= 0x08; } - if (Keyboard.IsPressed(Key.Up)) + if (Keyboard.IsPressed(Corekey.Up)) { sbyte2 &= ~0x04; } @@ -440,7 +440,7 @@ namespace mame { sbyte2 |= 0x04; } - if (Keyboard.IsPressed(Key.NumPad1)) + if (Keyboard.IsPressed(Corekey.NumPad1)) { sbyte2 &= ~0x10; } @@ -448,7 +448,7 @@ namespace mame { sbyte2 |= 0x10; } - if (Keyboard.IsPressed(Key.NumPad2)) + if (Keyboard.IsPressed(Corekey.NumPad2)) { sbyte2 &= ~0x20; } @@ -456,7 +456,7 @@ namespace mame { sbyte2 |= 0x20; } - if (Keyboard.IsPressed(Key.NumPad3)) + if (Keyboard.IsPressed(Corekey.NumPad3)) { //sbyte1 &= ~0x40; } @@ -464,7 +464,7 @@ namespace mame { //sbyte1 |= 0x40; } - if (Keyboard.IsPressed(Key.R)) + if (Keyboard.IsPressed(Corekey.R)) { sbyte0 &= ~0x04; } @@ -472,7 +472,7 @@ namespace mame { sbyte0 |= 0x04; } - if (Keyboard.IsPressed(Key.T)) + if (Keyboard.IsPressed(Corekey.T)) { //sbyte0 &= ~0x20; } @@ -483,7 +483,7 @@ namespace mame } public static void loop_inputports_konami68000_glfgreat() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { sbyte0 &= ~0x01; } @@ -491,7 +491,7 @@ namespace mame { sbyte0 |= 0x01; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { sbyte0 &= ~0x02; } @@ -499,7 +499,7 @@ namespace mame { sbyte0 |= 0x02; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { dsw3 &= unchecked((byte)~0x01); } @@ -507,7 +507,7 @@ namespace mame { dsw3 |= 0x01; } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { dsw3 &= unchecked((byte)~0x02); } @@ -515,7 +515,7 @@ namespace mame { dsw3 |= 0x02; } - if (Keyboard.IsPressed(Key.D)) + if (Keyboard.IsPressed(Corekey.D)) { sbyte1 &= ~0x02; } @@ -523,7 +523,7 @@ namespace mame { sbyte1 |= 0x02; } - if (Keyboard.IsPressed(Key.A)) + if (Keyboard.IsPressed(Corekey.A)) { sbyte1 &= ~0x01; } @@ -531,7 +531,7 @@ namespace mame { sbyte1 |= 0x01; } - if (Keyboard.IsPressed(Key.S)) + if (Keyboard.IsPressed(Corekey.S)) { sbyte1 &= ~0x08; } @@ -539,7 +539,7 @@ namespace mame { sbyte1 |= 0x08; } - if (Keyboard.IsPressed(Key.W)) + if (Keyboard.IsPressed(Corekey.W)) { sbyte1 &= ~0x04; } @@ -547,7 +547,7 @@ namespace mame { sbyte1 |= 0x04; } - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { sbyte1 &= ~0x10; } @@ -555,7 +555,7 @@ namespace mame { sbyte1 |= 0x10; } - if (Keyboard.IsPressed(Key.K)) + if (Keyboard.IsPressed(Corekey.K)) { sbyte1 &= ~0x20; } @@ -563,7 +563,7 @@ namespace mame { sbyte1 |= 0x20; } - if (Keyboard.IsPressed(Key.L)) + if (Keyboard.IsPressed(Corekey.L)) { sbyte1 &= ~0x40; } @@ -571,7 +571,7 @@ namespace mame { sbyte1 |= 0x40; } - if (Keyboard.IsPressed(Key.U)) + if (Keyboard.IsPressed(Corekey.U)) { sbyte1 &= unchecked((sbyte)~0x80); } @@ -579,7 +579,7 @@ namespace mame { sbyte1 |= unchecked((sbyte)0x80); } - if (Keyboard.IsPressed(Key.Right)) + if (Keyboard.IsPressed(Corekey.Right)) { sbyte2 &= ~0x02; } @@ -587,7 +587,7 @@ namespace mame { sbyte2 |= 0x02; } - if (Keyboard.IsPressed(Key.Left)) + if (Keyboard.IsPressed(Corekey.Left)) { sbyte2 &= ~0x01; } @@ -595,7 +595,7 @@ namespace mame { sbyte2 |= 0x01; } - if (Keyboard.IsPressed(Key.Down)) + if (Keyboard.IsPressed(Corekey.Down)) { sbyte2 &= ~0x08; } @@ -603,7 +603,7 @@ namespace mame { sbyte2 |= 0x08; } - if (Keyboard.IsPressed(Key.Up)) + if (Keyboard.IsPressed(Corekey.Up)) { sbyte2 &= ~0x04; } @@ -611,7 +611,7 @@ namespace mame { sbyte2 |= 0x04; } - if (Keyboard.IsPressed(Key.NumPad1)) + if (Keyboard.IsPressed(Corekey.NumPad1)) { sbyte2 &= ~0x10; } @@ -619,7 +619,7 @@ namespace mame { sbyte2 |= 0x10; } - if (Keyboard.IsPressed(Key.NumPad2)) + if (Keyboard.IsPressed(Corekey.NumPad2)) { sbyte2 &= ~0x20; } @@ -627,7 +627,7 @@ namespace mame { sbyte2 |= 0x20; } - if (Keyboard.IsPressed(Key.NumPad3)) + if (Keyboard.IsPressed(Corekey.NumPad3)) { sbyte2 &= ~0x40; } @@ -635,7 +635,7 @@ namespace mame { sbyte2 |= 0x40; } - if (Keyboard.IsPressed(Key.NumPad4)) + if (Keyboard.IsPressed(Corekey.NumPad4)) { sbyte2 &= unchecked((sbyte)~0x80); } @@ -643,7 +643,7 @@ namespace mame { sbyte2 |= unchecked((sbyte)0x80); } - if (Keyboard.IsPressed(Key.R)) + if (Keyboard.IsPressed(Corekey.R)) { sbyte0 &= ~0x10; } @@ -651,7 +651,7 @@ namespace mame { sbyte0 |= 0x10; } - if (Keyboard.IsPressed(Key.T)) + if (Keyboard.IsPressed(Corekey.T)) { //sbyte0 &= ~0x20; } @@ -662,7 +662,7 @@ namespace mame } public static void loop_inputports_konami68000_qgakumon() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { sbyte0 &= ~0x01; } @@ -670,7 +670,7 @@ namespace mame { sbyte0 |= 0x01; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { sbyte0 &= ~0x02; } @@ -678,7 +678,7 @@ namespace mame { sbyte0 |= 0x02; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { sbyte1 &= unchecked((sbyte)~0x80); } @@ -686,7 +686,7 @@ namespace mame { sbyte1 |= unchecked((sbyte)0x80); } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { sbyte2 &= unchecked((sbyte)~0x80); } @@ -694,7 +694,7 @@ namespace mame { sbyte2 |= unchecked((sbyte)0x80); } - if (Keyboard.IsPressed(Key.D)) + if (Keyboard.IsPressed(Corekey.D)) { sbyte1 &= ~0x02; } @@ -702,7 +702,7 @@ namespace mame { sbyte1 |= 0x02; } - if (Keyboard.IsPressed(Key.A)) + if (Keyboard.IsPressed(Corekey.A)) { sbyte1 &= ~0x01; } @@ -710,7 +710,7 @@ namespace mame { sbyte1 |= 0x01; } - if (Keyboard.IsPressed(Key.S)) + if (Keyboard.IsPressed(Corekey.S)) { sbyte1 &= ~0x08; } @@ -718,7 +718,7 @@ namespace mame { sbyte1 |= 0x08; } - if (Keyboard.IsPressed(Key.W)) + if (Keyboard.IsPressed(Corekey.W)) { sbyte1 &= ~0x04; } @@ -726,7 +726,7 @@ namespace mame { sbyte1 |= 0x04; } - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { sbyte1 &= ~0x10; } @@ -750,7 +750,7 @@ namespace mame { sbyte1 |= 0x40; }*/ - if (Keyboard.IsPressed(Key.Right)) + if (Keyboard.IsPressed(Corekey.Right)) { sbyte2 &= ~0x02; } @@ -758,7 +758,7 @@ namespace mame { sbyte2 |= 0x02; } - if (Keyboard.IsPressed(Key.Left)) + if (Keyboard.IsPressed(Corekey.Left)) { sbyte2 &= ~0x01; } @@ -766,7 +766,7 @@ namespace mame { sbyte2 |= 0x01; } - if (Keyboard.IsPressed(Key.Down)) + if (Keyboard.IsPressed(Corekey.Down)) { sbyte2 &= ~0x08; } @@ -774,7 +774,7 @@ namespace mame { sbyte2 |= 0x08; } - if (Keyboard.IsPressed(Key.Up)) + if (Keyboard.IsPressed(Corekey.Up)) { sbyte2 &= ~0x04; } @@ -782,7 +782,7 @@ namespace mame { sbyte2 |= 0x04; } - if (Keyboard.IsPressed(Key.NumPad1)) + if (Keyboard.IsPressed(Corekey.NumPad1)) { sbyte2 &= ~0x10; } @@ -806,7 +806,7 @@ namespace mame { sbyte2 |= 0x40; }*/ - if (Keyboard.IsPressed(Key.R)) + if (Keyboard.IsPressed(Corekey.R)) { //sbyte0 &= ~0x40; } @@ -814,7 +814,7 @@ namespace mame { //sbyte0 |= 0x40; } - if (Keyboard.IsPressed(Key.T)) + if (Keyboard.IsPressed(Corekey.T)) { //sbyte0 &= ~0x20; } @@ -825,7 +825,7 @@ namespace mame } public static void loop_inputports_konami68000_ssriders() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { sbyte0 &= ~0x01; } @@ -833,7 +833,7 @@ namespace mame { sbyte0 |= 0x01; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { sbyte0 &= ~0x02; } @@ -841,7 +841,7 @@ namespace mame { sbyte0 |= 0x02; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { sbyte1 &= unchecked((sbyte)~0x80); } @@ -849,7 +849,7 @@ namespace mame { sbyte1 |= unchecked((sbyte)0x80); } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { sbyte2 &= unchecked((sbyte)~0x80); } @@ -857,7 +857,7 @@ namespace mame { sbyte2 |= unchecked((sbyte)0x80); } - if (Keyboard.IsPressed(Key.D)) + if (Keyboard.IsPressed(Corekey.D)) { sbyte1 &= ~0x02; } @@ -865,7 +865,7 @@ namespace mame { sbyte1 |= 0x02; } - if (Keyboard.IsPressed(Key.A)) + if (Keyboard.IsPressed(Corekey.A)) { sbyte1 &= ~0x01; } @@ -873,7 +873,7 @@ namespace mame { sbyte1 |= 0x01; } - if (Keyboard.IsPressed(Key.S)) + if (Keyboard.IsPressed(Corekey.S)) { sbyte1 &= ~0x08; } @@ -881,7 +881,7 @@ namespace mame { sbyte1 |= 0x08; } - if (Keyboard.IsPressed(Key.W)) + if (Keyboard.IsPressed(Corekey.W)) { sbyte1 &= ~0x04; } @@ -889,7 +889,7 @@ namespace mame { sbyte1 |= 0x04; } - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { sbyte1 &= ~0x10; } @@ -897,7 +897,7 @@ namespace mame { sbyte1 |= 0x10; } - if (Keyboard.IsPressed(Key.K)) + if (Keyboard.IsPressed(Corekey.K)) { sbyte1 &= ~0x20; } @@ -905,7 +905,7 @@ namespace mame { sbyte1 |= 0x20; } - if (Keyboard.IsPressed(Key.L)) + if (Keyboard.IsPressed(Corekey.L)) { //sbyte1 &= ~0x04; } @@ -913,7 +913,7 @@ namespace mame { //sbyte1 |= 0x04; } - if (Keyboard.IsPressed(Key.Right)) + if (Keyboard.IsPressed(Corekey.Right)) { sbyte2 &= ~0x02; } @@ -921,7 +921,7 @@ namespace mame { sbyte2 |= 0x02; } - if (Keyboard.IsPressed(Key.Left)) + if (Keyboard.IsPressed(Corekey.Left)) { sbyte2 &= ~0x01; } @@ -929,7 +929,7 @@ namespace mame { sbyte2 |= 0x01; } - if (Keyboard.IsPressed(Key.Down)) + if (Keyboard.IsPressed(Corekey.Down)) { sbyte2 &= ~0x08; } @@ -937,7 +937,7 @@ namespace mame { sbyte2 |= 0x08; } - if (Keyboard.IsPressed(Key.Up)) + if (Keyboard.IsPressed(Corekey.Up)) { sbyte2 &= ~0x04; } @@ -945,7 +945,7 @@ namespace mame { sbyte2 |= 0x04; } - if (Keyboard.IsPressed(Key.NumPad1)) + if (Keyboard.IsPressed(Corekey.NumPad1)) { sbyte2 &= ~0x10; } @@ -953,7 +953,7 @@ namespace mame { sbyte2 |= 0x10; } - if (Keyboard.IsPressed(Key.NumPad2)) + if (Keyboard.IsPressed(Corekey.NumPad2)) { sbyte2 &= ~0x20; } @@ -961,7 +961,7 @@ namespace mame { sbyte2 |= 0x20; } - if (Keyboard.IsPressed(Key.NumPad3)) + if (Keyboard.IsPressed(Corekey.NumPad3)) { //sbyte1 &= ~0x40; } @@ -969,7 +969,7 @@ namespace mame { //sbyte1 |= 0x40; } - if (Keyboard.IsPressed(Key.R)) + if (Keyboard.IsPressed(Corekey.R)) { sbyte0 &= ~0x10; } @@ -977,7 +977,7 @@ namespace mame { sbyte0 |= 0x10; } - if (Keyboard.IsPressed(Key.T)) + if (Keyboard.IsPressed(Corekey.T)) { sbyte0 &= ~0x20; } @@ -988,7 +988,7 @@ namespace mame } public static void loop_inputports_konami68000_thndrx2() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { sbyte0 &= ~0x01; } @@ -996,7 +996,7 @@ namespace mame { sbyte0 |= 0x01; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { sbyte0 &= ~0x02; } @@ -1004,7 +1004,7 @@ namespace mame { sbyte0 |= 0x02; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { sbyte1 &= unchecked((sbyte)~0x80); } @@ -1012,7 +1012,7 @@ namespace mame { sbyte1 |= unchecked((sbyte)0x80); } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { sbyte2 &= unchecked((sbyte)~0x80); } @@ -1020,7 +1020,7 @@ namespace mame { sbyte2 |= unchecked((sbyte)0x80); } - if (Keyboard.IsPressed(Key.D)) + if (Keyboard.IsPressed(Corekey.D)) { sbyte1 &= ~0x02; } @@ -1028,7 +1028,7 @@ namespace mame { sbyte1 |= 0x02; } - if (Keyboard.IsPressed(Key.A)) + if (Keyboard.IsPressed(Corekey.A)) { sbyte1 &= ~0x01; } @@ -1036,7 +1036,7 @@ namespace mame { sbyte1 |= 0x01; } - if (Keyboard.IsPressed(Key.S)) + if (Keyboard.IsPressed(Corekey.S)) { sbyte1 &= ~0x08; } @@ -1044,7 +1044,7 @@ namespace mame { sbyte1 |= 0x08; } - if (Keyboard.IsPressed(Key.W)) + if (Keyboard.IsPressed(Corekey.W)) { sbyte1 &= ~0x04; } @@ -1060,7 +1060,7 @@ namespace mame { sbyte1 |= 0x0c; } - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { sbyte1 &= ~0x10; } @@ -1068,7 +1068,7 @@ namespace mame { sbyte1 |= 0x10; } - if (Keyboard.IsPressed(Key.K)) + if (Keyboard.IsPressed(Corekey.K)) { sbyte1 &= ~0x20; } @@ -1076,7 +1076,7 @@ namespace mame { sbyte1 |= 0x20; } - if (Keyboard.IsPressed(Key.L)) + if (Keyboard.IsPressed(Corekey.L)) { //sbyte1 &= ~0x04; } @@ -1084,7 +1084,7 @@ namespace mame { //sbyte1 |= 0x04; } - if (Keyboard.IsPressed(Key.Right)) + if (Keyboard.IsPressed(Corekey.Right)) { sbyte2 &= ~0x02; } @@ -1092,7 +1092,7 @@ namespace mame { sbyte2 |= 0x02; } - if (Keyboard.IsPressed(Key.Left)) + if (Keyboard.IsPressed(Corekey.Left)) { sbyte2 &= ~0x01; } @@ -1100,7 +1100,7 @@ namespace mame { sbyte2 |= 0x01; } - if (Keyboard.IsPressed(Key.Down)) + if (Keyboard.IsPressed(Corekey.Down)) { sbyte2 &= ~0x08; } @@ -1108,7 +1108,7 @@ namespace mame { sbyte2 |= 0x08; } - if (Keyboard.IsPressed(Key.Up)) + if (Keyboard.IsPressed(Corekey.Up)) { sbyte2 &= ~0x04; } @@ -1124,7 +1124,7 @@ namespace mame { sbyte2 |= 0x0c; } - if (Keyboard.IsPressed(Key.NumPad1)) + if (Keyboard.IsPressed(Corekey.NumPad1)) { sbyte2 &= ~0x10; } @@ -1132,7 +1132,7 @@ namespace mame { sbyte2 |= 0x10; } - if (Keyboard.IsPressed(Key.NumPad2)) + if (Keyboard.IsPressed(Corekey.NumPad2)) { sbyte2 &= ~0x20; } @@ -1140,7 +1140,7 @@ namespace mame { sbyte2 |= 0x20; } - if (Keyboard.IsPressed(Key.NumPad3)) + if (Keyboard.IsPressed(Corekey.NumPad3)) { //sbyte1 &= ~0x40; } @@ -1148,7 +1148,7 @@ namespace mame { //sbyte1 |= 0x40; } - if (Keyboard.IsPressed(Key.R)) + if (Keyboard.IsPressed(Corekey.R)) { sbyte0 &= ~0x04; } @@ -1156,7 +1156,7 @@ namespace mame { sbyte0 |= 0x04; } - if (Keyboard.IsPressed(Key.T)) + if (Keyboard.IsPressed(Corekey.T)) { //sbyte0 &= ~0x20; } @@ -1167,7 +1167,7 @@ namespace mame } public static void loop_inputports_konami68000_prmrsocr() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { sbyte0 &= ~0x04; } @@ -1175,7 +1175,7 @@ namespace mame { sbyte0 |= 0x04; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { bytee &= unchecked((byte)~0x04); } @@ -1183,7 +1183,7 @@ namespace mame { bytee |= 0x04; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { sbyte1 &= unchecked((sbyte)~0x80); } @@ -1191,7 +1191,7 @@ namespace mame { sbyte1 |= unchecked((sbyte)0x80); } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { sbyte2 &= unchecked((sbyte)~0x80); } @@ -1199,7 +1199,7 @@ namespace mame { sbyte2 |= unchecked((sbyte)0x80); } - if (Keyboard.IsPressed(Key.D)) + if (Keyboard.IsPressed(Corekey.D)) { sbyte1 &= ~0x02; } @@ -1207,7 +1207,7 @@ namespace mame { sbyte1 |= 0x02; } - if (Keyboard.IsPressed(Key.A)) + if (Keyboard.IsPressed(Corekey.A)) { sbyte1 &= ~0x01; } @@ -1215,7 +1215,7 @@ namespace mame { sbyte1 |= 0x01; } - if (Keyboard.IsPressed(Key.S)) + if (Keyboard.IsPressed(Corekey.S)) { sbyte1 &= ~0x08; } @@ -1223,7 +1223,7 @@ namespace mame { sbyte1 |= 0x08; } - if (Keyboard.IsPressed(Key.W)) + if (Keyboard.IsPressed(Corekey.W)) { sbyte1 &= ~0x04; } @@ -1231,7 +1231,7 @@ namespace mame { sbyte1 |= 0x04; } - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { sbyte1 &= ~0x10; } @@ -1239,7 +1239,7 @@ namespace mame { sbyte1 |= 0x10; } - if (Keyboard.IsPressed(Key.K)) + if (Keyboard.IsPressed(Corekey.K)) { sbyte1 &= ~0x20; } @@ -1247,7 +1247,7 @@ namespace mame { sbyte1 |= 0x20; } - if (Keyboard.IsPressed(Key.L)) + if (Keyboard.IsPressed(Corekey.L)) { //sbyte1 &= ~0x04; } @@ -1255,7 +1255,7 @@ namespace mame { //sbyte1 |= 0x04; } - if (Keyboard.IsPressed(Key.Right)) + if (Keyboard.IsPressed(Corekey.Right)) { sbyte2 &= ~0x02; } @@ -1263,7 +1263,7 @@ namespace mame { sbyte2 |= 0x02; } - if (Keyboard.IsPressed(Key.Left)) + if (Keyboard.IsPressed(Corekey.Left)) { sbyte2 &= ~0x01; } @@ -1271,7 +1271,7 @@ namespace mame { sbyte2 |= 0x01; } - if (Keyboard.IsPressed(Key.Down)) + if (Keyboard.IsPressed(Corekey.Down)) { sbyte2 &= ~0x08; } @@ -1279,7 +1279,7 @@ namespace mame { sbyte2 |= 0x08; } - if (Keyboard.IsPressed(Key.Up)) + if (Keyboard.IsPressed(Corekey.Up)) { sbyte2 &= ~0x04; } @@ -1287,7 +1287,7 @@ namespace mame { sbyte2 |= 0x04; } - if (Keyboard.IsPressed(Key.NumPad1)) + if (Keyboard.IsPressed(Corekey.NumPad1)) { sbyte2 &= ~0x10; } @@ -1295,7 +1295,7 @@ namespace mame { sbyte2 |= 0x10; } - if (Keyboard.IsPressed(Key.NumPad2)) + if (Keyboard.IsPressed(Corekey.NumPad2)) { sbyte2 &= ~0x20; } @@ -1303,7 +1303,7 @@ namespace mame { sbyte2 |= 0x20; } - if (Keyboard.IsPressed(Key.NumPad3)) + if (Keyboard.IsPressed(Corekey.NumPad3)) { //sbyte1 &= ~0x40; } @@ -1311,7 +1311,7 @@ namespace mame { //sbyte1 |= 0x40; } - if (Keyboard.IsPressed(Key.R)) + if (Keyboard.IsPressed(Corekey.R)) { sbyte0 &= ~0x01; } @@ -1319,7 +1319,7 @@ namespace mame { sbyte0 |= 0x01; } - if (Keyboard.IsPressed(Key.T)) + if (Keyboard.IsPressed(Corekey.T)) { //sbyte0 &= ~0x20; } diff --git a/MAME.Core/mame/m72/Input.cs b/MAME.Core/mame/m72/Input.cs index 91bd9d3..f357c84 100644 --- a/MAME.Core/mame/m72/Input.cs +++ b/MAME.Core/mame/m72/Input.cs @@ -6,7 +6,7 @@ namespace mame { public static void loop_inputports_m72_common() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { ushort1 &= unchecked((ushort)~0x0004); } @@ -14,7 +14,7 @@ namespace mame { ushort1 |= 0x0004; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { ushort1 &= unchecked((ushort)~0x0008); } @@ -22,7 +22,7 @@ namespace mame { ushort1 |= 0x0008; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { ushort1 &= unchecked((ushort)~0x0001); } @@ -30,7 +30,7 @@ namespace mame { ushort1 |= 0x0001; } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { ushort1 &= unchecked((ushort)~0x0002); } @@ -38,7 +38,7 @@ namespace mame { ushort1 |= 0x0002; } - if (Keyboard.IsPressed(Key.D)) + if (Keyboard.IsPressed(Corekey.D)) { ushort0 &= unchecked((ushort)~0x0001); } @@ -46,7 +46,7 @@ namespace mame { ushort0 |= 0x0001; } - if (Keyboard.IsPressed(Key.A)) + if (Keyboard.IsPressed(Corekey.A)) { ushort0 &= unchecked((ushort)~0x0002); } @@ -54,7 +54,7 @@ namespace mame { ushort0 |= 0x0002; } - if (Keyboard.IsPressed(Key.S)) + if (Keyboard.IsPressed(Corekey.S)) { ushort0 &= unchecked((ushort)~0x0004); } @@ -62,7 +62,7 @@ namespace mame { ushort0 |= 0x0004; } - if (Keyboard.IsPressed(Key.W)) + if (Keyboard.IsPressed(Corekey.W)) { ushort0 &= unchecked((ushort)~0x0008); } @@ -70,7 +70,7 @@ namespace mame { ushort0 |= 0x0008; } - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { ushort0 &= unchecked((ushort)~0x0080); } @@ -78,7 +78,7 @@ namespace mame { ushort0 |= 0x0080; } - if (Keyboard.IsPressed(Key.K)) + if (Keyboard.IsPressed(Corekey.K)) { ushort0 &= unchecked((ushort)~0x0040); } @@ -86,7 +86,7 @@ namespace mame { ushort0 |= 0x0040; } - if (Keyboard.IsPressed(Key.U)) + if (Keyboard.IsPressed(Corekey.U)) { ushort0 &= unchecked((ushort)~0x0020); } @@ -94,7 +94,7 @@ namespace mame { ushort0 |= 0x0020; } - if (Keyboard.IsPressed(Key.I)) + if (Keyboard.IsPressed(Corekey.I)) { ushort0 &= unchecked((ushort)~0x0010); } @@ -102,7 +102,7 @@ namespace mame { ushort0 |= 0x0010; } - if (Keyboard.IsPressed(Key.Right)) + if (Keyboard.IsPressed(Corekey.Right)) { ushort0 &= unchecked((ushort)~0x0100); } @@ -110,7 +110,7 @@ namespace mame { ushort0 |= 0x0100; } - if (Keyboard.IsPressed(Key.Left)) + if (Keyboard.IsPressed(Corekey.Left)) { ushort0 &= unchecked((ushort)~0x0200); } @@ -118,7 +118,7 @@ namespace mame { ushort0 |= 0x0200; } - if (Keyboard.IsPressed(Key.Down)) + if (Keyboard.IsPressed(Corekey.Down)) { ushort0 &= unchecked((ushort)~0x0400); } @@ -126,7 +126,7 @@ namespace mame { ushort0 |= 0x0400; } - if (Keyboard.IsPressed(Key.Up)) + if (Keyboard.IsPressed(Corekey.Up)) { ushort0 &= unchecked((ushort)~0x0800); } @@ -134,7 +134,7 @@ namespace mame { ushort0 |= 0x0800; } - if (Keyboard.IsPressed(Key.NumPad1)) + if (Keyboard.IsPressed(Corekey.NumPad1)) { ushort0 &= unchecked((ushort)~0x8000); } @@ -142,7 +142,7 @@ namespace mame { ushort0 |= 0x8000; } - if (Keyboard.IsPressed(Key.NumPad2)) + if (Keyboard.IsPressed(Corekey.NumPad2)) { ushort0 &= unchecked((ushort)~0x4000); } @@ -150,7 +150,7 @@ namespace mame { ushort0 |= 0x4000; } - if (Keyboard.IsPressed(Key.NumPad4)) + if (Keyboard.IsPressed(Corekey.NumPad4)) { ushort0 &= unchecked((ushort)~0x2000); } @@ -158,7 +158,7 @@ namespace mame { ushort0 |= 0x2000; } - if (Keyboard.IsPressed(Key.NumPad5)) + if (Keyboard.IsPressed(Corekey.NumPad5)) { ushort0 &= unchecked((ushort)~0x1000); } @@ -166,7 +166,7 @@ namespace mame { ushort0 |= 0x1000; } - if (Keyboard.IsPressed(Key.R)) + if (Keyboard.IsPressed(Corekey.R)) { ushort1 &= unchecked((ushort)~0x0010); } @@ -174,7 +174,7 @@ namespace mame { ushort1 |= 0x0010; } - if (Keyboard.IsPressed(Key.T)) + if (Keyboard.IsPressed(Corekey.T)) { ushort1 &= unchecked((ushort)~0x0020); } diff --git a/MAME.Core/mame/m92/Input.cs b/MAME.Core/mame/m92/Input.cs index f6b99c6..6c11a02 100644 --- a/MAME.Core/mame/m92/Input.cs +++ b/MAME.Core/mame/m92/Input.cs @@ -6,7 +6,7 @@ namespace mame { public static void loop_inputports_m92_common() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { ushort1 &= unchecked((ushort)~0x0004); } @@ -14,7 +14,7 @@ namespace mame { ushort1 |= 0x0004; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { ushort1 &= unchecked((ushort)~0x0008); } @@ -22,7 +22,7 @@ namespace mame { ushort1 |= 0x0008; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { ushort1 &= unchecked((ushort)~0x0001); } @@ -30,7 +30,7 @@ namespace mame { ushort1 |= 0x0001; } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { ushort1 &= unchecked((ushort)~0x0002); } @@ -38,7 +38,7 @@ namespace mame { ushort1 |= 0x0002; } - if (Keyboard.IsPressed(Key.D)) + if (Keyboard.IsPressed(Corekey.D)) { ushort0 &= unchecked((ushort)~0x0001); } @@ -46,7 +46,7 @@ namespace mame { ushort0 |= 0x0001; } - if (Keyboard.IsPressed(Key.A)) + if (Keyboard.IsPressed(Corekey.A)) { ushort0 &= unchecked((ushort)~0x0002); } @@ -54,7 +54,7 @@ namespace mame { ushort0 |= 0x0002; } - if (Keyboard.IsPressed(Key.S)) + if (Keyboard.IsPressed(Corekey.S)) { ushort0 &= unchecked((ushort)~0x0004); } @@ -62,7 +62,7 @@ namespace mame { ushort0 |= 0x0004; } - if (Keyboard.IsPressed(Key.W)) + if (Keyboard.IsPressed(Corekey.W)) { ushort0 &= unchecked((ushort)~0x0008); } @@ -70,7 +70,7 @@ namespace mame { ushort0 |= 0x0008; } - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { ushort0 &= unchecked((ushort)~0x0080); } @@ -78,7 +78,7 @@ namespace mame { ushort0 |= 0x0080; } - if (Keyboard.IsPressed(Key.K)) + if (Keyboard.IsPressed(Corekey.K)) { ushort0 &= unchecked((ushort)~0x0040); } @@ -86,7 +86,7 @@ namespace mame { ushort0 |= 0x0040; } - if (Keyboard.IsPressed(Key.U)) + if (Keyboard.IsPressed(Corekey.U)) { ushort0 &= unchecked((ushort)~0x0020); } @@ -94,7 +94,7 @@ namespace mame { ushort0 |= 0x0020; } - if (Keyboard.IsPressed(Key.I)) + if (Keyboard.IsPressed(Corekey.I)) { ushort0 &= unchecked((ushort)~0x0010); } @@ -102,7 +102,7 @@ namespace mame { ushort0 |= 0x0010; } - if (Keyboard.IsPressed(Key.Right)) + if (Keyboard.IsPressed(Corekey.Right)) { ushort0 &= unchecked((ushort)~0x0100); } @@ -110,7 +110,7 @@ namespace mame { ushort0 |= 0x0100; } - if (Keyboard.IsPressed(Key.Left)) + if (Keyboard.IsPressed(Corekey.Left)) { ushort0 &= unchecked((ushort)~0x0200); } @@ -118,7 +118,7 @@ namespace mame { ushort0 |= 0x0200; } - if (Keyboard.IsPressed(Key.Down)) + if (Keyboard.IsPressed(Corekey.Down)) { ushort0 &= unchecked((ushort)~0x0400); } @@ -126,7 +126,7 @@ namespace mame { ushort0 |= 0x0400; } - if (Keyboard.IsPressed(Key.Up)) + if (Keyboard.IsPressed(Corekey.Up)) { ushort0 &= unchecked((ushort)~0x0800); } @@ -134,7 +134,7 @@ namespace mame { ushort0 |= 0x0800; } - if (Keyboard.IsPressed(Key.NumPad1)) + if (Keyboard.IsPressed(Corekey.NumPad1)) { ushort0 &= unchecked((ushort)~0x8000); } @@ -142,7 +142,7 @@ namespace mame { ushort0 |= 0x8000; } - if (Keyboard.IsPressed(Key.NumPad2)) + if (Keyboard.IsPressed(Corekey.NumPad2)) { ushort0 &= unchecked((ushort)~0x4000); } @@ -150,7 +150,7 @@ namespace mame { ushort0 |= 0x4000; } - if (Keyboard.IsPressed(Key.NumPad4)) + if (Keyboard.IsPressed(Corekey.NumPad4)) { ushort0 &= unchecked((ushort)~0x2000); } @@ -158,7 +158,7 @@ namespace mame { ushort0 |= 0x2000; } - if (Keyboard.IsPressed(Key.NumPad5)) + if (Keyboard.IsPressed(Corekey.NumPad5)) { ushort0 &= unchecked((ushort)~0x1000); } @@ -166,7 +166,7 @@ namespace mame { ushort0 |= 0x1000; } - if (Keyboard.IsPressed(Key.R)) + if (Keyboard.IsPressed(Corekey.R)) { ushort1 &= unchecked((ushort)~0x0010); } @@ -174,7 +174,7 @@ namespace mame { ushort1 |= 0x0010; } - if (Keyboard.IsPressed(Key.T)) + if (Keyboard.IsPressed(Corekey.T)) { ushort1 &= unchecked((ushort)~0x0020); } diff --git a/MAME.Core/mame/namcos1/Input.cs b/MAME.Core/mame/namcos1/Input.cs index dd1c3be..938f374 100644 --- a/MAME.Core/mame/namcos1/Input.cs +++ b/MAME.Core/mame/namcos1/Input.cs @@ -6,7 +6,7 @@ namespace mame { public static void loop_inputports_ns1_3b() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { byte2 &= unchecked((byte)~0x10); } @@ -14,7 +14,7 @@ namespace mame { byte2 |= 0x10; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { byte2 &= unchecked((byte)~0x08); } @@ -22,7 +22,7 @@ namespace mame { byte2 |= 0x08; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { byte0 &= unchecked((byte)~0x80); } @@ -30,7 +30,7 @@ namespace mame { byte0 |= 0x80; } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { byte1 &= unchecked((byte)~0x80); } @@ -38,7 +38,7 @@ namespace mame { byte1 |= 0x80; } - if (Keyboard.IsPressed(Key.D)) + if (Keyboard.IsPressed(Corekey.D)) { byte0 &= unchecked((byte)~0x01); } @@ -46,7 +46,7 @@ namespace mame { byte0 |= 0x01; } - if (Keyboard.IsPressed(Key.A)) + if (Keyboard.IsPressed(Corekey.A)) { byte0 &= unchecked((byte)~0x02); } @@ -54,7 +54,7 @@ namespace mame { byte0 |= 0x02; } - if (Keyboard.IsPressed(Key.S)) + if (Keyboard.IsPressed(Corekey.S)) { byte0 &= unchecked((byte)~0x04); } @@ -62,7 +62,7 @@ namespace mame { byte0 |= 0x04; } - if (Keyboard.IsPressed(Key.W)) + if (Keyboard.IsPressed(Corekey.W)) { byte0 &= unchecked((byte)~0x08); } @@ -70,7 +70,7 @@ namespace mame { byte0 |= 0x08; } - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { byte0 &= unchecked((byte)~0x10); } @@ -78,7 +78,7 @@ namespace mame { byte0 |= 0x10; } - if (Keyboard.IsPressed(Key.K)) + if (Keyboard.IsPressed(Corekey.K)) { byte0 &= unchecked((byte)~0x20); } @@ -86,7 +86,7 @@ namespace mame { byte0 |= 0x20; } - if (Keyboard.IsPressed(Key.L)) + if (Keyboard.IsPressed(Corekey.L)) { byte0 &= unchecked((byte)~0x40); } @@ -94,7 +94,7 @@ namespace mame { byte0 |= 0x40; } - if (Keyboard.IsPressed(Key.Right)) + if (Keyboard.IsPressed(Corekey.Right)) { byte1 &= unchecked((byte)~0x01); } @@ -102,7 +102,7 @@ namespace mame { byte1 |= 0x01; } - if (Keyboard.IsPressed(Key.Left)) + if (Keyboard.IsPressed(Corekey.Left)) { byte1 &= unchecked((byte)~0x02); } @@ -110,7 +110,7 @@ namespace mame { byte1 |= 0x02; } - if (Keyboard.IsPressed(Key.Down)) + if (Keyboard.IsPressed(Corekey.Down)) { byte1 &= unchecked((byte)~0x04); } @@ -118,7 +118,7 @@ namespace mame { byte1 |= 0x04; } - if (Keyboard.IsPressed(Key.Up)) + if (Keyboard.IsPressed(Corekey.Up)) { byte1 &= unchecked((byte)~0x08); } @@ -126,7 +126,7 @@ namespace mame { byte1 |= 0x08; } - if (Keyboard.IsPressed(Key.NumPad1)) + if (Keyboard.IsPressed(Corekey.NumPad1)) { byte1 &= unchecked((byte)~0x10); } @@ -134,7 +134,7 @@ namespace mame { byte1 |= 0x10; } - if (Keyboard.IsPressed(Key.NumPad2)) + if (Keyboard.IsPressed(Corekey.NumPad2)) { byte1 &= unchecked((byte)~0x20); } @@ -142,7 +142,7 @@ namespace mame { byte1 |= 0x20; } - if (Keyboard.IsPressed(Key.NumPad3)) + if (Keyboard.IsPressed(Corekey.NumPad3)) { byte1 &= unchecked((byte)~0x40); } @@ -150,7 +150,7 @@ namespace mame { byte1 |= 0x40; } - if (Keyboard.IsPressed(Key.R)) + if (Keyboard.IsPressed(Corekey.R)) { byte2 &= unchecked((byte)~0x20); } @@ -158,7 +158,7 @@ namespace mame { byte2 |= 0x20; } - if (Keyboard.IsPressed(Key.T)) + if (Keyboard.IsPressed(Corekey.T)) { byte2 &= unchecked((byte)~0x40); } @@ -169,7 +169,7 @@ namespace mame } public static void loop_inputports_ns1_quester() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { byte2 &= unchecked((byte)~0x10); } @@ -177,7 +177,7 @@ namespace mame { byte2 |= 0x10; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { byte2 &= unchecked((byte)~0x08); } @@ -185,7 +185,7 @@ namespace mame { byte2 |= 0x08; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { byte0 &= unchecked((byte)~0x80); } @@ -193,7 +193,7 @@ namespace mame { byte0 |= 0x80; } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { byte1 &= unchecked((byte)~0x80); } @@ -201,7 +201,7 @@ namespace mame { byte1 |= 0x80; } - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { byte0 &= unchecked((byte)~0x10); } @@ -209,7 +209,7 @@ namespace mame { byte0 |= 0x10; } - if (Keyboard.IsPressed(Key.K)) + if (Keyboard.IsPressed(Corekey.K)) { byte0 &= unchecked((byte)~0x20); } @@ -217,7 +217,7 @@ namespace mame { byte0 |= 0x20; } - if (Keyboard.IsPressed(Key.L)) + if (Keyboard.IsPressed(Corekey.L)) { byte0 &= unchecked((byte)~0x40); } @@ -225,7 +225,7 @@ namespace mame { byte0 |= 0x40; } - if (Keyboard.IsPressed(Key.NumPad1)) + if (Keyboard.IsPressed(Corekey.NumPad1)) { byte1 &= unchecked((byte)~0x10); } @@ -233,7 +233,7 @@ namespace mame { byte1 |= 0x10; } - if (Keyboard.IsPressed(Key.NumPad2)) + if (Keyboard.IsPressed(Corekey.NumPad2)) { byte1 &= unchecked((byte)~0x20); } @@ -241,7 +241,7 @@ namespace mame { byte1 |= 0x20; } - if (Keyboard.IsPressed(Key.NumPad3)) + if (Keyboard.IsPressed(Corekey.NumPad3)) { byte1 &= unchecked((byte)~0x40); } @@ -249,7 +249,7 @@ namespace mame { byte1 |= 0x40; } - if (Keyboard.IsPressed(Key.R)) + if (Keyboard.IsPressed(Corekey.R)) { byte2 &= unchecked((byte)~0x20); } @@ -257,7 +257,7 @@ namespace mame { byte2 |= 0x20; } - if (Keyboard.IsPressed(Key.T)) + if (Keyboard.IsPressed(Corekey.T)) { byte2 &= unchecked((byte)~0x40); } @@ -270,7 +270,7 @@ namespace mame } public static void loop_inputports_ns1_berabohm() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { byte2 &= unchecked((byte)~0x10); } @@ -278,7 +278,7 @@ namespace mame { byte2 |= 0x10; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { byte2 &= unchecked((byte)~0x08); } @@ -286,7 +286,7 @@ namespace mame { byte2 |= 0x08; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { byte0 &= unchecked((byte)~0x80); } @@ -294,7 +294,7 @@ namespace mame { byte0 |= 0x80; } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { byte1 &= unchecked((byte)~0x80); } @@ -302,7 +302,7 @@ namespace mame { byte1 |= 0x80; } - if (Keyboard.IsPressed(Key.D)) + if (Keyboard.IsPressed(Corekey.D)) { byte0 &= unchecked((byte)~0x01); } @@ -310,7 +310,7 @@ namespace mame { byte0 |= 0x01; } - if (Keyboard.IsPressed(Key.A)) + if (Keyboard.IsPressed(Corekey.A)) { byte0 &= unchecked((byte)~0x02); } @@ -318,7 +318,7 @@ namespace mame { byte0 |= 0x02; } - if (Keyboard.IsPressed(Key.S)) + if (Keyboard.IsPressed(Corekey.S)) { byte0 &= unchecked((byte)~0x04); } @@ -326,7 +326,7 @@ namespace mame { byte0 |= 0x04; } - if (Keyboard.IsPressed(Key.W)) + if (Keyboard.IsPressed(Corekey.W)) { byte0 &= unchecked((byte)~0x08); } @@ -334,7 +334,7 @@ namespace mame { byte0 |= 0x08; } - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { byte01 |= 0x01; } @@ -342,7 +342,7 @@ namespace mame { byte01 &= unchecked((byte)~0x01); } - if (Keyboard.IsPressed(Key.K)) + if (Keyboard.IsPressed(Corekey.K)) { byte01 |= 0x02; } @@ -350,7 +350,7 @@ namespace mame { byte01 &= unchecked((byte)~0x02); } - if (Keyboard.IsPressed(Key.L)) + if (Keyboard.IsPressed(Corekey.L)) { byte01 |= 0x04; } @@ -358,7 +358,7 @@ namespace mame { byte01 &= unchecked((byte)~0x04); } - if (Keyboard.IsPressed(Key.U)) + if (Keyboard.IsPressed(Corekey.U)) { byte00 |= 0x01; } @@ -366,7 +366,7 @@ namespace mame { byte00 &= unchecked((byte)~0x01); } - if (Keyboard.IsPressed(Key.I)) + if (Keyboard.IsPressed(Corekey.I)) { byte00 |= 0x02; } @@ -374,7 +374,7 @@ namespace mame { byte00 &= unchecked((byte)~0x02); } - if (Keyboard.IsPressed(Key.O)) + if (Keyboard.IsPressed(Corekey.O)) { byte00 |= 0x04; } @@ -382,7 +382,7 @@ namespace mame { byte00 &= unchecked((byte)~0x04); } - if (Keyboard.IsPressed(Key.Right)) + if (Keyboard.IsPressed(Corekey.Right)) { byte1 &= unchecked((byte)~0x01); } @@ -390,7 +390,7 @@ namespace mame { byte1 |= 0x01; } - if (Keyboard.IsPressed(Key.Left)) + if (Keyboard.IsPressed(Corekey.Left)) { byte1 &= unchecked((byte)~0x02); } @@ -398,7 +398,7 @@ namespace mame { byte1 |= 0x02; } - if (Keyboard.IsPressed(Key.Down)) + if (Keyboard.IsPressed(Corekey.Down)) { byte1 &= unchecked((byte)~0x04); } @@ -406,7 +406,7 @@ namespace mame { byte1 |= 0x04; } - if (Keyboard.IsPressed(Key.Up)) + if (Keyboard.IsPressed(Corekey.Up)) { byte1 &= unchecked((byte)~0x08); } @@ -414,7 +414,7 @@ namespace mame { byte1 |= 0x08; } - if (Keyboard.IsPressed(Key.NumPad1)) + if (Keyboard.IsPressed(Corekey.NumPad1)) { byte03 |= 0x01; } @@ -422,7 +422,7 @@ namespace mame { byte03 &= unchecked((byte)~0x01); } - if (Keyboard.IsPressed(Key.NumPad2)) + if (Keyboard.IsPressed(Corekey.NumPad2)) { byte03 |= 0x02; } @@ -430,7 +430,7 @@ namespace mame { byte03 &= unchecked((byte)~0x02); } - if (Keyboard.IsPressed(Key.NumPad3)) + if (Keyboard.IsPressed(Corekey.NumPad3)) { byte03 |= 0x04; } @@ -438,7 +438,7 @@ namespace mame { byte03 &= unchecked((byte)~0x04); } - if (Keyboard.IsPressed(Key.NumPad4)) + if (Keyboard.IsPressed(Corekey.NumPad4)) { byte02 |= 0x01; } @@ -446,7 +446,7 @@ namespace mame { byte02 &= unchecked((byte)~0x01); } - if (Keyboard.IsPressed(Key.NumPad5)) + if (Keyboard.IsPressed(Corekey.NumPad5)) { byte02 |= 0x02; } @@ -454,7 +454,7 @@ namespace mame { byte02 &= unchecked((byte)~0x02); } - if (Keyboard.IsPressed(Key.NumPad6)) + if (Keyboard.IsPressed(Corekey.NumPad6)) { byte02 |= 0x04; } @@ -462,7 +462,7 @@ namespace mame { byte02 &= unchecked((byte)~0x04); } - if (Keyboard.IsPressed(Key.R)) + if (Keyboard.IsPressed(Corekey.R)) { byte2 &= unchecked((byte)~0x20); } @@ -470,7 +470,7 @@ namespace mame { byte2 |= 0x20; } - if (Keyboard.IsPressed(Key.T)) + if (Keyboard.IsPressed(Corekey.T)) { byte2 &= unchecked((byte)~0x40); } @@ -481,7 +481,7 @@ namespace mame } public static void loop_inputports_ns1_faceoff() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { byte2 &= unchecked((byte)~0x10); } @@ -489,7 +489,7 @@ namespace mame { byte2 |= 0x10; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { byte2 &= unchecked((byte)~0x08); } @@ -497,7 +497,7 @@ namespace mame { byte2 |= 0x08; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { byte0 &= unchecked((byte)~0x80); } @@ -505,7 +505,7 @@ namespace mame { byte0 |= 0x80; } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { byte1 &= unchecked((byte)~0x80); } @@ -513,7 +513,7 @@ namespace mame { byte1 |= 0x80; } - if (Keyboard.IsPressed(Key.D)) + if (Keyboard.IsPressed(Corekey.D)) { byte00 &= unchecked((byte)~0x01); } @@ -521,7 +521,7 @@ namespace mame { byte00 |= 0x01; } - if (Keyboard.IsPressed(Key.A)) + if (Keyboard.IsPressed(Corekey.A)) { byte00 &= unchecked((byte)~0x02); } @@ -529,7 +529,7 @@ namespace mame { byte00 |= 0x02; } - if (Keyboard.IsPressed(Key.S)) + if (Keyboard.IsPressed(Corekey.S)) { byte00 &= unchecked((byte)~0x04); } @@ -537,7 +537,7 @@ namespace mame { byte00 |= 0x04; } - if (Keyboard.IsPressed(Key.W)) + if (Keyboard.IsPressed(Corekey.W)) { byte00 &= unchecked((byte)~0x08); } @@ -545,7 +545,7 @@ namespace mame { byte00 |= 0x08; } - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { byte00 &= unchecked((byte)~0x10); } @@ -553,7 +553,7 @@ namespace mame { byte00 |= 0x10; } - if (Keyboard.IsPressed(Key.K)) + if (Keyboard.IsPressed(Corekey.K)) { byte01 &= unchecked((byte)~0x10); } @@ -561,7 +561,7 @@ namespace mame { byte01 |= 0x10; } - if (Keyboard.IsPressed(Key.Right)) + if (Keyboard.IsPressed(Corekey.Right)) { byte01 &= unchecked((byte)~0x01); } @@ -569,7 +569,7 @@ namespace mame { byte01 |= 0x01; } - if (Keyboard.IsPressed(Key.Left)) + if (Keyboard.IsPressed(Corekey.Left)) { byte01 &= unchecked((byte)~0x02); } @@ -577,7 +577,7 @@ namespace mame { byte01 |= 0x02; } - if (Keyboard.IsPressed(Key.Down)) + if (Keyboard.IsPressed(Corekey.Down)) { byte01 &= unchecked((byte)~0x04); } @@ -585,7 +585,7 @@ namespace mame { byte01 |= 0x04; } - if (Keyboard.IsPressed(Key.Up)) + if (Keyboard.IsPressed(Corekey.Up)) { byte01 &= unchecked((byte)~0x08); } @@ -593,7 +593,7 @@ namespace mame { byte01 |= 0x08; } - if (Keyboard.IsPressed(Key.R)) + if (Keyboard.IsPressed(Corekey.R)) { byte2 &= unchecked((byte)~0x20); } @@ -601,7 +601,7 @@ namespace mame { byte2 |= 0x20; } - if (Keyboard.IsPressed(Key.T)) + if (Keyboard.IsPressed(Corekey.T)) { byte2 &= unchecked((byte)~0x40); } @@ -612,7 +612,7 @@ namespace mame } public static void loop_inputports_ns1_tankfrce4() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { byte2 &= unchecked((byte)~0x10); } @@ -620,7 +620,7 @@ namespace mame { byte2 |= 0x10; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { byte2 &= unchecked((byte)~0x08); } @@ -628,7 +628,7 @@ namespace mame { byte2 |= 0x08; } - if (Keyboard.IsPressed(Key.D)) + if (Keyboard.IsPressed(Corekey.D)) { byte00 &= unchecked((byte)~0x01); } @@ -636,7 +636,7 @@ namespace mame { byte00 |= 0x01; } - if (Keyboard.IsPressed(Key.A)) + if (Keyboard.IsPressed(Corekey.A)) { byte00 &= unchecked((byte)~0x02); } @@ -644,7 +644,7 @@ namespace mame { byte00 |= 0x02; } - if (Keyboard.IsPressed(Key.S)) + if (Keyboard.IsPressed(Corekey.S)) { byte00 &= unchecked((byte)~0x04); } @@ -652,7 +652,7 @@ namespace mame { byte00 |= 0x04; } - if (Keyboard.IsPressed(Key.W)) + if (Keyboard.IsPressed(Corekey.W)) { byte00 &= unchecked((byte)~0x08); } @@ -660,7 +660,7 @@ namespace mame { byte00 |= 0x08; } - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { byte00 &= unchecked((byte)~0x10); } @@ -668,7 +668,7 @@ namespace mame { byte00 |= 0x10; } - if (Keyboard.IsPressed(Key.Right)) + if (Keyboard.IsPressed(Corekey.Right)) { byte02 &= unchecked((byte)~0x01); } @@ -676,7 +676,7 @@ namespace mame { byte02 |= 0x01; } - if (Keyboard.IsPressed(Key.Left)) + if (Keyboard.IsPressed(Corekey.Left)) { byte02 &= unchecked((byte)~0x02); } @@ -684,7 +684,7 @@ namespace mame { byte02 |= 0x02; } - if (Keyboard.IsPressed(Key.Down)) + if (Keyboard.IsPressed(Corekey.Down)) { byte02 &= unchecked((byte)~0x04); } @@ -692,7 +692,7 @@ namespace mame { byte02 |= 0x04; } - if (Keyboard.IsPressed(Key.Up)) + if (Keyboard.IsPressed(Corekey.Up)) { byte02 &= unchecked((byte)~0x08); } @@ -700,7 +700,7 @@ namespace mame { byte02 |= 0x08; } - if (Keyboard.IsPressed(Key.NumPad1)) + if (Keyboard.IsPressed(Corekey.NumPad1)) { byte02 &= unchecked((byte)~0x10); } diff --git a/MAME.Core/mame/namcos1/Namcos1.cs b/MAME.Core/mame/namcos1/Namcos1.cs index da7d93c..d5c3aa2 100644 --- a/MAME.Core/mame/namcos1/Namcos1.cs +++ b/MAME.Core/mame/namcos1/Namcos1.cs @@ -121,25 +121,5 @@ namespace mame dac1_value = data - 0x80; namcos1_update_DACs(); } - public static void nvram_handler_load_namcos1() - { - if (File.Exists("nvram\\" + Machine.sName + ".nv")) - { - FileStream fs1 = new FileStream("nvram\\" + Machine.sName + ".nv", FileMode.Open); - int n = (int)fs1.Length; - fs1.Read(Generic.generic_nvram, 0, n); - fs1.Close(); - } - else - { - Array.Clear(Generic.generic_nvram, 0, 0x800); - } - } - public static void nvram_handler_save_namcos1() - { - FileStream fs1 = new FileStream("nvram\\" + Machine.sName + ".nv", FileMode.Create); - fs1.Write(Generic.generic_nvram, 0, 0x800); - fs1.Close(); - } } } diff --git a/MAME.Core/mame/neogeo/Input.cs b/MAME.Core/mame/neogeo/Input.cs index cfa90d1..99b0d8d 100644 --- a/MAME.Core/mame/neogeo/Input.cs +++ b/MAME.Core/mame/neogeo/Input.cs @@ -6,7 +6,7 @@ namespace mame { public static void loop_inputports_neogeo_standard() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { short3 &= ~0x0001; } @@ -14,7 +14,7 @@ namespace mame { short3 |= 0x0001; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { short3 &= ~0x0002; } @@ -22,7 +22,7 @@ namespace mame { short3 |= 0x0002; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { short2 &= ~0x0100; } @@ -30,7 +30,7 @@ namespace mame { short2 |= 0x0100; } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { short2 &= ~0x0400; } @@ -38,7 +38,7 @@ namespace mame { short2 |= 0x0400; } - if (Keyboard.IsPressed(Key.D)) + if (Keyboard.IsPressed(Corekey.D)) { short0 &= ~0x0800; } @@ -46,7 +46,7 @@ namespace mame { short0 |= 0x0800; } - if (Keyboard.IsPressed(Key.A)) + if (Keyboard.IsPressed(Corekey.A)) { short0 &= ~0x0400; } @@ -54,7 +54,7 @@ namespace mame { short0 |= 0x0400; } - if (Keyboard.IsPressed(Key.S)) + if (Keyboard.IsPressed(Corekey.S)) { short0 &= ~0x0200; } @@ -62,7 +62,7 @@ namespace mame { short0 |= 0x0200; } - if (Keyboard.IsPressed(Key.W)) + if (Keyboard.IsPressed(Corekey.W)) { short0 &= ~0x0100; } @@ -70,7 +70,7 @@ namespace mame { short0 |= 0x0100; } - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { short0 &= ~0x1000; } @@ -78,7 +78,7 @@ namespace mame { short0 |= 0x1000; } - if (Keyboard.IsPressed(Key.K)) + if (Keyboard.IsPressed(Corekey.K)) { short0 &= ~0x2000; } @@ -86,7 +86,7 @@ namespace mame { short0 |= 0x2000; } - if (Keyboard.IsPressed(Key.L)) + if (Keyboard.IsPressed(Corekey.L)) { } @@ -94,7 +94,7 @@ namespace mame { } - if (Keyboard.IsPressed(Key.U)) + if (Keyboard.IsPressed(Corekey.U)) { short0 &= ~0x4000; } @@ -102,7 +102,7 @@ namespace mame { short0 |= 0x4000; } - if (Keyboard.IsPressed(Key.I)) + if (Keyboard.IsPressed(Corekey.I)) { short0 &= unchecked((short)~0x8000); } @@ -110,7 +110,7 @@ namespace mame { short0 |= unchecked((short)0x8000); } - if (Keyboard.IsPressed(Key.O)) + if (Keyboard.IsPressed(Corekey.O)) { } @@ -118,7 +118,7 @@ namespace mame { } - if (Keyboard.IsPressed(Key.Right)) + if (Keyboard.IsPressed(Corekey.Right)) { short1 &= ~0x0800; } @@ -126,7 +126,7 @@ namespace mame { short1 |= 0x0800; } - if (Keyboard.IsPressed(Key.Left)) + if (Keyboard.IsPressed(Corekey.Left)) { short1 &= ~0x0400; } @@ -134,7 +134,7 @@ namespace mame { short1 |= 0x0400; } - if (Keyboard.IsPressed(Key.Down)) + if (Keyboard.IsPressed(Corekey.Down)) { short1 &= ~0x0200; } @@ -142,7 +142,7 @@ namespace mame { short1 |= 0x0200; } - if (Keyboard.IsPressed(Key.Up)) + if (Keyboard.IsPressed(Corekey.Up)) { short1 &= ~0x0100; } @@ -150,7 +150,7 @@ namespace mame { short1 |= 0x0100; } - if (Keyboard.IsPressed(Key.NumPad1)) + if (Keyboard.IsPressed(Corekey.NumPad1)) { short1 &= ~0x1000; } @@ -158,7 +158,7 @@ namespace mame { short1 |= 0x1000; } - if (Keyboard.IsPressed(Key.NumPad2)) + if (Keyboard.IsPressed(Corekey.NumPad2)) { short1 &= ~0x2000; } @@ -166,7 +166,7 @@ namespace mame { short1 |= 0x2000; } - if (Keyboard.IsPressed(Key.NumPad3)) + if (Keyboard.IsPressed(Corekey.NumPad3)) { } @@ -174,7 +174,7 @@ namespace mame { } - if (Keyboard.IsPressed(Key.NumPad4)) + if (Keyboard.IsPressed(Corekey.NumPad4)) { short1 &= ~0x4000; } @@ -182,7 +182,7 @@ namespace mame { short1 |= 0x4000; } - if (Keyboard.IsPressed(Key.NumPad5)) + if (Keyboard.IsPressed(Corekey.NumPad5)) { short1 &= unchecked((short)~0x8000); } @@ -190,7 +190,7 @@ namespace mame { short1 |= unchecked((short)0x8000); } - if (Keyboard.IsPressed(Key.NumPad6)) + if (Keyboard.IsPressed(Corekey.NumPad6)) { } @@ -198,7 +198,7 @@ namespace mame { } - if (Keyboard.IsPressed(Key.R)) + if (Keyboard.IsPressed(Corekey.R)) { short3 &= ~0x0004; } @@ -206,7 +206,7 @@ namespace mame { short3 |= 0x0004; } - if (Keyboard.IsPressed(Key.T)) + if (Keyboard.IsPressed(Corekey.T)) { short4 &= ~0x0080; } @@ -217,7 +217,7 @@ namespace mame } public static void loop_inputports_neogeo_irrmaze() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { short3 &= ~0x0001; } @@ -225,7 +225,7 @@ namespace mame { short3 |= 0x0001; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { short3 &= ~0x0002; } @@ -233,7 +233,7 @@ namespace mame { short3 |= 0x0002; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { short2 &= ~0x0100; } @@ -241,7 +241,7 @@ namespace mame { short2 |= 0x0100; } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { short2 &= ~0x0400; } @@ -249,7 +249,7 @@ namespace mame { short2 |= 0x0400; } - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { short1 &= ~0x1000; } @@ -257,7 +257,7 @@ namespace mame { short1 |= 0x1000; } - if (Keyboard.IsPressed(Key.K)) + if (Keyboard.IsPressed(Corekey.K)) { short1 &= ~0x2000; } @@ -265,7 +265,7 @@ namespace mame { short1 |= 0x2000; } - if (Keyboard.IsPressed(Key.NumPad1)) + if (Keyboard.IsPressed(Corekey.NumPad1)) { short1 &= ~0x4000; } @@ -273,7 +273,7 @@ namespace mame { short1 |= 0x4000; } - if (Keyboard.IsPressed(Key.NumPad2)) + if (Keyboard.IsPressed(Corekey.NumPad2)) { short1 &= unchecked((short)~0x8000); } diff --git a/MAME.Core/mame/neogeo/Neogeo.cs b/MAME.Core/mame/neogeo/Neogeo.cs index 876b666..086a0e3 100644 --- a/MAME.Core/mame/neogeo/Neogeo.cs +++ b/MAME.Core/mame/neogeo/Neogeo.cs @@ -333,6 +333,7 @@ namespace mame calendar_init(); irq3_pending = 1; } + public static void nvram_handler_load_neogeo() { if (File.Exists("nvram\\" + Machine.sName + ".nv")) diff --git a/MAME.Core/mame/pgm/Input.cs b/MAME.Core/mame/pgm/Input.cs index 1c7f6cf..14ed282 100644 --- a/MAME.Core/mame/pgm/Input.cs +++ b/MAME.Core/mame/pgm/Input.cs @@ -6,7 +6,7 @@ namespace mame { public static void loop_inputports_pgm_standard() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { short2 &= ~0x0001; } @@ -14,7 +14,7 @@ namespace mame { short2 |= 0x0001; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { short2 &= ~0x0002; } @@ -22,7 +22,7 @@ namespace mame { short2 |= 0x0002; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { short0 &= ~0x0001; } @@ -30,7 +30,7 @@ namespace mame { short0 |= 0x0001; } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { short0 &= ~0x0100; } @@ -38,7 +38,7 @@ namespace mame { short0 |= 0x0100; } - if (Keyboard.IsPressed(Key.D)) + if (Keyboard.IsPressed(Corekey.D)) { short0 &= ~0x0010; } @@ -46,7 +46,7 @@ namespace mame { short0 |= 0x0010; } - if (Keyboard.IsPressed(Key.A)) + if (Keyboard.IsPressed(Corekey.A)) { short0 &= ~0x0008; } @@ -54,7 +54,7 @@ namespace mame { short0 |= 0x0008; } - if (Keyboard.IsPressed(Key.S)) + if (Keyboard.IsPressed(Corekey.S)) { short0 &= ~0x0004; } @@ -62,7 +62,7 @@ namespace mame { short0 |= 0x0004; } - if (Keyboard.IsPressed(Key.W)) + if (Keyboard.IsPressed(Corekey.W)) { short0 &= ~0x0002; } @@ -70,7 +70,7 @@ namespace mame { short0 |= 0x0002; } - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { short0 &= ~0x0020; } @@ -78,7 +78,7 @@ namespace mame { short0 |= 0x0020; } - if (Keyboard.IsPressed(Key.K)) + if (Keyboard.IsPressed(Corekey.K)) { short0 &= ~0x0040; } @@ -86,7 +86,7 @@ namespace mame { short0 |= 0x0040; } - if (Keyboard.IsPressed(Key.L)) + if (Keyboard.IsPressed(Corekey.L)) { short0 &= ~0x0080; } @@ -94,7 +94,7 @@ namespace mame { short0 |= 0x0080; } - if (Keyboard.IsPressed(Key.U)) + if (Keyboard.IsPressed(Corekey.U)) { short2 &= ~0x0100; } @@ -102,7 +102,7 @@ namespace mame { short2 |= 0x0100; } - if (Keyboard.IsPressed(Key.I)) + if (Keyboard.IsPressed(Corekey.I)) { } @@ -110,7 +110,7 @@ namespace mame { } - if (Keyboard.IsPressed(Key.O)) + if (Keyboard.IsPressed(Corekey.O)) { } @@ -118,7 +118,7 @@ namespace mame { } - if (Keyboard.IsPressed(Key.Right)) + if (Keyboard.IsPressed(Corekey.Right)) { short0 &= ~0x1000; } @@ -126,7 +126,7 @@ namespace mame { short0 |= 0x1000; } - if (Keyboard.IsPressed(Key.Left)) + if (Keyboard.IsPressed(Corekey.Left)) { short0 &= ~0x0800; } @@ -134,7 +134,7 @@ namespace mame { short0 |= 0x0800; } - if (Keyboard.IsPressed(Key.Down)) + if (Keyboard.IsPressed(Corekey.Down)) { short0 &= ~0x0400; } @@ -142,7 +142,7 @@ namespace mame { short0 |= 0x0400; } - if (Keyboard.IsPressed(Key.Up)) + if (Keyboard.IsPressed(Corekey.Up)) { short0 &= ~0x0200; } @@ -150,7 +150,7 @@ namespace mame { short0 |= 0x0200; } - if (Keyboard.IsPressed(Key.NumPad1)) + if (Keyboard.IsPressed(Corekey.NumPad1)) { short0 &= ~0x2000; } @@ -158,7 +158,7 @@ namespace mame { short0 |= 0x2000; } - if (Keyboard.IsPressed(Key.NumPad2)) + if (Keyboard.IsPressed(Corekey.NumPad2)) { short0 &= ~0x4000; } @@ -166,7 +166,7 @@ namespace mame { short0 |= 0x4000; } - if (Keyboard.IsPressed(Key.NumPad3)) + if (Keyboard.IsPressed(Corekey.NumPad3)) { short0 &= unchecked((short)~0x8000); } @@ -174,7 +174,7 @@ namespace mame { short0 |= unchecked((short)0x8000); } - if (Keyboard.IsPressed(Key.NumPad4)) + if (Keyboard.IsPressed(Corekey.NumPad4)) { short2 &= ~0x0200; } @@ -182,7 +182,7 @@ namespace mame { short2 |= 0x0200; } - if (Keyboard.IsPressed(Key.NumPad5)) + if (Keyboard.IsPressed(Corekey.NumPad5)) { } @@ -190,7 +190,7 @@ namespace mame { } - if (Keyboard.IsPressed(Key.NumPad6)) + if (Keyboard.IsPressed(Corekey.NumPad6)) { } @@ -198,7 +198,7 @@ namespace mame { } - if (Keyboard.IsPressed(Key.R)) + if (Keyboard.IsPressed(Corekey.R)) { short2 &= ~0x0020; } @@ -206,7 +206,7 @@ namespace mame { short2 |= 0x0020; } - if (Keyboard.IsPressed(Key.T)) + if (Keyboard.IsPressed(Corekey.T)) { short2 &= ~0x0080; } diff --git a/MAME.Core/mame/pgm/PGM.cs b/MAME.Core/mame/pgm/PGM.cs index 7470493..011d3c6 100644 --- a/MAME.Core/mame/pgm/PGM.cs +++ b/MAME.Core/mame/pgm/PGM.cs @@ -216,22 +216,6 @@ namespace mame } } } - public static void nvram_handler_load_pgm() - { - if (File.Exists("nvram\\" + Machine.sName + ".nv")) - { - FileStream fs1 = new FileStream("nvram\\" + Machine.sName + ".nv", FileMode.Open); - int n = 0x20000; - fs1.Read(Memory.mainram, 0, n); - fs1.Close(); - } - } - public static void nvram_handler_save_pgm() - { - FileStream fs1 = new FileStream("nvram\\" + Machine.sName + ".nv", FileMode.Create); - fs1.Write(Memory.mainram, 0, 0x20000); - fs1.Close(); - } } } diff --git a/MAME.Core/mame/suna8/Input.cs b/MAME.Core/mame/suna8/Input.cs index 13d8672..9e1f39c 100644 --- a/MAME.Core/mame/suna8/Input.cs +++ b/MAME.Core/mame/suna8/Input.cs @@ -6,7 +6,7 @@ namespace mame { public static void loop_inputports_suna8_starfigh() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { byte1 &= unchecked((byte)~0x80); } @@ -14,7 +14,7 @@ namespace mame { byte1 |= 0x80; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { byte2 &= unchecked((byte)~0x80); } @@ -22,7 +22,7 @@ namespace mame { byte2 |= 0x80; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { byte1 &= unchecked((byte)~0x40); } @@ -30,7 +30,7 @@ namespace mame { byte1 |= 0x40; } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { byte2 &= unchecked((byte)~0x40); } @@ -38,7 +38,7 @@ namespace mame { byte2 |= 0x40; } - if (Keyboard.IsPressed(Key.D)) + if (Keyboard.IsPressed(Corekey.D)) { byte1 &= unchecked((byte)~0x08); } @@ -46,7 +46,7 @@ namespace mame { byte1 |= 0x08; } - if (Keyboard.IsPressed(Key.A)) + if (Keyboard.IsPressed(Corekey.A)) { byte1 &= unchecked((byte)~0x04); } @@ -54,7 +54,7 @@ namespace mame { byte1 |= 0x04; } - if (Keyboard.IsPressed(Key.S)) + if (Keyboard.IsPressed(Corekey.S)) { byte1 &= unchecked((byte)~0x02); } @@ -62,7 +62,7 @@ namespace mame { byte1 |= 0x02; } - if (Keyboard.IsPressed(Key.W)) + if (Keyboard.IsPressed(Corekey.W)) { byte1 &= unchecked((byte)~0x01); } @@ -70,7 +70,7 @@ namespace mame { byte1 |= 0x01; } - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { byte1 &= unchecked((byte)~0x10); } @@ -78,7 +78,7 @@ namespace mame { byte1 |= 0x10; } - if (Keyboard.IsPressed(Key.K)) + if (Keyboard.IsPressed(Corekey.K)) { byte1 &= unchecked((byte)~0x20); } @@ -86,7 +86,7 @@ namespace mame { byte1 |= 0x20; } - if (Keyboard.IsPressed(Key.Right)) + if (Keyboard.IsPressed(Corekey.Right)) { byte2 &= unchecked((byte)~0x08); } @@ -94,7 +94,7 @@ namespace mame { byte2 |= 0x08; } - if (Keyboard.IsPressed(Key.Left)) + if (Keyboard.IsPressed(Corekey.Left)) { byte2 &= unchecked((byte)~0x04); } @@ -102,7 +102,7 @@ namespace mame { byte2 |= 0x04; } - if (Keyboard.IsPressed(Key.Down)) + if (Keyboard.IsPressed(Corekey.Down)) { byte2 &= unchecked((byte)~0x02); } @@ -110,7 +110,7 @@ namespace mame { byte2 |= 0x02; } - if (Keyboard.IsPressed(Key.Up)) + if (Keyboard.IsPressed(Corekey.Up)) { byte2 &= unchecked((byte)~0x01); } @@ -118,7 +118,7 @@ namespace mame { byte2 |= 0x01; } - if (Keyboard.IsPressed(Key.NumPad1)) + if (Keyboard.IsPressed(Corekey.NumPad1)) { byte2 &= unchecked((byte)~0x10); } @@ -126,7 +126,7 @@ namespace mame { byte2 |= 0x10; } - if (Keyboard.IsPressed(Key.NumPad2)) + if (Keyboard.IsPressed(Corekey.NumPad2)) { byte2 &= unchecked((byte)~0x20); } diff --git a/MAME.Core/mame/suna8/SunA8.cs b/MAME.Core/mame/suna8/SunA8.cs index 9bb8904..d6474d3 100644 --- a/MAME.Core/mame/suna8/SunA8.cs +++ b/MAME.Core/mame/suna8/SunA8.cs @@ -154,12 +154,6 @@ namespace mame { samplebuf[i] = (short)((sbyte)(samplesrom[i] ^ 0x80) * 256); } - /*BinaryWriter bw1 = new BinaryWriter(new FileStream(@"\VS2008\compare1\compare1\bin\Debug\sample.dat", FileMode.Append)); - for (i = 0; i < len; i++) - { - bw1.Write((byte)(samplebuf[i] >> 8)); - } - bw1.Close();*/ } public static void machine_reset_suna8() { diff --git a/MAME.Core/mame/taito/Input.cs b/MAME.Core/mame/taito/Input.cs index dc1a4b5..8b2fb27 100644 --- a/MAME.Core/mame/taito/Input.cs +++ b/MAME.Core/mame/taito/Input.cs @@ -10,7 +10,7 @@ namespace mame } public static void loop_inputports_taito_bublbobl() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { sbyte0 |= 0x04; } @@ -18,7 +18,7 @@ namespace mame { sbyte0 &= ~0x04; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { sbyte0 |= 0x08; } @@ -26,7 +26,7 @@ namespace mame { sbyte0 &= ~0x08; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { sbyte1 &= ~0x40; } @@ -34,7 +34,7 @@ namespace mame { sbyte1 |= 0x40; } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { sbyte2 &= ~0x40; } @@ -42,7 +42,7 @@ namespace mame { sbyte2 |= 0x40; } - if (Keyboard.IsPressed(Key.D)) + if (Keyboard.IsPressed(Corekey.D)) { sbyte1 &= ~0x02; } @@ -50,7 +50,7 @@ namespace mame { sbyte1 |= 0x02; } - if (Keyboard.IsPressed(Key.A)) + if (Keyboard.IsPressed(Corekey.A)) { sbyte1 &= ~0x01; } @@ -74,7 +74,7 @@ namespace mame { sbyte2 |= 0x01; }*/ - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { sbyte1 &= ~0x20; } @@ -82,7 +82,7 @@ namespace mame { sbyte1 |= 0x20; } - if (Keyboard.IsPressed(Key.K)) + if (Keyboard.IsPressed(Corekey.K)) { sbyte1 &= ~0x10; } @@ -98,7 +98,7 @@ namespace mame { sbyte1 |= 0x04; }*/ - if (Keyboard.IsPressed(Key.Right)) + if (Keyboard.IsPressed(Corekey.Right)) { sbyte2 &= ~0x02; } @@ -106,7 +106,7 @@ namespace mame { sbyte2 |= 0x02; } - if (Keyboard.IsPressed(Key.Left)) + if (Keyboard.IsPressed(Corekey.Left)) { sbyte2 &= ~0x01; } @@ -130,7 +130,7 @@ namespace mame { sbyte2 |= 0x10; }*/ - if (Keyboard.IsPressed(Key.NumPad1)) + if (Keyboard.IsPressed(Corekey.NumPad1)) { sbyte2 &= ~0x20; } @@ -138,7 +138,7 @@ namespace mame { sbyte2 |= 0x20; } - if (Keyboard.IsPressed(Key.NumPad2)) + if (Keyboard.IsPressed(Corekey.NumPad2)) { sbyte2 &= ~0x10; } @@ -154,7 +154,7 @@ namespace mame { sbyte1 |= 0x40; }*/ - if (Keyboard.IsPressed(Key.R)) + if (Keyboard.IsPressed(Corekey.R)) { sbyte0 &= ~0x02; } @@ -173,7 +173,7 @@ namespace mame } public static void loop_inputports_taito_tokio() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { sbyte0 |= 0x04; } @@ -181,7 +181,7 @@ namespace mame { sbyte0 &= ~0x04; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { sbyte0 |= 0x08; } @@ -189,7 +189,7 @@ namespace mame { sbyte0 &= ~0x08; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { sbyte1 &= ~0x40; } @@ -197,7 +197,7 @@ namespace mame { sbyte1 |= 0x40; } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { sbyte2 &= ~0x40; } @@ -205,7 +205,7 @@ namespace mame { sbyte2 |= 0x40; } - if (Keyboard.IsPressed(Key.D)) + if (Keyboard.IsPressed(Corekey.D)) { sbyte1 &= ~0x02; } @@ -213,7 +213,7 @@ namespace mame { sbyte1 |= 0x02; } - if (Keyboard.IsPressed(Key.A)) + if (Keyboard.IsPressed(Corekey.A)) { sbyte1 &= ~0x01; } @@ -221,7 +221,7 @@ namespace mame { sbyte1 |= 0x01; } - if (Keyboard.IsPressed(Key.S)) + if (Keyboard.IsPressed(Corekey.S)) { sbyte1 &= ~0x04; } @@ -229,7 +229,7 @@ namespace mame { sbyte1 |= 0x04; } - if (Keyboard.IsPressed(Key.W)) + if (Keyboard.IsPressed(Corekey.W)) { sbyte1 &= ~0x08; } @@ -237,7 +237,7 @@ namespace mame { sbyte1 |= 0x08; } - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { sbyte1 &= ~0x20; } @@ -245,7 +245,7 @@ namespace mame { sbyte1 |= 0x20; } - if (Keyboard.IsPressed(Key.K)) + if (Keyboard.IsPressed(Corekey.K)) { sbyte1 &= ~0x10; } @@ -261,7 +261,7 @@ namespace mame { sbyte1 |= 0x04; }*/ - if (Keyboard.IsPressed(Key.Right)) + if (Keyboard.IsPressed(Corekey.Right)) { sbyte2 &= ~0x02; } @@ -269,7 +269,7 @@ namespace mame { sbyte2 |= 0x02; } - if (Keyboard.IsPressed(Key.Left)) + if (Keyboard.IsPressed(Corekey.Left)) { sbyte2 &= ~0x01; } @@ -277,7 +277,7 @@ namespace mame { sbyte2 |= 0x01; } - if (Keyboard.IsPressed(Key.Down)) + if (Keyboard.IsPressed(Corekey.Down)) { sbyte2 &= ~0x04; } @@ -285,7 +285,7 @@ namespace mame { sbyte2 |= 0x04; } - if (Keyboard.IsPressed(Key.Up)) + if (Keyboard.IsPressed(Corekey.Up)) { sbyte2 &= ~0x08; } @@ -293,7 +293,7 @@ namespace mame { sbyte2 |= 0x08; } - if (Keyboard.IsPressed(Key.NumPad1)) + if (Keyboard.IsPressed(Corekey.NumPad1)) { sbyte2 &= ~0x20; } @@ -301,7 +301,7 @@ namespace mame { sbyte2 |= 0x20; } - if (Keyboard.IsPressed(Key.NumPad2)) + if (Keyboard.IsPressed(Corekey.NumPad2)) { sbyte2 &= ~0x10; } @@ -317,7 +317,7 @@ namespace mame { sbyte1 |= 0x40; }*/ - if (Keyboard.IsPressed(Key.R)) + if (Keyboard.IsPressed(Corekey.R)) { sbyte0 &= ~0x02; } @@ -336,7 +336,7 @@ namespace mame } public static void loop_inputports_taito_boblbobl() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { sbyte0 |= 0x08; } @@ -344,7 +344,7 @@ namespace mame { sbyte0 &= ~0x08; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { sbyte0 |= 0x04; } @@ -352,7 +352,7 @@ namespace mame { sbyte0 &= ~0x04; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { sbyte0 &= ~0x40; } @@ -360,7 +360,7 @@ namespace mame { sbyte0 |= 0x40; } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { sbyte1 &= ~0x40; } @@ -368,7 +368,7 @@ namespace mame { sbyte1 |= 0x40; } - if (Keyboard.IsPressed(Key.D)) + if (Keyboard.IsPressed(Corekey.D)) { sbyte0 &= ~0x02; } @@ -376,7 +376,7 @@ namespace mame { sbyte0 |= 0x02; } - if (Keyboard.IsPressed(Key.A)) + if (Keyboard.IsPressed(Corekey.A)) { sbyte0 &= ~0x01; } @@ -400,7 +400,7 @@ namespace mame { sbyte1 |= 0x08; }*/ - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { sbyte0 &= ~0x20; } @@ -408,7 +408,7 @@ namespace mame { sbyte0 |= 0x20; } - if (Keyboard.IsPressed(Key.K)) + if (Keyboard.IsPressed(Corekey.K)) { sbyte0 &= ~0x10; } @@ -424,7 +424,7 @@ namespace mame { sbyte1 |= 0x04; }*/ - if (Keyboard.IsPressed(Key.Right)) + if (Keyboard.IsPressed(Corekey.Right)) { sbyte1 &= ~0x02; } @@ -432,7 +432,7 @@ namespace mame { sbyte1 |= 0x02; } - if (Keyboard.IsPressed(Key.Left)) + if (Keyboard.IsPressed(Corekey.Left)) { sbyte1 &= ~0x01; } @@ -456,7 +456,7 @@ namespace mame { sbyte2 |= 0x08; }*/ - if (Keyboard.IsPressed(Key.NumPad1)) + if (Keyboard.IsPressed(Corekey.NumPad1)) { sbyte1 &= ~0x20; } @@ -464,7 +464,7 @@ namespace mame { sbyte1 |= 0x20; } - if (Keyboard.IsPressed(Key.NumPad2)) + if (Keyboard.IsPressed(Corekey.NumPad2)) { sbyte1 &= ~0x10; } @@ -480,7 +480,7 @@ namespace mame { sbyte1 |= 0x40; }*/ - if (Keyboard.IsPressed(Key.R)) + if (Keyboard.IsPressed(Corekey.R)) { sbyte1 &= ~0x08; } @@ -499,7 +499,7 @@ namespace mame } public static void loop_inputports_taito_opwolf() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { sbyte0 |= 0x01; } @@ -507,7 +507,7 @@ namespace mame { sbyte0 &= ~0x01; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { sbyte0 |= 0x02; } @@ -515,7 +515,7 @@ namespace mame { sbyte0 &= ~0x02; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { sbyte1 &= ~0x10; } @@ -563,7 +563,7 @@ namespace mame { sbyte2 |= 0x01; }*/ - if (Keyboard.IsPressed(Key.J) || Mouse.buttons[0] != 0) + if (Keyboard.IsPressed(Corekey.J) || Mouse.buttons[0] != 0) { sbyte1 &= ~0x01; } @@ -571,7 +571,7 @@ namespace mame { sbyte1 |= 0x01; } - if (Keyboard.IsPressed(Key.K) || Mouse.buttons[1] != 0) + if (Keyboard.IsPressed(Corekey.K) || Mouse.buttons[1] != 0) { sbyte1 &= ~0x02; } @@ -643,7 +643,7 @@ namespace mame { sbyte1 |= 0x40; }*/ - if (Keyboard.IsPressed(Key.R)) + if (Keyboard.IsPressed(Corekey.R)) { sbyte1 &= ~0x04; } @@ -651,7 +651,7 @@ namespace mame { sbyte1 |= 0x04; } - if (Keyboard.IsPressed(Key.T)) + if (Keyboard.IsPressed(Corekey.T)) { sbyte1 &= ~0x08; } @@ -666,7 +666,7 @@ namespace mame } public static void loop_inputports_taito_opwolfp() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { sbyte3 |= 0x02; } @@ -674,7 +674,7 @@ namespace mame { sbyte3 &= ~0x02; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { sbyte3 |= 0x04; } @@ -682,7 +682,7 @@ namespace mame { sbyte3 &= ~0x04; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { sbyte2 &= ~0x20; } @@ -690,7 +690,7 @@ namespace mame { sbyte2 |= 0x20; } - if (Keyboard.IsPressed(Key.J) || Mouse.buttons[0] != 0) + if (Keyboard.IsPressed(Corekey.J) || Mouse.buttons[0] != 0) { sbyte2 &= ~0x02; } @@ -698,7 +698,7 @@ namespace mame { sbyte2 |= 0x02; } - if (Keyboard.IsPressed(Key.K) || Mouse.buttons[1] != 0) + if (Keyboard.IsPressed(Corekey.K) || Mouse.buttons[1] != 0) { sbyte2 &= ~0x04; } @@ -706,7 +706,7 @@ namespace mame { sbyte2 |= 0x04; } - if (Keyboard.IsPressed(Key.R)) + if (Keyboard.IsPressed(Corekey.R)) { sbyte2 &= ~0x08; } @@ -714,7 +714,7 @@ namespace mame { sbyte2 |= 0x08; } - if (Keyboard.IsPressed(Key.T)) + if (Keyboard.IsPressed(Corekey.T)) { sbyte2 &= ~0x10; } diff --git a/MAME.Core/mame/taitob/Input.cs b/MAME.Core/mame/taitob/Input.cs index f4750dc..b0b78b9 100644 --- a/MAME.Core/mame/taitob/Input.cs +++ b/MAME.Core/mame/taitob/Input.cs @@ -10,7 +10,7 @@ namespace mame } public static void loop_inputports_taitob_pbobble() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { dswb &= unchecked((byte)~0x10); } @@ -18,7 +18,7 @@ namespace mame { dswb |= 0x10; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { dswb &= unchecked((byte)~0x20); } @@ -26,7 +26,7 @@ namespace mame { dswb |= 0x20; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { sbyte0 &= ~0x10; } @@ -34,7 +34,7 @@ namespace mame { sbyte0 |= 0x10; } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { sbyte0 &= ~0x20; } @@ -42,7 +42,7 @@ namespace mame { sbyte0 |= 0x20; } - if (Keyboard.IsPressed(Key.D)) + if (Keyboard.IsPressed(Corekey.D)) { sbyte2 &= ~0x08; } @@ -50,7 +50,7 @@ namespace mame { sbyte2 |= 0x08; } - if (Keyboard.IsPressed(Key.A)) + if (Keyboard.IsPressed(Corekey.A)) { sbyte2 &= ~0x04; } @@ -58,7 +58,7 @@ namespace mame { sbyte2 |= 0x04; } - if (Keyboard.IsPressed(Key.S)) + if (Keyboard.IsPressed(Corekey.S)) { sbyte2 &= ~0x02; } @@ -66,7 +66,7 @@ namespace mame { sbyte2 |= 0x02; } - if (Keyboard.IsPressed(Key.W)) + if (Keyboard.IsPressed(Corekey.W)) { sbyte2 &= ~0x01; } @@ -74,7 +74,7 @@ namespace mame { sbyte2 |= 0x01; } - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { sbyte1 &= ~0x01; } @@ -82,7 +82,7 @@ namespace mame { sbyte1 |= 0x01; } - if (Keyboard.IsPressed(Key.K)) + if (Keyboard.IsPressed(Corekey.K)) { sbyte1 &= ~0x02; } @@ -90,7 +90,7 @@ namespace mame { sbyte1 |= 0x02; } - if (Keyboard.IsPressed(Key.L)) + if (Keyboard.IsPressed(Corekey.L)) { sbyte1 &= ~0x04; } @@ -98,7 +98,7 @@ namespace mame { sbyte1 |= 0x04; } - if (Keyboard.IsPressed(Key.Right)) + if (Keyboard.IsPressed(Corekey.Right)) { sbyte2 &= unchecked((sbyte)~0x80); } @@ -106,7 +106,7 @@ namespace mame { sbyte2 |= unchecked((sbyte)0x80); } - if (Keyboard.IsPressed(Key.Left)) + if (Keyboard.IsPressed(Corekey.Left)) { sbyte2 &= ~0x40; } @@ -114,7 +114,7 @@ namespace mame { sbyte2 |= 0x40; } - if (Keyboard.IsPressed(Key.Down)) + if (Keyboard.IsPressed(Corekey.Down)) { sbyte2 &= ~0x20; } @@ -122,7 +122,7 @@ namespace mame { sbyte2 |= 0x20; } - if (Keyboard.IsPressed(Key.Up)) + if (Keyboard.IsPressed(Corekey.Up)) { sbyte2 &= ~0x10; } @@ -130,7 +130,7 @@ namespace mame { sbyte2 |= 0x10; } - if (Keyboard.IsPressed(Key.NumPad1)) + if (Keyboard.IsPressed(Corekey.NumPad1)) { sbyte1 &= ~0x10; } @@ -138,7 +138,7 @@ namespace mame { sbyte1 |= 0x10; } - if (Keyboard.IsPressed(Key.NumPad2)) + if (Keyboard.IsPressed(Corekey.NumPad2)) { sbyte1 &= ~0x20; } @@ -146,7 +146,7 @@ namespace mame { sbyte1 |= 0x20; } - if (Keyboard.IsPressed(Key.NumPad3)) + if (Keyboard.IsPressed(Corekey.NumPad3)) { sbyte1 &= ~0x40; } @@ -154,7 +154,7 @@ namespace mame { sbyte1 |= 0x40; } - if (Keyboard.IsPressed(Key.R)) + if (Keyboard.IsPressed(Corekey.R)) { sbyte0 &= ~0x01; } @@ -162,7 +162,7 @@ namespace mame { sbyte0 |= 0x01; } - if (Keyboard.IsPressed(Key.T)) + if (Keyboard.IsPressed(Corekey.T)) { sbyte0 &= ~0x02; } @@ -173,7 +173,7 @@ namespace mame } public static void loop_inputports_taitob_silentd() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { sbyte1 &= ~0x10; } @@ -181,7 +181,7 @@ namespace mame { sbyte1 |= 0x10; } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { sbyte1 &= ~0x20; } @@ -189,7 +189,7 @@ namespace mame { sbyte1 |= 0x20; } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { sbyte1 &= ~0x04; } @@ -197,7 +197,7 @@ namespace mame { sbyte1 |= 0x04; } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { sbyte1 &= ~0x08; } @@ -205,7 +205,7 @@ namespace mame { sbyte1 |= 0x08; } - if (Keyboard.IsPressed(Key.D)) + if (Keyboard.IsPressed(Corekey.D)) { sbyte2 &= ~0x08; } @@ -213,7 +213,7 @@ namespace mame { sbyte2 |= 0x08; } - if (Keyboard.IsPressed(Key.A)) + if (Keyboard.IsPressed(Corekey.A)) { sbyte2 &= ~0x04; } @@ -221,7 +221,7 @@ namespace mame { sbyte2 |= 0x04; } - if (Keyboard.IsPressed(Key.S)) + if (Keyboard.IsPressed(Corekey.S)) { sbyte2 &= ~0x02; } @@ -229,7 +229,7 @@ namespace mame { sbyte2 |= 0x02; } - if (Keyboard.IsPressed(Key.W)) + if (Keyboard.IsPressed(Corekey.W)) { sbyte2 &= ~0x01; } @@ -237,7 +237,7 @@ namespace mame { sbyte2 |= 0x01; } - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { sbyte0 &= ~0x01; } @@ -245,7 +245,7 @@ namespace mame { sbyte0 |= 0x01; } - if (Keyboard.IsPressed(Key.K)) + if (Keyboard.IsPressed(Corekey.K)) { sbyte0 &= ~0x02; } @@ -253,7 +253,7 @@ namespace mame { sbyte0 |= 0x02; } - if (Keyboard.IsPressed(Key.L)) + if (Keyboard.IsPressed(Corekey.L)) { sbyte0 &= ~0x04; } @@ -261,7 +261,7 @@ namespace mame { sbyte0 |= 0x04; } - if (Keyboard.IsPressed(Key.Right)) + if (Keyboard.IsPressed(Corekey.Right)) { sbyte2 &= unchecked((sbyte)~0x80); } @@ -269,7 +269,7 @@ namespace mame { sbyte2 |= unchecked((sbyte)0x80); } - if (Keyboard.IsPressed(Key.Left)) + if (Keyboard.IsPressed(Corekey.Left)) { sbyte2 &= ~0x40; } @@ -277,7 +277,7 @@ namespace mame { sbyte2 |= 0x40; } - if (Keyboard.IsPressed(Key.Down)) + if (Keyboard.IsPressed(Corekey.Down)) { sbyte2 &= ~0x20; } @@ -285,7 +285,7 @@ namespace mame { sbyte2 |= 0x20; } - if (Keyboard.IsPressed(Key.Up)) + if (Keyboard.IsPressed(Corekey.Up)) { sbyte2 &= ~0x10; } @@ -293,7 +293,7 @@ namespace mame { sbyte2 |= 0x10; } - if (Keyboard.IsPressed(Key.NumPad1)) + if (Keyboard.IsPressed(Corekey.NumPad1)) { sbyte0 &= ~0x08; } @@ -301,7 +301,7 @@ namespace mame { sbyte0 |= 0x08; } - if (Keyboard.IsPressed(Key.NumPad2)) + if (Keyboard.IsPressed(Corekey.NumPad2)) { sbyte0 &= ~0x10; } @@ -309,7 +309,7 @@ namespace mame { sbyte0 |= 0x10; } - if (Keyboard.IsPressed(Key.NumPad3)) + if (Keyboard.IsPressed(Corekey.NumPad3)) { sbyte0 &= ~0x20; } @@ -317,7 +317,7 @@ namespace mame { sbyte0 |= 0x20; } - if (Keyboard.IsPressed(Key.R)) + if (Keyboard.IsPressed(Corekey.R)) { sbyte1 &= ~0x01; } @@ -325,7 +325,7 @@ namespace mame { sbyte1 |= 0x01; } - if (Keyboard.IsPressed(Key.T)) + if (Keyboard.IsPressed(Corekey.T)) { sbyte1 &= ~0x02; } diff --git a/MAME.Core/mame/tehkan/Input.cs b/MAME.Core/mame/tehkan/Input.cs index 3c6df13..a71a8b0 100644 --- a/MAME.Core/mame/tehkan/Input.cs +++ b/MAME.Core/mame/tehkan/Input.cs @@ -6,7 +6,7 @@ namespace mame { public static void loop_inputports_tehkan_pbaction() { - if (Keyboard.IsPressed(Key.D5)) + if (Keyboard.IsPressed(Corekey.D5)) { byte2 |= 0x01; } @@ -14,7 +14,7 @@ namespace mame { byte2 &= unchecked((byte)~0x01); } - if (Keyboard.IsPressed(Key.D6)) + if (Keyboard.IsPressed(Corekey.D6)) { byte2 |= 0x02; } @@ -22,7 +22,7 @@ namespace mame { byte2 &= unchecked((byte)~0x02); } - if (Keyboard.IsPressed(Key.D1)) + if (Keyboard.IsPressed(Corekey.D1)) { byte2 |= 0x04; } @@ -30,7 +30,7 @@ namespace mame { byte2 &= unchecked((byte)~0x04); } - if (Keyboard.IsPressed(Key.D2)) + if (Keyboard.IsPressed(Corekey.D2)) { byte2 |= 0x08; } @@ -38,7 +38,7 @@ namespace mame { byte2 &= unchecked((byte)~0x08); } - if (Keyboard.IsPressed(Key.J)) + if (Keyboard.IsPressed(Corekey.J)) { byte0 |= 0x08; } @@ -46,7 +46,7 @@ namespace mame { byte0 &= unchecked((byte)~0x08); } - if (Keyboard.IsPressed(Key.K)) + if (Keyboard.IsPressed(Corekey.K)) { byte0 |= 0x10; } @@ -54,7 +54,7 @@ namespace mame { byte0 &= unchecked((byte)~0x10); } - if (Keyboard.IsPressed(Key.L)) + if (Keyboard.IsPressed(Corekey.L)) { byte0 |= 0x01; } @@ -62,7 +62,7 @@ namespace mame { byte0 &= unchecked((byte)~0x01); } - if (Keyboard.IsPressed(Key.U)) + if (Keyboard.IsPressed(Corekey.U)) { byte0 |= 0x04; } @@ -70,7 +70,7 @@ namespace mame { byte0 &= unchecked((byte)~0x04); } - if (Keyboard.IsPressed(Key.NumPad1)) + if (Keyboard.IsPressed(Corekey.NumPad1)) { byte1 |= 0x08; } @@ -78,7 +78,7 @@ namespace mame { byte1 &= unchecked((byte)~0x08); } - if (Keyboard.IsPressed(Key.NumPad2)) + if (Keyboard.IsPressed(Corekey.NumPad2)) { byte1 |= 0x10; } @@ -86,7 +86,7 @@ namespace mame { byte1 &= unchecked((byte)~0x10); } - if (Keyboard.IsPressed(Key.NumPad3)) + if (Keyboard.IsPressed(Corekey.NumPad3)) { byte1 |= 0x01; } @@ -94,7 +94,7 @@ namespace mame { byte1 &= unchecked((byte)~0x01); } - if (Keyboard.IsPressed(Key.NumPad4)) + if (Keyboard.IsPressed(Corekey.NumPad4)) { byte1 |= 0x04; } diff --git a/MAME.Core/run_interface/key.cs b/MAME.Core/run_interface/Corekey.cs similarity index 99% rename from MAME.Core/run_interface/key.cs rename to MAME.Core/run_interface/Corekey.cs index 9b3a3fa..1c306f8 100644 --- a/MAME.Core/run_interface/key.cs +++ b/MAME.Core/run_interface/Corekey.cs @@ -1,7 +1,7 @@ namespace MAME.Core.run_interface { - public enum Key + public enum Corekey { Next = 209, Right = 205, diff --git a/MAME.Core/run_interface/IKeyboard.cs b/MAME.Core/run_interface/IKeyboard.cs index 391bc71..ff2f4ba 100644 --- a/MAME.Core/run_interface/IKeyboard.cs +++ b/MAME.Core/run_interface/IKeyboard.cs @@ -2,7 +2,7 @@ { public interface IKeyboard { - bool IsPressed(Key key); - bool IsTriggered(Key key); + bool IsPressed(Corekey key); + bool IsTriggered(Corekey key); } } diff --git a/MAME.Core/run_interface/MotionKey.cs b/MAME.Core/run_interface/MotionKey.cs new file mode 100644 index 0000000..c9b142f --- /dev/null +++ b/MAME.Core/run_interface/MotionKey.cs @@ -0,0 +1,32 @@ +namespace MAME.Core.run_interface +{ + public enum MotionKey + { + P1_INSERT_COIN, + P1_GAMESTART, + P1_UP, + P1_DOWN, + P1_LEFT, + P1_RIGHT, + P1_BTN_1, + P1_BTN_2, + P1_BTN_3, + P1_BTN_4, + P1_BTN_5, + P1_BTN_6, + + + P2_INSERT_COIN, + P2_GAMESTART, + P2_UP, + P2_DOWN, + P2_LEFT, + P2_RIGHT, + P2_BTN_1, + P2_BTN_2, + P2_BTN_3, + P2_BTN_4, + P2_BTN_5, + P2_BTN_6, + } +}