diff options
| author | 2014-06-18 03:10:07 +0000 | |
|---|---|---|
| committer | 2014-06-18 03:10:07 +0000 | |
| commit | 2df40a8073e58055a91ffe8997cd1df52791c876 (patch) | |
| tree | ae88dc14637867a05f8ca523b23d5a002f0d7583 /src/emu/cpu/i86 | |
| parent | dd842afff6149a431bdc7806a428ae6c62e46910 (diff) | |
i186: fix timer read (nw)
(mess) rmnimbus: bit of refactoring and cleanup, fix some video ram reads and writes, use eepromser and remove er59256 (nw)
Diffstat (limited to 'src/emu/cpu/i86')
| -rw-r--r-- | src/emu/cpu/i86/i186.c | 7 | ||||
| -rw-r--r-- | src/emu/cpu/i86/i86.c | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/emu/cpu/i86/i186.c b/src/emu/cpu/i86/i186.c index b7d096e0cc6..a3162964732 100644 --- a/src/emu/cpu/i86/i186.c +++ b/src/emu/cpu/i86/i186.c @@ -1008,6 +1008,7 @@ void i80186_cpu_device::device_timer(emu_timer &timer, device_timer_id id, int p count = count ? count : 0x10000; t->int_timer->adjust((attotime::from_hz(clock()/8) * count), which); + t->count = 0; if (LOG_TIMER) logerror(" Repriming interrupt\n"); } else @@ -1041,7 +1042,11 @@ void i80186_cpu_device::internal_timer_sync(int which) /* if we have a timing timer running, adjust the count */ if (t->time_timer_active && !(t->control & 0x0c)) { - t->last_time = t->time_timer->elapsed(); + attotime current_time = t->time_timer->elapsed(); + int net_clocks = ((current_time - t->last_time) * (clock()/8)).seconds; + t->last_time = current_time; + + t->count = t->count + net_clocks; } } diff --git a/src/emu/cpu/i86/i86.c b/src/emu/cpu/i86/i86.c index 5790e0d7382..cb7b412d62e 100644 --- a/src/emu/cpu/i86/i86.c +++ b/src/emu/cpu/i86/i86.c @@ -2077,7 +2077,7 @@ bool i8086_common_cpu_device::common_op(UINT8 op) break; case 0xf4: // i_hlt - logerror("%s: %06x: HALT\n", tag(), pc()); + //logerror("%s: %06x: HALT\n", tag(), pc()); m_icount = 0; m_halt = true; break; |
