MT-32 Buffer Overflow and Checksum Errors

From Sierra WikiNew
Revision as of 14:40, 14 April 2021 by sierraw>Andrew Branscom (→‎Related Links)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

MT-32 Buffer Overflow and Checksum Errors


From a Thread on the SHP Forums [1]
stub page. You can help the Sierra Wiki by expanding it.


 
 



NewRisingSun on the Quest Studios forums regarding MT-32 errors wrote:

"Buffer Overflow" means the data arrives too fast for the MT-32 to handle. As stated previously, second generation units don't have this problem, as no data can arrive too fast for these models to handle. Reasons why this problem can occur:

  • The game programmer just didn't care
  • The game programmer only tested with a second/third generation model
  • The game programmer did insert the necessary delays, but timed them by counting CPU cycles.
     

Only in the last case will slowing down your system/DOSBox do any good.

"Checksum Error" is distinct from the "Buffer Overflow". It means that some data got lost before it arrived at the MT-32. This can happen because:

the game programmer counts CPU cycles to wait for the next available MIDI cycle (signaled by the MPU-401's "Data Receive Ready" bit) before sending a data byte. On fast computers, it finishes counting before the next MIDI cycle occurs, and so the game just gives up on sending that particular byte, thus losing it. Obviously, this is a different speed issue than the one causing the "Buffer Overflow". the sound card/laptop/USB-to-MIDI's drivers don't handle large amounts of MIDI data properly and lose data. Update drivers. the cables used are broken or not connected properly. Check connections and replace cables. Only in the first case will slowing down your system/DOSBox do any good. Since you've said it doesn't, check the other reasons.


Peter Veenstra (Qbix, DOSBox Author) wrote:

In the SVN[2] of DOSBox there is now some code that will insert delays when writing to your real MT32. (you can enable it through the midiconfig parameter) This should make DOSBox is little more friendly with games that write too fast and cables that don't buffer.

Description of the midiconfig parameter

# midiconfig:  Special configuration options for the device driver. This is usually the id of the device you want to use.
# When using a Roland MT-32 rev. 0 as midi output device, some games may require a delay in order to prevent 'buffer overflow' issues.
# In that case, add 'delaysysex', for example: midiconfig=2 delaysysex
# See the README/Manual for more details.

The status window of DOSBox should tell you that it is activated.

References

Related Links