Originally Posted by Curt Coder
Non-hacky solution [for emulating NE555's non-simetric wave] would be to either emulate an NE555 chip properly, or have 2 scanline timers (one for ASSERT, another for CLEAR_LINE).
Originally Posted by R. Belmont
For the two-timers solution you'd start the second timer in the service routine for the first one. It's a fairly common pattern in MAME/MESS.
Guys, searching MESS sources for "MDRV_TIMER_ADD_PERIODIC" I found this (src/mame/drivers/mw8080bw.c):
#define SPCENCTR_STROBE_FREQ        (9.00)  /* Hz - calculated from the 555 timer */
#define SPCENCTR_STROBE_DUTY_CYCLE  (95)    /* % */

static TIMER_DEVICE_CALLBACK( spcenctr_strobe_timer_callback )
    mw8080bw_state *state = timer.machine->driver_data<mw8080bw_state>();
    output_set_value("STROBE", param && state->spcenctr_strobe_state);


static MACHINE_CONFIG_DERIVED( spcenctr, mw8080bw_root )


    /* timers */
    MDRV_TIMER_ADD_PERIODIC("strobeon", spcenctr_strobe_timer_callback, HZ(SPCENCTR_STROBE_FREQ))
    MDRV_TIMER_PARAM(TRUE)  /* indicates strobe ON */

    MDRV_TIMER_ADD_PERIODIC("strobeoff", spcenctr_strobe_timer_callback, HZ(SPCENCTR_STROBE_FREQ))
    MDRV_TIMER_PARAM(FALSE) /* indicates strobe OFF */


It seems that this MDRV_TIMER_START_DELAY can do the magic, is it so?

Last edited by Ensjo; 10/29/10 12:14 PM.