comparison blastem.h @ 66:7a22a0e6c004

Gamepad support
author Mike Pavone <pavone@retrodev.com>
date Thu, 20 Dec 2012 00:44:59 -0800
parents
children 108e587165c0
comparison
equal deleted inserted replaced
65:aef6302770c2 66:7a22a0e6c004
1 #ifndef BLASTEM_H_
2 #define BLASTEM_H_
3
4 typedef struct {
5 uint32_t th_counter;
6 uint32_t timeout_cycle;
7 uint8_t output;
8 uint8_t control;
9 uint8_t input[3];
10 } io_port;
11
12 #define GAMEPAD_TH0 0
13 #define GAMEPAD_TH1 1
14 #define GAMEPAD_EXTRA 2
15
16 extern io_port gamepad_1;
17 extern io_port gamepad_2;
18
19 void io_adjust_cycles(io_port * pad, uint32_t current_cycle, uint32_t deduction);
20
21 #endif //BLASTEM_H_
22