forked from retrofw/dingux-msx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathemu2212.h
74 lines (52 loc) · 1.33 KB
/
emu2212.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#ifndef _EMUSCC_H_
#define _EMUSCC_H_
#ifdef EMUSCC_DLL_EXPORTS
#define EMUSCC_API __declspec(dllexport)
#elif EMUSCC_DLL_IMPORTS
#define EMUSCC_API __declspec(dllimport)
#else
#define EMUSCC_API
#endif
#ifdef __cplusplus
extern "C" {
#endif
#include "emutypes.h"
#define SCC_CACHE_SIZE 1024 // 2^N only.
typedef struct {
e_int32 out ;
int masterVolume ;
//e_int32 buf ;
e_uint32 realstep ;
e_uint32 scctime ;
e_uint32 sccstep ;
e_uint32 incr[5] ;
e_uint8 save_9000 ;
e_uint8 save_BFFE ;
e_uint8 save_mode ;
e_int8 wave[5][64] ;
e_uint32 enable ;
e_uint32 count[5] ;
e_uint32 freq[5] ;
e_uint32 phase[5] ;
e_uint32 volume[5] ;
e_uint32 offset[5] ;
int ch_enable ;
int cycle_4bit ;
int cycle_8bit ;
int refresh ;
int rotate[5] ;
} SCC ;
EMUSCC_API void SCC_init(e_uint32 c, e_uint32 r);
EMUSCC_API void SCC_set_quality(e_uint32 q) ;
EMUSCC_API SCC *SCC_new(void) ;
EMUSCC_API void SCC_reset(SCC *scc) ;
EMUSCC_API void SCC_delete(SCC *scc) ;
EMUSCC_API void SCC_close() ;
EMUSCC_API e_int16 SCC_calc(SCC *scc) ;
EMUSCC_API e_int16 SCC_calcHQ(SCC *scc) ;
EMUSCC_API void SCC_write(SCC *scc, e_uint32 adr, e_uint32 val) ;
EMUSCC_API e_uint32 SCC_read(SCC *scc, e_uint32 adr) ;
#ifdef __cplusplus
}
#endif
#endif