diff options
| author | 2012-06-23 19:41:04 +0000 | |
|---|---|---|
| committer | 2012-06-23 19:41:04 +0000 | |
| commit | 5a91ae55daa30e8087dcadaaad1eff3bcd69ddda (patch) | |
| tree | 854ffdd0ee1040ddfc63ddcbe6d825140dbd6380 /src | |
| parent | ab8203e8e998798210c729c56900cd77a6c3c406 (diff) | |
mcs51.c - Update the timers sequentially for each cycle. Fixes sound CPU serial communications in the eolith.c games.
Diffstat (limited to 'src')
| -rw-r--r-- | src/emu/cpu/mcs51/mcs51.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/emu/cpu/mcs51/mcs51.c b/src/emu/cpu/mcs51/mcs51.c index 2496afbff7d..518c92b560d 100644 --- a/src/emu/cpu/mcs51/mcs51.c +++ b/src/emu/cpu/mcs51/mcs51.c @@ -1203,13 +1203,15 @@ INLINE void update_timer_t2(mcs51_state_t *mcs51_state, int cycles) INLINE void update_timers(mcs51_state_t *mcs51_state, int cycles) { - /* Update Timer 0 */ - update_timer_t0(mcs51_state, cycles); - update_timer_t1(mcs51_state, cycles); - - if (mcs51_state->features & FEATURE_I8052) + while (cycles--) { - update_timer_t2(mcs51_state, cycles); + update_timer_t0(mcs51_state, 1); + update_timer_t1(mcs51_state, 1); + + if (mcs51_state->features & FEATURE_I8052) + { + update_timer_t2(mcs51_state, 1); + } } } |
