mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-21 21:33:54 +00:00
Improves commentary.
This commit is contained in:
parent
c54bbc5a04
commit
6568c29c54
@ -20,11 +20,16 @@ namespace OPL {
|
||||
they're very compact.
|
||||
*/
|
||||
|
||||
/*!
|
||||
Represents both the logarithm of a value and its sign.
|
||||
|
||||
It's actually the negative logarithm, in base two, in fixed point.
|
||||
*/
|
||||
struct LogSign {
|
||||
int log;
|
||||
int sign;
|
||||
};
|
||||
|
||||
/*!
|
||||
@returns Negative log sin of x, assuming a 1024-unit circle.
|
||||
*/
|
||||
@ -83,7 +88,7 @@ constexpr LogSign negative_log_sin(int x) {
|
||||
}
|
||||
|
||||
/*!
|
||||
@returns 2 ^ -x/256 in 0.10 fixed-point form.
|
||||
Computes the linear value represented by the log-sign @c ls.
|
||||
*/
|
||||
constexpr int power_two(LogSign ls) {
|
||||
/// A derivative of the exponent table in a real OPL2; mapped_exp[x] = (source[c ^ 0xff] << 1) | 0x800.
|
||||
|
@ -325,6 +325,8 @@ class ConcreteMachine:
|
||||
opll_.write(address, *cycle.value);
|
||||
break;
|
||||
case 0xf2:
|
||||
// TODO: it turns out this address isn't just a detection space;
|
||||
// it's actually an audio control. See https://www.smspower.org/Development/AudioControlPort
|
||||
opll_detection_word_ = *cycle.value;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user