remove loop command from command stream
it is unused
This commit is contained in:
parent
334d4bab67
commit
134954412d
|
@ -99,7 +99,7 @@ hex | description
|
||||||
d0 | UNUSED - placeholder used during optimization passes (3-byte nonce follows)
|
d0 | UNUSED - placeholder used during optimization passes (3-byte nonce follows)
|
||||||
d1 | no operation
|
d1 | no operation
|
||||||
d2 | UNUSED
|
d2 | UNUSED
|
||||||
d3 | loop (negative offset and count follow... both are 8-bit)
|
d3 | UNUSED
|
||||||
d4 | UNUSED - call symbol (32-bit index follows; only used internally)
|
d4 | UNUSED - call symbol (32-bit index follows; only used internally)
|
||||||
d5 | call sub-block (32-bit address follows)
|
d5 | call sub-block (32-bit address follows)
|
||||||
d6 | note off + wait one tick
|
d6 | note off + wait one tick
|
||||||
|
|
|
@ -176,6 +176,23 @@ fcsNoOpOneByte:
|
||||||
jsr fcsReadNext
|
jsr fcsReadNext
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
fcsPan:
|
||||||
|
jsr fcsReadNext
|
||||||
|
sta chanPan,x
|
||||||
|
sta fcsArg0
|
||||||
|
jsr fcsReadNext
|
||||||
|
sta chanPan+1,x
|
||||||
|
sta fcsArg1
|
||||||
|
ldy #10
|
||||||
|
jsr fcsDispatchCmd
|
||||||
|
rts
|
||||||
|
|
||||||
|
fcsOptPlaceholder:
|
||||||
|
jsr fcsReadNext
|
||||||
|
jsr fcsReadNext
|
||||||
|
jsr fcsReadNext
|
||||||
|
rts
|
||||||
|
|
||||||
fcsNoOp:
|
fcsNoOp:
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
@ -211,7 +228,7 @@ fcsNoOp:
|
||||||
; $d0 fcsOptPlaceholder,
|
; $d0 fcsOptPlaceholder,
|
||||||
; $d1 fcsNoOp,
|
; $d1 fcsNoOp,
|
||||||
; $d2 fcsNoOp,
|
; $d2 fcsNoOp,
|
||||||
; $d3 fcsLoop,
|
; $d3 fcsNoOp,
|
||||||
; $d4 fcsNoOp,
|
; $d4 fcsNoOp,
|
||||||
; $d5 fcsCallI,
|
; $d5 fcsCallI,
|
||||||
; $d6 fcsOffWait,
|
; $d6 fcsOffWait,
|
||||||
|
|
|
@ -220,23 +220,6 @@ bool DivCSPlayer::tick() {
|
||||||
break;
|
break;
|
||||||
case 0xd1: // nop
|
case 0xd1: // nop
|
||||||
break;
|
break;
|
||||||
case 0xd3: { // loop
|
|
||||||
unsigned char loopOff=stream.readC();
|
|
||||||
if (chan[i].loopCount>0) {
|
|
||||||
stream.readC();
|
|
||||||
if (--chan[i].loopCount) {
|
|
||||||
// jump
|
|
||||||
chan[i].readPos-=loopOff;
|
|
||||||
mustTell=false;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
chan[i].loopCount=stream.readC();
|
|
||||||
// jump
|
|
||||||
chan[i].readPos-=loopOff;
|
|
||||||
mustTell=false;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 0xd6: // note off + wait 1
|
case 0xd6: // note off + wait 1
|
||||||
e->dispatchCmd(DivCommand(DIV_CMD_NOTE_OFF,i));
|
e->dispatchCmd(DivCommand(DIV_CMD_NOTE_OFF,i));
|
||||||
chan[i].waitTicks=1;
|
chan[i].waitTicks=1;
|
||||||
|
|
|
@ -38,7 +38,7 @@ struct DivCSChannelState {
|
||||||
int volume, volMax, volSpeed, volSpeedTarget;
|
int volume, volMax, volSpeed, volSpeedTarget;
|
||||||
int vibratoDepth, vibratoRate, vibratoPos, vibratoRange, vibratoShape;
|
int vibratoDepth, vibratoRate, vibratoPos, vibratoRange, vibratoShape;
|
||||||
int portaTarget, portaSpeed;
|
int portaTarget, portaSpeed;
|
||||||
unsigned char arp, arpStage, arpTicks, loopCount;
|
unsigned char arp, arpStage, arpTicks;
|
||||||
|
|
||||||
unsigned int callStack[DIV_MAX_CSSTACK];
|
unsigned int callStack[DIV_MAX_CSSTACK];
|
||||||
unsigned char callStackPos;
|
unsigned char callStackPos;
|
||||||
|
@ -66,7 +66,6 @@ struct DivCSChannelState {
|
||||||
arp(0),
|
arp(0),
|
||||||
arpStage(0),
|
arpStage(0),
|
||||||
arpTicks(0),
|
arpTicks(0),
|
||||||
loopCount(0),
|
|
||||||
callStackPos(0),
|
callStackPos(0),
|
||||||
tracePos(0) {
|
tracePos(0) {
|
||||||
for (int i=0; i<DIV_MAX_CSTRACE; i++) {
|
for (int i=0; i<DIV_MAX_CSTRACE; i++) {
|
||||||
|
|
|
@ -131,9 +131,6 @@ String disasmCmd(unsigned char* buf, size_t bufLen, unsigned int addr, unsigned
|
||||||
case 0xd1:
|
case 0xd1:
|
||||||
return "nop";
|
return "nop";
|
||||||
break;
|
break;
|
||||||
case 0xd3:
|
|
||||||
return fmt::sprintf("loop (-%d), %d",(int)buf[addr+1],(int)buf[addr+2]);
|
|
||||||
break;
|
|
||||||
case 0xd4:
|
case 0xd4:
|
||||||
if (addr+2>=bufLen) return "???";
|
if (addr+2>=bufLen) return "???";
|
||||||
return fmt::sprintf("callsym $%.4x",(int)(buf[addr+1]|(buf[addr+2]<<8)));
|
return fmt::sprintf("callsym $%.4x",(int)(buf[addr+1]|(buf[addr+2]<<8)));
|
||||||
|
|
Loading…
Reference in a new issue