YM2608-LLE, part 16

works
special thanks to nukeykt
This commit is contained in:
tildearrow 2024-04-28 16:29:41 -05:00
parent 22f612b32a
commit aa95c28d75
2 changed files with 27 additions and 12 deletions

View file

@ -551,20 +551,33 @@ void DivPlatformYM2610::acquire_lle(short** buf, size_t len) {
lastS=fm_lle.o_s;
// ADPCM data bus
// ADPCM-A data bus
if (fm_lle.o_rmpx && !rmpx) {
adMemAddrA&=~0x3ff;
adMemAddrA|=(fm_lle.o_rad&0xff)|((fm_lle.o_ra8&3)<<8);
}
if (!fm_lle.o_rmpx && rmpx) {
adMemAddrA&=0x3ff;
adMemAddrA|=((fm_lle.o_rad&0xff)|(fm_lle.o_ra8<<8)|(fm_lle.o_ra20<<10))<<10;
}
if (!fm_lle.o_roe) {
fm_lle.input.rad=adpcmAMem[adMemAddrA&0xffffff];
} else {
if (!fm_lle.o_rmpx && rmpx) {
adMemAddrA&=~0x3ff;
adMemAddrA=(fm_lle.o_rad&0xff)|(fm_lle.o_ra8<<8);
}
if (fm_lle.o_rmpx && !rmpx) {
adMemAddrA&=0x3ff;
adMemAddrA=((fm_lle.o_rad&0xff)|(fm_lle.o_ra8<<8)|(fm_lle.o_ra20<<10))<<10;
}
rmpx=fm_lle.o_rmpx;
// ADPCM-B data bus
if (fm_lle.o_pmpx && !pmpx) {
adMemAddrB&=~0xfff;
adMemAddrB|=(fm_lle.o_pad&0xff)|((fm_lle.o_pa8&15)<<8);
}
if (!fm_lle.o_pmpx && pmpx) {
adMemAddrB&=0xfff;
adMemAddrB|=((fm_lle.o_pad&0xff)|((fm_lle.o_pa8&15)<<8))<<12;
}
if (!fm_lle.o_poe) {
fm_lle.input.pad=adpcmBMem[adMemAddrB&0xffffff];
}
pmpx=fm_lle.o_pmpx;
if (have0 && have1) break;
}

View file

@ -65,7 +65,7 @@ class DivPlatformYM2610Base: public DivPlatformOPN {
bool lastSH;
bool lastSH2;
bool lastS;
unsigned char rmpx, pmpx, rssCycle, rssSubCycle;
unsigned char rmpx, pmpx, roe, poe, rssCycle, rssSubCycle;
unsigned int adMemAddrA;
unsigned int adMemAddrB;
@ -158,6 +158,8 @@ class DivPlatformYM2610Base: public DivPlatformOPN {
lastS=0;
rmpx=0;
pmpx=0;
roe=0;
poe=0;
rssCycle=0;
rssSubCycle=0;
adMemAddrA=0;