diff options
author | Scott Stone <tafoid@users.noreply.github.com> | 2012-04-02 18:38:29 +0000 |
---|---|---|
committer | Scott Stone <tafoid@users.noreply.github.com> | 2012-04-02 18:38:29 +0000 |
commit | f5f18b3a50a362dbdac6e977d4bb9087531b0ec0 (patch) | |
tree | 76da15262fe2bd7cb845360abd46e49ccafb7813 | |
parent | 141958010c4f6f33fd6c3863a48ae224a7d33482 (diff) |
Fixed ymf271.c core timer allowing for greater accuracy. Also fixes MT#2675 [Sonikos]
-rw-r--r-- | src/emu/sound/ymf271.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/emu/sound/ymf271.c b/src/emu/sound/ymf271.c index ad854be5786..c5c15f2080f 100644 --- a/src/emu/sound/ymf271.c +++ b/src/emu/sound/ymf271.c @@ -1452,8 +1452,6 @@ static void ymf271_write_timer(YMF271Chip *chip, int data) { chip->timerA |= (data & 0xff)<<8; } - else - chip->timerA |= 0x200; } break; @@ -1484,11 +1482,11 @@ static void ymf271_write_timer(YMF271Chip *chip, int data) { // timer A reset chip->irqstate &= ~1; chip->status &= ~1; + chip->timerAVal |= 0x300; if (chip->irq_callback) chip->irq_callback(chip->device, 0); - //period = (double)(256.0 - chip->timerAVal ) * ( 384.0 * 4.0 / (double)CLOCK); - period = attotime::from_hz(chip->clock) * (384 * (1024 - chip->timerAVal)); + period = attotime::from_hz(chip->clock) * (384 * 4 * (1024 - chip->timerAVal)); chip->timA->adjust(period, 0, period); } |