mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-15 17:25:06 +00:00
fix issue with volume macro+slide
This commit is contained in:
parent
dde2462025
commit
6884494b5c
9 changed files with 9 additions and 9 deletions
|
@ -49,7 +49,7 @@ void DivPlatformAmiga::tick() {
|
||||||
for (int i=0; i<4; i++) {
|
for (int i=0; i<4; i++) {
|
||||||
chan[i].std.next();
|
chan[i].std.next();
|
||||||
if (chan[i].std.hadVol) {
|
if (chan[i].std.hadVol) {
|
||||||
chan[i].outVol=(chan[i].vol*chan[i].std.vol)>>6;
|
chan[i].outVol=((chan[i].vol%65)*chan[i].std.vol)>>6;
|
||||||
}
|
}
|
||||||
if (chan[i].std.hadArp) {
|
if (chan[i].std.hadArp) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
|
|
|
@ -34,7 +34,7 @@ void DivPlatformAY8910::tick() {
|
||||||
for (int i=0; i<3; i++) {
|
for (int i=0; i<3; i++) {
|
||||||
chan[i].std.next();
|
chan[i].std.next();
|
||||||
if (chan[i].std.hadVol) {
|
if (chan[i].std.hadVol) {
|
||||||
chan[i].outVol=chan[i].std.vol-(15-chan[i].vol);
|
chan[i].outVol=chan[i].std.vol-(15-(chan[i].vol&15));
|
||||||
if (chan[i].outVol<0) chan[i].outVol=0;
|
if (chan[i].outVol<0) chan[i].outVol=0;
|
||||||
if (isMuted[i]) {
|
if (isMuted[i]) {
|
||||||
rWrite(0x08+i,0);
|
rWrite(0x08+i,0);
|
||||||
|
|
|
@ -55,7 +55,7 @@ void DivPlatformAY8930::tick() {
|
||||||
for (int i=0; i<3; i++) {
|
for (int i=0; i<3; i++) {
|
||||||
chan[i].std.next();
|
chan[i].std.next();
|
||||||
if (chan[i].std.hadVol) {
|
if (chan[i].std.hadVol) {
|
||||||
chan[i].outVol=chan[i].std.vol-(31-chan[i].vol);
|
chan[i].outVol=chan[i].std.vol-(31-(chan[i].vol&31));
|
||||||
if (chan[i].outVol<0) chan[i].outVol=0;
|
if (chan[i].outVol<0) chan[i].outVol=0;
|
||||||
if (isMuted[i]) {
|
if (isMuted[i]) {
|
||||||
rWrite(0x08+i,0);
|
rWrite(0x08+i,0);
|
||||||
|
|
|
@ -68,7 +68,7 @@ void DivPlatformNES::tick() {
|
||||||
chan[i].std.next();
|
chan[i].std.next();
|
||||||
if (chan[i].std.hadVol) {
|
if (chan[i].std.hadVol) {
|
||||||
// ok, why are the volumes like that?
|
// ok, why are the volumes like that?
|
||||||
chan[i].outVol=chan[i].std.vol-(15-chan[i].vol);
|
chan[i].outVol=chan[i].std.vol-(15-(chan[i].vol&15));
|
||||||
if (chan[i].outVol<0) chan[i].outVol=0;
|
if (chan[i].outVol<0) chan[i].outVol=0;
|
||||||
if (i==2) { // triangle
|
if (i==2) { // triangle
|
||||||
rWrite(0x4000+i*4,(chan[i].outVol==0)?0:255);
|
rWrite(0x4000+i*4,(chan[i].outVol==0)?0:255);
|
||||||
|
|
|
@ -88,7 +88,7 @@ void DivPlatformPCE::tick() {
|
||||||
for (int i=0; i<6; i++) {
|
for (int i=0; i<6; i++) {
|
||||||
chan[i].std.next();
|
chan[i].std.next();
|
||||||
if (chan[i].std.hadVol) {
|
if (chan[i].std.hadVol) {
|
||||||
chan[i].outVol=(chan[i].vol*chan[i].std.vol)>>5;
|
chan[i].outVol=((chan[i].vol&31)*chan[i].std.vol)>>5;
|
||||||
chWrite(i,0x04,0x80|chan[i].outVol);
|
chWrite(i,0x04,0x80|chan[i].outVol);
|
||||||
}
|
}
|
||||||
if (chan[i].std.hadArp) {
|
if (chan[i].std.hadArp) {
|
||||||
|
|
|
@ -37,7 +37,7 @@ void DivPlatformSAA1099::tick() {
|
||||||
for (int i=0; i<6; i++) {
|
for (int i=0; i<6; i++) {
|
||||||
chan[i].std.next();
|
chan[i].std.next();
|
||||||
if (chan[i].std.hadVol) {
|
if (chan[i].std.hadVol) {
|
||||||
chan[i].outVol=chan[i].std.vol-(15-chan[i].vol);
|
chan[i].outVol=chan[i].std.vol-(15-(chan[i].vol&15));
|
||||||
if (chan[i].outVol<0) chan[i].outVol=0;
|
if (chan[i].outVol<0) chan[i].outVol=0;
|
||||||
if (isMuted[i]) {
|
if (isMuted[i]) {
|
||||||
rWrite(i,0);
|
rWrite(i,0);
|
||||||
|
|
|
@ -20,7 +20,7 @@ void DivPlatformSMS::tick() {
|
||||||
for (int i=0; i<4; i++) {
|
for (int i=0; i<4; i++) {
|
||||||
chan[i].std.next();
|
chan[i].std.next();
|
||||||
if (chan[i].std.hadVol) {
|
if (chan[i].std.hadVol) {
|
||||||
chan[i].outVol=(chan[i].vol*chan[i].std.vol)>>4;
|
chan[i].outVol=((chan[i].vol&15)*chan[i].std.vol)>>4;
|
||||||
rWrite(0x90|(i<<5)|(isMuted[i]?15:(15-(chan[i].outVol&15))));
|
rWrite(0x90|(i<<5)|(isMuted[i]?15:(15-(chan[i].outVol&15))));
|
||||||
}
|
}
|
||||||
if (chan[i].std.hadArp) {
|
if (chan[i].std.hadArp) {
|
||||||
|
|
|
@ -45,7 +45,7 @@ void DivPlatformTIA::tick() {
|
||||||
for (int i=0; i<2; i++) {
|
for (int i=0; i<2; i++) {
|
||||||
chan[i].std.next();
|
chan[i].std.next();
|
||||||
if (chan[i].std.hadVol) {
|
if (chan[i].std.hadVol) {
|
||||||
chan[i].outVol=chan[i].std.vol-(15-chan[i].vol);
|
chan[i].outVol=chan[i].std.vol-(15-(chan[i].vol&15));
|
||||||
if (chan[i].outVol<0) chan[i].outVol=0;
|
if (chan[i].outVol<0) chan[i].outVol=0;
|
||||||
if (isMuted[i]) {
|
if (isMuted[i]) {
|
||||||
rWrite(0x19+i,0);
|
rWrite(0x19+i,0);
|
||||||
|
|
|
@ -44,7 +44,7 @@ void DivPlatformYM2610::tick() {
|
||||||
for (int i=4; i<7; i++) {
|
for (int i=4; i<7; i++) {
|
||||||
chan[i].std.next();
|
chan[i].std.next();
|
||||||
if (chan[i].std.hadVol) {
|
if (chan[i].std.hadVol) {
|
||||||
chan[i].outVol=chan[i].std.vol-(15-chan[i].vol);
|
chan[i].outVol=chan[i].std.vol-(15-(chan[i].vol&15));
|
||||||
if (chan[i].outVol<0) chan[i].outVol=0;
|
if (chan[i].outVol<0) chan[i].outVol=0;
|
||||||
if (isMuted[i]) {
|
if (isMuted[i]) {
|
||||||
rWrite(0x04+i,0);
|
rWrite(0x04+i,0);
|
||||||
|
|
Loading…
Reference in a new issue