add a chip playground
in debug menu
This commit is contained in:
parent
3ca7ebd1fc
commit
d691ec6d76
30 changed files with 226 additions and 0 deletions
|
|
@ -78,6 +78,14 @@ std::vector<DivRegWrite>& DivDispatch::getRegisterWrites() {
|
|||
return regWrites;
|
||||
}
|
||||
|
||||
void DivDispatch::poke(unsigned int addr, unsigned short val) {
|
||||
|
||||
}
|
||||
|
||||
void DivDispatch::poke(std::vector<DivRegWrite>& wlist) {
|
||||
|
||||
}
|
||||
|
||||
int DivDispatch::init(DivEngine* p, int channels, int sugRate, unsigned int flags) {
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -728,6 +728,14 @@ void* DivPlatformArcade::getChanState(int ch) {
|
|||
return &chan[ch];
|
||||
}
|
||||
|
||||
void DivPlatformArcade::poke(unsigned int addr, unsigned short val) {
|
||||
immWrite(addr,val);
|
||||
}
|
||||
|
||||
void DivPlatformArcade::poke(std::vector<DivRegWrite>& wlist) {
|
||||
for (DivRegWrite& i: wlist) immWrite(i.addr,i.val);
|
||||
}
|
||||
|
||||
void DivPlatformArcade::reset() {
|
||||
while (!writes.empty()) writes.pop();
|
||||
if (useYMFM) {
|
||||
|
|
|
|||
|
|
@ -79,6 +79,8 @@ class DivPlatformArcade: public DivDispatch {
|
|||
void setFlags(unsigned int flags);
|
||||
bool isStereo();
|
||||
void setYMFM(bool use);
|
||||
void poke(unsigned int addr, unsigned short val);
|
||||
void poke(std::vector<DivRegWrite>& wlist);
|
||||
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||
void quit();
|
||||
~DivPlatformArcade();
|
||||
|
|
|
|||
|
|
@ -368,6 +368,14 @@ void DivPlatformAY8910::notifyInsDeletion(void* ins) {
|
|||
}
|
||||
}
|
||||
|
||||
void DivPlatformAY8910::poke(unsigned int addr, unsigned short val) {
|
||||
immWrite(addr,val);
|
||||
}
|
||||
|
||||
void DivPlatformAY8910::poke(std::vector<DivRegWrite>& wlist) {
|
||||
for (DivRegWrite& i: wlist) immWrite(i.addr,i.val);
|
||||
}
|
||||
|
||||
void DivPlatformAY8910::setFlags(unsigned int flags) {
|
||||
switch (flags&15) {
|
||||
case 1:
|
||||
|
|
|
|||
|
|
@ -65,6 +65,8 @@ class DivPlatformAY8910: public DivDispatch {
|
|||
bool isStereo();
|
||||
bool keyOffAffectsArp(int ch);
|
||||
void notifyInsDeletion(void* ins);
|
||||
void poke(unsigned int addr, unsigned short val);
|
||||
void poke(std::vector<DivRegWrite>& wlist);
|
||||
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||
void quit();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -408,6 +408,14 @@ void DivPlatformAY8930::notifyInsDeletion(void* ins) {
|
|||
}
|
||||
}
|
||||
|
||||
void DivPlatformAY8930::poke(unsigned int addr, unsigned short val) {
|
||||
immWrite(addr,val);
|
||||
}
|
||||
|
||||
void DivPlatformAY8930::poke(std::vector<DivRegWrite>& wlist) {
|
||||
for (DivRegWrite& i: wlist) immWrite(i.addr,i.val);
|
||||
}
|
||||
|
||||
void DivPlatformAY8930::setFlags(unsigned int flags) {
|
||||
switch (flags&15) {
|
||||
case 1:
|
||||
|
|
|
|||
|
|
@ -58,6 +58,8 @@ class DivPlatformAY8930: public DivDispatch {
|
|||
bool isStereo();
|
||||
bool keyOffAffectsArp(int ch);
|
||||
void notifyInsDeletion(void* ins);
|
||||
void poke(unsigned int addr, unsigned short val);
|
||||
void poke(std::vector<DivRegWrite>& wlist);
|
||||
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||
void quit();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -349,6 +349,14 @@ void DivPlatformC64::reset() {
|
|||
vol=15;
|
||||
}
|
||||
|
||||
void DivPlatformC64::poke(unsigned int addr, unsigned short val) {
|
||||
rWrite(addr,val);
|
||||
}
|
||||
|
||||
void DivPlatformC64::poke(std::vector<DivRegWrite>& wlist) {
|
||||
for (DivRegWrite& i: wlist) rWrite(i.addr,i.val);
|
||||
}
|
||||
|
||||
void DivPlatformC64::setChipModel(bool is6581) {
|
||||
if (is6581) {
|
||||
sid.set_chip_model(MOS6581);
|
||||
|
|
|
|||
|
|
@ -66,6 +66,8 @@ class DivPlatformC64: public DivDispatch {
|
|||
void setFlags(unsigned int flags);
|
||||
void notifyInsChange(int ins);
|
||||
void notifyInsDeletion(void* ins);
|
||||
void poke(unsigned int addr, unsigned short val);
|
||||
void poke(std::vector<DivRegWrite>& wlist);
|
||||
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||
void setChipModel(bool is6581);
|
||||
void quit();
|
||||
|
|
|
|||
|
|
@ -349,6 +349,14 @@ void DivPlatformGB::notifyInsDeletion(void* ins) {
|
|||
}
|
||||
}
|
||||
|
||||
void DivPlatformGB::poke(unsigned int addr, unsigned short val) {
|
||||
immWrite(addr,val);
|
||||
}
|
||||
|
||||
void DivPlatformGB::poke(std::vector<DivRegWrite>& wlist) {
|
||||
for (DivRegWrite& i: wlist) immWrite(i.addr,i.val);
|
||||
}
|
||||
|
||||
int DivPlatformGB::init(DivEngine* p, int channels, int sugRate, unsigned int flags) {
|
||||
for (int i=0; i<4; i++) {
|
||||
isMuted[i]=false;
|
||||
|
|
|
|||
|
|
@ -51,6 +51,8 @@ class DivPlatformGB: public DivDispatch {
|
|||
void notifyInsChange(int ins);
|
||||
void notifyWaveChange(int wave);
|
||||
void notifyInsDeletion(void* ins);
|
||||
void poke(unsigned int addr, unsigned short val);
|
||||
void poke(std::vector<DivRegWrite>& wlist);
|
||||
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||
void quit();
|
||||
~DivPlatformGB();
|
||||
|
|
|
|||
|
|
@ -643,6 +643,14 @@ void DivPlatformGenesis::notifyInsDeletion(void* ins) {
|
|||
psg.notifyInsDeletion(ins);
|
||||
}
|
||||
|
||||
void DivPlatformGenesis::poke(unsigned int addr, unsigned short val) {
|
||||
immWrite(addr,val);
|
||||
}
|
||||
|
||||
void DivPlatformGenesis::poke(std::vector<DivRegWrite>& wlist) {
|
||||
for (DivRegWrite& i: wlist) immWrite(i.addr,i.val);
|
||||
}
|
||||
|
||||
int DivPlatformGenesis::getPortaFloor(int ch) {
|
||||
return (ch>5)?12:0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,6 +86,8 @@ class DivPlatformGenesis: public DivDispatch {
|
|||
void notifyInsChange(int ins);
|
||||
void notifyInsDeletion(void* ins);
|
||||
int getPortaFloor(int ch);
|
||||
void poke(unsigned int addr, unsigned short val);
|
||||
void poke(std::vector<DivRegWrite>& wlist);
|
||||
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||
void quit();
|
||||
~DivPlatformGenesis();
|
||||
|
|
|
|||
|
|
@ -397,6 +397,14 @@ void DivPlatformNES::notifyInsDeletion(void* ins) {
|
|||
}
|
||||
}
|
||||
|
||||
void DivPlatformNES::poke(unsigned int addr, unsigned short val) {
|
||||
rWrite(addr,val);
|
||||
}
|
||||
|
||||
void DivPlatformNES::poke(std::vector<DivRegWrite>& wlist) {
|
||||
for (DivRegWrite& i: wlist) rWrite(i.addr,i.val);
|
||||
}
|
||||
|
||||
int DivPlatformNES::init(DivEngine* p, int channels, int sugRate, unsigned int flags) {
|
||||
parent=p;
|
||||
apuType=flags;
|
||||
|
|
|
|||
|
|
@ -54,6 +54,8 @@ class DivPlatformNES: public DivDispatch {
|
|||
bool keyOffAffectsArp(int ch);
|
||||
void setFlags(unsigned int flags);
|
||||
void notifyInsDeletion(void* ins);
|
||||
void poke(unsigned int addr, unsigned short val);
|
||||
void poke(std::vector<DivRegWrite>& wlist);
|
||||
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||
void quit();
|
||||
~DivPlatformNES();
|
||||
|
|
|
|||
|
|
@ -405,6 +405,14 @@ void DivPlatformPCE::setFlags(unsigned int flags) {
|
|||
rate=chipClock/12;
|
||||
}
|
||||
|
||||
void DivPlatformPCE::poke(unsigned int addr, unsigned short val) {
|
||||
rWrite(addr,val);
|
||||
}
|
||||
|
||||
void DivPlatformPCE::poke(std::vector<DivRegWrite>& wlist) {
|
||||
for (DivRegWrite& i: wlist) rWrite(i.addr,i.val);
|
||||
}
|
||||
|
||||
int DivPlatformPCE::init(DivEngine* p, int channels, int sugRate, unsigned int flags) {
|
||||
parent=p;
|
||||
dumpWrites=false;
|
||||
|
|
|
|||
|
|
@ -70,6 +70,8 @@ class DivPlatformPCE: public DivDispatch {
|
|||
void setFlags(unsigned int flags);
|
||||
void notifyWaveChange(int wave);
|
||||
void notifyInsDeletion(void* ins);
|
||||
void poke(unsigned int addr, unsigned short val);
|
||||
void poke(std::vector<DivRegWrite>& wlist);
|
||||
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||
void quit();
|
||||
~DivPlatformPCE();
|
||||
|
|
|
|||
|
|
@ -322,6 +322,14 @@ void DivPlatformSAA1099::setFlags(unsigned int flags) {
|
|||
rate=chipClock/32;
|
||||
}
|
||||
|
||||
void DivPlatformSAA1099::poke(unsigned int addr, unsigned short val) {
|
||||
rWrite(addr,val);
|
||||
}
|
||||
|
||||
void DivPlatformSAA1099::poke(std::vector<DivRegWrite>& wlist) {
|
||||
for (DivRegWrite& i: wlist) rWrite(i.addr,i.val);
|
||||
}
|
||||
|
||||
int DivPlatformSAA1099::init(DivEngine* p, int channels, int sugRate, unsigned int flags) {
|
||||
parent=p;
|
||||
dumpWrites=false;
|
||||
|
|
|
|||
|
|
@ -62,6 +62,8 @@ class DivPlatformSAA1099: public DivDispatch {
|
|||
int getPortaFloor(int ch);
|
||||
bool keyOffAffectsArp(int ch);
|
||||
void notifyInsDeletion(void* ins);
|
||||
void poke(unsigned int addr, unsigned short val);
|
||||
void poke(std::vector<DivRegWrite>& wlist);
|
||||
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||
void quit();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -230,6 +230,14 @@ void DivPlatformSMS::notifyInsDeletion(void* ins) {
|
|||
}
|
||||
}
|
||||
|
||||
void DivPlatformSMS::poke(unsigned int addr, unsigned short val) {
|
||||
rWrite(val);
|
||||
}
|
||||
|
||||
void DivPlatformSMS::poke(std::vector<DivRegWrite>& wlist) {
|
||||
for (DivRegWrite& i: wlist) rWrite(i.val);
|
||||
}
|
||||
|
||||
void DivPlatformSMS::setFlags(unsigned int flags) {
|
||||
if ((flags&3)==2) {
|
||||
chipClock=4000000;
|
||||
|
|
|
|||
|
|
@ -48,6 +48,8 @@ class DivPlatformSMS: public DivDispatch {
|
|||
int getPortaFloor(int ch);
|
||||
void setFlags(unsigned int flags);
|
||||
void notifyInsDeletion(void* ins);
|
||||
void poke(unsigned int addr, unsigned short val);
|
||||
void poke(std::vector<DivRegWrite>& wlist);
|
||||
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||
void quit();
|
||||
~DivPlatformSMS();
|
||||
|
|
|
|||
|
|
@ -254,6 +254,14 @@ void DivPlatformTIA::notifyInsDeletion(void* ins) {
|
|||
}
|
||||
}
|
||||
|
||||
void DivPlatformTIA::poke(unsigned int addr, unsigned short val) {
|
||||
rWrite(addr,val);
|
||||
}
|
||||
|
||||
void DivPlatformTIA::poke(std::vector<DivRegWrite>& wlist) {
|
||||
for (DivRegWrite& i: wlist) rWrite(i.addr,i.val);
|
||||
}
|
||||
|
||||
void DivPlatformTIA::setFlags(unsigned int flags) {
|
||||
if (flags&1) {
|
||||
rate=31250;
|
||||
|
|
|
|||
|
|
@ -35,6 +35,8 @@ class DivPlatformTIA: public DivDispatch {
|
|||
bool isStereo();
|
||||
bool keyOffAffectsArp(int ch);
|
||||
void notifyInsDeletion(void* ins);
|
||||
void poke(unsigned int addr, unsigned short val);
|
||||
void poke(std::vector<DivRegWrite>& wlist);
|
||||
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||
void quit();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -721,6 +721,14 @@ void* DivPlatformYM2610::getChanState(int ch) {
|
|||
return &chan[ch];
|
||||
}
|
||||
|
||||
void DivPlatformYM2610::poke(unsigned int addr, unsigned short val) {
|
||||
immWrite(addr,val);
|
||||
}
|
||||
|
||||
void DivPlatformYM2610::poke(std::vector<DivRegWrite>& wlist) {
|
||||
for (DivRegWrite& i: wlist) immWrite(i.addr,i.val);
|
||||
}
|
||||
|
||||
void DivPlatformYM2610::reset() {
|
||||
while (!writes.empty()) writes.pop();
|
||||
if (dumpWrites) {
|
||||
|
|
|
|||
|
|
@ -77,6 +77,8 @@ class DivPlatformYM2610: public DivDispatch {
|
|||
bool keyOffAffectsArp(int ch);
|
||||
void notifyInsChange(int ins);
|
||||
void notifyInsDeletion(void* ins);
|
||||
void poke(unsigned int addr, unsigned short val);
|
||||
void poke(std::vector<DivRegWrite>& wlist);
|
||||
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||
void quit();
|
||||
~DivPlatformYM2610();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue