mirror of
https://github.com/holub/mame
synced 2025-05-29 00:53:09 +03:00
(MESS) a7800.c: [Mike Saarna]
* Fixed number of scanlines to accurately reflect hardware testing and schematics (262-->263 NTSC and 312-->313 PAL). * Additional fix to timing of Maria cycles and comments. * Fixed INPTCTRL register implementation to match hardware. Diagnostic Test Cart now works. * Corrected ROM_FILL.
This commit is contained in:
parent
10c9654e6f
commit
4ac4415ccc
@ -1033,7 +1033,7 @@ static MACHINE_CONFIG_START( a7800_ntsc, a7800_state )
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_RAW_PARAMS( 7159090, 456, 0, 320, 262, 26, 26 + 192 + 30 )
|
||||
MCFG_SCREEN_RAW_PARAMS( 7159090, 456, 0, 320, 263, 26, 26 + 192 + 30 )
|
||||
MCFG_SCREEN_UPDATE_DRIVER(a7800_state, screen_update_a7800)
|
||||
MCFG_SCREEN_PALETTE("palette")
|
||||
|
||||
@ -1072,7 +1072,7 @@ static MACHINE_CONFIG_DERIVED( a7800_pal, a7800_ntsc )
|
||||
// MCFG_TIMER_ADD_SCANLINE("scantimer", a7800_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_SCREEN_MODIFY( "screen" )
|
||||
MCFG_SCREEN_RAW_PARAMS( 7093788, 456, 0, 320, 312, 34, 34 + 228 + 30 )
|
||||
MCFG_SCREEN_RAW_PARAMS( 7093788, 456, 0, 320, 313, 34, 34 + 228 + 30 )
|
||||
|
||||
MCFG_PALETTE_MODIFY("palette")
|
||||
MCFG_PALETTE_INIT_OWNER(a7800_state, a7800p )
|
||||
@ -1099,7 +1099,7 @@ MACHINE_CONFIG_END
|
||||
|
||||
ROM_START( a7800 )
|
||||
ROM_REGION(0x100000, "maincpu", 0)
|
||||
ROM_FILL(0x0000, 0x40000, 0xff)
|
||||
ROM_FILL(0x0000, 0x100000, 0xff)
|
||||
ROM_SYSTEM_BIOS( 0, "a7800", "Atari 7800" )
|
||||
ROMX_LOAD("7800.u7", 0xf000, 0x1000, CRC(5d13730c) SHA1(d9d134bb6b36907c615a594cc7688f7bfcef5b43), ROM_BIOS(1))
|
||||
ROM_SYSTEM_BIOS( 1, "a7800pr", "Atari 7800 (prototype with Asteroids)" )
|
||||
@ -1108,7 +1108,7 @@ ROM_END
|
||||
|
||||
ROM_START( a7800p )
|
||||
ROM_REGION(0x100000, "maincpu", 0)
|
||||
ROM_FILL(0x0000, 0x40000, 0xff)
|
||||
ROM_FILL(0x0000, 0x100000, 0xff)
|
||||
ROM_LOAD("7800pal.rom", 0xc000, 0x4000, CRC(d5b61170) SHA1(5a140136a16d1d83e4ff32a19409ca376a8df874))
|
||||
ROM_END
|
||||
|
||||
|
@ -107,13 +107,13 @@ void a7800_state::a7800_driver_init(int ispal, int lines)
|
||||
|
||||
DRIVER_INIT_MEMBER(a7800_state,a7800_ntsc)
|
||||
{
|
||||
a7800_driver_init(FALSE, 262);
|
||||
a7800_driver_init(FALSE, 263);
|
||||
}
|
||||
|
||||
|
||||
DRIVER_INIT_MEMBER(a7800_state,a7800_pal)
|
||||
{
|
||||
a7800_driver_init(TRUE, 312);
|
||||
a7800_driver_init(TRUE, 313);
|
||||
}
|
||||
|
||||
|
||||
@ -520,11 +520,13 @@ READ8_MEMBER(a7800_state::a7800_TIA_r)
|
||||
|
||||
WRITE8_MEMBER(a7800_state::a7800_TIA_w)
|
||||
{
|
||||
switch(offset) {
|
||||
case 0x01:
|
||||
if (offset<0x20) { //INPTCTRL covers TIA registers 0x00-0x1F until locked
|
||||
if(data & 0x01)
|
||||
{
|
||||
m_maria_flag=1;
|
||||
if ((m_ctrl_lock)&&(offset==0x01))
|
||||
m_maria_flag=1;
|
||||
else if (!m_ctrl_lock)
|
||||
m_maria_flag=1;
|
||||
}
|
||||
if(!m_ctrl_lock)
|
||||
{
|
||||
@ -536,7 +538,6 @@ WRITE8_MEMBER(a7800_state::a7800_TIA_w)
|
||||
else
|
||||
memcpy( m_ROM + 0xC000, m_bios_bkup, 0x4000 );
|
||||
}
|
||||
break;
|
||||
}
|
||||
m_tia->tia_sound_w(space, offset, data);
|
||||
m_ROM[offset] = data;
|
||||
|
@ -126,7 +126,6 @@ void a7800_state::maria_draw_scanline()
|
||||
int x, d, c, i, pixel_cell, cells;
|
||||
int maria_cycles;
|
||||
|
||||
//maria_cycles = 0;
|
||||
if ( m_maria_offset == 0 )
|
||||
maria_cycles = 5+19; // DMA startup + last line shutdown
|
||||
else
|
||||
@ -173,10 +172,10 @@ void a7800_state::maria_draw_scanline()
|
||||
if (ind)
|
||||
{
|
||||
c = READ_MEM(graph_adr + x) & 0xFF;
|
||||
maria_cycles += 3;
|
||||
data_addr = (m_maria_charbase | c) + (m_maria_offset << 8);
|
||||
if (is_holey(data_addr))
|
||||
continue;
|
||||
maria_cycles += 3;
|
||||
if( m_maria_cwidth ) // two data bytes per map byte
|
||||
{
|
||||
cells = write_line_ram(data_addr, hpos, pal);
|
||||
@ -262,7 +261,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(a7800_state::a7800_interrupt)
|
||||
if (frame_scanline == 16)
|
||||
m_maria_vblank = 0x00;
|
||||
|
||||
if ( frame_scanline == ( m_lines - 4 ) )
|
||||
if ( frame_scanline == ( m_lines - 5 ) )
|
||||
{
|
||||
m_maria_vblank = 0x80;
|
||||
}
|
||||
@ -286,12 +285,11 @@ TIMER_CALLBACK_MEMBER(a7800_state::a7800_maria_startdma)
|
||||
m_maria_offset = READ_MEM(m_maria_dll) & 0x0f;
|
||||
m_maria_holey = (READ_MEM(m_maria_dll) & 0x60) >> 5;
|
||||
m_maria_nmi = READ_MEM(m_maria_dll) & 0x80;
|
||||
m_maincpu->eat_cycles(6); // 24 Maria cycles minimum (DMA startup + shutdown list-list fetch)
|
||||
/* logerror("DLL=%x\n",m_maria_dll); */
|
||||
}
|
||||
|
||||
|
||||
if( ( frame_scanline > 15 ) && (frame_scanline < (m_lines - 4)) && m_maria_dmaon )
|
||||
if( ( frame_scanline > 15 ) && (frame_scanline < (m_lines - 5)) && m_maria_dmaon )
|
||||
{
|
||||
maria_draw_scanline();
|
||||
|
||||
@ -301,7 +299,6 @@ TIMER_CALLBACK_MEMBER(a7800_state::a7800_maria_startdma)
|
||||
m_maria_dl = (READ_MEM(m_maria_dll+1) << 8) | READ_MEM(m_maria_dll+2);
|
||||
m_maria_offset = READ_MEM(m_maria_dll) & 0x0f;
|
||||
m_maria_holey = (READ_MEM(m_maria_dll) & 0x60) >> 5;
|
||||
m_maincpu->eat_cycles(5); // 20 Maria cycles (DMA startup + shutdown)
|
||||
if ( READ_MEM(m_maria_dll & 0x10) )
|
||||
logerror("dll bit 5 set!\n");
|
||||
m_maria_nmi = READ_MEM(m_maria_dll) & 0x80;
|
||||
|
Loading…
Reference in New Issue
Block a user