I've got unexpected problem with KOF register, it does not work as I expect, and my attempts to figure it out work differently in different emulators.
These two registers aren't documented much, as it is pretty basic thing. The manual gives pretty cryptic description:
I would expect them to work this way: when you write KON, channels those bits are in 1 in this write will start play, and those bits are in 0, continue to do what they did; when you write KOF, it is the same but channels stops.
This assumption about KON proved to be working, in emulators at least - everything works just like expected. However, when I needed to use KOF, I got a problem. Emulators either aren't react on KOF writes at all (channels continue to play), or stop play sound on this channel at all (bsnes).
Random experiments with using these registers some other way (for example, like it was enable flags instead of triggers) weren't successful, KON logic brokes, KOF continue to not work.
The question is - how these registers supposed to work?
These two registers aren't documented much, as it is pretty basic thing. The manual gives pretty cryptic description:
Quote:
(1) KON, KOF
"Key on" and "Key off". D0-D7 correspond to Voice 0-7. When "1", key
on or key off are carried out ; when "0", neither is carried out.
These two registers need not be reset. With KOF, in regard to any
Voice in which "1" is written, whether in the ADSR mode or GAIN mode,
1 to 0 decreases at the rate of 8 nsec by means of the addition of the
fixed value 1/256. In writing in a succession of KON and KOF. two
Ts (62.4 microsec) or more should be released. (In writing in a
sucession of various data in less than two Ts, the data written in
may not be operable later.)
"Key on" and "Key off". D0-D7 correspond to Voice 0-7. When "1", key
on or key off are carried out ; when "0", neither is carried out.
These two registers need not be reset. With KOF, in regard to any
Voice in which "1" is written, whether in the ADSR mode or GAIN mode,
1 to 0 decreases at the rate of 8 nsec by means of the addition of the
fixed value 1/256. In writing in a succession of KON and KOF. two
Ts (62.4 microsec) or more should be released. (In writing in a
sucession of various data in less than two Ts, the data written in
may not be operable later.)
I would expect them to work this way: when you write KON, channels those bits are in 1 in this write will start play, and those bits are in 0, continue to do what they did; when you write KOF, it is the same but channels stops.
This assumption about KON proved to be working, in emulators at least - everything works just like expected. However, when I needed to use KOF, I got a problem. Emulators either aren't react on KOF writes at all (channels continue to play), or stop play sound on this channel at all (bsnes).
Random experiments with using these registers some other way (for example, like it was enable flags instead of triggers) weren't successful, KON logic brokes, KOF continue to not work.
The question is - how these registers supposed to work?