From 5acb6daef66edc3906d53ecf4b7afb7f7e507f84 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Mon, 13 Mar 2023 03:12:03 -0500 Subject: [PATCH] prepare to add some code --- src/asm/68k/amigatest/README.md | 49 +++++++++++++++++++++++++++++++++ src/asm/68k/amigatest/player.s | 32 +++++++++++++++++++++ src/gui/gui.h | 2 ++ src/gui/settings.cpp | 6 +++- 4 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 src/asm/68k/amigatest/README.md create mode 100644 src/asm/68k/amigatest/player.s diff --git a/src/asm/68k/amigatest/README.md b/src/asm/68k/amigatest/README.md new file mode 100644 index 000000000..fe941ea50 --- /dev/null +++ b/src/asm/68k/amigatest/README.md @@ -0,0 +1,49 @@ +# Amiga verification export format + +"ROM" export format exclusively for verifying whether the Amiga emulation in Furnace is correct. + +do not assume this is the actual ROM export! it is nothing more than a register dump kind of thing... + +# process + +enable the setting in Furnace to unlock the export option by adding this to furnace.cfg: + +``` +iCannotWait=true +``` + +go to file > export Amiga validation data... + +put sample.bin and seq.bin in this directory. + +compile with vasm: + +``` +vasmm68k_mot -Fhunkexe -kick1hunks player.s +``` + +run a.out on Amiga. it should play the exported song. + +# sequence format + +## 00-0F: global + +- 00: do nothing +- 01: next tick +- 02 xx: wait +- 03 xxxx: wait +- 06 xxxx: write to DMACON +- 0a xxxx: write to INTENA +- 0e xxxx: write to ADKCON + +## 10-1F: per-channel (10, 20, 30, 40) + +- 10 xxxxxx yyyy zzzzzz wwww: set loc/len + - x: loc + - y: len + - z: loc after interrupt + - w: len after interrupt +- 12 xxxx yy: initialize wavetable (xxxx: pos; yy: length) +- 16 xxxx: set period +- 18 xx: set volume +- 1a xxxx: set data diff --git a/src/asm/68k/amigatest/player.s b/src/asm/68k/amigatest/player.s new file mode 100644 index 000000000..b382a77f6 --- /dev/null +++ b/src/asm/68k/amigatest/player.s @@ -0,0 +1,32 @@ +; Furnace validation player code +; this is NOT the ROM export you're looking for! + +; incomplete! + +VPOSR = $dff004 +COLOR00 = $dff180 + +cseg + move.l #0,d0 + +main: + jsr waitVBlank + + move.w curColor,d0 + move.w d0,COLOR00 + addi.w #1,d0 + move.w d0,curColor + + jmp main + +waitVBlank: + move.l (VPOSR),d0 + and.l #$1ff00,d0 + cmp.l #$12c00,d0 + bne waitVBlank + rts + +data_c + +curColor: + dc.w 0 diff --git a/src/gui/gui.h b/src/gui/gui.h index 5b4cc3221..a42c47429 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -1369,6 +1369,7 @@ class FurnaceGUI { int oneDigitEffects; int disableFadeIn; int alwaysPlayIntro; + int iCannotWait; unsigned int maxUndoSteps; String mainFontPath; String patFontPath; @@ -1509,6 +1510,7 @@ class FurnaceGUI { oneDigitEffects(0), disableFadeIn(0), alwaysPlayIntro(0), + iCannotWait(0), maxUndoSteps(100), mainFontPath(""), patFontPath(""), diff --git a/src/gui/settings.cpp b/src/gui/settings.cpp index e457c99c3..c39d03e0a 100644 --- a/src/gui/settings.cpp +++ b/src/gui/settings.cpp @@ -2416,6 +2416,7 @@ void FurnaceGUI::drawSettings() { // "Debug" - toggles mobile UI // "Nice Amiga cover of the song!" - enables hidden systems (YMU759/SoundUnit/Dummy) // "42 63" - enables all instrument types + // "????" - enables stuff if (ImGui::BeginTabItem("Cheat Codes")) { ImVec2 settingsViewSize=ImGui::GetContentRegionAvail(); settingsViewSize.y-=ImGui::GetFrameHeight()+ImGui::GetStyle().WindowPadding.y; @@ -2619,6 +2620,7 @@ void FurnaceGUI::syncSettings() { settings.disableFadeIn=e->getConfInt("disableFadeIn",0); settings.alwaysPlayIntro=e->getConfInt("alwaysPlayIntro",0); settings.cursorFollowsOrder=e->getConfInt("cursorFollowsOrder",1); + settings.iCannotWait=e->getConfInt("iCannotWait",0); clampSetting(settings.mainFontSize,2,96); clampSetting(settings.patFontSize,2,96); @@ -2734,6 +2736,7 @@ void FurnaceGUI::syncSettings() { clampSetting(settings.disableFadeIn,0,1); clampSetting(settings.alwaysPlayIntro,0,3); clampSetting(settings.cursorFollowsOrder,0,1); + clampSetting(settings.iCannotWait,0,1); if (settings.exportLoops<0.0) settings.exportLoops=0.0; if (settings.exportFadeOut<0.0) settings.exportFadeOut=0.0; @@ -2943,7 +2946,8 @@ void FurnaceGUI::commitSettings() { e->setConf("oneDigitEffects",settings.oneDigitEffects); e->setConf("disableFadeIn",settings.disableFadeIn); e->setConf("alwaysPlayIntro",settings.alwaysPlayIntro); - e->setConf("cursorFollowsOrder", settings.cursorFollowsOrder); + e->setConf("cursorFollowsOrder",settings.cursorFollowsOrder); + e->setConf("iCannotWait",settings.iCannotWait); // colors for (int i=0; i