more work on the command stream debugger
This commit is contained in:
parent
53ff3c2f70
commit
5dd62d45fa
3 changed files with 84 additions and 6 deletions
|
|
@ -89,6 +89,7 @@ bool DivCSPlayer::tick() {
|
|||
command=fastCmds[next&15];
|
||||
} else if (next>=0xe0 && next<=0xef) { // preset delay
|
||||
chan[i].waitTicks=fastDelays[next&15];
|
||||
chan[i].lastWaitLen=chan[i].waitTicks;
|
||||
} else switch (next) {
|
||||
case 0xb4: // note on null
|
||||
e->dispatchCmd(DivCommand(DIV_CMD_NOTE_ON,i,DIV_NOTE_NULL));
|
||||
|
|
@ -156,12 +157,15 @@ bool DivCSPlayer::tick() {
|
|||
break;
|
||||
case 0xfc:
|
||||
chan[i].waitTicks=(unsigned short)stream.readS();
|
||||
chan[i].lastWaitLen=chan[i].waitTicks;
|
||||
break;
|
||||
case 0xfd:
|
||||
chan[i].waitTicks=(unsigned char)stream.readC();
|
||||
chan[i].lastWaitLen=chan[i].waitTicks;
|
||||
break;
|
||||
case 0xfe:
|
||||
chan[i].waitTicks=1;
|
||||
chan[i].lastWaitLen=chan[i].waitTicks;
|
||||
break;
|
||||
case 0xff:
|
||||
chan[i].readPos=chan[i].startPos;
|
||||
|
|
|
|||
|
|
@ -23,12 +23,15 @@
|
|||
#include "defines.h"
|
||||
#include "safeReader.h"
|
||||
|
||||
#define DIV_MAX_CSTRACE 64
|
||||
|
||||
class DivEngine;
|
||||
|
||||
struct DivCSChannelState {
|
||||
unsigned int startPos;
|
||||
unsigned int readPos;
|
||||
int waitTicks;
|
||||
int lastWaitLen;
|
||||
|
||||
int note, pitch;
|
||||
int volume, volMax, volSpeed;
|
||||
|
|
@ -39,11 +42,7 @@ struct DivCSChannelState {
|
|||
unsigned int callStack[8];
|
||||
unsigned char callStackPos;
|
||||
|
||||
struct TraceEntry {
|
||||
unsigned int addr;
|
||||
unsigned char length;
|
||||
unsigned char data[11];
|
||||
} trace[32];
|
||||
unsigned int trace[DIV_MAX_CSTRACE];
|
||||
unsigned char tracePos;
|
||||
|
||||
bool doCall(unsigned int addr);
|
||||
|
|
@ -51,6 +50,7 @@ struct DivCSChannelState {
|
|||
DivCSChannelState():
|
||||
readPos(0),
|
||||
waitTicks(0),
|
||||
lastWaitLen(0),
|
||||
note(-1),
|
||||
pitch(0),
|
||||
volume(0x7f00),
|
||||
|
|
@ -64,7 +64,12 @@ struct DivCSChannelState {
|
|||
arp(0),
|
||||
arpStage(0),
|
||||
arpTicks(0),
|
||||
callStackPos(0) {}
|
||||
callStackPos(0),
|
||||
tracePos(0) {
|
||||
for (int i=0; i<DIV_MAX_CSTRACE; i++) {
|
||||
trace[i]=0;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
class DivCSPlayer {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue