mirror of
https://github.com/trudnai/Steve2.git
synced 2025-08-05 11:24:46 +00:00
use the clkfrm from the 6502 struct
This commit is contained in:
@@ -42,16 +42,16 @@ double * pdl_prevarr = pdl_prev;
|
||||
double * pdl_diffarr = pdl_diff;
|
||||
|
||||
INLINE uint8_t pdl_reset() {
|
||||
pdl_reset_time = m6502.clktime + clkfrm;
|
||||
pdl_reset_time = m6502.clktime + m6502.clkfrm;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
INLINE uint8_t pdl_read( uint8_t pdl ) {
|
||||
pdl_current_time = m6502.clktime + clkfrm;
|
||||
pdl_current_time = m6502.clktime + m6502.clkfrm;
|
||||
pdl_elapsed_time = pdl_current_time - pdl_reset_time;
|
||||
double normalized_time = pdl_elapsed_time / PDL_MAX_TIME; // 0: started, >= 1 ended
|
||||
return normalized_time >= pdl_value[pdl] ? 0 : 1 << 7;
|
||||
return normalized_time >= pdl_value[pdl] ? 0 : 1 << 7; // TODO: better pdl value simulation, not only the bit 7
|
||||
}
|
||||
|
||||
#endif /* paddle_h */
|
||||
|
Reference in New Issue
Block a user