mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-18 02:25:11 +00:00
change setPAL to setFlags
This commit is contained in:
parent
8c353548f5
commit
bfed0b3209
35 changed files with 85 additions and 83 deletions
|
@ -237,10 +237,10 @@ class DivDispatch {
|
||||||
virtual const char* getEffectName(unsigned char effect);
|
virtual const char* getEffectName(unsigned char effect);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set the region to PAL.
|
* set the chip flags.
|
||||||
* @param pal whether to set it to PAL.
|
* @param flags the flags. see song.h for possible values.
|
||||||
*/
|
*/
|
||||||
virtual void setPAL(bool pal);
|
virtual void setFlags(unsigned int flags);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set skip reg writes.
|
* set skip reg writes.
|
||||||
|
@ -282,9 +282,10 @@ class DivDispatch {
|
||||||
* @param parent the parent DivEngine.
|
* @param parent the parent DivEngine.
|
||||||
* @param channels the number of channels to acquire.
|
* @param channels the number of channels to acquire.
|
||||||
* @param sugRate the suggested rate. this may change, so don't rely on it.
|
* @param sugRate the suggested rate. this may change, so don't rely on it.
|
||||||
|
* @param flags the chip flags. see song.h for possible values.
|
||||||
* @return the number of channels allocated.
|
* @return the number of channels allocated.
|
||||||
*/
|
*/
|
||||||
virtual int init(DivEngine* parent, int channels, int sugRate, bool pal);
|
virtual int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* quit the DivDispatch.
|
* quit the DivDispatch.
|
||||||
|
|
|
@ -4750,7 +4750,8 @@ void DivEngine::setSongRate(int hz, bool pal) {
|
||||||
song.hz=hz;
|
song.hz=hz;
|
||||||
song.customTempo=(song.hz!=50 && song.hz!=60);
|
song.customTempo=(song.hz!=50 && song.hz!=60);
|
||||||
for (int i=0; i<song.systemLen; i++) {
|
for (int i=0; i<song.systemLen; i++) {
|
||||||
disCont[i].dispatch->setPAL((!song.pal) || (song.customTempo!=0 && song.hz<53));
|
// TODO
|
||||||
|
disCont[i].dispatch->setFlags((!song.pal) || (song.customTempo!=0 && song.hz<53));
|
||||||
disCont[i].setRates(got.rate);
|
disCont[i].setRates(got.rate);
|
||||||
}
|
}
|
||||||
divider=60;
|
divider=60;
|
||||||
|
|
|
@ -47,7 +47,7 @@ const char* DivDispatch::getEffectName(unsigned char effect) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DivDispatch::setPAL(bool pal) {
|
void DivDispatch::setFlags(unsigned int flags) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void DivDispatch::setSkipRegisterWrites(bool value) {
|
void DivDispatch::setSkipRegisterWrites(bool value) {
|
||||||
|
@ -78,7 +78,7 @@ std::vector<DivRegWrite>& DivDispatch::getRegisterWrites() {
|
||||||
return regWrites;
|
return regWrites;
|
||||||
}
|
}
|
||||||
|
|
||||||
int DivDispatch::init(DivEngine* p, int channels, int sugRate, bool pal) {
|
int DivDispatch::init(DivEngine* p, int channels, int sugRate, unsigned int flags) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -241,8 +241,8 @@ void DivPlatformAmiga::notifyInsDeletion(void* ins) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DivPlatformAmiga::setPAL(bool pal) {
|
void DivPlatformAmiga::setFlags(unsigned int flags) {
|
||||||
if (pal) {
|
if (flags) {
|
||||||
chipClock=COLOR_PAL*4.0/5.0;
|
chipClock=COLOR_PAL*4.0/5.0;
|
||||||
} else {
|
} else {
|
||||||
chipClock=COLOR_NTSC;
|
chipClock=COLOR_NTSC;
|
||||||
|
@ -250,14 +250,14 @@ void DivPlatformAmiga::setPAL(bool pal) {
|
||||||
rate=chipClock/AMIGA_DIVIDER;
|
rate=chipClock/AMIGA_DIVIDER;
|
||||||
}
|
}
|
||||||
|
|
||||||
int DivPlatformAmiga::init(DivEngine* p, int channels, int sugRate, bool pal) {
|
int DivPlatformAmiga::init(DivEngine* p, int channels, int sugRate, unsigned int flags) {
|
||||||
parent=p;
|
parent=p;
|
||||||
dumpWrites=false;
|
dumpWrites=false;
|
||||||
skipRegisterWrites=false;
|
skipRegisterWrites=false;
|
||||||
for (int i=0; i<4; i++) {
|
for (int i=0; i<4; i++) {
|
||||||
isMuted[i]=false;
|
isMuted[i]=false;
|
||||||
}
|
}
|
||||||
setPAL(pal);
|
setFlags(flags);
|
||||||
reset();
|
reset();
|
||||||
return 6;
|
return 6;
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,11 +57,11 @@ class DivPlatformAmiga: public DivDispatch {
|
||||||
void muteChannel(int ch, bool mute);
|
void muteChannel(int ch, bool mute);
|
||||||
bool isStereo();
|
bool isStereo();
|
||||||
bool keyOffAffectsArp(int ch);
|
bool keyOffAffectsArp(int ch);
|
||||||
void setPAL(bool pal);
|
void setFlags(unsigned int flags);
|
||||||
void notifyInsChange(int ins);
|
void notifyInsChange(int ins);
|
||||||
void notifyWaveChange(int wave);
|
void notifyWaveChange(int wave);
|
||||||
void notifyInsDeletion(void* ins);
|
void notifyInsDeletion(void* ins);
|
||||||
int init(DivEngine* parent, int channels, int sugRate, bool pal);
|
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||||
void quit();
|
void quit();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -762,7 +762,7 @@ void DivPlatformArcade::setYMFM(bool use) {
|
||||||
useYMFM=use;
|
useYMFM=use;
|
||||||
}
|
}
|
||||||
|
|
||||||
int DivPlatformArcade::init(DivEngine* p, int channels, int sugRate, bool pal) {
|
int DivPlatformArcade::init(DivEngine* p, int channels, int sugRate, unsigned int flags) {
|
||||||
parent=p;
|
parent=p;
|
||||||
dumpWrites=false;
|
dumpWrites=false;
|
||||||
skipRegisterWrites=false;
|
skipRegisterWrites=false;
|
||||||
|
|
|
@ -78,7 +78,7 @@ class DivPlatformArcade: public DivDispatch {
|
||||||
void notifyInsChange(int ins);
|
void notifyInsChange(int ins);
|
||||||
bool isStereo();
|
bool isStereo();
|
||||||
void setYMFM(bool use);
|
void setYMFM(bool use);
|
||||||
int init(DivEngine* parent, int channels, int sugRate, bool pal);
|
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||||
void quit();
|
void quit();
|
||||||
~DivPlatformArcade();
|
~DivPlatformArcade();
|
||||||
};
|
};
|
||||||
|
|
|
@ -355,8 +355,8 @@ void DivPlatformAY8910::notifyInsDeletion(void* ins) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DivPlatformAY8910::setPAL(bool pal) {
|
void DivPlatformAY8910::setFlags(unsigned int flags) {
|
||||||
if (pal) {
|
if (flags) {
|
||||||
chipClock=COLOR_PAL*2.0/5.0;
|
chipClock=COLOR_PAL*2.0/5.0;
|
||||||
} else {
|
} else {
|
||||||
chipClock=COLOR_NTSC/2.0;
|
chipClock=COLOR_NTSC/2.0;
|
||||||
|
@ -364,14 +364,14 @@ void DivPlatformAY8910::setPAL(bool pal) {
|
||||||
rate=chipClock/8;
|
rate=chipClock/8;
|
||||||
}
|
}
|
||||||
|
|
||||||
int DivPlatformAY8910::init(DivEngine* p, int channels, int sugRate, bool pal) {
|
int DivPlatformAY8910::init(DivEngine* p, int channels, int sugRate, unsigned int flags) {
|
||||||
parent=p;
|
parent=p;
|
||||||
dumpWrites=false;
|
dumpWrites=false;
|
||||||
skipRegisterWrites=false;
|
skipRegisterWrites=false;
|
||||||
for (int i=0; i<3; i++) {
|
for (int i=0; i<3; i++) {
|
||||||
isMuted[i]=false;
|
isMuted[i]=false;
|
||||||
}
|
}
|
||||||
setPAL(pal);
|
setFlags(flags);
|
||||||
ay=new ay8910_device(rate);
|
ay=new ay8910_device(rate);
|
||||||
ay->set_psg_type(ay8910_device::PSG_TYPE_AY);
|
ay->set_psg_type(ay8910_device::PSG_TYPE_AY);
|
||||||
ay->device_start();
|
ay->device_start();
|
||||||
|
|
|
@ -60,11 +60,11 @@ class DivPlatformAY8910: public DivDispatch {
|
||||||
void forceIns();
|
void forceIns();
|
||||||
void tick();
|
void tick();
|
||||||
void muteChannel(int ch, bool mute);
|
void muteChannel(int ch, bool mute);
|
||||||
void setPAL(bool pal);
|
void setFlags(unsigned int flags);
|
||||||
bool isStereo();
|
bool isStereo();
|
||||||
bool keyOffAffectsArp(int ch);
|
bool keyOffAffectsArp(int ch);
|
||||||
void notifyInsDeletion(void* ins);
|
void notifyInsDeletion(void* ins);
|
||||||
int init(DivEngine* parent, int channels, int sugRate, bool pal);
|
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||||
void quit();
|
void quit();
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -390,8 +390,8 @@ void DivPlatformAY8930::notifyInsDeletion(void* ins) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DivPlatformAY8930::setPAL(bool pal) {
|
void DivPlatformAY8930::setFlags(unsigned int flags) {
|
||||||
if (pal) {
|
if (flags) {
|
||||||
chipClock=COLOR_PAL*2.0/5.0;
|
chipClock=COLOR_PAL*2.0/5.0;
|
||||||
} else {
|
} else {
|
||||||
chipClock=COLOR_NTSC/2.0;
|
chipClock=COLOR_NTSC/2.0;
|
||||||
|
@ -399,14 +399,14 @@ void DivPlatformAY8930::setPAL(bool pal) {
|
||||||
rate=chipClock/8;
|
rate=chipClock/8;
|
||||||
}
|
}
|
||||||
|
|
||||||
int DivPlatformAY8930::init(DivEngine* p, int channels, int sugRate, bool pal) {
|
int DivPlatformAY8930::init(DivEngine* p, int channels, int sugRate, unsigned int flags) {
|
||||||
parent=p;
|
parent=p;
|
||||||
dumpWrites=false;
|
dumpWrites=false;
|
||||||
skipRegisterWrites=false;
|
skipRegisterWrites=false;
|
||||||
for (int i=0; i<3; i++) {
|
for (int i=0; i<3; i++) {
|
||||||
isMuted[i]=false;
|
isMuted[i]=false;
|
||||||
}
|
}
|
||||||
setPAL(pal);
|
setFlags(flags);
|
||||||
ay=new ay8930_device(rate);
|
ay=new ay8930_device(rate);
|
||||||
ay->device_start();
|
ay->device_start();
|
||||||
ayBufLen=65536;
|
ayBufLen=65536;
|
||||||
|
|
|
@ -54,11 +54,11 @@ class DivPlatformAY8930: public DivDispatch {
|
||||||
void forceIns();
|
void forceIns();
|
||||||
void tick();
|
void tick();
|
||||||
void muteChannel(int ch, bool mute);
|
void muteChannel(int ch, bool mute);
|
||||||
void setPAL(bool pal);
|
void setFlags(unsigned int flags);
|
||||||
bool isStereo();
|
bool isStereo();
|
||||||
bool keyOffAffectsArp(int ch);
|
bool keyOffAffectsArp(int ch);
|
||||||
void notifyInsDeletion(void* ins);
|
void notifyInsDeletion(void* ins);
|
||||||
int init(DivEngine* parent, int channels, int sugRate, bool pal);
|
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||||
void quit();
|
void quit();
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -355,8 +355,8 @@ void DivPlatformC64::setChipModel(bool is6581) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DivPlatformC64::setPAL(bool pal) {
|
void DivPlatformC64::setFlags(unsigned int flags) {
|
||||||
if (pal) {
|
if (flags) {
|
||||||
rate=COLOR_PAL*2.0/9.0;
|
rate=COLOR_PAL*2.0/9.0;
|
||||||
} else {
|
} else {
|
||||||
rate=COLOR_NTSC*2.0/7.0;
|
rate=COLOR_NTSC*2.0/7.0;
|
||||||
|
@ -364,14 +364,14 @@ void DivPlatformC64::setPAL(bool pal) {
|
||||||
chipClock=rate;
|
chipClock=rate;
|
||||||
}
|
}
|
||||||
|
|
||||||
int DivPlatformC64::init(DivEngine* p, int channels, int sugRate, bool pal) {
|
int DivPlatformC64::init(DivEngine* p, int channels, int sugRate, unsigned int flags) {
|
||||||
parent=p;
|
parent=p;
|
||||||
dumpWrites=false;
|
dumpWrites=false;
|
||||||
skipRegisterWrites=false;
|
skipRegisterWrites=false;
|
||||||
for (int i=0; i<3; i++) {
|
for (int i=0; i<3; i++) {
|
||||||
isMuted[i]=false;
|
isMuted[i]=false;
|
||||||
}
|
}
|
||||||
setPAL(pal);
|
setFlags(flags);
|
||||||
|
|
||||||
reset();
|
reset();
|
||||||
|
|
||||||
|
|
|
@ -63,10 +63,10 @@ class DivPlatformC64: public DivDispatch {
|
||||||
void forceIns();
|
void forceIns();
|
||||||
void tick();
|
void tick();
|
||||||
void muteChannel(int ch, bool mute);
|
void muteChannel(int ch, bool mute);
|
||||||
void setPAL(bool pal);
|
void setFlags(unsigned int flags);
|
||||||
void notifyInsChange(int ins);
|
void notifyInsChange(int ins);
|
||||||
void notifyInsDeletion(void* ins);
|
void notifyInsDeletion(void* ins);
|
||||||
int init(DivEngine* parent, int channels, int sugRate, bool pal);
|
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||||
void setChipModel(bool is6581);
|
void setChipModel(bool is6581);
|
||||||
void quit();
|
void quit();
|
||||||
~DivPlatformC64();
|
~DivPlatformC64();
|
||||||
|
|
|
@ -79,7 +79,7 @@ void DivPlatformDummy::reset() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int DivPlatformDummy::init(DivEngine* p, int channels, int sugRate, bool pal) {
|
int DivPlatformDummy::init(DivEngine* p, int channels, int sugRate, unsigned int flags) {
|
||||||
parent=p;
|
parent=p;
|
||||||
dumpWrites=false;
|
dumpWrites=false;
|
||||||
skipRegisterWrites=false;
|
skipRegisterWrites=false;
|
||||||
|
|
|
@ -23,7 +23,7 @@ class DivPlatformDummy: public DivDispatch {
|
||||||
void* getChanState(int chan);
|
void* getChanState(int chan);
|
||||||
void reset();
|
void reset();
|
||||||
void tick();
|
void tick();
|
||||||
int init(DivEngine* parent, int channels, int sugRate, bool pal);
|
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||||
void quit();
|
void quit();
|
||||||
~DivPlatformDummy();
|
~DivPlatformDummy();
|
||||||
};
|
};
|
||||||
|
|
|
@ -349,7 +349,7 @@ void DivPlatformGB::notifyInsDeletion(void* ins) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int DivPlatformGB::init(DivEngine* p, int channels, int sugRate, bool pal) {
|
int DivPlatformGB::init(DivEngine* p, int channels, int sugRate, unsigned int flags) {
|
||||||
for (int i=0; i<4; i++) {
|
for (int i=0; i<4; i++) {
|
||||||
isMuted[i]=false;
|
isMuted[i]=false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ class DivPlatformGB: public DivDispatch {
|
||||||
void notifyInsChange(int ins);
|
void notifyInsChange(int ins);
|
||||||
void notifyWaveChange(int wave);
|
void notifyWaveChange(int wave);
|
||||||
void notifyInsDeletion(void* ins);
|
void notifyInsDeletion(void* ins);
|
||||||
int init(DivEngine* parent, int channels, int sugRate, bool pal);
|
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||||
void quit();
|
void quit();
|
||||||
~DivPlatformGB();
|
~DivPlatformGB();
|
||||||
};
|
};
|
||||||
|
|
|
@ -638,26 +638,26 @@ void DivPlatformGenesis::notifyInsDeletion(void* ins) {
|
||||||
psg.notifyInsDeletion(ins);
|
psg.notifyInsDeletion(ins);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DivPlatformGenesis::setPAL(bool pal) {
|
void DivPlatformGenesis::setFlags(unsigned int flags) {
|
||||||
if (pal) {
|
if (flags) {
|
||||||
chipClock=COLOR_PAL*12.0/7.0;
|
chipClock=COLOR_PAL*12.0/7.0;
|
||||||
} else {
|
} else {
|
||||||
chipClock=COLOR_NTSC*15.0/7.0;
|
chipClock=COLOR_NTSC*15.0/7.0;
|
||||||
}
|
}
|
||||||
psg.setPAL(pal);
|
psg.setFlags(flags);
|
||||||
rate=chipClock/36;
|
rate=chipClock/36;
|
||||||
}
|
}
|
||||||
|
|
||||||
int DivPlatformGenesis::init(DivEngine* p, int channels, int sugRate, bool pal) {
|
int DivPlatformGenesis::init(DivEngine* p, int channels, int sugRate, unsigned int flags) {
|
||||||
parent=p;
|
parent=p;
|
||||||
dumpWrites=false;
|
dumpWrites=false;
|
||||||
skipRegisterWrites=false;
|
skipRegisterWrites=false;
|
||||||
for (int i=0; i<10; i++) {
|
for (int i=0; i<10; i++) {
|
||||||
isMuted[i]=false;
|
isMuted[i]=false;
|
||||||
}
|
}
|
||||||
setPAL(pal);
|
setFlags(flags);
|
||||||
// PSG
|
// PSG
|
||||||
psg.init(p,4,sugRate,pal);
|
psg.init(p,4,sugRate,flags);
|
||||||
|
|
||||||
reset();
|
reset();
|
||||||
return 10;
|
return 10;
|
||||||
|
|
|
@ -82,10 +82,10 @@ class DivPlatformGenesis: public DivDispatch {
|
||||||
bool keyOffAffectsArp(int ch);
|
bool keyOffAffectsArp(int ch);
|
||||||
bool keyOffAffectsPorta(int ch);
|
bool keyOffAffectsPorta(int ch);
|
||||||
void toggleRegisterDump(bool enable);
|
void toggleRegisterDump(bool enable);
|
||||||
void setPAL(bool pal);
|
void setFlags(unsigned int flags);
|
||||||
void notifyInsChange(int ins);
|
void notifyInsChange(int ins);
|
||||||
void notifyInsDeletion(void* ins);
|
void notifyInsDeletion(void* ins);
|
||||||
int init(DivEngine* parent, int channels, int sugRate, bool pal);
|
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||||
void quit();
|
void quit();
|
||||||
~DivPlatformGenesis();
|
~DivPlatformGenesis();
|
||||||
};
|
};
|
||||||
|
|
|
@ -334,8 +334,8 @@ void DivPlatformGenesisExt::notifyInsChange(int ins) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int DivPlatformGenesisExt::init(DivEngine* parent, int channels, int sugRate, bool pal) {
|
int DivPlatformGenesisExt::init(DivEngine* parent, int channels, int sugRate, unsigned int flags) {
|
||||||
DivPlatformGenesis::init(parent,channels,sugRate,pal);
|
DivPlatformGenesis::init(parent,channels,sugRate,flags);
|
||||||
for (int i=0; i<4; i++) {
|
for (int i=0; i<4; i++) {
|
||||||
isOpMuted[i]=false;
|
isOpMuted[i]=false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ class DivPlatformGenesisExt: public DivPlatformGenesis {
|
||||||
bool keyOffAffectsArp(int ch);
|
bool keyOffAffectsArp(int ch);
|
||||||
bool keyOffAffectsPorta(int ch);
|
bool keyOffAffectsPorta(int ch);
|
||||||
void notifyInsChange(int ins);
|
void notifyInsChange(int ins);
|
||||||
int init(DivEngine* parent, int channels, int sugRate, bool pal);
|
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||||
void quit();
|
void quit();
|
||||||
~DivPlatformGenesisExt();
|
~DivPlatformGenesisExt();
|
||||||
};
|
};
|
||||||
|
|
|
@ -374,8 +374,8 @@ bool DivPlatformNES::keyOffAffectsArp(int ch) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DivPlatformNES::setPAL(bool pal) {
|
void DivPlatformNES::setFlags(unsigned int flags) {
|
||||||
if (pal) {
|
if (flags) {
|
||||||
rate=COLOR_PAL*3.0/8.0;
|
rate=COLOR_PAL*3.0/8.0;
|
||||||
apuType=1;
|
apuType=1;
|
||||||
nes->apu.type=apuType;
|
nes->apu.type=apuType;
|
||||||
|
@ -393,16 +393,16 @@ void DivPlatformNES::notifyInsDeletion(void* ins) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int DivPlatformNES::init(DivEngine* p, int channels, int sugRate, bool pal) {
|
int DivPlatformNES::init(DivEngine* p, int channels, int sugRate, unsigned int flags) {
|
||||||
parent=p;
|
parent=p;
|
||||||
apuType=pal;
|
apuType=flags;
|
||||||
dumpWrites=false;
|
dumpWrites=false;
|
||||||
skipRegisterWrites=false;
|
skipRegisterWrites=false;
|
||||||
for (int i=0; i<5; i++) {
|
for (int i=0; i<5; i++) {
|
||||||
isMuted[i]=false;
|
isMuted[i]=false;
|
||||||
}
|
}
|
||||||
nes=new struct NESAPU;
|
nes=new struct NESAPU;
|
||||||
setPAL(pal);
|
setFlags(flags);
|
||||||
|
|
||||||
init_nla_table(500,500);
|
init_nla_table(500,500);
|
||||||
reset();
|
reset();
|
||||||
|
|
|
@ -52,9 +52,9 @@ class DivPlatformNES: public DivDispatch {
|
||||||
void tick();
|
void tick();
|
||||||
void muteChannel(int ch, bool mute);
|
void muteChannel(int ch, bool mute);
|
||||||
bool keyOffAffectsArp(int ch);
|
bool keyOffAffectsArp(int ch);
|
||||||
void setPAL(bool pal);
|
void setFlags(unsigned int flags);
|
||||||
void notifyInsDeletion(void* ins);
|
void notifyInsDeletion(void* ins);
|
||||||
int init(DivEngine* parent, int channels, int sugRate, bool pal);
|
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||||
void quit();
|
void quit();
|
||||||
~DivPlatformNES();
|
~DivPlatformNES();
|
||||||
};
|
};
|
||||||
|
|
|
@ -396,8 +396,8 @@ void DivPlatformPCE::notifyInsDeletion(void* ins) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DivPlatformPCE::setPAL(bool pal) {
|
void DivPlatformPCE::setFlags(unsigned int flags) {
|
||||||
if (pal) { // technically there is no PAL PC Engine but oh well...
|
if (flags) { // technically there is no PAL PC Engine but oh well...
|
||||||
chipClock=COLOR_PAL*4.0/5.0;
|
chipClock=COLOR_PAL*4.0/5.0;
|
||||||
} else {
|
} else {
|
||||||
chipClock=COLOR_NTSC;
|
chipClock=COLOR_NTSC;
|
||||||
|
@ -405,14 +405,14 @@ void DivPlatformPCE::setPAL(bool pal) {
|
||||||
rate=chipClock/12;
|
rate=chipClock/12;
|
||||||
}
|
}
|
||||||
|
|
||||||
int DivPlatformPCE::init(DivEngine* p, int channels, int sugRate, bool pal) {
|
int DivPlatformPCE::init(DivEngine* p, int channels, int sugRate, unsigned int flags) {
|
||||||
parent=p;
|
parent=p;
|
||||||
dumpWrites=false;
|
dumpWrites=false;
|
||||||
skipRegisterWrites=false;
|
skipRegisterWrites=false;
|
||||||
for (int i=0; i<6; i++) {
|
for (int i=0; i<6; i++) {
|
||||||
isMuted[i]=false;
|
isMuted[i]=false;
|
||||||
}
|
}
|
||||||
setPAL(pal);
|
setFlags(flags);
|
||||||
pce=new PCE_PSG(tempL,tempR,PCE_PSG::REVISION_HUC6280);
|
pce=new PCE_PSG(tempL,tempR,PCE_PSG::REVISION_HUC6280);
|
||||||
reset();
|
reset();
|
||||||
return 6;
|
return 6;
|
||||||
|
|
|
@ -67,10 +67,10 @@ class DivPlatformPCE: public DivDispatch {
|
||||||
void muteChannel(int ch, bool mute);
|
void muteChannel(int ch, bool mute);
|
||||||
bool isStereo();
|
bool isStereo();
|
||||||
bool keyOffAffectsArp(int ch);
|
bool keyOffAffectsArp(int ch);
|
||||||
void setPAL(bool pal);
|
void setFlags(unsigned int flags);
|
||||||
void notifyWaveChange(int wave);
|
void notifyWaveChange(int wave);
|
||||||
void notifyInsDeletion(void* ins);
|
void notifyInsDeletion(void* ins);
|
||||||
int init(DivEngine* parent, int channels, int sugRate, bool pal);
|
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||||
void quit();
|
void quit();
|
||||||
~DivPlatformPCE();
|
~DivPlatformPCE();
|
||||||
};
|
};
|
||||||
|
|
|
@ -307,19 +307,19 @@ void DivPlatformSAA1099::notifyInsDeletion(void* ins) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DivPlatformSAA1099::setPAL(bool pal) {
|
void DivPlatformSAA1099::setFlags(unsigned int flags) {
|
||||||
chipClock=8000000;
|
chipClock=8000000;
|
||||||
rate=chipClock/32;
|
rate=chipClock/32;
|
||||||
}
|
}
|
||||||
|
|
||||||
int DivPlatformSAA1099::init(DivEngine* p, int channels, int sugRate, bool pal) {
|
int DivPlatformSAA1099::init(DivEngine* p, int channels, int sugRate, unsigned int flags) {
|
||||||
parent=p;
|
parent=p;
|
||||||
dumpWrites=false;
|
dumpWrites=false;
|
||||||
skipRegisterWrites=false;
|
skipRegisterWrites=false;
|
||||||
for (int i=0; i<6; i++) {
|
for (int i=0; i<6; i++) {
|
||||||
isMuted[i]=false;
|
isMuted[i]=false;
|
||||||
}
|
}
|
||||||
setPAL(pal);
|
setFlags(flags);
|
||||||
saaBufLen=65536;
|
saaBufLen=65536;
|
||||||
for (int i=0; i<2; i++) saaBuf[i]=new short[saaBufLen];
|
for (int i=0; i<2; i++) saaBuf[i]=new short[saaBufLen];
|
||||||
reset();
|
reset();
|
||||||
|
|
|
@ -57,12 +57,12 @@ class DivPlatformSAA1099: public DivDispatch {
|
||||||
void forceIns();
|
void forceIns();
|
||||||
void tick();
|
void tick();
|
||||||
void muteChannel(int ch, bool mute);
|
void muteChannel(int ch, bool mute);
|
||||||
void setPAL(bool pal);
|
void setFlags(unsigned int flags);
|
||||||
bool isStereo();
|
bool isStereo();
|
||||||
int getPortaFloor(int ch);
|
int getPortaFloor(int ch);
|
||||||
bool keyOffAffectsArp(int ch);
|
bool keyOffAffectsArp(int ch);
|
||||||
void notifyInsDeletion(void* ins);
|
void notifyInsDeletion(void* ins);
|
||||||
int init(DivEngine* parent, int channels, int sugRate, bool pal);
|
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||||
void quit();
|
void quit();
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -221,8 +221,8 @@ void DivPlatformSMS::notifyInsDeletion(void* ins) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DivPlatformSMS::setPAL(bool pal) {
|
void DivPlatformSMS::setFlags(unsigned int flags) {
|
||||||
if (pal) {
|
if (flags) {
|
||||||
chipClock=COLOR_PAL*4.0/5.0;
|
chipClock=COLOR_PAL*4.0/5.0;
|
||||||
} else {
|
} else {
|
||||||
chipClock=COLOR_NTSC;
|
chipClock=COLOR_NTSC;
|
||||||
|
@ -230,14 +230,14 @@ void DivPlatformSMS::setPAL(bool pal) {
|
||||||
rate=chipClock/16;
|
rate=chipClock/16;
|
||||||
}
|
}
|
||||||
|
|
||||||
int DivPlatformSMS::init(DivEngine* p, int channels, int sugRate, bool pal) {
|
int DivPlatformSMS::init(DivEngine* p, int channels, int sugRate, unsigned int flags) {
|
||||||
parent=p;
|
parent=p;
|
||||||
dumpWrites=false;
|
dumpWrites=false;
|
||||||
skipRegisterWrites=false;
|
skipRegisterWrites=false;
|
||||||
for (int i=0; i<4; i++) {
|
for (int i=0; i<4; i++) {
|
||||||
isMuted[i]=false;
|
isMuted[i]=false;
|
||||||
}
|
}
|
||||||
setPAL(pal);
|
setFlags(flags);
|
||||||
sn=new sn76496_device(rate);
|
sn=new sn76496_device(rate);
|
||||||
reset();
|
reset();
|
||||||
return 4;
|
return 4;
|
||||||
|
|
|
@ -44,9 +44,9 @@ class DivPlatformSMS: public DivDispatch {
|
||||||
bool keyOffAffectsArp(int ch);
|
bool keyOffAffectsArp(int ch);
|
||||||
bool keyOffAffectsPorta(int ch);
|
bool keyOffAffectsPorta(int ch);
|
||||||
int getPortaFloor(int ch);
|
int getPortaFloor(int ch);
|
||||||
void setPAL(bool pal);
|
void setFlags(unsigned int flags);
|
||||||
void notifyInsDeletion(void* ins);
|
void notifyInsDeletion(void* ins);
|
||||||
int init(DivEngine* parent, int channels, int sugRate, bool pal);
|
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||||
void quit();
|
void quit();
|
||||||
~DivPlatformSMS();
|
~DivPlatformSMS();
|
||||||
};
|
};
|
||||||
|
|
|
@ -254,15 +254,15 @@ void DivPlatformTIA::notifyInsDeletion(void* ins) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DivPlatformTIA::setPAL(bool pal) {
|
void DivPlatformTIA::setFlags(unsigned int flags) {
|
||||||
if (pal) {
|
if (flags) {
|
||||||
rate=31250;
|
rate=31250;
|
||||||
} else {
|
} else {
|
||||||
rate=31400;
|
rate=31400;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int DivPlatformTIA::init(DivEngine* p, int channels, int sugRate, bool pal) {
|
int DivPlatformTIA::init(DivEngine* p, int channels, int sugRate, unsigned int flags) {
|
||||||
parent=p;
|
parent=p;
|
||||||
dumpWrites=false;
|
dumpWrites=false;
|
||||||
skipRegisterWrites=false;
|
skipRegisterWrites=false;
|
||||||
|
@ -270,7 +270,7 @@ int DivPlatformTIA::init(DivEngine* p, int channels, int sugRate, bool pal) {
|
||||||
isMuted[i]=false;
|
isMuted[i]=false;
|
||||||
}
|
}
|
||||||
tia.channels(1,false);
|
tia.channels(1,false);
|
||||||
setPAL(pal);
|
setFlags(flags);
|
||||||
reset();
|
reset();
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,11 +31,11 @@ class DivPlatformTIA: public DivDispatch {
|
||||||
void forceIns();
|
void forceIns();
|
||||||
void tick();
|
void tick();
|
||||||
void muteChannel(int ch, bool mute);
|
void muteChannel(int ch, bool mute);
|
||||||
void setPAL(bool pal);
|
void setFlags(unsigned int flags);
|
||||||
bool isStereo();
|
bool isStereo();
|
||||||
bool keyOffAffectsArp(int ch);
|
bool keyOffAffectsArp(int ch);
|
||||||
void notifyInsDeletion(void* ins);
|
void notifyInsDeletion(void* ins);
|
||||||
int init(DivEngine* parent, int channels, int sugRate, bool pal);
|
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||||
void quit();
|
void quit();
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -789,7 +789,7 @@ void DivPlatformYM2610::notifyInsDeletion(void* ins) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int DivPlatformYM2610::init(DivEngine* p, int channels, int sugRate, bool pal) {
|
int DivPlatformYM2610::init(DivEngine* p, int channels, int sugRate, unsigned int flags) {
|
||||||
parent=p;
|
parent=p;
|
||||||
dumpWrites=false;
|
dumpWrites=false;
|
||||||
skipRegisterWrites=false;
|
skipRegisterWrites=false;
|
||||||
|
|
|
@ -77,7 +77,7 @@ class DivPlatformYM2610: public DivDispatch {
|
||||||
bool keyOffAffectsArp(int ch);
|
bool keyOffAffectsArp(int ch);
|
||||||
void notifyInsChange(int ins);
|
void notifyInsChange(int ins);
|
||||||
void notifyInsDeletion(void* ins);
|
void notifyInsDeletion(void* ins);
|
||||||
int init(DivEngine* parent, int channels, int sugRate, bool pal);
|
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||||
void quit();
|
void quit();
|
||||||
~DivPlatformYM2610();
|
~DivPlatformYM2610();
|
||||||
};
|
};
|
||||||
|
|
|
@ -301,8 +301,8 @@ void DivPlatformYM2610Ext::notifyInsChange(int ins) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int DivPlatformYM2610Ext::init(DivEngine* parent, int channels, int sugRate, bool pal) {
|
int DivPlatformYM2610Ext::init(DivEngine* parent, int channels, int sugRate, unsigned int flags) {
|
||||||
DivPlatformYM2610::init(parent,channels,sugRate,pal);
|
DivPlatformYM2610::init(parent,channels,sugRate,flags);
|
||||||
for (int i=0; i<4; i++) {
|
for (int i=0; i<4; i++) {
|
||||||
isOpMuted[i]=false;
|
isOpMuted[i]=false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ class DivPlatformYM2610Ext: public DivPlatformYM2610 {
|
||||||
void muteChannel(int ch, bool mute);
|
void muteChannel(int ch, bool mute);
|
||||||
bool keyOffAffectsArp(int ch);
|
bool keyOffAffectsArp(int ch);
|
||||||
void notifyInsChange(int ins);
|
void notifyInsChange(int ins);
|
||||||
int init(DivEngine* parent, int channels, int sugRate, bool pal);
|
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||||
void quit();
|
void quit();
|
||||||
~DivPlatformYM2610Ext();
|
~DivPlatformYM2610Ext();
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue