-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathSN76489.h
47 lines (34 loc) · 1.26 KB
/
SN76489.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
#ifdef SN76489_H
#define SN76489_H
/*---------------------------------------------------------------------------*/
/*
SN76489 sound chip routines
By Allen C. Huffman
www.subethasoftware.com
Header file with chip definitions.
VERSION HISTORY:
2017-03-01 0.0 allenh - In the beginning...
2017-03-04 0.1 allenh - Renaming volume(), adding setVolumeMax().
2017-03-06 0.2 allenh - Renaming to playHandler().
TODO:
1. Note 0 is used for off, but since we can't play anything that low
anyway, it's not a big deal. But, it would be nice to make the notes
be 1-88 (base 1) instead of 0-87 (base 0).
TOFIX:
*/
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
// EXTERNAL PROTOTYPES
/*---------------------------------------------------------------------------*/
void initSN76489();
// API:
void play(byte channel, uint16_t note);
void setVolume( byte channel, byte volume );
void setMaxVolume( byte volume );
// TODO: Channel 3 "noise" is not really supported yet.
void playHandlder();
// Convienience functions.
void muteAll();
#endif // SN76849_H
/*---------------------------------------------------------------------------*/
// End of SN76489.h