From 5d52e272bad00b5d9abbcd915b01c16deb6ebbf7 Mon Sep 17 00:00:00 2001 From: balr0g Date: Wed, 16 Mar 2016 19:04:35 -0400 Subject: [PATCH] Remove no-longer-needed normalization from gba (nw) --- src/emu/attotime.h | 11 ----------- src/mame/drivers/gba.cpp | 4 ---- 2 files changed, 15 deletions(-) diff --git a/src/emu/attotime.h b/src/emu/attotime.h index 0cdaa424ca0..a0915ae07f2 100644 --- a/src/emu/attotime.h +++ b/src/emu/attotime.h @@ -117,17 +117,6 @@ public: UINT64 as_ticks(UINT32 frequency) const; const char *as_string(int precision = 9) const; - // Needed by gba.c FIXME: this shouldn't be necessary? - - void normalize() - { - while (m_attoseconds >= ATTOSECONDS_PER_SECOND) - { - m_seconds++; - m_attoseconds -= ATTOSECONDS_PER_SECOND; - } - } - attoseconds_t attoseconds() const { return m_attoseconds; } seconds_t seconds() const { return m_seconds; } diff --git a/src/mame/drivers/gba.cpp b/src/mame/drivers/gba.cpp index abaea79d40d..f2c05930332 100644 --- a/src/mame/drivers/gba.cpp +++ b/src/mame/drivers/gba.cpp @@ -35,8 +35,6 @@ static inline void ATTR_PRINTF(3,4) verboselog(device_t &device, int n_level, co } } -#define GBA_ATTOTIME_NORMALIZE(a) a.normalize() - static const UINT32 timer_clks[4] = { 16777216, 16777216/64, 16777216/256, 16777216/1024 }; @@ -343,7 +341,6 @@ TIMER_CALLBACK_MEMBER(gba_state::timer_expire) final = clocksel / rate; m_timer_hz[tmr] = final; time = attotime::from_hz(final); - GBA_ATTOTIME_NORMALIZE(time); m_tmr_timer[tmr]->adjust(time, tmr, time); } @@ -1639,7 +1636,6 @@ WRITE32_MEMBER(gba_state::gba_io_w) if( !(data & 0x40000) ) // if we're not in Count-Up mode { attotime time = attotime::from_hz(final); - GBA_ATTOTIME_NORMALIZE(time); m_tmr_timer[offset]->adjust(time, offset, time); } }