mirror of
https://github.com/holub/mame
synced 2025-04-26 10:13:37 +03:00
Improve the speed of romident by dynamically allocating some large device member arrays at device_start time instead [Phil Bennett]
This commit is contained in:
parent
b6553ce020
commit
c95f7878e6
@ -1147,7 +1147,7 @@ void ay8910_device::build_mixer_table()
|
|||||||
*/
|
*/
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
build_3D_table(m_res_load[0], m_par, m_par_env, normalize, 3, m_zero_is_off, m_vol3d_table);
|
build_3D_table(m_res_load[0], m_par, m_par_env, normalize, 3, m_zero_is_off, m_vol3d_table.get());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1200,6 +1200,8 @@ void ay8910_device::device_start()
|
|||||||
m_streams = 1;
|
m_streams = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_vol3d_table = make_unique_clear<int32_t[]>(8*32*32*32);
|
||||||
|
|
||||||
build_mixer_table();
|
build_mixer_table();
|
||||||
|
|
||||||
/* The envelope is pacing twice as fast for the YM2149 as for the AY-3-8910, */
|
/* The envelope is pacing twice as fast for the YM2149 as for the AY-3-8910, */
|
||||||
@ -1512,7 +1514,6 @@ ay8910_device::ay8910_device(const machine_config &mconfig, device_type type, co
|
|||||||
memset(&m_vol_enabled,0,sizeof(m_vol_enabled));
|
memset(&m_vol_enabled,0,sizeof(m_vol_enabled));
|
||||||
memset(&m_vol_table,0,sizeof(m_vol_table));
|
memset(&m_vol_table,0,sizeof(m_vol_table));
|
||||||
memset(&m_env_table,0,sizeof(m_env_table));
|
memset(&m_env_table,0,sizeof(m_env_table));
|
||||||
memset(&m_vol3d_table,0,sizeof(m_vol3d_table));
|
|
||||||
m_res_load[0] = m_res_load[1] = m_res_load[2] = 1000; //Default values for resistor loads
|
m_res_load[0] = m_res_load[1] = m_res_load[2] = 1000; //Default values for resistor loads
|
||||||
|
|
||||||
set_type(psg_type);
|
set_type(psg_type);
|
||||||
|
@ -190,7 +190,7 @@ private:
|
|||||||
const ay_ym_param *m_par_env;
|
const ay_ym_param *m_par_env;
|
||||||
int32_t m_vol_table[NUM_CHANNELS][16];
|
int32_t m_vol_table[NUM_CHANNELS][16];
|
||||||
int32_t m_env_table[NUM_CHANNELS][32];
|
int32_t m_env_table[NUM_CHANNELS][32];
|
||||||
int32_t m_vol3d_table[8*32*32*32];
|
std::unique_ptr<int32_t[]> m_vol3d_table;
|
||||||
int m_flags; /* Flags */
|
int m_flags; /* Flags */
|
||||||
int m_res_load[3]; /* Load on channel in ohms */
|
int m_res_load[3]; /* Load on channel in ohms */
|
||||||
devcb_read8 m_port_a_read_cb;
|
devcb_read8 m_port_a_read_cb;
|
||||||
|
@ -39,9 +39,12 @@ taito_en_device::taito_en_device(const machine_config &mconfig, const char *tag,
|
|||||||
|
|
||||||
void taito_en_device::device_start()
|
void taito_en_device::device_start()
|
||||||
{
|
{
|
||||||
|
// TODO: 16Mx32? Not likely!
|
||||||
|
m_es5510_dram = std::make_unique<uint32_t[]>(1<<24);
|
||||||
|
|
||||||
|
save_pointer(NAME(m_es5510_dram.get()), 1<<24);
|
||||||
save_item(NAME(m_es5510_dsp_ram));
|
save_item(NAME(m_es5510_dsp_ram));
|
||||||
save_item(NAME(m_es5510_gpr));
|
save_item(NAME(m_es5510_gpr));
|
||||||
save_item(NAME(m_es5510_dram));
|
|
||||||
save_item(NAME(m_es5510_dol_latch));
|
save_item(NAME(m_es5510_dol_latch));
|
||||||
save_item(NAME(m_es5510_dil_latch));
|
save_item(NAME(m_es5510_dil_latch));
|
||||||
save_item(NAME(m_es5510_dadr_latch));
|
save_item(NAME(m_es5510_dadr_latch));
|
||||||
|
@ -43,9 +43,9 @@ private:
|
|||||||
required_device<mb87078_device> m_mb87078;
|
required_device<mb87078_device> m_mb87078;
|
||||||
|
|
||||||
//todo: hook up cpu/es5510
|
//todo: hook up cpu/es5510
|
||||||
|
std::unique_ptr<uint32_t[]> m_es5510_dram;
|
||||||
uint16_t m_es5510_dsp_ram[0x200];
|
uint16_t m_es5510_dsp_ram[0x200];
|
||||||
uint32_t m_es5510_gpr[0xc0];
|
uint32_t m_es5510_gpr[0xc0];
|
||||||
uint32_t m_es5510_dram[1<<24];
|
|
||||||
uint32_t m_es5510_dol_latch;
|
uint32_t m_es5510_dol_latch;
|
||||||
uint32_t m_es5510_dil_latch;
|
uint32_t m_es5510_dil_latch;
|
||||||
uint32_t m_es5510_dadr_latch;
|
uint32_t m_es5510_dadr_latch;
|
||||||
|
@ -940,9 +940,10 @@ WRITE32_MEMBER( powervr2_device::softreset_w )
|
|||||||
logerror("%s: Core Pipeline soft reset\n", tag());
|
logerror("%s: Core Pipeline soft reset\n", tag());
|
||||||
#endif
|
#endif
|
||||||
if (start_render_received == 1) {
|
if (start_render_received == 1) {
|
||||||
for (auto & elem : grab)
|
for (int a=0;a < NUM_BUFFERS;a++)
|
||||||
if (elem.busy == 1)
|
if (grab[a].busy == 1)
|
||||||
elem.busy = 0;
|
grab[a].busy = 0;
|
||||||
|
|
||||||
start_render_received = 0;
|
start_render_received = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3620,7 +3621,8 @@ void powervr2_device::device_start()
|
|||||||
{
|
{
|
||||||
irq_cb.resolve_safe();
|
irq_cb.resolve_safe();
|
||||||
|
|
||||||
memset(grab, 0, sizeof(grab));
|
grab = make_unique_clear<receiveddata[]>(NUM_BUFFERS);
|
||||||
|
|
||||||
pvr_build_parameterconfig();
|
pvr_build_parameterconfig();
|
||||||
|
|
||||||
computedilated();
|
computedilated();
|
||||||
|
@ -108,7 +108,7 @@ public:
|
|||||||
int renderselect;
|
int renderselect;
|
||||||
int listtype_used;
|
int listtype_used;
|
||||||
int alloc_ctrl_OPB_Mode, alloc_ctrl_PT_OPB, alloc_ctrl_TM_OPB, alloc_ctrl_T_OPB, alloc_ctrl_OM_OPB, alloc_ctrl_O_OPB;
|
int alloc_ctrl_OPB_Mode, alloc_ctrl_PT_OPB, alloc_ctrl_TM_OPB, alloc_ctrl_T_OPB, alloc_ctrl_OM_OPB, alloc_ctrl_O_OPB;
|
||||||
receiveddata grab[NUM_BUFFERS];
|
std::unique_ptr<receiveddata[]> grab;
|
||||||
int grabsel;
|
int grabsel;
|
||||||
int grabsellast;
|
int grabsellast;
|
||||||
uint32_t paracontrol,paratype,endofstrip,listtype,global_paratype,parameterconfig;
|
uint32_t paracontrol,paratype,endofstrip,listtype,global_paratype,parameterconfig;
|
||||||
|
Loading…
Reference in New Issue
Block a user