-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathio.h
More file actions
40 lines (28 loc) · 673 Bytes
/
io.h
File metadata and controls
40 lines (28 loc) · 673 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef _IO_H_
#define _IO_H_
/*
void io_reset(void);
void io_set_version(int export, int pal, int fdd, int n);
*/
typedef struct
{
void (*data_w)(int pad, uint8 data);
uint8 (*data_r)(int pad);
} port_t;
typedef struct
{
uint8 state;
} t_input_3b;
/* Global variables */
extern port_t port[3];
extern uint8 io_reg[0x10];
/* Function prototypes */
extern void io_reset(void);
extern void gen_io_w(int offset, int value);
extern int gen_io_r(int offset);
extern uint8 pad_2b_r(int pad);
extern uint8 device_3b_r(int pad);
extern void device_3b_w(int pad, uint8 data);
/* SD - Reset the device pointers */
extern void io_rescan();
#endif /* _IO_H_ */