抽象Input

This commit is contained in:
sin365 2024-07-29 15:53:22 +08:00
parent 7c6fc880d1
commit 3816e73e5e
24 changed files with 960 additions and 882 deletions

View File

@ -61,7 +61,7 @@ namespace MAME.Core.Common
LoadROMXML(); LoadROMXML();
//TODO Wavebuffer //TODO Wavebuffer
//desc1.BufferBytes = 0x9400; //desc1.BufferBytes = 0x9400;
Keyboard.InitializeInput(this, ikb); Keyboard.InitializeInput(ikb);
Mouse.InitialMouse(this, imou); Mouse.InitialMouse(this, imou);
} }

View File

@ -144,6 +144,7 @@ namespace mame
{ {
try try
{ {
//TODO
//int[] TempData = AxiBitmapEx.CloneIntColorArr(Video.bitmapcolor, Video.fullwidth, Video.fullheight, new Rectangle(offsetx, offsety, width, height)); //int[] TempData = AxiBitmapEx.CloneIntColorArr(Video.bitmapcolor, Video.fullwidth, Video.fullheight, new Rectangle(offsetx, offsety, width, height));
//drawcrosshair(TempData); //drawcrosshair(TempData);
//bbmp[iMode] = drawcrosshair(bitmapGDI.Clone(new Rectangle(offsetx, offsety, width, height))); //bbmp[iMode] = drawcrosshair(bitmapGDI.Clone(new Rectangle(offsetx, offsety, width, height)));

View File

@ -643,13 +643,13 @@ namespace mame
int value2; int value2;
value2 = apply_analog_min_max(analog, analog.accum); value2 = apply_analog_min_max(analog, analog.accum);
analog.previous = analog.accum = value2; analog.previous = analog.accum = value2;
if (Keyboard.IsPressed(Corekey.K)) if (Keyboard.IsPressed(MotionKey.P1_BTN_2))//if (Keyboard.IsPressed(Corekey.K))
{ {
keypressed = true; keypressed = true;
delta -= analog.delta * 0x200; delta -= analog.delta * 0x200;
analog.lastdigital = 1; analog.lastdigital = 1;
} }
if (Keyboard.IsPressed(Corekey.L)) if (Keyboard.IsPressed(MotionKey.P1_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.L))
{ {
keypressed = true; keypressed = true;
delta += analog.delta * 0x200; delta += analog.delta * 0x200;
@ -678,13 +678,13 @@ namespace mame
int value2; int value2;
value2 = apply_analog_min_max(analog, analog.accum); value2 = apply_analog_min_max(analog, analog.accum);
analog.previous = analog.accum = value2; analog.previous = analog.accum = value2;
if (Keyboard.IsPressed(Corekey.NumPad2)) if (Keyboard.IsPressed(MotionKey.P2_BTN_2))//if (Keyboard.IsPressed(Corekey.NumPad2))
{ {
keypressed = true; keypressed = true;
delta -= analog.delta * 0x200; delta -= analog.delta * 0x200;
analog.lastdigital = 1; analog.lastdigital = 1;
} }
if (Keyboard.IsPressed(Corekey.NumPad3)) if (Keyboard.IsPressed(MotionKey.P2_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.NumPad3))
{ {
keypressed = true; keypressed = true;
delta += analog.delta * 0x200; delta += analog.delta * 0x200;
@ -701,13 +701,13 @@ namespace mame
int value2; int value2;
value2 = apply_analog_min_max(analog, analog.accum); value2 = apply_analog_min_max(analog, analog.accum);
analog.previous = analog.accum = value2; analog.previous = analog.accum = value2;
if (Keyboard.IsPressed(Corekey.U)) if (Keyboard.IsPressed(MotionKey.P1_BTN_3))//if (Keyboard.IsPressed(MotionKey.P1_BTN_3))//if (Keyboard.IsPressed(Corekey.U))
{ {
keypressed = true; keypressed = true;
delta -= analog_p0.delta * 0x200; delta -= analog_p0.delta * 0x200;
analog.lastdigital = 1; analog.lastdigital = 1;
} }
if (Keyboard.IsPressed(Corekey.I)) if (Keyboard.IsPressed(MotionKey.P1_BTN_4))//if (Keyboard.IsPressed(Corekey.I))
{ {
keypressed = true; keypressed = true;
delta += analog_p0.delta * 0x200; delta += analog_p0.delta * 0x200;
@ -724,13 +724,13 @@ namespace mame
int value2; int value2;
value2 = apply_analog_min_max(analog, analog.accum); value2 = apply_analog_min_max(analog, analog.accum);
analog.previous = analog.accum = value2; analog.previous = analog.accum = value2;
if (Keyboard.IsPressed(Corekey.NumPad4)) if (Keyboard.IsPressed(MotionKey.P2_BTN_3))//if (Keyboard.IsPressed(Corekey.NumPad4))
{ {
keypressed = true; keypressed = true;
delta -= analog.delta * 0x200; delta -= analog.delta * 0x200;
analog.lastdigital = 1; analog.lastdigital = 1;
} }
if (Keyboard.IsPressed(Corekey.NumPad5)) if (Keyboard.IsPressed(MotionKey.P2_BTN_4))//if (Keyboard.IsPressed(MotionKey.P2_BTN_4))//if (Keyboard.IsPressed(Corekey.NumPad5))
{ {
keypressed = true; keypressed = true;
delta += analog.delta * 0x200; delta += analog.delta * 0x200;
@ -747,13 +747,13 @@ namespace mame
int value2; int value2;
value2 = apply_analog_min_max(analog, analog.accum); value2 = apply_analog_min_max(analog, analog.accum);
analog.previous = analog.accum = value2; analog.previous = analog.accum = value2;
if (Keyboard.IsPressed(Corekey.A)) if (Keyboard.IsPressed(MotionKey.P1_LEFT))//if (Keyboard.IsPressed(Corekey.A))
{ {
keypressed = true; keypressed = true;
delta -= analog.delta * 0x200; delta -= analog.delta * 0x200;
analog.lastdigital = 1; analog.lastdigital = 1;
} }
if (Keyboard.IsPressed(Corekey.D)) if (Keyboard.IsPressed(MotionKey.P1_RIGHT))//if (Keyboard.IsPressed(Corekey.D))
{ {
keypressed = true; keypressed = true;
delta += analog.delta * 0x200; delta += analog.delta * 0x200;
@ -770,13 +770,13 @@ namespace mame
int value2; int value2;
value2 = apply_analog_min_max(analog, analog.accum); value2 = apply_analog_min_max(analog, analog.accum);
analog.previous = analog.accum = value2; analog.previous = analog.accum = value2;
if (Keyboard.IsPressed(Corekey.S)) if (Keyboard.IsPressed(MotionKey.P1_DOWN))//if (Keyboard.IsPressed(Corekey.S))
{ {
keypressed = true; keypressed = true;
delta -= analog.delta * 0x200; delta -= analog.delta * 0x200;
analog.lastdigital = 1; analog.lastdigital = 1;
} }
if (Keyboard.IsPressed(Corekey.W)) if (Keyboard.IsPressed(MotionKey.P1_UP))//if (Keyboard.IsPressed(Corekey.W))
{ {
keypressed = true; keypressed = true;
delta += analog.delta * 0x200; delta += analog.delta * 0x200;
@ -793,13 +793,13 @@ namespace mame
int value2; int value2;
value2 = apply_analog_min_max(analog, analog.accum); value2 = apply_analog_min_max(analog, analog.accum);
analog.previous = analog.accum = value2; analog.previous = analog.accum = value2;
if (Keyboard.IsPressed(Corekey.A)) if (Keyboard.IsPressed(MotionKey.P1_LEFT))//if (Keyboard.IsPressed(Corekey.A))
{ {
keypressed = true; keypressed = true;
delta -= analog.delta * 0x200; delta -= analog.delta * 0x200;
analog.lastdigital = 1; analog.lastdigital = 1;
} }
if (Keyboard.IsPressed(Corekey.D)) if (Keyboard.IsPressed(MotionKey.P1_RIGHT))//if (Keyboard.IsPressed(Corekey.D))
{ {
keypressed = true; keypressed = true;
delta += analog.delta * 0x200; delta += analog.delta * 0x200;
@ -816,13 +816,13 @@ namespace mame
int value2; int value2;
value2 = apply_analog_min_max(analog, analog.accum); value2 = apply_analog_min_max(analog, analog.accum);
analog.previous = analog.accum = value2; analog.previous = analog.accum = value2;
if (Keyboard.IsPressed(Corekey.Left)) if (Keyboard.IsPressed(MotionKey.P2_LEFT))//if (Keyboard.IsPressed(Corekey.Left))
{ {
keypressed = true; keypressed = true;
delta -= analog.delta * 0x200; delta -= analog.delta * 0x200;
analog.lastdigital = 1; analog.lastdigital = 1;
} }
if (Keyboard.IsPressed(Corekey.Right)) if (Keyboard.IsPressed(MotionKey.P2_RIGHT))//if (Keyboard.IsPressed(Corekey.Right))
{ {
keypressed = true; keypressed = true;
delta += analog.delta * 0x200; delta += analog.delta * 0x200;
@ -847,13 +847,13 @@ namespace mame
delta = rawvalue; delta = rawvalue;
analog.lastdigital = 0; analog.lastdigital = 0;
} }
if (Keyboard.IsPressed(Corekey.A)) if (Keyboard.IsPressed(MotionKey.P1_LEFT))//if (Keyboard.IsPressed(Corekey.A))
{ {
keypressed = true; keypressed = true;
delta -= analog.delta * 0x200; delta -= analog.delta * 0x200;
analog.lastdigital = 1; analog.lastdigital = 1;
} }
if (Keyboard.IsPressed(Corekey.D)) if (Keyboard.IsPressed(MotionKey.P1_RIGHT))//if (Keyboard.IsPressed(Corekey.D))
{ {
keypressed = true; keypressed = true;
delta += analog.delta * 0x200; delta += analog.delta * 0x200;
@ -892,13 +892,13 @@ namespace mame
delta = rawvalue; delta = rawvalue;
analog.lastdigital = 0; analog.lastdigital = 0;
} }
if (Keyboard.IsPressed(Corekey.W)) if (Keyboard.IsPressed(MotionKey.P1_UP))//if (Keyboard.IsPressed(Corekey.W))
{ {
keypressed = true; keypressed = true;
delta -= analog.delta * 0x200; delta -= analog.delta * 0x200;
analog.lastdigital = 1; analog.lastdigital = 1;
} }
if (Keyboard.IsPressed(Corekey.S)) if (Keyboard.IsPressed(MotionKey.P1_DOWN))//if (Keyboard.IsPressed(Corekey.S))
{ {
keypressed = true; keypressed = true;
delta += analog.delta * 0x200; delta += analog.delta * 0x200;

View File

@ -1,5 +1,4 @@
using MAME.Core.Common; using MAME.Core.run_interface;
using MAME.Core.run_interface;
namespace mame namespace mame
{ {
@ -9,28 +8,37 @@ namespace mame
static IKeyboard mKeyboard; static IKeyboard mKeyboard;
public static void InitializeInput(mainMotion form1, IKeyboard ikb) struct KeyState
{
public bool IsPressed;
public bool IsTriggered;
public bool WasPressed;
};
private static KeyState[] m_KeyStates = new KeyState[(byte)MotionKey.FinalKey];
MotionKey[] mKeyName;
public static void InitializeInput(IKeyboard ikb)
{ {
mKeyboard = ikb; mKeyboard = ikb;
} }
public static bool IsPressed(Corekey key) public static bool IsPressed(MotionKey key)
{ {
return mKeyboard.IsPressed(key); return m_KeyStates[(int)key].IsPressed;
} }
public static bool IsTriggered(Corekey key) public static bool IsTriggered(MotionKey key)
{ {
return mKeyboard.IsTriggered(key); return m_KeyStates[(int)key].IsTriggered;
} }
public static void Update() public static void Update()
{ {
//TODO byte finalIndex = (byte)MotionKey.FinalKey;
/*for (int i = 0; i < 256; i++) for (byte i = 0; i < finalIndex; i++)
{ {
m_KeyStates[i].IsPressed = false; m_KeyStates[i].IsPressed = false;
} }
foreach (Key key in dIDevice.GetPressedKeys()) foreach (MotionKey key in mKeyboard.GetPressedKeys())
{ {
m_KeyStates[(int)key].IsPressed = true; m_KeyStates[(int)key].IsPressed = true;
} }
@ -54,7 +62,7 @@ namespace mame
m_KeyStates[i].IsTriggered = false; m_KeyStates[i].IsTriggered = false;
} }
} }
*/
} }
} }
} }

View File

@ -180,7 +180,7 @@ namespace mame
{ {
Video.sDrawText = "Select position to save to"; Video.sDrawText = "Select position to save to";
Video.popup_text_end = Wintime.osd_ticks() + Wintime.ticks_per_second * 1000; Video.popup_text_end = Wintime.osd_ticks() + Wintime.ticks_per_second * 1000;
if (Keyboard.IsTriggered(Corekey.Escape)) if (Keyboard.IsTriggered(MotionKey.Escape))
{ {
Video.sDrawText = "Save cancelled"; Video.sDrawText = "Save cancelled";
Video.popup_text_end = Wintime.osd_ticks() + Wintime.ticks_per_second * 2; Video.popup_text_end = Wintime.osd_ticks() + Wintime.ticks_per_second * 2;
@ -199,7 +199,7 @@ namespace mame
{ {
Video.sDrawText = "Select position to load from"; Video.sDrawText = "Select position to load from";
Video.popup_text_end = Wintime.osd_ticks() + Wintime.ticks_per_second * 1000; Video.popup_text_end = Wintime.osd_ticks() + Wintime.ticks_per_second * 1000;
if (Keyboard.IsTriggered(Corekey.Escape)) if (Keyboard.IsTriggered(MotionKey.Escape))
{ {
Video.sDrawText = "Load cancelled"; Video.sDrawText = "Load cancelled";
Video.popup_text_end = Wintime.osd_ticks() + Wintime.ticks_per_second * 2; Video.popup_text_end = Wintime.osd_ticks() + Wintime.ticks_per_second * 2;
@ -220,7 +220,7 @@ namespace mame
{ {
Video.sDrawText = "Select position to record to"; Video.sDrawText = "Select position to record to";
Video.popup_text_end = Wintime.osd_ticks() + Wintime.ticks_per_second * 1000; Video.popup_text_end = Wintime.osd_ticks() + Wintime.ticks_per_second * 1000;
if (Keyboard.IsTriggered(Corekey.Escape)) if (Keyboard.IsTriggered(MotionKey.Escape))
{ {
Video.sDrawText = "Record cancelled"; Video.sDrawText = "Record cancelled";
Video.popup_text_end = Wintime.osd_ticks() + Wintime.ticks_per_second * 2; Video.popup_text_end = Wintime.osd_ticks() + Wintime.ticks_per_second * 2;
@ -250,7 +250,7 @@ namespace mame
{ {
Video.sDrawText = "Select position to replay from"; Video.sDrawText = "Select position to replay from";
Video.popup_text_end = Wintime.osd_ticks() + Wintime.ticks_per_second * 1000; Video.popup_text_end = Wintime.osd_ticks() + Wintime.ticks_per_second * 1000;
if (Keyboard.IsTriggered(Corekey.Escape)) if (Keyboard.IsTriggered(MotionKey.Escape))
{ {
Video.sDrawText = "Replay cancelled"; Video.sDrawText = "Replay cancelled";
Video.popup_text_end = Wintime.osd_ticks() + Wintime.ticks_per_second * 2; Video.popup_text_end = Wintime.osd_ticks() + Wintime.ticks_per_second * 2;

View File

@ -176,15 +176,6 @@ namespace mame
} }
public static void handler_ingame() public static void handler_ingame()
{ {
//Mame.handle2 = GetForegroundWindow();
//if (Mame.handle1 == Mame.handle2)
//{
// Mame.is_foreground = true;
//}
//else
//{
// Mame.is_foreground = false;
//}
Mame.is_foreground = true; Mame.is_foreground = true;
bool is_paused = Mame.mame_is_paused(); bool is_paused = Mame.mame_is_paused();
if (single_step) if (single_step)
@ -194,15 +185,15 @@ namespace mame
} }
if (Mame.is_foreground) if (Mame.is_foreground)
{ {
if (Keyboard.IsPressed(Corekey.F3)) if (Keyboard.IsPressed(MotionKey.F3))
{ {
cpurun(); cpurun();
Mame.playState = Mame.PlayState.PLAY_RESET; Mame.playState = Mame.PlayState.PLAY_RESET;
} }
if (Keyboard.IsTriggered(Corekey.F7)) if (Keyboard.IsTriggered(MotionKey.F7))
{ {
cpurun(); cpurun();
if (Keyboard.IsPressed(Corekey.LeftShift) || Keyboard.IsPressed(Corekey.RightShift)) if (Keyboard.IsPressed(MotionKey.LeftShift) || Keyboard.IsPressed(MotionKey.RightShift))
{ {
Mame.playState = Mame.PlayState.PLAY_SAVE; Mame.playState = Mame.PlayState.PLAY_SAVE;
} }
@ -212,10 +203,10 @@ namespace mame
} }
return; return;
} }
if (Keyboard.IsTriggered(Corekey.F8)) if (Keyboard.IsTriggered(MotionKey.F8))
{ {
cpurun(); cpurun();
if (Keyboard.IsPressed(Corekey.LeftShift) || Keyboard.IsPressed(Corekey.RightShift)) if (Keyboard.IsPressed(MotionKey.LeftShift) || Keyboard.IsPressed(MotionKey.RightShift))
{ {
if (Mame.playState == Mame.PlayState.PLAY_RECORDRUNNING) if (Mame.playState == Mame.PlayState.PLAY_RECORDRUNNING)
{ {
@ -232,9 +223,9 @@ namespace mame
} }
return; return;
} }
if (Keyboard.IsTriggered(Corekey.P)) if (Keyboard.IsTriggered(MotionKey.EMU_PAUSED))
{ {
if (is_paused && (Keyboard.IsPressed(Corekey.LeftShift) || Keyboard.IsPressed(Corekey.RightShift))) if (is_paused && (Keyboard.IsPressed(MotionKey.LeftShift) || Keyboard.IsPressed(MotionKey.RightShift)))
{ {
single_step = true; single_step = true;
Mame.mame_pause(false); Mame.mame_pause(false);
@ -244,7 +235,7 @@ namespace mame
Mame.mame_pause(!Mame.mame_is_paused()); Mame.mame_pause(!Mame.mame_is_paused());
} }
} }
if (Keyboard.IsTriggered(Corekey.F10)) if (Keyboard.IsTriggered(MotionKey.F10))
{ {
Keyboard.bF10 = true; Keyboard.bF10 = true;
bool b1 = Video.global_throttle; bool b1 = Video.global_throttle;

View File

@ -6,7 +6,7 @@ namespace mame
{ {
public static void loop_inputports_gng() public static void loop_inputports_gng()
{ {
if (Keyboard.IsPressed(Corekey.D5)) if (Keyboard.IsPressed(MotionKey.P1_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D5))
{ {
bytes &= unchecked((byte)~0x40); bytes &= unchecked((byte)~0x40);
} }
@ -14,7 +14,7 @@ namespace mame
{ {
bytes |= 0x40; bytes |= 0x40;
} }
if (Keyboard.IsPressed(Corekey.D6)) if (Keyboard.IsPressed(MotionKey.P2_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D6))
{ {
bytes &= unchecked((byte)~0x80); bytes &= unchecked((byte)~0x80);
} }
@ -22,7 +22,7 @@ namespace mame
{ {
bytes |= 0x80; bytes |= 0x80;
} }
if (Keyboard.IsPressed(Corekey.D1)) if (Keyboard.IsPressed(MotionKey.P1_GAMESTART))//if (Keyboard.IsPressed(Corekey.D1))
{ {
bytes &= unchecked((byte)~0x01); bytes &= unchecked((byte)~0x01);
} }
@ -30,7 +30,7 @@ namespace mame
{ {
bytes |= 0x01; bytes |= 0x01;
} }
if (Keyboard.IsPressed(Corekey.D2)) if (Keyboard.IsPressed(MotionKey.P2_GAMESTART))//if (Keyboard.IsPressed(Corekey.D2))
{ {
bytes &= unchecked((byte)~0x02); bytes &= unchecked((byte)~0x02);
} }
@ -38,7 +38,7 @@ namespace mame
{ {
bytes |= 0x02; bytes |= 0x02;
} }
if (Keyboard.IsPressed(Corekey.D)) if (Keyboard.IsPressed(MotionKey.P1_RIGHT))//if (Keyboard.IsPressed(Corekey.D))
{ {
byte1 &= unchecked((byte)~0x01); byte1 &= unchecked((byte)~0x01);
} }
@ -46,7 +46,7 @@ namespace mame
{ {
byte1 |= 0x01; byte1 |= 0x01;
} }
if (Keyboard.IsPressed(Corekey.A)) if (Keyboard.IsPressed(MotionKey.P1_LEFT))//if (Keyboard.IsPressed(Corekey.A))
{ {
byte1 &= unchecked((byte)~0x02); byte1 &= unchecked((byte)~0x02);
} }
@ -54,7 +54,7 @@ namespace mame
{ {
byte1 |= 0x02; byte1 |= 0x02;
} }
if (Keyboard.IsPressed(Corekey.S)) if (Keyboard.IsPressed(MotionKey.P1_DOWN))//if (Keyboard.IsPressed(Corekey.S))
{ {
byte1 &= unchecked((byte)~0x04); byte1 &= unchecked((byte)~0x04);
} }
@ -62,7 +62,7 @@ namespace mame
{ {
byte1 |= 0x04; byte1 |= 0x04;
} }
if (Keyboard.IsPressed(Corekey.W)) if (Keyboard.IsPressed(MotionKey.P1_UP))//if (Keyboard.IsPressed(Corekey.W))
{ {
byte1 &= unchecked((byte)~0x08); byte1 &= unchecked((byte)~0x08);
} }
@ -70,7 +70,7 @@ namespace mame
{ {
byte1 |= 0x08; byte1 |= 0x08;
} }
if (Keyboard.IsPressed(Corekey.J)) if (Keyboard.IsPressed(MotionKey.P1_BTN_1))//if (Keyboard.IsPressed(Corekey.J))
{ {
byte1 &= unchecked((byte)~0x10); byte1 &= unchecked((byte)~0x10);
} }
@ -78,7 +78,7 @@ namespace mame
{ {
byte1 |= 0x10; byte1 |= 0x10;
} }
if (Keyboard.IsPressed(Corekey.K)) if (Keyboard.IsPressed(MotionKey.P1_BTN_2))//if (Keyboard.IsPressed(Corekey.K))
{ {
byte1 &= unchecked((byte)~0x20); byte1 &= unchecked((byte)~0x20);
} }
@ -86,7 +86,7 @@ namespace mame
{ {
byte1 |= 0x20; byte1 |= 0x20;
} }
if (Keyboard.IsPressed(Corekey.Right)) if (Keyboard.IsPressed(MotionKey.P2_RIGHT))//if (Keyboard.IsPressed(Corekey.Right))
{ {
byte2 &= unchecked((byte)~0x01); byte2 &= unchecked((byte)~0x01);
} }
@ -94,7 +94,7 @@ namespace mame
{ {
byte2 |= 0x01; byte2 |= 0x01;
} }
if (Keyboard.IsPressed(Corekey.Left)) if (Keyboard.IsPressed(MotionKey.P2_LEFT))//if (Keyboard.IsPressed(Corekey.Left))
{ {
byte2 &= unchecked((byte)~0x02); byte2 &= unchecked((byte)~0x02);
} }
@ -102,7 +102,7 @@ namespace mame
{ {
byte2 |= 0x02; byte2 |= 0x02;
} }
if (Keyboard.IsPressed(Corekey.Down)) if (Keyboard.IsPressed(MotionKey.P2_DOWN)) //if (Keyboard.IsPressed(Corekey.Down))
{ {
byte2 &= unchecked((byte)~0x04); byte2 &= unchecked((byte)~0x04);
} }
@ -110,7 +110,7 @@ namespace mame
{ {
byte2 |= 0x04; byte2 |= 0x04;
} }
if (Keyboard.IsPressed(Corekey.Up)) if (Keyboard.IsPressed(MotionKey.P2_UP))//if (Keyboard.IsPressed(Corekey.Up))
{ {
byte2 &= unchecked((byte)~0x08); byte2 &= unchecked((byte)~0x08);
} }
@ -118,7 +118,7 @@ namespace mame
{ {
byte2 |= 0x08; byte2 |= 0x08;
} }
if (Keyboard.IsPressed(Corekey.NumPad1)) if (Keyboard.IsPressed(MotionKey.P2_BTN_1))//if (Keyboard.IsPressed(Corekey.NumPad1))
{ {
byte2 &= unchecked((byte)~0x10); byte2 &= unchecked((byte)~0x10);
} }
@ -126,7 +126,7 @@ namespace mame
{ {
byte2 |= 0x10; byte2 |= 0x10;
} }
if (Keyboard.IsPressed(Corekey.NumPad2)) if (Keyboard.IsPressed(MotionKey.P2_BTN_2))//if (Keyboard.IsPressed(Corekey.NumPad2))
{ {
byte2 &= unchecked((byte)~0x20); byte2 &= unchecked((byte)~0x20);
} }
@ -134,7 +134,7 @@ namespace mame
{ {
byte2 |= 0x20; byte2 |= 0x20;
} }
if (Keyboard.IsPressed(Corekey.R)) if (Keyboard.IsPressed(MotionKey.UNKNOW_R)) //if (Keyboard.IsPressed(Corekey.R))
{ {
bytes &= unchecked((byte)~0x20); bytes &= unchecked((byte)~0x20);
} }
@ -145,7 +145,7 @@ namespace mame
} }
public static void loop_inputports_diamond() public static void loop_inputports_diamond()
{ {
if (Keyboard.IsPressed(Corekey.D5)) if (Keyboard.IsPressed(MotionKey.P1_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D5))
{ {
bytes &= unchecked((byte)~0x40); bytes &= unchecked((byte)~0x40);
} }
@ -153,7 +153,7 @@ namespace mame
{ {
bytes |= 0x40; bytes |= 0x40;
} }
if (Keyboard.IsPressed(Corekey.D6)) if (Keyboard.IsPressed(MotionKey.P2_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D6))
{ {
bytes &= unchecked((byte)~0x80); bytes &= unchecked((byte)~0x80);
} }
@ -161,7 +161,7 @@ namespace mame
{ {
bytes |= 0x80; bytes |= 0x80;
} }
if (Keyboard.IsPressed(Corekey.D1)) if (Keyboard.IsPressed(MotionKey.P1_GAMESTART))//if (Keyboard.IsPressed(Corekey.D1))
{ {
bytes &= unchecked((byte)~0x01); bytes &= unchecked((byte)~0x01);
} }
@ -169,7 +169,7 @@ namespace mame
{ {
bytes |= 0x01; bytes |= 0x01;
} }
if (Keyboard.IsPressed(Corekey.D2)) if (Keyboard.IsPressed(MotionKey.P2_GAMESTART))//if (Keyboard.IsPressed(Corekey.D2))
{ {
bytes &= unchecked((byte)~0x02); bytes &= unchecked((byte)~0x02);
} }
@ -177,7 +177,7 @@ namespace mame
{ {
bytes |= 0x02; bytes |= 0x02;
} }
if (Keyboard.IsPressed(Corekey.D)) if (Keyboard.IsPressed(MotionKey.P1_RIGHT))//if (Keyboard.IsPressed(Corekey.D))
{ {
byte1 &= unchecked((byte)~0x01); byte1 &= unchecked((byte)~0x01);
} }
@ -185,7 +185,7 @@ namespace mame
{ {
byte1 |= 0x01; byte1 |= 0x01;
} }
if (Keyboard.IsPressed(Corekey.A)) if (Keyboard.IsPressed(MotionKey.P1_LEFT))//if (Keyboard.IsPressed(Corekey.A))
{ {
byte1 &= unchecked((byte)~0x02); byte1 &= unchecked((byte)~0x02);
} }
@ -193,7 +193,7 @@ namespace mame
{ {
byte1 |= 0x02; byte1 |= 0x02;
} }
if (Keyboard.IsPressed(Corekey.S)) if (Keyboard.IsPressed(MotionKey.P1_DOWN))//if (Keyboard.IsPressed(Corekey.S))
{ {
byte1 &= unchecked((byte)~0x04); byte1 &= unchecked((byte)~0x04);
} }
@ -201,7 +201,7 @@ namespace mame
{ {
byte1 |= 0x04; byte1 |= 0x04;
} }
if (Keyboard.IsPressed(Corekey.W)) if (Keyboard.IsPressed(MotionKey.P1_UP))//if (Keyboard.IsPressed(Corekey.W))
{ {
byte1 &= unchecked((byte)~0x08); byte1 &= unchecked((byte)~0x08);
} }
@ -209,7 +209,7 @@ namespace mame
{ {
byte1 |= 0x08; byte1 |= 0x08;
} }
if (Keyboard.IsPressed(Corekey.J)) if (Keyboard.IsPressed(MotionKey.P1_BTN_1))//if (Keyboard.IsPressed(Corekey.J))
{ {
byte1 &= unchecked((byte)~0x10); byte1 &= unchecked((byte)~0x10);
} }
@ -220,7 +220,7 @@ namespace mame
} }
public static void loop_inputports_sfus() public static void loop_inputports_sfus()
{ {
if (Keyboard.IsPressed(Corekey.D5)) if (Keyboard.IsPressed(MotionKey.P1_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D5))
{ {
short0 &= ~0x0001; short0 &= ~0x0001;
} }
@ -228,7 +228,7 @@ namespace mame
{ {
short0 |= 0x0001; short0 |= 0x0001;
} }
if (Keyboard.IsPressed(Corekey.D6)) if (Keyboard.IsPressed(MotionKey.P2_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D6))
{ {
short0 &= ~0x0002; short0 &= ~0x0002;
} }
@ -236,7 +236,7 @@ namespace mame
{ {
short0 |= 0x0002; short0 |= 0x0002;
} }
if (Keyboard.IsPressed(Corekey.D1)) if (Keyboard.IsPressed(MotionKey.P1_GAMESTART))//if (Keyboard.IsPressed(Corekey.D1))
{ {
shorts &= ~0x0001; shorts &= ~0x0001;
} }
@ -244,7 +244,7 @@ namespace mame
{ {
shorts |= 0x0001; shorts |= 0x0001;
} }
if (Keyboard.IsPressed(Corekey.D2)) if (Keyboard.IsPressed(MotionKey.P2_GAMESTART))//if (Keyboard.IsPressed(Corekey.D2))
{ {
shorts &= ~0x0002; shorts &= ~0x0002;
} }
@ -252,7 +252,7 @@ namespace mame
{ {
shorts |= 0x0002; shorts |= 0x0002;
} }
if (Keyboard.IsPressed(Corekey.D)) if (Keyboard.IsPressed(MotionKey.P1_RIGHT))//if (Keyboard.IsPressed(Corekey.D))
{ {
short1 &= ~0x0001; short1 &= ~0x0001;
} }
@ -260,7 +260,7 @@ namespace mame
{ {
short1 |= 0x0001; short1 |= 0x0001;
} }
if (Keyboard.IsPressed(Corekey.A)) if (Keyboard.IsPressed(MotionKey.P1_LEFT))//if (Keyboard.IsPressed(Corekey.A))
{ {
short1 &= ~0x0002; short1 &= ~0x0002;
} }
@ -268,7 +268,7 @@ namespace mame
{ {
short1 |= 0x0002; short1 |= 0x0002;
} }
if (Keyboard.IsPressed(Corekey.S)) if (Keyboard.IsPressed(MotionKey.P1_DOWN))//if (Keyboard.IsPressed(Corekey.S))
{ {
short1 &= ~0x0004; short1 &= ~0x0004;
} }
@ -276,7 +276,7 @@ namespace mame
{ {
short1 |= 0x0004; short1 |= 0x0004;
} }
if (Keyboard.IsPressed(Corekey.W)) if (Keyboard.IsPressed(MotionKey.P1_UP))//if (Keyboard.IsPressed(Corekey.W))
{ {
short1 &= ~0x0008; short1 &= ~0x0008;
} }
@ -284,7 +284,7 @@ namespace mame
{ {
short1 |= 0x0008; short1 |= 0x0008;
} }
if (Keyboard.IsPressed(Corekey.J)) if (Keyboard.IsPressed(MotionKey.P1_BTN_1))//if (Keyboard.IsPressed(Corekey.J))
{ {
short1 &= ~0x0010; short1 &= ~0x0010;
} }
@ -292,7 +292,7 @@ namespace mame
{ {
short1 |= 0x0010; short1 |= 0x0010;
} }
if (Keyboard.IsPressed(Corekey.K)) if (Keyboard.IsPressed(MotionKey.P1_BTN_2))//if (Keyboard.IsPressed(Corekey.K))
{ {
short1 &= ~0x0020; short1 &= ~0x0020;
} }
@ -300,7 +300,7 @@ namespace mame
{ {
short1 |= 0x0020; short1 |= 0x0020;
} }
if (Keyboard.IsPressed(Corekey.L)) if (Keyboard.IsPressed(MotionKey.P1_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.L))
{ {
short0 &= ~0x0200; short0 &= ~0x0200;
} }
@ -308,7 +308,7 @@ namespace mame
{ {
short0 |= 0x0200; short0 |= 0x0200;
} }
if (Keyboard.IsPressed(Corekey.U)) if (Keyboard.IsPressed(MotionKey.P1_BTN_3))//if (Keyboard.IsPressed(Corekey.U))
{ {
short1 &= ~0x0040; short1 &= ~0x0040;
} }
@ -316,7 +316,7 @@ namespace mame
{ {
short1 |= 0x0040; short1 |= 0x0040;
} }
if (Keyboard.IsPressed(Corekey.I)) if (Keyboard.IsPressed(MotionKey.P1_BTN_4))//if (Keyboard.IsPressed(Corekey.I))
{ {
short1 &= ~0x0080; short1 &= ~0x0080;
} }
@ -324,7 +324,7 @@ namespace mame
{ {
short1 |= 0x0080; short1 |= 0x0080;
} }
if (Keyboard.IsPressed(Corekey.O)) if (Keyboard.IsPressed(MotionKey.P1_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.O))
{ {
short0 &= ~0x0004; short0 &= ~0x0004;
} }
@ -332,7 +332,7 @@ namespace mame
{ {
short0 |= 0x0004; short0 |= 0x0004;
} }
if (Keyboard.IsPressed(Corekey.Right)) if (Keyboard.IsPressed(MotionKey.P2_RIGHT))//if (Keyboard.IsPressed(Corekey.Right))
{ {
short1 &= ~0x0100; short1 &= ~0x0100;
} }
@ -340,7 +340,7 @@ namespace mame
{ {
short1 |= 0x0100; short1 |= 0x0100;
} }
if (Keyboard.IsPressed(Corekey.Left)) if (Keyboard.IsPressed(MotionKey.P2_LEFT))//if (Keyboard.IsPressed(Corekey.Left))
{ {
short1 &= ~0x0200; short1 &= ~0x0200;
} }
@ -348,7 +348,7 @@ namespace mame
{ {
short1 |= 0x0200; short1 |= 0x0200;
} }
if (Keyboard.IsPressed(Corekey.Down)) if (Keyboard.IsPressed(MotionKey.P2_DOWN)) //if (Keyboard.IsPressed(Corekey.Down))
{ {
short1 &= ~0x0400; short1 &= ~0x0400;
} }
@ -356,7 +356,7 @@ namespace mame
{ {
short1 |= 0x0400; short1 |= 0x0400;
} }
if (Keyboard.IsPressed(Corekey.Up)) if (Keyboard.IsPressed(MotionKey.P2_UP))//if (Keyboard.IsPressed(Corekey.Up))
{ {
short1 &= ~0x0800; short1 &= ~0x0800;
} }
@ -364,7 +364,7 @@ namespace mame
{ {
short1 |= 0x0800; short1 |= 0x0800;
} }
if (Keyboard.IsPressed(Corekey.NumPad1)) if (Keyboard.IsPressed(MotionKey.P2_BTN_1))//if (Keyboard.IsPressed(Corekey.NumPad1))
{ {
short1 &= ~0x1000; short1 &= ~0x1000;
} }
@ -372,7 +372,7 @@ namespace mame
{ {
short1 |= 0x1000; short1 |= 0x1000;
} }
if (Keyboard.IsPressed(Corekey.NumPad2)) if (Keyboard.IsPressed(MotionKey.P2_BTN_2))//if (Keyboard.IsPressed(Corekey.NumPad2))
{ {
short1 &= ~0x2000; short1 &= ~0x2000;
} }
@ -380,7 +380,7 @@ namespace mame
{ {
short1 |= 0x2000; short1 |= 0x2000;
} }
if (Keyboard.IsPressed(Corekey.NumPad3)) if (Keyboard.IsPressed(MotionKey.P2_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.NumPad3))
{ {
short0 &= ~0x0400; short0 &= ~0x0400;
} }
@ -388,7 +388,7 @@ namespace mame
{ {
short0 |= 0x0400; short0 |= 0x0400;
} }
if (Keyboard.IsPressed(Corekey.NumPad4)) if (Keyboard.IsPressed(MotionKey.P2_BTN_3))//if (Keyboard.IsPressed(Corekey.NumPad4))
{ {
short1 &= ~0x4000; short1 &= ~0x4000;
} }
@ -396,7 +396,7 @@ namespace mame
{ {
short1 |= 0x4000; short1 |= 0x4000;
} }
if (Keyboard.IsPressed(Corekey.NumPad5)) if (Keyboard.IsPressed(MotionKey.P2_BTN_4))//if (Keyboard.IsPressed(Corekey.NumPad5))
{ {
short1 &= unchecked((short)~0x8000); short1 &= unchecked((short)~0x8000);
} }
@ -404,7 +404,7 @@ namespace mame
{ {
short1 |= unchecked((short)0x8000); short1 |= unchecked((short)0x8000);
} }
if (Keyboard.IsPressed(Corekey.NumPad6)) if (Keyboard.IsPressed(MotionKey.P2_UNKNOW_F))//if (Keyboard.IsPressed(Corekey.NumPad6))
{ {
short0 &= ~0x0100; short0 &= ~0x0100;
} }
@ -412,7 +412,7 @@ namespace mame
{ {
short0 |= 0x0100; short0 |= 0x0100;
} }
if (Keyboard.IsPressed(Corekey.R)) if (Keyboard.IsPressed(MotionKey.UNKNOW_R)) //if (Keyboard.IsPressed(Corekey.R))
{ {
shorts &= ~0x0004; shorts &= ~0x0004;
} }
@ -420,7 +420,7 @@ namespace mame
{ {
shorts |= 0x0004; shorts |= 0x0004;
} }
if (Keyboard.IsPressed(Corekey.T)) if (Keyboard.IsPressed(MotionKey.UNKNOW_T)) //if (Keyboard.IsPressed(Corekey.T))
{ {
//sbyte0 &= ~0x40; //sbyte0 &= ~0x40;
} }
@ -431,7 +431,7 @@ namespace mame
} }
public static void loop_inputports_sfjp() public static void loop_inputports_sfjp()
{ {
if (Keyboard.IsPressed(Corekey.D5)) if (Keyboard.IsPressed(MotionKey.P1_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D5))
{ {
shortc &= ~0x0001; shortc &= ~0x0001;
} }
@ -439,7 +439,7 @@ namespace mame
{ {
shortc |= 0x0001; shortc |= 0x0001;
} }
if (Keyboard.IsPressed(Corekey.D6)) if (Keyboard.IsPressed(MotionKey.P2_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D6))
{ {
shortc &= ~0x0002; shortc &= ~0x0002;
} }
@ -447,7 +447,7 @@ namespace mame
{ {
shortc |= 0x0002; shortc |= 0x0002;
} }
if (Keyboard.IsPressed(Corekey.D1)) if (Keyboard.IsPressed(MotionKey.P1_GAMESTART))//if (Keyboard.IsPressed(Corekey.D1))
{ {
shorts &= ~0x0001; shorts &= ~0x0001;
} }
@ -455,7 +455,7 @@ namespace mame
{ {
shorts |= 0x0001; shorts |= 0x0001;
} }
if (Keyboard.IsPressed(Corekey.D2)) if (Keyboard.IsPressed(MotionKey.P2_GAMESTART))//if (Keyboard.IsPressed(Corekey.D2))
{ {
shorts &= ~0x0002; shorts &= ~0x0002;
} }
@ -463,7 +463,7 @@ namespace mame
{ {
shorts |= 0x0002; shorts |= 0x0002;
} }
if (Keyboard.IsPressed(Corekey.D)) if (Keyboard.IsPressed(MotionKey.P1_RIGHT))//if (Keyboard.IsPressed(Corekey.D))
{ {
short1 &= ~0x0001; short1 &= ~0x0001;
} }
@ -471,7 +471,7 @@ namespace mame
{ {
short1 |= 0x0001; short1 |= 0x0001;
} }
if (Keyboard.IsPressed(Corekey.A)) if (Keyboard.IsPressed(MotionKey.P1_LEFT))//if (Keyboard.IsPressed(Corekey.A))
{ {
short1 &= ~0x0002; short1 &= ~0x0002;
} }
@ -479,7 +479,7 @@ namespace mame
{ {
short1 |= 0x0002; short1 |= 0x0002;
} }
if (Keyboard.IsPressed(Corekey.S)) if (Keyboard.IsPressed(MotionKey.P1_DOWN))//if (Keyboard.IsPressed(Corekey.S))
{ {
short1 &= ~0x0004; short1 &= ~0x0004;
} }
@ -487,7 +487,7 @@ namespace mame
{ {
short1 |= 0x0004; short1 |= 0x0004;
} }
if (Keyboard.IsPressed(Corekey.W)) if (Keyboard.IsPressed(MotionKey.P1_UP))//if (Keyboard.IsPressed(Corekey.W))
{ {
short1 &= ~0x0008; short1 &= ~0x0008;
} }
@ -495,7 +495,7 @@ namespace mame
{ {
short1 |= 0x0008; short1 |= 0x0008;
} }
if (Keyboard.IsPressed(Corekey.J)) if (Keyboard.IsPressed(MotionKey.P1_BTN_1))//if (Keyboard.IsPressed(Corekey.J))
{ {
short1 &= ~0x0100; short1 &= ~0x0100;
} }
@ -503,7 +503,7 @@ namespace mame
{ {
short1 |= 0x0100; short1 |= 0x0100;
} }
if (Keyboard.IsPressed(Corekey.K)) if (Keyboard.IsPressed(MotionKey.P1_BTN_2))//if (Keyboard.IsPressed(Corekey.K))
{ {
short1 &= ~0x0200; short1 &= ~0x0200;
} }
@ -511,7 +511,7 @@ namespace mame
{ {
short1 |= 0x0200; short1 |= 0x0200;
} }
if (Keyboard.IsPressed(Corekey.L)) if (Keyboard.IsPressed(MotionKey.P1_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.L))
{ {
short1 &= ~0x0400; short1 &= ~0x0400;
} }
@ -519,7 +519,7 @@ namespace mame
{ {
short1 |= 0x0400; short1 |= 0x0400;
} }
if (Keyboard.IsPressed(Corekey.U)) if (Keyboard.IsPressed(MotionKey.P1_BTN_3))//if (Keyboard.IsPressed(Corekey.U))
{ {
short1 &= ~0x1000; short1 &= ~0x1000;
} }
@ -527,7 +527,7 @@ namespace mame
{ {
short1 |= 0x1000; short1 |= 0x1000;
} }
if (Keyboard.IsPressed(Corekey.I)) if (Keyboard.IsPressed(MotionKey.P1_BTN_4))//if (Keyboard.IsPressed(Corekey.I))
{ {
short1 &= ~0x2000; short1 &= ~0x2000;
} }
@ -535,7 +535,7 @@ namespace mame
{ {
short1 |= 0x2000; short1 |= 0x2000;
} }
if (Keyboard.IsPressed(Corekey.O)) if (Keyboard.IsPressed(MotionKey.P1_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.O))
{ {
short1 &= ~0x4000; short1 &= ~0x4000;
} }
@ -543,7 +543,7 @@ namespace mame
{ {
short1 |= 0x4000; short1 |= 0x4000;
} }
if (Keyboard.IsPressed(Corekey.Right)) if (Keyboard.IsPressed(MotionKey.P2_RIGHT))//if (Keyboard.IsPressed(Corekey.Right))
{ {
short2 &= ~0x0001; short2 &= ~0x0001;
} }
@ -551,7 +551,7 @@ namespace mame
{ {
short2 |= 0x0001; short2 |= 0x0001;
} }
if (Keyboard.IsPressed(Corekey.Left)) if (Keyboard.IsPressed(MotionKey.P2_LEFT))//if (Keyboard.IsPressed(Corekey.Left))
{ {
short2 &= ~0x0002; short2 &= ~0x0002;
} }
@ -559,7 +559,7 @@ namespace mame
{ {
short2 |= 0x0002; short2 |= 0x0002;
} }
if (Keyboard.IsPressed(Corekey.Down)) if (Keyboard.IsPressed(MotionKey.P2_DOWN)) //if (Keyboard.IsPressed(Corekey.Down))
{ {
short2 &= ~0x0004; short2 &= ~0x0004;
} }
@ -567,7 +567,7 @@ namespace mame
{ {
short2 |= 0x0004; short2 |= 0x0004;
} }
if (Keyboard.IsPressed(Corekey.Up)) if (Keyboard.IsPressed(MotionKey.P2_UP))//if (Keyboard.IsPressed(Corekey.Up))
{ {
short2 &= ~0x0008; short2 &= ~0x0008;
} }
@ -575,7 +575,7 @@ namespace mame
{ {
short2 |= 0x0008; short2 |= 0x0008;
} }
if (Keyboard.IsPressed(Corekey.NumPad1)) if (Keyboard.IsPressed(MotionKey.P2_BTN_1))//if (Keyboard.IsPressed(Corekey.NumPad1))
{ {
short2 &= ~0x0100; short2 &= ~0x0100;
} }
@ -583,7 +583,7 @@ namespace mame
{ {
short2 |= 0x0100; short2 |= 0x0100;
} }
if (Keyboard.IsPressed(Corekey.NumPad2)) if (Keyboard.IsPressed(MotionKey.P2_BTN_2))//if (Keyboard.IsPressed(Corekey.NumPad2))
{ {
short2 &= ~0x0200; short2 &= ~0x0200;
} }
@ -591,7 +591,7 @@ namespace mame
{ {
short2 |= 0x0200; short2 |= 0x0200;
} }
if (Keyboard.IsPressed(Corekey.NumPad3)) if (Keyboard.IsPressed(MotionKey.P2_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.NumPad3))
{ {
short2 &= ~0x0400; short2 &= ~0x0400;
} }
@ -599,7 +599,7 @@ namespace mame
{ {
short2 |= 0x0400; short2 |= 0x0400;
} }
if (Keyboard.IsPressed(Corekey.NumPad4)) if (Keyboard.IsPressed(MotionKey.P2_BTN_3))//if (Keyboard.IsPressed(Corekey.NumPad4))
{ {
short2 &= ~0x1000; short2 &= ~0x1000;
} }
@ -607,7 +607,7 @@ namespace mame
{ {
short2 |= 0x1000; short2 |= 0x1000;
} }
if (Keyboard.IsPressed(Corekey.NumPad5)) if (Keyboard.IsPressed(MotionKey.P2_BTN_4))//if (Keyboard.IsPressed(Corekey.NumPad5))
{ {
short2 &= ~0x2000; short2 &= ~0x2000;
} }
@ -615,7 +615,7 @@ namespace mame
{ {
short2 |= 0x2000; short2 |= 0x2000;
} }
if (Keyboard.IsPressed(Corekey.NumPad6)) if (Keyboard.IsPressed(MotionKey.P2_UNKNOW_F))//if (Keyboard.IsPressed(Corekey.NumPad6))
{ {
short2 &= ~0x4000; short2 &= ~0x4000;
} }
@ -623,7 +623,7 @@ namespace mame
{ {
short2 |= 0x4000; short2 |= 0x4000;
} }
if (Keyboard.IsPressed(Corekey.R)) if (Keyboard.IsPressed(MotionKey.UNKNOW_R)) //if (Keyboard.IsPressed(Corekey.R))
{ {
shorts &= ~0x0004; shorts &= ~0x0004;
} }
@ -631,7 +631,7 @@ namespace mame
{ {
shorts |= 0x0004; shorts |= 0x0004;
} }
if (Keyboard.IsPressed(Corekey.T)) if (Keyboard.IsPressed(MotionKey.UNKNOW_T)) //if (Keyboard.IsPressed(Corekey.T))
{ {
//sbyte0 &= ~0x40; //sbyte0 &= ~0x40;
} }
@ -642,7 +642,7 @@ namespace mame
} }
public static void loop_inputports_sfan() public static void loop_inputports_sfan()
{ {
if (Keyboard.IsPressed(Corekey.D5)) if (Keyboard.IsPressed(MotionKey.P1_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D5))
{ {
shortc &= ~0x0001; shortc &= ~0x0001;
} }
@ -650,7 +650,7 @@ namespace mame
{ {
shortc |= 0x0001; shortc |= 0x0001;
} }
if (Keyboard.IsPressed(Corekey.D6)) if (Keyboard.IsPressed(MotionKey.P2_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D6))
{ {
shortc &= ~0x0002; shortc &= ~0x0002;
} }
@ -658,7 +658,7 @@ namespace mame
{ {
shortc |= 0x0002; shortc |= 0x0002;
} }
if (Keyboard.IsPressed(Corekey.D1)) if (Keyboard.IsPressed(MotionKey.P1_GAMESTART))//if (Keyboard.IsPressed(Corekey.D1))
{ {
shorts &= ~0x0001; shorts &= ~0x0001;
} }
@ -666,7 +666,7 @@ namespace mame
{ {
shorts |= 0x0001; shorts |= 0x0001;
} }
if (Keyboard.IsPressed(Corekey.D2)) if (Keyboard.IsPressed(MotionKey.P2_GAMESTART))//if (Keyboard.IsPressed(Corekey.D2))
{ {
shorts &= ~0x0002; shorts &= ~0x0002;
} }
@ -674,7 +674,7 @@ namespace mame
{ {
shorts |= 0x0002; shorts |= 0x0002;
} }
if (Keyboard.IsPressed(Corekey.D)) if (Keyboard.IsPressed(MotionKey.P1_RIGHT))//if (Keyboard.IsPressed(Corekey.D))
{ {
short0 &= ~0x0001; short0 &= ~0x0001;
} }
@ -682,7 +682,7 @@ namespace mame
{ {
short0 |= 0x0001; short0 |= 0x0001;
} }
if (Keyboard.IsPressed(Corekey.A)) if (Keyboard.IsPressed(MotionKey.P1_LEFT))//if (Keyboard.IsPressed(Corekey.A))
{ {
short0 &= ~0x0002; short0 &= ~0x0002;
} }
@ -690,7 +690,7 @@ namespace mame
{ {
short0 |= 0x0002; short0 |= 0x0002;
} }
if (Keyboard.IsPressed(Corekey.S)) if (Keyboard.IsPressed(MotionKey.P1_DOWN))//if (Keyboard.IsPressed(Corekey.S))
{ {
short0 &= ~0x0004; short0 &= ~0x0004;
} }
@ -698,7 +698,7 @@ namespace mame
{ {
short0 |= 0x0004; short0 |= 0x0004;
} }
if (Keyboard.IsPressed(Corekey.W)) if (Keyboard.IsPressed(MotionKey.P1_UP))//if (Keyboard.IsPressed(Corekey.W))
{ {
short0 &= ~0x0008; short0 &= ~0x0008;
} }
@ -706,7 +706,7 @@ namespace mame
{ {
short0 |= 0x0008; short0 |= 0x0008;
} }
if (Keyboard.IsPressed(Corekey.J)) if (Keyboard.IsPressed(MotionKey.P1_BTN_1))//if (Keyboard.IsPressed(Corekey.J))
{ {
sbyte1 |= 0x01; sbyte1 |= 0x01;
} }
@ -714,7 +714,7 @@ namespace mame
{ {
sbyte1 &= ~0x01; sbyte1 &= ~0x01;
} }
if (Keyboard.IsPressed(Corekey.K)) if (Keyboard.IsPressed(MotionKey.P1_BTN_2))//if (Keyboard.IsPressed(Corekey.K))
{ {
sbyte1 |= 0x02; sbyte1 |= 0x02;
} }
@ -722,7 +722,7 @@ namespace mame
{ {
sbyte1 &= ~0x02; sbyte1 &= ~0x02;
} }
if (Keyboard.IsPressed(Corekey.L)) if (Keyboard.IsPressed(MotionKey.P1_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.L))
{ {
sbyte1 |= 0x04; sbyte1 |= 0x04;
} }
@ -730,7 +730,7 @@ namespace mame
{ {
sbyte1 &= ~0x04; sbyte1 &= ~0x04;
} }
if (Keyboard.IsPressed(Corekey.U)) if (Keyboard.IsPressed(MotionKey.P1_BTN_3))//if (Keyboard.IsPressed(Corekey.U))
{ {
sbyte2 |= 0x01; sbyte2 |= 0x01;
} }
@ -738,7 +738,7 @@ namespace mame
{ {
sbyte2 &= ~0x01; sbyte2 &= ~0x01;
} }
if (Keyboard.IsPressed(Corekey.I)) if (Keyboard.IsPressed(MotionKey.P1_BTN_4))//if (Keyboard.IsPressed(Corekey.I))
{ {
sbyte2 |= 0x02; sbyte2 |= 0x02;
} }
@ -746,7 +746,7 @@ namespace mame
{ {
sbyte2 &= ~0x02; sbyte2 &= ~0x02;
} }
if (Keyboard.IsPressed(Corekey.O)) if (Keyboard.IsPressed(MotionKey.P1_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.O))
{ {
sbyte2 |= 0x04; sbyte2 |= 0x04;
} }
@ -754,7 +754,7 @@ namespace mame
{ {
sbyte2 &= ~0x04; sbyte2 &= ~0x04;
} }
if (Keyboard.IsPressed(Corekey.Right)) if (Keyboard.IsPressed(MotionKey.P2_RIGHT))//if (Keyboard.IsPressed(Corekey.Right))
{ {
short0 &= ~0x0100; short0 &= ~0x0100;
} }
@ -762,7 +762,7 @@ namespace mame
{ {
short0 |= 0x0100; short0 |= 0x0100;
} }
if (Keyboard.IsPressed(Corekey.Left)) if (Keyboard.IsPressed(MotionKey.P2_LEFT))//if (Keyboard.IsPressed(Corekey.Left))
{ {
short0 &= ~0x0200; short0 &= ~0x0200;
} }
@ -770,7 +770,7 @@ namespace mame
{ {
short0 |= 0x0200; short0 |= 0x0200;
} }
if (Keyboard.IsPressed(Corekey.Down)) if (Keyboard.IsPressed(MotionKey.P2_DOWN)) //if (Keyboard.IsPressed(Corekey.Down))
{ {
short0 &= ~0x0400; short0 &= ~0x0400;
} }
@ -778,7 +778,7 @@ namespace mame
{ {
short0 |= 0x0400; short0 |= 0x0400;
} }
if (Keyboard.IsPressed(Corekey.Up)) if (Keyboard.IsPressed(MotionKey.P2_UP))//if (Keyboard.IsPressed(Corekey.Up))
{ {
short0 &= ~0x0800; short0 &= ~0x0800;
} }
@ -786,7 +786,7 @@ namespace mame
{ {
short0 |= 0x0800; short0 |= 0x0800;
} }
if (Keyboard.IsPressed(Corekey.NumPad1)) if (Keyboard.IsPressed(MotionKey.P2_BTN_1))//if (Keyboard.IsPressed(Corekey.NumPad1))
{ {
sbyte3 |= 0x01; sbyte3 |= 0x01;
} }
@ -794,7 +794,7 @@ namespace mame
{ {
sbyte3 &= ~0x01; sbyte3 &= ~0x01;
} }
if (Keyboard.IsPressed(Corekey.NumPad2)) if (Keyboard.IsPressed(MotionKey.P2_BTN_2))//if (Keyboard.IsPressed(Corekey.NumPad2))
{ {
sbyte3 |= 0x02; sbyte3 |= 0x02;
} }
@ -802,7 +802,7 @@ namespace mame
{ {
sbyte3 &= ~0x02; sbyte3 &= ~0x02;
} }
if (Keyboard.IsPressed(Corekey.NumPad3)) if (Keyboard.IsPressed(MotionKey.P2_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.NumPad3))
{ {
sbyte3 |= 0x04; sbyte3 |= 0x04;
} }
@ -810,7 +810,7 @@ namespace mame
{ {
sbyte3 &= ~0x04; sbyte3 &= ~0x04;
} }
if (Keyboard.IsPressed(Corekey.NumPad4)) if (Keyboard.IsPressed(MotionKey.P2_BTN_3))//if (Keyboard.IsPressed(Corekey.NumPad4))
{ {
sbyte4 |= 0x01; sbyte4 |= 0x01;
} }
@ -818,7 +818,7 @@ namespace mame
{ {
sbyte4 &= ~0x01; sbyte4 &= ~0x01;
} }
if (Keyboard.IsPressed(Corekey.NumPad5)) if (Keyboard.IsPressed(MotionKey.P2_BTN_4))//if (Keyboard.IsPressed(Corekey.NumPad5))
{ {
sbyte4 &= ~0x02; sbyte4 &= ~0x02;
} }
@ -826,7 +826,7 @@ namespace mame
{ {
sbyte4 |= 0x02; sbyte4 |= 0x02;
} }
if (Keyboard.IsPressed(Corekey.NumPad6)) if (Keyboard.IsPressed(MotionKey.P2_UNKNOW_F))//if (Keyboard.IsPressed(Corekey.NumPad6))
{ {
sbyte4 |= 0x04; sbyte4 |= 0x04;
} }
@ -834,7 +834,7 @@ namespace mame
{ {
sbyte4 &= ~0x04; sbyte4 &= ~0x04;
} }
if (Keyboard.IsPressed(Corekey.R)) if (Keyboard.IsPressed(MotionKey.UNKNOW_R)) //if (Keyboard.IsPressed(Corekey.R))
{ {
shorts &= ~0x0004; shorts &= ~0x0004;
} }
@ -842,7 +842,7 @@ namespace mame
{ {
shorts |= 0x0004; shorts |= 0x0004;
} }
if (Keyboard.IsPressed(Corekey.T)) if (Keyboard.IsPressed(MotionKey.UNKNOW_T)) //if (Keyboard.IsPressed(Corekey.T))
{ {
//sbyte0 &= ~0x40; //sbyte0 &= ~0x40;
} }

File diff suppressed because it is too large Load Diff

View File

@ -19,7 +19,7 @@ namespace mame
public static List<fr1> lfr = new List<fr1>(); public static List<fr1> lfr = new List<fr1>();
public static void loop_inputports_dataeast_pcktgal() public static void loop_inputports_dataeast_pcktgal()
{ {
if (Keyboard.IsPressed(Corekey.D5)) if (Keyboard.IsPressed(MotionKey.P1_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D5))
{ {
byte2 &= unchecked((byte)~0x10); byte2 &= unchecked((byte)~0x10);
} }
@ -27,7 +27,7 @@ namespace mame
{ {
byte2 |= 0x10; byte2 |= 0x10;
} }
if (Keyboard.IsPressed(Corekey.D6)) if (Keyboard.IsPressed(MotionKey.P2_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D6))
{ {
byte2 &= unchecked((byte)~0x20); byte2 &= unchecked((byte)~0x20);
} }
@ -35,7 +35,7 @@ namespace mame
{ {
byte2 |= 0x20; byte2 |= 0x20;
} }
if (Keyboard.IsPressed(Corekey.D1)) if (Keyboard.IsPressed(MotionKey.P1_GAMESTART))//if (Keyboard.IsPressed(Corekey.D1))
{ {
byte1 &= unchecked((byte)~0x10); byte1 &= unchecked((byte)~0x10);
} }
@ -43,7 +43,7 @@ namespace mame
{ {
byte1 |= 0x10; byte1 |= 0x10;
} }
if (Keyboard.IsPressed(Corekey.D2)) if (Keyboard.IsPressed(MotionKey.P2_GAMESTART))//if (Keyboard.IsPressed(Corekey.D2))
{ {
byte1 &= unchecked((byte)~0x20); byte1 &= unchecked((byte)~0x20);
} }
@ -51,7 +51,7 @@ namespace mame
{ {
byte1 |= 0x20; byte1 |= 0x20;
} }
if (Keyboard.IsPressed(Corekey.D)) if (Keyboard.IsPressed(MotionKey.P1_RIGHT))//if (Keyboard.IsPressed(Corekey.D))
{ {
byte1 &= unchecked((byte)~0x01); byte1 &= unchecked((byte)~0x01);
} }
@ -59,7 +59,7 @@ namespace mame
{ {
byte1 |= 0x01; byte1 |= 0x01;
} }
if (Keyboard.IsPressed(Corekey.A)) if (Keyboard.IsPressed(MotionKey.P1_LEFT))//if (Keyboard.IsPressed(Corekey.A))
{ {
byte1 &= unchecked((byte)~0x02); byte1 &= unchecked((byte)~0x02);
} }
@ -67,7 +67,7 @@ namespace mame
{ {
byte1 |= 0x02; byte1 |= 0x02;
} }
if (Keyboard.IsPressed(Corekey.S)) if (Keyboard.IsPressed(MotionKey.P1_DOWN))//if (Keyboard.IsPressed(Corekey.S))
{ {
byte1 &= unchecked((byte)~0x04); byte1 &= unchecked((byte)~0x04);
} }
@ -75,7 +75,7 @@ namespace mame
{ {
byte1 |= 0x04; byte1 |= 0x04;
} }
if (Keyboard.IsPressed(Corekey.W)) if (Keyboard.IsPressed(MotionKey.P1_UP))//if (Keyboard.IsPressed(Corekey.W))
{ {
byte1 &= unchecked((byte)~0x08); byte1 &= unchecked((byte)~0x08);
} }
@ -83,7 +83,7 @@ namespace mame
{ {
byte1 |= 0x08; byte1 |= 0x08;
} }
if (Keyboard.IsPressed(Corekey.J)) if (Keyboard.IsPressed(MotionKey.P1_BTN_1))//if (Keyboard.IsPressed(Corekey.J))
{ {
byte1 &= unchecked((byte)~0x80); byte1 &= unchecked((byte)~0x80);
} }
@ -91,7 +91,7 @@ namespace mame
{ {
byte1 |= 0x80; byte1 |= 0x80;
} }
if (Keyboard.IsPressed(Corekey.K)) if (Keyboard.IsPressed(MotionKey.P1_BTN_2))//if (Keyboard.IsPressed(Corekey.K))
{ {
byte1 &= unchecked((byte)~0x40); byte1 &= unchecked((byte)~0x40);
} }
@ -99,7 +99,7 @@ namespace mame
{ {
byte1 |= 0x40; byte1 |= 0x40;
} }
if (Keyboard.IsPressed(Corekey.Right)) if (Keyboard.IsPressed(MotionKey.P2_RIGHT))//if (Keyboard.IsPressed(Corekey.Right))
{ {
byte2 &= unchecked((byte)~0x01); byte2 &= unchecked((byte)~0x01);
} }
@ -107,7 +107,7 @@ namespace mame
{ {
byte2 |= 0x01; byte2 |= 0x01;
} }
if (Keyboard.IsPressed(Corekey.Left)) if (Keyboard.IsPressed(MotionKey.P2_LEFT))//if (Keyboard.IsPressed(Corekey.Left))
{ {
byte2 &= unchecked((byte)~0x02); byte2 &= unchecked((byte)~0x02);
} }
@ -115,7 +115,7 @@ namespace mame
{ {
byte2 |= 0x02; byte2 |= 0x02;
} }
if (Keyboard.IsPressed(Corekey.Down)) if (Keyboard.IsPressed(MotionKey.P2_DOWN)) //if (Keyboard.IsPressed(Corekey.Down))
{ {
byte2 &= unchecked((byte)~0x04); byte2 &= unchecked((byte)~0x04);
} }
@ -123,7 +123,7 @@ namespace mame
{ {
byte2 |= 0x04; byte2 |= 0x04;
} }
if (Keyboard.IsPressed(Corekey.Up)) if (Keyboard.IsPressed(MotionKey.P2_UP))//if (Keyboard.IsPressed(Corekey.Up))
{ {
byte2 &= unchecked((byte)~0x08); byte2 &= unchecked((byte)~0x08);
} }
@ -131,7 +131,7 @@ namespace mame
{ {
byte2 |= 0x08; byte2 |= 0x08;
} }
if (Keyboard.IsPressed(Corekey.NumPad1)) if (Keyboard.IsPressed(MotionKey.P2_BTN_1))//if (Keyboard.IsPressed(Corekey.NumPad1))
{ {
byte2 &= unchecked((byte)~0x80); byte2 &= unchecked((byte)~0x80);
} }
@ -139,7 +139,7 @@ namespace mame
{ {
byte2 |= 0x80; byte2 |= 0x80;
} }
if (Keyboard.IsPressed(Corekey.NumPad2)) if (Keyboard.IsPressed(MotionKey.P2_BTN_2))//if (Keyboard.IsPressed(Corekey.NumPad2))
{ {
byte2 &= unchecked((byte)~0x40); byte2 &= unchecked((byte)~0x40);
} }
@ -147,7 +147,7 @@ namespace mame
{ {
byte2 |= 0x40; byte2 |= 0x40;
} }
if (Keyboard.IsTriggered(Corekey.N)) if (Keyboard.IsPressed(MotionKey.UNKNOW_N))//if (Keyboard.IsPressed(Corekey.N))
{ {
lfr = new List<fr1>(); lfr = new List<fr1>();
lfr.Add(new fr1((int)(Video.screenstate.frame_number + 1), 0x7f)); lfr.Add(new fr1((int)(Video.screenstate.frame_number + 1), 0x7f));
@ -155,25 +155,26 @@ 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), 0x7f));
lfr.Add(new fr1((int)(Video.screenstate.frame_number + 2 + i3 + 1), 0xff)); lfr.Add(new fr1((int)(Video.screenstate.frame_number + 2 + i3 + 1), 0xff));
} }
if (Keyboard.IsTriggered(Corekey.U)) if (Keyboard.IsPressed(MotionKey.P1_BTN_3))//if (Keyboard.IsPressed(Corekey.U))
{ {
lfr = new List<fr1>(); lfr = new List<fr1>();
lfr.Add(new fr1((int)(Video.screenstate.frame_number + 1), 0xf7)); lfr.Add(new fr1((int)(Video.screenstate.frame_number + 1), 0xf7));
lfr.Add(new fr1((int)(Video.screenstate.frame_number + 2), 0xff)); lfr.Add(new fr1((int)(Video.screenstate.frame_number + 2), 0xff));
} }
if (Keyboard.IsTriggered(Corekey.I)) if (Keyboard.IsPressed(MotionKey.P1_BTN_4))//if (Keyboard.IsPressed(Corekey.I))
{ {
lfr = new List<fr1>(); lfr = new List<fr1>();
lfr.Add(new fr1((int)(Video.screenstate.frame_number + 1), 0xfb)); lfr.Add(new fr1((int)(Video.screenstate.frame_number + 1), 0xfb));
lfr.Add(new fr1((int)(Video.screenstate.frame_number + 2), 0xff)); lfr.Add(new fr1((int)(Video.screenstate.frame_number + 2), 0xff));
} }
if (Keyboard.IsTriggered(Corekey.V))
if (Keyboard.IsPressed(MotionKey.UNKNOW_V))//if (Keyboard.IsPressed(Corekey.V))
{ {
lfr = new List<fr1>(); lfr = new List<fr1>();
lfr.Add(new fr1((int)(Video.screenstate.frame_number + 1), 0xfd)); lfr.Add(new fr1((int)(Video.screenstate.frame_number + 1), 0xfd));
lfr.Add(new fr1((int)(Video.screenstate.frame_number + 2), 0xff)); lfr.Add(new fr1((int)(Video.screenstate.frame_number + 2), 0xff));
} }
if (Keyboard.IsTriggered(Corekey.B)) if (Keyboard.IsPressed(MotionKey.UNKNOW_B))//if (Keyboard.IsPressed(Corekey.B))
{ {
lfr = new List<fr1>(); lfr = new List<fr1>();
lfr.Add(new fr1((int)(Video.screenstate.frame_number + 1), 0xfe)); lfr.Add(new fr1((int)(Video.screenstate.frame_number + 1), 0xfe));

View File

@ -6,7 +6,7 @@ namespace mame
{ {
public static void loop_inputports_igs011_drgnwrld() public static void loop_inputports_igs011_drgnwrld()
{ {
if (Keyboard.IsPressed(Corekey.D5)) if (Keyboard.IsPressed(MotionKey.P1_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D5))
{ {
sbytec &= ~0x01; sbytec &= ~0x01;
} }
@ -14,7 +14,7 @@ namespace mame
{ {
sbytec |= 0x01; sbytec |= 0x01;
} }
if (Keyboard.IsPressed(Corekey.D6)) if (Keyboard.IsPressed(MotionKey.P2_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D6))
{ {
sbytec &= ~0x02; sbytec &= ~0x02;
} }
@ -22,7 +22,7 @@ namespace mame
{ {
sbytec |= 0x02; sbytec |= 0x02;
} }
if (Keyboard.IsPressed(Corekey.D1)) if (Keyboard.IsPressed(MotionKey.P1_GAMESTART))//if (Keyboard.IsPressed(Corekey.D1))
{ {
sbyte0 &= ~0x01; sbyte0 &= ~0x01;
} }
@ -30,7 +30,7 @@ namespace mame
{ {
sbyte0 |= 0x01; sbyte0 |= 0x01;
} }
if (Keyboard.IsPressed(Corekey.D2)) if (Keyboard.IsPressed(MotionKey.P2_GAMESTART))//if (Keyboard.IsPressed(Corekey.D2))
{ {
sbyte2 &= ~0x10; sbyte2 &= ~0x10;
} }
@ -38,7 +38,8 @@ namespace mame
{ {
sbyte2 |= 0x10; sbyte2 |= 0x10;
} }
if (Keyboard.IsPressed(Corekey.D))// || Mouse.deltaX > 0) //if (Keyboard.IsPressed(Corekey.D))// || Mouse.deltaX > 0)
if (Keyboard.IsPressed(MotionKey.P1_RIGHT))// || Mouse.deltaX > 0)
{ {
sbyte0 &= ~0x10; sbyte0 &= ~0x10;
} }
@ -46,7 +47,7 @@ namespace mame
{ {
sbyte0 |= 0x10; sbyte0 |= 0x10;
} }
if (Keyboard.IsPressed(Corekey.A))// || Mouse.deltaX < 0) if (Keyboard.IsPressed(MotionKey.P1_LEFT))//if (Keyboard.IsPressed(Corekey.A))// || Mouse.deltaX < 0)
{ {
sbyte2 &= ~0x02; sbyte2 &= ~0x02;
} }
@ -54,7 +55,7 @@ namespace mame
{ {
sbyte2 |= 0x02; sbyte2 |= 0x02;
} }
if (Keyboard.IsPressed(Corekey.S))// || Mouse.deltaY > 0) if (Keyboard.IsPressed(MotionKey.P1_DOWN))//if (Keyboard.IsPressed(Corekey.S))// || Mouse.deltaY > 0)
{ {
sbyte0 &= ~0x04; sbyte0 &= ~0x04;
} }
@ -62,7 +63,7 @@ namespace mame
{ {
sbyte0 |= 0x04; sbyte0 |= 0x04;
} }
if (Keyboard.IsPressed(Corekey.W))// || Mouse.deltaY < 0) if (Keyboard.IsPressed(MotionKey.P1_UP))//if (Keyboard.IsPressed(Corekey.W))// || Mouse.deltaY < 0)
{ {
sbyte2 &= ~0x01; sbyte2 &= ~0x01;
} }
@ -70,7 +71,7 @@ namespace mame
{ {
sbyte2 |= 0x01; sbyte2 |= 0x01;
} }
if (Keyboard.IsPressed(Corekey.J))// || Mouse.buttons[0] != 0) if (Keyboard.IsPressed(MotionKey.P1_BTN_1))//if (Keyboard.IsPressed(Corekey.J))// || Mouse.buttons[0] != 0)
{ {
sbyte2 &= ~0x04; sbyte2 &= ~0x04;
} }
@ -78,7 +79,7 @@ namespace mame
{ {
sbyte2 |= 0x04; sbyte2 |= 0x04;
} }
if (Keyboard.IsPressed(Corekey.K))// || Mouse.buttons[1] != 0) if (Keyboard.IsPressed(MotionKey.P1_BTN_2))//if (Keyboard.IsPressed(Corekey.K))// || Mouse.buttons[1] != 0)
{ {
sbyte0 &= ~0x40; sbyte0 &= ~0x40;
} }
@ -86,7 +87,7 @@ namespace mame
{ {
sbyte0 |= 0x40; sbyte0 |= 0x40;
} }
if (Keyboard.IsPressed(Corekey.L)) if (Keyboard.IsPressed(MotionKey.P1_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.L))
{ {
sbyte2 &= ~0x08; sbyte2 &= ~0x08;
} }
@ -94,7 +95,7 @@ namespace mame
{ {
sbyte2 |= 0x08; sbyte2 |= 0x08;
} }
if (Keyboard.IsPressed(Corekey.U)) if (Keyboard.IsPressed(MotionKey.P1_BTN_3))//if (Keyboard.IsPressed(Corekey.U))
{ {
} }
@ -102,7 +103,7 @@ namespace mame
{ {
} }
if (Keyboard.IsPressed(Corekey.I)) if (Keyboard.IsPressed(MotionKey.P1_BTN_4))//if (Keyboard.IsPressed(Corekey.I))
{ {
} }
@ -110,7 +111,7 @@ namespace mame
{ {
} }
if (Keyboard.IsPressed(Corekey.O)) if (Keyboard.IsPressed(MotionKey.P1_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.O))
{ {
} }
@ -118,7 +119,7 @@ namespace mame
{ {
} }
if (Keyboard.IsPressed(Corekey.Right)) if (Keyboard.IsPressed(MotionKey.P2_RIGHT))//if (Keyboard.IsPressed(Corekey.Right))
{ {
sbyte2 &= ~0x40; sbyte2 &= ~0x40;
} }
@ -126,7 +127,7 @@ namespace mame
{ {
sbyte2 |= 0x40; sbyte2 |= 0x40;
} }
if (Keyboard.IsPressed(Corekey.Left)) if (Keyboard.IsPressed(MotionKey.P2_LEFT))//if (Keyboard.IsPressed(Corekey.Left))
{ {
sbyte1 &= ~0x08; sbyte1 &= ~0x08;
} }
@ -134,7 +135,7 @@ namespace mame
{ {
sbyte1 |= 0x08; sbyte1 |= 0x08;
} }
if (Keyboard.IsPressed(Corekey.Down)) if (Keyboard.IsPressed(MotionKey.P2_DOWN)) //if (Keyboard.IsPressed(Corekey.Down))
{ {
sbyte2 &= ~0x20; sbyte2 &= ~0x20;
} }
@ -142,7 +143,7 @@ namespace mame
{ {
sbyte2 |= 0x20; sbyte2 |= 0x20;
} }
if (Keyboard.IsPressed(Corekey.Up)) if (Keyboard.IsPressed(MotionKey.P2_UP))//if (Keyboard.IsPressed(Corekey.Up))
{ {
sbyte1 &= ~0x02; sbyte1 &= ~0x02;
} }
@ -150,7 +151,7 @@ namespace mame
{ {
sbyte1 |= 0x02; sbyte1 |= 0x02;
} }
if (Keyboard.IsPressed(Corekey.NumPad1)) if (Keyboard.IsPressed(MotionKey.P2_BTN_1))//if (Keyboard.IsPressed(Corekey.NumPad1))
{ {
sbyte1 &= ~0x20; sbyte1 &= ~0x20;
} }
@ -158,7 +159,7 @@ namespace mame
{ {
sbyte1 |= 0x20; sbyte1 |= 0x20;
} }
if (Keyboard.IsPressed(Corekey.NumPad2)) if (Keyboard.IsPressed(MotionKey.P2_BTN_2))//if (Keyboard.IsPressed(Corekey.NumPad2))
{ {
sbyte2 &= unchecked((sbyte)~0x80); sbyte2 &= unchecked((sbyte)~0x80);
} }
@ -166,7 +167,7 @@ namespace mame
{ {
sbyte2 |= unchecked((sbyte)0x80); sbyte2 |= unchecked((sbyte)0x80);
} }
if (Keyboard.IsPressed(Corekey.NumPad3)) if (Keyboard.IsPressed(MotionKey.P2_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.NumPad3))
{ {
sbyte1 &= unchecked((sbyte)~0x80); sbyte1 &= unchecked((sbyte)~0x80);
} }
@ -174,7 +175,7 @@ namespace mame
{ {
sbyte1 |= unchecked((sbyte)0x80); sbyte1 |= unchecked((sbyte)0x80);
} }
if (Keyboard.IsPressed(Corekey.NumPad4)) if (Keyboard.IsPressed(MotionKey.P2_BTN_3))//if (Keyboard.IsPressed(Corekey.NumPad4))
{ {
} }
@ -182,7 +183,7 @@ namespace mame
{ {
} }
if (Keyboard.IsPressed(Corekey.NumPad5)) if (Keyboard.IsPressed(MotionKey.P2_BTN_4))//if (Keyboard.IsPressed(Corekey.NumPad5))
{ {
} }
@ -190,7 +191,7 @@ namespace mame
{ {
} }
if (Keyboard.IsPressed(Corekey.NumPad6)) if (Keyboard.IsPressed(MotionKey.P2_UNKNOW_F))//if (Keyboard.IsPressed(Corekey.NumPad6))
{ {
} }
@ -198,7 +199,7 @@ namespace mame
{ {
} }
if (Keyboard.IsPressed(Corekey.R)) if (Keyboard.IsPressed(MotionKey.UNKNOW_R)) //if (Keyboard.IsPressed(Corekey.R))
{ {
sbytec &= ~0x08; sbytec &= ~0x08;
} }
@ -206,7 +207,7 @@ namespace mame
{ {
sbytec |= 0x08; sbytec |= 0x08;
} }
if (Keyboard.IsPressed(Corekey.T)) if (Keyboard.IsPressed(MotionKey.UNKNOW_T)) //if (Keyboard.IsPressed(Corekey.T))
{ {
sbytec &= ~0x10; sbytec &= ~0x10;
} }
@ -217,7 +218,8 @@ namespace mame
} }
public static void loop_inputports_igs011_lhb() public static void loop_inputports_igs011_lhb()
{ {
if (Keyboard.IsPressed(Corekey.D5)) /*
if (Keyboard.IsPressed(MotionKey.P1_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D5))
{ {
sbytec &= ~0x10; sbytec &= ~0x10;
} }
@ -225,7 +227,7 @@ namespace mame
{ {
sbytec |= 0x10; sbytec |= 0x10;
} }
if (Keyboard.IsPressed(Corekey.D1)) if (Keyboard.IsPressed(MotionKey.P1_GAMESTART))//if (Keyboard.IsPressed(Corekey.D1))
{ {
bkey0 &= unchecked((byte)~0x20); bkey0 &= unchecked((byte)~0x20);
} }
@ -233,7 +235,7 @@ namespace mame
{ {
bkey0 |= 0x20; bkey0 |= 0x20;
} }
if (Keyboard.IsPressed(Corekey.D2)) if (Keyboard.IsPressed(MotionKey.P2_GAMESTART))//if (Keyboard.IsPressed(Corekey.D2))
{ {
bkey1 &= unchecked((byte)~0x20); bkey1 &= unchecked((byte)~0x20);
} }
@ -257,7 +259,7 @@ namespace mame
{ {
bkey4 |= 0x20; bkey4 |= 0x20;
} }
if (Keyboard.IsPressed(Corekey.A)) if (Keyboard.IsPressed(MotionKey.P1_LEFT))//if (Keyboard.IsPressed(Corekey.A))
{ {
bkey0 &= unchecked((byte)~0x01); bkey0 &= unchecked((byte)~0x01);
} }
@ -281,7 +283,7 @@ namespace mame
{ {
bkey2 |= 0x01; bkey2 |= 0x01;
} }
if (Keyboard.IsPressed(Corekey.D)) if (Keyboard.IsPressed(MotionKey.P1_RIGHT))//if (Keyboard.IsPressed(Corekey.D))
{ {
bkey3 &= unchecked((byte)~0x01); bkey3 &= unchecked((byte)~0x01);
} }
@ -321,7 +323,7 @@ namespace mame
{ {
bkey3 |= 0x02; bkey3 |= 0x02;
} }
if (Keyboard.IsPressed(Corekey.I)) if (Keyboard.IsPressed(MotionKey.P1_BTN_4))//if (Keyboard.IsPressed(Corekey.I))
{ {
bkey0 &= unchecked((byte)~0x04); bkey0 &= unchecked((byte)~0x04);
} }
@ -329,7 +331,7 @@ namespace mame
{ {
bkey0 |= 0x04; bkey0 |= 0x04;
} }
if (Keyboard.IsPressed(Corekey.J)) if (Keyboard.IsPressed(MotionKey.P1_BTN_1))//if (Keyboard.IsPressed(Corekey.J))
{ {
bkey1 &= unchecked((byte)~0x04); bkey1 &= unchecked((byte)~0x04);
} }
@ -337,7 +339,7 @@ namespace mame
{ {
bkey1 |= 0x04; bkey1 |= 0x04;
} }
if (Keyboard.IsPressed(Corekey.K)) if (Keyboard.IsPressed(MotionKey.P1_BTN_2))//if (Keyboard.IsPressed(Corekey.K))
{ {
bkey2 &= unchecked((byte)~0x04); bkey2 &= unchecked((byte)~0x04);
} }
@ -345,7 +347,7 @@ namespace mame
{ {
bkey2 |= 0x04; bkey2 |= 0x04;
} }
if (Keyboard.IsPressed(Corekey.L)) if (Keyboard.IsPressed(MotionKey.P1_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.L))
{ {
bkey3 &= unchecked((byte)~0x04); bkey3 &= unchecked((byte)~0x04);
} }
@ -353,7 +355,7 @@ namespace mame
{ {
bkey3 |= 0x04; bkey3 |= 0x04;
} }
if (Keyboard.IsPressed(Corekey.M)) if (Keyboard.IsPressed(MotionKey.UNKNOW_M))//if (Keyboard.IsPressed(Corekey.M))
{ {
bkey0 &= unchecked((byte)~0x08); bkey0 &= unchecked((byte)~0x08);
} }
@ -361,7 +363,7 @@ namespace mame
{ {
bkey0 |= 0x08; bkey0 |= 0x08;
} }
if (Keyboard.IsPressed(Corekey.N)) if (Keyboard.IsPressed(MotionKey.UNKNOW_N))//if (Keyboard.IsPressed(Corekey.N))
{ {
bkey1 &= unchecked((byte)~0x08); bkey1 &= unchecked((byte)~0x08);
} }
@ -369,7 +371,7 @@ namespace mame
{ {
bkey1 |= 0x08; bkey1 |= 0x08;
} }
if (Keyboard.IsPressed(Corekey.O)) if (Keyboard.IsPressed(MotionKey.P1_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.O))
{ {
bkey4 &= unchecked((byte)~0x04); bkey4 &= unchecked((byte)~0x04);
} }
@ -377,7 +379,7 @@ namespace mame
{ {
bkey4 |= 0x04; bkey4 |= 0x04;
} }
if (Keyboard.IsPressed(Corekey.Q)) if (Keyboard.IsPressed(MotionKey.UNKNOW_Q))//if (Keyboard.IsPressed(Corekey.Q))
{ {
bkey0 &= unchecked((byte)~0x10); bkey0 &= unchecked((byte)~0x10);
} }
@ -385,7 +387,7 @@ namespace mame
{ {
bkey0 |= 0x10; bkey0 |= 0x10;
} }
if (Keyboard.IsPressed(Corekey.R)) if (Keyboard.IsPressed(MotionKey.UNKNOW_R)) //if (Keyboard.IsPressed(Corekey.R))
{ {
bkey1 &= unchecked((byte)~0x10); bkey1 &= unchecked((byte)~0x10);
} }
@ -393,7 +395,7 @@ namespace mame
{ {
bkey1 |= 0x10; bkey1 |= 0x10;
} }
if (Keyboard.IsPressed(Corekey.T)) if (Keyboard.IsPressed(MotionKey.UNKNOW_T)) //if (Keyboard.IsPressed(Corekey.T))
{ {
bkey2 &= unchecked((byte)~0x08); bkey2 &= unchecked((byte)~0x08);
} }
@ -401,7 +403,7 @@ namespace mame
{ {
bkey2 |= 0x08; bkey2 |= 0x08;
} }
if (Keyboard.IsPressed(Corekey.U)) if (Keyboard.IsPressed(MotionKey.P1_BTN_3))//if (Keyboard.IsPressed(Corekey.U))
{ {
bkey4 &= unchecked((byte)~0x02); bkey4 &= unchecked((byte)~0x02);
} }
@ -409,7 +411,7 @@ namespace mame
{ {
bkey4 |= 0x02; bkey4 |= 0x02;
} }
if (Keyboard.IsPressed(Corekey.W)) if (Keyboard.IsPressed(MotionKey.P1_UP))//if (Keyboard.IsPressed(Corekey.W))
{ {
bkey3 &= unchecked((byte)~0x08); bkey3 &= unchecked((byte)~0x08);
} }
@ -433,10 +435,12 @@ namespace mame
{ {
bkey2 |= 0x10; bkey2 |= 0x10;
} }
*/
} }
public static void loop_inputports_igs011_lhb2() public static void loop_inputports_igs011_lhb2()
{ {
if (Keyboard.IsPressed(Corekey.D5)) /*
if (Keyboard.IsPressed(MotionKey.P1_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D5))
{ {
sbytec &= ~0x10; sbytec &= ~0x10;
} }
@ -444,7 +448,7 @@ namespace mame
{ {
sbytec |= 0x10; sbytec |= 0x10;
} }
if (Keyboard.IsPressed(Corekey.D1)) if (Keyboard.IsPressed(MotionKey.P1_GAMESTART))//if (Keyboard.IsPressed(Corekey.D1))
{ {
bkey0 &= unchecked((byte)~0x20); bkey0 &= unchecked((byte)~0x20);
} }
@ -452,7 +456,7 @@ namespace mame
{ {
bkey0 |= 0x20; bkey0 |= 0x20;
} }
if (Keyboard.IsPressed(Corekey.D2)) if (Keyboard.IsPressed(MotionKey.P2_GAMESTART))//if (Keyboard.IsPressed(Corekey.D2))
{ {
bkey1 &= unchecked((byte)~0x20); bkey1 &= unchecked((byte)~0x20);
} }
@ -460,7 +464,7 @@ namespace mame
{ {
bkey1 |= 0x20; bkey1 |= 0x20;
} }
if (Keyboard.IsPressed(Corekey.A)) if (Keyboard.IsPressed(MotionKey.P1_LEFT))//if (Keyboard.IsPressed(Corekey.A))
{ {
bkey0 &= unchecked((byte)~0x01); bkey0 &= unchecked((byte)~0x01);
} }
@ -484,7 +488,7 @@ namespace mame
{ {
bkey2 |= 0x01; bkey2 |= 0x01;
} }
if (Keyboard.IsPressed(Corekey.D)) if (Keyboard.IsPressed(MotionKey.P1_RIGHT))//if (Keyboard.IsPressed(Corekey.D))
{ {
bkey3 &= unchecked((byte)~0x01); bkey3 &= unchecked((byte)~0x01);
} }
@ -524,7 +528,7 @@ namespace mame
{ {
bkey3 |= 0x02; bkey3 |= 0x02;
} }
if (Keyboard.IsPressed(Corekey.I)) if (Keyboard.IsPressed(MotionKey.P1_BTN_4))//if (Keyboard.IsPressed(Corekey.I))
{ {
bkey0 &= unchecked((byte)~0x04); bkey0 &= unchecked((byte)~0x04);
} }
@ -532,7 +536,7 @@ namespace mame
{ {
bkey0 |= 0x04; bkey0 |= 0x04;
} }
if (Keyboard.IsPressed(Corekey.J)) if (Keyboard.IsPressed(MotionKey.P1_BTN_1))//if (Keyboard.IsPressed(Corekey.J))
{ {
bkey1 &= unchecked((byte)~0x04); bkey1 &= unchecked((byte)~0x04);
} }
@ -540,7 +544,7 @@ namespace mame
{ {
bkey1 |= 0x04; bkey1 |= 0x04;
} }
if (Keyboard.IsPressed(Corekey.K)) if (Keyboard.IsPressed(MotionKey.P1_BTN_2))//if (Keyboard.IsPressed(Corekey.K))
{ {
bkey2 &= unchecked((byte)~0x04); bkey2 &= unchecked((byte)~0x04);
} }
@ -548,7 +552,7 @@ namespace mame
{ {
bkey2 |= 0x04; bkey2 |= 0x04;
} }
if (Keyboard.IsPressed(Corekey.L)) if (Keyboard.IsPressed(MotionKey.P1_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.L))
{ {
bkey3 &= unchecked((byte)~0x04); bkey3 &= unchecked((byte)~0x04);
} }
@ -556,7 +560,7 @@ namespace mame
{ {
bkey3 |= 0x04; bkey3 |= 0x04;
} }
if (Keyboard.IsPressed(Corekey.M)) if (Keyboard.IsPressed(MotionKey.UNKNOW_M))//if (Keyboard.IsPressed(Corekey.M))
{ {
bkey0 &= unchecked((byte)~0x08); bkey0 &= unchecked((byte)~0x08);
} }
@ -564,7 +568,7 @@ namespace mame
{ {
bkey0 |= 0x08; bkey0 |= 0x08;
} }
if (Keyboard.IsPressed(Corekey.N)) if (Keyboard.IsPressed(MotionKey.UNKNOW_N))//if (Keyboard.IsPressed(Corekey.N))
{ {
bkey1 &= unchecked((byte)~0x08); bkey1 &= unchecked((byte)~0x08);
} }
@ -572,7 +576,7 @@ namespace mame
{ {
bkey1 |= 0x08; bkey1 |= 0x08;
} }
if (Keyboard.IsPressed(Corekey.Q)) if (Keyboard.IsPressed(MotionKey.UNKNOW_Q))//if (Keyboard.IsPressed(Corekey.Q))
{ {
bkey0 &= unchecked((byte)~0x10); bkey0 &= unchecked((byte)~0x10);
} }
@ -580,7 +584,7 @@ namespace mame
{ {
bkey0 |= 0x10; bkey0 |= 0x10;
} }
if (Keyboard.IsPressed(Corekey.R)) if (Keyboard.IsPressed(MotionKey.UNKNOW_R)) //if (Keyboard.IsPressed(Corekey.R))
{ {
bkey1 &= unchecked((byte)~0x10); bkey1 &= unchecked((byte)~0x10);
} }
@ -588,7 +592,7 @@ namespace mame
{ {
bkey1 |= 0x10; bkey1 |= 0x10;
} }
if (Keyboard.IsPressed(Corekey.T)) if (Keyboard.IsPressed(MotionKey.UNKNOW_T)) //if (Keyboard.IsPressed(Corekey.T))
{ {
bkey2 &= unchecked((byte)~0x08); bkey2 &= unchecked((byte)~0x08);
} }
@ -596,7 +600,7 @@ namespace mame
{ {
bkey2 |= 0x08; bkey2 |= 0x08;
} }
if (Keyboard.IsPressed(Corekey.W)) if (Keyboard.IsPressed(MotionKey.P1_UP))//if (Keyboard.IsPressed(Corekey.W))
{ {
bkey3 &= unchecked((byte)~0x08); bkey3 &= unchecked((byte)~0x08);
} }
@ -612,6 +616,7 @@ namespace mame
{ {
bkey2 |= 0x10; bkey2 |= 0x10;
} }
*/
} }
public static void record_port_drgnwrld() public static void record_port_drgnwrld()
{ {

File diff suppressed because it is too large Load Diff

View File

@ -6,7 +6,7 @@ namespace mame
{ {
public static void loop_inputports_m72_common() public static void loop_inputports_m72_common()
{ {
if (Keyboard.IsPressed(Corekey.D5)) if (Keyboard.IsPressed(MotionKey.P1_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D5))
{ {
ushort1 &= unchecked((ushort)~0x0004); ushort1 &= unchecked((ushort)~0x0004);
} }
@ -14,7 +14,7 @@ namespace mame
{ {
ushort1 |= 0x0004; ushort1 |= 0x0004;
} }
if (Keyboard.IsPressed(Corekey.D6)) if (Keyboard.IsPressed(MotionKey.P2_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D6))
{ {
ushort1 &= unchecked((ushort)~0x0008); ushort1 &= unchecked((ushort)~0x0008);
} }
@ -22,7 +22,7 @@ namespace mame
{ {
ushort1 |= 0x0008; ushort1 |= 0x0008;
} }
if (Keyboard.IsPressed(Corekey.D1)) if (Keyboard.IsPressed(MotionKey.P1_GAMESTART))//if (Keyboard.IsPressed(Corekey.D1))
{ {
ushort1 &= unchecked((ushort)~0x0001); ushort1 &= unchecked((ushort)~0x0001);
} }
@ -30,7 +30,7 @@ namespace mame
{ {
ushort1 |= 0x0001; ushort1 |= 0x0001;
} }
if (Keyboard.IsPressed(Corekey.D2)) if (Keyboard.IsPressed(MotionKey.P2_GAMESTART))//if (Keyboard.IsPressed(Corekey.D2))
{ {
ushort1 &= unchecked((ushort)~0x0002); ushort1 &= unchecked((ushort)~0x0002);
} }
@ -38,7 +38,7 @@ namespace mame
{ {
ushort1 |= 0x0002; ushort1 |= 0x0002;
} }
if (Keyboard.IsPressed(Corekey.D)) if (Keyboard.IsPressed(MotionKey.P1_RIGHT))//if (Keyboard.IsPressed(Corekey.D))
{ {
ushort0 &= unchecked((ushort)~0x0001); ushort0 &= unchecked((ushort)~0x0001);
} }
@ -46,7 +46,7 @@ namespace mame
{ {
ushort0 |= 0x0001; ushort0 |= 0x0001;
} }
if (Keyboard.IsPressed(Corekey.A)) if (Keyboard.IsPressed(MotionKey.P1_LEFT))//if (Keyboard.IsPressed(Corekey.A))
{ {
ushort0 &= unchecked((ushort)~0x0002); ushort0 &= unchecked((ushort)~0x0002);
} }
@ -54,7 +54,7 @@ namespace mame
{ {
ushort0 |= 0x0002; ushort0 |= 0x0002;
} }
if (Keyboard.IsPressed(Corekey.S)) if (Keyboard.IsPressed(MotionKey.P1_DOWN))//if (Keyboard.IsPressed(Corekey.S))
{ {
ushort0 &= unchecked((ushort)~0x0004); ushort0 &= unchecked((ushort)~0x0004);
} }
@ -62,7 +62,7 @@ namespace mame
{ {
ushort0 |= 0x0004; ushort0 |= 0x0004;
} }
if (Keyboard.IsPressed(Corekey.W)) if (Keyboard.IsPressed(MotionKey.P1_UP))//if (Keyboard.IsPressed(Corekey.W))
{ {
ushort0 &= unchecked((ushort)~0x0008); ushort0 &= unchecked((ushort)~0x0008);
} }
@ -70,7 +70,7 @@ namespace mame
{ {
ushort0 |= 0x0008; ushort0 |= 0x0008;
} }
if (Keyboard.IsPressed(Corekey.J)) if (Keyboard.IsPressed(MotionKey.P1_BTN_1))//if (Keyboard.IsPressed(Corekey.J))
{ {
ushort0 &= unchecked((ushort)~0x0080); ushort0 &= unchecked((ushort)~0x0080);
} }
@ -78,7 +78,7 @@ namespace mame
{ {
ushort0 |= 0x0080; ushort0 |= 0x0080;
} }
if (Keyboard.IsPressed(Corekey.K)) if (Keyboard.IsPressed(MotionKey.P1_BTN_2))//if (Keyboard.IsPressed(Corekey.K))
{ {
ushort0 &= unchecked((ushort)~0x0040); ushort0 &= unchecked((ushort)~0x0040);
} }
@ -86,7 +86,7 @@ namespace mame
{ {
ushort0 |= 0x0040; ushort0 |= 0x0040;
} }
if (Keyboard.IsPressed(Corekey.U)) if (Keyboard.IsPressed(MotionKey.P1_BTN_3))//if (Keyboard.IsPressed(Corekey.U))
{ {
ushort0 &= unchecked((ushort)~0x0020); ushort0 &= unchecked((ushort)~0x0020);
} }
@ -94,7 +94,7 @@ namespace mame
{ {
ushort0 |= 0x0020; ushort0 |= 0x0020;
} }
if (Keyboard.IsPressed(Corekey.I)) if (Keyboard.IsPressed(MotionKey.P1_BTN_4))//if (Keyboard.IsPressed(Corekey.I))
{ {
ushort0 &= unchecked((ushort)~0x0010); ushort0 &= unchecked((ushort)~0x0010);
} }
@ -102,7 +102,7 @@ namespace mame
{ {
ushort0 |= 0x0010; ushort0 |= 0x0010;
} }
if (Keyboard.IsPressed(Corekey.Right)) if (Keyboard.IsPressed(MotionKey.P2_RIGHT))//if (Keyboard.IsPressed(Corekey.Right))
{ {
ushort0 &= unchecked((ushort)~0x0100); ushort0 &= unchecked((ushort)~0x0100);
} }
@ -110,7 +110,7 @@ namespace mame
{ {
ushort0 |= 0x0100; ushort0 |= 0x0100;
} }
if (Keyboard.IsPressed(Corekey.Left)) if (Keyboard.IsPressed(MotionKey.P2_LEFT))//if (Keyboard.IsPressed(Corekey.Left))
{ {
ushort0 &= unchecked((ushort)~0x0200); ushort0 &= unchecked((ushort)~0x0200);
} }
@ -118,7 +118,7 @@ namespace mame
{ {
ushort0 |= 0x0200; ushort0 |= 0x0200;
} }
if (Keyboard.IsPressed(Corekey.Down)) if (Keyboard.IsPressed(MotionKey.P2_DOWN)) //if (Keyboard.IsPressed(Corekey.Down))
{ {
ushort0 &= unchecked((ushort)~0x0400); ushort0 &= unchecked((ushort)~0x0400);
} }
@ -126,7 +126,7 @@ namespace mame
{ {
ushort0 |= 0x0400; ushort0 |= 0x0400;
} }
if (Keyboard.IsPressed(Corekey.Up)) if (Keyboard.IsPressed(MotionKey.P2_UP))//if (Keyboard.IsPressed(Corekey.Up))
{ {
ushort0 &= unchecked((ushort)~0x0800); ushort0 &= unchecked((ushort)~0x0800);
} }
@ -134,7 +134,7 @@ namespace mame
{ {
ushort0 |= 0x0800; ushort0 |= 0x0800;
} }
if (Keyboard.IsPressed(Corekey.NumPad1)) if (Keyboard.IsPressed(MotionKey.P2_BTN_1))//if (Keyboard.IsPressed(Corekey.NumPad1))
{ {
ushort0 &= unchecked((ushort)~0x8000); ushort0 &= unchecked((ushort)~0x8000);
} }
@ -142,7 +142,7 @@ namespace mame
{ {
ushort0 |= 0x8000; ushort0 |= 0x8000;
} }
if (Keyboard.IsPressed(Corekey.NumPad2)) if (Keyboard.IsPressed(MotionKey.P2_BTN_2))//if (Keyboard.IsPressed(Corekey.NumPad2))
{ {
ushort0 &= unchecked((ushort)~0x4000); ushort0 &= unchecked((ushort)~0x4000);
} }
@ -150,7 +150,7 @@ namespace mame
{ {
ushort0 |= 0x4000; ushort0 |= 0x4000;
} }
if (Keyboard.IsPressed(Corekey.NumPad4)) if (Keyboard.IsPressed(MotionKey.P2_BTN_3))//if (Keyboard.IsPressed(Corekey.NumPad4))
{ {
ushort0 &= unchecked((ushort)~0x2000); ushort0 &= unchecked((ushort)~0x2000);
} }
@ -158,7 +158,7 @@ namespace mame
{ {
ushort0 |= 0x2000; ushort0 |= 0x2000;
} }
if (Keyboard.IsPressed(Corekey.NumPad5)) if (Keyboard.IsPressed(MotionKey.P2_BTN_4))//if (Keyboard.IsPressed(Corekey.NumPad5))
{ {
ushort0 &= unchecked((ushort)~0x1000); ushort0 &= unchecked((ushort)~0x1000);
} }
@ -166,7 +166,7 @@ namespace mame
{ {
ushort0 |= 0x1000; ushort0 |= 0x1000;
} }
if (Keyboard.IsPressed(Corekey.R)) if (Keyboard.IsPressed(MotionKey.UNKNOW_R)) //if (Keyboard.IsPressed(Corekey.R))
{ {
ushort1 &= unchecked((ushort)~0x0010); ushort1 &= unchecked((ushort)~0x0010);
} }
@ -174,7 +174,7 @@ namespace mame
{ {
ushort1 |= 0x0010; ushort1 |= 0x0010;
} }
if (Keyboard.IsPressed(Corekey.T)) if (Keyboard.IsPressed(MotionKey.UNKNOW_T)) //if (Keyboard.IsPressed(Corekey.T))
{ {
ushort1 &= unchecked((ushort)~0x0020); ushort1 &= unchecked((ushort)~0x0020);
} }

View File

@ -6,7 +6,7 @@ namespace mame
{ {
public static void loop_inputports_m92_common() public static void loop_inputports_m92_common()
{ {
if (Keyboard.IsPressed(Corekey.D5)) if (Keyboard.IsPressed(MotionKey.P1_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D5))
{ {
ushort1 &= unchecked((ushort)~0x0004); ushort1 &= unchecked((ushort)~0x0004);
} }
@ -14,7 +14,7 @@ namespace mame
{ {
ushort1 |= 0x0004; ushort1 |= 0x0004;
} }
if (Keyboard.IsPressed(Corekey.D6)) if (Keyboard.IsPressed(MotionKey.P2_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D6))
{ {
ushort1 &= unchecked((ushort)~0x0008); ushort1 &= unchecked((ushort)~0x0008);
} }
@ -22,7 +22,7 @@ namespace mame
{ {
ushort1 |= 0x0008; ushort1 |= 0x0008;
} }
if (Keyboard.IsPressed(Corekey.D1)) if (Keyboard.IsPressed(MotionKey.P1_GAMESTART))//if (Keyboard.IsPressed(Corekey.D1))
{ {
ushort1 &= unchecked((ushort)~0x0001); ushort1 &= unchecked((ushort)~0x0001);
} }
@ -30,7 +30,7 @@ namespace mame
{ {
ushort1 |= 0x0001; ushort1 |= 0x0001;
} }
if (Keyboard.IsPressed(Corekey.D2)) if (Keyboard.IsPressed(MotionKey.P2_GAMESTART))//if (Keyboard.IsPressed(Corekey.D2))
{ {
ushort1 &= unchecked((ushort)~0x0002); ushort1 &= unchecked((ushort)~0x0002);
} }
@ -38,7 +38,7 @@ namespace mame
{ {
ushort1 |= 0x0002; ushort1 |= 0x0002;
} }
if (Keyboard.IsPressed(Corekey.D)) if (Keyboard.IsPressed(MotionKey.P1_RIGHT))//if (Keyboard.IsPressed(Corekey.D))
{ {
ushort0 &= unchecked((ushort)~0x0001); ushort0 &= unchecked((ushort)~0x0001);
} }
@ -46,7 +46,7 @@ namespace mame
{ {
ushort0 |= 0x0001; ushort0 |= 0x0001;
} }
if (Keyboard.IsPressed(Corekey.A)) if (Keyboard.IsPressed(MotionKey.P1_LEFT))//if (Keyboard.IsPressed(Corekey.A))
{ {
ushort0 &= unchecked((ushort)~0x0002); ushort0 &= unchecked((ushort)~0x0002);
} }
@ -54,7 +54,7 @@ namespace mame
{ {
ushort0 |= 0x0002; ushort0 |= 0x0002;
} }
if (Keyboard.IsPressed(Corekey.S)) if (Keyboard.IsPressed(MotionKey.P1_DOWN))//if (Keyboard.IsPressed(Corekey.S))
{ {
ushort0 &= unchecked((ushort)~0x0004); ushort0 &= unchecked((ushort)~0x0004);
} }
@ -62,7 +62,7 @@ namespace mame
{ {
ushort0 |= 0x0004; ushort0 |= 0x0004;
} }
if (Keyboard.IsPressed(Corekey.W)) if (Keyboard.IsPressed(MotionKey.P1_UP))//if (Keyboard.IsPressed(Corekey.W))
{ {
ushort0 &= unchecked((ushort)~0x0008); ushort0 &= unchecked((ushort)~0x0008);
} }
@ -70,7 +70,7 @@ namespace mame
{ {
ushort0 |= 0x0008; ushort0 |= 0x0008;
} }
if (Keyboard.IsPressed(Corekey.J)) if (Keyboard.IsPressed(MotionKey.P1_BTN_1))//if (Keyboard.IsPressed(Corekey.J))
{ {
ushort0 &= unchecked((ushort)~0x0080); ushort0 &= unchecked((ushort)~0x0080);
} }
@ -78,7 +78,7 @@ namespace mame
{ {
ushort0 |= 0x0080; ushort0 |= 0x0080;
} }
if (Keyboard.IsPressed(Corekey.K)) if (Keyboard.IsPressed(MotionKey.P1_BTN_2))//if (Keyboard.IsPressed(Corekey.K))
{ {
ushort0 &= unchecked((ushort)~0x0040); ushort0 &= unchecked((ushort)~0x0040);
} }
@ -86,7 +86,7 @@ namespace mame
{ {
ushort0 |= 0x0040; ushort0 |= 0x0040;
} }
if (Keyboard.IsPressed(Corekey.U)) if (Keyboard.IsPressed(MotionKey.P1_BTN_3))//if (Keyboard.IsPressed(Corekey.U))
{ {
ushort0 &= unchecked((ushort)~0x0020); ushort0 &= unchecked((ushort)~0x0020);
} }
@ -94,7 +94,7 @@ namespace mame
{ {
ushort0 |= 0x0020; ushort0 |= 0x0020;
} }
if (Keyboard.IsPressed(Corekey.I)) if (Keyboard.IsPressed(MotionKey.P1_BTN_4))//if (Keyboard.IsPressed(Corekey.I))
{ {
ushort0 &= unchecked((ushort)~0x0010); ushort0 &= unchecked((ushort)~0x0010);
} }
@ -102,7 +102,7 @@ namespace mame
{ {
ushort0 |= 0x0010; ushort0 |= 0x0010;
} }
if (Keyboard.IsPressed(Corekey.Right)) if (Keyboard.IsPressed(MotionKey.P2_RIGHT))//if (Keyboard.IsPressed(Corekey.Right))
{ {
ushort0 &= unchecked((ushort)~0x0100); ushort0 &= unchecked((ushort)~0x0100);
} }
@ -110,7 +110,7 @@ namespace mame
{ {
ushort0 |= 0x0100; ushort0 |= 0x0100;
} }
if (Keyboard.IsPressed(Corekey.Left)) if (Keyboard.IsPressed(MotionKey.P2_LEFT))//if (Keyboard.IsPressed(Corekey.Left))
{ {
ushort0 &= unchecked((ushort)~0x0200); ushort0 &= unchecked((ushort)~0x0200);
} }
@ -118,7 +118,7 @@ namespace mame
{ {
ushort0 |= 0x0200; ushort0 |= 0x0200;
} }
if (Keyboard.IsPressed(Corekey.Down)) if (Keyboard.IsPressed(MotionKey.P2_DOWN)) //if (Keyboard.IsPressed(Corekey.Down))
{ {
ushort0 &= unchecked((ushort)~0x0400); ushort0 &= unchecked((ushort)~0x0400);
} }
@ -126,7 +126,7 @@ namespace mame
{ {
ushort0 |= 0x0400; ushort0 |= 0x0400;
} }
if (Keyboard.IsPressed(Corekey.Up)) if (Keyboard.IsPressed(MotionKey.P2_UP))//if (Keyboard.IsPressed(Corekey.Up))
{ {
ushort0 &= unchecked((ushort)~0x0800); ushort0 &= unchecked((ushort)~0x0800);
} }
@ -134,7 +134,7 @@ namespace mame
{ {
ushort0 |= 0x0800; ushort0 |= 0x0800;
} }
if (Keyboard.IsPressed(Corekey.NumPad1)) if (Keyboard.IsPressed(MotionKey.P2_BTN_1))//if (Keyboard.IsPressed(Corekey.NumPad1))
{ {
ushort0 &= unchecked((ushort)~0x8000); ushort0 &= unchecked((ushort)~0x8000);
} }
@ -142,7 +142,7 @@ namespace mame
{ {
ushort0 |= 0x8000; ushort0 |= 0x8000;
} }
if (Keyboard.IsPressed(Corekey.NumPad2)) if (Keyboard.IsPressed(MotionKey.P2_BTN_2))//if (Keyboard.IsPressed(Corekey.NumPad2))
{ {
ushort0 &= unchecked((ushort)~0x4000); ushort0 &= unchecked((ushort)~0x4000);
} }
@ -150,7 +150,7 @@ namespace mame
{ {
ushort0 |= 0x4000; ushort0 |= 0x4000;
} }
if (Keyboard.IsPressed(Corekey.NumPad4)) if (Keyboard.IsPressed(MotionKey.P2_BTN_3))//if (Keyboard.IsPressed(Corekey.NumPad4))
{ {
ushort0 &= unchecked((ushort)~0x2000); ushort0 &= unchecked((ushort)~0x2000);
} }
@ -158,7 +158,7 @@ namespace mame
{ {
ushort0 |= 0x2000; ushort0 |= 0x2000;
} }
if (Keyboard.IsPressed(Corekey.NumPad5)) if (Keyboard.IsPressed(MotionKey.P2_BTN_4))//if (Keyboard.IsPressed(Corekey.NumPad5))
{ {
ushort0 &= unchecked((ushort)~0x1000); ushort0 &= unchecked((ushort)~0x1000);
} }
@ -166,7 +166,7 @@ namespace mame
{ {
ushort0 |= 0x1000; ushort0 |= 0x1000;
} }
if (Keyboard.IsPressed(Corekey.R)) if (Keyboard.IsPressed(MotionKey.UNKNOW_R)) //if (Keyboard.IsPressed(Corekey.R))
{ {
ushort1 &= unchecked((ushort)~0x0010); ushort1 &= unchecked((ushort)~0x0010);
} }
@ -174,7 +174,7 @@ namespace mame
{ {
ushort1 |= 0x0010; ushort1 |= 0x0010;
} }
if (Keyboard.IsPressed(Corekey.T)) if (Keyboard.IsPressed(MotionKey.UNKNOW_T)) //if (Keyboard.IsPressed(Corekey.T))
{ {
ushort1 &= unchecked((ushort)~0x0020); ushort1 &= unchecked((ushort)~0x0020);
} }

View File

@ -6,7 +6,7 @@ namespace mame
{ {
public static void loop_inputports_ns1_3b() public static void loop_inputports_ns1_3b()
{ {
if (Keyboard.IsPressed(Corekey.D5)) if (Keyboard.IsPressed(MotionKey.P1_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D5))
{ {
byte2 &= unchecked((byte)~0x10); byte2 &= unchecked((byte)~0x10);
} }
@ -14,7 +14,7 @@ namespace mame
{ {
byte2 |= 0x10; byte2 |= 0x10;
} }
if (Keyboard.IsPressed(Corekey.D6)) if (Keyboard.IsPressed(MotionKey.P2_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D6))
{ {
byte2 &= unchecked((byte)~0x08); byte2 &= unchecked((byte)~0x08);
} }
@ -22,7 +22,7 @@ namespace mame
{ {
byte2 |= 0x08; byte2 |= 0x08;
} }
if (Keyboard.IsPressed(Corekey.D1)) if (Keyboard.IsPressed(MotionKey.P1_GAMESTART))//if (Keyboard.IsPressed(Corekey.D1))
{ {
byte0 &= unchecked((byte)~0x80); byte0 &= unchecked((byte)~0x80);
} }
@ -30,7 +30,7 @@ namespace mame
{ {
byte0 |= 0x80; byte0 |= 0x80;
} }
if (Keyboard.IsPressed(Corekey.D2)) if (Keyboard.IsPressed(MotionKey.P2_GAMESTART))//if (Keyboard.IsPressed(Corekey.D2))
{ {
byte1 &= unchecked((byte)~0x80); byte1 &= unchecked((byte)~0x80);
} }
@ -38,7 +38,7 @@ namespace mame
{ {
byte1 |= 0x80; byte1 |= 0x80;
} }
if (Keyboard.IsPressed(Corekey.D)) if (Keyboard.IsPressed(MotionKey.P1_RIGHT))//if (Keyboard.IsPressed(Corekey.D))
{ {
byte0 &= unchecked((byte)~0x01); byte0 &= unchecked((byte)~0x01);
} }
@ -46,7 +46,7 @@ namespace mame
{ {
byte0 |= 0x01; byte0 |= 0x01;
} }
if (Keyboard.IsPressed(Corekey.A)) if (Keyboard.IsPressed(MotionKey.P1_LEFT))//if (Keyboard.IsPressed(Corekey.A))
{ {
byte0 &= unchecked((byte)~0x02); byte0 &= unchecked((byte)~0x02);
} }
@ -54,7 +54,7 @@ namespace mame
{ {
byte0 |= 0x02; byte0 |= 0x02;
} }
if (Keyboard.IsPressed(Corekey.S)) if (Keyboard.IsPressed(MotionKey.P1_DOWN))//if (Keyboard.IsPressed(Corekey.S))
{ {
byte0 &= unchecked((byte)~0x04); byte0 &= unchecked((byte)~0x04);
} }
@ -62,7 +62,7 @@ namespace mame
{ {
byte0 |= 0x04; byte0 |= 0x04;
} }
if (Keyboard.IsPressed(Corekey.W)) if (Keyboard.IsPressed(MotionKey.P1_UP))//if (Keyboard.IsPressed(Corekey.W))
{ {
byte0 &= unchecked((byte)~0x08); byte0 &= unchecked((byte)~0x08);
} }
@ -70,7 +70,7 @@ namespace mame
{ {
byte0 |= 0x08; byte0 |= 0x08;
} }
if (Keyboard.IsPressed(Corekey.J)) if (Keyboard.IsPressed(MotionKey.P1_BTN_1))//if (Keyboard.IsPressed(Corekey.J))
{ {
byte0 &= unchecked((byte)~0x10); byte0 &= unchecked((byte)~0x10);
} }
@ -78,7 +78,7 @@ namespace mame
{ {
byte0 |= 0x10; byte0 |= 0x10;
} }
if (Keyboard.IsPressed(Corekey.K)) if (Keyboard.IsPressed(MotionKey.P1_BTN_2))//if (Keyboard.IsPressed(Corekey.K))
{ {
byte0 &= unchecked((byte)~0x20); byte0 &= unchecked((byte)~0x20);
} }
@ -86,7 +86,7 @@ namespace mame
{ {
byte0 |= 0x20; byte0 |= 0x20;
} }
if (Keyboard.IsPressed(Corekey.L)) if (Keyboard.IsPressed(MotionKey.P1_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.L))
{ {
byte0 &= unchecked((byte)~0x40); byte0 &= unchecked((byte)~0x40);
} }
@ -94,7 +94,7 @@ namespace mame
{ {
byte0 |= 0x40; byte0 |= 0x40;
} }
if (Keyboard.IsPressed(Corekey.Right)) if (Keyboard.IsPressed(MotionKey.P2_RIGHT))//if (Keyboard.IsPressed(Corekey.Right))
{ {
byte1 &= unchecked((byte)~0x01); byte1 &= unchecked((byte)~0x01);
} }
@ -102,7 +102,7 @@ namespace mame
{ {
byte1 |= 0x01; byte1 |= 0x01;
} }
if (Keyboard.IsPressed(Corekey.Left)) if (Keyboard.IsPressed(MotionKey.P2_LEFT))//if (Keyboard.IsPressed(Corekey.Left))
{ {
byte1 &= unchecked((byte)~0x02); byte1 &= unchecked((byte)~0x02);
} }
@ -110,7 +110,7 @@ namespace mame
{ {
byte1 |= 0x02; byte1 |= 0x02;
} }
if (Keyboard.IsPressed(Corekey.Down)) if (Keyboard.IsPressed(MotionKey.P2_DOWN)) //if (Keyboard.IsPressed(Corekey.Down))
{ {
byte1 &= unchecked((byte)~0x04); byte1 &= unchecked((byte)~0x04);
} }
@ -118,7 +118,7 @@ namespace mame
{ {
byte1 |= 0x04; byte1 |= 0x04;
} }
if (Keyboard.IsPressed(Corekey.Up)) if (Keyboard.IsPressed(MotionKey.P2_UP))//if (Keyboard.IsPressed(Corekey.Up))
{ {
byte1 &= unchecked((byte)~0x08); byte1 &= unchecked((byte)~0x08);
} }
@ -126,7 +126,7 @@ namespace mame
{ {
byte1 |= 0x08; byte1 |= 0x08;
} }
if (Keyboard.IsPressed(Corekey.NumPad1)) if (Keyboard.IsPressed(MotionKey.P2_BTN_1))//if (Keyboard.IsPressed(Corekey.NumPad1))
{ {
byte1 &= unchecked((byte)~0x10); byte1 &= unchecked((byte)~0x10);
} }
@ -134,7 +134,7 @@ namespace mame
{ {
byte1 |= 0x10; byte1 |= 0x10;
} }
if (Keyboard.IsPressed(Corekey.NumPad2)) if (Keyboard.IsPressed(MotionKey.P2_BTN_2))//if (Keyboard.IsPressed(Corekey.NumPad2))
{ {
byte1 &= unchecked((byte)~0x20); byte1 &= unchecked((byte)~0x20);
} }
@ -142,7 +142,7 @@ namespace mame
{ {
byte1 |= 0x20; byte1 |= 0x20;
} }
if (Keyboard.IsPressed(Corekey.NumPad3)) if (Keyboard.IsPressed(MotionKey.P2_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.NumPad3))
{ {
byte1 &= unchecked((byte)~0x40); byte1 &= unchecked((byte)~0x40);
} }
@ -150,7 +150,7 @@ namespace mame
{ {
byte1 |= 0x40; byte1 |= 0x40;
} }
if (Keyboard.IsPressed(Corekey.R)) if (Keyboard.IsPressed(MotionKey.UNKNOW_R)) //if (Keyboard.IsPressed(Corekey.R))
{ {
byte2 &= unchecked((byte)~0x20); byte2 &= unchecked((byte)~0x20);
} }
@ -158,7 +158,7 @@ namespace mame
{ {
byte2 |= 0x20; byte2 |= 0x20;
} }
if (Keyboard.IsPressed(Corekey.T)) if (Keyboard.IsPressed(MotionKey.UNKNOW_T)) //if (Keyboard.IsPressed(Corekey.T))
{ {
byte2 &= unchecked((byte)~0x40); byte2 &= unchecked((byte)~0x40);
} }
@ -169,7 +169,7 @@ namespace mame
} }
public static void loop_inputports_ns1_quester() public static void loop_inputports_ns1_quester()
{ {
if (Keyboard.IsPressed(Corekey.D5)) if (Keyboard.IsPressed(MotionKey.P1_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D5))
{ {
byte2 &= unchecked((byte)~0x10); byte2 &= unchecked((byte)~0x10);
} }
@ -177,7 +177,7 @@ namespace mame
{ {
byte2 |= 0x10; byte2 |= 0x10;
} }
if (Keyboard.IsPressed(Corekey.D6)) if (Keyboard.IsPressed(MotionKey.P2_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D6))
{ {
byte2 &= unchecked((byte)~0x08); byte2 &= unchecked((byte)~0x08);
} }
@ -185,7 +185,7 @@ namespace mame
{ {
byte2 |= 0x08; byte2 |= 0x08;
} }
if (Keyboard.IsPressed(Corekey.D1)) if (Keyboard.IsPressed(MotionKey.P1_GAMESTART))//if (Keyboard.IsPressed(Corekey.D1))
{ {
byte0 &= unchecked((byte)~0x80); byte0 &= unchecked((byte)~0x80);
} }
@ -193,7 +193,7 @@ namespace mame
{ {
byte0 |= 0x80; byte0 |= 0x80;
} }
if (Keyboard.IsPressed(Corekey.D2)) if (Keyboard.IsPressed(MotionKey.P2_GAMESTART))//if (Keyboard.IsPressed(Corekey.D2))
{ {
byte1 &= unchecked((byte)~0x80); byte1 &= unchecked((byte)~0x80);
} }
@ -201,7 +201,7 @@ namespace mame
{ {
byte1 |= 0x80; byte1 |= 0x80;
} }
if (Keyboard.IsPressed(Corekey.J)) if (Keyboard.IsPressed(MotionKey.P1_BTN_1))//if (Keyboard.IsPressed(Corekey.J))
{ {
byte0 &= unchecked((byte)~0x10); byte0 &= unchecked((byte)~0x10);
} }
@ -209,7 +209,7 @@ namespace mame
{ {
byte0 |= 0x10; byte0 |= 0x10;
} }
if (Keyboard.IsPressed(Corekey.K)) if (Keyboard.IsPressed(MotionKey.P1_BTN_2))//if (Keyboard.IsPressed(Corekey.K))
{ {
byte0 &= unchecked((byte)~0x20); byte0 &= unchecked((byte)~0x20);
} }
@ -217,7 +217,7 @@ namespace mame
{ {
byte0 |= 0x20; byte0 |= 0x20;
} }
if (Keyboard.IsPressed(Corekey.L)) if (Keyboard.IsPressed(MotionKey.P1_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.L))
{ {
byte0 &= unchecked((byte)~0x40); byte0 &= unchecked((byte)~0x40);
} }
@ -225,7 +225,7 @@ namespace mame
{ {
byte0 |= 0x40; byte0 |= 0x40;
} }
if (Keyboard.IsPressed(Corekey.NumPad1)) if (Keyboard.IsPressed(MotionKey.P2_BTN_1))//if (Keyboard.IsPressed(Corekey.NumPad1))
{ {
byte1 &= unchecked((byte)~0x10); byte1 &= unchecked((byte)~0x10);
} }
@ -233,7 +233,7 @@ namespace mame
{ {
byte1 |= 0x10; byte1 |= 0x10;
} }
if (Keyboard.IsPressed(Corekey.NumPad2)) if (Keyboard.IsPressed(MotionKey.P2_BTN_2))//if (Keyboard.IsPressed(Corekey.NumPad2))
{ {
byte1 &= unchecked((byte)~0x20); byte1 &= unchecked((byte)~0x20);
} }
@ -241,7 +241,7 @@ namespace mame
{ {
byte1 |= 0x20; byte1 |= 0x20;
} }
if (Keyboard.IsPressed(Corekey.NumPad3)) if (Keyboard.IsPressed(MotionKey.P2_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.NumPad3))
{ {
byte1 &= unchecked((byte)~0x40); byte1 &= unchecked((byte)~0x40);
} }
@ -249,7 +249,7 @@ namespace mame
{ {
byte1 |= 0x40; byte1 |= 0x40;
} }
if (Keyboard.IsPressed(Corekey.R)) if (Keyboard.IsPressed(MotionKey.UNKNOW_R)) //if (Keyboard.IsPressed(Corekey.R))
{ {
byte2 &= unchecked((byte)~0x20); byte2 &= unchecked((byte)~0x20);
} }
@ -257,7 +257,7 @@ namespace mame
{ {
byte2 |= 0x20; byte2 |= 0x20;
} }
if (Keyboard.IsPressed(Corekey.T)) if (Keyboard.IsPressed(MotionKey.UNKNOW_T)) //if (Keyboard.IsPressed(Corekey.T))
{ {
byte2 &= unchecked((byte)~0x40); byte2 &= unchecked((byte)~0x40);
} }
@ -270,7 +270,7 @@ namespace mame
} }
public static void loop_inputports_ns1_berabohm() public static void loop_inputports_ns1_berabohm()
{ {
if (Keyboard.IsPressed(Corekey.D5)) if (Keyboard.IsPressed(MotionKey.P1_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D5))
{ {
byte2 &= unchecked((byte)~0x10); byte2 &= unchecked((byte)~0x10);
} }
@ -278,7 +278,7 @@ namespace mame
{ {
byte2 |= 0x10; byte2 |= 0x10;
} }
if (Keyboard.IsPressed(Corekey.D6)) if (Keyboard.IsPressed(MotionKey.P2_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D6))
{ {
byte2 &= unchecked((byte)~0x08); byte2 &= unchecked((byte)~0x08);
} }
@ -286,7 +286,7 @@ namespace mame
{ {
byte2 |= 0x08; byte2 |= 0x08;
} }
if (Keyboard.IsPressed(Corekey.D1)) if (Keyboard.IsPressed(MotionKey.P1_GAMESTART))//if (Keyboard.IsPressed(Corekey.D1))
{ {
byte0 &= unchecked((byte)~0x80); byte0 &= unchecked((byte)~0x80);
} }
@ -294,7 +294,7 @@ namespace mame
{ {
byte0 |= 0x80; byte0 |= 0x80;
} }
if (Keyboard.IsPressed(Corekey.D2)) if (Keyboard.IsPressed(MotionKey.P2_GAMESTART))//if (Keyboard.IsPressed(Corekey.D2))
{ {
byte1 &= unchecked((byte)~0x80); byte1 &= unchecked((byte)~0x80);
} }
@ -302,7 +302,7 @@ namespace mame
{ {
byte1 |= 0x80; byte1 |= 0x80;
} }
if (Keyboard.IsPressed(Corekey.D)) if (Keyboard.IsPressed(MotionKey.P1_RIGHT))//if (Keyboard.IsPressed(Corekey.D))
{ {
byte0 &= unchecked((byte)~0x01); byte0 &= unchecked((byte)~0x01);
} }
@ -310,7 +310,7 @@ namespace mame
{ {
byte0 |= 0x01; byte0 |= 0x01;
} }
if (Keyboard.IsPressed(Corekey.A)) if (Keyboard.IsPressed(MotionKey.P1_LEFT))//if (Keyboard.IsPressed(Corekey.A))
{ {
byte0 &= unchecked((byte)~0x02); byte0 &= unchecked((byte)~0x02);
} }
@ -318,7 +318,7 @@ namespace mame
{ {
byte0 |= 0x02; byte0 |= 0x02;
} }
if (Keyboard.IsPressed(Corekey.S)) if (Keyboard.IsPressed(MotionKey.P1_DOWN))//if (Keyboard.IsPressed(Corekey.S))
{ {
byte0 &= unchecked((byte)~0x04); byte0 &= unchecked((byte)~0x04);
} }
@ -326,7 +326,7 @@ namespace mame
{ {
byte0 |= 0x04; byte0 |= 0x04;
} }
if (Keyboard.IsPressed(Corekey.W)) if (Keyboard.IsPressed(MotionKey.P1_UP))//if (Keyboard.IsPressed(Corekey.W))
{ {
byte0 &= unchecked((byte)~0x08); byte0 &= unchecked((byte)~0x08);
} }
@ -334,7 +334,7 @@ namespace mame
{ {
byte0 |= 0x08; byte0 |= 0x08;
} }
if (Keyboard.IsPressed(Corekey.J)) if (Keyboard.IsPressed(MotionKey.P1_BTN_1))//if (Keyboard.IsPressed(Corekey.J))
{ {
byte01 |= 0x01; byte01 |= 0x01;
} }
@ -342,7 +342,7 @@ namespace mame
{ {
byte01 &= unchecked((byte)~0x01); byte01 &= unchecked((byte)~0x01);
} }
if (Keyboard.IsPressed(Corekey.K)) if (Keyboard.IsPressed(MotionKey.P1_BTN_2))//if (Keyboard.IsPressed(Corekey.K))
{ {
byte01 |= 0x02; byte01 |= 0x02;
} }
@ -350,7 +350,7 @@ namespace mame
{ {
byte01 &= unchecked((byte)~0x02); byte01 &= unchecked((byte)~0x02);
} }
if (Keyboard.IsPressed(Corekey.L)) if (Keyboard.IsPressed(MotionKey.P1_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.L))
{ {
byte01 |= 0x04; byte01 |= 0x04;
} }
@ -358,7 +358,7 @@ namespace mame
{ {
byte01 &= unchecked((byte)~0x04); byte01 &= unchecked((byte)~0x04);
} }
if (Keyboard.IsPressed(Corekey.U)) if (Keyboard.IsPressed(MotionKey.P1_BTN_3))//if (Keyboard.IsPressed(Corekey.U))
{ {
byte00 |= 0x01; byte00 |= 0x01;
} }
@ -366,7 +366,7 @@ namespace mame
{ {
byte00 &= unchecked((byte)~0x01); byte00 &= unchecked((byte)~0x01);
} }
if (Keyboard.IsPressed(Corekey.I)) if (Keyboard.IsPressed(MotionKey.P1_BTN_4))//if (Keyboard.IsPressed(Corekey.I))
{ {
byte00 |= 0x02; byte00 |= 0x02;
} }
@ -374,7 +374,7 @@ namespace mame
{ {
byte00 &= unchecked((byte)~0x02); byte00 &= unchecked((byte)~0x02);
} }
if (Keyboard.IsPressed(Corekey.O)) if (Keyboard.IsPressed(MotionKey.P1_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.O))
{ {
byte00 |= 0x04; byte00 |= 0x04;
} }
@ -382,7 +382,7 @@ namespace mame
{ {
byte00 &= unchecked((byte)~0x04); byte00 &= unchecked((byte)~0x04);
} }
if (Keyboard.IsPressed(Corekey.Right)) if (Keyboard.IsPressed(MotionKey.P2_RIGHT))//if (Keyboard.IsPressed(Corekey.Right))
{ {
byte1 &= unchecked((byte)~0x01); byte1 &= unchecked((byte)~0x01);
} }
@ -390,7 +390,7 @@ namespace mame
{ {
byte1 |= 0x01; byte1 |= 0x01;
} }
if (Keyboard.IsPressed(Corekey.Left)) if (Keyboard.IsPressed(MotionKey.P2_LEFT))//if (Keyboard.IsPressed(Corekey.Left))
{ {
byte1 &= unchecked((byte)~0x02); byte1 &= unchecked((byte)~0x02);
} }
@ -398,7 +398,7 @@ namespace mame
{ {
byte1 |= 0x02; byte1 |= 0x02;
} }
if (Keyboard.IsPressed(Corekey.Down)) if (Keyboard.IsPressed(MotionKey.P2_DOWN)) //if (Keyboard.IsPressed(Corekey.Down))
{ {
byte1 &= unchecked((byte)~0x04); byte1 &= unchecked((byte)~0x04);
} }
@ -406,7 +406,7 @@ namespace mame
{ {
byte1 |= 0x04; byte1 |= 0x04;
} }
if (Keyboard.IsPressed(Corekey.Up)) if (Keyboard.IsPressed(MotionKey.P2_UP))//if (Keyboard.IsPressed(Corekey.Up))
{ {
byte1 &= unchecked((byte)~0x08); byte1 &= unchecked((byte)~0x08);
} }
@ -414,7 +414,7 @@ namespace mame
{ {
byte1 |= 0x08; byte1 |= 0x08;
} }
if (Keyboard.IsPressed(Corekey.NumPad1)) if (Keyboard.IsPressed(MotionKey.P2_BTN_1))//if (Keyboard.IsPressed(Corekey.NumPad1))
{ {
byte03 |= 0x01; byte03 |= 0x01;
} }
@ -422,7 +422,7 @@ namespace mame
{ {
byte03 &= unchecked((byte)~0x01); byte03 &= unchecked((byte)~0x01);
} }
if (Keyboard.IsPressed(Corekey.NumPad2)) if (Keyboard.IsPressed(MotionKey.P2_BTN_2))//if (Keyboard.IsPressed(Corekey.NumPad2))
{ {
byte03 |= 0x02; byte03 |= 0x02;
} }
@ -430,7 +430,7 @@ namespace mame
{ {
byte03 &= unchecked((byte)~0x02); byte03 &= unchecked((byte)~0x02);
} }
if (Keyboard.IsPressed(Corekey.NumPad3)) if (Keyboard.IsPressed(MotionKey.P2_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.NumPad3))
{ {
byte03 |= 0x04; byte03 |= 0x04;
} }
@ -438,7 +438,7 @@ namespace mame
{ {
byte03 &= unchecked((byte)~0x04); byte03 &= unchecked((byte)~0x04);
} }
if (Keyboard.IsPressed(Corekey.NumPad4)) if (Keyboard.IsPressed(MotionKey.P2_BTN_3))//if (Keyboard.IsPressed(Corekey.NumPad4))
{ {
byte02 |= 0x01; byte02 |= 0x01;
} }
@ -446,7 +446,7 @@ namespace mame
{ {
byte02 &= unchecked((byte)~0x01); byte02 &= unchecked((byte)~0x01);
} }
if (Keyboard.IsPressed(Corekey.NumPad5)) if (Keyboard.IsPressed(MotionKey.P2_BTN_4))//if (Keyboard.IsPressed(Corekey.NumPad5))
{ {
byte02 |= 0x02; byte02 |= 0x02;
} }
@ -454,7 +454,7 @@ namespace mame
{ {
byte02 &= unchecked((byte)~0x02); byte02 &= unchecked((byte)~0x02);
} }
if (Keyboard.IsPressed(Corekey.NumPad6)) if (Keyboard.IsPressed(MotionKey.P2_UNKNOW_F))//if (Keyboard.IsPressed(Corekey.NumPad6))
{ {
byte02 |= 0x04; byte02 |= 0x04;
} }
@ -462,7 +462,7 @@ namespace mame
{ {
byte02 &= unchecked((byte)~0x04); byte02 &= unchecked((byte)~0x04);
} }
if (Keyboard.IsPressed(Corekey.R)) if (Keyboard.IsPressed(MotionKey.UNKNOW_R)) //if (Keyboard.IsPressed(Corekey.R))
{ {
byte2 &= unchecked((byte)~0x20); byte2 &= unchecked((byte)~0x20);
} }
@ -470,7 +470,7 @@ namespace mame
{ {
byte2 |= 0x20; byte2 |= 0x20;
} }
if (Keyboard.IsPressed(Corekey.T)) if (Keyboard.IsPressed(MotionKey.UNKNOW_T)) //if (Keyboard.IsPressed(Corekey.T))
{ {
byte2 &= unchecked((byte)~0x40); byte2 &= unchecked((byte)~0x40);
} }
@ -481,7 +481,7 @@ namespace mame
} }
public static void loop_inputports_ns1_faceoff() public static void loop_inputports_ns1_faceoff()
{ {
if (Keyboard.IsPressed(Corekey.D5)) if (Keyboard.IsPressed(MotionKey.P1_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D5))
{ {
byte2 &= unchecked((byte)~0x10); byte2 &= unchecked((byte)~0x10);
} }
@ -489,7 +489,7 @@ namespace mame
{ {
byte2 |= 0x10; byte2 |= 0x10;
} }
if (Keyboard.IsPressed(Corekey.D6)) if (Keyboard.IsPressed(MotionKey.P2_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D6))
{ {
byte2 &= unchecked((byte)~0x08); byte2 &= unchecked((byte)~0x08);
} }
@ -497,7 +497,7 @@ namespace mame
{ {
byte2 |= 0x08; byte2 |= 0x08;
} }
if (Keyboard.IsPressed(Corekey.D1)) if (Keyboard.IsPressed(MotionKey.P1_GAMESTART))//if (Keyboard.IsPressed(Corekey.D1))
{ {
byte0 &= unchecked((byte)~0x80); byte0 &= unchecked((byte)~0x80);
} }
@ -505,7 +505,7 @@ namespace mame
{ {
byte0 |= 0x80; byte0 |= 0x80;
} }
if (Keyboard.IsPressed(Corekey.D2)) if (Keyboard.IsPressed(MotionKey.P2_GAMESTART))//if (Keyboard.IsPressed(Corekey.D2))
{ {
byte1 &= unchecked((byte)~0x80); byte1 &= unchecked((byte)~0x80);
} }
@ -513,7 +513,7 @@ namespace mame
{ {
byte1 |= 0x80; byte1 |= 0x80;
} }
if (Keyboard.IsPressed(Corekey.D)) if (Keyboard.IsPressed(MotionKey.P1_RIGHT))//if (Keyboard.IsPressed(Corekey.D))
{ {
byte00 &= unchecked((byte)~0x01); byte00 &= unchecked((byte)~0x01);
} }
@ -521,7 +521,7 @@ namespace mame
{ {
byte00 |= 0x01; byte00 |= 0x01;
} }
if (Keyboard.IsPressed(Corekey.A)) if (Keyboard.IsPressed(MotionKey.P1_LEFT))//if (Keyboard.IsPressed(Corekey.A))
{ {
byte00 &= unchecked((byte)~0x02); byte00 &= unchecked((byte)~0x02);
} }
@ -529,7 +529,7 @@ namespace mame
{ {
byte00 |= 0x02; byte00 |= 0x02;
} }
if (Keyboard.IsPressed(Corekey.S)) if (Keyboard.IsPressed(MotionKey.P1_DOWN))//if (Keyboard.IsPressed(Corekey.S))
{ {
byte00 &= unchecked((byte)~0x04); byte00 &= unchecked((byte)~0x04);
} }
@ -537,7 +537,7 @@ namespace mame
{ {
byte00 |= 0x04; byte00 |= 0x04;
} }
if (Keyboard.IsPressed(Corekey.W)) if (Keyboard.IsPressed(MotionKey.P1_UP))//if (Keyboard.IsPressed(Corekey.W))
{ {
byte00 &= unchecked((byte)~0x08); byte00 &= unchecked((byte)~0x08);
} }
@ -545,7 +545,7 @@ namespace mame
{ {
byte00 |= 0x08; byte00 |= 0x08;
} }
if (Keyboard.IsPressed(Corekey.J)) if (Keyboard.IsPressed(MotionKey.P1_BTN_1))//if (Keyboard.IsPressed(Corekey.J))
{ {
byte00 &= unchecked((byte)~0x10); byte00 &= unchecked((byte)~0x10);
} }
@ -553,7 +553,7 @@ namespace mame
{ {
byte00 |= 0x10; byte00 |= 0x10;
} }
if (Keyboard.IsPressed(Corekey.K)) if (Keyboard.IsPressed(MotionKey.P1_BTN_2))//if (Keyboard.IsPressed(Corekey.K))
{ {
byte01 &= unchecked((byte)~0x10); byte01 &= unchecked((byte)~0x10);
} }
@ -561,7 +561,7 @@ namespace mame
{ {
byte01 |= 0x10; byte01 |= 0x10;
} }
if (Keyboard.IsPressed(Corekey.Right)) if (Keyboard.IsPressed(MotionKey.P2_RIGHT))//if (Keyboard.IsPressed(Corekey.Right))
{ {
byte01 &= unchecked((byte)~0x01); byte01 &= unchecked((byte)~0x01);
} }
@ -569,7 +569,7 @@ namespace mame
{ {
byte01 |= 0x01; byte01 |= 0x01;
} }
if (Keyboard.IsPressed(Corekey.Left)) if (Keyboard.IsPressed(MotionKey.P2_LEFT))//if (Keyboard.IsPressed(Corekey.Left))
{ {
byte01 &= unchecked((byte)~0x02); byte01 &= unchecked((byte)~0x02);
} }
@ -577,7 +577,7 @@ namespace mame
{ {
byte01 |= 0x02; byte01 |= 0x02;
} }
if (Keyboard.IsPressed(Corekey.Down)) if (Keyboard.IsPressed(MotionKey.P2_DOWN)) //if (Keyboard.IsPressed(Corekey.Down))
{ {
byte01 &= unchecked((byte)~0x04); byte01 &= unchecked((byte)~0x04);
} }
@ -585,7 +585,7 @@ namespace mame
{ {
byte01 |= 0x04; byte01 |= 0x04;
} }
if (Keyboard.IsPressed(Corekey.Up)) if (Keyboard.IsPressed(MotionKey.P2_UP))//if (Keyboard.IsPressed(Corekey.Up))
{ {
byte01 &= unchecked((byte)~0x08); byte01 &= unchecked((byte)~0x08);
} }
@ -593,7 +593,7 @@ namespace mame
{ {
byte01 |= 0x08; byte01 |= 0x08;
} }
if (Keyboard.IsPressed(Corekey.R)) if (Keyboard.IsPressed(MotionKey.UNKNOW_R)) //if (Keyboard.IsPressed(Corekey.R))
{ {
byte2 &= unchecked((byte)~0x20); byte2 &= unchecked((byte)~0x20);
} }
@ -601,7 +601,7 @@ namespace mame
{ {
byte2 |= 0x20; byte2 |= 0x20;
} }
if (Keyboard.IsPressed(Corekey.T)) if (Keyboard.IsPressed(MotionKey.UNKNOW_T)) //if (Keyboard.IsPressed(Corekey.T))
{ {
byte2 &= unchecked((byte)~0x40); byte2 &= unchecked((byte)~0x40);
} }
@ -612,7 +612,7 @@ namespace mame
} }
public static void loop_inputports_ns1_tankfrce4() public static void loop_inputports_ns1_tankfrce4()
{ {
if (Keyboard.IsPressed(Corekey.D5)) if (Keyboard.IsPressed(MotionKey.P1_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D5))
{ {
byte2 &= unchecked((byte)~0x10); byte2 &= unchecked((byte)~0x10);
} }
@ -620,7 +620,7 @@ namespace mame
{ {
byte2 |= 0x10; byte2 |= 0x10;
} }
if (Keyboard.IsPressed(Corekey.D6)) if (Keyboard.IsPressed(MotionKey.P2_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D6))
{ {
byte2 &= unchecked((byte)~0x08); byte2 &= unchecked((byte)~0x08);
} }
@ -628,7 +628,7 @@ namespace mame
{ {
byte2 |= 0x08; byte2 |= 0x08;
} }
if (Keyboard.IsPressed(Corekey.D)) if (Keyboard.IsPressed(MotionKey.P1_RIGHT))//if (Keyboard.IsPressed(Corekey.D))
{ {
byte00 &= unchecked((byte)~0x01); byte00 &= unchecked((byte)~0x01);
} }
@ -636,7 +636,7 @@ namespace mame
{ {
byte00 |= 0x01; byte00 |= 0x01;
} }
if (Keyboard.IsPressed(Corekey.A)) if (Keyboard.IsPressed(MotionKey.P1_LEFT))//if (Keyboard.IsPressed(Corekey.A))
{ {
byte00 &= unchecked((byte)~0x02); byte00 &= unchecked((byte)~0x02);
} }
@ -644,7 +644,7 @@ namespace mame
{ {
byte00 |= 0x02; byte00 |= 0x02;
} }
if (Keyboard.IsPressed(Corekey.S)) if (Keyboard.IsPressed(MotionKey.P1_DOWN))//if (Keyboard.IsPressed(Corekey.S))
{ {
byte00 &= unchecked((byte)~0x04); byte00 &= unchecked((byte)~0x04);
} }
@ -652,7 +652,7 @@ namespace mame
{ {
byte00 |= 0x04; byte00 |= 0x04;
} }
if (Keyboard.IsPressed(Corekey.W)) if (Keyboard.IsPressed(MotionKey.P1_UP))//if (Keyboard.IsPressed(Corekey.W))
{ {
byte00 &= unchecked((byte)~0x08); byte00 &= unchecked((byte)~0x08);
} }
@ -660,7 +660,7 @@ namespace mame
{ {
byte00 |= 0x08; byte00 |= 0x08;
} }
if (Keyboard.IsPressed(Corekey.J)) if (Keyboard.IsPressed(MotionKey.P1_BTN_1))//if (Keyboard.IsPressed(Corekey.J))
{ {
byte00 &= unchecked((byte)~0x10); byte00 &= unchecked((byte)~0x10);
} }
@ -668,7 +668,7 @@ namespace mame
{ {
byte00 |= 0x10; byte00 |= 0x10;
} }
if (Keyboard.IsPressed(Corekey.Right)) if (Keyboard.IsPressed(MotionKey.P2_RIGHT))//if (Keyboard.IsPressed(Corekey.Right))
{ {
byte02 &= unchecked((byte)~0x01); byte02 &= unchecked((byte)~0x01);
} }
@ -676,7 +676,7 @@ namespace mame
{ {
byte02 |= 0x01; byte02 |= 0x01;
} }
if (Keyboard.IsPressed(Corekey.Left)) if (Keyboard.IsPressed(MotionKey.P2_LEFT))//if (Keyboard.IsPressed(Corekey.Left))
{ {
byte02 &= unchecked((byte)~0x02); byte02 &= unchecked((byte)~0x02);
} }
@ -684,7 +684,7 @@ namespace mame
{ {
byte02 |= 0x02; byte02 |= 0x02;
} }
if (Keyboard.IsPressed(Corekey.Down)) if (Keyboard.IsPressed(MotionKey.P2_DOWN)) //if (Keyboard.IsPressed(Corekey.Down))
{ {
byte02 &= unchecked((byte)~0x04); byte02 &= unchecked((byte)~0x04);
} }
@ -692,7 +692,7 @@ namespace mame
{ {
byte02 |= 0x04; byte02 |= 0x04;
} }
if (Keyboard.IsPressed(Corekey.Up)) if (Keyboard.IsPressed(MotionKey.P2_UP))//if (Keyboard.IsPressed(Corekey.Up))
{ {
byte02 &= unchecked((byte)~0x08); byte02 &= unchecked((byte)~0x08);
} }
@ -700,7 +700,7 @@ namespace mame
{ {
byte02 |= 0x08; byte02 |= 0x08;
} }
if (Keyboard.IsPressed(Corekey.NumPad1)) if (Keyboard.IsPressed(MotionKey.P2_BTN_1))//if (Keyboard.IsPressed(Corekey.NumPad1))
{ {
byte02 &= unchecked((byte)~0x10); byte02 &= unchecked((byte)~0x10);
} }

View File

@ -6,7 +6,7 @@ namespace mame
{ {
public static void loop_inputports_neogeo_standard() public static void loop_inputports_neogeo_standard()
{ {
if (Keyboard.IsPressed(Corekey.D5)) if (Keyboard.IsPressed(MotionKey.P1_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D5))
{ {
short3 &= ~0x0001; short3 &= ~0x0001;
} }
@ -14,7 +14,7 @@ namespace mame
{ {
short3 |= 0x0001; short3 |= 0x0001;
} }
if (Keyboard.IsPressed(Corekey.D6)) if (Keyboard.IsPressed(MotionKey.P2_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D6))
{ {
short3 &= ~0x0002; short3 &= ~0x0002;
} }
@ -22,7 +22,7 @@ namespace mame
{ {
short3 |= 0x0002; short3 |= 0x0002;
} }
if (Keyboard.IsPressed(Corekey.D1)) if (Keyboard.IsPressed(MotionKey.P1_GAMESTART))//if (Keyboard.IsPressed(Corekey.D1))
{ {
short2 &= ~0x0100; short2 &= ~0x0100;
} }
@ -30,7 +30,7 @@ namespace mame
{ {
short2 |= 0x0100; short2 |= 0x0100;
} }
if (Keyboard.IsPressed(Corekey.D2)) if (Keyboard.IsPressed(MotionKey.P2_GAMESTART))//if (Keyboard.IsPressed(Corekey.D2))
{ {
short2 &= ~0x0400; short2 &= ~0x0400;
} }
@ -38,7 +38,10 @@ namespace mame
{ {
short2 |= 0x0400; short2 |= 0x0400;
} }
if (Keyboard.IsPressed(Corekey.D))
//if (Keyboard.IsPressed(Corekey.D))
if (Keyboard.IsPressed(MotionKey.P1_RIGHT))
{ {
short0 &= ~0x0800; short0 &= ~0x0800;
} }
@ -46,7 +49,7 @@ namespace mame
{ {
short0 |= 0x0800; short0 |= 0x0800;
} }
if (Keyboard.IsPressed(Corekey.A)) if (Keyboard.IsPressed(MotionKey.P1_LEFT))//if (Keyboard.IsPressed(Corekey.A))
{ {
short0 &= ~0x0400; short0 &= ~0x0400;
} }
@ -54,7 +57,7 @@ namespace mame
{ {
short0 |= 0x0400; short0 |= 0x0400;
} }
if (Keyboard.IsPressed(Corekey.S)) if (Keyboard.IsPressed(MotionKey.P1_DOWN))//if (Keyboard.IsPressed(Corekey.S))
{ {
short0 &= ~0x0200; short0 &= ~0x0200;
} }
@ -62,7 +65,7 @@ namespace mame
{ {
short0 |= 0x0200; short0 |= 0x0200;
} }
if (Keyboard.IsPressed(Corekey.W)) if (Keyboard.IsPressed(MotionKey.P1_UP))//if (Keyboard.IsPressed(Corekey.W))
{ {
short0 &= ~0x0100; short0 &= ~0x0100;
} }
@ -70,7 +73,7 @@ namespace mame
{ {
short0 |= 0x0100; short0 |= 0x0100;
} }
if (Keyboard.IsPressed(Corekey.J)) if (Keyboard.IsPressed(MotionKey.P1_BTN_1))//if (Keyboard.IsPressed(Corekey.J))
{ {
short0 &= ~0x1000; short0 &= ~0x1000;
} }
@ -78,7 +81,7 @@ namespace mame
{ {
short0 |= 0x1000; short0 |= 0x1000;
} }
if (Keyboard.IsPressed(Corekey.K)) if (Keyboard.IsPressed(MotionKey.P1_BTN_2))//if (Keyboard.IsPressed(Corekey.K))
{ {
short0 &= ~0x2000; short0 &= ~0x2000;
} }
@ -86,7 +89,7 @@ namespace mame
{ {
short0 |= 0x2000; short0 |= 0x2000;
} }
if (Keyboard.IsPressed(Corekey.L)) if (Keyboard.IsPressed(MotionKey.P1_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.L))
{ {
} }
@ -94,7 +97,7 @@ namespace mame
{ {
} }
if (Keyboard.IsPressed(Corekey.U)) if (Keyboard.IsPressed(MotionKey.P1_BTN_3))//if (Keyboard.IsPressed(Corekey.U))
{ {
short0 &= ~0x4000; short0 &= ~0x4000;
} }
@ -102,7 +105,7 @@ namespace mame
{ {
short0 |= 0x4000; short0 |= 0x4000;
} }
if (Keyboard.IsPressed(Corekey.I)) if (Keyboard.IsPressed(MotionKey.P1_BTN_4))//if (Keyboard.IsPressed(Corekey.I))
{ {
short0 &= unchecked((short)~0x8000); short0 &= unchecked((short)~0x8000);
} }
@ -110,7 +113,7 @@ namespace mame
{ {
short0 |= unchecked((short)0x8000); short0 |= unchecked((short)0x8000);
} }
if (Keyboard.IsPressed(Corekey.O)) if (Keyboard.IsPressed(MotionKey.P1_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.O))
{ {
} }
@ -118,7 +121,7 @@ namespace mame
{ {
} }
if (Keyboard.IsPressed(Corekey.Right)) if (Keyboard.IsPressed(MotionKey.P2_RIGHT))//if (Keyboard.IsPressed(Corekey.Right))
{ {
short1 &= ~0x0800; short1 &= ~0x0800;
} }
@ -126,7 +129,7 @@ namespace mame
{ {
short1 |= 0x0800; short1 |= 0x0800;
} }
if (Keyboard.IsPressed(Corekey.Left)) if (Keyboard.IsPressed(MotionKey.P2_LEFT))//if (Keyboard.IsPressed(Corekey.Left))
{ {
short1 &= ~0x0400; short1 &= ~0x0400;
} }
@ -134,7 +137,7 @@ namespace mame
{ {
short1 |= 0x0400; short1 |= 0x0400;
} }
if (Keyboard.IsPressed(Corekey.Down)) if (Keyboard.IsPressed(MotionKey.P2_DOWN)) //if (Keyboard.IsPressed(Corekey.Down))
{ {
short1 &= ~0x0200; short1 &= ~0x0200;
} }
@ -142,7 +145,7 @@ namespace mame
{ {
short1 |= 0x0200; short1 |= 0x0200;
} }
if (Keyboard.IsPressed(Corekey.Up)) if (Keyboard.IsPressed(MotionKey.P2_UP))//if (Keyboard.IsPressed(Corekey.Up))
{ {
short1 &= ~0x0100; short1 &= ~0x0100;
} }
@ -150,7 +153,7 @@ namespace mame
{ {
short1 |= 0x0100; short1 |= 0x0100;
} }
if (Keyboard.IsPressed(Corekey.NumPad1)) if (Keyboard.IsPressed(MotionKey.P2_BTN_1))//if (Keyboard.IsPressed(Corekey.NumPad1))
{ {
short1 &= ~0x1000; short1 &= ~0x1000;
} }
@ -158,7 +161,7 @@ namespace mame
{ {
short1 |= 0x1000; short1 |= 0x1000;
} }
if (Keyboard.IsPressed(Corekey.NumPad2)) if (Keyboard.IsPressed(MotionKey.P2_BTN_2))//if (Keyboard.IsPressed(Corekey.NumPad2))
{ {
short1 &= ~0x2000; short1 &= ~0x2000;
} }
@ -166,7 +169,7 @@ namespace mame
{ {
short1 |= 0x2000; short1 |= 0x2000;
} }
if (Keyboard.IsPressed(Corekey.NumPad3)) if (Keyboard.IsPressed(MotionKey.P2_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.NumPad3))
{ {
} }
@ -174,7 +177,7 @@ namespace mame
{ {
} }
if (Keyboard.IsPressed(Corekey.NumPad4)) if (Keyboard.IsPressed(MotionKey.P2_BTN_3))//if (Keyboard.IsPressed(Corekey.NumPad4))
{ {
short1 &= ~0x4000; short1 &= ~0x4000;
} }
@ -182,7 +185,7 @@ namespace mame
{ {
short1 |= 0x4000; short1 |= 0x4000;
} }
if (Keyboard.IsPressed(Corekey.NumPad5)) if (Keyboard.IsPressed(MotionKey.P2_BTN_4))//if (Keyboard.IsPressed(MotionKey.P2_BTN_4))//if (Keyboard.IsPressed(Corekey.NumPad5))
{ {
short1 &= unchecked((short)~0x8000); short1 &= unchecked((short)~0x8000);
} }
@ -190,7 +193,8 @@ namespace mame
{ {
short1 |= unchecked((short)0x8000); short1 |= unchecked((short)0x8000);
} }
if (Keyboard.IsPressed(Corekey.NumPad6))
if (Keyboard.IsPressed(MotionKey.P2_UNKNOW_F))//if (Keyboard.IsPressed(Corekey.NumPad6))
{ {
} }
@ -198,7 +202,7 @@ namespace mame
{ {
} }
if (Keyboard.IsPressed(Corekey.R)) if (Keyboard.IsPressed(MotionKey.UNKNOW_R)) //if (Keyboard.IsPressed(Corekey.R))
{ {
short3 &= ~0x0004; short3 &= ~0x0004;
} }
@ -206,7 +210,7 @@ namespace mame
{ {
short3 |= 0x0004; short3 |= 0x0004;
} }
if (Keyboard.IsPressed(Corekey.T)) if (Keyboard.IsPressed(MotionKey.UNKNOW_T)) //if (Keyboard.IsPressed(Corekey.T))
{ {
short4 &= ~0x0080; short4 &= ~0x0080;
} }
@ -217,7 +221,7 @@ namespace mame
} }
public static void loop_inputports_neogeo_irrmaze() public static void loop_inputports_neogeo_irrmaze()
{ {
if (Keyboard.IsPressed(Corekey.D5)) if (Keyboard.IsPressed(MotionKey.P1_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D5))
{ {
short3 &= ~0x0001; short3 &= ~0x0001;
} }
@ -225,7 +229,7 @@ namespace mame
{ {
short3 |= 0x0001; short3 |= 0x0001;
} }
if (Keyboard.IsPressed(Corekey.D6)) if (Keyboard.IsPressed(MotionKey.P2_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D6))
{ {
short3 &= ~0x0002; short3 &= ~0x0002;
} }
@ -233,7 +237,7 @@ namespace mame
{ {
short3 |= 0x0002; short3 |= 0x0002;
} }
if (Keyboard.IsPressed(Corekey.D1)) if (Keyboard.IsPressed(MotionKey.P1_GAMESTART))//if (Keyboard.IsPressed(Corekey.D1))
{ {
short2 &= ~0x0100; short2 &= ~0x0100;
} }
@ -241,7 +245,7 @@ namespace mame
{ {
short2 |= 0x0100; short2 |= 0x0100;
} }
if (Keyboard.IsPressed(Corekey.D2)) if (Keyboard.IsPressed(MotionKey.P2_GAMESTART))//if (Keyboard.IsPressed(Corekey.D2))
{ {
short2 &= ~0x0400; short2 &= ~0x0400;
} }
@ -249,7 +253,7 @@ namespace mame
{ {
short2 |= 0x0400; short2 |= 0x0400;
} }
if (Keyboard.IsPressed(Corekey.J)) if (Keyboard.IsPressed(MotionKey.P1_BTN_1))//if (Keyboard.IsPressed(Corekey.J))
{ {
short1 &= ~0x1000; short1 &= ~0x1000;
} }
@ -257,7 +261,7 @@ namespace mame
{ {
short1 |= 0x1000; short1 |= 0x1000;
} }
if (Keyboard.IsPressed(Corekey.K)) if (Keyboard.IsPressed(MotionKey.P1_BTN_2))//if (Keyboard.IsPressed(Corekey.K))
{ {
short1 &= ~0x2000; short1 &= ~0x2000;
} }
@ -265,7 +269,7 @@ namespace mame
{ {
short1 |= 0x2000; short1 |= 0x2000;
} }
if (Keyboard.IsPressed(Corekey.NumPad1)) if (Keyboard.IsPressed(MotionKey.P2_BTN_1))//if (Keyboard.IsPressed(Corekey.NumPad1))
{ {
short1 &= ~0x4000; short1 &= ~0x4000;
} }
@ -273,7 +277,7 @@ namespace mame
{ {
short1 |= 0x4000; short1 |= 0x4000;
} }
if (Keyboard.IsPressed(Corekey.NumPad2)) if (Keyboard.IsPressed(MotionKey.P2_BTN_2))//if (Keyboard.IsPressed(Corekey.NumPad2))
{ {
short1 &= unchecked((short)~0x8000); short1 &= unchecked((short)~0x8000);
} }

View File

@ -6,7 +6,7 @@ namespace mame
{ {
public static void loop_inputports_pgm_standard() public static void loop_inputports_pgm_standard()
{ {
if (Keyboard.IsPressed(Corekey.D5)) if (Keyboard.IsPressed(MotionKey.P1_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D5))
{ {
short2 &= ~0x0001; short2 &= ~0x0001;
} }
@ -14,7 +14,7 @@ namespace mame
{ {
short2 |= 0x0001; short2 |= 0x0001;
} }
if (Keyboard.IsPressed(Corekey.D6)) if (Keyboard.IsPressed(MotionKey.P2_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D6))
{ {
short2 &= ~0x0002; short2 &= ~0x0002;
} }
@ -22,7 +22,7 @@ namespace mame
{ {
short2 |= 0x0002; short2 |= 0x0002;
} }
if (Keyboard.IsPressed(Corekey.D1)) if (Keyboard.IsPressed(MotionKey.P1_GAMESTART))//if (Keyboard.IsPressed(Corekey.D1))
{ {
short0 &= ~0x0001; short0 &= ~0x0001;
} }
@ -30,7 +30,7 @@ namespace mame
{ {
short0 |= 0x0001; short0 |= 0x0001;
} }
if (Keyboard.IsPressed(Corekey.D2)) if (Keyboard.IsPressed(MotionKey.P2_GAMESTART))//if (Keyboard.IsPressed(Corekey.D2))
{ {
short0 &= ~0x0100; short0 &= ~0x0100;
} }
@ -38,7 +38,7 @@ namespace mame
{ {
short0 |= 0x0100; short0 |= 0x0100;
} }
if (Keyboard.IsPressed(Corekey.D)) if (Keyboard.IsPressed(MotionKey.P1_RIGHT))//if (Keyboard.IsPressed(Corekey.D))
{ {
short0 &= ~0x0010; short0 &= ~0x0010;
} }
@ -46,7 +46,7 @@ namespace mame
{ {
short0 |= 0x0010; short0 |= 0x0010;
} }
if (Keyboard.IsPressed(Corekey.A)) if (Keyboard.IsPressed(MotionKey.P1_LEFT))//if (Keyboard.IsPressed(Corekey.A))
{ {
short0 &= ~0x0008; short0 &= ~0x0008;
} }
@ -54,7 +54,7 @@ namespace mame
{ {
short0 |= 0x0008; short0 |= 0x0008;
} }
if (Keyboard.IsPressed(Corekey.S)) if (Keyboard.IsPressed(MotionKey.P1_DOWN))//if (Keyboard.IsPressed(Corekey.S))
{ {
short0 &= ~0x0004; short0 &= ~0x0004;
} }
@ -62,7 +62,7 @@ namespace mame
{ {
short0 |= 0x0004; short0 |= 0x0004;
} }
if (Keyboard.IsPressed(Corekey.W)) if (Keyboard.IsPressed(MotionKey.P1_UP))//if (Keyboard.IsPressed(Corekey.W))
{ {
short0 &= ~0x0002; short0 &= ~0x0002;
} }
@ -70,7 +70,7 @@ namespace mame
{ {
short0 |= 0x0002; short0 |= 0x0002;
} }
if (Keyboard.IsPressed(Corekey.J)) if (Keyboard.IsPressed(MotionKey.P1_BTN_1))//if (Keyboard.IsPressed(Corekey.J))
{ {
short0 &= ~0x0020; short0 &= ~0x0020;
} }
@ -78,7 +78,7 @@ namespace mame
{ {
short0 |= 0x0020; short0 |= 0x0020;
} }
if (Keyboard.IsPressed(Corekey.K)) if (Keyboard.IsPressed(MotionKey.P1_BTN_2))//if (Keyboard.IsPressed(Corekey.K))
{ {
short0 &= ~0x0040; short0 &= ~0x0040;
} }
@ -86,7 +86,7 @@ namespace mame
{ {
short0 |= 0x0040; short0 |= 0x0040;
} }
if (Keyboard.IsPressed(Corekey.L)) if (Keyboard.IsPressed(MotionKey.P1_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.L))
{ {
short0 &= ~0x0080; short0 &= ~0x0080;
} }
@ -94,7 +94,7 @@ namespace mame
{ {
short0 |= 0x0080; short0 |= 0x0080;
} }
if (Keyboard.IsPressed(Corekey.U)) if (Keyboard.IsPressed(MotionKey.P1_BTN_3))//if (Keyboard.IsPressed(Corekey.U))
{ {
short2 &= ~0x0100; short2 &= ~0x0100;
} }
@ -102,7 +102,7 @@ namespace mame
{ {
short2 |= 0x0100; short2 |= 0x0100;
} }
if (Keyboard.IsPressed(Corekey.I)) if (Keyboard.IsPressed(MotionKey.P1_BTN_4))//if (Keyboard.IsPressed(Corekey.I))
{ {
} }
@ -110,7 +110,7 @@ namespace mame
{ {
} }
if (Keyboard.IsPressed(Corekey.O)) if (Keyboard.IsPressed(MotionKey.P1_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.O))
{ {
} }
@ -118,7 +118,7 @@ namespace mame
{ {
} }
if (Keyboard.IsPressed(Corekey.Right)) if (Keyboard.IsPressed(MotionKey.P2_RIGHT))//if (Keyboard.IsPressed(Corekey.Right))
{ {
short0 &= ~0x1000; short0 &= ~0x1000;
} }
@ -126,7 +126,7 @@ namespace mame
{ {
short0 |= 0x1000; short0 |= 0x1000;
} }
if (Keyboard.IsPressed(Corekey.Left)) if (Keyboard.IsPressed(MotionKey.P2_LEFT))//if (Keyboard.IsPressed(Corekey.Left))
{ {
short0 &= ~0x0800; short0 &= ~0x0800;
} }
@ -134,7 +134,7 @@ namespace mame
{ {
short0 |= 0x0800; short0 |= 0x0800;
} }
if (Keyboard.IsPressed(Corekey.Down)) if (Keyboard.IsPressed(MotionKey.P2_DOWN)) //if (Keyboard.IsPressed(Corekey.Down))
{ {
short0 &= ~0x0400; short0 &= ~0x0400;
} }
@ -142,7 +142,7 @@ namespace mame
{ {
short0 |= 0x0400; short0 |= 0x0400;
} }
if (Keyboard.IsPressed(Corekey.Up)) if (Keyboard.IsPressed(MotionKey.P2_UP))//if (Keyboard.IsPressed(Corekey.Up))
{ {
short0 &= ~0x0200; short0 &= ~0x0200;
} }
@ -150,7 +150,7 @@ namespace mame
{ {
short0 |= 0x0200; short0 |= 0x0200;
} }
if (Keyboard.IsPressed(Corekey.NumPad1)) if (Keyboard.IsPressed(MotionKey.P2_BTN_1))//if (Keyboard.IsPressed(Corekey.NumPad1))
{ {
short0 &= ~0x2000; short0 &= ~0x2000;
} }
@ -158,7 +158,7 @@ namespace mame
{ {
short0 |= 0x2000; short0 |= 0x2000;
} }
if (Keyboard.IsPressed(Corekey.NumPad2)) if (Keyboard.IsPressed(MotionKey.P2_BTN_2))//if (Keyboard.IsPressed(Corekey.NumPad2))
{ {
short0 &= ~0x4000; short0 &= ~0x4000;
} }
@ -166,7 +166,7 @@ namespace mame
{ {
short0 |= 0x4000; short0 |= 0x4000;
} }
if (Keyboard.IsPressed(Corekey.NumPad3)) if (Keyboard.IsPressed(MotionKey.P2_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.NumPad3))
{ {
short0 &= unchecked((short)~0x8000); short0 &= unchecked((short)~0x8000);
} }
@ -174,7 +174,7 @@ namespace mame
{ {
short0 |= unchecked((short)0x8000); short0 |= unchecked((short)0x8000);
} }
if (Keyboard.IsPressed(Corekey.NumPad4)) if (Keyboard.IsPressed(MotionKey.P2_BTN_3))//if (Keyboard.IsPressed(Corekey.NumPad4))
{ {
short2 &= ~0x0200; short2 &= ~0x0200;
} }
@ -182,7 +182,7 @@ namespace mame
{ {
short2 |= 0x0200; short2 |= 0x0200;
} }
if (Keyboard.IsPressed(Corekey.NumPad5)) if (Keyboard.IsPressed(MotionKey.P2_BTN_4))//if (Keyboard.IsPressed(Corekey.NumPad5))
{ {
} }
@ -190,7 +190,7 @@ namespace mame
{ {
} }
if (Keyboard.IsPressed(Corekey.NumPad6)) if (Keyboard.IsPressed(MotionKey.P2_UNKNOW_F))//if (Keyboard.IsPressed(Corekey.NumPad6))
{ {
} }
@ -198,7 +198,7 @@ namespace mame
{ {
} }
if (Keyboard.IsPressed(Corekey.R)) if (Keyboard.IsPressed(MotionKey.UNKNOW_R)) //if (Keyboard.IsPressed(Corekey.R))
{ {
short2 &= ~0x0020; short2 &= ~0x0020;
} }
@ -206,7 +206,7 @@ namespace mame
{ {
short2 |= 0x0020; short2 |= 0x0020;
} }
if (Keyboard.IsPressed(Corekey.T)) if (Keyboard.IsPressed(MotionKey.UNKNOW_T)) //if (Keyboard.IsPressed(Corekey.T))
{ {
short2 &= ~0x0080; short2 &= ~0x0080;
} }

View File

@ -6,7 +6,7 @@ namespace mame
{ {
public static void loop_inputports_suna8_starfigh() public static void loop_inputports_suna8_starfigh()
{ {
if (Keyboard.IsPressed(Corekey.D5)) if (Keyboard.IsPressed(MotionKey.P1_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D5))
{ {
byte1 &= unchecked((byte)~0x80); byte1 &= unchecked((byte)~0x80);
} }
@ -14,7 +14,7 @@ namespace mame
{ {
byte1 |= 0x80; byte1 |= 0x80;
} }
if (Keyboard.IsPressed(Corekey.D6)) if (Keyboard.IsPressed(MotionKey.P2_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D6))
{ {
byte2 &= unchecked((byte)~0x80); byte2 &= unchecked((byte)~0x80);
} }
@ -22,7 +22,7 @@ namespace mame
{ {
byte2 |= 0x80; byte2 |= 0x80;
} }
if (Keyboard.IsPressed(Corekey.D1)) if (Keyboard.IsPressed(MotionKey.P1_GAMESTART))//if (Keyboard.IsPressed(Corekey.D1))
{ {
byte1 &= unchecked((byte)~0x40); byte1 &= unchecked((byte)~0x40);
} }
@ -30,7 +30,7 @@ namespace mame
{ {
byte1 |= 0x40; byte1 |= 0x40;
} }
if (Keyboard.IsPressed(Corekey.D2)) if (Keyboard.IsPressed(MotionKey.P2_GAMESTART))//if (Keyboard.IsPressed(Corekey.D2))
{ {
byte2 &= unchecked((byte)~0x40); byte2 &= unchecked((byte)~0x40);
} }
@ -38,7 +38,7 @@ namespace mame
{ {
byte2 |= 0x40; byte2 |= 0x40;
} }
if (Keyboard.IsPressed(Corekey.D)) if (Keyboard.IsPressed(MotionKey.P1_RIGHT))//if (Keyboard.IsPressed(Corekey.D))
{ {
byte1 &= unchecked((byte)~0x08); byte1 &= unchecked((byte)~0x08);
} }
@ -46,7 +46,7 @@ namespace mame
{ {
byte1 |= 0x08; byte1 |= 0x08;
} }
if (Keyboard.IsPressed(Corekey.A)) if (Keyboard.IsPressed(MotionKey.P1_LEFT))//if (Keyboard.IsPressed(Corekey.A))
{ {
byte1 &= unchecked((byte)~0x04); byte1 &= unchecked((byte)~0x04);
} }
@ -54,7 +54,7 @@ namespace mame
{ {
byte1 |= 0x04; byte1 |= 0x04;
} }
if (Keyboard.IsPressed(Corekey.S)) if (Keyboard.IsPressed(MotionKey.P1_DOWN))//if (Keyboard.IsPressed(Corekey.S))
{ {
byte1 &= unchecked((byte)~0x02); byte1 &= unchecked((byte)~0x02);
} }
@ -62,7 +62,7 @@ namespace mame
{ {
byte1 |= 0x02; byte1 |= 0x02;
} }
if (Keyboard.IsPressed(Corekey.W)) if (Keyboard.IsPressed(MotionKey.P1_UP))//if (Keyboard.IsPressed(Corekey.W))
{ {
byte1 &= unchecked((byte)~0x01); byte1 &= unchecked((byte)~0x01);
} }
@ -70,7 +70,7 @@ namespace mame
{ {
byte1 |= 0x01; byte1 |= 0x01;
} }
if (Keyboard.IsPressed(Corekey.J)) if (Keyboard.IsPressed(MotionKey.P1_BTN_1))//if (Keyboard.IsPressed(Corekey.J))
{ {
byte1 &= unchecked((byte)~0x10); byte1 &= unchecked((byte)~0x10);
} }
@ -78,7 +78,7 @@ namespace mame
{ {
byte1 |= 0x10; byte1 |= 0x10;
} }
if (Keyboard.IsPressed(Corekey.K)) if (Keyboard.IsPressed(MotionKey.P1_BTN_2))//if (Keyboard.IsPressed(Corekey.K))
{ {
byte1 &= unchecked((byte)~0x20); byte1 &= unchecked((byte)~0x20);
} }
@ -86,7 +86,7 @@ namespace mame
{ {
byte1 |= 0x20; byte1 |= 0x20;
} }
if (Keyboard.IsPressed(Corekey.Right)) if (Keyboard.IsPressed(MotionKey.P2_RIGHT))//if (Keyboard.IsPressed(Corekey.Right))
{ {
byte2 &= unchecked((byte)~0x08); byte2 &= unchecked((byte)~0x08);
} }
@ -94,7 +94,7 @@ namespace mame
{ {
byte2 |= 0x08; byte2 |= 0x08;
} }
if (Keyboard.IsPressed(Corekey.Left)) if (Keyboard.IsPressed(MotionKey.P2_LEFT))//if (Keyboard.IsPressed(Corekey.Left))
{ {
byte2 &= unchecked((byte)~0x04); byte2 &= unchecked((byte)~0x04);
} }
@ -102,7 +102,7 @@ namespace mame
{ {
byte2 |= 0x04; byte2 |= 0x04;
} }
if (Keyboard.IsPressed(Corekey.Down)) if (Keyboard.IsPressed(MotionKey.P2_DOWN)) //if (Keyboard.IsPressed(Corekey.Down))
{ {
byte2 &= unchecked((byte)~0x02); byte2 &= unchecked((byte)~0x02);
} }
@ -110,7 +110,7 @@ namespace mame
{ {
byte2 |= 0x02; byte2 |= 0x02;
} }
if (Keyboard.IsPressed(Corekey.Up)) if (Keyboard.IsPressed(MotionKey.P2_UP))//if (Keyboard.IsPressed(Corekey.Up))
{ {
byte2 &= unchecked((byte)~0x01); byte2 &= unchecked((byte)~0x01);
} }
@ -118,7 +118,7 @@ namespace mame
{ {
byte2 |= 0x01; byte2 |= 0x01;
} }
if (Keyboard.IsPressed(Corekey.NumPad1)) if (Keyboard.IsPressed(MotionKey.P2_BTN_1))//if (Keyboard.IsPressed(Corekey.NumPad1))
{ {
byte2 &= unchecked((byte)~0x10); byte2 &= unchecked((byte)~0x10);
} }
@ -126,7 +126,7 @@ namespace mame
{ {
byte2 |= 0x10; byte2 |= 0x10;
} }
if (Keyboard.IsPressed(Corekey.NumPad2)) if (Keyboard.IsPressed(MotionKey.P2_BTN_2))//if (Keyboard.IsPressed(Corekey.NumPad2))
{ {
byte2 &= unchecked((byte)~0x20); byte2 &= unchecked((byte)~0x20);
} }

View File

@ -10,7 +10,7 @@ namespace mame
} }
public static void loop_inputports_taito_bublbobl() public static void loop_inputports_taito_bublbobl()
{ {
if (Keyboard.IsPressed(Corekey.D5)) if (Keyboard.IsPressed(MotionKey.P1_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D5))
{ {
sbyte0 |= 0x04; sbyte0 |= 0x04;
} }
@ -18,7 +18,7 @@ namespace mame
{ {
sbyte0 &= ~0x04; sbyte0 &= ~0x04;
} }
if (Keyboard.IsPressed(Corekey.D6)) if (Keyboard.IsPressed(MotionKey.P2_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D6))
{ {
sbyte0 |= 0x08; sbyte0 |= 0x08;
} }
@ -26,7 +26,7 @@ namespace mame
{ {
sbyte0 &= ~0x08; sbyte0 &= ~0x08;
} }
if (Keyboard.IsPressed(Corekey.D1)) if (Keyboard.IsPressed(MotionKey.P1_GAMESTART))//if (Keyboard.IsPressed(Corekey.D1))
{ {
sbyte1 &= ~0x40; sbyte1 &= ~0x40;
} }
@ -34,7 +34,7 @@ namespace mame
{ {
sbyte1 |= 0x40; sbyte1 |= 0x40;
} }
if (Keyboard.IsPressed(Corekey.D2)) if (Keyboard.IsPressed(MotionKey.P2_GAMESTART))//if (Keyboard.IsPressed(Corekey.D2))
{ {
sbyte2 &= ~0x40; sbyte2 &= ~0x40;
} }
@ -42,7 +42,7 @@ namespace mame
{ {
sbyte2 |= 0x40; sbyte2 |= 0x40;
} }
if (Keyboard.IsPressed(Corekey.D)) if (Keyboard.IsPressed(MotionKey.P1_RIGHT))//if (Keyboard.IsPressed(Corekey.D))
{ {
sbyte1 &= ~0x02; sbyte1 &= ~0x02;
} }
@ -50,7 +50,7 @@ namespace mame
{ {
sbyte1 |= 0x02; sbyte1 |= 0x02;
} }
if (Keyboard.IsPressed(Corekey.A)) if (Keyboard.IsPressed(MotionKey.P1_LEFT))//if (Keyboard.IsPressed(Corekey.A))
{ {
sbyte1 &= ~0x01; sbyte1 &= ~0x01;
} }
@ -74,7 +74,7 @@ namespace mame
{ {
sbyte2 |= 0x01; sbyte2 |= 0x01;
}*/ }*/
if (Keyboard.IsPressed(Corekey.J)) if (Keyboard.IsPressed(MotionKey.P1_BTN_1))//if (Keyboard.IsPressed(Corekey.J))
{ {
sbyte1 &= ~0x20; sbyte1 &= ~0x20;
} }
@ -82,7 +82,7 @@ namespace mame
{ {
sbyte1 |= 0x20; sbyte1 |= 0x20;
} }
if (Keyboard.IsPressed(Corekey.K)) if (Keyboard.IsPressed(MotionKey.P1_BTN_2))//if (Keyboard.IsPressed(Corekey.K))
{ {
sbyte1 &= ~0x10; sbyte1 &= ~0x10;
} }
@ -98,7 +98,7 @@ namespace mame
{ {
sbyte1 |= 0x04; sbyte1 |= 0x04;
}*/ }*/
if (Keyboard.IsPressed(Corekey.Right)) if (Keyboard.IsPressed(MotionKey.P2_RIGHT))//if (Keyboard.IsPressed(Corekey.Right))
{ {
sbyte2 &= ~0x02; sbyte2 &= ~0x02;
} }
@ -106,7 +106,7 @@ namespace mame
{ {
sbyte2 |= 0x02; sbyte2 |= 0x02;
} }
if (Keyboard.IsPressed(Corekey.Left)) if (Keyboard.IsPressed(MotionKey.P2_LEFT))//if (Keyboard.IsPressed(Corekey.Left))
{ {
sbyte2 &= ~0x01; sbyte2 &= ~0x01;
} }
@ -130,7 +130,7 @@ namespace mame
{ {
sbyte2 |= 0x10; sbyte2 |= 0x10;
}*/ }*/
if (Keyboard.IsPressed(Corekey.NumPad1)) if (Keyboard.IsPressed(MotionKey.P2_BTN_1))//if (Keyboard.IsPressed(Corekey.NumPad1))
{ {
sbyte2 &= ~0x20; sbyte2 &= ~0x20;
} }
@ -138,7 +138,7 @@ namespace mame
{ {
sbyte2 |= 0x20; sbyte2 |= 0x20;
} }
if (Keyboard.IsPressed(Corekey.NumPad2)) if (Keyboard.IsPressed(MotionKey.P2_BTN_2))//if (Keyboard.IsPressed(Corekey.NumPad2))
{ {
sbyte2 &= ~0x10; sbyte2 &= ~0x10;
} }
@ -154,7 +154,7 @@ namespace mame
{ {
sbyte1 |= 0x40; sbyte1 |= 0x40;
}*/ }*/
if (Keyboard.IsPressed(Corekey.R)) if (Keyboard.IsPressed(MotionKey.UNKNOW_R)) //if (Keyboard.IsPressed(Corekey.R))
{ {
sbyte0 &= ~0x02; sbyte0 &= ~0x02;
} }
@ -173,7 +173,7 @@ namespace mame
} }
public static void loop_inputports_taito_tokio() public static void loop_inputports_taito_tokio()
{ {
if (Keyboard.IsPressed(Corekey.D5)) if (Keyboard.IsPressed(MotionKey.P1_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D5))
{ {
sbyte0 |= 0x04; sbyte0 |= 0x04;
} }
@ -181,7 +181,7 @@ namespace mame
{ {
sbyte0 &= ~0x04; sbyte0 &= ~0x04;
} }
if (Keyboard.IsPressed(Corekey.D6)) if (Keyboard.IsPressed(MotionKey.P2_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D6))
{ {
sbyte0 |= 0x08; sbyte0 |= 0x08;
} }
@ -189,7 +189,7 @@ namespace mame
{ {
sbyte0 &= ~0x08; sbyte0 &= ~0x08;
} }
if (Keyboard.IsPressed(Corekey.D1)) if (Keyboard.IsPressed(MotionKey.P1_GAMESTART))//if (Keyboard.IsPressed(Corekey.D1))
{ {
sbyte1 &= ~0x40; sbyte1 &= ~0x40;
} }
@ -197,7 +197,7 @@ namespace mame
{ {
sbyte1 |= 0x40; sbyte1 |= 0x40;
} }
if (Keyboard.IsPressed(Corekey.D2)) if (Keyboard.IsPressed(MotionKey.P2_GAMESTART))//if (Keyboard.IsPressed(Corekey.D2))
{ {
sbyte2 &= ~0x40; sbyte2 &= ~0x40;
} }
@ -205,7 +205,7 @@ namespace mame
{ {
sbyte2 |= 0x40; sbyte2 |= 0x40;
} }
if (Keyboard.IsPressed(Corekey.D)) if (Keyboard.IsPressed(MotionKey.P1_RIGHT))//if (Keyboard.IsPressed(Corekey.D))
{ {
sbyte1 &= ~0x02; sbyte1 &= ~0x02;
} }
@ -213,7 +213,7 @@ namespace mame
{ {
sbyte1 |= 0x02; sbyte1 |= 0x02;
} }
if (Keyboard.IsPressed(Corekey.A)) if (Keyboard.IsPressed(MotionKey.P1_LEFT))//if (Keyboard.IsPressed(Corekey.A))
{ {
sbyte1 &= ~0x01; sbyte1 &= ~0x01;
} }
@ -221,7 +221,7 @@ namespace mame
{ {
sbyte1 |= 0x01; sbyte1 |= 0x01;
} }
if (Keyboard.IsPressed(Corekey.S)) if (Keyboard.IsPressed(MotionKey.P1_DOWN))//if (Keyboard.IsPressed(Corekey.S))
{ {
sbyte1 &= ~0x04; sbyte1 &= ~0x04;
} }
@ -229,7 +229,7 @@ namespace mame
{ {
sbyte1 |= 0x04; sbyte1 |= 0x04;
} }
if (Keyboard.IsPressed(Corekey.W)) if (Keyboard.IsPressed(MotionKey.P1_UP))//if (Keyboard.IsPressed(Corekey.W))
{ {
sbyte1 &= ~0x08; sbyte1 &= ~0x08;
} }
@ -237,7 +237,7 @@ namespace mame
{ {
sbyte1 |= 0x08; sbyte1 |= 0x08;
} }
if (Keyboard.IsPressed(Corekey.J)) if (Keyboard.IsPressed(MotionKey.P1_BTN_1))//if (Keyboard.IsPressed(Corekey.J))
{ {
sbyte1 &= ~0x20; sbyte1 &= ~0x20;
} }
@ -245,7 +245,7 @@ namespace mame
{ {
sbyte1 |= 0x20; sbyte1 |= 0x20;
} }
if (Keyboard.IsPressed(Corekey.K)) if (Keyboard.IsPressed(MotionKey.P1_BTN_2))//if (Keyboard.IsPressed(Corekey.K))
{ {
sbyte1 &= ~0x10; sbyte1 &= ~0x10;
} }
@ -261,7 +261,7 @@ namespace mame
{ {
sbyte1 |= 0x04; sbyte1 |= 0x04;
}*/ }*/
if (Keyboard.IsPressed(Corekey.Right)) if (Keyboard.IsPressed(MotionKey.P2_RIGHT))//if (Keyboard.IsPressed(Corekey.Right))
{ {
sbyte2 &= ~0x02; sbyte2 &= ~0x02;
} }
@ -269,7 +269,7 @@ namespace mame
{ {
sbyte2 |= 0x02; sbyte2 |= 0x02;
} }
if (Keyboard.IsPressed(Corekey.Left)) if (Keyboard.IsPressed(MotionKey.P2_LEFT))//if (Keyboard.IsPressed(Corekey.Left))
{ {
sbyte2 &= ~0x01; sbyte2 &= ~0x01;
} }
@ -277,7 +277,7 @@ namespace mame
{ {
sbyte2 |= 0x01; sbyte2 |= 0x01;
} }
if (Keyboard.IsPressed(Corekey.Down)) if (Keyboard.IsPressed(MotionKey.P2_DOWN)) //if (Keyboard.IsPressed(Corekey.Down))
{ {
sbyte2 &= ~0x04; sbyte2 &= ~0x04;
} }
@ -285,7 +285,7 @@ namespace mame
{ {
sbyte2 |= 0x04; sbyte2 |= 0x04;
} }
if (Keyboard.IsPressed(Corekey.Up)) if (Keyboard.IsPressed(MotionKey.P2_UP))//if (Keyboard.IsPressed(Corekey.Up))
{ {
sbyte2 &= ~0x08; sbyte2 &= ~0x08;
} }
@ -293,7 +293,7 @@ namespace mame
{ {
sbyte2 |= 0x08; sbyte2 |= 0x08;
} }
if (Keyboard.IsPressed(Corekey.NumPad1)) if (Keyboard.IsPressed(MotionKey.P2_BTN_1))//if (Keyboard.IsPressed(Corekey.NumPad1))
{ {
sbyte2 &= ~0x20; sbyte2 &= ~0x20;
} }
@ -301,7 +301,7 @@ namespace mame
{ {
sbyte2 |= 0x20; sbyte2 |= 0x20;
} }
if (Keyboard.IsPressed(Corekey.NumPad2)) if (Keyboard.IsPressed(MotionKey.P2_BTN_2))//if (Keyboard.IsPressed(Corekey.NumPad2))
{ {
sbyte2 &= ~0x10; sbyte2 &= ~0x10;
} }
@ -317,7 +317,7 @@ namespace mame
{ {
sbyte1 |= 0x40; sbyte1 |= 0x40;
}*/ }*/
if (Keyboard.IsPressed(Corekey.R)) if (Keyboard.IsPressed(MotionKey.UNKNOW_R)) //if (Keyboard.IsPressed(Corekey.R))
{ {
sbyte0 &= ~0x02; sbyte0 &= ~0x02;
} }
@ -336,7 +336,7 @@ namespace mame
} }
public static void loop_inputports_taito_boblbobl() public static void loop_inputports_taito_boblbobl()
{ {
if (Keyboard.IsPressed(Corekey.D5)) if (Keyboard.IsPressed(MotionKey.P1_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D5))
{ {
sbyte0 |= 0x08; sbyte0 |= 0x08;
} }
@ -344,7 +344,7 @@ namespace mame
{ {
sbyte0 &= ~0x08; sbyte0 &= ~0x08;
} }
if (Keyboard.IsPressed(Corekey.D6)) if (Keyboard.IsPressed(MotionKey.P2_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D6))
{ {
sbyte0 |= 0x04; sbyte0 |= 0x04;
} }
@ -352,7 +352,7 @@ namespace mame
{ {
sbyte0 &= ~0x04; sbyte0 &= ~0x04;
} }
if (Keyboard.IsPressed(Corekey.D1)) if (Keyboard.IsPressed(MotionKey.P1_GAMESTART))//if (Keyboard.IsPressed(Corekey.D1))
{ {
sbyte0 &= ~0x40; sbyte0 &= ~0x40;
} }
@ -360,7 +360,7 @@ namespace mame
{ {
sbyte0 |= 0x40; sbyte0 |= 0x40;
} }
if (Keyboard.IsPressed(Corekey.D2)) if (Keyboard.IsPressed(MotionKey.P2_GAMESTART))//if (Keyboard.IsPressed(Corekey.D2))
{ {
sbyte1 &= ~0x40; sbyte1 &= ~0x40;
} }
@ -368,7 +368,7 @@ namespace mame
{ {
sbyte1 |= 0x40; sbyte1 |= 0x40;
} }
if (Keyboard.IsPressed(Corekey.D)) if (Keyboard.IsPressed(MotionKey.P1_RIGHT))//if (Keyboard.IsPressed(Corekey.D))
{ {
sbyte0 &= ~0x02; sbyte0 &= ~0x02;
} }
@ -376,7 +376,7 @@ namespace mame
{ {
sbyte0 |= 0x02; sbyte0 |= 0x02;
} }
if (Keyboard.IsPressed(Corekey.A)) if (Keyboard.IsPressed(MotionKey.P1_LEFT))//if (Keyboard.IsPressed(Corekey.A))
{ {
sbyte0 &= ~0x01; sbyte0 &= ~0x01;
} }
@ -400,7 +400,7 @@ namespace mame
{ {
sbyte1 |= 0x08; sbyte1 |= 0x08;
}*/ }*/
if (Keyboard.IsPressed(Corekey.J)) if (Keyboard.IsPressed(MotionKey.P1_BTN_1))//if (Keyboard.IsPressed(Corekey.J))
{ {
sbyte0 &= ~0x20; sbyte0 &= ~0x20;
} }
@ -408,7 +408,7 @@ namespace mame
{ {
sbyte0 |= 0x20; sbyte0 |= 0x20;
} }
if (Keyboard.IsPressed(Corekey.K)) if (Keyboard.IsPressed(MotionKey.P1_BTN_2))//if (Keyboard.IsPressed(Corekey.K))
{ {
sbyte0 &= ~0x10; sbyte0 &= ~0x10;
} }
@ -424,7 +424,7 @@ namespace mame
{ {
sbyte1 |= 0x04; sbyte1 |= 0x04;
}*/ }*/
if (Keyboard.IsPressed(Corekey.Right)) if (Keyboard.IsPressed(MotionKey.P2_RIGHT))//if (Keyboard.IsPressed(Corekey.Right))
{ {
sbyte1 &= ~0x02; sbyte1 &= ~0x02;
} }
@ -432,7 +432,7 @@ namespace mame
{ {
sbyte1 |= 0x02; sbyte1 |= 0x02;
} }
if (Keyboard.IsPressed(Corekey.Left)) if (Keyboard.IsPressed(MotionKey.P2_LEFT))//if (Keyboard.IsPressed(Corekey.Left))
{ {
sbyte1 &= ~0x01; sbyte1 &= ~0x01;
} }
@ -456,7 +456,7 @@ namespace mame
{ {
sbyte2 |= 0x08; sbyte2 |= 0x08;
}*/ }*/
if (Keyboard.IsPressed(Corekey.NumPad1)) if (Keyboard.IsPressed(MotionKey.P2_BTN_1))//if (Keyboard.IsPressed(Corekey.NumPad1))
{ {
sbyte1 &= ~0x20; sbyte1 &= ~0x20;
} }
@ -464,7 +464,7 @@ namespace mame
{ {
sbyte1 |= 0x20; sbyte1 |= 0x20;
} }
if (Keyboard.IsPressed(Corekey.NumPad2)) if (Keyboard.IsPressed(MotionKey.P2_BTN_2))//if (Keyboard.IsPressed(Corekey.NumPad2))
{ {
sbyte1 &= ~0x10; sbyte1 &= ~0x10;
} }
@ -480,7 +480,7 @@ namespace mame
{ {
sbyte1 |= 0x40; sbyte1 |= 0x40;
}*/ }*/
if (Keyboard.IsPressed(Corekey.R)) if (Keyboard.IsPressed(MotionKey.UNKNOW_R)) //if (Keyboard.IsPressed(Corekey.R))
{ {
sbyte1 &= ~0x08; sbyte1 &= ~0x08;
} }
@ -499,7 +499,7 @@ namespace mame
} }
public static void loop_inputports_taito_opwolf() public static void loop_inputports_taito_opwolf()
{ {
if (Keyboard.IsPressed(Corekey.D5)) if (Keyboard.IsPressed(MotionKey.P1_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D5))
{ {
sbyte0 |= 0x01; sbyte0 |= 0x01;
} }
@ -507,7 +507,7 @@ namespace mame
{ {
sbyte0 &= ~0x01; sbyte0 &= ~0x01;
} }
if (Keyboard.IsPressed(Corekey.D6)) if (Keyboard.IsPressed(MotionKey.P2_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D6))
{ {
sbyte0 |= 0x02; sbyte0 |= 0x02;
} }
@ -515,7 +515,7 @@ namespace mame
{ {
sbyte0 &= ~0x02; sbyte0 &= ~0x02;
} }
if (Keyboard.IsPressed(Corekey.D1)) if (Keyboard.IsPressed(MotionKey.P1_GAMESTART))//if (Keyboard.IsPressed(Corekey.D1))
{ {
sbyte1 &= ~0x10; sbyte1 &= ~0x10;
} }
@ -563,7 +563,9 @@ namespace mame
{ {
sbyte2 |= 0x01; sbyte2 |= 0x01;
}*/ }*/
if (Keyboard.IsPressed(Corekey.J) || Mouse.buttons[0] != 0)
if (Keyboard.IsPressed(MotionKey.P1_BTN_1) || Mouse.buttons[0] != 0)//if (Keyboard.IsPressed(Corekey.J) || Mouse.buttons[0] != 0)
{ {
sbyte1 &= ~0x01; sbyte1 &= ~0x01;
} }
@ -571,7 +573,7 @@ namespace mame
{ {
sbyte1 |= 0x01; sbyte1 |= 0x01;
} }
if (Keyboard.IsPressed(Corekey.K) || Mouse.buttons[1] != 0) if (Keyboard.IsPressed(MotionKey.P1_BTN_2) || Mouse.buttons[1] != 0)//if (Keyboard.IsPressed(Corekey.K) || Mouse.buttons[1] != 0)
{ {
sbyte1 &= ~0x02; sbyte1 &= ~0x02;
} }
@ -643,7 +645,7 @@ namespace mame
{ {
sbyte1 |= 0x40; sbyte1 |= 0x40;
}*/ }*/
if (Keyboard.IsPressed(Corekey.R)) if (Keyboard.IsPressed(MotionKey.UNKNOW_R)) //if (Keyboard.IsPressed(Corekey.R))
{ {
sbyte1 &= ~0x04; sbyte1 &= ~0x04;
} }
@ -651,7 +653,7 @@ namespace mame
{ {
sbyte1 |= 0x04; sbyte1 |= 0x04;
} }
if (Keyboard.IsPressed(Corekey.T)) if (Keyboard.IsPressed(MotionKey.UNKNOW_T)) //if (Keyboard.IsPressed(Corekey.T))
{ {
sbyte1 &= ~0x08; sbyte1 &= ~0x08;
} }
@ -666,7 +668,7 @@ namespace mame
} }
public static void loop_inputports_taito_opwolfp() public static void loop_inputports_taito_opwolfp()
{ {
if (Keyboard.IsPressed(Corekey.D5)) if (Keyboard.IsPressed(MotionKey.P1_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D5))
{ {
sbyte3 |= 0x02; sbyte3 |= 0x02;
} }
@ -674,7 +676,7 @@ namespace mame
{ {
sbyte3 &= ~0x02; sbyte3 &= ~0x02;
} }
if (Keyboard.IsPressed(Corekey.D6)) if (Keyboard.IsPressed(MotionKey.P2_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D6))
{ {
sbyte3 |= 0x04; sbyte3 |= 0x04;
} }
@ -682,7 +684,7 @@ namespace mame
{ {
sbyte3 &= ~0x04; sbyte3 &= ~0x04;
} }
if (Keyboard.IsPressed(Corekey.D1)) if (Keyboard.IsPressed(MotionKey.P1_GAMESTART))//if (Keyboard.IsPressed(Corekey.D1))
{ {
sbyte2 &= ~0x20; sbyte2 &= ~0x20;
} }
@ -690,7 +692,7 @@ namespace mame
{ {
sbyte2 |= 0x20; sbyte2 |= 0x20;
} }
if (Keyboard.IsPressed(Corekey.J) || Mouse.buttons[0] != 0) if (Keyboard.IsPressed(MotionKey.P1_BTN_1) || Mouse.buttons[0] != 0)//if (Keyboard.IsPressed(Corekey.J) || Mouse.buttons[0] != 0)
{ {
sbyte2 &= ~0x02; sbyte2 &= ~0x02;
} }
@ -698,7 +700,7 @@ namespace mame
{ {
sbyte2 |= 0x02; sbyte2 |= 0x02;
} }
if (Keyboard.IsPressed(Corekey.K) || Mouse.buttons[1] != 0) if (Keyboard.IsPressed(MotionKey.P1_BTN_2) || Mouse.buttons[1] != 0) //if (Keyboard.IsPressed(Corekey.K) || Mouse.buttons[1] != 0)
{ {
sbyte2 &= ~0x04; sbyte2 &= ~0x04;
} }
@ -706,7 +708,7 @@ namespace mame
{ {
sbyte2 |= 0x04; sbyte2 |= 0x04;
} }
if (Keyboard.IsPressed(Corekey.R)) if (Keyboard.IsPressed(MotionKey.UNKNOW_R)) //if (Keyboard.IsPressed(Corekey.R))
{ {
sbyte2 &= ~0x08; sbyte2 &= ~0x08;
} }
@ -714,7 +716,7 @@ namespace mame
{ {
sbyte2 |= 0x08; sbyte2 |= 0x08;
} }
if (Keyboard.IsPressed(Corekey.T)) if (Keyboard.IsPressed(MotionKey.UNKNOW_T)) //if (Keyboard.IsPressed(Corekey.T))
{ {
sbyte2 &= ~0x10; sbyte2 &= ~0x10;
} }

View File

@ -10,7 +10,7 @@ namespace mame
} }
public static void loop_inputports_taitob_pbobble() public static void loop_inputports_taitob_pbobble()
{ {
if (Keyboard.IsPressed(Corekey.D5)) if (Keyboard.IsPressed(MotionKey.P1_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D5))
{ {
dswb &= unchecked((byte)~0x10); dswb &= unchecked((byte)~0x10);
} }
@ -18,7 +18,7 @@ namespace mame
{ {
dswb |= 0x10; dswb |= 0x10;
} }
if (Keyboard.IsPressed(Corekey.D6)) if (Keyboard.IsPressed(MotionKey.P2_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D6))
{ {
dswb &= unchecked((byte)~0x20); dswb &= unchecked((byte)~0x20);
} }
@ -26,7 +26,7 @@ namespace mame
{ {
dswb |= 0x20; dswb |= 0x20;
} }
if (Keyboard.IsPressed(Corekey.D1)) if (Keyboard.IsPressed(MotionKey.P1_GAMESTART))//if (Keyboard.IsPressed(Corekey.D1))
{ {
sbyte0 &= ~0x10; sbyte0 &= ~0x10;
} }
@ -34,7 +34,7 @@ namespace mame
{ {
sbyte0 |= 0x10; sbyte0 |= 0x10;
} }
if (Keyboard.IsPressed(Corekey.D2)) if (Keyboard.IsPressed(MotionKey.P2_GAMESTART))//if (Keyboard.IsPressed(Corekey.D2))
{ {
sbyte0 &= ~0x20; sbyte0 &= ~0x20;
} }
@ -42,7 +42,7 @@ namespace mame
{ {
sbyte0 |= 0x20; sbyte0 |= 0x20;
} }
if (Keyboard.IsPressed(Corekey.D)) if (Keyboard.IsPressed(MotionKey.P1_RIGHT))//if (Keyboard.IsPressed(Corekey.D))
{ {
sbyte2 &= ~0x08; sbyte2 &= ~0x08;
} }
@ -50,7 +50,7 @@ namespace mame
{ {
sbyte2 |= 0x08; sbyte2 |= 0x08;
} }
if (Keyboard.IsPressed(Corekey.A)) if (Keyboard.IsPressed(MotionKey.P1_LEFT))//if (Keyboard.IsPressed(Corekey.A))
{ {
sbyte2 &= ~0x04; sbyte2 &= ~0x04;
} }
@ -58,7 +58,7 @@ namespace mame
{ {
sbyte2 |= 0x04; sbyte2 |= 0x04;
} }
if (Keyboard.IsPressed(Corekey.S)) if (Keyboard.IsPressed(MotionKey.P1_DOWN))//if (Keyboard.IsPressed(Corekey.S))
{ {
sbyte2 &= ~0x02; sbyte2 &= ~0x02;
} }
@ -66,7 +66,7 @@ namespace mame
{ {
sbyte2 |= 0x02; sbyte2 |= 0x02;
} }
if (Keyboard.IsPressed(Corekey.W)) if (Keyboard.IsPressed(MotionKey.P1_UP))//if (Keyboard.IsPressed(Corekey.W))
{ {
sbyte2 &= ~0x01; sbyte2 &= ~0x01;
} }
@ -74,7 +74,7 @@ namespace mame
{ {
sbyte2 |= 0x01; sbyte2 |= 0x01;
} }
if (Keyboard.IsPressed(Corekey.J)) if (Keyboard.IsPressed(MotionKey.P1_BTN_1))//if (Keyboard.IsPressed(Corekey.J))
{ {
sbyte1 &= ~0x01; sbyte1 &= ~0x01;
} }
@ -82,7 +82,7 @@ namespace mame
{ {
sbyte1 |= 0x01; sbyte1 |= 0x01;
} }
if (Keyboard.IsPressed(Corekey.K)) if (Keyboard.IsPressed(MotionKey.P1_BTN_2))//if (Keyboard.IsPressed(Corekey.K))
{ {
sbyte1 &= ~0x02; sbyte1 &= ~0x02;
} }
@ -90,7 +90,7 @@ namespace mame
{ {
sbyte1 |= 0x02; sbyte1 |= 0x02;
} }
if (Keyboard.IsPressed(Corekey.L)) if (Keyboard.IsPressed(MotionKey.P1_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.L))
{ {
sbyte1 &= ~0x04; sbyte1 &= ~0x04;
} }
@ -98,7 +98,7 @@ namespace mame
{ {
sbyte1 |= 0x04; sbyte1 |= 0x04;
} }
if (Keyboard.IsPressed(Corekey.Right)) if (Keyboard.IsPressed(MotionKey.P2_RIGHT))//if (Keyboard.IsPressed(Corekey.Right))
{ {
sbyte2 &= unchecked((sbyte)~0x80); sbyte2 &= unchecked((sbyte)~0x80);
} }
@ -106,7 +106,7 @@ namespace mame
{ {
sbyte2 |= unchecked((sbyte)0x80); sbyte2 |= unchecked((sbyte)0x80);
} }
if (Keyboard.IsPressed(Corekey.Left)) if (Keyboard.IsPressed(MotionKey.P2_LEFT))//if (Keyboard.IsPressed(Corekey.Left))
{ {
sbyte2 &= ~0x40; sbyte2 &= ~0x40;
} }
@ -114,7 +114,7 @@ namespace mame
{ {
sbyte2 |= 0x40; sbyte2 |= 0x40;
} }
if (Keyboard.IsPressed(Corekey.Down)) if (Keyboard.IsPressed(MotionKey.P2_DOWN)) //if (Keyboard.IsPressed(Corekey.Down))
{ {
sbyte2 &= ~0x20; sbyte2 &= ~0x20;
} }
@ -122,7 +122,7 @@ namespace mame
{ {
sbyte2 |= 0x20; sbyte2 |= 0x20;
} }
if (Keyboard.IsPressed(Corekey.Up)) if (Keyboard.IsPressed(MotionKey.P2_UP))//if (Keyboard.IsPressed(Corekey.Up))
{ {
sbyte2 &= ~0x10; sbyte2 &= ~0x10;
} }
@ -130,7 +130,7 @@ namespace mame
{ {
sbyte2 |= 0x10; sbyte2 |= 0x10;
} }
if (Keyboard.IsPressed(Corekey.NumPad1)) if (Keyboard.IsPressed(MotionKey.P2_BTN_1))//if (Keyboard.IsPressed(Corekey.NumPad1))
{ {
sbyte1 &= ~0x10; sbyte1 &= ~0x10;
} }
@ -138,7 +138,7 @@ namespace mame
{ {
sbyte1 |= 0x10; sbyte1 |= 0x10;
} }
if (Keyboard.IsPressed(Corekey.NumPad2)) if (Keyboard.IsPressed(MotionKey.P2_BTN_2))//if (Keyboard.IsPressed(Corekey.NumPad2))
{ {
sbyte1 &= ~0x20; sbyte1 &= ~0x20;
} }
@ -146,7 +146,7 @@ namespace mame
{ {
sbyte1 |= 0x20; sbyte1 |= 0x20;
} }
if (Keyboard.IsPressed(Corekey.NumPad3)) if (Keyboard.IsPressed(MotionKey.P2_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.NumPad3))
{ {
sbyte1 &= ~0x40; sbyte1 &= ~0x40;
} }
@ -154,7 +154,7 @@ namespace mame
{ {
sbyte1 |= 0x40; sbyte1 |= 0x40;
} }
if (Keyboard.IsPressed(Corekey.R)) if (Keyboard.IsPressed(MotionKey.UNKNOW_R)) //if (Keyboard.IsPressed(Corekey.R))
{ {
sbyte0 &= ~0x01; sbyte0 &= ~0x01;
} }
@ -162,7 +162,7 @@ namespace mame
{ {
sbyte0 |= 0x01; sbyte0 |= 0x01;
} }
if (Keyboard.IsPressed(Corekey.T)) if (Keyboard.IsPressed(MotionKey.UNKNOW_T)) //if (Keyboard.IsPressed(Corekey.T))
{ {
sbyte0 &= ~0x02; sbyte0 &= ~0x02;
} }
@ -173,7 +173,7 @@ namespace mame
} }
public static void loop_inputports_taitob_silentd() public static void loop_inputports_taitob_silentd()
{ {
if (Keyboard.IsPressed(Corekey.D5)) if (Keyboard.IsPressed(MotionKey.P1_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D5))
{ {
sbyte1 &= ~0x10; sbyte1 &= ~0x10;
} }
@ -181,7 +181,7 @@ namespace mame
{ {
sbyte1 |= 0x10; sbyte1 |= 0x10;
} }
if (Keyboard.IsPressed(Corekey.D6)) if (Keyboard.IsPressed(MotionKey.P2_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D6))
{ {
sbyte1 &= ~0x20; sbyte1 &= ~0x20;
} }
@ -189,7 +189,7 @@ namespace mame
{ {
sbyte1 |= 0x20; sbyte1 |= 0x20;
} }
if (Keyboard.IsPressed(Corekey.D1)) if (Keyboard.IsPressed(MotionKey.P1_GAMESTART))//if (Keyboard.IsPressed(Corekey.D1))
{ {
sbyte1 &= ~0x04; sbyte1 &= ~0x04;
} }
@ -197,7 +197,7 @@ namespace mame
{ {
sbyte1 |= 0x04; sbyte1 |= 0x04;
} }
if (Keyboard.IsPressed(Corekey.D2)) if (Keyboard.IsPressed(MotionKey.P2_GAMESTART))//if (Keyboard.IsPressed(Corekey.D2))
{ {
sbyte1 &= ~0x08; sbyte1 &= ~0x08;
} }
@ -205,7 +205,7 @@ namespace mame
{ {
sbyte1 |= 0x08; sbyte1 |= 0x08;
} }
if (Keyboard.IsPressed(Corekey.D)) if (Keyboard.IsPressed(MotionKey.P1_RIGHT))//if (Keyboard.IsPressed(Corekey.D))
{ {
sbyte2 &= ~0x08; sbyte2 &= ~0x08;
} }
@ -213,7 +213,7 @@ namespace mame
{ {
sbyte2 |= 0x08; sbyte2 |= 0x08;
} }
if (Keyboard.IsPressed(Corekey.A)) if (Keyboard.IsPressed(MotionKey.P1_LEFT))//if (Keyboard.IsPressed(Corekey.A))
{ {
sbyte2 &= ~0x04; sbyte2 &= ~0x04;
} }
@ -221,7 +221,7 @@ namespace mame
{ {
sbyte2 |= 0x04; sbyte2 |= 0x04;
} }
if (Keyboard.IsPressed(Corekey.S)) if (Keyboard.IsPressed(MotionKey.P1_DOWN))//if (Keyboard.IsPressed(Corekey.S))
{ {
sbyte2 &= ~0x02; sbyte2 &= ~0x02;
} }
@ -229,7 +229,7 @@ namespace mame
{ {
sbyte2 |= 0x02; sbyte2 |= 0x02;
} }
if (Keyboard.IsPressed(Corekey.W)) if (Keyboard.IsPressed(MotionKey.P1_UP))//if (Keyboard.IsPressed(Corekey.W))
{ {
sbyte2 &= ~0x01; sbyte2 &= ~0x01;
} }
@ -237,7 +237,7 @@ namespace mame
{ {
sbyte2 |= 0x01; sbyte2 |= 0x01;
} }
if (Keyboard.IsPressed(Corekey.J)) if (Keyboard.IsPressed(MotionKey.P1_BTN_1))//if (Keyboard.IsPressed(Corekey.J))
{ {
sbyte0 &= ~0x01; sbyte0 &= ~0x01;
} }
@ -245,7 +245,7 @@ namespace mame
{ {
sbyte0 |= 0x01; sbyte0 |= 0x01;
} }
if (Keyboard.IsPressed(Corekey.K)) if (Keyboard.IsPressed(MotionKey.P1_BTN_2))//if (Keyboard.IsPressed(Corekey.K))
{ {
sbyte0 &= ~0x02; sbyte0 &= ~0x02;
} }
@ -253,7 +253,7 @@ namespace mame
{ {
sbyte0 |= 0x02; sbyte0 |= 0x02;
} }
if (Keyboard.IsPressed(Corekey.L)) if (Keyboard.IsPressed(MotionKey.P1_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.L))
{ {
sbyte0 &= ~0x04; sbyte0 &= ~0x04;
} }
@ -261,7 +261,7 @@ namespace mame
{ {
sbyte0 |= 0x04; sbyte0 |= 0x04;
} }
if (Keyboard.IsPressed(Corekey.Right)) if (Keyboard.IsPressed(MotionKey.P2_RIGHT))//if (Keyboard.IsPressed(Corekey.Right))
{ {
sbyte2 &= unchecked((sbyte)~0x80); sbyte2 &= unchecked((sbyte)~0x80);
} }
@ -269,7 +269,7 @@ namespace mame
{ {
sbyte2 |= unchecked((sbyte)0x80); sbyte2 |= unchecked((sbyte)0x80);
} }
if (Keyboard.IsPressed(Corekey.Left)) if (Keyboard.IsPressed(MotionKey.P2_LEFT))//if (Keyboard.IsPressed(Corekey.Left))
{ {
sbyte2 &= ~0x40; sbyte2 &= ~0x40;
} }
@ -277,7 +277,7 @@ namespace mame
{ {
sbyte2 |= 0x40; sbyte2 |= 0x40;
} }
if (Keyboard.IsPressed(Corekey.Down)) if (Keyboard.IsPressed(MotionKey.P2_DOWN)) //if (Keyboard.IsPressed(Corekey.Down))
{ {
sbyte2 &= ~0x20; sbyte2 &= ~0x20;
} }
@ -285,7 +285,7 @@ namespace mame
{ {
sbyte2 |= 0x20; sbyte2 |= 0x20;
} }
if (Keyboard.IsPressed(Corekey.Up)) if (Keyboard.IsPressed(MotionKey.P2_UP))//if (Keyboard.IsPressed(Corekey.Up))
{ {
sbyte2 &= ~0x10; sbyte2 &= ~0x10;
} }
@ -293,7 +293,7 @@ namespace mame
{ {
sbyte2 |= 0x10; sbyte2 |= 0x10;
} }
if (Keyboard.IsPressed(Corekey.NumPad1)) if (Keyboard.IsPressed(MotionKey.P2_BTN_1))//if (Keyboard.IsPressed(Corekey.NumPad1))
{ {
sbyte0 &= ~0x08; sbyte0 &= ~0x08;
} }
@ -301,7 +301,7 @@ namespace mame
{ {
sbyte0 |= 0x08; sbyte0 |= 0x08;
} }
if (Keyboard.IsPressed(Corekey.NumPad2)) if (Keyboard.IsPressed(MotionKey.P2_BTN_2))//if (Keyboard.IsPressed(Corekey.NumPad2))
{ {
sbyte0 &= ~0x10; sbyte0 &= ~0x10;
} }
@ -309,7 +309,7 @@ namespace mame
{ {
sbyte0 |= 0x10; sbyte0 |= 0x10;
} }
if (Keyboard.IsPressed(Corekey.NumPad3)) if (Keyboard.IsPressed(MotionKey.P2_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.NumPad3))
{ {
sbyte0 &= ~0x20; sbyte0 &= ~0x20;
} }
@ -317,7 +317,7 @@ namespace mame
{ {
sbyte0 |= 0x20; sbyte0 |= 0x20;
} }
if (Keyboard.IsPressed(Corekey.R)) if (Keyboard.IsPressed(MotionKey.UNKNOW_R)) //if (Keyboard.IsPressed(Corekey.R))
{ {
sbyte1 &= ~0x01; sbyte1 &= ~0x01;
} }
@ -325,7 +325,7 @@ namespace mame
{ {
sbyte1 |= 0x01; sbyte1 |= 0x01;
} }
if (Keyboard.IsPressed(Corekey.T)) if (Keyboard.IsPressed(MotionKey.UNKNOW_T)) //if (Keyboard.IsPressed(Corekey.T))
{ {
sbyte1 &= ~0x02; sbyte1 &= ~0x02;
} }

View File

@ -6,7 +6,7 @@ namespace mame
{ {
public static void loop_inputports_tehkan_pbaction() public static void loop_inputports_tehkan_pbaction()
{ {
if (Keyboard.IsPressed(Corekey.D5)) if (Keyboard.IsPressed(MotionKey.P1_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D5))
{ {
byte2 |= 0x01; byte2 |= 0x01;
} }
@ -14,7 +14,7 @@ namespace mame
{ {
byte2 &= unchecked((byte)~0x01); byte2 &= unchecked((byte)~0x01);
} }
if (Keyboard.IsPressed(Corekey.D6)) if (Keyboard.IsPressed(MotionKey.P2_INSERT_COIN))//if (Keyboard.IsPressed(Corekey.D6))
{ {
byte2 |= 0x02; byte2 |= 0x02;
} }
@ -22,7 +22,7 @@ namespace mame
{ {
byte2 &= unchecked((byte)~0x02); byte2 &= unchecked((byte)~0x02);
} }
if (Keyboard.IsPressed(Corekey.D1)) if (Keyboard.IsPressed(MotionKey.P1_GAMESTART))//if (Keyboard.IsPressed(Corekey.D1))
{ {
byte2 |= 0x04; byte2 |= 0x04;
} }
@ -30,7 +30,7 @@ namespace mame
{ {
byte2 &= unchecked((byte)~0x04); byte2 &= unchecked((byte)~0x04);
} }
if (Keyboard.IsPressed(Corekey.D2)) if (Keyboard.IsPressed(MotionKey.P2_GAMESTART))//if (Keyboard.IsPressed(Corekey.D2))
{ {
byte2 |= 0x08; byte2 |= 0x08;
} }
@ -38,7 +38,7 @@ namespace mame
{ {
byte2 &= unchecked((byte)~0x08); byte2 &= unchecked((byte)~0x08);
} }
if (Keyboard.IsPressed(Corekey.J)) if (Keyboard.IsPressed(MotionKey.P1_BTN_1))//if (Keyboard.IsPressed(Corekey.J))
{ {
byte0 |= 0x08; byte0 |= 0x08;
} }
@ -46,7 +46,7 @@ namespace mame
{ {
byte0 &= unchecked((byte)~0x08); byte0 &= unchecked((byte)~0x08);
} }
if (Keyboard.IsPressed(Corekey.K)) if (Keyboard.IsPressed(MotionKey.P1_BTN_2))//if (Keyboard.IsPressed(Corekey.K))
{ {
byte0 |= 0x10; byte0 |= 0x10;
} }
@ -54,7 +54,7 @@ namespace mame
{ {
byte0 &= unchecked((byte)~0x10); byte0 &= unchecked((byte)~0x10);
} }
if (Keyboard.IsPressed(Corekey.L)) if (Keyboard.IsPressed(MotionKey.P1_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.L))
{ {
byte0 |= 0x01; byte0 |= 0x01;
} }
@ -62,7 +62,7 @@ namespace mame
{ {
byte0 &= unchecked((byte)~0x01); byte0 &= unchecked((byte)~0x01);
} }
if (Keyboard.IsPressed(Corekey.U)) if (Keyboard.IsPressed(MotionKey.P1_BTN_3))//if (Keyboard.IsPressed(Corekey.U))
{ {
byte0 |= 0x04; byte0 |= 0x04;
} }
@ -70,7 +70,7 @@ namespace mame
{ {
byte0 &= unchecked((byte)~0x04); byte0 &= unchecked((byte)~0x04);
} }
if (Keyboard.IsPressed(Corekey.NumPad1)) if (Keyboard.IsPressed(MotionKey.P2_BTN_1))//if (Keyboard.IsPressed(Corekey.NumPad1))
{ {
byte1 |= 0x08; byte1 |= 0x08;
} }
@ -78,7 +78,7 @@ namespace mame
{ {
byte1 &= unchecked((byte)~0x08); byte1 &= unchecked((byte)~0x08);
} }
if (Keyboard.IsPressed(Corekey.NumPad2)) if (Keyboard.IsPressed(MotionKey.P2_BTN_2))//if (Keyboard.IsPressed(Corekey.NumPad2))
{ {
byte1 |= 0x10; byte1 |= 0x10;
} }
@ -86,7 +86,7 @@ namespace mame
{ {
byte1 &= unchecked((byte)~0x10); byte1 &= unchecked((byte)~0x10);
} }
if (Keyboard.IsPressed(Corekey.NumPad3)) if (Keyboard.IsPressed(MotionKey.P2_UNKNOW_E))//if (Keyboard.IsPressed(Corekey.NumPad3))
{ {
byte1 |= 0x01; byte1 |= 0x01;
} }
@ -94,7 +94,7 @@ namespace mame
{ {
byte1 &= unchecked((byte)~0x01); byte1 &= unchecked((byte)~0x01);
} }
if (Keyboard.IsPressed(Corekey.NumPad4)) if (Keyboard.IsPressed(MotionKey.P2_BTN_3))//if (Keyboard.IsPressed(Corekey.NumPad4))
{ {
byte1 |= 0x04; byte1 |= 0x04;
} }

View File

@ -2,7 +2,6 @@
{ {
public interface IKeyboard public interface IKeyboard
{ {
bool IsPressed(Corekey key); MotionKey[] GetPressedKeys();
bool IsTriggered(Corekey key);
} }
} }

View File

@ -1,7 +1,8 @@
namespace MAME.Core.run_interface namespace MAME.Core.run_interface
{ {
public enum MotionKey public enum MotionKey : byte
{ {
EMU_PAUSED = 0,
P1_INSERT_COIN, P1_INSERT_COIN,
P1_GAMESTART, P1_GAMESTART,
P1_UP, P1_UP,
@ -14,8 +15,8 @@
P1_BTN_4, P1_BTN_4,
P1_BTN_5, P1_BTN_5,
P1_BTN_6, P1_BTN_6,
P1_UNKNOW_E,
P1_UNKNOW_F,
P2_INSERT_COIN, P2_INSERT_COIN,
P2_GAMESTART, P2_GAMESTART,
P2_UP, P2_UP,
@ -28,5 +29,31 @@
P2_BTN_4, P2_BTN_4,
P2_BTN_5, P2_BTN_5,
P2_BTN_6, P2_BTN_6,
P2_UNKNOW_E,
P2_UNKNOW_F,
UNKNOW_Q,
UNKNOW_N,
UNKNOW_R,
UNKNOW_T,
UNKNOW_M,
UNKNOW_V,
UNKNOW_B,
F10,
F9,
F8,
F7,
F6,
F5,
F4,
F3,
F2,
F1,
Escape,
LeftShift,
RightShift,
/// <summary>
/// 用于标记最后一个
/// </summary>
FinalKey
} }
} }

View File

@ -1737,8 +1737,8 @@ namespace mame
private static void osd_update_audio_stream(byte[] buffer, int samples_this_frame) private static void osd_update_audio_stream(byte[] buffer, int samples_this_frame)
{ {
////只需要这部分逻辑 ////只需要这部分逻辑
//SubmitSamples(buffer, samples_this_frame); SubmitSamples(buffer, samples_this_frame);
//return; return;
//TODO后面才考虑原样的处理 //TODO后面才考虑原样的处理

40
note.txt Normal file
View File

@ -0,0 +1,40 @@
TODO
mainMotion
sSelect 上次默认选择
Wavebuffer
//desc1.BufferBytes = 0x9400;
ResizeMain()
igs011/Input
貌似比较特殊 需要单独定理
emu/gdi
public static int[] drawcrosshair_opwolf(int[] bm1)
{
int[] bm2 = bm1;
//TODO
return bm2;
}
//待处理
drawcrosshair(TempData);
emu/Mouse
Update()
Neoprot
//TODO 暂时注释 用不上
//public static int BITSWAP16
Sound: //考虑清楚
osd_update_audio_stream