SMG does a nasty trick of setting the frequency to 1 and leaving the
attenuation unchanged, instead of setting the attenuation to 15.

It does this
a) when sound effects are not playing
b) in the short pause between music tracks playing

A frequency of 1 is so high pitch and so people don't notice much.
However, in MEMU, especially on Windows, it can be clearly heard.

The patched SMG2M.COM changes a) to set the attenuation to 15.
Therefore most of the problem is removed.
Patched byte is around 0x23f3 in memory.

I've not worked out an easy patch for b) as yet.

Also, in the original, at location 0x2c80 in memory is
	LD BC,00040H
which is a bug.
B should be loaded with 040H, and C doesn't matter (it'll be overridden).
The code probably should have read
	LD B,040H
as it is the count of pattern name table entries to write in the bottom
2 lines of the screen.
As a result, the code actually copys 2 lines to the bottom of the screen,
and another 6 lines of junk into VRAM beyond that.
Unfortunately this can't be done in the vertical retrace, so the outputting
at the rate of one byte per 28T will start to cause corruption, but luckily,
as its offscreen, nobody notices it.
I found this bug when testing the new -diag-vid-time-check feature of MEMU.
To fix SMG2M, I patched the code so that it does
	LD BC,04040H
I've left it unpatched in SMG.COM, so you can still see the time check
feature catch bad code using that.
