Merge branch 'master' of https://github.com/tildearrow/furnace into es5506_alt

* 'master' of https://github.com/tildearrow/furnace: (26 commits)
  prepare for #38
  NES: DPCM work!
  fix bug caused by new renderSamples approach
  NES: prepare for DPCM
  OPZ: more fixed frequency mode fixes
  OPZ: possibly fix fixed freq emulation
  OPZ: fix muting
  OPL: fix panning
  damn it
  per-channel oscilloscope, part 10
  NES: NSFPlay per-channel osc
  NES: NSFPlay muting
  NES: now fix tri_mute
  NES: finally
  fix typo in playback engine
  NES: wire up NSFplay
  now fix it damn it
  now move these files
  add readme
  convertir de Shift-JIS a UTF-8
  ...

# Conflicts:
#	src/engine/engine.cpp
#	src/engine/engine.h
#	src/engine/platform/nes.cpp
#	src/engine/vgmOps.cpp
#	src/gui/stats.cpp
This commit is contained in:
cam900 2022-05-03 11:07:50 +09:00
commit e136db6d7a
53 changed files with 3990 additions and 393 deletions

View file

@ -65,9 +65,24 @@ const char* cmdName[]={
"FM_LFO",
"FM_LFO_WAVE",
"FM_TL",
"FM_AM",
"FM_AR",
"FM_DR",
"FM_SL",
"FM_D2R",
"FM_RR",
"FM_DT",
"FM_DT2",
"FM_RS",
"FM_KSR",
"FM_VIB",
"FM_SUS",
"FM_WS",
"FM_SSG",
"FM_FB",
"FM_MULT",
"FM_FINE",
"FM_FIXFREQ",
"FM_EXTCH",
"FM_AM_DEPTH",
"FM_PM_DEPTH",
@ -156,6 +171,8 @@ const char* cmdName[]={
"ES5506_FILTER_MODE",
"ES5506_FILTER_K1",
"ES5506_FILTER_K2",
"ES5506_FILTER_K1_SLIDE",
"ES5506_FILTER_K2_SLIDE",
"ES5506_ENVELOPE_COUNT",
"ES5506_ENVELOPE_LVRAMP",
"ES5506_ENVELOPE_RVRAMP",
@ -339,6 +356,9 @@ bool DivEngine::perSystemEffect(int ch, unsigned char effect, unsigned char effe
case 0x14: // sweep down
dispatchCmd(DivCommand(DIV_CMD_NES_SWEEP,ch,1,effectVal));
break;
case 0x18: // DPCM mode
dispatchCmd(DivCommand(DIV_CMD_SAMPLE_MODE,ch,effectVal));
break;
default:
return false;
}
@ -557,6 +577,14 @@ bool DivEngine::perSystemEffect(int ch, unsigned char effect, unsigned char effe
case 0x27: // envelope K2RAMP
dispatchCmd(DivCommand(DIV_CMD_ES5506_ENVELOPE_K2RAMP,ch,effectVal,effect&0x01));
break;
case 0x28: // filter K1 slide up
case 0x29: // filter K1 slide down
dispatchCmd(DivCommand(DIV_CMD_ES5506_FILTER_K1_SLIDE,ch,effectVal,effect&0x01));
break;
case 0x2a: // filter K2 slide up
case 0x2b: // filter K2 slide down
dispatchCmd(DivCommand(DIV_CMD_ES5506_FILTER_K2_SLIDE,ch,effectVal,effect&0x01));
break;
default:
if ((effect&0xf0)==0x30) {
dispatchCmd(DivCommand(DIV_CMD_ES5506_FILTER_K1,ch,((effect&0x0f)<<8)|effectVal));
@ -1978,8 +2006,8 @@ void DivEngine::nextBuf(float** in, float** out, int inChans, int outChans, unsi
}
runtotal[i]=blip_clocks_needed(disCont[i].bb[0],size-lastAvail[i]);
if (runtotal[i]>disCont[i].bbInLen) {
delete disCont[i].bbIn[0];
delete disCont[i].bbIn[1];
delete[] disCont[i].bbIn[0];
delete[] disCont[i].bbIn[1];
disCont[i].bbIn[0]=new short[runtotal[i]+256];
disCont[i].bbIn[1]=new short[runtotal[i]+256];
disCont[i].bbInLen=runtotal[i]+256;