X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=teensytp%2Fpkts.h;h=52ccfee6b96367bfe478eb17d28172f258f238f8;hb=ebeef6c61f5f6c4a0242b59c4e822898c1f32dd8;hp=582fa727ff6eb1eacf4e61fca40fd20f10dc3e5b;hpb=37f24627a5efd05d8b52bc3a3e1253d077926c2e;p=megadrive.git diff --git a/teensytp/pkts.h b/teensytp/pkts.h index 582fa72..52ccfee 100644 --- a/teensytp/pkts.h +++ b/teensytp/pkts.h @@ -1,38 +1,24 @@ enum tas_pkt_type { - PKT_FIXED_STATE = 0xef01, - PKT_STREAM_ENABLE = 0xef02, - PKT_STREAM_REQ = 0xef03, - PKT_STREAM_DATA_TO_P1 = 0xef04, - PKT_STREAM_DATA_TO_P2 = 0xef05, - PKT_STREAM_DATA_FROM = 0xef06, - PKT_STREAM_END = 0xef07, - PKT_STREAM_ABORT = 0xef08, + PKT_UPD_MODE = 0xe301, // op_mode + PKT_UPD_BTNS = 0xe302, }; -struct tas_pkt { +struct tp_pkt { uint16_t type; - uint16_t size; // for DATA_FROM/TO + uint16_t pad; union { uint8_t data[60]; + uint32_t mode; struct { - uint32_t frame; // just fyi - uint8_t is_p2; - } req; - struct { - uint8_t stream_to; - uint8_t stream_from; - // frame increment on read - uint8_t inc_mode; - uint8_t no_start_seq; - } enable; + uint32_t changed_players; + uint32_t bnts[4]; // MXYZ SACB RLDU + }; }; } __attribute__((packed)); -enum inc_mode { - INC_MODE_VSYNC = 0, - // shared stream index incremented by pl1 or pl2 - INC_MODE_SHARED_PL1 = 1, - INC_MODE_SHARED_PL2 = 2, - INC_MODE_SEPARATE = 3, +enum op_mode { + OP_MODE_3BTN = 0, + OP_MODE_6BTN = 1, + OP_MODE_TEAMPLAYER = 2, };