aboutsummaryrefslogtreecommitdiff
path: root/c
diff options
context:
space:
mode:
authorSik2019-07-06 20:05:48 -0300
committerSik2019-07-06 20:05:48 -0300
commitfbcb8924e878e7eff93d444762c647e126cb8e3b (patch)
treec44c1eeac1de8b664bdc60d81707613dec48e59a /c
parentc012f5f3767bb358b027535007b922b276c87f2e (diff)
Added PCM playback flag to Echo_GetStatus
Diffstat (limited to 'c')
-rw-r--r--c/echo.c2
-rw-r--r--c/echo.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/c/echo.c b/c/echo.c
index e2d68d9..61acf68 100644
--- a/c/echo.c
+++ b/c/echo.c
@@ -407,6 +407,8 @@ uint16_t echo_get_status(void) {
status |= ECHO_STAT_BUSY;
if (z80_ram[0x1F00] != 0xFF)
status |= ECHO_STAT_DIRBUSY;
+ if (z80_ram[0x0008] != 0xC9)
+ status |= ECHO_STAT_PCM;
// Look ahead in the queue for any pending commands
// Adjust the flags accordingly if needed
diff --git a/c/echo.h b/c/echo.h
index 3812c46..809e735 100644
--- a/c/echo.h
+++ b/c/echo.h
@@ -21,6 +21,7 @@ enum {
/* Echo status flags */
#define ECHO_STAT_BGM 0x0002 /* Background music is playing */
#define ECHO_STAT_SFX 0x0001 /* Sound effect is playing */
+#define ECHO_STAT_PCM 0x2000 /* PCM playback ongoing */
#define ECHO_STAT_DIRBUSY 0x4000 /* Echo isn't done with direct events */
#define ECHO_STAT_BUSY 0x8000 /* Echo still didn't parse command */