arp commands should have 1 byte arg
This commit is contained in:
parent
24cd378e50
commit
ad5fb97822
|
@ -70,7 +70,9 @@ hex | description
|
|||
c3 | vibrato range (b)
|
||||
c4 | vibrato shape (b)
|
||||
c5 | pitch (c)
|
||||
c6 | arpeggio (bb) // note1, note2
|
||||
c6 | arpeggio (X)
|
||||
| - bit 4-7: note 1
|
||||
| - bit 0-3: note 2
|
||||
c7 | volume (b)
|
||||
c8 | vol slide (s)
|
||||
c9 | porta (bb) // target, speed
|
||||
|
|
|
@ -229,13 +229,13 @@ bool DivCSPlayer::tick() {
|
|||
case DIV_CMD_HINT_VIBRATO_RANGE:
|
||||
case DIV_CMD_HINT_VIBRATO_SHAPE:
|
||||
case DIV_CMD_HINT_VOLUME:
|
||||
case DIV_CMD_HINT_ARPEGGIO:
|
||||
arg0=(unsigned char)stream.readC();
|
||||
break;
|
||||
case DIV_CMD_HINT_PITCH:
|
||||
arg0=(signed char)stream.readC();
|
||||
break;
|
||||
case DIV_CMD_HINT_VIBRATO:
|
||||
case DIV_CMD_HINT_ARPEGGIO:
|
||||
case DIV_CMD_HINT_PORTA:
|
||||
arg0=(signed char)stream.readC();
|
||||
arg1=(unsigned char)stream.readC();
|
||||
|
@ -515,7 +515,7 @@ bool DivCSPlayer::tick() {
|
|||
e->dispatchCmd(DivCommand(DIV_CMD_LEGATO,i,chan[i].note));
|
||||
break;
|
||||
case DIV_CMD_HINT_ARPEGGIO:
|
||||
chan[i].arp=(((unsigned char)arg0)<<4)|(arg1&15);
|
||||
chan[i].arp=(unsigned char)arg0;
|
||||
break;
|
||||
case DIV_CMD_HINT_ARP_TIME:
|
||||
arpSpeed=arg0;
|
||||
|
|
|
@ -237,13 +237,13 @@ int DivCS::getInsLength(unsigned char ins, unsigned char ext, unsigned char* spe
|
|||
case 0xc3: // vib range
|
||||
case 0xc4: // vib shape
|
||||
case 0xc5: // pitch
|
||||
case 0xc6: // arpeggio
|
||||
case 0xc7: // volume
|
||||
case 0xca: // legato
|
||||
case 0xfd: // waitc
|
||||
return 2;
|
||||
case 0xcf: // pan
|
||||
case 0xc2: // vibrato
|
||||
case 0xc6: // arpeggio
|
||||
case 0xc8: // vol slide
|
||||
case 0xc9: // porta
|
||||
return 3;
|
||||
|
@ -329,11 +329,11 @@ void writeCommandValues(SafeWriter* w, const DivCommand& c) {
|
|||
case DIV_CMD_HINT_TREMOLO:
|
||||
case DIV_CMD_HINT_PANBRELLO:
|
||||
case DIV_CMD_HINT_PAN_SLIDE:
|
||||
case DIV_CMD_HINT_ARPEGGIO:
|
||||
w->writeC(c.value);
|
||||
break;
|
||||
case DIV_CMD_HINT_PANNING:
|
||||
case DIV_CMD_HINT_VIBRATO:
|
||||
case DIV_CMD_HINT_ARPEGGIO:
|
||||
case DIV_CMD_HINT_PORTA:
|
||||
w->writeC(c.value);
|
||||
w->writeC(c.value2);
|
||||
|
|
|
@ -65,8 +65,8 @@ String disasmCmd(unsigned char* buf, size_t bufLen, unsigned int addr, unsigned
|
|||
return fmt::sprintf("pitch $%.2x",(int)buf[addr+1]);
|
||||
break;
|
||||
case 0xc6:
|
||||
if (addr+2>=bufLen) return "???";
|
||||
return fmt::sprintf("arp %d, %d",(int)buf[addr+1],(int)buf[addr+2]);
|
||||
if (addr+1>=bufLen) return "???";
|
||||
return fmt::sprintf("arp $%.2x",(int)buf[addr+1]);
|
||||
break;
|
||||
case 0xc7:
|
||||
if (addr+1>=bufLen) return "???";
|
||||
|
|
Loading…
Reference in a new issue