Game Boy: add an option to select wave ch invert
This commit is contained in:
parent
bf95a358bc
commit
1e5163c738
3 changed files with 30 additions and 2 deletions
|
|
@ -82,8 +82,12 @@ void DivPlatformGB::acquire(short** buf, size_t len) {
|
|||
void DivPlatformGB::updateWave() {
|
||||
rWrite(0x1a,0);
|
||||
for (int i=0; i<16; i++) {
|
||||
int nibble1=15-ws.output[((i<<1)+antiClickWavePos)&31];
|
||||
int nibble2=15-ws.output[((1+(i<<1))+antiClickWavePos)&31];
|
||||
int nibble1=ws.output[((i<<1)+antiClickWavePos)&31];
|
||||
int nibble2=ws.output[((1+(i<<1))+antiClickWavePos)&31];
|
||||
if (invertWave) {
|
||||
nibble1^=15;
|
||||
nibble2^=15;
|
||||
}
|
||||
rWrite(0x30+i,(nibble1<<4)|nibble2);
|
||||
}
|
||||
antiClickWavePos&=31;
|
||||
|
|
@ -658,6 +662,7 @@ void DivPlatformGB::setFlags(const DivConfig& flags) {
|
|||
model=GB_MODEL_AGB;
|
||||
break;
|
||||
}
|
||||
invertWave=flags.getBool("invertWave",true);
|
||||
enoughAlready=flags.getBool("enoughAlready",false);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ class DivPlatformGB: public DivDispatch {
|
|||
DivDispatchOscBuffer* oscBuf[4];
|
||||
bool isMuted[4];
|
||||
bool antiClickEnabled;
|
||||
bool invertWave;
|
||||
bool enoughAlready;
|
||||
unsigned char lastPan;
|
||||
DivWaveSynth ws;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue