public handler_entry_write_delegate(address_space space, object /*WRITE*/ delegate_) : base(space, 0) { if (delegate_ is write8_delegate) { m_delegate8 = (write8_delegate)delegate_; } else if (delegate_ is write8sm_delegate) { m_delegate8sm = (write8sm_delegate)delegate_; } else if (delegate_ is write8smo_delegate) { m_delegate8smo = (write8smo_delegate)delegate_; } else if (delegate_ is write16_delegate) { m_delegate16 = (write16_delegate)delegate_; } else if (delegate_ is write16s_delegate) { m_delegate16s = (write16s_delegate)delegate_; } else if (delegate_ is write16smo_delegate) { m_delegate16smo = (write16smo_delegate)delegate_; } else { throw new emu_unimplemented(); } }
//template<typename W> // std::enable_if_t<std::is_same<W, write8m_delegate>::value || // std::is_same<W, write16m_delegate>::value || // std::is_same<W, write32m_delegate>::value || // std::is_same<W, write64m_delegate>::value, // void> write_impl(offs_t offset, uX data, uX mem_mask); //template<typename W> // std::enable_if_t<std::is_same<W, write8s_delegate>::value || // std::is_same<W, write16s_delegate>::value || // std::is_same<W, write32s_delegate>::value || // std::is_same<W, write64s_delegate>::value, // void> write_impl(offs_t offset, uX data, uX mem_mask); void write_impl(write16s_delegate delegate_, offs_t offset, uX data, uX mem_mask) { m_delegate16s(((offset - m_address_base) & m_address_mask) >> (Width + AddrShift), data.u16, mem_mask.u16); //m_delegate(((offset - inh::m_address_base) & inh::m_address_mask) >> (Width + AddrShift), data, mem_mask); }