1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-04-26 03:29:40 +00:00

Expands size of storage in Cycles/HalfCycles; adjusts widely to compensate.

This commit is contained in:
Thomas Harte
2019-10-29 22:36:29 -04:00
parent fd02b6fc18
commit 1c154131f9
55 changed files with 191 additions and 183 deletions
+1 -1
View File
@@ -166,7 +166,7 @@ void TMS9918::run_for(const HalfCycles cycles) {
// Convert 456 clocked half cycles per line to 342 internal cycles per line;
// the internal clock is 1.5 times the nominal 3.579545 Mhz that I've advertised
// for this part. So multiply by three quarters.
int int_cycles = (cycles.as_int() * 3) + cycles_error_;
int int_cycles = int(cycles.as_integral() * 3) + cycles_error_;
cycles_error_ = int_cycles & 3;
int_cycles >>= 2;
if(!int_cycles) return;