It doesn't matter which processor is handling the FM, the problem exists either way. Note, this problem is only at the START of a song, not elsewhere.
Here's how I turn off the FM in my VGM player:
Code:
ExitVGM:
| reset YM2612
lea FMReset(pc),a5
lea 0xA00000,a0
moveq #6,d3
0:
move.b (a5)+,d0 /* FM reg */
move.b (a5)+,d1 /* FM data */
moveq #15,d2
1:
move.b d0,0x4000(a0) /* FM reg */
nop
nop
nop
move.b d1,0x4001(a0) /* FM data */
nop
nop
nop
move.b d0,0x4002(a0) /* FM reg */
nop
nop
nop
move.b d1,0x4003(a0) /* FM data */
addq.b #1,d0
dbra d2,1b
dbra d3,0b
move.w #0x4000,d1
moveq #28,d2
2:
move.b (a5)+,d1 /* YM reg */
move.b (a5)+,0(a0,d1.w) /* YM data */
dbra d2,2b
| reset PSG
move.b #0x9F,0xC00011
move.b #0xBF,0xC00011
move.b #0xDF,0xC00011
move.b #0xFF,0xC00011
9:
where the data is
Code:
FMReset:
/* block settings */
.byte 0x30,0x00
.byte 0x40,0x7F
.byte 0x50,0x1F
.byte 0x60,0x1F
.byte 0x70,0x1F
.byte 0x80,0xFF
.byte 0x90,0x00
/* disable LFO */
.byte 0,0x22
.byte 1,0x00
/* disable timer & set channel 6 to normal mode */
.byte 0,0x27
.byte 1,0x00
/* all KEY_OFF */
.byte 0,0x28
.byte 1,0x00
.byte 1,0x04
.byte 1,0x01
.byte 1,0x05
.byte 1,0x02
.byte 1,0x06
/* disable DAC */
.byte 0,0x2B
.byte 1,0x80
.byte 0,0x2A
.byte 1,0x80
.byte 0,0x2B
.byte 1,0x00
/* turn off channels */
.byte 0,0xB4
.byte 1,0x00
.byte 0,0xB5
.byte 1,0x00
.byte 0,0xB6
.byte 1,0x00
.byte 2,0xB4
.byte 3,0x00
.byte 2,0xB5
.byte 3,0x00
.byte 2,0xB6
.byte 3,0x00
That's the best I've been able to do so far and it STILL has trouble on certain instruments on certain songs on the startup.