<div dir="ltr"><div>The BAM Dev Kit contains two different versions of fm.asm, which I compared to the version of fm.asm from the OHR repo. I can see that Brian introduced the misinterpretation of the stop song command bug ironically as he was adding bounds checking to avoid reading off the end of the file! Before that, that command was silently ignored, afterwards it was misread as "Note on".<br></div><div><br></div><div>The BAM documentation says that BAM creating utilities should write a stop song command at the end, but the small collection of BAM files I looked at didn't have them.</div><div><br></div><div>Also the "stop song" command is meant to have an arg of 0 or else it's invalid, but the stop song commands in those two BAM files have non-zero args, so I guess they're due to data corruption.</div><div>One BAM has one right at the beginning and then continues normally, but the other starts with this garbage sequence:</div><div><br></div><div>6 cmd 96 12<br> loop 48 times to label 12<br>8 cmd 32 6 note off channel 6<br>9 cmd 16 1 note on channel 1<br>11 cmd 0 0<br>12 cmd 0 10 invalid arg 10<br>13 cmd 16 0<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 9 Aug 2019 at 21:44, James Paige <<a href="mailto:Bob@hamsterrepublic.com">Bob@hamsterrepublic.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">Oh! That is interesting!<div dir="auto"><br></div><div dir="auto">I don't remember why a "stop song" command ever existed, nor why that command would have ended up in the beginning of songs. Very interesting!</div><div dir="auto"><br></div><div dir="auto">---</div><div dir="auto">James</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 9, 2019, 1:04 AM <<a href="mailto:subversion@hamsterrepublic.com" target="_blank">subversion@hamsterrepublic.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">teeemcee<br>
2019-08-08 22:04:53 -0700 (Thu, 08 Aug 2019)<br>
312<br>
bam2mid: ignore "stop song" commands, like asm code did, to fix certain BAM files<br>
<br>
It's not documented like that, but that's how it actually behaved.<br>
<br>
In particular Timestream Saga contains two songs with "stop song" right at<br>
the beginning, resulting in a very short MIDI which triggered the MIDI loop<br>
crash bug.<br>
---<br>
U wip/bam2mid.bas<br>
U wip/whatsnew.txt<br>
_______________________________________________<br>
Ohrrpgce mailing list<br>
<a href="mailto:ohrrpgce@lists.motherhamster.org" rel="noreferrer" target="_blank">ohrrpgce@lists.motherhamster.org</a><br>
<a href="http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org" rel="noreferrer noreferrer" target="_blank">http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org</a><br>
</blockquote></div>
_______________________________________________<br>
Ohrrpgce mailing list<br>
<a href="mailto:ohrrpgce@lists.motherhamster.org" target="_blank">ohrrpgce@lists.motherhamster.org</a><br>
<a href="http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org" rel="noreferrer" target="_blank">http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org</a><br>
</blockquote></div>