CIA6526: fixed FLAG handling

This commit is contained in:
Curt Coder 2009-12-16 12:11:52 +00:00
parent b2c155b9f7
commit 3dde298da4

View File

@ -144,6 +144,7 @@ static DEVICE_START( cia )
cia->device = device; cia->device = device;
devcb_resolve_write_line(&cia->irq_func, &intf->irq_func, device); devcb_resolve_write_line(&cia->irq_func, &intf->irq_func, device);
devcb_resolve_write_line(&cia->pc_func, &intf->pc_func, device); devcb_resolve_write_line(&cia->pc_func, &intf->pc_func, device);
cia->flag = 1;
/* setup ports */ /* setup ports */
for (p = 0; p < (sizeof(cia->port) / sizeof(cia->port[0])); p++) for (p = 0; p < (sizeof(cia->port) / sizeof(cia->port[0])); p++)
@ -663,9 +664,10 @@ WRITE_LINE_DEVICE_HANDLER( mos6526_flag_w )
if (cia->flag && !state) if (cia->flag && !state)
{ {
cia->flag = state;
cia_issue_index(device); cia_issue_index(device);
} }
cia->flag = state;
} }
/*------------------------------------------------- /*-------------------------------------------------