Looks like there's a bug in XGM that causes one note to play for ever on hardware.
1. Play an XGM song
2. Play a different XGM song that doesn't use all the channels song 1 used
3. The unused channel plays a note for ever
I don't have a small test ROM right now, and I haven't had it happen in emulators either, got a report on hw.
XGM song change bug, eternal note
Moderator: Stef
-
- Very interested
- Posts: 117
- Joined: Sun Jan 02, 2011 9:14 pm
- Contact:
Re: XGM song change bug, eternal note
I have experienced the same behavior
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
Re: XGM song change bug, eternal note
It happens only on real hardware ? it would be nice to have a test rom but just to be sure, maintened notes are the ones from previous xgm music ? did you try to insert a stop command (waiting a frame or 2) before starting the next music ?
Re: XGM song change bug, eternal note
Yes, the maintaining notes are from the previous song. I didn't try the stop command since the commands inside it look identical to the ones when starting a new song; the current attempted workaround is to start an empty song (all channels silence) before switching to a new song, I don't know yet if that works.
I haven't been able to reproduce in any emulator, but perhaps the accurate (and windows-only) ones would also do it.
I haven't been able to reproduce in any emulator, but perhaps the accurate (and windows-only) ones would also do it.
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
Re: XGM song change bug, eternal note
Well i'm a bit surprised as by default all XGM music has a kind of header command to initialize the YM2612 and so turn off all channels. The fact it happens only on real hardware means there is probably a timing issue, maybe the registers are wrote too quickly (key on/off sequence) so they are not correctly interpreted. when you use stop command the XGM driver send a "dummy" music play command which only contains commands to reset / turn off the YM2612 sounds.