nocrew / ostis

Atari ST Emulator
GNU Lesser General Public License v2.1
20 stars 4 forks source link

Fix CLOCK cycle display with clocked CPU #125

Closed larsbrinkhoff closed 8 years ago

larsbrinkhoff commented 8 years ago

The CLOCK diagnostics rely on cpu->clock, which wasn't updated in the clocked CPU.

(In the future, perhaps only one of cpu->cycle and cpu->clock should remain.)

stefanberndtsson commented 8 years ago

I suggest cpu->clock moves to system->clock (or something to that effect) and handles the 32MHz clock. cpu->cycle can then remain the 8MHz part of that.

larsbrinkhoff commented 8 years ago

I suggest clocks.c which implements all clocks in the system. Devices can then register for the clock input they want.

We could also add known offsets between clocks.

stefanberndtsson commented 8 years ago

Ok, so essentially a callback for clock-ticks. I'm not really sure how to simulate clock offset in a synchronous machine (which ostis basically is) without having a much much faster master clock fast enough so that offsets are complete clock cycles of the faster clock