Exemple #1
0
 public handler_entry_read_delegate(address_space space, object /*READ*/ delegate_) : base(space, 0)
 {
     if (delegate_ is read8_delegate)
     {
         m_delegate8 = (read8_delegate)delegate_;
     }
     else if (delegate_ is read8m_delegate)
     {
         m_delegate8m = (read8m_delegate)delegate_;
     }
     else if (delegate_ is read8sm_delegate)
     {
         m_delegate8sm = (read8sm_delegate)delegate_;
     }
     else if (delegate_ is read8mo_delegate)
     {
         m_delegate8mo = (read8mo_delegate)delegate_;
     }
     else if (delegate_ is read8smo_delegate)
     {
         m_delegate8smo = (read8smo_delegate)delegate_;
     }
     else if (delegate_ is read16_delegate)
     {
         m_delegate16 = (read16_delegate)delegate_;
     }
     else if (delegate_ is read16s_delegate)
     {
         m_delegate16s = (read16s_delegate)delegate_;
     }
     else
     {
         throw new emu_unimplemented();
     }
 }
Exemple #2
0
 //template<typename R>
 //    std::enable_if_t<std::is_same<R, read8s_delegate>::value ||
 //                     std::is_same<R, read16s_delegate>::value ||
 //                     std::is_same<R, read32s_delegate>::value ||
 //                     std::is_same<R, read64s_delegate>::value,
 //                     uX> read_impl(offs_t offset, uX mem_mask);
 uX read_impl(read16s_delegate delegate_, offs_t offset, uX mem_mask)
 {
     //return m_delegate(((offset - inh::m_address_base) & inh::m_address_mask) >> (Width + AddrShift), mem_mask);
     return(new uX(Width, m_delegate16s(((offset - m_address_base) & m_address_mask) >> (Width + AddrShift), mem_mask.u16)));
 }