a better command stream debugger

This commit is contained in:
tildearrow 2024-03-08 17:53:37 -05:00
parent d3f0f1d1d0
commit 2290f3d873
14 changed files with 265 additions and 6 deletions

View file

@ -35,8 +35,30 @@ bool DivCSChannelState::doCall(unsigned int addr) {
return true;
}
unsigned char* DivCSPlayer::getData() {
return b;
}
size_t DivCSPlayer::getDataLen() {
return bLen;
}
DivCSChannelState* DivCSPlayer::getChanState(int ch) {
return &chan[ch];
}
unsigned char* DivCSPlayer::getFastDelays() {
return fastDelays;
}
unsigned char* DivCSPlayer::getFastCmds() {
return fastCmds;
}
void DivCSPlayer::cleanup() {
delete b;
b=NULL;
bLen=0;
}
bool DivCSPlayer::tick() {
@ -383,7 +405,8 @@ bool DivCSPlayer::init() {
stream.readI();
continue;
}
chan[i].readPos=stream.readI();
chan[i].startPos=stream.readI();
chan[i].readPos=chan[i].startPos;
}
stream.read(fastDelays,16);
@ -427,3 +450,17 @@ bool DivEngine::playStream(unsigned char* f, size_t length) {
BUSY_END;
return true;
}
DivCSPlayer* DivEngine::getStreamPlayer() {
return cmdStreamInt;
}
bool DivEngine::killStream() {
if (!cmdStreamInt) return false;
BUSY_BEGIN;
cmdStreamInt->cleanup();
delete cmdStreamInt;
cmdStreamInt=NULL;
BUSY_END;
return true;
}