From f757fb7c8fefdd04a4548ec5cc05439cd2fde80f Mon Sep 17 00:00:00 2001 From: Victor Date: Fri, 21 Jun 2024 00:20:24 +0300 Subject: [PATCH] Handle RF5C68 and RF5C164 commands identically (#337) They are basically the same chip --- tools/xgmtool/inc/vgmcom.h | 1 + tools/xgmtool/src/vgmcom.c | 2 +- tools/xgmtool/src/xgmtool.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/xgmtool/inc/vgmcom.h b/tools/xgmtool/inc/vgmcom.h index 3309251d..9c5977f9 100644 --- a/tools/xgmtool/inc/vgmcom.h +++ b/tools/xgmtool/inc/vgmcom.h @@ -24,6 +24,7 @@ #define VGM_LOOP_END 0x31 #define VGM_WRITE_RF5C68 0xB0 +#define VGM_WRITE_RF5C164 0xB1 typedef struct { diff --git a/tools/xgmtool/src/vgmcom.c b/tools/xgmtool/src/vgmcom.c index 360a4fa2..f2ffee52 100644 --- a/tools/xgmtool/src/vgmcom.c +++ b/tools/xgmtool/src/vgmcom.c @@ -485,7 +485,7 @@ bool VGMCommand_isSame(VGMCommand* source, VGMCommand* com) bool VGMCommand_isRF5C68Control(VGMCommand* source) { - return source->command == VGM_WRITE_RF5C68; + return source->command == VGM_WRITE_RF5C68 || source->command == VGM_WRITE_RF5C164; } bool VGMCommand_contains(LList* commands, VGMCommand* command) diff --git a/tools/xgmtool/src/xgmtool.c b/tools/xgmtool/src/xgmtool.c index cbe94efa..b0ec9576 100644 --- a/tools/xgmtool/src/xgmtool.c +++ b/tools/xgmtool/src/xgmtool.c @@ -80,7 +80,7 @@ int main(int argc, char *argv[ ]) printf("-di\tdisable PCM sample auto ignore (it can help when PCM are not properly extracted).\n"); printf("-dr\tdisable PCM sample rate auto fix (it can help when PCM are not properly extracted).\n"); printf("-dd\tdisable delayed KEY OFF event when we have KEY ON/OFF in a single frame (it can fix incorrect instrument sound).\n"); - printf("-r\tkeep RF5C68 register write commands.\n"); + printf("-r\tkeep RF5C68 and RF5C164 register write commands.\n"); exit(1); }