mirror of
https://github.com/holub/mame
synced 2025-05-25 23:35:26 +03:00
- Added "abs" function to DISCRETE_TRANSFORM
- Fixed a bug in DISCRETE_RCDISC5
This commit is contained in:
parent
890ea90e32
commit
5a0fd74a12
@ -833,8 +833,7 @@ static DISCRETE_STEP( dst_rcdisc5)
|
||||
diff = u - node->output[0];
|
||||
|
||||
if(diff < 0)
|
||||
//diff = diff - (diff * exp(discrete_current_context->sample_time / context->exponent0));
|
||||
diff = -node->output[0] + (node->output[0] * context->exponent0);
|
||||
diff = diff * context->exponent0;
|
||||
node->output[0] += diff;
|
||||
}
|
||||
else
|
||||
|
@ -1680,6 +1680,9 @@ static DISCRETE_STEP(dst_transform)
|
||||
case 'P':
|
||||
dst_transform_push(trans_stack, &trans_stack_ptr, top);
|
||||
break;
|
||||
case 'a': /* absolute value */
|
||||
top = fabs(top);
|
||||
break;
|
||||
case 'i': /* * -1 */
|
||||
top = -top;
|
||||
break;
|
||||
|
@ -1650,6 +1650,7 @@
|
||||
* + - Pop two values from stack, add and push result to stack
|
||||
* / - Pop two values from stack, divide and push result to stack
|
||||
* * - Pop two values from stack, multiply and push result to stack
|
||||
* a - Pop one value from stack, multiply -1 if less than 0 and push result to stack
|
||||
* i - Pop one value from stack, multiply -1 and push result to stack
|
||||
* ! - Pop one value from stack, logical invert, push result to stack
|
||||
* = - Pop two values from stack, logical = and push result to stack
|
||||
|
Loading…
Reference in New Issue
Block a user