-
Notifications
You must be signed in to change notification settings - Fork 6
/
apu.h
35 lines (28 loc) · 647 Bytes
/
apu.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
/*
* Copyright (C) 2017 FIX94
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
#ifndef _apu_h_
#define _apu_h_
#define NUM_BUFFERS 10
void apuInitBufs();
void apuDeinitBufs();
void apuInit();
bool apuCycle();
void apuClockTimers();
uint8_t *apuGetBuf();
uint32_t apuGetBufSize();
uint32_t apuGetFrequency();
void apuSetReg8(uint16_t addr, uint8_t val);
uint8_t apuGetReg8(uint16_t addr);
typedef struct _envelope_t {
bool modeadd;
uint8_t vol;
uint8_t curVol;
uint8_t period;
uint8_t divider;
} envelope_t;
void doEnvelopeLogic(envelope_t *env);
#endif