mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-23 21:15:11 +00:00
save my register writes
This commit is contained in:
parent
3672ceccb7
commit
c7ee0ce642
2 changed files with 11 additions and 1 deletions
|
@ -4,7 +4,7 @@
|
|||
|
||||
#define FREQ_BASE 1712.0f
|
||||
|
||||
#define rWrite(v) {sn->write(v); if (dumpWrites) {addWrite(0x200,v);} }
|
||||
#define rWrite(v) {if (!skipRegisterWrites) {sn->write(v); if (dumpWrites) {addWrite(0x200,v);}}}
|
||||
|
||||
void DivPlatformSMS::acquire(short* bufL, short* bufR, size_t start, size_t len) {
|
||||
sn->sound_stream_update(bufL+start,len);
|
||||
|
@ -178,6 +178,15 @@ void DivPlatformSMS::muteChannel(int ch, bool mute) {
|
|||
if (chan[ch].active) rWrite(0x90|ch<<5|(isMuted[ch]?15:(15-(chan[ch].outVol&15))));
|
||||
}
|
||||
|
||||
void DivPlatformSMS::forceIns() {
|
||||
for (int i=0; i<4; i++) {
|
||||
if (chan[i].active) {
|
||||
chan[i].insChanged=true;
|
||||
chan[i].freqChanged=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DivPlatformSMS::reset() {
|
||||
for (int i=0; i<4; i++) {
|
||||
chan[i]=DivPlatformSMS::Channel();
|
||||
|
|
|
@ -36,6 +36,7 @@ class DivPlatformSMS: public DivDispatch {
|
|||
void acquire(short* bufL, short* bufR, size_t start, size_t len);
|
||||
int dispatch(DivCommand c);
|
||||
void reset();
|
||||
void forceIns();
|
||||
void tick();
|
||||
void muteChannel(int ch, bool mute);
|
||||
bool keyOffAffectsArp(int ch);
|
||||
|
|
Loading…
Reference in a new issue