Merge pull request #294 from cam900/bubsys

Reduce naming confusion in Bubble System Wavetable Sound
This commit is contained in:
tildearrow 2022-03-17 22:03:24 -05:00 committed by GitHub
commit 6c5e6c2a0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 63 additions and 61 deletions

View File

@ -318,7 +318,7 @@ src/engine/platform/x1_010.cpp
src/engine/platform/lynx.cpp
src/engine/platform/swan.cpp
src/engine/platform/vera.cpp
src/engine/platform/k005289.cpp
src/engine/platform/bubsyswsg.cpp
src/engine/platform/dummy.cpp
)

View File

@ -26,7 +26,7 @@ depending on the instrument type, there are currently 13 different types of an i
- [Atari Lynx](lynx.md) - for use with Atari Lynx handheld console.
- [VERA](vera.md) - for use with Commander X16 VERA.
- [Seta/Allumer X1-010](x1_010.md) - for use with Wavetable portion in Seta/Allumer X1-010.
- [Konami SCC/Bubble System](scc.md) - for use with Konami SCC and Wavetable portion in Bubble System's sound hardware.
- [Konami SCC/Bubble System WSG](scc.md) - for use with Konami SCC and Wavetable portion in Bubble System's sound hardware.
# macros

View File

@ -1,6 +1,6 @@
# Konami SCC/Bubble System instrument editor
# Konami SCC/Bubble System WSG instrument editor
SCC/Bubble System instrument editor consists of only three macros:
SCC/Bubble System WSG instrument editor consists of only three macros:
- [Volume] - volume sequence
- [Arpeggio] - pitch sequence

View File

@ -20,6 +20,6 @@ this is a list of systems that Furnace supports, including each system's effects
- [Microchip AY8930](ay8930.md)
- [Seta/Allumer X1-010](x1_010.md)
- [WonderSwan](wonderswan.md)
- [Bubble System/K005289](bubblesystem.md)
- [Bubble System WSG](bubblesystem.md)
Furnace also reads .dmf files with the [Yamaha YMU759](ymu759.md) system, but does not emulate the chip at all.

View File

@ -1,10 +1,12 @@
# Bubble System/K005289
# Bubble System WSG
a Konami's 2 channel wavetable sound generator logic used at their arcade hardware Bubble System.
It's configured with K005289, 4 bit PROM and DAC.
Also known as K005289, but that's just part of the logic used for pitch and wavetable ROM address. Waveform select and Volume control are tied with AY-3-8910 port.
Also known as K005289, but that's just part of the logic used for pitch and wavetable ROM address.
Waveform select and Volume control are tied with single AY-3-8910 IO for both channels.
Another AY-3-8910 IO is used for reading sound hardware status.
furnace emulates this configurations as single system, waveform format is 15 level and 32 width.

View File

@ -180,7 +180,7 @@ size | description
| - 0xaa: MSM6295 - 4 channels
| - 0xab: MSM6258 - 1 channel
| - 0xac: Commander X16 (VERA) - 17 channels
| - 0xad: Bubble System - 2 channels
| - 0xad: Bubble System WSG - 2 channels
| - 0xb0: Seta/Allumer X1-010 - 16 channels
| - 0xde: YM2610B extended - 19 channels
| - 0xe0: QSound - 19 channels

View File

@ -45,7 +45,7 @@
#include "platform/x1_010.h"
#include "platform/swan.h"
#include "platform/lynx.h"
#include "platform/k005289.h"
#include "platform/bubsyswsg.h"
#include "platform/dummy.h"
#include "../ta-log.h"
#include "song.h"
@ -272,8 +272,8 @@ void DivDispatchContainer::init(DivSystem sys, DivEngine* eng, int chanCount, do
case DIV_SYSTEM_VERA:
dispatch=new DivPlatformVERA;
break;
case DIV_SYSTEM_K005289:
dispatch=new DivPlatformK005289;
case DIV_SYSTEM_BUBSYS_WSG:
dispatch=new DivPlatformBubSysWSG;
break;
default:
logW("this system is not supported yet! using dummy platform.\n");

View File

@ -17,7 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "k005289.h"
#include "bubsyswsg.h"
#include "../engine.h"
#include <math.h>
@ -25,8 +25,8 @@
#define rWrite(a,v) {if(!skipRegisterWrites) {regPool[a]=v; if(dumpWrites) addWrite(a,v); }}
const char* regCheatSheetK005289[]={
// K005289
const char* regCheatSheetBubSysWSG[]={
// K005289 timer
"Freq_A", "0",
"Freq_B", "1",
// PROM, DAC control from External logic (Connected to AY PSG ports on Bubble System)
@ -35,11 +35,11 @@ const char* regCheatSheetK005289[]={
NULL
};
const char** DivPlatformK005289::getRegisterSheet() {
return regCheatSheetK005289;
const char** DivPlatformBubSysWSG::getRegisterSheet() {
return regCheatSheetBubSysWSG;
}
const char* DivPlatformK005289::getEffectName(unsigned char effect) {
const char* DivPlatformBubSysWSG::getEffectName(unsigned char effect) {
switch (effect) {
case 0x10:
return "10xx: Change waveform";
@ -48,7 +48,7 @@ const char* DivPlatformK005289::getEffectName(unsigned char effect) {
return NULL;
}
void DivPlatformK005289::acquire(short* bufL, short* bufR, size_t start, size_t len) {
void DivPlatformBubSysWSG::acquire(short* bufL, short* bufR, size_t start, size_t len) {
for (size_t h=start; h<start+len; h++) {
signed int out=0;
// K005289 part
@ -69,7 +69,7 @@ void DivPlatformK005289::acquire(short* bufL, short* bufR, size_t start, size_t
}
}
void DivPlatformK005289::updateWave(int ch) {
void DivPlatformBubSysWSG::updateWave(int ch) {
DivWavetable* wt=parent->getWave(chan[ch].wave);
for (int i=0; i<32; i++) {
if (wt->max>0 && wt->len>0) {
@ -84,7 +84,7 @@ void DivPlatformK005289::updateWave(int ch) {
}
}
void DivPlatformK005289::tick() {
void DivPlatformBubSysWSG::tick() {
for (int i=0; i<2; i++) {
chan[i].std.next();
if (chan[i].std.hadVol) {
@ -139,7 +139,7 @@ void DivPlatformK005289::tick() {
}
}
int DivPlatformK005289::dispatch(DivCommand c) {
int DivPlatformBubSysWSG::dispatch(DivCommand c) {
switch (c.cmd) {
case DIV_CMD_NOTE_ON: {
DivInstrument* ins=parent->getIns(chan[c.chan].ins);
@ -238,12 +238,12 @@ int DivPlatformK005289::dispatch(DivCommand c) {
return 1;
}
void DivPlatformK005289::muteChannel(int ch, bool mute) {
void DivPlatformBubSysWSG::muteChannel(int ch, bool mute) {
isMuted[ch]=mute;
rWrite(2+ch,(chan[ch].wave<<5)|((chan[ch].active && isMuted[ch])?0:chan[ch].outVol));
}
void DivPlatformK005289::forceIns() {
void DivPlatformBubSysWSG::forceIns() {
for (int i=0; i<2; i++) {
chan[i].insChanged=true;
chan[i].freqChanged=true;
@ -251,26 +251,26 @@ void DivPlatformK005289::forceIns() {
}
}
void* DivPlatformK005289::getChanState(int ch) {
void* DivPlatformBubSysWSG::getChanState(int ch) {
return &chan[ch];
}
unsigned char* DivPlatformK005289::getRegisterPool() {
unsigned char* DivPlatformBubSysWSG::getRegisterPool() {
return (unsigned char*)regPool;
}
int DivPlatformK005289::getRegisterPoolSize() {
int DivPlatformBubSysWSG::getRegisterPoolSize() {
return 4;
}
int DivPlatformK005289::getRegisterPoolDepth() {
int DivPlatformBubSysWSG::getRegisterPoolDepth() {
return 16;
}
void DivPlatformK005289::reset() {
void DivPlatformBubSysWSG::reset() {
memset(regPool,0,4*2);
for (int i=0; i<2; i++) {
chan[i]=DivPlatformK005289::Channel();
chan[i]=DivPlatformBubSysWSG::Channel();
}
if (dumpWrites) {
addWrite(0xffffffff,0);
@ -278,15 +278,15 @@ void DivPlatformK005289::reset() {
k005289->reset();
}
bool DivPlatformK005289::isStereo() {
bool DivPlatformBubSysWSG::isStereo() {
return false;
}
bool DivPlatformK005289::keyOffAffectsArp(int ch) {
bool DivPlatformBubSysWSG::keyOffAffectsArp(int ch) {
return true;
}
void DivPlatformK005289::notifyWaveChange(int wave) {
void DivPlatformBubSysWSG::notifyWaveChange(int wave) {
for (int i=0; i<2; i++) {
if (chan[i].wave==wave) {
updateWave(i);
@ -294,26 +294,26 @@ void DivPlatformK005289::notifyWaveChange(int wave) {
}
}
void DivPlatformK005289::notifyInsDeletion(void* ins) {
void DivPlatformBubSysWSG::notifyInsDeletion(void* ins) {
for (int i=0; i<2; i++) {
chan[i].std.notifyInsDeletion((DivInstrument*)ins);
}
}
void DivPlatformK005289::setFlags(unsigned int flags) {
void DivPlatformBubSysWSG::setFlags(unsigned int flags) {
chipClock=COLOR_NTSC;
rate=chipClock;
}
void DivPlatformK005289::poke(unsigned int addr, unsigned short val) {
void DivPlatformBubSysWSG::poke(unsigned int addr, unsigned short val) {
rWrite(addr,val);
}
void DivPlatformK005289::poke(std::vector<DivRegWrite>& wlist) {
void DivPlatformBubSysWSG::poke(std::vector<DivRegWrite>& wlist) {
for (DivRegWrite& i: wlist) rWrite(i.addr,i.val);
}
int DivPlatformK005289::init(DivEngine* p, int channels, int sugRate, unsigned int flags) {
int DivPlatformBubSysWSG::init(DivEngine* p, int channels, int sugRate, unsigned int flags) {
parent=p;
dumpWrites=false;
skipRegisterWrites=false;
@ -326,9 +326,9 @@ int DivPlatformK005289::init(DivEngine* p, int channels, int sugRate, unsigned i
return 2;
}
void DivPlatformK005289::quit() {
void DivPlatformBubSysWSG::quit() {
delete k005289;
}
DivPlatformK005289::~DivPlatformK005289() {
DivPlatformBubSysWSG::~DivPlatformBubSysWSG() {
}

View File

@ -25,7 +25,7 @@
#include "../macroInt.h"
#include "sound/k005289/k005289.hpp"
class DivPlatformK005289: public DivDispatch {
class DivPlatformBubSysWSG: public DivDispatch {
struct Channel {
int freq, baseFreq, pitch, note;
unsigned char ins;
@ -78,7 +78,7 @@ class DivPlatformK005289: public DivDispatch {
const char* getEffectName(unsigned char effect);
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
void quit();
~DivPlatformK005289();
~DivPlatformBubSysWSG();
};
#endif

View File

@ -313,7 +313,7 @@ bool DivEngine::perSystemEffect(int ch, unsigned char effect, unsigned char effe
return false;
}
break;
case DIV_SYSTEM_K005289:
case DIV_SYSTEM_BUBSYS_WSG:
switch (effect) {
case 0x10: // select waveform
dispatchCmd(DivCommand(DIV_CMD_WAVE,ch,effectVal));

View File

@ -94,7 +94,7 @@ enum DivSystem {
DIV_SYSTEM_YM2610B_EXT,
DIV_SYSTEM_SEGAPCM_COMPAT,
DIV_SYSTEM_X1_010,
DIV_SYSTEM_K005289
DIV_SYSTEM_BUBSYS_WSG
};
struct DivSong {

View File

@ -138,7 +138,7 @@ DivSystem DivEngine::systemFromFile(unsigned char val) {
case 0xac:
return DIV_SYSTEM_VERA;
case 0xad:
return DIV_SYSTEM_K005289;
return DIV_SYSTEM_BUBSYS_WSG;
case 0xb0:
return DIV_SYSTEM_X1_010;
case 0xde:
@ -266,7 +266,7 @@ unsigned char DivEngine::systemToFile(DivSystem val) {
return 0xa9;
case DIV_SYSTEM_VERA:
return 0xac;
case DIV_SYSTEM_K005289:
case DIV_SYSTEM_BUBSYS_WSG:
return 0xad;
case DIV_SYSTEM_X1_010:
return 0xb0;
@ -398,7 +398,7 @@ int DivEngine::getChannelCount(DivSystem sys) {
return 19;
case DIV_SYSTEM_VERA:
return 17;
case DIV_SYSTEM_K005289:
case DIV_SYSTEM_BUBSYS_WSG:
return 2;
}
return 0;
@ -548,7 +548,7 @@ const char* DivEngine::getSongSystemName() {
}
break;
case 3:
if (song.system[0]==DIV_SYSTEM_AY8910 && song.system[1]==DIV_SYSTEM_AY8910 && song.system[2]==DIV_SYSTEM_K005289) {
if (song.system[0]==DIV_SYSTEM_AY8910 && song.system[1]==DIV_SYSTEM_AY8910 && song.system[2]==DIV_SYSTEM_BUBSYS_WSG) {
return "Konami Bubble System";
}
break;
@ -681,8 +681,8 @@ const char* DivEngine::getSystemName(DivSystem sys) {
return "VERA";
case DIV_SYSTEM_X1_010:
return "Seta/Allumer X1-010";
case DIV_SYSTEM_K005289:
return "Konami Bubble System Sound";
case DIV_SYSTEM_BUBSYS_WSG:
return "Konami Bubble System WSG";
}
return "Unknown";
}
@ -812,8 +812,8 @@ const char* DivEngine::getSystemChips(DivSystem sys) {
return "VERA";
case DIV_SYSTEM_X1_010:
return "Seta/Allumer X1-010";
case DIV_SYSTEM_K005289:
return "Konami K005289";
case DIV_SYSTEM_BUBSYS_WSG:
return "Konami Bubble System WSG";
}
return "Unknown";
}
@ -1071,7 +1071,7 @@ const DivInstrumentType chanPrefType[47][28]={
{DIV_INS_FM, DIV_INS_FM, DIV_INS_FM, DIV_INS_FM, DIV_INS_FM, DIV_INS_FM, DIV_INS_FM, DIV_INS_FM, DIV_INS_FM, DIV_INS_AY, DIV_INS_AY, DIV_INS_AY, DIV_INS_AMIGA, DIV_INS_AMIGA, DIV_INS_AMIGA, DIV_INS_AMIGA, DIV_INS_AMIGA, DIV_INS_AMIGA, DIV_INS_AMIGA}, // YM2610B (extended channel 3)
{DIV_INS_VERA, DIV_INS_VERA, DIV_INS_VERA, DIV_INS_VERA, DIV_INS_VERA, DIV_INS_VERA, DIV_INS_VERA, DIV_INS_VERA, DIV_INS_VERA, DIV_INS_VERA, DIV_INS_VERA, DIV_INS_VERA, DIV_INS_VERA, DIV_INS_VERA, DIV_INS_VERA, DIV_INS_VERA, DIV_INS_AMIGA}, // VERA
{DIV_INS_X1_010, DIV_INS_X1_010, DIV_INS_X1_010, DIV_INS_X1_010, DIV_INS_X1_010, DIV_INS_X1_010, DIV_INS_X1_010, DIV_INS_X1_010, DIV_INS_X1_010, DIV_INS_X1_010, DIV_INS_X1_010, DIV_INS_X1_010, DIV_INS_X1_010, DIV_INS_X1_010, DIV_INS_X1_010, DIV_INS_X1_010}, // X1-010
{DIV_INS_SCC, DIV_INS_SCC}, // K005289
{DIV_INS_SCC, DIV_INS_SCC}, // Bubble System WSG
};
const char* DivEngine::getChannelName(int chan) {
@ -1100,7 +1100,7 @@ const char* DivEngine::getChannelName(int chan) {
break;
case DIV_SYSTEM_PCE:
case DIV_SYSTEM_SFX_BEEPER:
case DIV_SYSTEM_K005289:
case DIV_SYSTEM_BUBSYS_WSG:
return chanNames[5][dispatchChanOfChan[chan]];
break;
case DIV_SYSTEM_NES:
@ -1246,7 +1246,7 @@ const char* DivEngine::getChannelShortName(int chan) {
break;
case DIV_SYSTEM_PCE:
case DIV_SYSTEM_SFX_BEEPER:
case DIV_SYSTEM_K005289:
case DIV_SYSTEM_BUBSYS_WSG:
return chanShortNames[5][dispatchChanOfChan[chan]];
break;
case DIV_SYSTEM_NES:
@ -1388,7 +1388,7 @@ int DivEngine::getChannelType(int chan) {
break;
case DIV_SYSTEM_PCE:
case DIV_SYSTEM_SFX_BEEPER:
case DIV_SYSTEM_K005289:
case DIV_SYSTEM_BUBSYS_WSG:
return chanTypes[5][dispatchChanOfChan[chan]];
break;
case DIV_SYSTEM_NES:
@ -1662,7 +1662,7 @@ DivInstrumentType DivEngine::getPreferInsType(int chan) {
case DIV_SYSTEM_X1_010:
return chanPrefType[45][dispatchChanOfChan[chan]];
break;
case DIV_SYSTEM_K005289:
case DIV_SYSTEM_BUBSYS_WSG:
return chanPrefType[46][dispatchChanOfChan[chan]];
break;
}

View File

@ -5514,7 +5514,7 @@ bool FurnaceGUI::loop() {
sysAddOption(DIV_SYSTEM_X1_010);
sysAddOption(DIV_SYSTEM_SWAN);
sysAddOption(DIV_SYSTEM_VERA);
sysAddOption(DIV_SYSTEM_K005289);
sysAddOption(DIV_SYSTEM_BUBSYS_WSG);
ImGui::EndMenu();
}
if (ImGui::BeginMenu("configure system...")) {
@ -5850,7 +5850,7 @@ bool FurnaceGUI::loop() {
case DIV_SYSTEM_GB:
case DIV_SYSTEM_SWAN:
case DIV_SYSTEM_VERA:
case DIV_SYSTEM_K005289:
case DIV_SYSTEM_BUBSYS_WSG:
case DIV_SYSTEM_YM2610:
case DIV_SYSTEM_YM2610_EXT:
case DIV_SYSTEM_YM2610_FULL:
@ -5912,7 +5912,7 @@ bool FurnaceGUI::loop() {
sysChangeOption(i,DIV_SYSTEM_X1_010);
sysChangeOption(i,DIV_SYSTEM_SWAN);
sysChangeOption(i,DIV_SYSTEM_VERA);
sysChangeOption(i,DIV_SYSTEM_K005289);
sysChangeOption(i,DIV_SYSTEM_BUBSYS_WSG);
ImGui::EndMenu();
}
}
@ -7686,7 +7686,7 @@ FurnaceGUI::FurnaceGUI():
"Konami Bubble System", {
DIV_SYSTEM_AY8910, 64, 0, 0,
DIV_SYSTEM_AY8910, 64, 0, 0,
DIV_SYSTEM_K005289, 64, 0, 0,
DIV_SYSTEM_BUBSYS_WSG, 64, 0, 0,
// VLM5030 exists but not used for music at all
0
}

View File

@ -84,7 +84,7 @@ const char* insTypes[DIV_INS_MAX]={
"FDS",
"Virtual Boy",
"Namco 163",
"Konami SCC/Bubble System",
"Konami SCC/Bubble System WSG",
"FM (OPZ)",
"POKEY",
"PC Beeper",