Revert "some cleanups"

This commit is contained in:
Autechre
2021-06-05 15:05:07 +02:00
committed by GitHub
parent cbc17a077b
commit aa4615c417
16 changed files with 174 additions and 127 deletions

View File

@@ -61,7 +61,7 @@ typedef struct {
int reloaddec;
} ENVUNIT;
uint32 DMC_7bit = 0; /* used to skip overclocking */
unsigned DMC_7bit = 0; /* used to skip overclocking */
static ENVUNIT EnvUnits[3];
static const int RectDuties[4] = { 1, 2, 4, 6 };
@@ -195,7 +195,7 @@ static DECLFW(Write_PSG) {
DoSQ1();
EnvUnits[0].Mode = (V & 0x30) >> 4;
EnvUnits[0].Speed = (V & 0xF);
if (FSettings.swapDuty)
if (swapDuty)
V = (V & 0x3F) | ((V & 0x80) >> 1) | ((V & 0x40) << 1);
break;
case 0x1:
@@ -216,7 +216,7 @@ static DECLFW(Write_PSG) {
DoSQ2();
EnvUnits[1].Mode = (V & 0x30) >> 4;
EnvUnits[1].Speed = (V & 0xF);
if (FSettings.swapDuty)
if (swapDuty)
V = (V & 0x3F) | ((V & 0x80) >> 1) | ((V & 0x40) << 1);
break;
case 0x5: