Previous 199869 Revisions Next

r18208 Sunday 30th September, 2012 at 09:50:26 UTC by Barry Rodewald
(MESS) at: fixed 16-bit DMA reading/writing (no whatsnew)
[src/mess/machine]at.c

trunk/src/mess/machine/at.c
r18207r18208
187187
188188READ8_MEMBER(at_state::pc_dma_read_word)
189189{
190   address_space& prog_space = m_maincpu->space(AS_PROGRAM); // get the right address space
190191   if(m_dma_channel == -1)
191192      return 0xff;
192193   UINT16 result;
193194   offs_t page_offset = (((offs_t) m_dma_offset[1][m_dma_channel & 3]) << 16) & 0xFE0000;
194195
195   result = space.read_word(page_offset + ( offset << 1 ) );
196   result = prog_space.read_word(page_offset + ( offset << 1 ) );
196197   m_dma_high_byte = result & 0xFF00;
197198
198199   return result & 0xFF;
r18207r18208
201202
202203WRITE8_MEMBER(at_state::pc_dma_write_word)
203204{
205   address_space& prog_space = m_maincpu->space(AS_PROGRAM); // get the right address space
204206   if(m_dma_channel == -1)
205207      return;
206208   offs_t page_offset = (((offs_t) m_dma_offset[1][m_dma_channel & 3]) << 16) & 0xFE0000;
207209
208   space.write_word(page_offset + ( offset << 1 ), m_dma_high_byte | data);
210   prog_space.write_word(page_offset + ( offset << 1 ), m_dma_high_byte | data);
209211}
210212
211213READ8_MEMBER( at_state::pc_dma8237_0_dack_r ) { return m_isabus->dack_r(0); }

Previous 199869 Revisions Next


© 1997-2024 The MAME Team