oops I forgot to commit!

This commit is contained in:
tildearrow 2022-03-26 13:47:13 -05:00
parent 26791df58e
commit d869c21f52
1 changed files with 8 additions and 8 deletions

View File

@ -22,11 +22,9 @@
#include <math.h>
#define rWrite(a,v) {regPool[(a)]=(v)&0xff; vic_sound_machine_store(vic,a,(v)&0xff);}
#define SAMP_DIVIDER 4
const int chipDividers[4]={
128, 64, 32, 64
};
#define CHIP_DIVIDER 32
#define SAMP_DIVIDER 4
const char* regCheatSheetVIC[]={
"CH1_Pitch", "0A",
@ -95,7 +93,6 @@ void DivPlatformVIC20::writeOutVol(int ch) {
void DivPlatformVIC20::tick() {
for (int i=0; i<4; i++) {
int CHIP_DIVIDER=chipDividers[i];
chan[i].std.next();
if (chan[i].std.hadVol) {
int env=chan[i].std.vol;
@ -124,9 +121,13 @@ void DivPlatformVIC20::tick() {
}
if (chan[i].freqChanged || chan[i].keyOn || chan[i].keyOff) {
chan[i].freq=parent->calcFreq(chan[i].baseFreq,chan[i].pitch,true);
printf("%d freq: %d\n",i,chan[i].freq);
if (i<3) {
chan[i].freq>>=(2-i);
} else {
chan[i].freq>>=1;
}
if (chan[i].freq<1) chan[i].freq=1;
if (chan[i].freq>127) chan[i].freq=127;
if (chan[i].freq>127) chan[i].freq=0;
if (isMuted[i]) chan[i].keyOn=false;
if (chan[i].keyOn) {
if (i<3) {
@ -152,7 +153,6 @@ void DivPlatformVIC20::tick() {
}
int DivPlatformVIC20::dispatch(DivCommand c) {
int CHIP_DIVIDER=chipDividers[c.chan];
switch (c.cmd) {
case DIV_CMD_NOTE_ON: {
DivInstrument* ins=parent->getIns(chan[c.chan].ins);