mirror of
https://github.com/holub/mame
synced 2025-04-25 17:56:43 +03:00
(MESS) a7800.c: Fixed DMA regarding startup, shutdown and cycle stealing which fixes numerous recorded MAMETester bugs. Bug fixed and fine tuned the DMA timing. Corrected RIOT timing [Mike Saarna]
This commit is contained in:
parent
35a825bb38
commit
233b795c21
@ -80,6 +80,8 @@
|
|||||||
|
|
||||||
2014/02/15 Robert Tuccitto Added more details and clarification
|
2014/02/15 Robert Tuccitto Added more details and clarification
|
||||||
regarding the potentiometer.
|
regarding the potentiometer.
|
||||||
|
|
||||||
|
2014/03/25 Mike Saarna Fixed Riot Timer
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
@ -1047,7 +1049,7 @@ static MACHINE_CONFIG_START( a7800_ntsc, a7800_state )
|
|||||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
|
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
|
||||||
|
|
||||||
/* devices */
|
/* devices */
|
||||||
MCFG_RIOT6532_ADD("riot", A7800_NTSC_Y1/12, a7800_r6532_interface)
|
MCFG_RIOT6532_ADD("riot", A7800_NTSC_Y1/8, a7800_r6532_interface)
|
||||||
|
|
||||||
MCFG_CARTSLOT_ADD("cart")
|
MCFG_CARTSLOT_ADD("cart")
|
||||||
MCFG_CARTSLOT_EXTENSION_LIST("bin,a78")
|
MCFG_CARTSLOT_EXTENSION_LIST("bin,a78")
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
|
|
||||||
Routines to control the Atari 7800 video hardware
|
Routines to control the Atari 7800 video hardware
|
||||||
|
|
||||||
TODO:
|
2014-03-24 Mike Saarna Fixed DMA regarding startup, shutdown and
|
||||||
precise DMA cycle stealing
|
cycle stealing.
|
||||||
|
|
||||||
2013-05-08 huygens rewrite to emulate line ram buffers (mostly fixes Kung-Fu Master
|
2013-05-08 huygens rewrite to emulate line ram buffers (mostly fixes Kung-Fu Master
|
||||||
Started DMA cycle stealing implementation
|
Started DMA cycle stealing implementation
|
||||||
@ -126,7 +126,12 @@ void a7800_state::maria_draw_scanline()
|
|||||||
int x, d, c, i, pixel_cell, cells;
|
int x, d, c, i, pixel_cell, cells;
|
||||||
int maria_cycles;
|
int maria_cycles;
|
||||||
|
|
||||||
maria_cycles = 0;
|
//maria_cycles = 0;
|
||||||
|
if ( m_maria_offset == 0 )
|
||||||
|
maria_cycles = 5+19; // DMA startup + last line shutdown
|
||||||
|
else
|
||||||
|
maria_cycles = 5+13; // DMA startup + other line shutdown
|
||||||
|
|
||||||
cells = 0;
|
cells = 0;
|
||||||
|
|
||||||
/* Process this DLL entry */
|
/* Process this DLL entry */
|
||||||
@ -198,7 +203,9 @@ void a7800_state::maria_draw_scanline()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_maincpu->eat_cycles(maria_cycles/4); // Maria clock rate is 4 times that of CPU
|
// spin the CPU for Maria DMA, if it's not already spinning for WSYNC
|
||||||
|
if ( ! m_maria_wsync )
|
||||||
|
m_maincpu->spin_until_time(m_maincpu->cycles_to_attotime(maria_cycles/4)); // Maria clock rate is 4 times that of the CPU
|
||||||
|
|
||||||
// draw line buffer to screen
|
// draw line buffer to screen
|
||||||
m_active_buffer = !m_active_buffer; // switch buffers
|
m_active_buffer = !m_active_buffer; // switch buffers
|
||||||
|
Loading…
Reference in New Issue
Block a user