More sonarlint work

This commit is contained in:
Jasmine Iwanek
2023-06-09 23:46:54 -04:00
parent 0d1d069af4
commit ee695e71f9
218 changed files with 6282 additions and 3845 deletions

View File

@@ -125,9 +125,9 @@ typedef struct chan {
uint8_t con;
uint8_t alg;
uint8_t ksv;
uint16_t cha,
chb;
uint8_t ch_num;
uint16_t cha;
uint16_t chb;
uint8_t ch_num;
} chan_t;
typedef struct wrbuf {
@@ -177,12 +177,14 @@ typedef struct chip {
typedef struct {
nuked_t opl;
int8_t flags, pad;
int8_t flags;
int8_t pad;
uint16_t port;
uint8_t status, timer_ctrl;
uint16_t timer_count[2],
timer_cur_count[2];
uint8_t status;
uint8_t timer_ctrl;
uint16_t timer_count[2];
uint16_t timer_cur_count[2];
pc_timer_t timers[2];
@@ -543,6 +545,9 @@ env_calc(slot_t *slot)
case envelope_gen_num_release:
reg_rate = slot->reg_rr;
break;
default:
break;
}
slot->pg_reset = reset;
@@ -619,6 +624,9 @@ env_calc(slot_t *slot)
if (!eg_off && !reset && shift > 0)
eg_inc = 1 << (shift - 1);
break;
default:
break;
}
slot->eg_rout = (eg_rout + eg_inc) & 0x1ff;
@@ -810,6 +818,9 @@ channel_setup_alg(chan_t *ch)
ch->slots[0]->mod = &ch->slots[0]->fbmod;
ch->slots[1]->mod = &ch->dev->zeromod;
break;
default:
break;
}
return;
}
@@ -867,6 +878,9 @@ channel_setup_alg(chan_t *ch)
ch->out[2] = &ch->slots[1]->out;
ch->out[3] = &ch->dev->zeromod;
break;
default:
break;
}
} else
switch (ch->alg & 0x01) {
@@ -887,6 +901,9 @@ channel_setup_alg(chan_t *ch)
ch->out[2] = &ch->dev->zeromod;
ch->out[3] = &ch->dev->zeromod;
break;
default:
break;
}
}
@@ -1128,12 +1145,18 @@ nuked_write_reg(void *priv, uint16_t reg, uint8_t val)
case 0x05:
dev->newm = val & 0x01;
break;
default:
break;
}
else
switch (regm & 0x0f) {
case 0x08:
dev->nts = (val >> 6) & 0x01;
break;
default:
break;
}
break;
@@ -1191,6 +1214,9 @@ nuked_write_reg(void *priv, uint16_t reg, uint8_t val)
if (ad_slot[regm & 0x1f] >= 0)
slot_write_e0(&dev->slot[18 * high + ad_slot[regm & 0x1f]], val);
break;
default:
break;
}
}
@@ -1576,6 +1602,9 @@ nuked_drv_write(uint16_t port, uint8_t val, void *priv)
nuked_log("Status mask now %02X (val = %02X)\n", (val & ~CTRL_TMR_MASK) & CTRL_TMR_MASK, val);
}
break;
default:
break;
}
} else {
dev->port = nuked_write_addr(&dev->opl, port, val) & 0x01ff;