harddriv.cpp: worked around a strtdriv sound regression (nw)

This commit is contained in:
Ivan Vangelista 2017-05-27 11:32:20 +02:00
parent 2d4ba2471d
commit 7281fbfae7
2 changed files with 5 additions and 4 deletions

View File

@ -412,7 +412,7 @@ harddriv_state::harddriv_state(const machine_config &mconfig, device_type type,
m_adsp_eprom_base(0),
m_sim_memory(*this, "user1"),
m_adsp_pgm_memory_word(nullptr),
m_ds3_sdata_memory(*this, "ds3sdsp_data"),
m_ds3_sdata_memory(nullptr),
m_ds3_sdata_memory_size(0),
m_ds3_gcmd(0),
m_ds3_gflag(0),
@ -4699,8 +4699,9 @@ void harddriv_state::init_ds3()
m_maincpu->space(AS_PROGRAM).install_write_handler(0x823000, 0x8237ff, write16_delegate(FUNC(harddriv_state::hd68k_ds3_sirq_clear_w), this));
m_maincpu->space(AS_PROGRAM).install_write_handler(0x823800, 0x823fff, write16_delegate(FUNC(harddriv_state::hd68k_ds3_control_w), this));
/* predetermine memory regions */
m_ds3_sdata_memory_size = m_ds3_sdata_memory.bytes() / 2;
/* predetermine memory regions, can't use a region_ptr because strtdriv expects uint8_t while hdrivair expects uint16_t */
m_ds3_sdata_memory = (uint16_t*)memregion("ds3sdsp_data")->base();
m_ds3_sdata_memory_size = memregion("ds3sdsp_data")->bytes() / 2;
/*

View File

@ -352,7 +352,7 @@ protected:
uint16_t m_som_memory[0x8000/2];
uint16_t * m_adsp_pgm_memory_word;
optional_region_ptr<uint16_t> m_ds3_sdata_memory;
uint16_t * m_ds3_sdata_memory;
uint32_t m_ds3_sdata_memory_size;
uint8_t m_ds3_gcmd;