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

@ -26,6 +26,7 @@
class DivEngine;
struct DivCSChannelState {
unsigned int startPos;
unsigned int readPos;
int waitTicks;
@ -69,6 +70,7 @@ struct DivCSChannelState {
class DivCSPlayer {
DivEngine* e;
unsigned char* b;
size_t bLen;
SafeReader stream;
DivCSChannelState chan[DIV_MAX_CHANS];
unsigned char fastDelays[16];
@ -77,12 +79,18 @@ class DivCSPlayer {
short vibTable[64];
public:
unsigned char* getData();
size_t getDataLen();
DivCSChannelState* getChanState(int ch);
unsigned char* getFastDelays();
unsigned char* getFastCmds();
void cleanup();
bool tick();
bool init();
DivCSPlayer(DivEngine* en, unsigned char* buf, size_t len):
e(en),
b(buf),
bLen(len),
stream(buf,len) {}
};