mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-27 01:31:42 +00:00
Corrects TMS' get_time_until_interrupt
when the next interrupt is exactly a frame away.
This commit is contained in:
parent
3da323c657
commit
ad50b6b1fb
@ -654,7 +654,7 @@ uint8_t TMS9918::get_register(int address) {
|
|||||||
|
|
||||||
const int half_cycles_per_frame = frame_lines_ * 228 * 2;
|
const int half_cycles_per_frame = frame_lines_ * 228 * 2;
|
||||||
int half_cycles_remaining = (192 * 228 * 2 + half_cycles_per_frame - half_cycles_into_frame_.as_int()) % half_cycles_per_frame;
|
int half_cycles_remaining = (192 * 228 * 2 + half_cycles_per_frame - half_cycles_into_frame_.as_int()) % half_cycles_per_frame;
|
||||||
return HalfCycles(half_cycles_remaining);
|
return HalfCycles(half_cycles_remaining ? half_cycles_remaining : half_cycles_per_frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TMS9918::get_interrupt_line() {
|
bool TMS9918::get_interrupt_line() {
|
||||||
|
Loading…
Reference in New Issue
Block a user