I'll save you the trouble and reject this patch right here ;-) Don't worry, it's pretty easy to fix. And don't forget recordings from your PCBs showing that this actually improves things.
(Aside: the 056800, which Konami calls MIRAC, is a "mailslot" chip; it allows the sound 68000 to communicate with the main CPU, and was first used on System GX. Music sequencing is done entirely in software on the 68000).
attotime timer_period = attotime::from_hz(46000) * 128; // not sure what this is in usec but sounds correct
Digital logic can't derive clocks from thin air. All timing values are always a function of the input clock divided by an integer (usually a power of 2, but on newer chips like this odd dividers are possible). Something like attotime::from_hz(device->clock() / 3); would yield a very similar rate and have the benefit of not being a number that was obviously pulled out of someone's butt.
- machine.scheduler().timer_set(attotime::from_usec(1), timer_expired_delegate(FUNC(zr107_state::irq_off),state), line); + state->m_sound_irq_timer->adjust(attotime::from_usec(5), line);
Changing the "from_use(1)" to "from_usec(5)" would yield the same result without the unnecessary copypasta of that poor other driver's code.
|