Time is finally on our side
May 24th, 2007 by James
After a few hours of choice rewriting, I now have a timer core that works accurately to ~0.1% of the real chip (even if it’s a little more CPU intensive than before).
The new version currently has no space for the external clock frequencies that used to be included in the interface, largely because that’s not how the chip worked - there was an enable clock that had to be connected, but external lines were meant to just be fed by whatever was necessary. If you want a consistant external clock source now, you have to set a timer in the driver to call the external clock function, which will then be processed in the same manner as the real deal. (In theory, the real chip should use the enable clock to clock in this change, but since the consequence of this is offsetting the output by three enable clocks each time, then compensating internally, you’ll forgive me if I don’t bother emulating that just yet, if at all*).
The upshot of all this is that the unit test now complains about PIA IC3, which is exactly the same problem as the only other emulator of this hardware I know (the apparently discontinued MFME). At least, I think that’s the problem, the alpha emulation in that throws a fit when adding ‘.’ characters to certain spaces, so I get a weird symbol instead.
*If someone can find an application where this behaviour matters and produces a discernible effect, I’ll do it on presentation of proof. Since nothing that uses a 6840 in MAME does, I think I’m fairly safe.
This entry was posted on Thursday, May 24th, 2007 at 11:37 pm and is filed under AGEMAME News. You can trackback from your own site.