Previous 199869 Revisions Next

r24652 Friday 2nd August, 2013 at 11:16:12 UTC by Oliver Stöneberg
removed some obsolete legacy stuff from src/mess/machine/bebox.c (nw)
[src/mess/machine]bebox.c

trunk/src/mess/machine/bebox.c
r24651r24652
110110#define LOG_UART        1
111111#define LOG_INTERRUPTS  1
112112
113INLINE UINT16 read16be_with_read8_handler(read8_space_func handler, address_space &space, offs_t offset, UINT16 mem_mask)
114{
115   UINT16 result = 0;
116   if (ACCESSING_BITS_8_15)
117      result |= ((UINT16)(*handler)(space, offset * 2 + 0, mem_mask >> 8)) << 8;
118   if (ACCESSING_BITS_0_7)
119      result |= ((UINT16)(*handler)(space, offset * 2 + 1, mem_mask >> 0)) << 0;
120   return result;
121}
122
123INLINE void write16be_with_write8_handler(write8_space_func handler, address_space &space, offs_t offset, UINT16 data, UINT16 mem_mask)
124{
125   if (ACCESSING_BITS_8_15)
126      (*handler)(space, offset * 2 + 0, data >> 8, mem_mask >> 8);
127   if (ACCESSING_BITS_0_7)
128      (*handler)(space, offset * 2 + 1, data >> 0, mem_mask >> 0);
129}
130
131INLINE UINT32 read32be_with_read8_handler(read8_space_func handler, address_space &space, offs_t offset, UINT32 mem_mask)
132{
133   UINT32 result = 0;
134   if (ACCESSING_BITS_16_31)
135      result |= read16be_with_read8_handler(handler, space, offset * 2 + 0, mem_mask >> 16) << 16;
136   if (ACCESSING_BITS_0_15)
137      result |= read16be_with_read8_handler(handler, space, offset * 2 + 1, mem_mask) << 0;
138   return result;
139}
140
141
142INLINE void write32be_with_write8_handler(write8_space_func handler, address_space &space, offs_t offset, UINT32 data, UINT32 mem_mask)
143{
144   if (ACCESSING_BITS_16_31)
145      write16be_with_write8_handler(handler, space, offset * 2 + 0, data >> 16, mem_mask >> 16);
146   if (ACCESSING_BITS_0_15)
147      write16be_with_write8_handler(handler, space, offset * 2 + 1, data, mem_mask);
148}
149
150INLINE UINT64 read64be_with_read8_handler(read8_space_func handler, address_space &space, offs_t offset, UINT64 mem_mask)
151{
152   UINT64 result = 0;
153   if (ACCESSING_BITS_32_63)
154      result |= (UINT64)read32be_with_read8_handler(handler, space, offset * 2 + 0, mem_mask >> 32) << 32;
155   if (ACCESSING_BITS_0_31)
156      result |= (UINT64)read32be_with_read8_handler(handler, space, offset * 2 + 1, mem_mask) << 0;
157   return result;
158}
159
160
161INLINE void write64be_with_write8_handler(write8_space_func handler, address_space &space, offs_t offset, UINT64 data, UINT64 mem_mask)
162{
163   if (ACCESSING_BITS_32_63)
164      write32be_with_write8_handler(handler, space, offset * 2 + 0, data >> 32, mem_mask >> 32);
165   if (ACCESSING_BITS_0_31)
166      write32be_with_write8_handler(handler, space, offset * 2 + 1, data, mem_mask);
167}
168
169
170113/*************************************
171114 *
172115 *  Interrupts and Motherboard Registers

Previous 199869 Revisions Next


© 1997-2024 The MAME Team