Actual WIP post
February 9th, 2008 by James
Makes a change, doesn’t it? I’ve been neglecting this site for too long, largely while researching things and doing other stuff. At present, I’m doing a little bug hunt of my own, squashing a few little issues and inaccuracies in the drivers I’ve sent to MAME over the years. In the process, I’ve added a couple of new features to the 6840 timer module that may prove useful to others.
Right now, the only way to get output data from the chip is as the 1s and 0s from the output pins. This is all well and good for counting and triggering components, but not so good for the other applications of the 6840, such as square wave generation. The new version will have facilities for calculating the output frequency and making that accessible (actually, that was always present, just never enabled), as well as the ability to detect a change in timer status, such reloads will now call a handler function, if specified.
This will, unfortunately, lead to some changes in the interfaces used in the current drivers using the 6840 core (mpu4 and cchasm), but should also give some benefits for those wanting to use the other implementations, such as those needing to drive speech chips and discrete hardware. It will also help with dynamic clock rate adjustment of chips that rely on the output pins as a clock source (MPU4’s serial communications, for example).
In the process of doing this, I spotted an inconsistency in how the timer is initialised depending on the counter mode (the prescaler was ignored in dual-byte mode). This is now remedied, thugh I don’t think anything ever used it. The internal logic of the driver is now also improved, to the extent that it’s now readable, and self consistant.
This entry was posted on Saturday, February 9th, 2008 at 9:35 pm and is filed under AGEMAME News. You can trackback from your own site.