mirror of
https://github.com/holub/mame
synced 2025-04-23 08:49:55 +03:00
schedule: rename add_scheduling_quantum to add_quantum, added perfect_quatum and use that for most cases of boost_interleave
This commit is contained in:
parent
cb510e940a
commit
184f4dcfa2
@ -146,7 +146,7 @@ uint16_t hp98034_io_card_device::reg_r(address_space &space, offs_t offset)
|
||||
// This is meant to gain some margin to NP in the race with
|
||||
// CPU (in real hw the margin was probably no more than a
|
||||
// couple of µs).
|
||||
machine().scheduler().boost_interleave(attotime::from_usec(5) , attotime::from_usec(100));
|
||||
machine().scheduler().add_quantum(attotime::from_usec(5) , attotime::from_usec(100));
|
||||
space.device().execute().spin();
|
||||
machine().scheduler().synchronize();
|
||||
LOG("%.06f RD R%u=%04x %s\n" , machine().time().as_double() , offset + 4 , res , machine().describe_context());
|
||||
@ -169,7 +169,7 @@ void hp98034_io_card_device::reg_w(address_space &space, offs_t offset, uint16_t
|
||||
|
||||
update_flg();
|
||||
// See reg_r above
|
||||
machine().scheduler().boost_interleave(attotime::from_usec(5) , attotime::from_usec(100));
|
||||
machine().scheduler().add_quantum(attotime::from_usec(5) , attotime::from_usec(100));
|
||||
space.device().execute().spin();
|
||||
machine().scheduler().synchronize();
|
||||
LOG("%.06f WR R%u=%04x %s\n" , machine().time().as_double() , offset + 4 , data , machine().describe_context());
|
||||
@ -270,7 +270,7 @@ void hp98034_io_card_device::mode_reg_clear_w(uint8_t data)
|
||||
m_force_flg = false;
|
||||
if (update_flg()) {
|
||||
// See reg_r above
|
||||
machine().scheduler().boost_interleave(attotime::zero , attotime::from_usec(100));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(100));
|
||||
machine().scheduler().synchronize();
|
||||
}
|
||||
}
|
||||
@ -302,7 +302,7 @@ void hp98034_io_card_device::update_dc()
|
||||
sts_w(BIT(m_dc , 4));
|
||||
if (update_flg()) {
|
||||
// See reg_r above
|
||||
machine().scheduler().boost_interleave(attotime::zero , attotime::from_usec(100));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(100));
|
||||
machine().scheduler().synchronize();
|
||||
}
|
||||
update_clr_hpib();
|
||||
|
@ -315,7 +315,7 @@ void isa8_ibm_mfc_device::ibm_mfc_w(offs_t offset, uint8_t data)
|
||||
case 0x2:
|
||||
case 0x3:
|
||||
{
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(1000));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(1000));
|
||||
m_d71055c_0->write(offset, data);
|
||||
break;
|
||||
}
|
||||
|
@ -743,7 +743,7 @@ void isbc202_device::set_output()
|
||||
LOG_BUS("CPU out of wait state\n");
|
||||
xack_w(0);
|
||||
// Ensure the MCU executes a few instruction before the CPU
|
||||
machine().scheduler().boost_interleave(attotime::from_usec(1) , attotime::from_usec(5));
|
||||
machine().scheduler().add_quantum(attotime::from_usec(1) , attotime::from_usec(5));
|
||||
m_inputs[ IN_SEL_START ] = false;
|
||||
}
|
||||
if (BIT(m_mask , 4)) {
|
||||
|
@ -339,7 +339,7 @@ void saitekosa_maestro_device::nmi_w(int state)
|
||||
void saitekosa_maestro_device::ack_w(int state)
|
||||
{
|
||||
if (state != m_expansion->ack_state())
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(100));
|
||||
}
|
||||
|
||||
u32 saitekosa_analyst_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
||||
|
@ -189,5 +189,5 @@ void saitekosa_maestroa_device::nmi_w(int state)
|
||||
void saitekosa_maestroa_device::ack_w(int state)
|
||||
{
|
||||
if (state != m_expansion->ack_state())
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(100));
|
||||
}
|
||||
|
@ -189,5 +189,5 @@ void saitekosa_sparc_device::nmi_w(int state)
|
||||
void saitekosa_sparc_device::ack_w(int state)
|
||||
{
|
||||
if (state != m_expansion->ack_state())
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(100));
|
||||
}
|
||||
|
@ -316,7 +316,7 @@ void pioneer_ldv1000_device::player_vsync(const vbi_metadata &vbi, int fieldnum,
|
||||
m_process_vbi_timer->adjust(screen().time_until_pos(19*2));
|
||||
|
||||
// boost interleave for the first 1ms to improve communications
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_msec(1));
|
||||
machine().scheduler().perfect_quantum(attotime::from_msec(1));
|
||||
}
|
||||
|
||||
|
||||
|
@ -134,7 +134,7 @@ uint8_t philips_22vp931_device::data_r()
|
||||
}
|
||||
|
||||
// also boost interleave for 4 scanlines to ensure proper communications
|
||||
machine().scheduler().boost_interleave(attotime::zero, screen().scan_period() * 4);
|
||||
machine().scheduler().perfect_quantum(screen().scan_period() * 4);
|
||||
return m_tocontroller;
|
||||
}
|
||||
|
||||
@ -528,7 +528,7 @@ void philips_22vp931_device::i8049_to_controller_w(uint8_t data)
|
||||
m_data_ready(*this, true);
|
||||
|
||||
// also boost interleave for 4 scanlines to ensure proper communications
|
||||
machine().scheduler().boost_interleave(attotime::zero, screen().scan_period() * 4);
|
||||
machine().scheduler().perfect_quantum(screen().scan_period() * 4);
|
||||
}
|
||||
|
||||
|
||||
|
@ -281,7 +281,7 @@ void s_smp_device::io_w(offs_t offset, u8 data)
|
||||
// osd_printf_debug("%s SPC: %02x to APU @ %d\n", machine().describe_context(), data, offset & 3);
|
||||
m_port_out[offset - 4] = data;
|
||||
// Unneeded, we already run at perfect_interleave
|
||||
// machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(20));
|
||||
// machine().scheduler().perfect_quantum(attotime::from_usec(20));
|
||||
break;
|
||||
case 0xa: /* Timer 0 */
|
||||
case 0xb: /* Timer 1 */
|
||||
|
@ -236,7 +236,7 @@ void bsmt2000_device::write_data(uint16_t data)
|
||||
m_deferred_data_write->adjust(attotime::zero, data);
|
||||
|
||||
// boost the interleave on a write so that the caller detects the status more accurately
|
||||
machine().scheduler().boost_interleave(attotime::from_usec(1), attotime::from_usec(10));
|
||||
machine().scheduler().add_quantum(attotime::from_usec(1), attotime::from_usec(10));
|
||||
}
|
||||
|
||||
|
||||
|
@ -543,16 +543,57 @@ void device_scheduler::trigger(int trigid, const attotime &after)
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// boost_interleave - temporarily boosts the
|
||||
// interleave factor
|
||||
// add_quantum - add a scheduling quantum;
|
||||
// the smallest active one is the one that is in use
|
||||
//-------------------------------------------------
|
||||
|
||||
void device_scheduler::boost_interleave(const attotime ×lice_time, const attotime &boost_duration)
|
||||
void device_scheduler::add_quantum(const attotime &quantum, const attotime &duration)
|
||||
{
|
||||
// ignore timeslices > 1 second
|
||||
if (timeslice_time.seconds() > 0)
|
||||
return;
|
||||
add_scheduling_quantum(timeslice_time, boost_duration);
|
||||
assert(quantum.seconds() == 0);
|
||||
|
||||
attotime curtime = time();
|
||||
attotime expire = curtime + duration;
|
||||
const attoseconds_t quantum_attos = quantum.attoseconds();
|
||||
|
||||
// figure out where to insert ourselves, expiring any quanta that are out-of-date
|
||||
quantum_slot *insert_after = nullptr;
|
||||
quantum_slot *next;
|
||||
for (quantum_slot *quant = m_quantum_list.first(); quant != nullptr; quant = next)
|
||||
{
|
||||
// if this quantum is expired, nuke it
|
||||
next = quant->next();
|
||||
if (curtime >= quant->m_expire)
|
||||
m_quantum_allocator.reclaim(m_quantum_list.detach(*quant));
|
||||
|
||||
// if this quantum is shorter than us, we need to be inserted afterwards
|
||||
else if (quant->m_requested <= quantum_attos)
|
||||
insert_after = quant;
|
||||
}
|
||||
|
||||
// if we found an exact match, just take the maximum expiry time
|
||||
if (insert_after != nullptr && insert_after->m_requested == quantum_attos)
|
||||
insert_after->m_expire = std::max(insert_after->m_expire, expire);
|
||||
|
||||
// otherwise, allocate a new quantum and insert it after the one we picked
|
||||
else
|
||||
{
|
||||
quantum_slot &quant = *m_quantum_allocator.alloc();
|
||||
quant.m_requested = quantum_attos;
|
||||
quant.m_actual = std::max(quantum_attos, m_quantum_minimum);
|
||||
quant.m_expire = expire;
|
||||
m_quantum_list.insert_after(quant, insert_after);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// perfect_quantum - add a (temporary) minimum
|
||||
// scheduling quantum to boost the interleave
|
||||
//-------------------------------------------------
|
||||
|
||||
void device_scheduler::perfect_quantum(const attotime &duration)
|
||||
{
|
||||
add_quantum(attotime::zero, duration);
|
||||
}
|
||||
|
||||
|
||||
@ -760,7 +801,7 @@ void device_scheduler::rebuild_execute_list()
|
||||
min_quantum = (std::min)(attotime(0, exec->minimum_quantum()), min_quantum);
|
||||
|
||||
// inform the timer system of our decision
|
||||
add_scheduling_quantum(min_quantum, attotime::never);
|
||||
add_quantum(min_quantum, attotime::never);
|
||||
}
|
||||
|
||||
// start with an empty list
|
||||
@ -934,51 +975,6 @@ inline void device_scheduler::execute_timers()
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// add_scheduling_quantum - add a scheduling
|
||||
// quantum; the smallest active one is the one
|
||||
// that is in use
|
||||
//-------------------------------------------------
|
||||
|
||||
void device_scheduler::add_scheduling_quantum(const attotime &quantum, const attotime &duration)
|
||||
{
|
||||
assert(quantum.seconds() == 0);
|
||||
|
||||
attotime curtime = time();
|
||||
attotime expire = curtime + duration;
|
||||
const attoseconds_t quantum_attos = quantum.attoseconds();
|
||||
|
||||
// figure out where to insert ourselves, expiring any quanta that are out-of-date
|
||||
quantum_slot *insert_after = nullptr;
|
||||
quantum_slot *next;
|
||||
for (quantum_slot *quant = m_quantum_list.first(); quant != nullptr; quant = next)
|
||||
{
|
||||
// if this quantum is expired, nuke it
|
||||
next = quant->next();
|
||||
if (curtime >= quant->m_expire)
|
||||
m_quantum_allocator.reclaim(m_quantum_list.detach(*quant));
|
||||
|
||||
// if this quantum is shorter than us, we need to be inserted afterwards
|
||||
else if (quant->m_requested <= quantum_attos)
|
||||
insert_after = quant;
|
||||
}
|
||||
|
||||
// if we found an exact match, just take the maximum expiry time
|
||||
if (insert_after != nullptr && insert_after->m_requested == quantum_attos)
|
||||
insert_after->m_expire = std::max(insert_after->m_expire, expire);
|
||||
|
||||
// otherwise, allocate a new quantum and insert it after the one we picked
|
||||
else
|
||||
{
|
||||
quantum_slot &quant = *m_quantum_allocator.alloc();
|
||||
quant.m_requested = quantum_attos;
|
||||
quant.m_actual = std::max(quantum_attos, m_quantum_minimum);
|
||||
quant.m_expire = expire;
|
||||
m_quantum_list.insert_after(quant, insert_after);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// dump_timers - dump the current timer state
|
||||
//-------------------------------------------------
|
||||
|
@ -115,7 +115,8 @@ public:
|
||||
void timeslice();
|
||||
void abort_timeslice() noexcept;
|
||||
void trigger(int trigid, const attotime &after = attotime::zero);
|
||||
void boost_interleave(const attotime ×lice_time, const attotime &boost_duration);
|
||||
void add_quantum(const attotime &quantum, const attotime &duration);
|
||||
void perfect_quantum(const attotime &duration);
|
||||
void suspend_resume_changed() { m_suspend_changes_pending = true; }
|
||||
|
||||
// timers, specified by callback/name
|
||||
@ -140,7 +141,6 @@ private:
|
||||
void compute_perfect_interleave();
|
||||
void rebuild_execute_list();
|
||||
void apply_suspend_changes();
|
||||
void add_scheduling_quantum(const attotime &quantum, const attotime &duration);
|
||||
|
||||
// timer helpers
|
||||
emu_timer &timer_list_insert(emu_timer &timer);
|
||||
|
@ -189,7 +189,7 @@ void asic65_device::data_w(offs_t offset, u16 data)
|
||||
if (m_asic65_type == ASIC65_ROMBASED)
|
||||
{
|
||||
m_synced_write_timer->adjust(attotime::zero, data | (offset << 16));
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(20));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(20));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -228,7 +228,7 @@ u16 asic65_device::read()
|
||||
if (!machine().side_effects_disabled())
|
||||
{
|
||||
m_68full = 0;
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(5));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(5));
|
||||
}
|
||||
return m_68data;
|
||||
}
|
||||
@ -461,7 +461,7 @@ u16 asic65_device::io_r()
|
||||
/* bit 13 = XFLG */
|
||||
/* bit 12 = controlled by jumper */
|
||||
if (!machine().side_effects_disabled())
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(5));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(5));
|
||||
return (m_tfull << 15) | (m_68full << 14) | (m_xflg << 13) | 0x0000;
|
||||
}
|
||||
else
|
||||
|
@ -171,7 +171,7 @@ TIMER_CALLBACK_MEMBER(atari_sound_comm_device::delayed_sound_reset)
|
||||
|
||||
// allocate a high frequency timer until a response is generated
|
||||
// the main CPU is *very* sensistive to the timing of the response
|
||||
machine().scheduler().boost_interleave(SOUND_TIMER_RATE, SOUND_TIMER_BOOST);
|
||||
machine().scheduler().add_quantum(SOUND_TIMER_RATE, SOUND_TIMER_BOOST);
|
||||
}
|
||||
|
||||
|
||||
@ -193,7 +193,7 @@ TIMER_CALLBACK_MEMBER(atari_sound_comm_device::delayed_sound_write)
|
||||
|
||||
// allocate a high frequency timer until a response is generated
|
||||
// the main CPU is *very* sensistive to the timing of the response
|
||||
machine().scheduler().boost_interleave(SOUND_TIMER_RATE, SOUND_TIMER_BOOST);
|
||||
machine().scheduler().add_quantum(SOUND_TIMER_RATE, SOUND_TIMER_BOOST);
|
||||
}
|
||||
|
||||
|
||||
|
@ -778,7 +778,7 @@ void atarisy1_state::atarisy1(machine_config &config)
|
||||
|
||||
GENERIC_LATCH_8(config, m_soundlatch);
|
||||
m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, m6502_device::NMI_LINE);
|
||||
m_soundlatch->data_pending_callback().append([this](int state) { if (state) machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100)); });
|
||||
m_soundlatch->data_pending_callback().append([this](int state) { if (state) machine().scheduler().perfect_quantum(attotime::from_usec(100)); });
|
||||
|
||||
GENERIC_LATCH_8(config, m_mainlatch);
|
||||
m_mainlatch->data_pending_callback().set_inputline(m_maincpu, M68K_IRQ_6);
|
||||
|
@ -1260,7 +1260,7 @@ void atarisy2_state::atarisy2(machine_config &config)
|
||||
GENERIC_LATCH_8(config, m_soundlatch);
|
||||
m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, m6502_device::NMI_LINE);
|
||||
// apb3 fails the self-test with a 100 µs delay or less
|
||||
m_soundlatch->data_pending_callback().append([this](int state) { if (state) machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(200)); });
|
||||
m_soundlatch->data_pending_callback().append([this](int state) { if (state) machine().scheduler().perfect_quantum(attotime::from_usec(200)); });
|
||||
|
||||
GENERIC_LATCH_8(config, m_mainlatch);
|
||||
|
||||
|
@ -507,7 +507,7 @@ void gauntlet_state::gauntlet_base(machine_config &config)
|
||||
|
||||
GENERIC_LATCH_8(config, m_soundlatch);
|
||||
m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, m6502_device::NMI_LINE);
|
||||
m_soundlatch->data_pending_callback().append([this](int state) { if (state) machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100)); });
|
||||
m_soundlatch->data_pending_callback().append([this](int state) { if (state) machine().scheduler().perfect_quantum(attotime::from_usec(100)); });
|
||||
|
||||
GENERIC_LATCH_8(config, m_mainlatch);
|
||||
m_mainlatch->data_pending_callback().set_inputline(m_maincpu, M68K_IRQ_6);
|
||||
|
@ -315,11 +315,11 @@ void starwars_state::starwars(machine_config &config)
|
||||
|
||||
GENERIC_LATCH_8(config, m_soundlatch);
|
||||
m_soundlatch->data_pending_callback().set(m_riot, FUNC(riot6532_device::pa7_w));
|
||||
m_soundlatch->data_pending_callback().append([this](int state) { if (state) machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100)); });
|
||||
m_soundlatch->data_pending_callback().append([this](int state) { if (state) machine().scheduler().perfect_quantum(attotime::from_usec(100)); });
|
||||
|
||||
GENERIC_LATCH_8(config, m_mainlatch);
|
||||
m_mainlatch->data_pending_callback().set(m_riot, FUNC(riot6532_device::pa6_w));
|
||||
m_mainlatch->data_pending_callback().append([this](int state) { if (state) machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100)); });
|
||||
m_mainlatch->data_pending_callback().append([this](int state) { if (state) machine().scheduler().perfect_quantum(attotime::from_usec(100)); });
|
||||
}
|
||||
|
||||
|
||||
|
@ -478,7 +478,7 @@ uint8_t tempest_state::rom_ae1f_r()
|
||||
{
|
||||
// This is needed to ensure that the routine starting at ae1c passes checks and does not corrupt data;
|
||||
// config.m_perfect_cpu_quantum = subtag("maincpu"); would be very taxing on this driver.
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(100));
|
||||
machine().scheduler().abort_timeslice();
|
||||
|
||||
return m_rom[0xae1f];
|
||||
|
@ -162,7 +162,7 @@ void fcrash_state::cawingbl_soundlatch_w(offs_t offset, uint16_t data, uint16_t
|
||||
{
|
||||
m_soundlatch->write(data >> 8);
|
||||
m_audiocpu->set_input_line(0, HOLD_LINE);
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(50)); /* boost the interleave or some voices get dropped */
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(50)); /* boost the interleave or some voices get dropped */
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -422,7 +422,7 @@ public:
|
||||
m_iec->host_clk_w(!BIT(data, 4));
|
||||
m_iec->host_data_w(!BIT(data, 5));
|
||||
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(2000));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(2000));
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER(write_sl)
|
||||
|
@ -846,7 +846,7 @@ void tumbleb_state::semicom_soundcmd_w(offs_t offset, uint16_t data, uint16_t me
|
||||
m_soundlatch->write(data & 0xff);
|
||||
// needed for Super Trio which reads the sound with polling
|
||||
// m_maincpu->spin_until_time(attotime::from_usec(100));
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(20));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(20));
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -399,7 +399,7 @@ uint16_t dectalk_state::dsp_outfifo_r ( )
|
||||
#ifdef USE_LOOSE_TIMING_OUTPUT
|
||||
// if outfifo count is less than two, boost the interleave to prevent running the fifo out
|
||||
if (m_outfifo_count < 2)
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(25));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(25));
|
||||
#endif
|
||||
#ifdef VERBOSE
|
||||
if (m_outfifo_count == 0) logerror("output fifo is EMPTY! repeating previous sample!\n");
|
||||
@ -508,7 +508,7 @@ void dectalk_state::nvram_store(offs_t offset, uint8_t data) // store to X2212 N
|
||||
void dectalk_state::m68k_infifo_w(uint16_t data)// 68k write to the speech input fifo
|
||||
{
|
||||
#ifdef USE_LOOSE_TIMING
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(25));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(25));
|
||||
#endif
|
||||
#ifdef SPC_LOG_68K
|
||||
logerror("m68k: SPC infifo written with data = %04X, fifo head was: %02X; fifo tail: %02X\n",data, m_infifo_head_ptr, m_infifo_tail_ptr);
|
||||
@ -542,7 +542,7 @@ uint16_t dectalk_state::m68k_spcflags_r()// 68k read from the speech flags
|
||||
void dectalk_state::m68k_spcflags_w(uint16_t data)// 68k write to the speech flags (only 3 bits do anything)
|
||||
{
|
||||
#ifdef USE_LOOSE_TIMING
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(25));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(25));
|
||||
#endif
|
||||
#ifdef SPC_LOG_68K
|
||||
logerror("m68k: SPC flags written with %04X, only storing %04X\n",data, data&0x41);
|
||||
@ -687,7 +687,7 @@ uint16_t dectalk_state::m68k_tlc_dtmf_r()// dtmf chip read
|
||||
void dectalk_state::spc_latch_outfifo_error_stats(uint16_t data)// latch 74ls74 @ E64 upper and lower halves with d0 and 1 respectively
|
||||
{
|
||||
#ifdef USE_LOOSE_TIMING
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(25));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(25));
|
||||
#endif
|
||||
#ifdef SPC_LOG_DSP
|
||||
logerror("dsp: set fifo semaphore and set error status = %01X\n",data&1);
|
||||
|
@ -212,7 +212,7 @@ void eolith_state::qs1000_p1_w(uint8_t data)
|
||||
void eolith_state::soundcpu_to_qs1000(uint8_t data)
|
||||
{
|
||||
m_qs1000->serial_in(data);
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(250));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(250));
|
||||
}
|
||||
|
||||
|
||||
|
@ -114,7 +114,7 @@ TIMER_CALLBACK_MEMBER(vertigo_state::sound_command_w)
|
||||
quickly. Otherwise the main CPU gives up with sound. Boosting
|
||||
the interleave for a while helps. */
|
||||
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(100));
|
||||
}
|
||||
|
||||
|
||||
|
@ -188,7 +188,7 @@ u32 silvmil_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, co
|
||||
void silvmil_state::soundcmd_w(u8 data)
|
||||
{
|
||||
m_soundlatch->write(data & 0xff);
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(20));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(20));
|
||||
}
|
||||
|
||||
void silvmil_state::mem_map(address_map &map)
|
||||
|
@ -84,7 +84,7 @@ void fuuki16_state::sound_command_w(u8 data)
|
||||
m_soundlatch->write(data & 0xff);
|
||||
m_audiocpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero);
|
||||
// m_maincpu->spin_until_time(attotime::from_usec(50)); // Allow the other CPU to reply
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(50)); // Fixes glitching in rasters
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(50)); // Fixes glitching in rasters
|
||||
}
|
||||
|
||||
template<int Layer>
|
||||
|
@ -8259,7 +8259,7 @@ void monsterz_state::monsterz(machine_config &config)
|
||||
{
|
||||
if ((m_monsterz_audio_portb & 0x01) && !(data & 0x01))
|
||||
{
|
||||
machine().scheduler().boost_interleave(m_screen->scan_period(), attotime(0, m_screen->refresh_attoseconds()));
|
||||
machine().scheduler().add_quantum(m_screen->scan_period(), attotime(0, m_screen->refresh_attoseconds()));
|
||||
m_maincpu->set_input_line(0, HOLD_LINE);
|
||||
}
|
||||
m_monsterz_audio_portb = data;
|
||||
@ -8269,7 +8269,7 @@ void monsterz_state::monsterz(machine_config &config)
|
||||
{
|
||||
if ((m_monsterz_sample_portc & 0x01) && !(data & 0x01))
|
||||
{
|
||||
machine().scheduler().boost_interleave(m_screen->scan_period(), attotime(0, m_screen->refresh_attoseconds()));
|
||||
machine().scheduler().add_quantum(m_screen->scan_period(), attotime(0, m_screen->refresh_attoseconds()));
|
||||
m_audiocpu->set_input_line(0, HOLD_LINE);
|
||||
}
|
||||
m_monsterz_sample_portc = data;
|
||||
|
@ -131,7 +131,7 @@ WRITE_LINE_MEMBER(gameplan_state::audio_reset_w)
|
||||
if (state == 0)
|
||||
{
|
||||
m_riot->reset();
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(10));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(10));
|
||||
}
|
||||
}
|
||||
|
||||
@ -159,7 +159,7 @@ WRITE_LINE_MEMBER(gameplan_state::r6532_irq)
|
||||
{
|
||||
m_audiocpu->set_input_line(0, state);
|
||||
if (state == ASSERT_LINE)
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(10));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(10));
|
||||
}
|
||||
|
||||
|
||||
|
@ -222,8 +222,8 @@ MACHINE_START_MEMBER(m72_state,kengo)
|
||||
|
||||
TIMER_CALLBACK_MEMBER(m72_state::synch_callback)
|
||||
{
|
||||
//machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(8000000));
|
||||
machine().scheduler().boost_interleave(attotime::from_hz(MASTER_CLOCK/4/12), attotime::from_seconds(25));
|
||||
//machine().scheduler().perfect_quantum(attotime::from_usec(8000000));
|
||||
machine().scheduler().add_quantum(attotime::from_hz(MASTER_CLOCK/4/12), attotime::from_seconds(25));
|
||||
}
|
||||
|
||||
void m72_state::machine_reset()
|
||||
|
@ -837,7 +837,7 @@ void drivedge_state::tms1_68k_ram_w(offs_t offset, u32 data, u32 mem_mask)
|
||||
if (offset == 0) COMBINE_DATA(m_tms1_boot);
|
||||
if (offset == 0x382 && m_tms_spinning[0]) STOP_TMS_SPINNING(machine(), 0);
|
||||
if (!m_tms_spinning[0])
|
||||
machine().scheduler().boost_interleave(attotime::from_hz(CPU020_CLOCK/256), attotime::from_usec(20));
|
||||
machine().scheduler().add_quantum(attotime::from_hz(CPU020_CLOCK/256), attotime::from_usec(20));
|
||||
}
|
||||
|
||||
|
||||
@ -846,21 +846,21 @@ void drivedge_state::tms2_68k_ram_w(offs_t offset, u32 data, u32 mem_mask)
|
||||
COMBINE_DATA(&m_tms2_ram[offset]);
|
||||
if (offset == 0x382 && m_tms_spinning[1]) STOP_TMS_SPINNING(machine(), 1);
|
||||
if (!m_tms_spinning[1])
|
||||
machine().scheduler().boost_interleave(attotime::from_hz(CPU020_CLOCK/256), attotime::from_usec(20));
|
||||
machine().scheduler().add_quantum(attotime::from_hz(CPU020_CLOCK/256), attotime::from_usec(20));
|
||||
}
|
||||
|
||||
|
||||
void drivedge_state::tms1_trigger_w(offs_t offset, u32 data, u32 mem_mask)
|
||||
{
|
||||
COMBINE_DATA(&m_tms1_ram[offset]);
|
||||
machine().scheduler().boost_interleave(attotime::from_hz(CPU020_CLOCK/256), attotime::from_usec(20));
|
||||
machine().scheduler().add_quantum(attotime::from_hz(CPU020_CLOCK/256), attotime::from_usec(20));
|
||||
}
|
||||
|
||||
|
||||
void drivedge_state::tms2_trigger_w(offs_t offset, u32 data, u32 mem_mask)
|
||||
{
|
||||
COMBINE_DATA(&m_tms2_ram[offset]);
|
||||
machine().scheduler().boost_interleave(attotime::from_hz(CPU020_CLOCK/256), attotime::from_usec(20));
|
||||
machine().scheduler().add_quantum(attotime::from_hz(CPU020_CLOCK/256), attotime::from_usec(20));
|
||||
}
|
||||
|
||||
|
||||
|
@ -500,7 +500,7 @@ TIMER_CALLBACK_MEMBER(itech8_state::delayed_z80_control_w)
|
||||
}
|
||||
|
||||
/* boost the interleave whenever this is written to */
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(100));
|
||||
|
||||
/* stash the new value */
|
||||
m_z80_ctrl = data;
|
||||
|
@ -542,7 +542,7 @@ void stepstag_state::stepstag_soundlatch_word_w(u16 data)
|
||||
|
||||
m_subcpu->set_input_line(M68K_IRQ_6, HOLD_LINE);
|
||||
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(100));
|
||||
}
|
||||
|
||||
|
||||
|
@ -138,7 +138,7 @@ void galpani2_state::machine_start()
|
||||
|
||||
void galpani2_state::machine_reset()
|
||||
{
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(50)); //initial mcu xchk
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(50)); //initial mcu xchk
|
||||
}
|
||||
|
||||
static void galpani2_write_kaneko(cpu_device *cpu)
|
||||
|
@ -30,7 +30,7 @@ TODO:
|
||||
interleaving is taken into account. A high resolution timer around the
|
||||
poll loop is probably the best bet. The driver sets its timer manually
|
||||
because strange enough, interleaving doesn't occur immediately when
|
||||
cpuexec_boost_interleave() is called. Speculations are TIME_NOWs could have
|
||||
perfect_quantum() is called. Speculations are TIME_NOWs could have
|
||||
been used as the timer durations to force instant triggering.
|
||||
|
||||
|
||||
|
@ -100,7 +100,7 @@ TIMER_CALLBACK_MEMBER(midway_cheap_squeak_deluxe_device::sync_pia)
|
||||
|
||||
// oftentimes games will write one nibble at a time; the sync on this is very
|
||||
// important, so we boost the interleave briefly while this happens
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(100));
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
|
@ -661,7 +661,7 @@ TIMER_CALLBACK_MEMBER(midway_sounds_good_device::synced_write)
|
||||
|
||||
// oftentimes games will write one nibble at a time; the sync on this is very
|
||||
// important, so we boost the interleave briefly while this happens
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(250));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(250));
|
||||
}
|
||||
|
||||
|
||||
@ -828,5 +828,5 @@ TIMER_CALLBACK_MEMBER(midway_turbo_cheap_squeak_device::synced_write)
|
||||
|
||||
// oftentimes games will write one nibble at a time; the sync on this is very
|
||||
// important, so we boost the interleave briefly while this happens
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(100));
|
||||
}
|
||||
|
@ -451,7 +451,7 @@ DECLARE_WRITE_LINE_MEMBER( fastinvaders_state::vsync)
|
||||
m_maincpu->set_input_line(I8085_RST75_LINE, ASSERT_LINE);
|
||||
m_maincpu->set_input_line(I8085_RST75_LINE, CLEAR_LINE);
|
||||
//machine().scheduler().abort_timeslice(); // transfer occurs immediately
|
||||
//machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100)); // smooth things out a bit
|
||||
//machine().scheduler().perfect_quantum(attotime::from_usec(100)); // smooth things out a bit
|
||||
m_av=0;
|
||||
}
|
||||
}
|
||||
|
@ -392,7 +392,7 @@ void micro3d_state::micro3d_reset_w(uint16_t data)
|
||||
void micro3d_state::host_drmath_int_w(uint16_t data)
|
||||
{
|
||||
m_drmath->set_input_line(AM29000_INTR2, ASSERT_LINE);
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(10));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(10));
|
||||
}
|
||||
|
||||
|
||||
|
@ -233,7 +233,7 @@ void neoprint_state::audio_command_w(offs_t offset, uint8_t data, uint8_t mem_ma
|
||||
audio_cpu_assert_nmi();
|
||||
|
||||
/* boost the interleave to let the audio CPU read the command */
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(50));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(50));
|
||||
|
||||
//if (LOG_CPU_COMM) logerror("MAIN CPU PC %06x: audio_command_w %04x - %04x\n", m_maincpu->pc(), data, mem_mask);
|
||||
}
|
||||
|
@ -183,7 +183,7 @@ void othello_state::unk_8a_w(uint8_t data)
|
||||
m_n7751_command = (data & 0x07);
|
||||
m_n7751->set_input_line(0, ((data & 0x08) == 0) ? ASSERT_LINE : CLEAR_LINE);
|
||||
//m_n7751->set_input_line(0, (data & 0x02) ? CLEAR_LINE : ASSERT_LINE);
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(100));
|
||||
*/
|
||||
|
||||
logerror("8a -> %x\n", data);
|
||||
|
@ -236,7 +236,7 @@ TIMER_CALLBACK_MEMBER(pipeline_state::protection_deferred_w)
|
||||
void pipeline_state::protection_w(u8 data)
|
||||
{
|
||||
machine().scheduler().synchronize(timer_expired_delegate(FUNC(pipeline_state::protection_deferred_w),this), data);
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(100));
|
||||
}
|
||||
|
||||
u8 pipeline_state::sound_data_r()
|
||||
|
@ -993,9 +993,9 @@ void mvs_state::io_control_w(offs_t offset, uint8_t data)
|
||||
|
||||
void neogeo_base_state::audio_command_w(uint8_t data)
|
||||
{
|
||||
// glitches in s1945p without the boost_interleave here
|
||||
// glitches in s1945p without the perfect_quantum here
|
||||
m_soundlatch->write(data);
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(50));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(50));
|
||||
}
|
||||
|
||||
|
||||
|
@ -617,7 +617,7 @@ void dkong_state::p8257_drq_w(uint8_t data)
|
||||
m_dma8257->dreq0_w(data & 0x01);
|
||||
m_dma8257->dreq1_w(data & 0x01);
|
||||
machine().scheduler().abort_timeslice(); // transfer occurs immediately
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100)); // smooth things out a bit
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(100)); // smooth things out a bit
|
||||
}
|
||||
|
||||
uint8_t dkong_state::dkong_in2_r(offs_t offset)
|
||||
|
@ -452,7 +452,7 @@ void snes_state::snes_w_io(address_space &space, offs_t offset, uint8_t data)
|
||||
{
|
||||
// printf("816: %02x to APU @ %d (PC=%06x)\n", data, offset & 3,m_maincpu->pc());
|
||||
m_soundcpu->spc_port_in_w(offset & 0x3, data);
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(20));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(20));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -421,7 +421,7 @@ void qvt102_state::mcu_p2_w(uint8_t data)
|
||||
// the boost lasts for the critical section of the IRQ handler.
|
||||
//
|
||||
if (m_kbd_data)
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(350));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(350));
|
||||
|
||||
m_irqs->in_w<2>(m_kbd_data);
|
||||
}
|
||||
|
@ -812,7 +812,7 @@ void naomi_gdrom_board::i2cmem_dimm_w(uint64_t data)
|
||||
picbus = (data >> 2) & 0xf;
|
||||
picbus_pullup = (picbus_io[0] & picbus_io[1]) & 0xf; // high if both are inputs
|
||||
m_maincpu->abort_timeslice();
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_msec(1));
|
||||
machine().scheduler().perfect_quantum(attotime::from_msec(1));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -76,7 +76,7 @@ uint16_t saturn_state::saturn_soundram_r(offs_t offset)
|
||||
void saturn_state::minit_w(uint32_t data)
|
||||
{
|
||||
//logerror("%s MINIT write = %08x\n", machine().describe_context(),data);
|
||||
machine().scheduler().boost_interleave(m_minit_boost_timeslice, attotime::from_usec(m_minit_boost));
|
||||
machine().scheduler().add_quantum(m_minit_boost_timeslice, attotime::from_usec(m_minit_boost));
|
||||
machine().scheduler().trigger(1000);
|
||||
machine().scheduler().synchronize(); // force resync
|
||||
m_slave->pulse_frt_input();
|
||||
@ -85,7 +85,7 @@ void saturn_state::minit_w(uint32_t data)
|
||||
void saturn_state::sinit_w(uint32_t data)
|
||||
{
|
||||
//logerror("%s SINIT write = %08x\n", machine().describe_context(),data);
|
||||
machine().scheduler().boost_interleave(m_sinit_boost_timeslice, attotime::from_usec(m_sinit_boost));
|
||||
machine().scheduler().add_quantum(m_sinit_boost_timeslice, attotime::from_usec(m_sinit_boost));
|
||||
machine().scheduler().synchronize(); // force resync
|
||||
m_maincpu->pulse_frt_input();
|
||||
}
|
||||
@ -116,7 +116,7 @@ void saturn_state::saturn_minit_w(uint32_t data)
|
||||
machine().scheduler().synchronize(); // force resync
|
||||
else
|
||||
{
|
||||
machine().scheduler().boost_interleave(m_minit_boost_timeslice, attotime::from_usec(m_minit_boost));
|
||||
machine().scheduler().add_quantum(m_minit_boost_timeslice, attotime::from_usec(m_minit_boost));
|
||||
machine().scheduler().trigger(1000);
|
||||
}
|
||||
|
||||
@ -129,7 +129,7 @@ void saturn_state::saturn_sinit_w(uint32_t data)
|
||||
if(m_fake_comms->read() & 1)
|
||||
machine().scheduler().synchronize(); // force resync
|
||||
else
|
||||
machine().scheduler().boost_interleave(m_sinit_boost_timeslice, attotime::from_usec(m_sinit_boost));
|
||||
machine().scheduler().add_quantum(m_sinit_boost_timeslice, attotime::from_usec(m_sinit_boost));
|
||||
|
||||
m_maincpu->pulse_frt_input();
|
||||
}
|
||||
|
@ -494,7 +494,7 @@ void monsterb_sound_device::n7751_command_w(uint8_t data)
|
||||
*/
|
||||
m_n7751_command = data & 0x07;
|
||||
m_audiocpu->set_input_line(0, ((data & 0x08) == 0) ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(100));
|
||||
}
|
||||
|
||||
|
||||
|
@ -334,7 +334,7 @@ void segahang_state::machine_reset()
|
||||
TIMER_CALLBACK_MEMBER(segahang_state::i8751_sync)
|
||||
{
|
||||
if (m_mcu != nullptr)
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_msec(10));
|
||||
machine().scheduler().perfect_quantum(attotime::from_msec(10));
|
||||
}
|
||||
|
||||
TIMER_CALLBACK_MEMBER(segahang_state::ppi_sync)
|
||||
|
@ -825,7 +825,7 @@ void segaorun_state::update_main_irqs()
|
||||
|
||||
// boost interleave during VBLANK and IRQ2 signals
|
||||
if (m_vblank_irq_state || m_irq2_state)
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(100));
|
||||
}
|
||||
|
||||
|
||||
|
@ -363,7 +363,7 @@ void segas16a_state::n7751_control_w(uint8_t data)
|
||||
//
|
||||
m_n7751->set_input_line(INPUT_LINE_RESET, (data & 0x01) ? CLEAR_LINE : ASSERT_LINE);
|
||||
m_n7751->set_input_line(0, (data & 0x02) ? CLEAR_LINE : ASSERT_LINE);
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(100));
|
||||
}
|
||||
|
||||
|
||||
@ -452,7 +452,7 @@ void segas16a_state::mcu_control_w(uint8_t data)
|
||||
|
||||
// apply an extra boost if the main CPU is just waking up
|
||||
if ((m_mcu_control ^ data) & 0x40)
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(10));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(10));
|
||||
|
||||
// remember the remaining bits, which control read/write access to main CPU space
|
||||
m_mcu_control = data;
|
||||
@ -593,7 +593,7 @@ WRITE_LINE_MEMBER(segas16a_state::i8751_main_cpu_vblank_w)
|
||||
|
||||
// boost interleave to ensure that the MCU can break the M68000 out of a STOP
|
||||
if (state)
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(100));
|
||||
}
|
||||
}
|
||||
|
||||
@ -644,7 +644,7 @@ TIMER_CALLBACK_MEMBER(segas16a_state::i8751_sync)
|
||||
if (!m_i8751_vblank_hook.isnull())
|
||||
m_mcu->suspend(SUSPEND_REASON_DISABLE, 1);
|
||||
else if (m_mcu != nullptr)
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_msec(10));
|
||||
machine().scheduler().perfect_quantum(attotime::from_msec(10));
|
||||
}
|
||||
|
||||
TIMER_CALLBACK_MEMBER(segas16a_state::ppi_sync)
|
||||
|
@ -1316,7 +1316,7 @@ TIMER_CALLBACK_MEMBER(segas16b_state::i8751_sync)
|
||||
if (!m_i8751_vblank_hook.isnull())
|
||||
m_mcu->suspend(SUSPEND_REASON_DISABLE, 1);
|
||||
else if (m_mcu != nullptr)
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_msec(10));
|
||||
machine().scheduler().perfect_quantum(attotime::from_msec(10));
|
||||
}
|
||||
|
||||
TIMER_CALLBACK_MEMBER(segas16b_state::atomicp_sound_irq)
|
||||
|
@ -155,7 +155,7 @@ void segas18_state::init_generic(segas18_rom_board rom_board)
|
||||
|
||||
TIMER_CALLBACK_MEMBER(segas18_state::initial_boost)
|
||||
{
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_msec(10));
|
||||
machine().scheduler().perfect_quantum(attotime::from_msec(10));
|
||||
}
|
||||
|
||||
void segas18_state::machine_start()
|
||||
|
@ -234,7 +234,7 @@ void usb_sound_device::data_w(u8 data)
|
||||
machine().scheduler().synchronize(timer_expired_delegate(FUNC(usb_sound_device::delayed_usb_data_w), this), data);
|
||||
|
||||
// boost the interleave so that sequences can be sent
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(250));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(250));
|
||||
}
|
||||
|
||||
|
||||
|
@ -561,7 +561,7 @@ void segaxbd_state::iocontrol_w(offs_t offset, uint16_t data, uint16_t mem_mask)
|
||||
void segaxbd_state::loffire_sync0_w(offs_t offset, uint16_t data, uint16_t mem_mask)
|
||||
{
|
||||
COMBINE_DATA(&m_loffire_sync[offset]);
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(10));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(10));
|
||||
}
|
||||
|
||||
|
||||
@ -806,7 +806,7 @@ void segaxbd_state::update_main_irqs()
|
||||
if (irq)
|
||||
{
|
||||
m_maincpu->set_input_line(irq, ASSERT_LINE);
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(100));
|
||||
}
|
||||
}
|
||||
|
||||
@ -819,7 +819,7 @@ void segaxbd_state::update_main_irqs()
|
||||
WRITE_LINE_MEMBER(segaxbd_state::m68k_reset_callback)
|
||||
{
|
||||
m_subcpu->pulse_input_line(INPUT_LINE_RESET, attotime::zero);
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(100));
|
||||
}
|
||||
|
||||
|
||||
|
@ -707,7 +707,7 @@ void segaybd_state::update_irqs()
|
||||
m_suby->set_input_line(6, m_timer_irq_state && m_vblank_irq_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
|
||||
if (m_timer_irq_state || m_vblank_irq_state)
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(50));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(50));
|
||||
}
|
||||
|
||||
|
||||
|
@ -630,7 +630,7 @@ void system1_state::soundport_w(u8 data)
|
||||
{
|
||||
/* boost interleave when communicating with the sound CPU */
|
||||
m_soundlatch->write(data);
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(100));
|
||||
}
|
||||
|
||||
|
||||
@ -662,7 +662,7 @@ void system1_state::mcu_control_w(u8 data)
|
||||
|
||||
/* boost interleave to ensure that the MCU can break the Z80 out of a HALT */
|
||||
if (!BIT(m_mcu_control, 6) && BIT(data, 6))
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(10));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(10));
|
||||
|
||||
m_mcu_control = data;
|
||||
m_maincpu->set_input_line(INPUT_LINE_HALT, (data & 0x40) ? ASSERT_LINE : CLEAR_LINE);
|
||||
@ -779,7 +779,7 @@ void system1_state::nob_maincpu_latch_w(u8 data)
|
||||
{
|
||||
m_nob_maincpu_latch = data;
|
||||
m_mcu->set_input_line(MCS51_INT0_LINE, ASSERT_LINE);
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(100));
|
||||
}
|
||||
|
||||
|
||||
|
@ -1479,7 +1479,7 @@ int dcs_audio_device::control_r()
|
||||
{
|
||||
/* only boost for DCS2 boards */
|
||||
if (!m_auto_ack && !m_transfer.hle_enabled)
|
||||
machine().scheduler().boost_interleave(attotime::from_nsec(500), attotime::from_usec(5));
|
||||
machine().scheduler().add_quantum(attotime::from_nsec(500), attotime::from_usec(5));
|
||||
if ( /* m_rev == REV_DSC1 || */ m_rev == REV_DCS1P5) // == 1 check breaks mk3
|
||||
return IS_OUTPUT_FULL() ? 0x80 : 0x00;
|
||||
return m_latch_control;
|
||||
@ -1539,7 +1539,7 @@ void dcs_audio_device::dcs_delayed_data_w(uint16_t data)
|
||||
logerror("%s:dcs_data_w(%04X)\n", machine().describe_context(), data);
|
||||
|
||||
/* boost the interleave temporarily */
|
||||
machine().scheduler().boost_interleave(attotime::from_nsec(500), attotime::from_usec(5));
|
||||
machine().scheduler().add_quantum(attotime::from_nsec(500), attotime::from_usec(5));
|
||||
|
||||
/* set the IRQ line on the ADSP */
|
||||
m_cpu->set_input_line(ADSP2105_IRQ2, ASSERT_LINE);
|
||||
|
@ -58,7 +58,7 @@ void acclaim_rax_device::data_w(uint16_t data)
|
||||
{
|
||||
m_data_in->write(data);
|
||||
m_cpu->set_input_line(ADSP2181_IRQL0, ASSERT_LINE);
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(5));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(5));
|
||||
}
|
||||
|
||||
|
||||
|
@ -841,7 +841,7 @@ TIMER_CALLBACK_MEMBER(williams_adpcm_sound_device::sync_command)
|
||||
{
|
||||
m_cpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE);
|
||||
m_sound_int_state = 1;
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(100));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -491,7 +491,7 @@ TIMER_CALLBACK_MEMBER(pitnrun_mcu_state::mcu_real_data_w)
|
||||
void pitnrun_mcu_state::mcu_data_w(uint8_t data)
|
||||
{
|
||||
machine().scheduler().synchronize(timer_expired_delegate(FUNC(pitnrun_mcu_state::mcu_real_data_w), this), data);
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(5));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(5));
|
||||
}
|
||||
|
||||
uint8_t pitnrun_mcu_state::mcu_status_r()
|
||||
|
@ -171,7 +171,7 @@ void qixmcu_state::coinctrl_w(uint8_t data)
|
||||
m_mcu->set_input_line(M68705_IRQ_LINE, ASSERT_LINE);
|
||||
/* temporarily boost the interleave to sync things up */
|
||||
/* note: I'm using 50 because 30 is not enough for space dungeon at game over */
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(50));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(50));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -869,7 +869,7 @@ void hotsmash_state::hotsmash_z80_mcu_w(u8 data)
|
||||
//if ((m_from_z80 != 0x04) && (m_from_z80 != 0x08))
|
||||
// logerror("%s: z80 write to MCU %02x; Z80HasWritten: %d (and will be 1 after this); MCUHasWritten: %d\n",machine().describe_context(), m_from_z80, m_z80_has_written, m_mcu_has_written);
|
||||
m_z80_has_written = 1; // set the semaphore, and assert interrupt on the mcu
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(250)); //boost the interleave temporarily, or the game will crash.
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(250)); //boost the interleave temporarily, or the game will crash.
|
||||
m_mcu->set_input_line(M68705_IRQ_LINE, ASSERT_LINE);
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@ u8 taito_sj_security_mcu_device::data_r(address_space &space, offs_t offset)
|
||||
if (BIT(offset, 0))
|
||||
{
|
||||
// ZLSTATUS
|
||||
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(10));
|
||||
machine().scheduler().perfect_quantum(attotime::from_usec(10));
|
||||
return
|
||||
(u8(space.unmap()) & 0xfc) |
|
||||
u8(m_zaccept ? 0x00 : 0x02) |
|
||||
@ -66,7 +66,7 @@ void taito_sj_security_mcu_device::data_w(offs_t offset, u8 data)
|
||||
// ZLWRITE
|
||||
device_scheduler &sched(machine().scheduler());
|
||||
sched.synchronize(timer_expired_delegate(FUNC(taito_sj_security_mcu_device::do_host_write), this), data);
|
||||
sched.boost_interleave(attotime::zero, attotime::from_usec(10));
|
||||
sched.perfect_quantum(attotime::from_usec(10));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user