void OPL2_setreg(uint8 A, uint8 V)
{
- if(fmob)
+ if(fmob)
OPLWrite(fmob,A,V);
}
for(x=y=0;x<0x40;x++)
y|=MapperExRAM[x];
if(y)
- {
- InitOPL();
+ {
+ InitOPL();
for(x=0;x<6;x++)
{
- VRC7_LoadInstrument(x);
+ VRC7_LoadInstrument(x);
vrc7translate(0x10+x,VRC7Chan[0][x]);
}
}
{
int32 z,a;
- z=((timestamp<<16)/soundtsinc)>>4;
+ z=((SOUNDTS<<16)/soundtsinc)>>4;
a=z-dwave;
if(a && fmob)
{
int32 z,a;
- z=((timestamp<<16)/soundtsinc)>>4;
+ z=((SOUNDTS<<16)/soundtsinc)>>4;
a=z-dwave;
if(fmob && a)
int x;
if(!fmob)
- {
+ {
if(!( fmob=OPLCreate(OPL_TYPE_WAVESEL,1789772*2,FSettings.SndRate)))
return;
}
uint8 *i;
uint8 x = InstTrans[Chan];
uint8 y = (VRC7Chan[2][Chan] >> 4) & 0xF;
-
+
i=VRC7Instrument[y];
OPL2_setreg((0x20+x),i[0]);
OPL2_setreg((0x23+x),i[1]);
OPL2_setreg((0x40+x),i[2]);
- OPL2_setreg((0x43+x),((i[3] & 0xC0)
+ OPL2_setreg((0x43+x),((i[3] & 0xC0)
| ((VRC7Chan[2][Chan] << 2) & 0x3C))); // quiet
OPL2_setreg(0xe0+x,(i[3] >> 3) & 0x01);
OPL2_setreg(0xe3+x,(i[3] >> 4) & 0x01);