Beispiel #1
0
        protected virtual void InitKeyboard_Chip8()
        {
            if(_keyBuffer == null) _keyBuffer = new byte[16];
            _keyMap = new KeyMap(16);

            _keyMap._keys[0].mapKeyboard = 88;
            _keyMap._keys[1].mapKeyboard = 49;
            _keyMap._keys[2].mapKeyboard = 50;
            _keyMap._keys[3].mapKeyboard = 51;

            _keyMap._keys[4].mapKeyboard = 81;
            _keyMap._keys[5].mapKeyboard = 87;
            _keyMap._keys[6].mapKeyboard = 69;
            _keyMap._keys[7].mapKeyboard = 65;

            _keyMap._keys[8].mapKeyboard = 83;
            _keyMap._keys[9].mapKeyboard = 68;
            _keyMap._keys[10].mapKeyboard = 90;
            _keyMap._keys[11].mapKeyboard = 67;

            _keyMap._keys[12].mapKeyboard = 52;
            _keyMap._keys[13].mapKeyboard = 82;
            _keyMap._keys[14].mapKeyboard = 70;
            _keyMap._keys[15].mapKeyboard = 86;
        }
Beispiel #2
0
        protected virtual void InitKeyboard_Base(string name, KeyMap map
						, byte[] bffr, metaData _meta, Int32 mapSiz, Int32 bufSiz)
        {
            mapSize = mapSiz;
            bufferSize = bufSiz;

            if(_meta != null) meta = _meta;
            else meta = new metaData(name);

            if(map != null) _keyMap = map;
            else if(mapSiz > 0) _keyMap = new KeyMap(mapSiz);

            if(bffr != null) _keyBuffer = bffr;
            else if(bufSiz > 0) _keyBuffer = new byte[bufSiz];
        }
Beispiel #3
0
 public Keyboard_Base(string name, KeyMap map)
 {
     InitKeyboard_Base(name, map, null, null, -1, -1);
 }
Beispiel #4
0
 public Keyboard_Base(string name, KeyMap map, byte[] buffer)
 {
     InitKeyboard_Base(name, map, buffer, null, -1, -1);
 }