示例#1
0
        public static void frame_update_analog_field_forgottn_p1(analog_field_state analog)
        {
            bool keypressed = false;
            int  delta      = 0;
            int  value2;

            value2 = apply_analog_min_max(analog, analog.accum);
            if (analog.accum != value2)
            {
                int i1 = 1;
            }
            analog.previous = analog.accum = value2;
            if (Keyboard.IsPressed(Key.NumPad2))
            {
                keypressed         = true;
                delta             -= analog_p0.delta * 0x200;
                analog.lastdigital = 1;
            }
            if (Keyboard.IsPressed(Key.NumPad3))
            {
                keypressed         = true;
                delta             += analog_p0.delta * 0x200;
                analog.lastdigital = 2;
            }
            analog.accum += delta;
            if (!keypressed)
            {
                analog.lastdigital = 0;
            }
        }
示例#2
0
        public static void frame_update_analog_field_quester_p1(analog_field_state analog)
        {
            bool keypressed = false;
            int  delta      = 0;
            int  value2;

            value2          = apply_analog_min_max(analog, analog.accum);
            analog.previous = analog.accum = value2;
            if (Keyboard.IsPressed(Key.Left))
            {
                keypressed         = true;
                delta             -= analog_p0.delta * 0x200;
                analog.lastdigital = 1;
            }
            if (Keyboard.IsPressed(Key.Right))
            {
                keypressed         = true;
                delta             += analog_p0.delta * 0x200;
                analog.lastdigital = 2;
            }
            analog.accum += delta;
            if (!keypressed)
            {
                analog.lastdigital = 0;
            }
        }
示例#3
0
        public static void loop_inputports_ns1_tankfrce4()
        {
            if (Keyboard.IsPressed(Key.D5))
            {
                byte2 &= unchecked ((byte)~0x10);
            }
            else
            {
                byte2 |= 0x10;
            }
            if (Keyboard.IsPressed(Key.D6))
            {
                byte2 &= unchecked ((byte)~0x08);
            }
            else
            {
                byte2 |= 0x08;
            }
            if (Keyboard.IsPressed(Key.D))
            {
                byte00 &= unchecked ((byte)~0x01);
            }
            else
            {
                byte00 |= 0x01;
            }
            if (Keyboard.IsPressed(Key.A))
            {
                byte00 &= unchecked ((byte)~0x02);
            }
            else
            {
                byte00 |= 0x02;
            }
            if (Keyboard.IsPressed(Key.S))
            {
                byte00 &= unchecked ((byte)~0x04);
            }
            else
            {
                byte00 |= 0x04;
            }
            if (Keyboard.IsPressed(Key.W))
            {
                byte00 &= unchecked ((byte)~0x08);
            }
            else
            {
                byte00 |= 0x08;
            }
            if (Keyboard.IsPressed(Key.J))
            {
                byte00 &= unchecked ((byte)~0x10);
            }
            else
            {
                byte00 |= 0x10;
            }
            if (Keyboard.IsPressed(Key.Right))
            {
                byte02 &= unchecked ((byte)~0x01);
            }
            else
            {
                byte02 |= 0x01;
            }
            if (Keyboard.IsPressed(Key.Left))
            {
                byte02 &= unchecked ((byte)~0x02);
            }
            else
            {
                byte02 |= 0x02;
            }
            if (Keyboard.IsPressed(Key.Down))
            {
                byte02 &= unchecked ((byte)~0x04);
            }
            else
            {
                byte02 |= 0x04;
            }
            if (Keyboard.IsPressed(Key.Up))
            {
                byte02 &= unchecked ((byte)~0x08);
            }
            else
            {
                byte02 |= 0x08;
            }
            if (Keyboard.IsPressed(Key.NumPad1))
            {
                byte02 &= unchecked ((byte)~0x10);
            }
            else
            {
                byte02 |= 0x10;
            }

            /*if (Keyboard.IsPressed(Key.R))
             * {
             *  byte2 &= unchecked((byte)~0x20);
             * }
             * else
             * {
             *  byte2 |= 0x20;
             * }
             * if (Keyboard.IsPressed(Key.T))
             * {
             *  byte2 &= unchecked((byte)~0x40);
             * }
             * else
             * {
             *  byte2 |= 0x40;
             * }*/
        }
示例#4
0
 public static void loop_inputports_ns1_faceoff()
 {
     if (Keyboard.IsPressed(Key.D5))
     {
         byte2 &= unchecked ((byte)~0x10);
     }
     else
     {
         byte2 |= 0x10;
     }
     if (Keyboard.IsPressed(Key.D6))
     {
         byte2 &= unchecked ((byte)~0x08);
     }
     else
     {
         byte2 |= 0x08;
     }
     if (Keyboard.IsPressed(Key.D1))
     {
         byte0 &= unchecked ((byte)~0x80);
     }
     else
     {
         byte0 |= 0x80;
     }
     if (Keyboard.IsPressed(Key.D2))
     {
         byte1 &= unchecked ((byte)~0x80);
     }
     else
     {
         byte1 |= 0x80;
     }
     if (Keyboard.IsPressed(Key.D))
     {
         byte00 &= unchecked ((byte)~0x01);
     }
     else
     {
         byte00 |= 0x01;
     }
     if (Keyboard.IsPressed(Key.A))
     {
         byte00 &= unchecked ((byte)~0x02);
     }
     else
     {
         byte00 |= 0x02;
     }
     if (Keyboard.IsPressed(Key.S))
     {
         byte00 &= unchecked ((byte)~0x04);
     }
     else
     {
         byte00 |= 0x04;
     }
     if (Keyboard.IsPressed(Key.W))
     {
         byte00 &= unchecked ((byte)~0x08);
     }
     else
     {
         byte00 |= 0x08;
     }
     if (Keyboard.IsPressed(Key.J))
     {
         byte00 &= unchecked ((byte)~0x10);
     }
     else
     {
         byte00 |= 0x10;
     }
     if (Keyboard.IsPressed(Key.K))
     {
         byte01 &= unchecked ((byte)~0x10);
     }
     else
     {
         byte01 |= 0x10;
     }
     if (Keyboard.IsPressed(Key.Right))
     {
         byte01 &= unchecked ((byte)~0x01);
     }
     else
     {
         byte01 |= 0x01;
     }
     if (Keyboard.IsPressed(Key.Left))
     {
         byte01 &= unchecked ((byte)~0x02);
     }
     else
     {
         byte01 |= 0x02;
     }
     if (Keyboard.IsPressed(Key.Down))
     {
         byte01 &= unchecked ((byte)~0x04);
     }
     else
     {
         byte01 |= 0x04;
     }
     if (Keyboard.IsPressed(Key.Up))
     {
         byte01 &= unchecked ((byte)~0x08);
     }
     else
     {
         byte01 |= 0x08;
     }
     if (Keyboard.IsPressed(Key.R))
     {
         byte2 &= unchecked ((byte)~0x20);
     }
     else
     {
         byte2 |= 0x20;
     }
     if (Keyboard.IsPressed(Key.T))
     {
         byte2 &= unchecked ((byte)~0x40);
     }
     else
     {
         byte2 |= 0x40;
     }
 }
示例#5
0
 public static void loop_inputports_ns1_berabohm()
 {
     if (Keyboard.IsPressed(Key.D5))
     {
         byte2 &= unchecked ((byte)~0x10);
     }
     else
     {
         byte2 |= 0x10;
     }
     if (Keyboard.IsPressed(Key.D6))
     {
         byte2 &= unchecked ((byte)~0x08);
     }
     else
     {
         byte2 |= 0x08;
     }
     if (Keyboard.IsPressed(Key.D1))
     {
         byte0 &= unchecked ((byte)~0x80);
     }
     else
     {
         byte0 |= 0x80;
     }
     if (Keyboard.IsPressed(Key.D2))
     {
         byte1 &= unchecked ((byte)~0x80);
     }
     else
     {
         byte1 |= 0x80;
     }
     if (Keyboard.IsPressed(Key.D))
     {
         byte0 &= unchecked ((byte)~0x01);
     }
     else
     {
         byte0 |= 0x01;
     }
     if (Keyboard.IsPressed(Key.A))
     {
         byte0 &= unchecked ((byte)~0x02);
     }
     else
     {
         byte0 |= 0x02;
     }
     if (Keyboard.IsPressed(Key.S))
     {
         byte0 &= unchecked ((byte)~0x04);
     }
     else
     {
         byte0 |= 0x04;
     }
     if (Keyboard.IsPressed(Key.W))
     {
         byte0 &= unchecked ((byte)~0x08);
     }
     else
     {
         byte0 |= 0x08;
     }
     if (Keyboard.IsPressed(Key.J))
     {
         byte01 |= 0x01;
     }
     else
     {
         byte01 &= unchecked ((byte)~0x01);
     }
     if (Keyboard.IsPressed(Key.K))
     {
         byte01 |= 0x02;
     }
     else
     {
         byte01 &= unchecked ((byte)~0x02);
     }
     if (Keyboard.IsPressed(Key.L))
     {
         byte01 |= 0x04;
     }
     else
     {
         byte01 &= unchecked ((byte)~0x04);
     }
     if (Keyboard.IsPressed(Key.U))
     {
         byte00 |= 0x01;
     }
     else
     {
         byte00 &= unchecked ((byte)~0x01);
     }
     if (Keyboard.IsPressed(Key.I))
     {
         byte00 |= 0x02;
     }
     else
     {
         byte00 &= unchecked ((byte)~0x02);
     }
     if (Keyboard.IsPressed(Key.O))
     {
         byte00 |= 0x04;
     }
     else
     {
         byte00 &= unchecked ((byte)~0x04);
     }
     if (Keyboard.IsPressed(Key.Right))
     {
         byte1 &= unchecked ((byte)~0x01);
     }
     else
     {
         byte1 |= 0x01;
     }
     if (Keyboard.IsPressed(Key.Left))
     {
         byte1 &= unchecked ((byte)~0x02);
     }
     else
     {
         byte1 |= 0x02;
     }
     if (Keyboard.IsPressed(Key.Down))
     {
         byte1 &= unchecked ((byte)~0x04);
     }
     else
     {
         byte1 |= 0x04;
     }
     if (Keyboard.IsPressed(Key.Up))
     {
         byte1 &= unchecked ((byte)~0x08);
     }
     else
     {
         byte1 |= 0x08;
     }
     if (Keyboard.IsPressed(Key.NumPad1))
     {
         byte03 |= 0x01;
     }
     else
     {
         byte03 &= unchecked ((byte)~0x01);
     }
     if (Keyboard.IsPressed(Key.NumPad2))
     {
         byte03 |= 0x02;
     }
     else
     {
         byte03 &= unchecked ((byte)~0x02);
     }
     if (Keyboard.IsPressed(Key.NumPad3))
     {
         byte03 |= 0x04;
     }
     else
     {
         byte03 &= unchecked ((byte)~0x04);
     }
     if (Keyboard.IsPressed(Key.NumPad4))
     {
         byte02 |= 0x01;
     }
     else
     {
         byte02 &= unchecked ((byte)~0x01);
     }
     if (Keyboard.IsPressed(Key.NumPad5))
     {
         byte02 |= 0x02;
     }
     else
     {
         byte02 &= unchecked ((byte)~0x02);
     }
     if (Keyboard.IsPressed(Key.NumPad6))
     {
         byte02 |= 0x04;
     }
     else
     {
         byte02 &= unchecked ((byte)~0x04);
     }
     if (Keyboard.IsPressed(Key.R))
     {
         byte2 &= unchecked ((byte)~0x20);
     }
     else
     {
         byte2 |= 0x20;
     }
     if (Keyboard.IsPressed(Key.T))
     {
         byte2 &= unchecked ((byte)~0x40);
     }
     else
     {
         byte2 |= 0x40;
     }
 }
示例#6
0
 public static void loop_inputports_ns1_quester()
 {
     if (Keyboard.IsPressed(Key.D5))
     {
         byte2 &= unchecked ((byte)~0x10);
     }
     else
     {
         byte2 |= 0x10;
     }
     if (Keyboard.IsPressed(Key.D6))
     {
         byte2 &= unchecked ((byte)~0x08);
     }
     else
     {
         byte2 |= 0x08;
     }
     if (Keyboard.IsPressed(Key.D1))
     {
         byte0 &= unchecked ((byte)~0x80);
     }
     else
     {
         byte0 |= 0x80;
     }
     if (Keyboard.IsPressed(Key.D2))
     {
         byte1 &= unchecked ((byte)~0x80);
     }
     else
     {
         byte1 |= 0x80;
     }
     if (Keyboard.IsPressed(Key.J))
     {
         byte0 &= unchecked ((byte)~0x10);
     }
     else
     {
         byte0 |= 0x10;
     }
     if (Keyboard.IsPressed(Key.K))
     {
         byte0 &= unchecked ((byte)~0x20);
     }
     else
     {
         byte0 |= 0x20;
     }
     if (Keyboard.IsPressed(Key.L))
     {
         byte0 &= unchecked ((byte)~0x40);
     }
     else
     {
         byte0 |= 0x40;
     }
     if (Keyboard.IsPressed(Key.NumPad1))
     {
         byte1 &= unchecked ((byte)~0x10);
     }
     else
     {
         byte1 |= 0x10;
     }
     if (Keyboard.IsPressed(Key.NumPad2))
     {
         byte1 &= unchecked ((byte)~0x20);
     }
     else
     {
         byte1 |= 0x20;
     }
     if (Keyboard.IsPressed(Key.NumPad3))
     {
         byte1 &= unchecked ((byte)~0x40);
     }
     else
     {
         byte1 |= 0x40;
     }
     if (Keyboard.IsPressed(Key.R))
     {
         byte2 &= unchecked ((byte)~0x20);
     }
     else
     {
         byte2 |= 0x20;
     }
     if (Keyboard.IsPressed(Key.T))
     {
         byte2 &= unchecked ((byte)~0x40);
     }
     else
     {
         byte2 |= 0x40;
     }
     Inptport.frame_update_analog_field_quester_p0(Inptport.analog_p0);
     Inptport.frame_update_analog_field_quester_p1(Inptport.analog_p1);
 }
示例#7
0
        public static void handler_ingame()
        {
            Mame.sHandle2 = GetForegroundWindow().ToString();
            if (Mame.sHandle1 == Mame.sHandle2)
            {
                Mame.is_foreground = true;
            }
            else
            {
                Mame.is_foreground = false;
            }
            bool is_paused = Mame.mame_is_paused();

            if (single_step)
            {
                Mame.mame_pause(true);
                single_step = false;
            }
            if (Mame.is_foreground)
            {
                if (Keyboard.IsPressed(Key.F3))
                {
                    cpurun();
                    Mame.playState = Mame.PlayState.PLAY_RESET;
                }
                if (Keyboard.IsTriggered(Key.F7))
                {
                    cpurun();
                    if (Keyboard.IsPressed(Key.LeftShift) || Keyboard.IsPressed(Key.RightShift))
                    {
                        Mame.playState = Mame.PlayState.PLAY_SAVE;
                    }
                    else
                    {
                        Mame.playState = Mame.PlayState.PLAY_LOAD;
                    }
                    return;
                }
                if (Keyboard.IsTriggered(Key.F8))
                {
                    cpurun();
                    if (Keyboard.IsPressed(Key.LeftShift) || Keyboard.IsPressed(Key.RightShift))
                    {
                        if (Mame.playState == Mame.PlayState.PLAY_RECORDRUNNING)
                        {
                            Mame.playState = Mame.PlayState.PLAY_RECORDEND;
                        }
                        else
                        {
                            Mame.playState = Mame.PlayState.PLAY_RECORDSTART;
                        }
                    }
                    else
                    {
                        Mame.playState = Mame.PlayState.PLAY_REPLAYSTART;
                    }
                    return;
                }
                if (Keyboard.IsTriggered(Key.P))
                {
                    if (is_paused && (Keyboard.IsPressed(Key.LeftShift) || Keyboard.IsPressed(Key.RightShift)))
                    {
                        single_step = true;
                        Mame.mame_pause(false);
                    }
                    else
                    {
                        Mame.mame_pause(!Mame.mame_is_paused());
                        Thread t1 = new Thread(mainform.HandleMouse);
                        t1.Start();
                    }
                }
                if (Keyboard.IsTriggered(Key.F10))
                {
                    Keyboard.bF10 = true;
                    bool b1 = Video.global_throttle;
                    Video.global_throttle = !b1;
                }
            }
        }
示例#8
0
 public static void loop_inputports_m92_common()
 {
     if (Keyboard.IsPressed(Key.D5))
     {
         ushort1 &= unchecked ((ushort)~0x0004);
     }
     else
     {
         ushort1 |= 0x0004;
     }
     if (Keyboard.IsPressed(Key.D6))
     {
         ushort1 &= unchecked ((ushort)~0x0008);
     }
     else
     {
         ushort1 |= 0x0008;
     }
     if (Keyboard.IsPressed(Key.D1))
     {
         ushort1 &= unchecked ((ushort)~0x0001);
     }
     else
     {
         ushort1 |= 0x0001;
     }
     if (Keyboard.IsPressed(Key.D2))
     {
         ushort1 &= unchecked ((ushort)~0x0002);
     }
     else
     {
         ushort1 |= 0x0002;
     }
     if (Keyboard.IsPressed(Key.D))
     {
         ushort0 &= unchecked ((ushort)~0x0001);
     }
     else
     {
         ushort0 |= 0x0001;
     }
     if (Keyboard.IsPressed(Key.A))
     {
         ushort0 &= unchecked ((ushort)~0x0002);
     }
     else
     {
         ushort0 |= 0x0002;
     }
     if (Keyboard.IsPressed(Key.S))
     {
         ushort0 &= unchecked ((ushort)~0x0004);
     }
     else
     {
         ushort0 |= 0x0004;
     }
     if (Keyboard.IsPressed(Key.W))
     {
         ushort0 &= unchecked ((ushort)~0x0008);
     }
     else
     {
         ushort0 |= 0x0008;
     }
     if (Keyboard.IsPressed(Key.J))
     {
         ushort0 &= unchecked ((ushort)~0x0080);
     }
     else
     {
         ushort0 |= 0x0080;
     }
     if (Keyboard.IsPressed(Key.K))
     {
         ushort0 &= unchecked ((ushort)~0x0040);
     }
     else
     {
         ushort0 |= 0x0040;
     }
     if (Keyboard.IsPressed(Key.U))
     {
         ushort0 &= unchecked ((ushort)~0x0020);
     }
     else
     {
         ushort0 |= 0x0020;
     }
     if (Keyboard.IsPressed(Key.I))
     {
         ushort0 &= unchecked ((ushort)~0x0010);
     }
     else
     {
         ushort0 |= 0x0010;
     }
     if (Keyboard.IsPressed(Key.Right))
     {
         ushort0 &= unchecked ((ushort)~0x0100);
     }
     else
     {
         ushort0 |= 0x0100;
     }
     if (Keyboard.IsPressed(Key.Left))
     {
         ushort0 &= unchecked ((ushort)~0x0200);
     }
     else
     {
         ushort0 |= 0x0200;
     }
     if (Keyboard.IsPressed(Key.Down))
     {
         ushort0 &= unchecked ((ushort)~0x0400);
     }
     else
     {
         ushort0 |= 0x0400;
     }
     if (Keyboard.IsPressed(Key.Up))
     {
         ushort0 &= unchecked ((ushort)~0x0800);
     }
     else
     {
         ushort0 |= 0x0800;
     }
     if (Keyboard.IsPressed(Key.NumPad1))
     {
         ushort0 &= unchecked ((ushort)~0x8000);
     }
     else
     {
         ushort0 |= 0x8000;
     }
     if (Keyboard.IsPressed(Key.NumPad2))
     {
         ushort0 &= unchecked ((ushort)~0x4000);
     }
     else
     {
         ushort0 |= 0x4000;
     }
     if (Keyboard.IsPressed(Key.NumPad4))
     {
         ushort0 &= unchecked ((ushort)~0x2000);
     }
     else
     {
         ushort0 |= 0x2000;
     }
     if (Keyboard.IsPressed(Key.NumPad5))
     {
         ushort0 &= unchecked ((ushort)~0x1000);
     }
     else
     {
         ushort0 |= 0x1000;
     }
     if (Keyboard.IsPressed(Key.R))
     {
         ushort1 &= unchecked ((ushort)~0x0010);
     }
     else
     {
         ushort1 |= 0x0010;
     }
     if (Keyboard.IsPressed(Key.T))
     {
         ushort1 &= unchecked ((ushort)~0x0020);
     }
     else
     {
         ushort1 |= 0x0020;
     }
 }
示例#9
0
 public static void loop_inputports_igs011_lhb()
 {
     if (Keyboard.IsPressed(Key.D5))
     {
         sbytec &= ~0x01;
     }
     else
     {
         sbytec |= 0x01;
     }
     if (Keyboard.IsPressed(Key.D6))
     {
         sbytec &= ~0x02;
     }
     else
     {
         sbytec |= 0x02;
     }
     if (Keyboard.IsPressed(Key.D1))
     {
         sbyte0 &= ~0x01;
     }
     else
     {
         sbyte0 |= 0x01;
     }
     if (Keyboard.IsPressed(Key.D2))
     {
         sbyte2 &= ~0x10;
     }
     else
     {
         sbyte2 |= 0x10;
     }
     if (Keyboard.IsPressed(Key.D))
     {
         sbyte0 &= ~0x10;
     }
     else
     {
         sbyte0 |= 0x10;
     }
     if (Keyboard.IsPressed(Key.A))
     {
         sbyte2 &= ~0x02;
     }
     else
     {
         sbyte2 |= 0x02;
     }
     if (Keyboard.IsPressed(Key.S))
     {
         sbyte0 &= ~0x04;
     }
     else
     {
         sbyte0 |= 0x04;
     }
     if (Keyboard.IsPressed(Key.W))
     {
         sbyte2 &= ~0x01;
     }
     else
     {
         sbyte2 |= 0x01;
     }
     if (Keyboard.IsPressed(Key.J))
     {
         sbyte2 &= ~0x04;
     }
     else
     {
         sbyte2 |= 0x04;
     }
     if (Keyboard.IsPressed(Key.K))
     {
         sbyte0 &= ~0x40;
     }
     else
     {
         sbyte0 |= 0x40;
     }
     if (Keyboard.IsPressed(Key.L))
     {
         sbyte2 &= ~0x08;
     }
     else
     {
         sbyte2 |= 0x08;
     }
     if (Keyboard.IsPressed(Key.U))
     {
     }
     else
     {
     }
     if (Keyboard.IsPressed(Key.I))
     {
     }
     else
     {
     }
     if (Keyboard.IsPressed(Key.O))
     {
     }
     else
     {
     }
     if (Keyboard.IsPressed(Key.Right))
     {
         sbyte2 &= ~0x40;
     }
     else
     {
         sbyte2 |= 0x40;
     }
     if (Keyboard.IsPressed(Key.Left))
     {
         sbyte1 &= ~0x08;
     }
     else
     {
         sbyte1 |= 0x08;
     }
     if (Keyboard.IsPressed(Key.Down))
     {
         sbyte2 &= ~0x20;
     }
     else
     {
         sbyte2 |= 0x20;
     }
     if (Keyboard.IsPressed(Key.Up))
     {
         sbyte1 &= ~0x02;
     }
     else
     {
         sbyte1 |= 0x02;
     }
     if (Keyboard.IsPressed(Key.NumPad1))
     {
         sbyte1 &= ~0x20;
     }
     else
     {
         sbyte1 |= 0x20;
     }
     if (Keyboard.IsPressed(Key.NumPad2))
     {
         sbyte2 &= unchecked ((sbyte)~0x80);
     }
     else
     {
         sbyte2 |= unchecked ((sbyte)0x80);
     }
     if (Keyboard.IsPressed(Key.NumPad3))
     {
         sbyte1 &= unchecked ((sbyte)~0x80);
     }
     else
     {
         sbyte1 |= unchecked ((sbyte)0x80);
     }
     if (Keyboard.IsPressed(Key.NumPad4))
     {
     }
     else
     {
     }
     if (Keyboard.IsPressed(Key.NumPad5))
     {
     }
     else
     {
     }
     if (Keyboard.IsPressed(Key.NumPad6))
     {
     }
     else
     {
     }
     if (Keyboard.IsPressed(Key.R))
     {
         sbytec &= ~0x08;
     }
     else
     {
         sbytec |= 0x08;
     }
     if (Keyboard.IsPressed(Key.T))
     {
         sbytec &= ~0x10;
     }
     else
     {
         sbytec |= 0x10;
     }
 }
示例#10
0
 public static void loop_inputports_neogeo_irrmaze()
 {
     if (Keyboard.IsPressed(Key.D5))
     {
         short3 &= ~0x0001;
     }
     else
     {
         short3 |= 0x0001;
     }
     if (Keyboard.IsPressed(Key.D6))
     {
         short3 &= ~0x0002;
     }
     else
     {
         short3 |= 0x0002;
     }
     if (Keyboard.IsPressed(Key.D1))
     {
         short2 &= ~0x0100;
     }
     else
     {
         short2 |= 0x0100;
     }
     if (Keyboard.IsPressed(Key.D2))
     {
         short2 &= ~0x0400;
     }
     else
     {
         short2 |= 0x0400;
     }
     if (Keyboard.IsPressed(Key.J))
     {
         short1 &= ~0x1000;
     }
     else
     {
         short1 |= 0x1000;
     }
     if (Keyboard.IsPressed(Key.K))
     {
         short1 &= ~0x2000;
     }
     else
     {
         short1 |= 0x2000;
     }
     if (Keyboard.IsPressed(Key.NumPad1))
     {
         short1 &= ~0x4000;
     }
     else
     {
         short1 |= 0x4000;
     }
     if (Keyboard.IsPressed(Key.NumPad2))
     {
         short1 &= unchecked ((short)~0x8000);
     }
     else
     {
         short1 |= unchecked ((short)0x8000);
     }
     Inptport.frame_update_analog_field_irrmaze_p0(Inptport.analog_p0);
     Inptport.frame_update_analog_field_irrmaze_p1(Inptport.analog_p1);
 }
示例#11
0
 public static void loop_inputports_neogeo_standard()
 {
     if (Keyboard.IsPressed(Key.D5))
     {
         short3 &= ~0x0001;
     }
     else
     {
         short3 |= 0x0001;
     }
     if (Keyboard.IsPressed(Key.D6))
     {
         short3 &= ~0x0002;
     }
     else
     {
         short3 |= 0x0002;
     }
     if (Keyboard.IsPressed(Key.D1))
     {
         short2 &= ~0x0100;
     }
     else
     {
         short2 |= 0x0100;
     }
     if (Keyboard.IsPressed(Key.D2))
     {
         short2 &= ~0x0400;
     }
     else
     {
         short2 |= 0x0400;
     }
     if (Keyboard.IsPressed(Key.D))
     {
         short0 &= ~0x0800;
     }
     else
     {
         short0 |= 0x0800;
     }
     if (Keyboard.IsPressed(Key.A))
     {
         short0 &= ~0x0400;
     }
     else
     {
         short0 |= 0x0400;
     }
     if (Keyboard.IsPressed(Key.S))
     {
         short0 &= ~0x0200;
     }
     else
     {
         short0 |= 0x0200;
     }
     if (Keyboard.IsPressed(Key.W))
     {
         short0 &= ~0x0100;
     }
     else
     {
         short0 |= 0x0100;
     }
     if (Keyboard.IsPressed(Key.J))
     {
         short0 &= ~0x1000;
     }
     else
     {
         short0 |= 0x1000;
     }
     if (Keyboard.IsPressed(Key.K))
     {
         short0 &= ~0x2000;
     }
     else
     {
         short0 |= 0x2000;
     }
     if (Keyboard.IsPressed(Key.L))
     {
     }
     else
     {
     }
     if (Keyboard.IsPressed(Key.U))
     {
         short0 &= ~0x4000;
     }
     else
     {
         short0 |= 0x4000;
     }
     if (Keyboard.IsPressed(Key.I))
     {
         short0 &= unchecked ((short)~0x8000);
     }
     else
     {
         short0 |= unchecked ((short)0x8000);
     }
     if (Keyboard.IsPressed(Key.O))
     {
     }
     else
     {
     }
     if (Keyboard.IsPressed(Key.Right))
     {
         short1 &= ~0x0800;
     }
     else
     {
         short1 |= 0x0800;
     }
     if (Keyboard.IsPressed(Key.Left))
     {
         short1 &= ~0x0400;
     }
     else
     {
         short1 |= 0x0400;
     }
     if (Keyboard.IsPressed(Key.Down))
     {
         short1 &= ~0x0200;
     }
     else
     {
         short1 |= 0x0200;
     }
     if (Keyboard.IsPressed(Key.Up))
     {
         short1 &= ~0x0100;
     }
     else
     {
         short1 |= 0x0100;
     }
     if (Keyboard.IsPressed(Key.NumPad1))
     {
         short1 &= ~0x1000;
     }
     else
     {
         short1 |= 0x1000;
     }
     if (Keyboard.IsPressed(Key.NumPad2))
     {
         short1 &= ~0x2000;
     }
     else
     {
         short1 |= 0x2000;
     }
     if (Keyboard.IsPressed(Key.NumPad3))
     {
     }
     else
     {
     }
     if (Keyboard.IsPressed(Key.NumPad4))
     {
         short1 &= ~0x4000;
     }
     else
     {
         short1 |= 0x4000;
     }
     if (Keyboard.IsPressed(Key.NumPad5))
     {
         short1 &= unchecked ((short)~0x8000);
     }
     else
     {
         short1 |= unchecked ((short)0x8000);
     }
     if (Keyboard.IsPressed(Key.NumPad6))
     {
     }
     else
     {
     }
     if (Keyboard.IsPressed(Key.R))
     {
         short3 &= ~0x0004;
     }
     else
     {
         short3 |= 0x0004;
     }
     if (Keyboard.IsPressed(Key.T))
     {
         short4 &= ~0x0080;
     }
     else
     {
         short4 |= 0x0080;
     }
 }
示例#12
0
 public static void loop_inputports_cps2_ecofghtr()
 {
     if (Keyboard.IsPressed(Key.D5))
     {
         short2 &= ~0x1000;
     }
     else
     {
         short2 |= 0x1000;
     }
     if (Keyboard.IsPressed(Key.D6))
     {
         short2 &= ~0x2000;
     }
     else
     {
         short2 |= 0x2000;
     }
     if (Keyboard.IsPressed(Key.D1))
     {
         short2 &= ~0x0100;
     }
     else
     {
         short2 |= 0x0100;
     }
     if (Keyboard.IsPressed(Key.D2))
     {
         short2 &= ~0x0200;
     }
     else
     {
         short2 |= 0x0200;
     }
     if (Keyboard.IsPressed(Key.D))
     {
         short0 &= ~0x0001;
     }
     else
     {
         short0 |= 0x0001;
     }
     if (Keyboard.IsPressed(Key.A))
     {
         short0 &= ~0x0002;
     }
     else
     {
         short0 |= 0x0002;
     }
     if (Keyboard.IsPressed(Key.S))
     {
         short0 &= ~0x0004;
     }
     else
     {
         short0 |= 0x0004;
     }
     if (Keyboard.IsPressed(Key.W))
     {
         short0 &= ~0x0008;
     }
     else
     {
         short0 |= 0x0008;
     }
     if (Keyboard.IsPressed(Key.J))
     {
         short0 &= ~0x0010;
     }
     else
     {
         short0 |= 0x0010;
     }
     if (Keyboard.IsPressed(Key.K))
     {
         short0 &= ~0x0020;
     }
     else
     {
         short0 |= 0x0020;
     }
     if (Keyboard.IsPressed(Key.L))
     {
         short0 &= ~0x0040;
     }
     else
     {
         short0 |= 0x0040;
     }
     if (Keyboard.IsPressed(Key.Right))
     {
         short0 &= ~0x0100;
     }
     else
     {
         short0 |= 0x0100;
     }
     if (Keyboard.IsPressed(Key.Left))
     {
         short0 &= ~0x0200;
     }
     else
     {
         short0 |= 0x0200;
     }
     if (Keyboard.IsPressed(Key.Down))
     {
         short0 &= ~0x0400;
     }
     else
     {
         short0 |= 0x0400;
     }
     if (Keyboard.IsPressed(Key.Up))
     {
         short0 &= ~0x0800;
     }
     else
     {
         short0 |= 0x0800;
     }
     if (Keyboard.IsPressed(Key.NumPad1))
     {
         short0 &= ~0x1000;
     }
     else
     {
         short0 |= 0x1000;
     }
     if (Keyboard.IsPressed(Key.NumPad2))
     {
         short0 &= ~0x2000;
     }
     else
     {
         short0 |= 0x2000;
     }
     if (Keyboard.IsPressed(Key.NumPad3))
     {
         short0 &= ~0x4000;
     }
     else
     {
         short0 |= 0x4000;
     }
     if (Keyboard.IsPressed(Key.R))
     {
         short2 &= ~0x0004;
     }
     else
     {
         short2 |= 0x0004;
     }
     if (Keyboard.IsPressed(Key.T))
     {
         short2 &= ~0x0002;
     }
     else
     {
         short2 |= 0x0002;
     }
     Inptport.frame_update_analog_field_ecofghtr_p0(Inptport.analog_p0);
     Inptport.frame_update_analog_field_ecofghtr_p1(Inptport.analog_p1);
 }
示例#13
0
 public static void loop_inputports_cps2_2p6b()
 {
     if (Keyboard.IsPressed(Key.D5))
     {
         short2 &= ~0x1000;
     }
     else
     {
         short2 |= 0x1000;
     }
     if (Keyboard.IsPressed(Key.D6))
     {
         short2 &= ~0x2000;
     }
     else
     {
         short2 |= 0x2000;
     }
     if (Keyboard.IsPressed(Key.D1))
     {
         short2 &= ~0x0100;
     }
     else
     {
         short2 |= 0x0100;
     }
     if (Keyboard.IsPressed(Key.D2))
     {
         short2 &= ~0x0200;
     }
     else
     {
         short2 |= 0x0200;
     }
     if (Keyboard.IsPressed(Key.D))
     {
         short0 &= ~0x0001;
     }
     else
     {
         short0 |= 0x0001;
     }
     if (Keyboard.IsPressed(Key.A))
     {
         short0 &= ~0x0002;
     }
     else
     {
         short0 |= 0x0002;
     }
     if (Keyboard.IsPressed(Key.S))
     {
         short0 &= ~0x0004;
     }
     else
     {
         short0 |= 0x0004;
     }
     if (Keyboard.IsPressed(Key.W))
     {
         short0 &= ~0x0008;
     }
     else
     {
         short0 |= 0x0008;
     }
     if (Keyboard.IsPressed(Key.J))
     {
         short0 &= ~0x0010;
     }
     else
     {
         short0 |= 0x0010;
     }
     if (Keyboard.IsPressed(Key.K))
     {
         short0 &= ~0x0020;
     }
     else
     {
         short0 |= 0x0020;
     }
     if (Keyboard.IsPressed(Key.L))
     {
         short0 &= ~0x0040;
     }
     else
     {
         short0 |= 0x0040;
     }
     if (Keyboard.IsPressed(Key.U))
     {
         short1 &= ~0x0001;
     }
     else
     {
         short1 |= 0x0001;
     }
     if (Keyboard.IsPressed(Key.I))
     {
         short1 &= ~0x0002;
     }
     else
     {
         short1 |= 0x0002;
     }
     if (Keyboard.IsPressed(Key.O))
     {
         short1 &= ~0x0004;
     }
     else
     {
         short1 |= 0x0004;
     }
     if (Keyboard.IsPressed(Key.Right))
     {
         short0 &= ~0x0100;
     }
     else
     {
         short0 |= 0x0100;
     }
     if (Keyboard.IsPressed(Key.Left))
     {
         short0 &= ~0x0200;
     }
     else
     {
         short0 |= 0x0200;
     }
     if (Keyboard.IsPressed(Key.Down))
     {
         short0 &= ~0x0400;
     }
     else
     {
         short0 |= 0x0400;
     }
     if (Keyboard.IsPressed(Key.Up))
     {
         short0 &= ~0x0800;
     }
     else
     {
         short0 |= 0x0800;
     }
     if (Keyboard.IsPressed(Key.NumPad1))
     {
         short0 &= ~0x1000;
     }
     else
     {
         short0 |= 0x1000;
     }
     if (Keyboard.IsPressed(Key.NumPad2))
     {
         short0 &= ~0x2000;
     }
     else
     {
         short0 |= 0x2000;
     }
     if (Keyboard.IsPressed(Key.NumPad3))
     {
         short0 &= ~0x4000;
     }
     else
     {
         short0 |= 0x4000;
     }
     if (Keyboard.IsPressed(Key.NumPad4))
     {
         short1 &= ~0x0010;
     }
     else
     {
         short1 |= 0x0010;
     }
     if (Keyboard.IsPressed(Key.NumPad5))
     {
         short1 &= ~0x0020;
     }
     else
     {
         short1 |= 0x0020;
     }
     if (Keyboard.IsPressed(Key.NumPad6))
     {
         short2 &= ~0x4000;
     }
     else
     {
         short2 |= 0x4000;
     }
     if (Keyboard.IsPressed(Key.R))
     {
         short2 &= ~0x0004;
     }
     else
     {
         short2 |= 0x0004;
     }
     if (Keyboard.IsPressed(Key.T))
     {
         short2 &= ~0x0002;
     }
     else
     {
         short2 |= 0x0002;
     }
 }
示例#14
0
 public static void loop_inputports_cps1_cworld2j()
 {
     if (Keyboard.IsPressed(Key.D5))
     {
         sbyte0 &= ~0x01;
     }
     else
     {
         sbyte0 |= 0x01;
     }
     if (Keyboard.IsPressed(Key.D6))
     {
         sbyte0 &= ~0x02;
     }
     else
     {
         sbyte0 |= 0x02;
     }
     if (Keyboard.IsPressed(Key.D1))
     {
         sbyte0 &= ~0x10;
     }
     else
     {
         sbyte0 |= 0x10;
     }
     if (Keyboard.IsPressed(Key.D2))
     {
         sbyte0 &= ~0x20;
     }
     else
     {
         sbyte0 |= 0x20;
     }
     if (Keyboard.IsPressed(Key.J))
     {
         short1 &= ~0x10;
     }
     else
     {
         short1 |= 0x10;
     }
     if (Keyboard.IsPressed(Key.K))
     {
         short1 &= ~0x20;
     }
     else
     {
         short1 |= 0x20;
     }
     if (Keyboard.IsPressed(Key.L))
     {
         short1 &= ~0x40;
     }
     else
     {
         short1 |= 0x40;
     }
     if (Keyboard.IsPressed(Key.U))
     {
         short1 &= ~0x80;
     }
     else
     {
         short1 |= 0x80;
     }
     if (Keyboard.IsPressed(Key.NumPad1))
     {
         short1 &= ~0x1000;
     }
     else
     {
         short1 |= 0x1000;
     }
     if (Keyboard.IsPressed(Key.NumPad2))
     {
         short1 &= ~0x2000;
     }
     else
     {
         short1 |= 0x2000;
     }
     if (Keyboard.IsPressed(Key.NumPad3))
     {
         short1 &= ~0x4000;
     }
     else
     {
         short1 |= 0x4000;
     }
     if (Keyboard.IsPressed(Key.NumPad4))
     {
         short1 &= unchecked ((short)~0x8000);
     }
     else
     {
         short1 |= unchecked ((short)0x8000);
     }
     if (Keyboard.IsPressed(Key.R))
     {
         sbyte0 &= ~0x04;
     }
     else
     {
         sbyte0 |= 0x04;
     }
     if (Keyboard.IsPressed(Key.T))
     {
         sbyte0 &= ~0x40;
     }
     else
     {
         sbyte0 |= 0x40;
     }
 }
示例#15
0
 public static void loop_inputports_cps1_forgottn()
 {
     if (Keyboard.IsPressed(Key.D5))
     {
         sbyte0 &= ~0x01;
     }
     else
     {
         sbyte0 |= 0x01;
     }
     if (Keyboard.IsPressed(Key.D6))
     {
         sbyte0 &= ~0x02;
     }
     else
     {
         sbyte0 |= 0x02;
     }
     if (Keyboard.IsPressed(Key.D1))
     {
         sbyte0 &= ~0x10;
     }
     else
     {
         sbyte0 |= 0x10;
     }
     if (Keyboard.IsPressed(Key.D2))
     {
         sbyte0 &= ~0x20;
     }
     else
     {
         sbyte0 |= 0x20;
     }
     if (Keyboard.IsPressed(Key.D))
     {
         short1 &= ~0x01;
     }
     else
     {
         short1 |= 0x01;
     }
     if (Keyboard.IsPressed(Key.A))
     {
         short1 &= ~0x02;
     }
     else
     {
         short1 |= 0x02;
     }
     if (Keyboard.IsPressed(Key.S))
     {
         short1 &= ~0x04;
     }
     else
     {
         short1 |= 0x04;
     }
     if (Keyboard.IsPressed(Key.W))
     {
         short1 &= ~0x08;
     }
     else
     {
         short1 |= 0x08;
     }
     if (Keyboard.IsPressed(Key.J))
     {
         short1 &= ~0x10;
     }
     else
     {
         short1 |= 0x10;
     }
     if (Keyboard.IsPressed(Key.Right))
     {
         short1 &= ~0x0100;
     }
     else
     {
         short1 |= 0x0100;
     }
     if (Keyboard.IsPressed(Key.Left))
     {
         short1 &= ~0x0200;
     }
     else
     {
         short1 |= 0x0200;
     }
     if (Keyboard.IsPressed(Key.Down))
     {
         short1 &= ~0x0400;
     }
     else
     {
         short1 |= 0x0400;
     }
     if (Keyboard.IsPressed(Key.Up))
     {
         short1 &= ~0x0800;
     }
     else
     {
         short1 |= 0x0800;
     }
     if (Keyboard.IsPressed(Key.NumPad1))
     {
         short1 &= ~0x1000;
     }
     else
     {
         short1 |= 0x1000;
     }
     if (Keyboard.IsPressed(Key.R))
     {
         sbyte0 &= ~0x04;
     }
     else
     {
         sbyte0 |= 0x04;
     }
     if (Keyboard.IsPressed(Key.T))
     {
         sbyte0 &= ~0x40;
     }
     else
     {
         sbyte0 |= 0x40;
     }
     Inptport.frame_update_analog_field_forgottn_p0(Inptport.analog_p0);
     Inptport.frame_update_analog_field_forgottn_p1(Inptport.analog_p1);
 }
示例#16
0
 public static void loop_inputports_cps2_qndream()
 {
     if (Keyboard.IsPressed(Key.D5))
     {
         short2 &= ~0x1000;
     }
     else
     {
         short2 |= 0x1000;
     }
     if (Keyboard.IsPressed(Key.D6))
     {
         short2 &= ~0x2000;
     }
     else
     {
         short2 |= 0x2000;
     }
     if (Keyboard.IsPressed(Key.D1))
     {
         short2 &= ~0x0100;
     }
     else
     {
         short2 |= 0x0100;
     }
     if (Keyboard.IsPressed(Key.D2))
     {
         short2 &= ~0x0200;
     }
     else
     {
         short2 |= 0x0200;
     }
     if (Keyboard.IsPressed(Key.J))
     {
         short0 &= ~0x0008;
     }
     else
     {
         short0 |= 0x0008;
     }
     if (Keyboard.IsPressed(Key.K))
     {
         short0 &= ~0x0004;
     }
     else
     {
         short0 |= 0x0004;
     }
     if (Keyboard.IsPressed(Key.L))
     {
         short0 &= ~0x0002;
     }
     else
     {
         short0 |= 0x0002;
     }
     if (Keyboard.IsPressed(Key.U))
     {
         short0 &= ~0x0001;
     }
     else
     {
         short0 |= 0x0001;
     }
     if (Keyboard.IsPressed(Key.NumPad1))
     {
         short0 &= ~0x0800;
     }
     else
     {
         short0 |= 0x0800;
     }
     if (Keyboard.IsPressed(Key.NumPad2))
     {
         short0 &= ~0x0400;
     }
     else
     {
         short0 |= 0x0400;
     }
     if (Keyboard.IsPressed(Key.NumPad3))
     {
         short0 &= ~0x0200;
     }
     else
     {
         short0 |= 0x0200;
     }
     if (Keyboard.IsPressed(Key.NumPad4))
     {
         short0 &= ~0x0100;
     }
     else
     {
         short0 |= 0x0100;
     }
     if (Keyboard.IsPressed(Key.R))
     {
         short2 &= ~0x0004;
     }
     else
     {
         short2 |= 0x0004;
     }
     if (Keyboard.IsPressed(Key.T))
     {
         short2 &= ~0x0002;
     }
     else
     {
         short2 |= 0x0002;
     }
 }