Eknous please HELP ME

This commit is contained in:
tildearrow 2023-08-23 17:25:05 -05:00
parent 62a1a383ee
commit c9cbf133d6
57 changed files with 139 additions and 0 deletions

View file

@ -411,6 +411,13 @@ class DivDispatch {
*/ */
virtual DivMacroInt* getChanMacroInt(int chan); virtual DivMacroInt* getChanMacroInt(int chan);
/**
* get the stereo panning of a channel.
* @param chan the channel.
* @return a 16-bit number. left in top 8 bits and right in bottom 8 bits.
*/
virtual unsigned short getPan(int chan);
/** /**
* get currently playing sample (and its position). * get currently playing sample (and its position).
* @param chan the channel. * @param chan the channel.

View file

@ -33,6 +33,10 @@ void* DivDispatch::getChanState(int chan) {
return NULL; return NULL;
} }
unsigned short DivDispatch::getPan(int chan) {
return 0;
}
DivMacroInt* DivDispatch::getChanMacroInt(int chan) { DivMacroInt* DivDispatch::getChanMacroInt(int chan) {
return NULL; return NULL;
} }

View file

@ -857,6 +857,10 @@ DivMacroInt* DivPlatformArcade::getChanMacroInt(int ch) {
return &chan[ch].std; return &chan[ch].std;
} }
unsigned short DivPlatformArcade::getPan(int ch) {
return (chan[ch].chVolL<<8)|(chan[ch].chVolR);
}
DivDispatchOscBuffer* DivPlatformArcade::getOscBuffer(int ch) { DivDispatchOscBuffer* DivPlatformArcade::getOscBuffer(int ch) {
return oscBuf[ch]; return oscBuf[ch];
} }

View file

@ -75,6 +75,7 @@ class DivPlatformArcade: public DivPlatformOPM {
void tick(bool sysTick=true); void tick(bool sysTick=true);
void muteChannel(int ch, bool mute); void muteChannel(int ch, bool mute);
DivMacroInt* getChanMacroInt(int ch); DivMacroInt* getChanMacroInt(int ch);
unsigned short getPan(int chan);
void notifyInsChange(int ins); void notifyInsChange(int ins);
void notifyInsDeletion(void* ins); void notifyInsDeletion(void* ins);
void setFlags(const DivConfig& flags); void setFlags(const DivConfig& flags);

View file

@ -344,6 +344,10 @@ DivMacroInt* DivPlatformC140::getChanMacroInt(int ch) {
return &chan[ch].std; return &chan[ch].std;
} }
unsigned short DivPlatformC140::getPan(int ch) {
return (chan[ch].chPanL<<8)|(chan[ch].chPanR);
}
DivDispatchOscBuffer* DivPlatformC140::getOscBuffer(int ch) { DivDispatchOscBuffer* DivPlatformC140::getOscBuffer(int ch) {
return oscBuf[ch]; return oscBuf[ch];
} }

View file

@ -74,6 +74,7 @@ class DivPlatformC140: public DivDispatch {
int dispatch(DivCommand c); int dispatch(DivCommand c);
void* getChanState(int chan); void* getChanState(int chan);
DivMacroInt* getChanMacroInt(int ch); DivMacroInt* getChanMacroInt(int ch);
unsigned short getPan(int chan);
DivDispatchOscBuffer* getOscBuffer(int chan); DivDispatchOscBuffer* getOscBuffer(int chan);
unsigned char* getRegisterPool(); unsigned char* getRegisterPool();
int getRegisterPoolSize(); int getRegisterPoolSize();

View file

@ -1057,6 +1057,10 @@ DivMacroInt* DivPlatformES5506::getChanMacroInt(int ch) {
return &chan[ch].std; return &chan[ch].std;
} }
unsigned short DivPlatformES5506::getPan(int ch) {
return ((chan[ch].lVol>>4)<<8)|(chan[ch].rVol>>4);
}
void DivPlatformES5506::reset() { void DivPlatformES5506::reset() {
while (!hostIntf32.empty()) hostIntf32.pop(); while (!hostIntf32.empty()) hostIntf32.pop();
while (!hostIntf8.empty()) hostIntf8.pop(); while (!hostIntf8.empty()) hostIntf8.pop();

View file

@ -295,6 +295,7 @@ class DivPlatformES5506: public DivDispatch, public es550x_intf {
virtual int dispatch(DivCommand c) override; virtual int dispatch(DivCommand c) override;
virtual void* getChanState(int chan) override; virtual void* getChanState(int chan) override;
virtual DivMacroInt* getChanMacroInt(int ch) override; virtual DivMacroInt* getChanMacroInt(int ch) override;
virtual unsigned short getPan(int chan) override;
virtual DivDispatchOscBuffer* getOscBuffer(int chan) override; virtual DivDispatchOscBuffer* getOscBuffer(int chan) override;
virtual unsigned char* getRegisterPool() override; virtual unsigned char* getRegisterPool() override;
virtual int getRegisterPoolSize() override; virtual int getRegisterPoolSize() override;

View file

@ -578,6 +578,11 @@ DivMacroInt* DivPlatformGB::getChanMacroInt(int ch) {
return &chan[ch].std; return &chan[ch].std;
} }
unsigned short DivPlatformGB::getPan(int ch) {
unsigned char p=lastPan&(0x11<<ch);
return ((p&0xf0)?0x100:0)|((p&0x0f)?1:0);
}
DivDispatchOscBuffer* DivPlatformGB::getOscBuffer(int ch) { DivDispatchOscBuffer* DivPlatformGB::getOscBuffer(int ch) {
return oscBuf[ch]; return oscBuf[ch];
} }

View file

@ -84,6 +84,7 @@ class DivPlatformGB: public DivDispatch {
int dispatch(DivCommand c); int dispatch(DivCommand c);
void* getChanState(int chan); void* getChanState(int chan);
DivMacroInt* getChanMacroInt(int ch); DivMacroInt* getChanMacroInt(int ch);
unsigned short getPan(int chan);
DivDispatchOscBuffer* getOscBuffer(int chan); DivDispatchOscBuffer* getOscBuffer(int chan);
unsigned char* getRegisterPool(); unsigned char* getRegisterPool();
int getRegisterPoolSize(); int getRegisterPoolSize();

View file

@ -106,6 +106,7 @@ class DivPlatformGenesis: public DivPlatformOPN {
int dispatch(DivCommand c); int dispatch(DivCommand c);
void* getChanState(int chan); void* getChanState(int chan);
DivMacroInt* getChanMacroInt(int ch); DivMacroInt* getChanMacroInt(int ch);
virtual unsigned short getPan(int chan);
DivSamplePos getSamplePos(int ch); DivSamplePos getSamplePos(int ch);
DivDispatchOscBuffer* getOscBuffer(int chan); DivDispatchOscBuffer* getOscBuffer(int chan);
unsigned char* getRegisterPool(); unsigned char* getRegisterPool();

View file

@ -800,6 +800,12 @@ DivMacroInt* DivPlatformGenesisExt::getChanMacroInt(int ch) {
return &chan[ch].std; return &chan[ch].std;
} }
unsigned short DivPlatformGenesisExt::getPan(int ch) {
if (ch>=4+extChanOffs) return DivPlatformGenesis::getPan(ch-3);
if (ch>=extChanOffs) return ((opChan[0].pan<<7)&1)|(opChan[0].pan&1);
return DivPlatformGenesis::getPan(ch);
}
DivDispatchOscBuffer* DivPlatformGenesisExt::getOscBuffer(int ch) { DivDispatchOscBuffer* DivPlatformGenesisExt::getOscBuffer(int ch) {
if (ch>=6) return oscBuf[ch-3]; if (ch>=6) return oscBuf[ch-3];
if (ch<3) return oscBuf[ch]; if (ch<3) return oscBuf[ch];

View file

@ -34,6 +34,7 @@ class DivPlatformGenesisExt: public DivPlatformGenesis {
int dispatch(DivCommand c); int dispatch(DivCommand c);
void* getChanState(int chan); void* getChanState(int chan);
DivMacroInt* getChanMacroInt(int ch); DivMacroInt* getChanMacroInt(int ch);
unsigned short getPan(int chan);
DivDispatchOscBuffer* getOscBuffer(int chan); DivDispatchOscBuffer* getOscBuffer(int chan);
void reset(); void reset();
void forceIns(); void forceIns();

View file

@ -424,6 +424,10 @@ DivMacroInt* DivPlatformK007232::getChanMacroInt(int ch) {
return &chan[ch].std; return &chan[ch].std;
} }
unsigned short DivPlatformK007232::getPan(int ch) {
return ((chan[ch].panning&15)<<8)|((chan[ch].panning&0xf0)>>4);
}
DivDispatchOscBuffer* DivPlatformK007232::getOscBuffer(int ch) { DivDispatchOscBuffer* DivPlatformK007232::getOscBuffer(int ch) {
return oscBuf[ch]; return oscBuf[ch];
} }

View file

@ -85,6 +85,7 @@ class DivPlatformK007232: public DivDispatch, public k007232_intf {
int dispatch(DivCommand c); int dispatch(DivCommand c);
void* getChanState(int chan); void* getChanState(int chan);
DivMacroInt* getChanMacroInt(int ch); DivMacroInt* getChanMacroInt(int ch);
unsigned short getPan(int chan);
DivDispatchOscBuffer* getOscBuffer(int chan); DivDispatchOscBuffer* getOscBuffer(int chan);
unsigned char* getRegisterPool(); unsigned char* getRegisterPool();
int getRegisterPoolSize(); int getRegisterPoolSize();

View file

@ -64,6 +64,7 @@ class DivPlatformK053260: public DivDispatch, public k053260_intf {
virtual int dispatch(DivCommand c) override; virtual int dispatch(DivCommand c) override;
virtual void* getChanState(int chan) override; virtual void* getChanState(int chan) override;
virtual DivMacroInt* getChanMacroInt(int ch) override; virtual DivMacroInt* getChanMacroInt(int ch) override;
virtual unsigned short getPan(int chan) override;
virtual DivDispatchOscBuffer* getOscBuffer(int chan) override; virtual DivDispatchOscBuffer* getOscBuffer(int chan) override;
virtual unsigned char* getRegisterPool() override; virtual unsigned char* getRegisterPool() override;
virtual int getRegisterPoolSize() override; virtual int getRegisterPoolSize() override;

View file

@ -430,6 +430,10 @@ DivMacroInt* DivPlatformLynx::getChanMacroInt(int ch) {
return &chan[ch].std; return &chan[ch].std;
} }
unsigned short DivPlatformLynx::getPan(int ch) {
return ((chan[ch].pan&0xf0)<<4)|(chan[ch].pan&15);
}
DivSamplePos DivPlatformLynx::getSamplePos(int ch) { DivSamplePos DivPlatformLynx::getSamplePos(int ch) {
if (ch>=4) return DivSamplePos(); if (ch>=4) return DivSamplePos();
if (!chan[ch].pcm) return DivSamplePos(); if (!chan[ch].pcm) return DivSamplePos();

View file

@ -72,6 +72,7 @@ class DivPlatformLynx: public DivDispatch {
int dispatch(DivCommand c); int dispatch(DivCommand c);
void* getChanState(int chan); void* getChanState(int chan);
DivMacroInt* getChanMacroInt(int ch); DivMacroInt* getChanMacroInt(int ch);
unsigned short getPan(int chan);
DivSamplePos getSamplePos(int ch); DivSamplePos getSamplePos(int ch);
DivDispatchOscBuffer* getOscBuffer(int chan); DivDispatchOscBuffer* getOscBuffer(int chan);
unsigned char* getRegisterPool(); unsigned char* getRegisterPool();

View file

@ -62,6 +62,7 @@ class DivPlatformMSM6258: public DivDispatch {
int dispatch(DivCommand c); int dispatch(DivCommand c);
void* getChanState(int chan); void* getChanState(int chan);
DivMacroInt* getChanMacroInt(int ch); DivMacroInt* getChanMacroInt(int ch);
unsigned short getPan(int chan);
DivDispatchOscBuffer* getOscBuffer(int chan); DivDispatchOscBuffer* getOscBuffer(int chan);
unsigned char* getRegisterPool(); unsigned char* getRegisterPool();
int getRegisterPoolSize(); int getRegisterPoolSize();

View file

@ -473,6 +473,11 @@ DivMacroInt* DivPlatformNamcoWSG::getChanMacroInt(int ch) {
return &chan[ch].std; return &chan[ch].std;
} }
unsigned short DivPlatformNamcoWSG::getPan(int ch) {
if (devType!=30) return 0;
return ((chan[ch].pan&0xf0)<<4)|(chan[ch].pan&15);
}
DivDispatchOscBuffer* DivPlatformNamcoWSG::getOscBuffer(int ch) { DivDispatchOscBuffer* DivPlatformNamcoWSG::getOscBuffer(int ch) {
return oscBuf[ch]; return oscBuf[ch];
} }

View file

@ -62,6 +62,7 @@ class DivPlatformNamcoWSG: public DivDispatch {
int dispatch(DivCommand c); int dispatch(DivCommand c);
void* getChanState(int chan); void* getChanState(int chan);
DivMacroInt* getChanMacroInt(int ch); DivMacroInt* getChanMacroInt(int ch);
unsigned short getPan(int chan);
DivDispatchOscBuffer* getOscBuffer(int chan); DivDispatchOscBuffer* getOscBuffer(int chan);
unsigned char* getRegisterPool(); unsigned char* getRegisterPool();
int getRegisterPoolSize(); int getRegisterPoolSize();

View file

@ -114,6 +114,7 @@ class DivPlatformOPL: public DivDispatch {
int dispatch(DivCommand c); int dispatch(DivCommand c);
void* getChanState(int chan); void* getChanState(int chan);
DivMacroInt* getChanMacroInt(int ch); DivMacroInt* getChanMacroInt(int ch);
unsigned short getPan(int chan);
DivDispatchOscBuffer* getOscBuffer(int chan); DivDispatchOscBuffer* getOscBuffer(int chan);
unsigned char* getRegisterPool(); unsigned char* getRegisterPool();
int getRegisterPoolSize(); int getRegisterPoolSize();

View file

@ -508,6 +508,10 @@ DivMacroInt* DivPlatformPCE::getChanMacroInt(int ch) {
return &chan[ch].std; return &chan[ch].std;
} }
unsigned short DivPlatformPCE::getPan(int ch) {
return ((chan[ch].pan&0xf0)<<4)|(chan[ch].pan&15);
}
DivSamplePos DivPlatformPCE::getSamplePos(int ch) { DivSamplePos DivPlatformPCE::getSamplePos(int ch) {
if (ch>=6) return DivSamplePos(); if (ch>=6) return DivSamplePos();
if (!chan[ch].pcm) return DivSamplePos(); if (!chan[ch].pcm) return DivSamplePos();

View file

@ -82,6 +82,7 @@ class DivPlatformPCE: public DivDispatch {
int dispatch(DivCommand c); int dispatch(DivCommand c);
void* getChanState(int chan); void* getChanState(int chan);
DivMacroInt* getChanMacroInt(int ch); DivMacroInt* getChanMacroInt(int ch);
unsigned short getPan(int chan);
DivSamplePos getSamplePos(int ch); DivSamplePos getSamplePos(int ch);
DivDispatchOscBuffer* getOscBuffer(int chan); DivDispatchOscBuffer* getOscBuffer(int chan);
unsigned char* getRegisterPool(); unsigned char* getRegisterPool();

View file

@ -497,6 +497,10 @@ DivMacroInt* DivPlatformPCMDAC::getChanMacroInt(int ch) {
return &chan[0].std; return &chan[0].std;
} }
unsigned short DivPlatformPCMDAC::getPan(int ch) {
return (chan[0].panL<<8)|chan[0].panR;
}
DivSamplePos DivPlatformPCMDAC::getSamplePos(int ch) { DivSamplePos DivPlatformPCMDAC::getSamplePos(int ch) {
if (ch>=1) return DivSamplePos(); if (ch>=1) return DivSamplePos();
return DivSamplePos( return DivSamplePos(

View file

@ -78,6 +78,7 @@ class DivPlatformPCMDAC: public DivDispatch {
void muteChannel(int ch, bool mute); void muteChannel(int ch, bool mute);
int getOutputCount(); int getOutputCount();
DivMacroInt* getChanMacroInt(int ch); DivMacroInt* getChanMacroInt(int ch);
unsigned short getPan(int chan);
DivSamplePos getSamplePos(int ch); DivSamplePos getSamplePos(int ch);
void setFlags(const DivConfig& flags); void setFlags(const DivConfig& flags);
void notifyInsChange(int ins); void notifyInsChange(int ins);

View file

@ -66,6 +66,7 @@ class DivPlatformQSound: public DivDispatch {
int dispatch(DivCommand c); int dispatch(DivCommand c);
void* getChanState(int chan); void* getChanState(int chan);
DivMacroInt* getChanMacroInt(int ch); DivMacroInt* getChanMacroInt(int ch);
unsigned short getPan(int chan);
DivDispatchOscBuffer* getOscBuffer(int chan); DivDispatchOscBuffer* getOscBuffer(int chan);
unsigned char* getRegisterPool(); unsigned char* getRegisterPool();
int getRegisterPoolSize(); int getRegisterPoolSize();

View file

@ -59,6 +59,7 @@ class DivPlatformRF5C68: public DivDispatch {
int dispatch(DivCommand c); int dispatch(DivCommand c);
void* getChanState(int chan); void* getChanState(int chan);
DivMacroInt* getChanMacroInt(int ch); DivMacroInt* getChanMacroInt(int ch);
unsigned short getPan(int chan);
DivDispatchOscBuffer* getOscBuffer(int chan); DivDispatchOscBuffer* getOscBuffer(int chan);
unsigned char* getRegisterPool(); unsigned char* getRegisterPool();
int getRegisterPoolSize(); int getRegisterPoolSize();

View file

@ -365,6 +365,10 @@ DivMacroInt* DivPlatformSAA1099::getChanMacroInt(int ch) {
return &chan[ch].std; return &chan[ch].std;
} }
unsigned short DivPlatformSAA1099::getPan(int ch) {
return ((chan[ch].pan&0xf0)<<4)|(chan[ch].pan&15);
}
DivDispatchOscBuffer* DivPlatformSAA1099::getOscBuffer(int ch) { DivDispatchOscBuffer* DivPlatformSAA1099::getOscBuffer(int ch) {
return oscBuf[ch]; return oscBuf[ch];
} }

View file

@ -79,6 +79,7 @@ class DivPlatformSAA1099: public DivDispatch {
int dispatch(DivCommand c); int dispatch(DivCommand c);
void* getChanState(int chan); void* getChanState(int chan);
DivMacroInt* getChanMacroInt(int ch); DivMacroInt* getChanMacroInt(int ch);
unsigned short getPan(int chan);
DivDispatchOscBuffer* getOscBuffer(int chan); DivDispatchOscBuffer* getOscBuffer(int chan);
unsigned char* getRegisterPool(); unsigned char* getRegisterPool();
int getRegisterPoolSize(); int getRegisterPoolSize();

View file

@ -394,6 +394,10 @@ DivMacroInt* DivPlatformSegaPCM::getChanMacroInt(int ch) {
return &chan[ch].std; return &chan[ch].std;
} }
unsigned short DivPlatformSegaPCM::getPan(int ch) {
return (chan[ch].chPanL<<8)|chan[ch].chPanR;
}
DivSamplePos DivPlatformSegaPCM::getSamplePos(int ch) { DivSamplePos DivPlatformSegaPCM::getSamplePos(int ch) {
if (ch>=16) return DivSamplePos(); if (ch>=16) return DivSamplePos();
if (chan[ch].pcm.sample<0 || chan[ch].pcm.sample>=parent->song.sampleLen) return DivSamplePos(); if (chan[ch].pcm.sample<0 || chan[ch].pcm.sample>=parent->song.sampleLen) return DivSamplePos();

View file

@ -89,6 +89,7 @@ class DivPlatformSegaPCM: public DivDispatch {
int dispatch(DivCommand c); int dispatch(DivCommand c);
void* getChanState(int chan); void* getChanState(int chan);
DivMacroInt* getChanMacroInt(int ch); DivMacroInt* getChanMacroInt(int ch);
unsigned short getPan(int chan);
DivSamplePos getSamplePos(int ch); DivSamplePos getSamplePos(int ch);
DivDispatchOscBuffer* getOscBuffer(int chan); DivDispatchOscBuffer* getOscBuffer(int chan);
unsigned char* getRegisterPool(); unsigned char* getRegisterPool();

View file

@ -77,6 +77,7 @@ class DivPlatformSMS: public DivDispatch {
int dispatch(DivCommand c); int dispatch(DivCommand c);
void* getChanState(int chan); void* getChanState(int chan);
DivMacroInt* getChanMacroInt(int ch); DivMacroInt* getChanMacroInt(int ch);
unsigned short getPan(int chan);
DivDispatchOscBuffer* getOscBuffer(int chan); DivDispatchOscBuffer* getOscBuffer(int chan);
unsigned char* getRegisterPool(); unsigned char* getRegisterPool();
int getRegisterPoolSize(); int getRegisterPoolSize();

View file

@ -699,6 +699,10 @@ DivMacroInt* DivPlatformSNES::getChanMacroInt(int ch) {
return &chan[ch].std; return &chan[ch].std;
} }
unsigned short DivPlatformSNES::getPan(int ch) {
return (chan[ch].panL<<8)|chan[ch].panR;
}
DivSamplePos DivPlatformSNES::getSamplePos(int ch) { DivSamplePos DivPlatformSNES::getSamplePos(int ch) {
if (ch>=8) return DivSamplePos(); if (ch>=8) return DivSamplePos();
if (!chan[ch].active) return DivSamplePos(); if (!chan[ch].active) return DivSamplePos();

View file

@ -100,6 +100,7 @@ class DivPlatformSNES: public DivDispatch {
int dispatch(DivCommand c); int dispatch(DivCommand c);
void* getChanState(int chan); void* getChanState(int chan);
DivMacroInt* getChanMacroInt(int ch); DivMacroInt* getChanMacroInt(int ch);
unsigned short getPan(int chan);
DivSamplePos getSamplePos(int ch); DivSamplePos getSamplePos(int ch);
DivDispatchOscBuffer* getOscBuffer(int chan); DivDispatchOscBuffer* getOscBuffer(int chan);
unsigned char* getRegisterPool(); unsigned char* getRegisterPool();

View file

@ -105,6 +105,7 @@ class DivPlatformSoundUnit: public DivDispatch {
int dispatch(DivCommand c); int dispatch(DivCommand c);
void* getChanState(int chan); void* getChanState(int chan);
DivMacroInt* getChanMacroInt(int ch); DivMacroInt* getChanMacroInt(int ch);
unsigned short getPan(int chan);
DivDispatchOscBuffer* getOscBuffer(int chan); DivDispatchOscBuffer* getOscBuffer(int chan);
unsigned char* getRegisterPool(); unsigned char* getRegisterPool();
int getRegisterPoolSize(); int getRegisterPoolSize();

View file

@ -476,6 +476,10 @@ DivMacroInt* DivPlatformSwan::getChanMacroInt(int ch) {
return &chan[ch].std; return &chan[ch].std;
} }
unsigned short DivPlatformSwan::getPan(int ch) {
return ((chan[ch].pan&0xf0)<<4)|(chan[ch].pan&15);
}
DivDispatchOscBuffer* DivPlatformSwan::getOscBuffer(int ch) { DivDispatchOscBuffer* DivPlatformSwan::getOscBuffer(int ch) {
return oscBuf[ch]; return oscBuf[ch];
} }

View file

@ -62,6 +62,7 @@ class DivPlatformSwan: public DivDispatch {
int dispatch(DivCommand c); int dispatch(DivCommand c);
void* getChanState(int chan); void* getChanState(int chan);
DivMacroInt* getChanMacroInt(int ch); DivMacroInt* getChanMacroInt(int ch);
unsigned short getPan(int chan);
DivDispatchOscBuffer* getOscBuffer(int chan); DivDispatchOscBuffer* getOscBuffer(int chan);
unsigned char* getRegisterPool(); unsigned char* getRegisterPool();
int getRegisterPoolSize(); int getRegisterPoolSize();

View file

@ -300,6 +300,10 @@ DivMacroInt* DivPlatformT6W28::getChanMacroInt(int ch) {
return &chan[ch].std; return &chan[ch].std;
} }
unsigned short DivPlatformT6W28::getPan(int ch) {
return (chan[ch].panL<<8)|chan[ch].panR;
}
DivDispatchOscBuffer* DivPlatformT6W28::getOscBuffer(int ch) { DivDispatchOscBuffer* DivPlatformT6W28::getOscBuffer(int ch) {
return oscBuf[ch]; return oscBuf[ch];
} }

View file

@ -63,6 +63,7 @@ class DivPlatformT6W28: public DivDispatch {
int dispatch(DivCommand c); int dispatch(DivCommand c);
void* getChanState(int chan); void* getChanState(int chan);
DivMacroInt* getChanMacroInt(int ch); DivMacroInt* getChanMacroInt(int ch);
unsigned short getPan(int chan);
DivDispatchOscBuffer* getOscBuffer(int chan); DivDispatchOscBuffer* getOscBuffer(int chan);
unsigned char* getRegisterPool(); unsigned char* getRegisterPool();
int getRegisterPoolSize(); int getRegisterPoolSize();

View file

@ -965,6 +965,10 @@ DivMacroInt* DivPlatformTX81Z::getChanMacroInt(int ch) {
return &chan[ch].std; return &chan[ch].std;
} }
unsigned short DivPlatformTX81Z::getPan(int ch) {
return (chan[ch].chVolL<<8)|(chan[ch].chVolR);
}
DivDispatchOscBuffer* DivPlatformTX81Z::getOscBuffer(int ch) { DivDispatchOscBuffer* DivPlatformTX81Z::getOscBuffer(int ch) {
return oscBuf[ch]; return oscBuf[ch];
} }

View file

@ -65,6 +65,7 @@ class DivPlatformTX81Z: public DivPlatformOPM {
int dispatch(DivCommand c); int dispatch(DivCommand c);
void* getChanState(int chan); void* getChanState(int chan);
DivMacroInt* getChanMacroInt(int ch); DivMacroInt* getChanMacroInt(int ch);
unsigned short getPan(int chan);
DivDispatchOscBuffer* getOscBuffer(int chan); DivDispatchOscBuffer* getOscBuffer(int chan);
unsigned char* getRegisterPool(); unsigned char* getRegisterPool();
int getRegisterPoolSize(); int getRegisterPoolSize();

View file

@ -419,6 +419,10 @@ DivMacroInt* DivPlatformVB::getChanMacroInt(int ch) {
return &chan[ch].std; return &chan[ch].std;
} }
unsigned short DivPlatformVB::getPan(int ch) {
return ((chan[ch].pan&0xf0)<<4)|(chan[ch].pan&15);
}
DivDispatchOscBuffer* DivPlatformVB::getOscBuffer(int ch) { DivDispatchOscBuffer* DivPlatformVB::getOscBuffer(int ch) {
return oscBuf[ch]; return oscBuf[ch];
} }

View file

@ -69,6 +69,7 @@ class DivPlatformVB: public DivDispatch {
int dispatch(DivCommand c); int dispatch(DivCommand c);
void* getChanState(int chan); void* getChanState(int chan);
DivMacroInt* getChanMacroInt(int ch); DivMacroInt* getChanMacroInt(int ch);
unsigned short getPan(int chan);
DivDispatchOscBuffer* getOscBuffer(int chan); DivDispatchOscBuffer* getOscBuffer(int chan);
unsigned char* getRegisterPool(); unsigned char* getRegisterPool();
int getRegisterPoolSize(); int getRegisterPoolSize();

View file

@ -64,6 +64,7 @@ class DivPlatformVERA: public DivDispatch {
int dispatch(DivCommand c); int dispatch(DivCommand c);
void* getChanState(int chan); void* getChanState(int chan);
DivMacroInt* getChanMacroInt(int ch); DivMacroInt* getChanMacroInt(int ch);
unsigned short getPan(int chan);
DivDispatchOscBuffer* getOscBuffer(int chan); DivDispatchOscBuffer* getOscBuffer(int chan);
unsigned char* getRegisterPool(); unsigned char* getRegisterPool();
int getRegisterPoolSize(); int getRegisterPoolSize();

View file

@ -863,6 +863,10 @@ DivMacroInt* DivPlatformX1_010::getChanMacroInt(int ch) {
return &chan[ch].std; return &chan[ch].std;
} }
unsigned short DivPlatformX1_010::getPan(int ch) {
return ((chan[ch].pan&0xf0)<<4)|(chan[ch].pan&15);
}
DivDispatchOscBuffer* DivPlatformX1_010::getOscBuffer(int ch) { DivDispatchOscBuffer* DivPlatformX1_010::getOscBuffer(int ch) {
return oscBuf[ch]; return oscBuf[ch];
} }

View file

@ -131,6 +131,7 @@ class DivPlatformX1_010: public DivDispatch, public vgsound_emu_mem_intf {
int dispatch(DivCommand c); int dispatch(DivCommand c);
void* getChanState(int chan); void* getChanState(int chan);
DivMacroInt* getChanMacroInt(int ch); DivMacroInt* getChanMacroInt(int ch);
unsigned short getPan(int chan);
DivDispatchOscBuffer* getOscBuffer(int chan); DivDispatchOscBuffer* getOscBuffer(int chan);
unsigned char* getRegisterPool(); unsigned char* getRegisterPool();
int getRegisterPoolSize(); int getRegisterPoolSize();

View file

@ -80,6 +80,7 @@ class DivPlatformYM2608: public DivPlatformOPN {
int dispatch(DivCommand c); int dispatch(DivCommand c);
void* getChanState(int chan); void* getChanState(int chan);
DivMacroInt* getChanMacroInt(int ch); DivMacroInt* getChanMacroInt(int ch);
virtual unsigned short getPan(int chan);
DivDispatchOscBuffer* getOscBuffer(int chan); DivDispatchOscBuffer* getOscBuffer(int chan);
unsigned char* getRegisterPool(); unsigned char* getRegisterPool();
int getRegisterPoolSize(); int getRegisterPoolSize();

View file

@ -750,6 +750,12 @@ DivMacroInt* DivPlatformYM2608Ext::getChanMacroInt(int ch) {
return &chan[ch].std; return &chan[ch].std;
} }
unsigned short DivPlatformYM2608Ext::getPan(int ch) {
if (ch>=4+extChanOffs) return DivPlatformYM2608::getPan(ch-3);
if (ch>=extChanOffs) return ((opChan[0].pan<<7)&1)|(opChan[0].pan&1);
return DivPlatformYM2608::getPan(ch);
}
DivDispatchOscBuffer* DivPlatformYM2608Ext::getOscBuffer(int ch) { DivDispatchOscBuffer* DivPlatformYM2608Ext::getOscBuffer(int ch) {
if (ch>=6) return oscBuf[ch-3]; if (ch>=6) return oscBuf[ch-3];
if (ch<3) return oscBuf[ch]; if (ch<3) return oscBuf[ch];

View file

@ -33,6 +33,7 @@ class DivPlatformYM2608Ext: public DivPlatformYM2608 {
int dispatch(DivCommand c); int dispatch(DivCommand c);
void* getChanState(int chan); void* getChanState(int chan);
DivMacroInt* getChanMacroInt(int ch); DivMacroInt* getChanMacroInt(int ch);
unsigned short getPan(int chan);
DivDispatchOscBuffer* getOscBuffer(int chan); DivDispatchOscBuffer* getOscBuffer(int chan);
void reset(); void reset();
void forceIns(); void forceIns();

View file

@ -48,6 +48,7 @@ class DivPlatformYM2610: public DivPlatformYM2610Base {
int dispatch(DivCommand c); int dispatch(DivCommand c);
void* getChanState(int chan); void* getChanState(int chan);
DivMacroInt* getChanMacroInt(int ch); DivMacroInt* getChanMacroInt(int ch);
virtual unsigned short getPan(int chan);
DivDispatchOscBuffer* getOscBuffer(int chan); DivDispatchOscBuffer* getOscBuffer(int chan);
unsigned char* getRegisterPool(); unsigned char* getRegisterPool();
int getRegisterPoolSize(); int getRegisterPoolSize();

View file

@ -44,6 +44,7 @@ class DivPlatformYM2610B: public DivPlatformYM2610Base {
int dispatch(DivCommand c); int dispatch(DivCommand c);
void* getChanState(int chan); void* getChanState(int chan);
DivMacroInt* getChanMacroInt(int ch); DivMacroInt* getChanMacroInt(int ch);
virtual unsigned short getPan(int chan);
DivDispatchOscBuffer* getOscBuffer(int chan); DivDispatchOscBuffer* getOscBuffer(int chan);
unsigned char* getRegisterPool(); unsigned char* getRegisterPool();
int getRegisterPoolSize(); int getRegisterPoolSize();

View file

@ -740,6 +740,12 @@ DivMacroInt* DivPlatformYM2610BExt::getChanMacroInt(int ch) {
return &chan[ch].std; return &chan[ch].std;
} }
unsigned short DivPlatformYM2610BExt::getPan(int ch) {
if (ch>=4+extChanOffs) return DivPlatformYM2610B::getPan(ch-3);
if (ch>=extChanOffs) return ((opChan[0].pan<<7)&1)|(opChan[0].pan&1);
return DivPlatformYM2610B::getPan(ch);
}
DivDispatchOscBuffer* DivPlatformYM2610BExt::getOscBuffer(int ch) { DivDispatchOscBuffer* DivPlatformYM2610BExt::getOscBuffer(int ch) {
if (ch>=(extChanOffs+4)) return oscBuf[ch-3]; if (ch>=(extChanOffs+4)) return oscBuf[ch-3];
if (ch<(extChanOffs+1)) return oscBuf[ch]; if (ch<(extChanOffs+1)) return oscBuf[ch];

View file

@ -33,6 +33,7 @@ class DivPlatformYM2610BExt: public DivPlatformYM2610B {
int dispatch(DivCommand c); int dispatch(DivCommand c);
void* getChanState(int chan); void* getChanState(int chan);
DivMacroInt* getChanMacroInt(int ch); DivMacroInt* getChanMacroInt(int ch);
unsigned short getPan(int chan);
DivDispatchOscBuffer* getOscBuffer(int chan); DivDispatchOscBuffer* getOscBuffer(int chan);
void reset(); void reset();
void forceIns(); void forceIns();

View file

@ -740,6 +740,12 @@ DivMacroInt* DivPlatformYM2610Ext::getChanMacroInt(int ch) {
return &chan[ch].std; return &chan[ch].std;
} }
unsigned short DivPlatformYM2610Ext::getPan(int ch) {
if (ch>=4+extChanOffs) return DivPlatformYM2610::getPan(ch-3);
if (ch>=extChanOffs) return ((opChan[0].pan<<7)&1)|(opChan[0].pan&1);
return DivPlatformYM2610::getPan(ch);
}
DivDispatchOscBuffer* DivPlatformYM2610Ext::getOscBuffer(int ch) { DivDispatchOscBuffer* DivPlatformYM2610Ext::getOscBuffer(int ch) {
if (ch>=(extChanOffs+4)) return oscBuf[ch-3]; if (ch>=(extChanOffs+4)) return oscBuf[ch-3];
if (ch<(extChanOffs+1)) return oscBuf[ch]; if (ch<(extChanOffs+1)) return oscBuf[ch];

View file

@ -33,6 +33,7 @@ class DivPlatformYM2610Ext: public DivPlatformYM2610 {
int dispatch(DivCommand c); int dispatch(DivCommand c);
void* getChanState(int chan); void* getChanState(int chan);
DivMacroInt* getChanMacroInt(int ch); DivMacroInt* getChanMacroInt(int ch);
unsigned short getPan(int chan);
DivDispatchOscBuffer* getOscBuffer(int chan); DivDispatchOscBuffer* getOscBuffer(int chan);
void reset(); void reset();
void forceIns(); void forceIns();

View file

@ -59,6 +59,7 @@ class DivPlatformYMZ280B: public DivDispatch {
int dispatch(DivCommand c); int dispatch(DivCommand c);
void* getChanState(int chan); void* getChanState(int chan);
DivMacroInt* getChanMacroInt(int ch); DivMacroInt* getChanMacroInt(int ch);
unsigned short getPan(int chan);
DivDispatchOscBuffer* getOscBuffer(int chan); DivDispatchOscBuffer* getOscBuffer(int chan);
unsigned char* getRegisterPool(); unsigned char* getRegisterPool();
int getRegisterPoolSize(); int getRegisterPoolSize();