Merge branch 'master' into nmk112

This commit is contained in:
tildearrow 2023-09-07 01:41:22 -05:00
commit e839212aa0
41 changed files with 13138 additions and 12356 deletions

View file

@ -80,7 +80,7 @@ const char** DivPlatformAmiga::getRegisterSheet() {
}
void DivPlatformAmiga::acquire(short** buf, size_t len) {
static int outL, outR, output;
thread_local int outL, outR, output;
for (size_t h=0; h<len; h++) {
bool hsync=bypassLimits;
outL=0;

View file

@ -52,7 +52,7 @@ const char** DivPlatformArcade::getRegisterSheet() {
}
void DivPlatformArcade::acquire_nuked(short** buf, size_t len) {
static int o[2];
thread_local int o[2];
for (size_t h=0; h<len; h++) {
for (int i=0; i<8; i++) {
@ -92,7 +92,7 @@ void DivPlatformArcade::acquire_nuked(short** buf, size_t len) {
}
void DivPlatformArcade::acquire_ymfm(short** buf, size_t len) {
static int os[2];
thread_local int os[2];
ymfm::ym2151::fm_engine* fme=fm_ymfm->debug_engine();

View file

@ -132,8 +132,8 @@ void DivPlatformGenesis::processDAC(int iRate) {
}
void DivPlatformGenesis::acquire_nuked(short** buf, size_t len) {
static short o[2];
static int os[2];
thread_local short o[2];
thread_local int os[2];
for (size_t h=0; h<len; h++) {
processDAC(rate);
@ -213,7 +213,7 @@ void DivPlatformGenesis::acquire_nuked(short** buf, size_t len) {
}
void DivPlatformGenesis::acquire_ymfm(short** buf, size_t len) {
static int os[2];
thread_local int os[2];
ymfm::ym2612::fm_engine* fme=fm_ymfm->debug_engine();

View file

@ -145,7 +145,7 @@ void DivPlatformNES::acquire_NSFPlay(short** buf, size_t len) {
oscBuf[0]->data[oscBuf[0]->needle++]=nes1_NP->out[0]<<11;
oscBuf[1]->data[oscBuf[1]->needle++]=nes1_NP->out[1]<<11;
oscBuf[2]->data[oscBuf[2]->needle++]=nes2_NP->out[0]<<11;
oscBuf[3]->data[oscBuf[3]->needle++]=nes2_NP->out[1]<<12;
oscBuf[3]->data[oscBuf[3]->needle++]=nes2_NP->out[1]<<11;
oscBuf[4]->data[oscBuf[4]->needle++]=nes2_NP->out[2]<<8;
}
}

View file

@ -160,9 +160,9 @@ const int orderedOpsL[4]={
#define ADDR_LR_FB_ALG 0xc0
void DivPlatformOPL::acquire_nuked(short** buf, size_t len) {
static short o[4];
static int os[4];
static ymfm::ymfm_output<2> aOut;
thread_local short o[4];
thread_local int os[4];
thread_local ymfm::ymfm_output<2> aOut;
for (size_t h=0; h<len; h++) {
os[0]=0; os[1]=0; os[2]=0; os[3]=0;
@ -549,6 +549,8 @@ void DivPlatformOPL::tick(bool sysTick) {
chan[adpcmChan].freq=5461; // 4KHz
}
}
if (chan[adpcmChan].freq<0) chan[adpcmChan].freq=0;
if (chan[adpcmChan].freq>65535) chan[adpcmChan].freq=65535;
immWrite(16,chan[adpcmChan].freq&0xff);
immWrite(17,(chan[adpcmChan].freq>>8)&0xff);
if (chan[adpcmChan].keyOn || chan[adpcmChan].keyOff) {

View file

@ -43,8 +43,8 @@ const unsigned char visMapOPLL[9]={
};
void DivPlatformOPLL::acquire_nuked(short** buf, size_t len) {
static int o[2];
static int os;
thread_local int o[2];
thread_local int os;
for (size_t h=0; h<len; h++) {
os=0;

View file

@ -27,7 +27,7 @@
#define chWrite(c,a,v) rWrite(((c)<<3)+(a),v)
void DivPlatformSegaPCM::acquire(short** buf, size_t len) {
static int os[2];
thread_local int os[2];
for (size_t h=0; h<len; h++) {
while (!writes.empty()) {

View file

@ -58,7 +58,7 @@ const char** DivPlatformTX81Z::getRegisterSheet() {
}
void DivPlatformTX81Z::acquire(short** buf, size_t len) {
static int os[2];
thread_local int os[2];
ymfm::ym2414::fm_engine* fme=fm_ymfm->debug_engine();

View file

@ -165,8 +165,8 @@ void DivPlatformYM2203::acquire(short** buf, size_t len) {
}
void DivPlatformYM2203::acquire_combo(short** buf, size_t len) {
static int os;
static short ignored[2];
thread_local int os;
thread_local short ignored[2];
for (size_t h=0; h<len; h++) {
// AY -> OPN
@ -241,7 +241,7 @@ void DivPlatformYM2203::acquire_combo(short** buf, size_t len) {
}
void DivPlatformYM2203::acquire_ymfm(short** buf, size_t len) {
static int os;
thread_local int os;
ymfm::ym2203::fm_engine* fme=fm->debug_fm_engine();

View file

@ -306,8 +306,8 @@ void DivPlatformYM2608::acquire(short** buf, size_t len) {
}
void DivPlatformYM2608::acquire_combo(short** buf, size_t len) {
static int os[2];
static short ignored[2];
thread_local int os[2];
thread_local short ignored[2];
ymfm::ssg_engine* ssge=fm->debug_ssg_engine();
ymfm::adpcm_a_engine* aae=fm->debug_adpcm_a_engine();
@ -419,7 +419,7 @@ void DivPlatformYM2608::acquire_combo(short** buf, size_t len) {
}
void DivPlatformYM2608::acquire_ymfm(short** buf, size_t len) {
static int os[2];
thread_local int os[2];
ymfm::ym2608::fm_engine* fme=fm->debug_fm_engine();
ymfm::ssg_engine* ssge=fm->debug_ssg_engine();
@ -783,6 +783,8 @@ void DivPlatformYM2608::tick(bool sysTick) {
chan[15].freq=0;
}
}
if (chan[adpcmBChanOffs].freq<0) chan[adpcmBChanOffs].freq=0;
if (chan[adpcmBChanOffs].freq>65535) chan[adpcmBChanOffs].freq=65535;
immWrite(0x109,chan[15].freq&0xff);
immWrite(0x10a,(chan[15].freq>>8)&0xff);
hardResetElapsed+=2;

View file

@ -241,8 +241,8 @@ void DivPlatformYM2610::acquire(short** buf, size_t len) {
}
void DivPlatformYM2610::acquire_combo(short** buf, size_t len) {
static int os[2];
static short ignored[2];
thread_local int os[2];
thread_local short ignored[2];
ymfm::ssg_engine* ssge=fm->debug_ssg_engine();
ymfm::adpcm_a_engine* aae=fm->debug_adpcm_a_engine();
@ -350,7 +350,7 @@ void DivPlatformYM2610::acquire_combo(short** buf, size_t len) {
}
void DivPlatformYM2610::acquire_ymfm(short** buf, size_t len) {
static int os[2];
thread_local int os[2];
ymfm::ym2610::fm_engine* fme=fm->debug_fm_engine();
ymfm::ssg_engine* ssge=fm->debug_ssg_engine();
@ -717,6 +717,8 @@ void DivPlatformYM2610::tick(bool sysTick) {
} else {
chan[adpcmBChanOffs].freq=0;
}
if (chan[adpcmBChanOffs].freq<0) chan[adpcmBChanOffs].freq=0;
if (chan[adpcmBChanOffs].freq>65535) chan[adpcmBChanOffs].freq=65535;
immWrite(0x19,chan[adpcmBChanOffs].freq&0xff);
immWrite(0x1a,(chan[adpcmBChanOffs].freq>>8)&0xff);
hardResetElapsed+=2;

View file

@ -305,8 +305,8 @@ void DivPlatformYM2610B::acquire(short** buf, size_t len) {
}
void DivPlatformYM2610B::acquire_combo(short** buf, size_t len) {
static int os[2];
static short ignored[2];
thread_local int os[2];
thread_local short ignored[2];
ymfm::ssg_engine* ssge=fm->debug_ssg_engine();
ymfm::adpcm_a_engine* aae=fm->debug_adpcm_a_engine();
@ -418,7 +418,7 @@ void DivPlatformYM2610B::acquire_combo(short** buf, size_t len) {
}
void DivPlatformYM2610B::acquire_ymfm(short** buf, size_t len) {
static int os[2];
thread_local int os[2];
ymfm::ym2610b::fm_engine* fme=fm->debug_fm_engine();
ymfm::ssg_engine* ssge=fm->debug_ssg_engine();
@ -784,6 +784,8 @@ void DivPlatformYM2610B::tick(bool sysTick) {
} else {
chan[adpcmBChanOffs].freq=0;
}
if (chan[adpcmBChanOffs].freq<0) chan[adpcmBChanOffs].freq=0;
if (chan[adpcmBChanOffs].freq>65535) chan[adpcmBChanOffs].freq=65535;
immWrite(0x19,chan[adpcmBChanOffs].freq&0xff);
immWrite(0x1a,(chan[adpcmBChanOffs].freq>>8)&0xff);
hardResetElapsed+=2;