void dp8390_device::device_reset() { memset(&m_regs, 0, sizeof(m_regs)); m_regs.cr = 0x21; m_regs.isr = 0x80; m_regs.dcr = 0x04; memset(&m_8019regs, 0, sizeof(m_8019regs)); m_8019regs.config1 = 0x80; m_8019regs.config3 = 0x01; irq_func(CLEAR_LINE); m_reset = 1; }
void tms5220_reset(void) { /* initialize the FIFO */ /*memset(fifo, 0, sizeof(fifo));*/ fifo_head = fifo_tail = fifo_count = fifo_bits_taken = 0; /* initialize the chip state */ /* Note that we do not actually clear IRQ on start-up : IRQ is even raised if buffer_empty or buffer_low are 0 */ tms5220_speaking = speak_external = talk_status = first_frame = last_frame = irq_pin = 0; #if USE_OBSOLETE_HACK speak_delay_frames = 0; #endif if (irq_func) irq_func(0); buffer_empty = buffer_low = 1; RDB_flag = FALSE; /* initialize the energy/pitch/k states */ old_energy = new_energy = current_energy = target_energy = 0; old_pitch = new_pitch = current_pitch = target_pitch = 0; memset(old_k, 0, sizeof(old_k)); memset(new_k, 0, sizeof(new_k)); memset(current_k, 0, sizeof(current_k)); memset(target_k, 0, sizeof(target_k)); /* initialize the sample generators */ interp_count = sample_count = pitch_count = 0; randbit = 0; memset(u, 0, sizeof(u)); memset(x, 0, sizeof(x)); if (load_address_callback) (*load_address_callback)(0); schedule_dummy_read = TRUE; }
void dp8390_device::stop() { m_regs.isr = 0x80; // is this right? m_regs.cr |= 1; irq_func(CLEAR_LINE); m_reset = 1; }