Talk:The Simpsons: Bart vs. the Space Mutants (DOS)

From Video Game Music Preservation Foundation Wiki
Revision as of 11:39, 27 April 2015 by Jepael (talk | contribs) (Running music driver and logging its output)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Music Format

"It is unknown what native format the game uses, since everything is compressed in .OVL files, but it might be a MIDI or XMI file. "

The BUZZER, ADLIB and ROLAND .OVL files are not compressed. These are music drivers and they contain both player code and music data to be played on respective device. The correct .OVL file is loaded by the game and the playing code gets executed by the game. Native song format unknown, it is possible that each sound device uses a different native format. The ADLIB.OVL has copyright text of "AdLib Music by Sound Images (c) 1991" (Lemmings has also Sound Images music driver), but the BUZZER and ROLAND have a copyright describing the device music is meant to play on and the name of Jonathan Dunn. --Jepael (talk) 00:13, 17 April 2015 (MDT)

Running the AdLib music driver

The game first measures vertical sync period and sets up a timer interrupt with double the speed of vertical sync so a timer interrupt happens twice per frame (about 140 Hz) and the tick rate is kept in lock with vertical sync. The interrupt keeps track of elapsed timer cycles and calls the audio driver every 22764 timer cycles. Thus the long-term average call rate is about 52.413 Hz, but the driver is called at a granularity of the approximately 140 Hz vertical sync timer. So the actual sequence when the driver is performed or skipped in the timer interrupt depends on actual vertical sync frequency the video card has, and the randomness in the vertical sync measurement.

If an idealization is made and the audio driver is called evenly at the specified timer period, the music plays at correct speed. It is then possible to patch the driver's OPL chip register write subroutine with a call to log the exact register writes the driver performs each time it is called. I have logged a direct dump of the music driver output into a Type-1 700 Hz .IMF file. Please let me know if this is even remotely useful. --Jepael (talk) 09:39, 27 April 2015 (MDT)