core quality, part 1
PC Engine
This commit is contained in:
parent
a613cfb303
commit
a1254d5fb6
6 changed files with 204 additions and 5 deletions
|
|
@ -302,6 +302,11 @@ void DivDispatchContainer::init(DivSystem sys, DivEngine* eng, int chanCount, do
|
|||
break;
|
||||
case DIV_SYSTEM_PCE:
|
||||
dispatch=new DivPlatformPCE;
|
||||
if (isRender) {
|
||||
((DivPlatformPCE*)dispatch)->setCoreQuality(eng->getConfInt("pceQualityRender",3));
|
||||
} else {
|
||||
((DivPlatformPCE*)dispatch)->setCoreQuality(eng->getConfInt("pceQuality",3));
|
||||
}
|
||||
break;
|
||||
case DIV_SYSTEM_NES:
|
||||
dispatch=new DivPlatformNES;
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ void DivPlatformPCE::acquire(short** buf, size_t len) {
|
|||
}
|
||||
memset(tempL,0,24*sizeof(int));
|
||||
memset(tempR,0,24*sizeof(int));
|
||||
pce->Update(24);
|
||||
pce->Update(coreQuality);
|
||||
pce->ResetTS(0);
|
||||
|
||||
for (int i=0; i<6; i++) {
|
||||
|
|
@ -629,7 +629,7 @@ void DivPlatformPCE::setFlags(const DivConfig& flags) {
|
|||
}
|
||||
CHECK_CUSTOM_CLOCK;
|
||||
antiClickEnabled=!flags.getBool("noAntiClick",false);
|
||||
rate=chipClock/12;
|
||||
rate=chipClock/(coreQuality>>1);
|
||||
for (int i=0; i<6; i++) {
|
||||
oscBuf[i]->rate=rate;
|
||||
}
|
||||
|
|
@ -649,6 +649,32 @@ void DivPlatformPCE::poke(std::vector<DivRegWrite>& wlist) {
|
|||
for (DivRegWrite& i: wlist) rWrite(i.addr,i.val);
|
||||
}
|
||||
|
||||
void DivPlatformPCE::setCoreQuality(unsigned char q) {
|
||||
switch (q) {
|
||||
case 0:
|
||||
coreQuality=192;
|
||||
break;
|
||||
case 1:
|
||||
coreQuality=96;
|
||||
break;
|
||||
case 2:
|
||||
coreQuality=48;
|
||||
break;
|
||||
case 3:
|
||||
coreQuality=24;
|
||||
break;
|
||||
case 4:
|
||||
coreQuality=6;
|
||||
break;
|
||||
case 5:
|
||||
coreQuality=2;
|
||||
break;
|
||||
default:
|
||||
coreQuality=24;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int DivPlatformPCE::init(DivEngine* p, int channels, int sugRate, const DivConfig& flags) {
|
||||
parent=p;
|
||||
dumpWrites=false;
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ class DivPlatformPCE: public DivDispatch {
|
|||
int tempL[32];
|
||||
int tempR[32];
|
||||
unsigned char sampleBank, lfoMode, lfoSpeed;
|
||||
int coreQuality;
|
||||
PCE_PSG* pce;
|
||||
unsigned char regPool[128];
|
||||
void updateWave(int ch);
|
||||
|
|
@ -96,6 +97,7 @@ class DivPlatformPCE: public DivDispatch {
|
|||
void muteChannel(int ch, bool mute);
|
||||
int getOutputCount();
|
||||
bool keyOffAffectsArp(int ch);
|
||||
void setCoreQuality(unsigned char q);
|
||||
void setFlags(const DivConfig& flags);
|
||||
void notifyWaveChange(int wave);
|
||||
void notifyInsDeletion(void* ins);
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ static const int scale_tab[] =
|
|||
|
||||
inline void PCE_PSG::UpdateOutputSub(const int32_t timestamp, psg_channel *ch, const int32_t samp0, const int32_t samp1)
|
||||
{
|
||||
if (timestamp>0) return;
|
||||
HRBufs[0][timestamp]+=samp0;
|
||||
HRBufs[1][timestamp]+=samp1;
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue