mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-22 12:35:11 +00:00
Rename QT to QuadTone
This commit is contained in:
parent
359d9c268c
commit
fc2db92d4f
8 changed files with 38 additions and 38 deletions
|
@ -528,7 +528,7 @@ src/engine/platform/t6w28.cpp
|
|||
src/engine/platform/vb.cpp
|
||||
src/engine/platform/vera.cpp
|
||||
src/engine/platform/zxbeeper.cpp
|
||||
src/engine/platform/zxbeeperqt.cpp
|
||||
src/engine/platform/zxbeeperquadtone.cpp
|
||||
src/engine/platform/bubsyswsg.cpp
|
||||
src/engine/platform/n163.cpp
|
||||
src/engine/platform/pet.cpp
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
#include "platform/lynx.h"
|
||||
#include "platform/pokey.h"
|
||||
#include "platform/zxbeeper.h"
|
||||
#include "platform/zxbeeperqt.h"
|
||||
#include "platform/zxbeeperquadtone.h"
|
||||
#include "platform/bubsyswsg.h"
|
||||
#include "platform/n163.h"
|
||||
#include "platform/pet.h"
|
||||
|
@ -389,8 +389,8 @@ void DivDispatchContainer::init(DivSystem sys, DivEngine* eng, int chanCount, do
|
|||
case DIV_SYSTEM_SFX_BEEPER:
|
||||
dispatch=new DivPlatformZXBeeper;
|
||||
break;
|
||||
case DIV_SYSTEM_SFX_BEEPER_QT:
|
||||
dispatch=new DivPlatformZXBeeperQT;
|
||||
case DIV_SYSTEM_SFX_BEEPER_QUADTONE:
|
||||
dispatch=new DivPlatformZXBeeperQuadTone;
|
||||
break;
|
||||
case DIV_SYSTEM_LYNX:
|
||||
dispatch=new DivPlatformLynx;
|
||||
|
|
|
@ -1479,7 +1479,7 @@ void DivEngine::convertOldFlags(unsigned int oldFlags, DivConfig& newFlags, DivS
|
|||
}
|
||||
break;
|
||||
case DIV_SYSTEM_SFX_BEEPER:
|
||||
case DIV_SYSTEM_SFX_BEEPER_QT:
|
||||
case DIV_SYSTEM_SFX_BEEPER_QUADTONE:
|
||||
newFlags.set("clockSel",(int)(oldFlags&1));
|
||||
break;
|
||||
case DIV_SYSTEM_SCC:
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#include "zxbeeperqt.h"
|
||||
#include "zxbeeperquadtone.h"
|
||||
#include "../engine.h"
|
||||
#include <math.h>
|
||||
|
||||
|
@ -25,11 +25,11 @@
|
|||
#define CHIP_FREQBASE 2048*320
|
||||
#define CHIP_DIVIDER 16*13
|
||||
|
||||
const char** DivPlatformZXBeeperQT::getRegisterSheet() {
|
||||
const char** DivPlatformZXBeeperQuadTone::getRegisterSheet() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void DivPlatformZXBeeperQT::acquire(short** buf, size_t len) {
|
||||
void DivPlatformZXBeeperQuadTone::acquire(short** buf, size_t len) {
|
||||
bool o=false;
|
||||
for (size_t h=0; h<len; h++) {
|
||||
if (curSample>=0 && curSample<parent->song.sampleLen) {
|
||||
|
@ -72,7 +72,7 @@ void DivPlatformZXBeeperQT::acquire(short** buf, size_t len) {
|
|||
}
|
||||
}
|
||||
|
||||
void DivPlatformZXBeeperQT::tick(bool sysTick) {
|
||||
void DivPlatformZXBeeperQuadTone::tick(bool sysTick) {
|
||||
for (int i=0; i<4; i++) {
|
||||
chan[i].std.next();
|
||||
if (chan[i].std.vol.had) {
|
||||
|
@ -148,7 +148,7 @@ void DivPlatformZXBeeperQT::tick(bool sysTick) {
|
|||
}
|
||||
}
|
||||
|
||||
int DivPlatformZXBeeperQT::dispatch(DivCommand c) {
|
||||
int DivPlatformZXBeeperQuadTone::dispatch(DivCommand c) {
|
||||
switch (c.cmd) {
|
||||
case DIV_CMD_NOTE_ON: {
|
||||
if (c.chan<4) {
|
||||
|
@ -279,48 +279,48 @@ int DivPlatformZXBeeperQT::dispatch(DivCommand c) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
void DivPlatformZXBeeperQT::writeOutVol(int ch) {
|
||||
void DivPlatformZXBeeperQuadTone::writeOutVol(int ch) {
|
||||
if (ch>=4) return;
|
||||
unsigned char val=(chan[ch].outVol>=1)?((chan[ch].outVol>=2)?31:7):0;
|
||||
rWrite(3+ch*4,(!isMuted[ch]&&chan[ch].active)?val:0);
|
||||
}
|
||||
|
||||
void DivPlatformZXBeeperQT::muteChannel(int ch, bool mute) {
|
||||
void DivPlatformZXBeeperQuadTone::muteChannel(int ch, bool mute) {
|
||||
isMuted[ch]=mute;
|
||||
writeOutVol(ch);
|
||||
}
|
||||
|
||||
void DivPlatformZXBeeperQT::forceIns() {
|
||||
void DivPlatformZXBeeperQuadTone::forceIns() {
|
||||
for (int i=0; i<5; i++) {
|
||||
chan[i].insChanged=true;
|
||||
chan[i].freqChanged=true;
|
||||
}
|
||||
}
|
||||
|
||||
void* DivPlatformZXBeeperQT::getChanState(int ch) {
|
||||
void* DivPlatformZXBeeperQuadTone::getChanState(int ch) {
|
||||
return &chan[ch];
|
||||
}
|
||||
|
||||
DivMacroInt* DivPlatformZXBeeperQT::getChanMacroInt(int ch) {
|
||||
DivMacroInt* DivPlatformZXBeeperQuadTone::getChanMacroInt(int ch) {
|
||||
return &chan[ch].std;
|
||||
}
|
||||
|
||||
DivDispatchOscBuffer* DivPlatformZXBeeperQT::getOscBuffer(int ch) {
|
||||
DivDispatchOscBuffer* DivPlatformZXBeeperQuadTone::getOscBuffer(int ch) {
|
||||
return oscBuf[ch];
|
||||
}
|
||||
|
||||
unsigned char* DivPlatformZXBeeperQT::getRegisterPool() {
|
||||
unsigned char* DivPlatformZXBeeperQuadTone::getRegisterPool() {
|
||||
return regPool;
|
||||
}
|
||||
|
||||
int DivPlatformZXBeeperQT::getRegisterPoolSize() {
|
||||
int DivPlatformZXBeeperQuadTone::getRegisterPoolSize() {
|
||||
return 16;
|
||||
}
|
||||
|
||||
void DivPlatformZXBeeperQT::reset() {
|
||||
void DivPlatformZXBeeperQuadTone::reset() {
|
||||
memset(regPool,0,16);
|
||||
for (int i=0; i<5; i++) {
|
||||
chan[i]=DivPlatformZXBeeperQT::Channel();
|
||||
chan[i]=DivPlatformZXBeeperQuadTone::Channel();
|
||||
chan[i].std.setEngine(parent);
|
||||
if (i<4) rWrite(2+i*4,128);
|
||||
}
|
||||
|
@ -334,20 +334,20 @@ void DivPlatformZXBeeperQT::reset() {
|
|||
outputClock=0;
|
||||
}
|
||||
|
||||
bool DivPlatformZXBeeperQT::keyOffAffectsArp(int ch) {
|
||||
bool DivPlatformZXBeeperQuadTone::keyOffAffectsArp(int ch) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void DivPlatformZXBeeperQT::notifyWaveChange(int wave) {
|
||||
void DivPlatformZXBeeperQuadTone::notifyWaveChange(int wave) {
|
||||
}
|
||||
|
||||
void DivPlatformZXBeeperQT::notifyInsDeletion(void* ins) {
|
||||
void DivPlatformZXBeeperQuadTone::notifyInsDeletion(void* ins) {
|
||||
for (int i=0; i<5; i++) {
|
||||
chan[i].std.notifyInsDeletion((DivInstrument*)ins);
|
||||
}
|
||||
}
|
||||
|
||||
void DivPlatformZXBeeperQT::setFlags(const DivConfig& flags) {
|
||||
void DivPlatformZXBeeperQuadTone::setFlags(const DivConfig& flags) {
|
||||
if (flags.getInt("clockSel",0)) {
|
||||
chipClock=COLOR_PAL*4.0/5.0;
|
||||
} else {
|
||||
|
@ -360,15 +360,15 @@ void DivPlatformZXBeeperQT::setFlags(const DivConfig& flags) {
|
|||
}
|
||||
}
|
||||
|
||||
void DivPlatformZXBeeperQT::poke(unsigned int addr, unsigned short val) {
|
||||
void DivPlatformZXBeeperQuadTone::poke(unsigned int addr, unsigned short val) {
|
||||
rWrite(addr,val);
|
||||
}
|
||||
|
||||
void DivPlatformZXBeeperQT::poke(std::vector<DivRegWrite>& wlist) {
|
||||
void DivPlatformZXBeeperQuadTone::poke(std::vector<DivRegWrite>& wlist) {
|
||||
for (DivRegWrite& i: wlist) rWrite(i.addr,i.val);
|
||||
}
|
||||
|
||||
int DivPlatformZXBeeperQT::init(DivEngine* p, int channels, int sugRate, const DivConfig& flags) {
|
||||
int DivPlatformZXBeeperQuadTone::init(DivEngine* p, int channels, int sugRate, const DivConfig& flags) {
|
||||
parent=p;
|
||||
for (int i=0; i<5; i++) {
|
||||
isMuted[i]=false;
|
||||
|
@ -379,11 +379,11 @@ int DivPlatformZXBeeperQT::init(DivEngine* p, int channels, int sugRate, const D
|
|||
return 5;
|
||||
}
|
||||
|
||||
void DivPlatformZXBeeperQT::quit() {
|
||||
void DivPlatformZXBeeperQuadTone::quit() {
|
||||
for (int i=0; i<5; i++) {
|
||||
delete oscBuf[i];
|
||||
}
|
||||
}
|
||||
|
||||
DivPlatformZXBeeperQT::~DivPlatformZXBeeperQT() {
|
||||
DivPlatformZXBeeperQuadTone::~DivPlatformZXBeeperQuadTone() {
|
||||
}
|
|
@ -17,12 +17,12 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef _ZXBEEPERQT_H
|
||||
#define _ZXBEEPERQT_H
|
||||
#ifndef _ZXBEEPERQUADTONE_H
|
||||
#define _ZXBEEPERQUADTONE_H
|
||||
|
||||
#include "../dispatch.h"
|
||||
|
||||
class DivPlatformZXBeeperQT: public DivDispatch {
|
||||
class DivPlatformZXBeeperQuadTone: public DivDispatch {
|
||||
struct Channel: public SharedChannel<unsigned char> {
|
||||
unsigned short sPosition;
|
||||
unsigned char duty;
|
||||
|
@ -65,7 +65,7 @@ class DivPlatformZXBeeperQT: public DivDispatch {
|
|||
const char** getRegisterSheet();
|
||||
int init(DivEngine* parent, int channels, int sugRate, const DivConfig& flags);
|
||||
void quit();
|
||||
~DivPlatformZXBeeperQT();
|
||||
~DivPlatformZXBeeperQuadTone();
|
||||
private:
|
||||
void writeOutVol(int ch);
|
||||
};
|
|
@ -83,7 +83,7 @@ enum DivSystem {
|
|||
DIV_SYSTEM_VRC7,
|
||||
DIV_SYSTEM_YM2610B,
|
||||
DIV_SYSTEM_SFX_BEEPER,
|
||||
DIV_SYSTEM_SFX_BEEPER_QT,
|
||||
DIV_SYSTEM_SFX_BEEPER_QUADTONE,
|
||||
DIV_SYSTEM_YM2612_EXT,
|
||||
DIV_SYSTEM_SCC,
|
||||
DIV_SYSTEM_OPL_DRUMS,
|
||||
|
|
|
@ -1833,8 +1833,8 @@ void DivEngine::registerSystems() {
|
|||
namcoEffectHandlerMap
|
||||
);
|
||||
|
||||
sysDefs[DIV_SYSTEM_SFX_BEEPER_QT]=new DivSysDef(
|
||||
"ZX Spectrum Beeper (QuadTone Engine)", NULL, 0xfe, 0, 5, false, true, 0, false, 1U<<DIV_SAMPLE_DEPTH_8BIT,
|
||||
sysDefs[DIV_SYSTEM_SFX_BEEPER_QUADTONE]=new DivSysDef(
|
||||
"ZX Spectrum Beeper (QuadTone Engine)", NULL, 0xca, 0, 5, false, true, 0, false, 1U<<DIV_SAMPLE_DEPTH_8BIT,
|
||||
"Another ZX Spectrum beeper system with full PWM pulses and 3-level volume per channel. It also has a pitchable overlay sample channel.",
|
||||
{"Channel 1", "Channel 2", "Channel 3", "Channel 4", "PCM"},
|
||||
{"CH1", "CH2", "CH3", "CH4", "PCM"},
|
||||
|
|
|
@ -950,7 +950,7 @@ const int availableSystems[]={
|
|||
DIV_SYSTEM_PCSPKR,
|
||||
DIV_SYSTEM_POKEMINI,
|
||||
DIV_SYSTEM_SFX_BEEPER,
|
||||
DIV_SYSTEM_SFX_BEEPER_QT,
|
||||
DIV_SYSTEM_SFX_BEEPER_QUADTONE,
|
||||
DIV_SYSTEM_YMU759,
|
||||
DIV_SYSTEM_DUMMY,
|
||||
DIV_SYSTEM_SOUND_UNIT,
|
||||
|
@ -1078,7 +1078,7 @@ const int chipsSpecial[]={
|
|||
DIV_SYSTEM_C64_8580,
|
||||
DIV_SYSTEM_C64_6581,
|
||||
DIV_SYSTEM_SFX_BEEPER,
|
||||
DIV_SYSTEM_SFX_BEEPER_QT,
|
||||
DIV_SYSTEM_SFX_BEEPER_QUADTONE,
|
||||
DIV_SYSTEM_DUMMY,
|
||||
DIV_SYSTEM_SOUND_UNIT,
|
||||
DIV_SYSTEM_TIA,
|
||||
|
|
Loading…
Reference in a new issue