PCE: add option to pick A/non-A revision of chip
This commit is contained in:
parent
3a18e1e6fc
commit
049ab06544
2 changed files with 18 additions and 2 deletions
|
|
@ -569,6 +569,12 @@ void DivPlatformPCE::setFlags(unsigned int flags) {
|
|||
for (int i=0; i<6; i++) {
|
||||
oscBuf[i]->rate=rate;
|
||||
}
|
||||
|
||||
if (pce!=NULL) {
|
||||
delete pce;
|
||||
pce=NULL;
|
||||
}
|
||||
pce=new PCE_PSG(tempL,tempR,(flags&4)?PCE_PSG::REVISION_HUC6280A:PCE_PSG::REVISION_HUC6280);
|
||||
}
|
||||
|
||||
void DivPlatformPCE::poke(unsigned int addr, unsigned short val) {
|
||||
|
|
@ -587,8 +593,8 @@ int DivPlatformPCE::init(DivEngine* p, int channels, int sugRate, unsigned int f
|
|||
isMuted[i]=false;
|
||||
oscBuf[i]=new DivDispatchOscBuffer;
|
||||
}
|
||||
pce=NULL;
|
||||
setFlags(flags);
|
||||
pce=new PCE_PSG(tempL,tempR,PCE_PSG::REVISION_HUC6280A);
|
||||
reset();
|
||||
return 6;
|
||||
}
|
||||
|
|
@ -597,7 +603,10 @@ void DivPlatformPCE::quit() {
|
|||
for (int i=0; i<6; i++) {
|
||||
delete oscBuf[i];
|
||||
}
|
||||
delete pce;
|
||||
if (pce!=NULL) {
|
||||
delete pce;
|
||||
pce=NULL;
|
||||
}
|
||||
}
|
||||
|
||||
DivPlatformPCE::~DivPlatformPCE() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue