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".
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. 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. One BAM has one right at the beginning and then continues normally, but the other starts with this garbage sequence: 6 cmd 96 12 loop 48 times to label 12 8 cmd 32 6 note off channel 6 9 cmd 16 1 note on channel 1 11 cmd 0 0 12 cmd 0 10 invalid arg 10 13 cmd 16 0 On Fri, 9 Aug 2019 at 21:44, James Paige <b...@hamsterrepublic.com> wrote: > Oh! That is interesting! > > 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! > > --- > James > > On Fri, Aug 9, 2019, 1:04 AM <subvers...@hamsterrepublic.com> wrote: > >> teeemcee >> 2019-08-08 22:04:53 -0700 (Thu, 08 Aug 2019) >> 312 >> bam2mid: ignore "stop song" commands, like asm code did, to fix certain >> BAM files >> >> It's not documented like that, but that's how it actually behaved. >> >> In particular Timestream Saga contains two songs with "stop song" right at >> the beginning, resulting in a very short MIDI which triggered the MIDI >> loop >> crash bug. >> --- >> U wip/bam2mid.bas >> U wip/whatsnew.txt >> _______________________________________________ >> Ohrrpgce mailing list >> ohrrpgce@lists.motherhamster.org >> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org >> > _______________________________________________ > Ohrrpgce mailing list > ohrrpgce@lists.motherhamster.org > http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org >
_______________________________________________ Ohrrpgce mailing list ohrrpgce@lists.motherhamster.org http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org