Debian Codegraph @

src/engine/platform/pv1000.h

raw
1 /**
2 * Furnace Tracker - multi-system chiptune tracker
3 * Copyright (C) 2021-2025 tildearrow and contributors
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20 #ifndef _PV1000_H
21 #define _PV1000_H
22
23 #include "../dispatch.h"
24 #include "sound/d65modified.h"
25
26 class DivPlatformPV1000: public DivDispatch {
27 struct Channel: public SharedChannel<int> {
28 Channel():
29 SharedChannel<int>(1) {}
30 };
31 Channel chan[3];
32 DivDispatchOscBuffer* oscBuf[3];
33 bool isMuted[3];
34
35 unsigned char regPool[4];
36 d65010g031_t d65010g031;
37 friend void putDispatchChip(void*,int);
38 friend void putDispatchChan(void*,int,int);
39 public:
40 void acquire(short** buf, size_t len);
41 int dispatch(DivCommand c);
42 void* getChanState(int chan);
43 DivMacroInt* getChanMacroInt(int ch);
44 DivDispatchOscBuffer* getOscBuffer(int chan);
45 unsigned char* getRegisterPool();
46 int getRegisterPoolSize();
47 void reset();
48 void forceIns();
49 void tick(bool sysTick=true);
50 void muteChannel(int ch, bool mute);
51 void setFlags(const DivConfig& flags);
52 void notifyInsDeletion(void* ins);
53 int getOutputCount();
54 void poke(unsigned int addr, unsigned short val);
55 void poke(std::vector<DivRegWrite>& wlist);
56 const char** getRegisterSheet();
57 bool getDCOffRequired();
58 int init(DivEngine* parent, int channels, int sugRate, const DivConfig& flags);
59 void quit();
60 ~DivPlatformPV1000();
61 };
62
63 #endif