mirror of
https://github.com/holub/mame
synced 2025-05-02 12:36:41 +03:00
Make memset been used in cpu core in unique way (no whatsnew)
This commit is contained in:
parent
cce564d3f2
commit
8355b34753
@ -251,7 +251,7 @@ static CPU_INIT( esrip )
|
|||||||
esrip_state *cpustate = get_safe_token(device);
|
esrip_state *cpustate = get_safe_token(device);
|
||||||
esrip_config* _config = (esrip_config*)device->static_config();
|
esrip_config* _config = (esrip_config*)device->static_config();
|
||||||
|
|
||||||
memset(cpustate, 0, sizeof(esrip_state));
|
memset(cpustate, 0, sizeof(*cpustate));
|
||||||
|
|
||||||
/* Register configuration structure callbacks */
|
/* Register configuration structure callbacks */
|
||||||
cpustate->fdt_r = _config->fdt_r;
|
cpustate->fdt_r = _config->fdt_r;
|
||||||
|
@ -331,7 +331,7 @@ static CPU_INIT( g65816 )
|
|||||||
{
|
{
|
||||||
g65816i_cpu_struct *cpustate = get_safe_token(device);
|
g65816i_cpu_struct *cpustate = get_safe_token(device);
|
||||||
|
|
||||||
memset(cpustate, 0, sizeof(g65816i_cpu_struct));
|
memset(cpustate, 0, sizeof(*cpustate));
|
||||||
|
|
||||||
g65816_set_irq_callback(cpustate, irqcallback);
|
g65816_set_irq_callback(cpustate, irqcallback);
|
||||||
cpustate->device = device;
|
cpustate->device = device;
|
||||||
|
@ -891,7 +891,7 @@ static CPU_INIT( m37710 )
|
|||||||
m37710i_cpu_struct *cpustate = get_safe_token(device);
|
m37710i_cpu_struct *cpustate = get_safe_token(device);
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
memset(cpustate, 0, sizeof(m37710i_cpu_struct));
|
memset(cpustate, 0, sizeof(*cpustate));
|
||||||
|
|
||||||
INT_ACK = irqcallback;
|
INT_ACK = irqcallback;
|
||||||
cpustate->device = device;
|
cpustate->device = device;
|
||||||
|
@ -488,7 +488,7 @@ static CPU_RESET( m6805 )
|
|||||||
m6805_Regs *cpustate = get_safe_token(device);
|
m6805_Regs *cpustate = get_safe_token(device);
|
||||||
|
|
||||||
device_irq_callback save_irqcallback = cpustate->irq_callback;
|
device_irq_callback save_irqcallback = cpustate->irq_callback;
|
||||||
memset(cpustate, 0, sizeof(m6805_Regs));
|
memset(cpustate, 0, sizeof(*cpustate));
|
||||||
|
|
||||||
cpustate->iCount=50000; /* Used to be global */
|
cpustate->iCount=50000; /* Used to be global */
|
||||||
cpustate->irq_callback = save_irqcallback;
|
cpustate->irq_callback = save_irqcallback;
|
||||||
|
@ -343,7 +343,7 @@ static void nec_init(legacy_cpu_device *device, device_irq_callback irqcallback)
|
|||||||
Mod_RM.RM.b[i] = breg_name[i & 7];
|
Mod_RM.RM.b[i] = breg_name[i & 7];
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(nec_state, 0, sizeof(nec_state_t));
|
memset(nec_state, 0, sizeof(*nec_state));
|
||||||
|
|
||||||
device->save_item(NAME(nec_state->regs.w));
|
device->save_item(NAME(nec_state->regs.w));
|
||||||
device->save_item(NAME(nec_state->sregs));
|
device->save_item(NAME(nec_state->sregs));
|
||||||
|
@ -432,7 +432,7 @@ static void v25_init(legacy_cpu_device *device, device_irq_callback irqcallback)
|
|||||||
Mod_RM.RM.b[i] = breg_name[i & 7];
|
Mod_RM.RM.b[i] = breg_name[i & 7];
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(nec_state, 0, sizeof(v25_state_t));
|
memset(nec_state, 0, sizeof(*nec_state));
|
||||||
|
|
||||||
nec_state->config = config;
|
nec_state->config = config;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user