mirror of
https://github.com/holub/mame
synced 2025-07-05 01:48:29 +03:00
-machine/68340.cpp, machine/scc68070.cpp: Don't mess with devcbs in device_start.
-bfm/bfm_swp.cpp: Fixed ROM offset mask (it's words, not bytes).
This commit is contained in:
parent
ae63f9316f
commit
0ecbe63a38
@ -256,8 +256,6 @@ void m68340_cpu_device::set_modck(int state)
|
||||
|
||||
void m68340_cpu_device::device_start()
|
||||
{
|
||||
reset_cb().append(*this, FUNC(m68340_cpu_device::reset_peripherals));
|
||||
|
||||
fscpu32_device::device_start();
|
||||
|
||||
m_m68340SIM = new m68340_sim();
|
||||
@ -273,11 +271,23 @@ void m68340_cpu_device::device_start()
|
||||
m_internal = &space(AS_PROGRAM);
|
||||
}
|
||||
|
||||
|
||||
void m68340_cpu_device::device_config_complete()
|
||||
{
|
||||
fscpu32_device::device_config_complete();
|
||||
|
||||
reset_cb().append(*this, FUNC(m68340_cpu_device::reset_peripherals));
|
||||
}
|
||||
|
||||
|
||||
void m68340_cpu_device::reset_peripherals(int state)
|
||||
{
|
||||
if (state)
|
||||
{
|
||||
m_m68340SIM->module_reset();
|
||||
m_m68340DMA->module_reset();
|
||||
m_serial->module_reset();
|
||||
m_timer[0]->module_reset();
|
||||
m_timer[1]->module_reset();
|
||||
}
|
||||
}
|
||||
|
@ -46,6 +46,7 @@ protected:
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
virtual void device_config_complete() override;
|
||||
|
||||
void reset_peripherals(int state);
|
||||
|
||||
|
@ -266,8 +266,6 @@ scc68070_device::scc68070_device(const machine_config &mconfig, const char *tag,
|
||||
|
||||
void scc68070_device::device_start()
|
||||
{
|
||||
reset_cb().append(*this, FUNC(scc68070_device::reset_peripherals));
|
||||
|
||||
scc68070_base_device::device_start();
|
||||
|
||||
save_item(NAME(m_ipl));
|
||||
@ -429,8 +427,19 @@ void scc68070_device::device_reset()
|
||||
set_timer_callback(0);
|
||||
}
|
||||
|
||||
|
||||
void scc68070_device::device_config_complete()
|
||||
{
|
||||
scc68070_base_device::device_config_complete();
|
||||
|
||||
reset_cb().append(*this, FUNC(scc68070_device::reset_peripherals));
|
||||
}
|
||||
|
||||
|
||||
void scc68070_device::reset_peripherals(int state)
|
||||
{
|
||||
if (state)
|
||||
{
|
||||
m_lir = 0;
|
||||
|
||||
m_picr1 = 0;
|
||||
@ -466,6 +475,7 @@ void scc68070_device::reset_peripherals(int state)
|
||||
m_i2c.timer->adjust(attotime::never);
|
||||
|
||||
update_ipl();
|
||||
}
|
||||
}
|
||||
|
||||
void scc68070_device::update_ipl()
|
||||
|
@ -193,6 +193,7 @@ protected:
|
||||
// device_t implementation
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
virtual void device_config_complete() override;
|
||||
|
||||
// device_execute_interface implementation
|
||||
virtual u64 execute_clocks_to_cycles(u64 clocks) const noexcept override { return (clocks + 2 - 1) / 2; }
|
||||
|
@ -149,7 +149,7 @@ uint16_t bfm_swp_state::bfm_swp_mem_r(offs_t offset, uint16_t mem_mask)
|
||||
switch ( cs )
|
||||
{
|
||||
case 1:
|
||||
return m_cpuregion[offset & 0xfffff];
|
||||
return m_cpuregion[offset & 0x7ffff];
|
||||
case 2:
|
||||
return m_mainram[offset & 0x1fff];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user