mirror of
https://github.com/holub/mame
synced 2025-04-22 00:11:58 +03:00
model1.cpp: Implement workaround for race condition that caused vf to lose sound (MT #6587). This fix causes swa to show an error message before booting normally, due to the I/O board not being emulated properly in the first place.
This commit is contained in:
parent
05320d9bd5
commit
59ddc844b2
@ -784,11 +784,24 @@ READ16_MEMBER(model1_state::network_ctl_r)
|
||||
if(offset)
|
||||
return 0x40;
|
||||
else
|
||||
return 0x00;
|
||||
return m_io_command;
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(model1_state::network_ctl_w)
|
||||
{
|
||||
if (offset == 0)
|
||||
{
|
||||
m_io_command = data & 0xff;
|
||||
|
||||
// totally made up; proper emulation of I/O board needed
|
||||
// (command 3 is EEPROM write, so should take a lot longer)
|
||||
m_io_timer->adjust(data == 3 ? attotime::from_msec(100) : attotime::from_usec(10));
|
||||
}
|
||||
}
|
||||
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(model1_state::io_command_acknowledge)
|
||||
{
|
||||
m_io_command = 0;
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(model1_state::md1_w)
|
||||
@ -1605,6 +1618,7 @@ static MACHINE_CONFIG_START( model1 )
|
||||
MCFG_CPU_IRQ_ACKNOWLEDGE_DRIVER(model1_state,irq_callback)
|
||||
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", model1_state, model1_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD("iotimer", model1_state, io_command_acknowledge)
|
||||
|
||||
MCFG_MACHINE_START_OVERRIDE(model1_state,model1)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(model1_state,model1)
|
||||
@ -1654,7 +1668,9 @@ static MACHINE_CONFIG_START( model1_vr )
|
||||
MCFG_CPU_PROGRAM_MAP(model1_vr_mem)
|
||||
MCFG_CPU_IO_MAP(model1_vr_io)
|
||||
MCFG_CPU_IRQ_ACKNOWLEDGE_DRIVER(model1_state,irq_callback)
|
||||
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", model1_state, model1_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD("iotimer", model1_state, io_command_acknowledge)
|
||||
|
||||
MCFG_CPU_ADD("tgp", MB86233, 16000000)
|
||||
MCFG_CPU_PROGRAM_MAP(model1_vr_tgp_map)
|
||||
|
@ -38,6 +38,7 @@ public:
|
||||
, m_dsbz80(*this, DSBZ80_TAG)
|
||||
, m_tgp(*this, "tgp")
|
||||
, m_screen(*this, "screen")
|
||||
, m_io_timer(*this, "iotimer")
|
||||
, m_mr2(*this, "mr2")
|
||||
, m_mr(*this, "mr")
|
||||
, m_display_list0(*this, "display_list0")
|
||||
@ -58,6 +59,7 @@ public:
|
||||
|
||||
DECLARE_READ16_MEMBER(network_ctl_r);
|
||||
DECLARE_WRITE16_MEMBER(network_ctl_w);
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(io_command_acknowledge);
|
||||
|
||||
DECLARE_READ16_MEMBER(io_r);
|
||||
DECLARE_WRITE16_MEMBER(io_w);
|
||||
@ -188,6 +190,8 @@ private:
|
||||
bool m_dump;
|
||||
bool m_swa;
|
||||
|
||||
uint8_t m_io_command;
|
||||
|
||||
// Devices
|
||||
required_device<v60_device> m_maincpu; // V60
|
||||
required_device<segam1audio_device> m_m1audio; // Model 1 standard sound board
|
||||
@ -196,6 +200,7 @@ private:
|
||||
optional_device<dsbz80_device> m_dsbz80; // Digital Sound Board
|
||||
optional_device<mb86233_cpu_device> m_tgp;
|
||||
required_device<screen_device> m_screen;
|
||||
required_device<timer_device> m_io_timer;
|
||||
|
||||
required_shared_ptr<uint16_t> m_mr2;
|
||||
required_shared_ptr<uint16_t> m_mr;
|
||||
|
@ -1942,6 +1942,7 @@ WRITE16_MEMBER(model1_state::model1_tgp_copro_ram_w)
|
||||
MACHINE_START_MEMBER(model1_state,model1)
|
||||
{
|
||||
m_ram_data = std::make_unique<uint32_t[]>(0x10000);
|
||||
m_io_command = 0;
|
||||
|
||||
save_pointer(NAME(m_ram_data.get()), 0x10000);
|
||||
save_item(NAME(m_ram_adr));
|
||||
@ -1959,6 +1960,7 @@ MACHINE_START_MEMBER(model1_state,model1)
|
||||
save_item(NAME(m_mat_stack_pos));
|
||||
save_item(NAME(m_acc));
|
||||
save_item(NAME(m_list_length));
|
||||
save_item(NAME(m_io_command));
|
||||
}
|
||||
|
||||
void model1_state::tgp_reset(bool swa)
|
||||
|
Loading…
Reference in New Issue
Block a user