mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-02 02:52:40 +00:00
Virtual Boy: fix noise phase reset
This commit is contained in:
parent
385a9adab2
commit
8b87905304
3 changed files with 18 additions and 4 deletions
|
@ -128,9 +128,11 @@ void DivPlatformVB::updateWave(int ch) {
|
|||
}
|
||||
}
|
||||
|
||||
void DivPlatformVB::writeEnv(int ch) {
|
||||
void DivPlatformVB::writeEnv(int ch, bool upperByteToo) {
|
||||
chWrite(ch,0x04,(chan[ch].outVol<<4)|(chan[ch].envLow&15));
|
||||
chWrite(ch,0x05,chan[ch].envHigh);
|
||||
if (ch<5 || upperByteToo) {
|
||||
chWrite(ch,0x05,chan[ch].envHigh);
|
||||
}
|
||||
}
|
||||
|
||||
void DivPlatformVB::tick(bool sysTick) {
|
||||
|
@ -298,7 +300,7 @@ int DivPlatformVB::dispatch(DivCommand c) {
|
|||
if (c.chan!=5) break;
|
||||
chan[c.chan].envHigh&=~0x70;
|
||||
chan[c.chan].envHigh|=(c.value&7)<<4;
|
||||
writeEnv(c.chan);
|
||||
writeEnv(c.chan,true);
|
||||
break;
|
||||
case DIV_CMD_STD_NOISE_FREQ:
|
||||
chan[c.chan].envHigh&=~3;
|
||||
|
|
|
@ -81,7 +81,7 @@ class DivPlatformVB: public DivDispatch {
|
|||
VSU* vb;
|
||||
unsigned char regPool[0x600];
|
||||
void updateWave(int ch);
|
||||
void writeEnv(int ch);
|
||||
void writeEnv(int ch, bool upperByteToo=false);
|
||||
friend void putDispatchChip(void*,int);
|
||||
friend void putDispatchChan(void*,int,int);
|
||||
public:
|
||||
|
|
|
@ -438,6 +438,12 @@ void FurnaceGUI::initSystemPresets() {
|
|||
0
|
||||
}
|
||||
));
|
||||
cat.systems.push_back(FurnaceGUISysDef(
|
||||
"Virtual Boy", {
|
||||
DIV_SYSTEM_VBOY, 64, 0, 0,
|
||||
0
|
||||
}
|
||||
));
|
||||
cat.systems.push_back(FurnaceGUISysDef(
|
||||
"Seta/Allumer X1-010", {
|
||||
DIV_SYSTEM_X1_010, 64, 0, 0,
|
||||
|
@ -704,6 +710,12 @@ void FurnaceGUI::initSystemPresets() {
|
|||
0
|
||||
}
|
||||
));
|
||||
cat.systems.push_back(FurnaceGUISysDef(
|
||||
"Virtual Boy", {
|
||||
DIV_SYSTEM_VBOY, 64, 0, 0,
|
||||
0
|
||||
}
|
||||
));
|
||||
cat.systems.push_back(FurnaceGUISysDef(
|
||||
"Gamate", {
|
||||
DIV_SYSTEM_AY8910, 64, 0, 73,
|
||||
|
|
Loading…
Reference in a new issue