Addressing comments
This commit is contained in:
parent
3f2b2a6a4c
commit
ed779f443a
|
@ -1,6 +1,6 @@
|
||||||
# Konami K007232
|
# Konami K007232
|
||||||
|
|
||||||
a Konami's 2 channel PCM sound chip was used in their arcade boards in 1986-1990.
|
a 2-channel PCM sound chip from Konami which was used in some of their 1986-1990 arcade boards.
|
||||||
|
|
||||||
Its sample format is unique; the topmost bit is the end marker, and the low 7 bits are used for generating sound (unsigned format).
|
Its sample format is unique; the topmost bit is the end marker, and the low 7 bits are used for generating sound (unsigned format).
|
||||||
|
|
||||||
|
|
|
@ -1630,10 +1630,6 @@ chips which aren't on this list don't have any flags.
|
||||||
- bit 16-19: outDepth (int)
|
- bit 16-19: outDepth (int)
|
||||||
- bit 20: stereo (bool)
|
- bit 20: stereo (bool)
|
||||||
|
|
||||||
## (Placeholder): Konami K007232
|
|
||||||
|
|
||||||
- bit 0: stereo (bool)
|
|
||||||
|
|
||||||
## 0xe0: QSound
|
## 0xe0: QSound
|
||||||
|
|
||||||
- bit 0-11: echoDelay (int)
|
- bit 0-11: echoDelay (int)
|
||||||
|
|
|
@ -1571,9 +1571,6 @@ void DivEngine::convertOldFlags(unsigned int oldFlags, DivConfig& newFlags, DivS
|
||||||
newFlags.set("echoDelay",(int)(oldFlags&0xfff));
|
newFlags.set("echoDelay",(int)(oldFlags&0xfff));
|
||||||
newFlags.set("echoFeedback",(int)((oldFlags>>12)&255));
|
newFlags.set("echoFeedback",(int)((oldFlags>>12)&255));
|
||||||
break;
|
break;
|
||||||
case DIV_SYSTEM_K007232:
|
|
||||||
if (oldFlags&1) newFlags.set("stereo",true);
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -128,14 +128,14 @@ void DivPlatformK007232::tick(bool sysTick) {
|
||||||
if (chan[i].std.panL.had) {
|
if (chan[i].std.panL.had) {
|
||||||
chan[i].panning&=0xf0;
|
chan[i].panning&=0xf0;
|
||||||
chan[i].panning|=chan[i].std.panL.val&15;
|
chan[i].panning|=chan[i].std.panL.val&15;
|
||||||
if (!isMuted[i] && stereo) {
|
if ((!isMuted[i]) && stereo) {
|
||||||
chan[i].volumeChanged=true;
|
chan[i].volumeChanged=true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (chan[i].std.panR.had) {
|
if (chan[i].std.panR.had) {
|
||||||
chan[i].panning&=0x0f;
|
chan[i].panning&=0x0f;
|
||||||
chan[i].panning|=(chan[i].std.panR.val&15)<<4;
|
chan[i].panning|=(chan[i].std.panR.val&15)<<4;
|
||||||
if (!isMuted[i] && stereo) {
|
if ((!isMuted[i]) && stereo) {
|
||||||
chan[i].volumeChanged=true;
|
chan[i].volumeChanged=true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -158,7 +158,7 @@ void DivPlatformK007232::tick(bool sysTick) {
|
||||||
else {
|
else {
|
||||||
chan[i].lvol=chan[i].rvol=isMuted[i]?0:chan[i].outVol&0xf;
|
chan[i].lvol=chan[i].rvol=isMuted[i]?0:chan[i].outVol&0xf;
|
||||||
const unsigned char prevVolume=lastVolume;
|
const unsigned char prevVolume=lastVolume;
|
||||||
lastVolume=(lastVolume&~(0xf<<(i<<2)))|((chan[i].outVol&0xf)<<(i<<2));
|
lastVolume=(lastVolume&~(0xf<<(i<<2)))|((chan[i].lvol&0xf)<<(i<<2));
|
||||||
if (prevVolume!=lastVolume) {
|
if (prevVolume!=lastVolume) {
|
||||||
rWrite(0xc,lastVolume);
|
rWrite(0xc,lastVolume);
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,6 +95,7 @@ class DivPlatformK007232: public DivDispatch, public k007232_intf {
|
||||||
friend void putDispatchChip(void*,int);
|
friend void putDispatchChip(void*,int);
|
||||||
friend void putDispatchChan(void*,int,int);
|
friend void putDispatchChan(void*,int,int);
|
||||||
|
|
||||||
|
void chWrite(unsigned char ch, unsigned int addr, unsigned char val);
|
||||||
public:
|
public:
|
||||||
u8 read_sample(u8 ne, u32 address);
|
u8 read_sample(u8 ne, u32 address);
|
||||||
void acquire(short* bufL, short* bufR, size_t start, size_t len);
|
void acquire(short* bufL, short* bufR, size_t start, size_t len);
|
||||||
|
@ -128,8 +129,6 @@ class DivPlatformK007232: public DivDispatch, public k007232_intf {
|
||||||
DivDispatch(),
|
DivDispatch(),
|
||||||
k007232_intf(),
|
k007232_intf(),
|
||||||
k007232(*this) {}
|
k007232(*this) {}
|
||||||
private:
|
|
||||||
void chWrite(unsigned char ch, unsigned int addr, unsigned char val);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1694,7 +1694,7 @@ void DivEngine::registerSystems() {
|
||||||
);
|
);
|
||||||
|
|
||||||
sysDefs[DIV_SYSTEM_K007232]=new DivSysDef(
|
sysDefs[DIV_SYSTEM_K007232]=new DivSysDef(
|
||||||
"Konami K007232", NULL, 0xc1 /*Placeholder*/, 0, 2, false, true, 0, false, 1U<<DIV_SAMPLE_DEPTH_8BIT,
|
"Konami K007232", NULL, 0xc1, 0, 2, false, true, 0, false, 1U<<DIV_SAMPLE_DEPTH_8BIT,
|
||||||
"this PCM chip was widely used at Konami arcade boards in 1986-1990.",
|
"this PCM chip was widely used at Konami arcade boards in 1986-1990.",
|
||||||
{"Channel 1", "Channel 2"},
|
{"Channel 1", "Channel 2"},
|
||||||
{"CH1", "CH2"},
|
{"CH1", "CH2"},
|
||||||
|
|
Loading…
Reference in a new issue