mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-16 18:30:32 +00:00
Adds a route to not bumping time.
This commit is contained in:
parent
2f2478d2d3
commit
9859f99513
@ -38,6 +38,11 @@ template <class T, class LocalTimeScale, class TargetTimeScale = LocalTimeScale>
|
|||||||
return &object_;
|
return &object_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns a pointer to the included object without flushing time.
|
||||||
|
inline T *last_valid() {
|
||||||
|
return &object_;
|
||||||
|
}
|
||||||
|
|
||||||
/// Flushes all accumulated time.
|
/// Flushes all accumulated time.
|
||||||
inline void flush() {
|
inline void flush() {
|
||||||
if(!is_flushed_) object_.run_for(time_since_update_.template flush<TargetTimeScale>());
|
if(!is_flushed_) object_.run_for(time_since_update_.template flush<TargetTimeScale>());
|
||||||
@ -80,6 +85,11 @@ template <class T, class LocalTimeScale, class TargetTimeScale = LocalTimeScale>
|
|||||||
return &object_;
|
return &object_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns a pointer to the included object without flushing time.
|
||||||
|
inline T *last_valid() {
|
||||||
|
return &object_;
|
||||||
|
}
|
||||||
|
|
||||||
/// Flushes all accumulated time.
|
/// Flushes all accumulated time.
|
||||||
inline void flush() {
|
inline void flush() {
|
||||||
if(!is_flushed_) {
|
if(!is_flushed_) {
|
||||||
|
@ -237,7 +237,7 @@ class ConcreteMachine:
|
|||||||
*cycle.value = vdp_->get_current_line();
|
*cycle.value = vdp_->get_current_line();
|
||||||
break;
|
break;
|
||||||
case 0x41:
|
case 0x41:
|
||||||
*cycle.value = vdp_->get_latched_horizontal_counter();
|
*cycle.value = vdp_.last_valid()->get_latched_horizontal_counter();
|
||||||
break;
|
break;
|
||||||
case 0x80: case 0x81:
|
case 0x80: case 0x81:
|
||||||
*cycle.value = vdp_->get_register(address);
|
*cycle.value = vdp_->get_register(address);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user