1
0
Fork 0

Keep the timer value during timer mode changes (undocumented behavior). Fixes Dunkle Schatten with Soundblaster and 3DMania.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3567
This commit is contained in:
Ralf Grillenberger 2010-04-04 12:29:25 +00:00
parent 461ffb6c40
commit 13ea835d96

View file

@ -139,6 +139,7 @@ static void counter_latch(Bitu counter) {
//If gate2 is disabled don't update the read_latch
if(counter == 2 && !gate2 && p->mode !=1) return;
if(p->new_mode) return;
double index=PIC_FullIndex()-p->start;
switch (p->mode) {
@ -309,6 +310,7 @@ static void write_p43(Bitu /*port*/,Bitu val,Bitu /*iolen*/) {
pit[latch].counterstatus_set=false;
latched_timerstatus_locked=false;
}
pit[latch].go_read_latch = true;
pit[latch].update_count = false;
pit[latch].counting = false;
pit[latch].read_state = (val >> 4) & 0x03;