Subversion Repositories pentevo

Rev

Rev 796 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed | ?url?

  1. #pragma once
  2.  
  3. struct ATM_KBD
  4. {
  5.    union {
  6.       unsigned char zxkeys[8];
  7.       unsigned zxdata[2];
  8.    };
  9.    unsigned char mode, R7, lastscan, cmd;
  10.    unsigned char kR1, kR2, kR3, kR4, kR5;
  11.  
  12.    void processzx(unsigned scancode, unsigned char pressed);
  13.    unsigned char read(unsigned char scan, unsigned char zxdata);
  14.    void setkey(unsigned scancode, unsigned char pressed);
  15.    void reset();
  16.    void clear();
  17. };
  18.  
  19. struct K_INPUT
  20. {
  21. #pragma pack(push, 1)
  22.    union
  23.    {
  24.       volatile unsigned char kbd[16];
  25.       volatile unsigned kbd_x4[4];
  26.    };
  27.  
  28.    union
  29.    { // without keymatrix effect
  30.       volatile unsigned char rkbd[16];
  31.       volatile unsigned rkbd_x4[4];
  32.    };
  33. #pragma pack(pop)
  34.  
  35.    unsigned lastkey, nomouse;
  36.  
  37.    enum { KM_DEFAULT, KM_KEYSTICK, KM_PASTE_HOLD, KM_PASTE_RELEASE } keymode;
  38.  
  39.    int msx, msy, msx_prev, msy_prev, ay_x0, ay_y0;
  40.    unsigned ay_reset_t;
  41.    unsigned char mbuttons, ayR14;
  42.  
  43.    volatile unsigned char kjoy;
  44.    unsigned char mousejoy;
  45.    unsigned char kbdled, mouse_joy_led;
  46.    unsigned char firedelay, firestate; // autofire vars
  47.    volatile u8 fjoy; // fuller joystick
  48.  
  49.    ATM_KBD atm51;
  50.  
  51.    unsigned stick_delay;
  52.    int prev_wheel;
  53.  
  54.    unsigned char *textbuffer;
  55.    unsigned textoffset, textsize;
  56.    unsigned char tdelay, tdata, wheel; //0.36.6 from 0.35b2
  57.  
  58.    unsigned char kempston_mx();
  59.    unsigned char kempston_my();
  60.  
  61.    unsigned char aymouse_rd();
  62.    void aymouse_wr(unsigned char val);
  63.  
  64.    void clear_zx();
  65.    inline void press_zx(unsigned char key);
  66.    bool process_pc_layout();
  67.    void make_matrix();
  68.    char readdevices();
  69.    unsigned char read(unsigned char scan);
  70.    u8 read_quorum(u8 scan);
  71.    void paste();
  72.  
  73.    K_INPUT()
  74.    {
  75.       textbuffer = nullptr;
  76.       // random data on coords -> some programs detects mouse by this
  77.       ay_x0 = msx = 31;
  78.       ay_y0 = msy = 85;
  79.  
  80.       nomouse = 0;
  81.    }
  82. };
  83.