VGM export: add speed drift compensation setting

it appears this is the only way to get exports to play at the correct
speed in DeadFish's VGM player for Genesis
This commit is contained in:
tildearrow 2025-06-06 02:45:59 -05:00
parent 41dcfe8462
commit fe454ee2df
5 changed files with 20 additions and 8 deletions

View file

@ -239,6 +239,16 @@ void FurnaceGUI::drawExportVGM(bool onWindow) {
}
}
ImGui::Text(_("speed drift compensation:"));
if (ImGui::RadioButton(_("none"),vgmExportCorrectedRate==44100)) {
vgmExportCorrectedRate=44100;
}
// as tested on a Model 1 Genesis (VA6, USA):
// 0.97841613336995507871 slower, 1.02206000687632131440 longer
if (ImGui::RadioButton(_("DeadFish VgmPlay (1.02×)"),vgmExportCorrectedRate==43148)) {
vgmExportCorrectedRate=43148;
}
if (hasOneAtLeast) {
if (onWindow) {
ImGui::Separator();

View file

@ -5654,7 +5654,7 @@ bool FurnaceGUI::loop() {
break;
}
case GUI_FILE_EXPORT_VGM: {
SafeWriter* w=e->saveVGM(willExport,vgmExportLoop,vgmExportVersion,vgmExportPatternHints,vgmExportDirectStream,vgmExportTrailingTicks,vgmExportDPCM07);
SafeWriter* w=e->saveVGM(willExport,vgmExportLoop,vgmExportVersion,vgmExportPatternHints,vgmExportDirectStream,vgmExportTrailingTicks,vgmExportDPCM07,vgmExportCorrectedRate);
if (w!=NULL) {
FILE* f=ps_fopen(copyOfName.c_str(),"wb");
if (f!=NULL) {
@ -8478,6 +8478,7 @@ FurnaceGUI::FurnaceGUI():
debugFFT(false),
vgmExportVersion(0x171),
vgmExportTrailingTicks(-1),
vgmExportCorrectedRate(44100),
drawHalt(10),
macroPointSize(16),
waveEditStyle(0),

View file

@ -1687,6 +1687,7 @@ class FurnaceGUI {
bool willExport[DIV_MAX_CHIPS];
int vgmExportVersion;
int vgmExportTrailingTicks;
int vgmExportCorrectedRate;
int cvHiScore;
int drawHalt;
int macroPointSize;