Sounds like the reason of un-registed post_load function in tms9928a.c.
Current postload in this driver is the follwoing.
Code:
void TMS9928A_post_load (running_machine *machine) {
int i;
/* all registers need to be re-written, so tables are recalculated */
for (i=0;i<8;i++)
change_register (machine, i, tms.Regs[i]);
/* make sure the interrupt request is set properly */
if (tms.INTCallback) tms.INTCallback (machine, tms.INT);
}
But I doubt it is called from others. So...
Code:
static STATE_POSTLOAD ( tms9928a_postload )
{
// all registers need to be re-written, so tables are recalculated
for (int i = 0; i < 8 ; i++)
change_register (machine, i, tms.Regs[i]);
// make sure the interrupt request is set properly
if (tms.INTCallback != NULL)
tms.INTCallback (machine, tms.INT);
}
Of course, the above postload() is required to regist in TMS9928A_start()
Code:
static void TMS9928A_start (running_machine *machine, const TMS9928a_interface *intf)
{
...
state_save_register_item(machine, "tms9928a", NULL, 0, tms.Regs[0]);
state_save_register_item(machine, "tms9928a", NULL, 0, tms.Regs[1]);
state_save_register_item(machine, "tms9928a", NULL, 0, tms.Regs[2]);
state_save_register_item(machine, "tms9928a", NULL, 0, tms.Regs[3]);
state_save_register_item(machine, "tms9928a", NULL, 0, tms.Regs[4]);
state_save_register_item(machine, "tms9928a", NULL, 0, tms.Regs[5]);
state_save_register_item(machine, "tms9928a", NULL, 0, tms.Regs[6]);
state_save_register_item(machine, "tms9928a", NULL, 0, tms.Regs[7]);
state_save_register_item(machine, "tms9928a", NULL, 0, tms.StatusReg);
state_save_register_item(machine, "tms9928a", NULL, 0, tms.ReadAhead);
state_save_register_item(machine, "tms9928a", NULL, 0, tms.FirstByte);
state_save_register_item(machine, "tms9928a", NULL, 0, tms.latch);
state_save_register_item(machine, "tms9928a", NULL, 0, tms.Addr);
state_save_register_item(machine, "tms9928a", NULL, 0, tms.INT);
state_save_register_item_pointer(machine, "tms9928a", NULL, 0, tms.vMem, intf->vram);
state_save_register_postload(machine, tms9928a_postload, NULL);
..."-autosave" and "-state" for pesadelo seem to re-load fine.
But pengadvb which marks support_save flag and has the same problem causes freeze via autosave/state though gfx will be restored correctly.
Also state_postload may be required to add into pengadvb.c
Code:
static STATE_POSTLOAD( pengadvb_postload )
{
mem_map_banks(machine);
}