Debian Codegraph @

src/engine/platform/ym2610b.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 _YM2610B_H
21 #define _YM2610B_H
22
23 #include "ym2610shared.h"
24
25 class DivPlatformYM2610B: public DivPlatformYM2610Base {
26 protected:
27 const unsigned short chanOffs[6]={
28 0x00, 0x01, 0x02, 0x100, 0x101, 0x102
29 };
30
31 const unsigned char konOffs[6]={
32 0, 1, 2, 4, 5, 6
33 };
34
35 friend void putDispatchChip(void*,int);
36
37 void commitState(int ch, DivInstrument* ins);
38
39 void acquire_combo(short** buf, size_t len);
40 void acquire_ymfm(short** buf, size_t len);
41 void acquire_lle(short** buf, size_t len);
42
43 public:
44 unsigned char isCSM;
45 void acquire(short** buf, size_t len);
46 int dispatch(DivCommand c);
47 void* getChanState(int chan);
48 DivMacroInt* getChanMacroInt(int ch);
49 virtual unsigned short getPan(int chan);
50 DivDispatchOscBuffer* getOscBuffer(int chan);
51 unsigned char* getRegisterPool();
52 int getRegisterPoolSize();
53 void reset();
54 void forceIns();
55 void tick(bool sysTick=true);
56 void muteChannel(int ch, bool mute);
57 int getOutputCount();
58 bool keyOffAffectsArp(int ch);
59 void notifyInsChange(int ins);
60 virtual void notifyInsDeletion(void* ins);
61 void setSkipRegisterWrites(bool val);
62 void poke(unsigned int addr, unsigned short val);
63 void poke(std::vector<DivRegWrite>& wlist);
64 const char** getRegisterSheet();
65 int init(DivEngine* parent, int channels, int sugRate, const DivConfig& flags);
66 void setCSM(bool isCSM);
67 void quit();
68 DivPlatformYM2610B():
69 DivPlatformYM2610Base(2,6,9,15,16),
70 isCSM(0) {}
71 ~DivPlatformYM2610B();
72 };
73 #endif