-
Notifications
You must be signed in to change notification settings - Fork 1
/
hw_md.h
45 lines (38 loc) · 1.26 KB
/
hw_md.h
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
40
41
42
43
44
45
#ifndef _HW_MD_H
#define _HW_MD_H
#define SEGA_CTRL_BUTTONS 0x0FFF
#define SEGA_CTRL_UP 0x0001
#define SEGA_CTRL_DOWN 0x0002
#define SEGA_CTRL_LEFT 0x0004
#define SEGA_CTRL_RIGHT 0x0008
#define SEGA_CTRL_B 0x0010
#define SEGA_CTRL_C 0x0020
#define SEGA_CTRL_A 0x0040
#define SEGA_CTRL_START 0x0080
#define SEGA_CTRL_Z 0x0100
#define SEGA_CTRL_Y 0x0200
#define SEGA_CTRL_X 0x0400
#define SEGA_CTRL_MODE 0x0800
#define SEGA_CTRL_TYPE 0xF000
#define SEGA_CTRL_THREE 0x0000
#define SEGA_CTRL_SIX 0x1000
#define SEGA_CTRL_NONE 0xF000
#ifdef __cplusplus
extern "C" {
#endif
extern short set_sr(short new_sr);
extern short get_pad(short pad);
extern void clear_screen(void);
extern void put_str(char *str, int color, int x, int y);
extern void put_chr(char chr, int color, int x, int y);
extern void delay(int count);
extern void write_byte(unsigned int dst, unsigned char val);
extern void write_word(unsigned int dst, unsigned short val);
extern void write_long(unsigned int dst, unsigned int val);
extern unsigned char read_byte(unsigned int src);
extern unsigned short read_word(unsigned int src);
extern unsigned int read_long(unsigned int src);
#ifdef __cplusplus
}
#endif
#endif