diff options
Diffstat (limited to 'src/mame/drivers/gba.cpp')
-rw-r--r-- | src/mame/drivers/gba.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/mame/drivers/gba.cpp b/src/mame/drivers/gba.cpp index f05c534146c..60c5b11661f 100644 --- a/src/mame/drivers/gba.cpp +++ b/src/mame/drivers/gba.cpp @@ -129,10 +129,10 @@ static inline void ATTR_PRINTF(3,4) verboselog(device_t &device, int n_level, co } } -static const UINT32 timer_clks[4] = { XTAL_16_777216MHz, XTAL_16_777216MHz / 64, XTAL_16_777216MHz / 256, XTAL_16_777216MHz / 1024 }; +static const uint32_t timer_clks[4] = { XTAL_16_777216MHz, XTAL_16_777216MHz / 64, XTAL_16_777216MHz / 256, XTAL_16_777216MHz / 1024 }; -void gba_state::request_irq(UINT32 int_type) +void gba_state::request_irq(uint32_t int_type) { // set flag for later recovery IF_SET(int_type); @@ -152,7 +152,7 @@ void gba_state::request_irq(UINT32 int_type) TIMER_CALLBACK_MEMBER(gba_state::dma_complete) { - static const UINT32 ch_int[4] = { INT_DMA0, INT_DMA1, INT_DMA2, INT_DMA3 }; + static const uint32_t ch_int[4] = { INT_DMA0, INT_DMA1, INT_DMA2, INT_DMA3 }; uintptr_t ch = param; @@ -193,9 +193,9 @@ TIMER_CALLBACK_MEMBER(gba_state::dma_complete) void gba_state::dma_exec(int ch) { address_space &space = m_maincpu->space(AS_PROGRAM); - UINT32 src = m_dma_src[ch]; - UINT32 dst = m_dma_dst[ch]; - UINT16 ctrl = DMACNT_H(ch); + uint32_t src = m_dma_src[ch]; + uint32_t dst = m_dma_dst[ch]; + uint16_t ctrl = DMACNT_H(ch); int srcadd = (ctrl >> 7) & 3; int dstadd = (ctrl >> 5) & 3; @@ -308,7 +308,7 @@ void gba_state::dma_exec(int ch) m_dma_src[ch] = src; m_dma_dst[ch] = dst; -// printf("settng DMA timer %d for %d cycs (tmr %x)\n", ch, cnt, (UINT32)m_dma_timer[ch]); +// printf("settng DMA timer %d for %d cycs (tmr %x)\n", ch, cnt, (uint32_t)m_dma_timer[ch]); // m_dma_timer[ch]->adjust(ATTOTIME_IN_CYCLES(0, cnt), ch); dma_complete(nullptr, ch); } @@ -393,7 +393,7 @@ void gba_state::audio_tick(int ref) TIMER_CALLBACK_MEMBER(gba_state::timer_expire) { - static const UINT32 tmr_ints[4] = { INT_TM0_OVERFLOW, INT_TM1_OVERFLOW, INT_TM2_OVERFLOW, INT_TM3_OVERFLOW }; + static const uint32_t tmr_ints[4] = { INT_TM0_OVERFLOW, INT_TM1_OVERFLOW, INT_TM2_OVERFLOW, INT_TM3_OVERFLOW }; uintptr_t tmr = (uintptr_t) param; // "The reload value is copied into the counter only upon following two situations: Automatically upon timer overflows," @@ -545,7 +545,7 @@ static const char *reg_names[] = { READ32_MEMBER(gba_state::gba_io_r) { - UINT32 retval = 0; + uint32_t retval = 0; switch( offset + 0x60/4 ) { @@ -662,7 +662,7 @@ READ32_MEMBER(gba_state::gba_io_r) case 0x0108/4: case 0x010c/4: { - UINT32 elapsed; + uint32_t elapsed; double time, ticks; int timer = offset + 0x60/4 - 0x100/4; @@ -686,7 +686,7 @@ READ32_MEMBER(gba_state::gba_io_r) time *= ticks; time /= (1.0 / m_timer_hz[timer]); - elapsed = (UINT32)time; + elapsed = (uint32_t)time; } // printf("elapsed = %x\n", elapsed); @@ -741,9 +741,9 @@ READ32_MEMBER(gba_state::gba_io_r) WRITE32_MEMBER(gba_state::gba_io_w) { - UINT8 soundcnt_x = SOUNDCNT_X; - UINT16 siocnt = SIOCNT; - UINT16 dmachcnt[4] = { DMACNT_H(0), DMACNT_H(1), DMACNT_H(2), DMACNT_H(3) }; + uint8_t soundcnt_x = SOUNDCNT_X; + uint16_t siocnt = SIOCNT; + uint16_t dmachcnt[4] = { DMACNT_H(0), DMACNT_H(1), DMACNT_H(2), DMACNT_H(3) }; COMBINE_DATA(&m_regs[offset]); @@ -1024,7 +1024,7 @@ WRITE32_MEMBER(gba_state::gba_io_w) case 0x010c/4: { double rate, clocksel; - UINT32 old_timer_regs; + uint32_t old_timer_regs; int timer = offset + 0x60/4 - 0x100/4; @@ -1132,7 +1132,7 @@ WRITE32_MEMBER(gba_state::gba_io_w) READ32_MEMBER(gba_state::gba_bios_r) { - UINT32 *rom = m_region_maincpu; + uint32_t *rom = m_region_maincpu; if (m_bios_hack->read()) { // partially patch out logo and checksum checks @@ -1149,16 +1149,16 @@ READ32_MEMBER(gba_state::gba_bios_r) READ32_MEMBER(gba_state::gba_10000000_r) { - UINT32 data; - UINT32 pc = m_maincpu->state_int(ARM7_PC); - UINT32 cpsr = m_maincpu->state_int(ARM7_CPSR); + uint32_t data; + uint32_t pc = m_maincpu->state_int(ARM7_PC); + uint32_t cpsr = m_maincpu->state_int(ARM7_CPSR); if (T_IS_SET( cpsr)) { data = space.read_dword(pc + 8); } else { - UINT16 insn = space.read_word(pc + 4); + uint16_t insn = space.read_word(pc + 4); data = (insn << 16) | (insn << 0); } logerror("%s: unmapped program memory read from %08X = %08X & %08X\n", machine().describe_context( ), 0x10000000 + (offset << 2), data, mem_mask); |