First post, by NewRisingSun
I noticed a possible mistake in adlib.cpp. Registers 0xB0..0xB8 are not captured in the initial register dump, possibly to not include any notes that are already sounding when capturing begins. If a game initializes registers 0xB6..0xB8 only once and then turns percussion notes on and off by writing to 0xBD without reinitializing 0xB6..0xB8, the high bits of the frequency number will not be played back properly. Zeliard is one such game, and as expected, .DRO captures from that game sound wrong in all playback programs; some drum notes will be inaudible.
Zeliard captures correctly after the following source patch:
--- adlib.cpp.old 2013-01-15 12:10:04 +0000
+++ adlib.cpp 2014-01-19 19:54:06 +0000
@@ -227,10 +227,10 @@
Bitu i, val;
/* Check the registers to add */
for (i=0;i<256;i++) {
- //Skip the note on entries
- if (i>=0xb0 && i<=0xb8)
- continue;
val = (*cache)[ i ];
+ //Silence the note on entries
+ if (i>=0xb0 && i<=0xb8)
+ val &= ~0x20;
if (val) {
AddWrite( i, val );
}
This silences any notes that were active before capturing was started while preserving the upper bits of the frequency number.