Re: [RFC 10/10] hw/mos6522: Synchronize timer interrupt and timer counter

2021-08-25 Thread Finn Thain
On Wed, 25 Aug 2021, Mark Cave-Ayland wrote: > > Unfortunately the datasheet I was using for reference doesn't appear to > have the relevant detail here. Have you got a reference to the datasheet > you're using which shows what happens to the timers at the zero crossing > point? > The data

Re: [RFC 10/10] hw/mos6522: Synchronize timer interrupt and timer counter

2021-08-25 Thread Mark Cave-Ayland
On 24/08/2021 11:09, Finn Thain wrote: We rely on a QEMUTimer callback to set the interrupt flag, and this races with counter register accesses, such that the guest might see the counter reloaded but might not see the interrupt flagged. According to the datasheet, a real 6522 device counts down

[RFC 10/10] hw/mos6522: Synchronize timer interrupt and timer counter

2021-08-24 Thread Finn Thain
We rely on a QEMUTimer callback to set the interrupt flag, and this races with counter register accesses, such that the guest might see the counter reloaded but might not see the interrupt flagged. According to the datasheet, a real 6522 device counts down to , then raises the relevant IRQ. Af