parent
b9832abbeb
commit
853ade2416
|
@ -1416,13 +1416,13 @@ const char* DivEngine::getEffectDesc(unsigned char effect, int chan) {
|
|||
case 0x03:
|
||||
return "03xx: Portamento";
|
||||
case 0x04:
|
||||
return "04xy: Vibrato";
|
||||
return "04xy: Vibrato (x: speed; y: depth)";
|
||||
case 0x08:
|
||||
return "08xy: Set panning";
|
||||
return "08xy: Set panning (x: left; y: right)";
|
||||
case 0x09:
|
||||
return "09xx: Set speed 1";
|
||||
case 0x0a:
|
||||
return "0Axy: Volume slide";
|
||||
return "0Axy: Volume slide (0y: down; x0: up)";
|
||||
case 0x0b:
|
||||
return "0Bxx: Jump to pattern";
|
||||
case 0x0c:
|
||||
|
@ -1431,18 +1431,20 @@ const char* DivEngine::getEffectDesc(unsigned char effect, int chan) {
|
|||
return "0Dxx: Jump to next pattern";
|
||||
case 0x0f:
|
||||
return "0Fxx: Set speed 2";
|
||||
case 0xc0: case 0xc1: case 0xc2: case 0xc3:
|
||||
return "Cxxx: Set tick rate";
|
||||
case 0xe0:
|
||||
return "E0xx: Set arp speed";
|
||||
case 0xe1:
|
||||
return "E1xy: Note slide up";
|
||||
return "E1xy: Note slide up (x: speed; y: semitones)";
|
||||
case 0xe2:
|
||||
return "E2xy: Note slide down";
|
||||
return "E2xy: Note slide down (x: speed; y: semitones)";
|
||||
case 0xe3:
|
||||
return "E3xx: Set vibrato shape";
|
||||
return "E3xx: Set vibrato shape (0: up/down; 1: up only; 2: down only)";
|
||||
case 0xe4:
|
||||
return "E4xx: Set vibrato range";
|
||||
case 0xe5:
|
||||
return "E5xx: Set pitch";
|
||||
return "E5xx: Set pitch (80: center)";
|
||||
case 0xea:
|
||||
return "EAxx: Legato";
|
||||
case 0xeb:
|
||||
|
@ -1454,9 +1456,9 @@ const char* DivEngine::getEffectDesc(unsigned char effect, int chan) {
|
|||
case 0xee:
|
||||
return "EExx: Send external command";
|
||||
case 0xef:
|
||||
return "EFxx: Set global tuning";
|
||||
return "EFxx: Set global tuning (quirky!)";
|
||||
case 0xff:
|
||||
return "FFxx: Stop song";
|
||||
return "FFxx: Stop song (not implemented yet)";
|
||||
default:
|
||||
if (chan>=0 && chan<chans) {
|
||||
const char* ret=disCont[dispatchOfChan[chan]].dispatch->getEffectName(effect);
|
||||
|
|
|
@ -80,6 +80,63 @@ const char** DivPlatformArcade::getRegisterSheet() {
|
|||
return regCheatSheetOPM;
|
||||
}
|
||||
|
||||
const char* DivPlatformArcade::getEffectName(unsigned char effect) {
|
||||
switch (effect) {
|
||||
case 0x10:
|
||||
return "10xx: Set noise frequency (xx: value; 0 disables noise)";
|
||||
break;
|
||||
case 0x11:
|
||||
return "11xx: Set feedback (0 to 7)";
|
||||
break;
|
||||
case 0x12:
|
||||
return "12xx: Set level of operator 1 (0 highest, 7F lowest)";
|
||||
break;
|
||||
case 0x13:
|
||||
return "13xx: Set level of operator 2 (0 highest, 7F lowest)";
|
||||
break;
|
||||
case 0x14:
|
||||
return "14xx: Set level of operator 3 (0 highest, 7F lowest)";
|
||||
break;
|
||||
case 0x15:
|
||||
return "15xx: Set level of operator 4 (0 highest, 7F lowest)";
|
||||
break;
|
||||
case 0x16:
|
||||
return "16xy: Set operator multiplier (x: operator from 1 to 4; y: multiplier)";
|
||||
break;
|
||||
case 0x17:
|
||||
return "17xx: Set LFO speed";
|
||||
break;
|
||||
case 0x18:
|
||||
return "18xx: Set LFO waveform (0 saw, 1 square, 2 triangle, 3 noise)";
|
||||
break;
|
||||
case 0x19:
|
||||
return "19xx: Set attack of all operators (0 to 1F)";
|
||||
break;
|
||||
case 0x1a:
|
||||
return "1Axx: Set attack of operator 1 (0 to 1F)";
|
||||
break;
|
||||
case 0x1b:
|
||||
return "1Bxx: Set attack of operator 2 (0 to 1F)";
|
||||
break;
|
||||
case 0x1c:
|
||||
return "1Cxx: Set attack of operator 3 (0 to 1F)";
|
||||
break;
|
||||
case 0x1d:
|
||||
return "1Dxx: Set attack of operator 4 (0 to 1F)";
|
||||
break;
|
||||
case 0x1e:
|
||||
return "1Exx: Set AM depth (0 to 7F)";
|
||||
break;
|
||||
case 0x1f:
|
||||
return "1Fxx: Set PM depth (0 to 7F)";
|
||||
break;
|
||||
case 0x20:
|
||||
return "20xx: Set PCM frequency";
|
||||
break;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void DivPlatformArcade::acquire_nuked(short* bufL, short* bufR, size_t start, size_t len) {
|
||||
static int o[2];
|
||||
|
||||
|
|
|
@ -101,6 +101,7 @@ class DivPlatformArcade: public DivDispatch {
|
|||
void poke(unsigned int addr, unsigned short val);
|
||||
void poke(std::vector<DivRegWrite>& wlist);
|
||||
const char** getRegisterSheet();
|
||||
const char* getEffectName(unsigned char effect);
|
||||
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||
void quit();
|
||||
~DivPlatformArcade();
|
||||
|
|
|
@ -52,6 +52,36 @@ const char** DivPlatformAY8910::getRegisterSheet() {
|
|||
return regCheatSheetAY;
|
||||
}
|
||||
|
||||
const char* DivPlatformAY8910::getEffectName(unsigned char effect) {
|
||||
switch (effect) {
|
||||
case 0x20:
|
||||
return "20xx: Set channel mode (bit 0: square; bit 1: noise; bit 2: envelope)";
|
||||
break;
|
||||
case 0x21:
|
||||
return "21xx: Set noise frequency (0 to 1F)";
|
||||
break;
|
||||
case 0x22:
|
||||
return "22xy: Set envelope mode (x: shape, y: enable for this channel)";
|
||||
break;
|
||||
case 0x23:
|
||||
return "23xx: Set envelope period low byte";
|
||||
break;
|
||||
case 0x24:
|
||||
return "24xx: Set envelope period high byte";
|
||||
break;
|
||||
case 0x25:
|
||||
return "25xx: Envelope slide up";
|
||||
break;
|
||||
case 0x26:
|
||||
return "26xx: Envelope slide down";
|
||||
break;
|
||||
case 0x29:
|
||||
return "29xy: Set auto-envelope (x: numerator; y: denominator)";
|
||||
break;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void DivPlatformAY8910::acquire(short* bufL, short* bufR, size_t start, size_t len) {
|
||||
if (ayBufLen<len) {
|
||||
ayBufLen=len;
|
||||
|
|
|
@ -87,6 +87,7 @@ class DivPlatformAY8910: public DivDispatch {
|
|||
void poke(unsigned int addr, unsigned short val);
|
||||
void poke(std::vector<DivRegWrite>& wlist);
|
||||
const char** getRegisterSheet();
|
||||
const char* getEffectName(unsigned char effect);
|
||||
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||
void quit();
|
||||
};
|
||||
|
|
|
@ -64,6 +64,45 @@ const char** DivPlatformAY8930::getRegisterSheet() {
|
|||
return regCheatSheetAY8930;
|
||||
}
|
||||
|
||||
const char* DivPlatformAY8930::getEffectName(unsigned char effect) {
|
||||
switch (effect) {
|
||||
case 0x12:
|
||||
return "12xx: Set duty cycle (0 to 8)";
|
||||
break;
|
||||
case 0x20:
|
||||
return "20xx: Set channel mode (bit 0: square; bit 1: noise; bit 2: envelope)";
|
||||
break;
|
||||
case 0x21:
|
||||
return "21xx: Set noise frequency (0 to 1F)";
|
||||
break;
|
||||
case 0x22:
|
||||
return "22xy: Set envelope mode (x: shape, y: enable for this channel)";
|
||||
break;
|
||||
case 0x23:
|
||||
return "23xx: Set envelope period low byte";
|
||||
break;
|
||||
case 0x24:
|
||||
return "24xx: Set envelope period high byte";
|
||||
break;
|
||||
case 0x25:
|
||||
return "25xx: Envelope slide up";
|
||||
break;
|
||||
case 0x26:
|
||||
return "26xx: Envelope slide down";
|
||||
break;
|
||||
case 0x27:
|
||||
return "27xx: Set noise AND mask";
|
||||
break;
|
||||
case 0x28:
|
||||
return "28xx: Set noise OR mask";
|
||||
break;
|
||||
case 0x29:
|
||||
return "29xy: Set auto-envelope (x: numerator; y: denominator)";
|
||||
break;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void DivPlatformAY8930::acquire(short* bufL, short* bufR, size_t start, size_t len) {
|
||||
if (ayBufLen<len) {
|
||||
ayBufLen=len;
|
||||
|
|
|
@ -80,6 +80,7 @@ class DivPlatformAY8930: public DivDispatch {
|
|||
void poke(unsigned int addr, unsigned short val);
|
||||
void poke(std::vector<DivRegWrite>& wlist);
|
||||
const char** getRegisterSheet();
|
||||
const char* getEffectName(unsigned char effect);
|
||||
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||
void quit();
|
||||
};
|
||||
|
|
|
@ -62,6 +62,52 @@ const char** DivPlatformC64::getRegisterSheet() {
|
|||
return regCheatSheetSID;
|
||||
}
|
||||
|
||||
const char* DivPlatformC64::getEffectName(unsigned char effect) {
|
||||
switch (effect) {
|
||||
case 0x10:
|
||||
return "10xx: Set waveform (bit 0: triangle; bit 1: saw; bit 2: pulse; bit 3: noise)";
|
||||
break;
|
||||
case 0x11:
|
||||
return "11xx: Set coarse cutoff (not recommended; use 4xxx instead)";
|
||||
break;
|
||||
case 0x12:
|
||||
return "12xx: Set coarse pulse width (not recommended; use 3xxx instead)";
|
||||
break;
|
||||
case 0x13:
|
||||
return "13xx: Set resonance (0 to F)";
|
||||
break;
|
||||
case 0x14:
|
||||
return "14xx: Set filter mode (bit 0: low pass; bit 1: band pass; bit 2: high pass)";
|
||||
break;
|
||||
case 0x15:
|
||||
return "15xx: Set envelope reset time";
|
||||
break;
|
||||
case 0x1a:
|
||||
return "1Axx: Disable envelope reset for this channel (1 disables; 0 enables)";
|
||||
break;
|
||||
case 0x1b:
|
||||
return "1Bxy: Reset cutoff (x: on new note; y: now)";
|
||||
break;
|
||||
case 0x1c:
|
||||
return "1Cxy: Reset pulse width (x: on new note; y: now)";
|
||||
break;
|
||||
case 0x1e:
|
||||
return "1Exy: Change additional parameters";
|
||||
break;
|
||||
case 0x30: case 0x31: case 0x32: case 0x33:
|
||||
case 0x34: case 0x35: case 0x36: case 0x37:
|
||||
case 0x38: case 0x39: case 0x3a: case 0x3b:
|
||||
case 0x3c: case 0x3d: case 0x3e: case 0x3f:
|
||||
return "3xxx: Set pulse width (0 to FFF)";
|
||||
break;
|
||||
case 0x40: case 0x41: case 0x42: case 0x43:
|
||||
case 0x44: case 0x45: case 0x46: case 0x47:
|
||||
return "4xxx: Set cutoff (0 to 7FF)";
|
||||
break;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void DivPlatformC64::acquire(short* bufL, short* bufR, size_t start, size_t len) {
|
||||
for (size_t i=start; i<start+len; i++) {
|
||||
sid.clock();
|
||||
|
|
|
@ -88,6 +88,7 @@ class DivPlatformC64: public DivDispatch {
|
|||
void poke(unsigned int addr, unsigned short val);
|
||||
void poke(std::vector<DivRegWrite>& wlist);
|
||||
const char** getRegisterSheet();
|
||||
const char* getEffectName(unsigned char effect);
|
||||
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||
void setChipModel(bool is6581);
|
||||
void quit();
|
||||
|
|
|
@ -61,6 +61,27 @@ const char** DivPlatformGB::getRegisterSheet() {
|
|||
return regCheatSheetGB;
|
||||
}
|
||||
|
||||
const char* DivPlatformGB::getEffectName(unsigned char effect) {
|
||||
switch (effect) {
|
||||
case 0x10:
|
||||
return "10xx: Change waveform";
|
||||
break;
|
||||
case 0x11:
|
||||
return "11xx: Set noise length (0: long; 1: short)";
|
||||
break;
|
||||
case 0x12:
|
||||
return "12xx: Set duty cycle (0 to 3)";
|
||||
break;
|
||||
case 0x13:
|
||||
return "13xy: Setup sweep (x: time; y: shift)";
|
||||
break;
|
||||
case 0x14:
|
||||
return "14xx: Set sweep direction (0: up; 1: down)";
|
||||
break;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void DivPlatformGB::acquire(short* bufL, short* bufR, size_t start, size_t len) {
|
||||
for (size_t i=start; i<start+len; i++) {
|
||||
GB_advance_cycles(gb,16);
|
||||
|
|
|
@ -73,6 +73,7 @@ class DivPlatformGB: public DivDispatch {
|
|||
void poke(unsigned int addr, unsigned short val);
|
||||
void poke(std::vector<DivRegWrite>& wlist);
|
||||
const char** getRegisterSheet();
|
||||
const char* getEffectName(unsigned char effect);
|
||||
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||
void quit();
|
||||
~DivPlatformGB();
|
||||
|
|
|
@ -30,6 +30,57 @@ static unsigned char konOffs[6]={
|
|||
|
||||
#define CHIP_FREQBASE 9440540
|
||||
|
||||
const char* DivPlatformGenesis::getEffectName(unsigned char effect) {
|
||||
switch (effect) {
|
||||
case 0x10:
|
||||
return "10xy: Setup LFO (x: enable; y: speed)";
|
||||
break;
|
||||
case 0x11:
|
||||
return "11xx: Set feedback (0 to 7)";
|
||||
break;
|
||||
case 0x12:
|
||||
return "12xx: Set level of operator 1 (0 highest, 7F lowest)";
|
||||
break;
|
||||
case 0x13:
|
||||
return "13xx: Set level of operator 2 (0 highest, 7F lowest)";
|
||||
break;
|
||||
case 0x14:
|
||||
return "14xx: Set level of operator 3 (0 highest, 7F lowest)";
|
||||
break;
|
||||
case 0x15:
|
||||
return "15xx: Set level of operator 4 (0 highest, 7F lowest)";
|
||||
break;
|
||||
case 0x16:
|
||||
return "16xy: Set operator multiplier (x: operator from 1 to 4; y: multiplier)";
|
||||
break;
|
||||
case 0x17:
|
||||
return "17xx: Enable channel 6 DAC";
|
||||
break;
|
||||
case 0x18:
|
||||
return "18xx: Toggle extended channel 3 mode";
|
||||
break;
|
||||
case 0x19:
|
||||
return "19xx: Set attack of all operators (0 to 1F)";
|
||||
break;
|
||||
case 0x1a:
|
||||
return "1Axx: Set attack of operator 1 (0 to 1F)";
|
||||
break;
|
||||
case 0x1b:
|
||||
return "1Bxx: Set attack of operator 2 (0 to 1F)";
|
||||
break;
|
||||
case 0x1c:
|
||||
return "1Cxx: Set attack of operator 3 (0 to 1F)";
|
||||
break;
|
||||
case 0x1d:
|
||||
return "1Dxx: Set attack of operator 4 (0 to 1F)";
|
||||
break;
|
||||
case 0x20:
|
||||
return "20xy: Set PSG noise mode (x: preset freq/ch3 freq; y: thin pulse/noise)";
|
||||
break;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void DivPlatformGenesis::acquire_nuked(short* bufL, short* bufR, size_t start, size_t len) {
|
||||
static short o[2];
|
||||
static int os[2];
|
||||
|
|
|
@ -121,6 +121,7 @@ class DivPlatformGenesis: public DivDispatch {
|
|||
int getPortaFloor(int ch);
|
||||
void poke(unsigned int addr, unsigned short val);
|
||||
void poke(std::vector<DivRegWrite>& wlist);
|
||||
const char* getEffectName(unsigned char effect);
|
||||
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||
void quit();
|
||||
~DivPlatformGenesis();
|
||||
|
|
|
@ -55,6 +55,21 @@ const char** DivPlatformNES::getRegisterSheet() {
|
|||
return regCheatSheetNES;
|
||||
}
|
||||
|
||||
const char* DivPlatformNES::getEffectName(unsigned char effect) {
|
||||
switch (effect) {
|
||||
case 0x12:
|
||||
return "12xx: Set duty cycle/noise mode (pulse: 0 to 3; noise: 0 or 1)";
|
||||
break;
|
||||
case 0x13:
|
||||
return "13xy: Sweep up (x: time; y: shift)";
|
||||
break;
|
||||
case 0x14:
|
||||
return "14xy: Sweep down (x: time; y: shift)";
|
||||
break;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void DivPlatformNES::acquire(short* bufL, short* bufR, size_t start, size_t len) {
|
||||
for (size_t i=start; i<start+len; i++) {
|
||||
if (dacSample!=-1) {
|
||||
|
|
|
@ -76,6 +76,7 @@ class DivPlatformNES: public DivDispatch {
|
|||
void poke(unsigned int addr, unsigned short val);
|
||||
void poke(std::vector<DivRegWrite>& wlist);
|
||||
const char** getRegisterSheet();
|
||||
const char* getEffectName(unsigned char effect);
|
||||
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||
void quit();
|
||||
~DivPlatformNES();
|
||||
|
|
|
@ -52,6 +52,27 @@ const char** DivPlatformPCE::getRegisterSheet() {
|
|||
return regCheatSheetPCE;
|
||||
}
|
||||
|
||||
const char* DivPlatformPCE::getEffectName(unsigned char effect) {
|
||||
switch (effect) {
|
||||
case 0x10:
|
||||
return "10xx: Change waveform";
|
||||
break;
|
||||
case 0x11:
|
||||
return "11xx: Toggle noise mode";
|
||||
break;
|
||||
case 0x12:
|
||||
return "12xx: Setup LFO (0: disabled; 1: 1x depth; 2: 16x depth; 3: 256x depth)";
|
||||
break;
|
||||
case 0x13:
|
||||
return "13xx: Set LFO speed";
|
||||
break;
|
||||
case 0x17:
|
||||
return "17xx: Toggle PCM mode";
|
||||
break;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void DivPlatformPCE::acquire(short* bufL, short* bufR, size_t start, size_t len) {
|
||||
for (size_t h=start; h<start+len; h++) {
|
||||
// PCM part
|
||||
|
|
|
@ -92,6 +92,7 @@ class DivPlatformPCE: public DivDispatch {
|
|||
void poke(unsigned int addr, unsigned short val);
|
||||
void poke(std::vector<DivRegWrite>& wlist);
|
||||
const char** getRegisterSheet();
|
||||
const char* getEffectName(unsigned char effect);
|
||||
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||
void quit();
|
||||
~DivPlatformPCE();
|
||||
|
|
|
@ -56,6 +56,21 @@ const char** DivPlatformSAA1099::getRegisterSheet() {
|
|||
return regCheatSheetSAA;
|
||||
}
|
||||
|
||||
const char* DivPlatformSAA1099::getEffectName(unsigned char effect) {
|
||||
switch (effect) {
|
||||
case 0x10:
|
||||
return "10xy: Set channel mode (x: noise; y: tone)";
|
||||
break;
|
||||
case 0x11:
|
||||
return "11xx: Set noise frequency";
|
||||
break;
|
||||
case 0x12:
|
||||
return "12xx: Setup envelope (refer to docs for more information)";
|
||||
break;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void DivPlatformSAA1099::acquire_mame(short* bufL, short* bufR, size_t start, size_t len) {
|
||||
if (saaBufLen<len) {
|
||||
saaBufLen=len;
|
||||
|
@ -425,8 +440,6 @@ void DivPlatformSAA1099::setFlags(unsigned int flags) {
|
|||
case DIV_SAA_CORE_SAASOUND:
|
||||
saa_saaSound->SetClockRate(chipClock);
|
||||
saa_saaSound->SetSampleRate(rate);
|
||||
|
||||
printf("rate: %ld bytes %d params %lx\n",saa_saaSound->GetCurrentSampleRate(),saa_saaSound->GetCurrentBytesPerSample(),saa_saaSound->GetCurrentSoundParameters());
|
||||
break;
|
||||
case DIV_SAA_CORE_E:
|
||||
break;
|
||||
|
|
|
@ -98,6 +98,7 @@ class DivPlatformSAA1099: public DivDispatch {
|
|||
void poke(unsigned int addr, unsigned short val);
|
||||
void poke(std::vector<DivRegWrite>& wlist);
|
||||
const char** getRegisterSheet();
|
||||
const char* getEffectName(unsigned char effect);
|
||||
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||
void quit();
|
||||
};
|
||||
|
|
|
@ -34,6 +34,15 @@ const char** DivPlatformSMS::getRegisterSheet() {
|
|||
return regCheatSheetSN;
|
||||
}
|
||||
|
||||
const char* DivPlatformSMS::getEffectName(unsigned char effect) {
|
||||
switch (effect) {
|
||||
case 0x20:
|
||||
return "20xy: Set noise mode (x: preset freq/ch3 freq; y: thin pulse/noise)";
|
||||
break;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void DivPlatformSMS::acquire(short* bufL, short* bufR, size_t start, size_t len) {
|
||||
sn->sound_stream_update(bufL+start,len);
|
||||
}
|
||||
|
|
|
@ -73,6 +73,7 @@ class DivPlatformSMS: public DivDispatch {
|
|||
void poke(unsigned int addr, unsigned short val);
|
||||
void poke(std::vector<DivRegWrite>& wlist);
|
||||
const char** getRegisterSheet();
|
||||
const char* getEffectName(unsigned char effect);
|
||||
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||
void quit();
|
||||
~DivPlatformSMS();
|
||||
|
|
|
@ -34,6 +34,15 @@ const char* regCheatSheetTIA[]={
|
|||
NULL
|
||||
};
|
||||
|
||||
const char* DivPlatformTIA::getEffectName(unsigned char effect) {
|
||||
switch (effect) {
|
||||
case 0x10:
|
||||
return "10xx: Select shape (0 to F)";
|
||||
break;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const char** DivPlatformTIA::getRegisterSheet() {
|
||||
return regCheatSheetTIA;
|
||||
}
|
||||
|
|
|
@ -57,6 +57,7 @@ class DivPlatformTIA: public DivDispatch {
|
|||
void poke(unsigned int addr, unsigned short val);
|
||||
void poke(std::vector<DivRegWrite>& wlist);
|
||||
const char** getRegisterSheet();
|
||||
const char* getEffectName(unsigned char effect);
|
||||
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||
void quit();
|
||||
};
|
||||
|
|
|
@ -32,6 +32,75 @@ static unsigned char konOffs[4]={
|
|||
|
||||
#define CHIP_DIVIDER 32
|
||||
|
||||
const char* DivPlatformYM2610::getEffectName(unsigned char effect) {
|
||||
switch (effect) {
|
||||
case 0x10:
|
||||
return "10xy: Setup LFO (x: enable; y: speed)";
|
||||
break;
|
||||
case 0x11:
|
||||
return "11xx: Set feedback (0 to 7)";
|
||||
break;
|
||||
case 0x12:
|
||||
return "12xx: Set level of operator 1 (0 highest, 7F lowest)";
|
||||
break;
|
||||
case 0x13:
|
||||
return "13xx: Set level of operator 2 (0 highest, 7F lowest)";
|
||||
break;
|
||||
case 0x14:
|
||||
return "14xx: Set level of operator 3 (0 highest, 7F lowest)";
|
||||
break;
|
||||
case 0x15:
|
||||
return "15xx: Set level of operator 4 (0 highest, 7F lowest)";
|
||||
break;
|
||||
case 0x16:
|
||||
return "16xy: Set operator multiplier (x: operator from 1 to 4; y: multiplier)";
|
||||
break;
|
||||
case 0x18:
|
||||
return "18xx: Toggle extended channel 3 mode";
|
||||
break;
|
||||
case 0x19:
|
||||
return "19xx: Set attack of all operators (0 to 1F)";
|
||||
break;
|
||||
case 0x1a:
|
||||
return "1Axx: Set attack of operator 1 (0 to 1F)";
|
||||
break;
|
||||
case 0x1b:
|
||||
return "1Bxx: Set attack of operator 2 (0 to 1F)";
|
||||
break;
|
||||
case 0x1c:
|
||||
return "1Cxx: Set attack of operator 3 (0 to 1F)";
|
||||
break;
|
||||
case 0x1d:
|
||||
return "1Dxx: Set attack of operator 4 (0 to 1F)";
|
||||
break;
|
||||
case 0x20:
|
||||
return "20xx: Set SSG channel mode (bit 0: square; bit 1: noise; bit 2: envelope)";
|
||||
break;
|
||||
case 0x21:
|
||||
return "21xx: Set SSG noise frequency (0 to 1F)";
|
||||
break;
|
||||
case 0x22:
|
||||
return "22xy: Set SSG envelope mode (x: shape, y: enable for this channel)";
|
||||
break;
|
||||
case 0x23:
|
||||
return "23xx: Set SSG envelope period low byte";
|
||||
break;
|
||||
case 0x24:
|
||||
return "24xx: Set SSG envelope period high byte";
|
||||
break;
|
||||
case 0x25:
|
||||
return "25xx: SSG envelope slide up";
|
||||
break;
|
||||
case 0x26:
|
||||
return "26xx: SSG envelope slide down";
|
||||
break;
|
||||
case 0x29:
|
||||
return "29xy: Set SSG auto-envelope (x: numerator; y: denominator)";
|
||||
break;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void DivPlatformYM2610::acquire(short* bufL, short* bufR, size_t start, size_t len) {
|
||||
static int os[2];
|
||||
|
||||
|
|
|
@ -98,6 +98,7 @@ class DivPlatformYM2610: public DivDispatch {
|
|||
void notifyInsDeletion(void* ins);
|
||||
void poke(unsigned int addr, unsigned short val);
|
||||
void poke(std::vector<DivRegWrite>& wlist);
|
||||
const char* getEffectName(unsigned char effect);
|
||||
int init(DivEngine* parent, int channels, int sugRate, unsigned int flags);
|
||||
void quit();
|
||||
~DivPlatformYM2610();
|
||||
|
|
|
@ -3921,6 +3921,20 @@ void FurnaceGUI::drawSettings() {
|
|||
|
||||
ImGui::Separator();
|
||||
|
||||
ImGui::Text("Status bar:");
|
||||
if (ImGui::RadioButton("Cursor details##sbar0",settings.statusDisplay==0)) {
|
||||
settings.statusDisplay=0;
|
||||
}
|
||||
if (ImGui::RadioButton("File path##sbar1",settings.statusDisplay==1)) {
|
||||
settings.statusDisplay=1;
|
||||
}
|
||||
if (ImGui::RadioButton("Cursor details or file path##sbar2",settings.statusDisplay==2)) {
|
||||
settings.statusDisplay=2;
|
||||
}
|
||||
if (ImGui::RadioButton("Nothing##sbar3",settings.statusDisplay==3)) {
|
||||
settings.statusDisplay=3;
|
||||
}
|
||||
|
||||
ImGui::Text("Play/edit controls layout:");
|
||||
if (ImGui::RadioButton("Classic##ecl0",settings.controlLayout==0)) {
|
||||
settings.controlLayout=0;
|
||||
|
@ -4300,6 +4314,7 @@ void FurnaceGUI::syncSettings() {
|
|||
settings.forceMono=e->getConfInt("forceMono",0);
|
||||
settings.controlLayout=e->getConfInt("controlLayout",0);
|
||||
settings.restartOnFlagChange=e->getConfInt("restartOnFlagChange",1);
|
||||
settings.statusDisplay=e->getConfInt("statusDisplay",0);
|
||||
|
||||
// keybinds
|
||||
LOAD_KEYBIND(GUI_ACTION_OPEN,FURKMOD_CMD|SDLK_o);
|
||||
|
@ -4489,6 +4504,7 @@ void FurnaceGUI::commitSettings() {
|
|||
e->setConf("forceMono",settings.forceMono);
|
||||
e->setConf("controlLayout",settings.controlLayout);
|
||||
e->setConf("restartOnFlagChange",settings.restartOnFlagChange);
|
||||
e->setConf("statusDisplay",settings.statusDisplay);
|
||||
|
||||
PUT_UI_COLOR(GUI_COLOR_BACKGROUND);
|
||||
PUT_UI_COLOR(GUI_COLOR_FRAME_BACKGROUND);
|
||||
|
@ -7748,7 +7764,61 @@ bool FurnaceGUI::loop() {
|
|||
int totalSeconds=e->getTotalSeconds();
|
||||
ImGui::Text("| Speed %d:%d @ %dHz | Order %d/%d | Row %d/%d | %d:%.2d:%.2d.%.2d",e->getSpeed1(),e->getSpeed2(),e->getCurHz(),e->getOrder(),e->song.ordersLen,e->getRow(),e->song.patLen,totalSeconds/3600,(totalSeconds/60)%60,totalSeconds%60,totalTicks/10000);
|
||||
} else {
|
||||
if (curFileName!="") ImGui::Text("| %s",curFileName.c_str());
|
||||
bool hasInfo=false;
|
||||
String info;
|
||||
if (cursor.xCoarse>=0 && cursor.xCoarse<e->getTotalChannelCount()) {
|
||||
DivPattern* p=e->song.pat[cursor.xCoarse].getPattern(e->song.orders.ord[cursor.xCoarse][e->getOrder()],false);
|
||||
if (cursor.xFine>=0) switch (cursor.xFine) {
|
||||
case 0: // note
|
||||
if (p->data[cursor.y][0]>0) {
|
||||
if (p->data[cursor.y][0]==100) {
|
||||
info=fmt::sprintf("Note off (cut)");
|
||||
} else if (p->data[cursor.y][0]==101) {
|
||||
info=fmt::sprintf("Note off (release)");
|
||||
} else if (p->data[cursor.y][0]==102) {
|
||||
info=fmt::sprintf("Macro release only");
|
||||
} else {
|
||||
info=fmt::sprintf("Note on: %s",noteName(p->data[cursor.y][0],p->data[cursor.y][1]));
|
||||
}
|
||||
hasInfo=true;
|
||||
}
|
||||
break;
|
||||
case 1: // instrument
|
||||
if (p->data[cursor.y][2]>-1) {
|
||||
if (p->data[cursor.y][2]>=(int)e->song.ins.size()) {
|
||||
info=fmt::sprintf("Ins %d: <invalid>",p->data[cursor.y][2]);
|
||||
} else {
|
||||
DivInstrument* ins=e->getIns(p->data[cursor.y][2]);
|
||||
info=fmt::sprintf("Ins %d: %s",p->data[cursor.y][2],ins->name);
|
||||
}
|
||||
hasInfo=true;
|
||||
}
|
||||
break;
|
||||
case 2: // volume
|
||||
if (p->data[cursor.y][3]>-1) {
|
||||
int maxVol=e->getMaxVolumeChan(cursor.xCoarse);
|
||||
if (maxVol<1 || p->data[cursor.y][3]>maxVol) {
|
||||
info=fmt::sprintf("Set volume: %d (%.2X, INVALID!)",p->data[cursor.y][3],p->data[cursor.y][3]);
|
||||
} else {
|
||||
info=fmt::sprintf("Set volume: %d (%.2X, %d%%)",p->data[cursor.y][3],p->data[cursor.y][3],(p->data[cursor.y][3]*100)/maxVol);
|
||||
}
|
||||
hasInfo=true;
|
||||
}
|
||||
break;
|
||||
default: // effect
|
||||
int actualCursor=((cursor.xFine+1)&(~1));
|
||||
if (p->data[cursor.y][actualCursor]>-1) {
|
||||
info=e->getEffectDesc(p->data[cursor.y][actualCursor],cursor.xCoarse);
|
||||
hasInfo=true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (hasInfo && (settings.statusDisplay==0 || settings.statusDisplay==2)) {
|
||||
ImGui::Text("| %s",info.c_str());
|
||||
} else if (settings.statusDisplay==1 || settings.statusDisplay==2) {
|
||||
if (curFileName!="") ImGui::Text("| %s",curFileName.c_str());
|
||||
}
|
||||
}
|
||||
ImGui::PopStyleColor();
|
||||
if (modified) {
|
||||
|
|
|
@ -425,6 +425,7 @@ class FurnaceGUI {
|
|||
int forceMono;
|
||||
int controlLayout;
|
||||
int restartOnFlagChange;
|
||||
int statusDisplay;
|
||||
unsigned int maxUndoSteps;
|
||||
String mainFontPath;
|
||||
String patFontPath;
|
||||
|
@ -462,6 +463,7 @@ class FurnaceGUI {
|
|||
forceMono(0),
|
||||
controlLayout(0),
|
||||
restartOnFlagChange(1),
|
||||
statusDisplay(0),
|
||||
maxUndoSteps(100),
|
||||
mainFontPath(""),
|
||||
patFontPath(""),
|
||||
|
|
Loading…
Reference in New Issue