From a8a02b9ebbb3e898b573017cca279fd0812ac7fc Mon Sep 17 00:00:00 2001 From: MooingLemur Date: Wed, 5 Jul 2023 15:29:11 -0700 Subject: [PATCH] Changed EFxx to EExx at request of tildearrow --- doc/7-systems/vera.md | 2 +- src/engine/dispatch.h | 2 +- src/engine/platform/vera.cpp | 2 +- src/engine/playback.cpp | 3 ++- src/engine/sysDef.cpp | 1 - 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/7-systems/vera.md b/doc/7-systems/vera.md index 4497887b..e89744a9 100644 --- a/doc/7-systems/vera.md +++ b/doc/7-systems/vera.md @@ -13,5 +13,5 @@ currently Furnace does not support the PCM channel's stereo mode, though (except - `2`: triangle - `3`: noise - `22xx`: **set duty cycle.** range is `0` to `3F`. -- `EFxx`: **ZSM synchronization event.** +- `EExx`: **ZSM synchronization event.** - Where `xx` is the event payload. This has no effect in how the music is played in Furnace, but the ZSMKit library for the Commander X16 interprets these events inside ZSM files and optionally triggers a callback routine. This can be used, for instance, to cause game code to respond to beats or at certain points in the music. diff --git a/src/engine/dispatch.h b/src/engine/dispatch.h index 9a7a067d..c458cf9c 100644 --- a/src/engine/dispatch.h +++ b/src/engine/dispatch.h @@ -236,7 +236,7 @@ enum DivDispatchCmds { DIV_CMD_NES_LINEAR_LENGTH, - DIV_CMD_SYNC_MESSAGE, // (value) + DIV_CMD_EXTERNAL, // (value) DIV_ALWAYS_SET_VOLUME, // () -> alwaysSetVol diff --git a/src/engine/platform/vera.cpp b/src/engine/platform/vera.cpp index 8c1bf948..fe34b8bc 100644 --- a/src/engine/platform/vera.cpp +++ b/src/engine/platform/vera.cpp @@ -416,7 +416,7 @@ int DivPlatformVERA::dispatch(DivCommand c) { case DIV_CMD_MACRO_ON: chan[c.chan].std.mask(c.value,false); break; - case DIV_CMD_SYNC_MESSAGE: + case DIV_CMD_EXTERNAL: rWriteZSMSync(c.value); break; case DIV_ALWAYS_SET_VOLUME: diff --git a/src/engine/playback.cpp b/src/engine/playback.cpp index c70844a1..4d9e12ea 100644 --- a/src/engine/playback.cpp +++ b/src/engine/playback.cpp @@ -236,7 +236,7 @@ const char* cmdName[]={ "NES_LINEAR_LENGTH", - "SYNC_MESSAGE", + "EXTERNAL", "ALWAYS_SET_VOLUME" }; @@ -915,6 +915,7 @@ void DivEngine::processRow(int i, bool afterDelay) { //printf("\x1b[1;36m%d: extern command %d\x1b[m\n",i,effectVal); extValue=effectVal; extValuePresent=true; + dispatchCmd(DivCommand(DIV_CMD_EXTERNAL,effectVal)); break; case 0xef: // global pitch globalPitch+=(signed char)(effectVal-0x80); diff --git a/src/engine/sysDef.cpp b/src/engine/sysDef.cpp index 6b94a66f..f4d76ceb 100644 --- a/src/engine/sysDef.cpp +++ b/src/engine/sysDef.cpp @@ -1460,7 +1460,6 @@ void DivEngine::registerSystems() { { {0x20, {DIV_CMD_WAVE, "20xx: Set waveform"}}, {0x22, {DIV_CMD_STD_NOISE_MODE, "22xx: Set duty cycle (0 to 3F)"}}, - {0xEF, {DIV_CMD_SYNC_MESSAGE, "EFxx: ZSM sync event"}}, } );