The PIT now decreases the latched count by 1 if the counter's count is latched when the count is set to a new mode, fixes Mortal Kombat 1 for DOS hanging when attempting to play music on the OPL.
This commit is contained in:
@@ -567,6 +567,11 @@ pit_write(uint16_t addr, uint8_t val, void *priv)
|
||||
ctr->null_count = 1;
|
||||
ctr_set_out(ctr, !!ctr->m);
|
||||
ctr->state = 0;
|
||||
if (ctr->latched) {
|
||||
pit_log("PIT %i: Reload while counter is latched\n", t);
|
||||
ctr->rl--;
|
||||
}
|
||||
|
||||
pit_log("PIT %i: M = %i, RM/WM = %i, State = %i, Out = %i\n", t, ctr->m, ctr->rm, ctr->state, ctr->out);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user