diff options
Diffstat (limited to 'src/mame/machine/6883sam.cpp')
-rw-r--r-- | src/mame/machine/6883sam.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/mame/machine/6883sam.cpp b/src/mame/machine/6883sam.cpp index dca01ed0a31..ce07281231f 100644 --- a/src/mame/machine/6883sam.cpp +++ b/src/mame/machine/6883sam.cpp @@ -70,7 +70,7 @@ const device_type SAM6883 = &device_creator<sam6883_device>; // ctor //------------------------------------------------- -sam6883_device::sam6883_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +sam6883_device::sam6883_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, SAM6883, "SAM6883", tag, owner, clock, "sam6883", __FILE__), m_cpu_tag(nullptr), m_cpu_space_ref(AS_PROGRAM), @@ -119,7 +119,7 @@ void sam6883_device::device_start() // configure_bank - bank configuration //------------------------------------------------- -void sam6883_device::configure_bank(int bank, UINT8 *memory, UINT32 memory_size, bool is_read_only) +void sam6883_device::configure_bank(int bank, uint8_t *memory, uint32_t memory_size, bool is_read_only) { configure_bank(bank, memory, memory_size, is_read_only, read8_delegate(), write8_delegate()); } @@ -141,7 +141,7 @@ void sam6883_device::configure_bank(int bank, read8_delegate rhandler, write8_de // configure_bank - bank configuration //------------------------------------------------- -void sam6883_device::configure_bank(int bank, UINT8 *memory, UINT32 memory_size, bool is_read_only, read8_delegate rhandler, write8_delegate whandler) +void sam6883_device::configure_bank(int bank, uint8_t *memory, uint32_t memory_size, bool is_read_only, read8_delegate rhandler, write8_delegate whandler) { assert((bank >= 0) && (bank < ARRAY_LENGTH(m_banks))); m_banks[bank].m_memory = memory; @@ -276,7 +276,7 @@ void sam6883_device::update_memory(void) else { // ROM/RAM - UINT16 ram_base = (m_sam_state & SAM_STATE_P1) ? 0x8000 : 0x0000; + uint16_t ram_base = (m_sam_state & SAM_STATE_P1) ? 0x8000 : 0x0000; m_space_0000.point(&m_banks[0], ram_base, m_banks[0].m_memory_size); m_counter_mask = 0x7FFF; m_counter_or = ram_base; @@ -367,7 +367,7 @@ READ8_MEMBER( sam6883_device::read ) WRITE8_MEMBER( sam6883_device::write ) { /* alter the SAM state */ - UINT16 xorval = alter_sam_state(offset); + uint16_t xorval = alter_sam_state(offset); /* based on the mask, apply effects */ if (xorval & (SAM_STATE_TY|SAM_STATE_M1|SAM_STATE_M0|SAM_STATE_P1)) @@ -445,7 +445,7 @@ WRITE_LINE_MEMBER( sam6883_device::hs_w ) // sam_space::ctor //------------------------------------------------- -template<UINT16 _addrstart, UINT16 _addrend> +template<uint16_t _addrstart, uint16_t _addrend> sam6883_device::sam_space<_addrstart, _addrend>::sam_space(sam6883_device &owner) : m_owner(owner) { @@ -460,7 +460,7 @@ sam6883_device::sam_space<_addrstart, _addrend>::sam_space(sam6883_device &owner // sam_space::cpu_space //------------------------------------------------- -template<UINT16 _addrstart, UINT16 _addrend> +template<uint16_t _addrstart, uint16_t _addrend> address_space &sam6883_device::sam_space<_addrstart, _addrend>::cpu_space() const { assert(m_owner.m_cpu_space != nullptr); @@ -473,8 +473,8 @@ address_space &sam6883_device::sam_space<_addrstart, _addrend>::cpu_space() cons // sam_space::point //------------------------------------------------- -template<UINT16 _addrstart, UINT16 _addrend> -void sam6883_device::sam_space<_addrstart, _addrend>::point(const sam_bank *bank, UINT16 offset, UINT32 length) +template<uint16_t _addrstart, uint16_t _addrend> +void sam6883_device::sam_space<_addrstart, _addrend>::point(const sam_bank *bank, uint16_t offset, uint32_t length) { if (LOG_SAM) { @@ -496,8 +496,8 @@ void sam6883_device::sam_space<_addrstart, _addrend>::point(const sam_bank *bank //------------------------------------------------- // sam_space::point_specific_bank //------------------------------------------------- -template<UINT16 _addrstart, UINT16 _addrend> -void sam6883_device::sam_space<_addrstart, _addrend>::point_specific_bank(const sam_bank *bank, UINT32 offset, UINT32 length, memory_bank *&memory_bank, UINT32 addrstart, UINT32 addrend, bool is_write) +template<uint16_t _addrstart, uint16_t _addrend> +void sam6883_device::sam_space<_addrstart, _addrend>::point_specific_bank(const sam_bank *bank, uint32_t offset, uint32_t length, memory_bank *&memory_bank, uint32_t addrstart, uint32_t addrend, bool is_write) { if (bank->m_memory != nullptr) { @@ -513,7 +513,7 @@ void sam6883_device::sam_space<_addrstart, _addrend>::point_specific_bank(const auto tag = string_format("bank%04X_%c", addrstart, is_write ? 'w' : 'r'); // determine "nop_addrstart" - where the bank ends, and above which is AM_NOP - UINT32 nop_addrstart = (length != ~0) + uint32_t nop_addrstart = (length != ~0) ? std::min(addrend + 1, addrstart + length) : addrend + 1; @@ -552,7 +552,7 @@ void sam6883_device::sam_space<_addrstart, _addrend>::point_specific_bank(const { // this bank uses handlers - first thing's first, assert that we are not doing // any weird stuff with offfsets and lengths - that isn't supported in this path - assert((offset == 0) && (length == (UINT32)~0)); + assert((offset == 0) && (length == (uint32_t)~0)); if (is_write) { |