Previous 199869 Revisions Next

r18033 Thursday 20th September, 2012 at 02:54:55 UTC by Barry Rodewald
at: Made sure that the correct address space is used when using DMA (no whatsnew)
[src/mess/machine]at.c

trunk/src/mess/machine/at.c
r18032r18033
163163
164164READ8_MEMBER(at_state::pc_dma_read_byte)
165165{
166   address_space& prog_space = m_maincpu->space(AS_PROGRAM); // get the right address space
166167   if(m_dma_channel == -1)
167168      return 0xff;
168169   UINT8 result;
169170   offs_t page_offset = (((offs_t) m_dma_offset[0][m_dma_channel]) << 16) & 0xFF0000;
170171
171   result = space.read_byte(page_offset + offset);
172   result = prog_space.read_byte(page_offset + offset);
172173   return result;
173174}
174175
175176
176177WRITE8_MEMBER(at_state::pc_dma_write_byte)
177178{
179   address_space& prog_space = m_maincpu->space(AS_PROGRAM); // get the right address space
178180   if(m_dma_channel == -1)
179181      return;
180182   offs_t page_offset = (((offs_t) m_dma_offset[0][m_dma_channel]) << 16) & 0xFF0000;
181183
182   space.write_byte(page_offset + offset, data);
184   prog_space.write_byte(page_offset + offset, data);
183185}
184186
185187

Previous 199869 Revisions Next


© 1997-2024 The MAME Team