mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-27 15:03:01 +00:00
arcade: even more work
PCM tonight
This commit is contained in:
parent
6dcc3416ee
commit
7ac225e839
4 changed files with 15 additions and 17 deletions
|
@ -20,6 +20,7 @@ enum DivDispatchCmds {
|
||||||
DIV_CMD_PRE_NOTE, // used in C64
|
DIV_CMD_PRE_NOTE, // used in C64
|
||||||
|
|
||||||
DIV_CMD_SAMPLE_MODE,
|
DIV_CMD_SAMPLE_MODE,
|
||||||
|
DIV_CMD_SAMPLE_FREQ,
|
||||||
|
|
||||||
DIV_CMD_FM_LFO,
|
DIV_CMD_FM_LFO,
|
||||||
DIV_CMD_FM_TL,
|
DIV_CMD_FM_TL,
|
||||||
|
|
|
@ -120,9 +120,9 @@ int DivPlatformArcade::dispatch(DivCommand c) {
|
||||||
}
|
}
|
||||||
if (chan[c.chan].insChanged) {
|
if (chan[c.chan].insChanged) {
|
||||||
rWrite(baseAddr+0x40,(op.mult&15)|(dtTable[op.dt&7]<<4));
|
rWrite(baseAddr+0x40,(op.mult&15)|(dtTable[op.dt&7]<<4));
|
||||||
rWrite(baseAddr+0x80,(op.ar&31));
|
rWrite(baseAddr+0x80,(op.ar&31)|(op.rs<<6));
|
||||||
rWrite(baseAddr+0xa0,(op.dr&31)|(op.am<<7));
|
rWrite(baseAddr+0xa0,(op.dr&31)|(op.am<<7));
|
||||||
rWrite(baseAddr+0xc0,op.d2r&31);
|
rWrite(baseAddr+0xc0,(op.d2r&31)|(op.dt2<<6));
|
||||||
rWrite(baseAddr+0xe0,(op.rr&15)|(op.sl<<4));
|
rWrite(baseAddr+0xe0,(op.rr&15)|(op.sl<<4));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -167,19 +167,7 @@ int DivPlatformArcade::dispatch(DivCommand c) {
|
||||||
chan[c.chan].ins=c.value;
|
chan[c.chan].ins=c.value;
|
||||||
break;
|
break;
|
||||||
case DIV_CMD_PANNING: {
|
case DIV_CMD_PANNING: {
|
||||||
switch (c.value) {
|
// TODO
|
||||||
case 0x01:
|
|
||||||
chan[c.chan].pan=1;
|
|
||||||
break;
|
|
||||||
case 0x10:
|
|
||||||
chan[c.chan].pan=2;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
chan[c.chan].pan=3;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
DivInstrument* ins=parent->getIns(chan[c.chan].ins);
|
|
||||||
//rWrite(chanOffs[c.chan]+0xb4,(chan[c.chan].pan<<6)|(ins->fm.fms&7)|((ins->fm.ams&3)<<4));
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DIV_CMD_PITCH: {
|
case DIV_CMD_PITCH: {
|
||||||
|
|
|
@ -13,8 +13,16 @@ class DivPlatformArcade: public DivDispatch {
|
||||||
signed char konCycles;
|
signed char konCycles;
|
||||||
bool active, insChanged, freqChanged, keyOn, keyOff, portaPause;
|
bool active, insChanged, freqChanged, keyOn, keyOff, portaPause;
|
||||||
int vol;
|
int vol;
|
||||||
unsigned char pan;
|
unsigned char chVolL, chVolR;
|
||||||
Channel(): freqH(0), freqL(0), freq(0), baseFreq(0), pitch(0), ins(-1), active(false), insChanged(true), freqChanged(false), keyOn(false), keyOff(false), portaPause(false), vol(0), pan(3) {}
|
|
||||||
|
struct PCMChannel {
|
||||||
|
int sample;
|
||||||
|
unsigned int pos; // <<8
|
||||||
|
unsigned short len;
|
||||||
|
unsigned char freq;
|
||||||
|
PCMChannel(): sample(-1), pos(0), len(0), freq(0) {}
|
||||||
|
} pcm;
|
||||||
|
Channel(): freqH(0), freqL(0), freq(0), baseFreq(0), pitch(0), ins(-1), active(false), insChanged(true), freqChanged(false), keyOn(false), keyOff(false), portaPause(false), vol(0), chVolL(8), chVolR(8) {}
|
||||||
};
|
};
|
||||||
Channel chan[13];
|
Channel chan[13];
|
||||||
struct QueuedWrite {
|
struct QueuedWrite {
|
||||||
|
|
|
@ -30,6 +30,7 @@ const char* cmdName[DIV_CMD_MAX]={
|
||||||
"PRE_NOTE",
|
"PRE_NOTE",
|
||||||
|
|
||||||
"SAMPLE_MODE",
|
"SAMPLE_MODE",
|
||||||
|
"SAMPLE_FREQ",
|
||||||
|
|
||||||
"FM_LFO",
|
"FM_LFO",
|
||||||
"FM_TL",
|
"FM_TL",
|
||||||
|
|
Loading…
Reference in a new issue