Added a preliminary boolean flag to MC6845 interface structure: "show border area". If true, it will show the whole video area including border + blanking areas. [Angelo Salese]

Bulk replaced const mc6845_interface -> MC6845_INTERFACE, nw

(MESS)
SMC-777: enabled to show the border area in MC6845 interface, changed various video related function accordingly [Angelo Salese]
This commit is contained in:
Angelo Salese 2013-01-14 22:02:06 +00:00
parent 548d5722e4
commit 34372f03c7
121 changed files with 424 additions and 230 deletions

View File

@ -26,6 +26,9 @@
TODO:
- Change device video emulation x/y offsets when "show border color"
is true
- mos8563
- horizontal scroll
@ -95,6 +98,7 @@ void mc6845_device::device_config_complete()
else
{
m_screen_tag = NULL;
m_show_border_area = false;
m_hpixels_per_column = 0;
m_begin_update = NULL;
m_update_row = NULL;
@ -506,7 +510,10 @@ void mc6845_device::recompute_parameters(bool postload)
attoseconds_t refresh = HZ_TO_ATTOSECONDS(m_clock) * (m_horiz_char_total + 1) * vert_pix_total;
visarea.set(0, max_visible_x, 0, max_visible_y);
if(m_show_border_area)
visarea.set(0, horiz_pix_total+1, 0, vert_pix_total+1);
else
visarea.set(0, max_visible_x, 0, max_visible_y);
if (LOG) logerror("M6845 config screen: HTOTAL: 0x%x VTOTAL: 0x%x MAX_X: 0x%x MAX_Y: 0x%x HSYNC: 0x%x-0x%x VSYNC: 0x%x-0x%x Freq: %ffps\n",
horiz_pix_total, vert_pix_total, max_visible_x, max_visible_y, hsync_on_pos, hsync_off_pos - 1, vsync_on_pos, vsync_off_pos - 1, 1 / ATTOSECONDS_TO_DOUBLE(refresh));
@ -1041,6 +1048,7 @@ void mc6845_device::device_start()
m_line_address = 0;
m_current_disp_addr = 0;
save_item(NAME(m_show_border_area));
save_item(NAME(m_hpixels_per_column));
save_item(NAME(m_register_address_latch));
save_item(NAME(m_horiz_char_total));

View File

@ -70,6 +70,7 @@ typedef void (*mc6845_on_update_addr_changed_func)(mc6845_device *device, int ad
struct mc6845_interface
{
const char *m_screen_tag; /* screen we are acting on */
bool m_show_border_area; /* visible screen area (false) active display (true) active display + blanking */
int m_hpixels_per_column; /* number of pixels per video memory address */
/* if specified, this gets called before any pixel update,

View File

@ -180,17 +180,18 @@ static VIDEO_START( cga_poisk2 );
static SCREEN_UPDATE_RGB32( cga_poisk2 );
static VIDEO_START( cga_mc1502 );
static const mc6845_interface mc6845_cga_intf =
static MC6845_INTERFACE( mc6845_cga_intf )
{
CGA_SCREEN_NAME, /* screen number */
8, /* numbers of pixels per video memory address */
NULL, /* begin_update */
cga_update_row, /* update_row */
NULL, /* end_update */
DEVCB_NULL, /* on_de_changed */
DEVCB_NULL, /* on_cur_changed */
DEVCB_LINE(cga_hsync_changed), /* on_hsync_changed */
DEVCB_LINE(cga_vsync_changed), /* on_vsync_changed */
CGA_SCREEN_NAME, /* screen number */
false, /* show border area */
8, /* numbers of pixels per video memory address */
NULL, /* begin_update */
cga_update_row, /* update_row */
NULL, /* end_update */
DEVCB_NULL, /* on_de_changed */
DEVCB_NULL, /* on_cur_changed */
DEVCB_LINE(cga_hsync_changed), /* on_hsync_changed */
DEVCB_LINE(cga_vsync_changed), /* on_vsync_changed */
NULL
};

View File

@ -362,9 +362,10 @@ static const ay8910_interface ay8910_intf =
* CRTC Interface *
************************/
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -988,9 +988,10 @@ GFXDECODE_END
* CRTC Interface *
***********************/
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -207,9 +207,10 @@ static const ay8910_interface ay8910_config =
DEVCB_NULL
};
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -799,9 +799,10 @@ static const ym3812_interface ym3812_config =
* CRTC Interface *
************************************/
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
4, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -1545,13 +1545,14 @@ static const pia6821_interface aristmk4_pia1_intf =
DEVCB_NULL // IRQB
};
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
/* in fact is a mc6845 driving 4 pixels by memory address.
that's why the big horizontal parameters */
"screen", /* screen we are acting on */
4, /* number of pixels per video memory address */
false, /* show border area */
4, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */
NULL, /* after pixel update callback */

View File

@ -847,9 +847,10 @@ GFXDECODE_END
* CRTC Interface *
*******************************************/
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -738,9 +738,10 @@ static const pia6821_interface megadpkr_pia1_intf =
* CRTC Interface *
********************************************/
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -1662,9 +1662,11 @@ WRITE_LINE_MEMBER(blitz68k_state::crtc_vsync_irq5)
machine().device("maincpu")->execute().set_input_line(5, state ? ASSERT_LINE : CLEAR_LINE);
}
const mc6845_interface mc6845_intf_irq1 =
static MC6845_INTERFACE( mc6845_intf_irq1 )
{
"screen", /* screen we are acting on */
false, /* show border area */
4, /* number of pixels per video memory address */ /* Horizontal Display programmed to 160 characters */
NULL, /* before pixel update callback */
NULL, /* row update callback */
@ -1676,9 +1678,10 @@ const mc6845_interface mc6845_intf_irq1 =
crtc_addr /* update address callback */
};
const mc6845_interface mc6845_intf_irq3 =
static MC6845_INTERFACE( mc6845_intf_irq3 )
{
"screen", /* screen we are acting on */
false, /* show border area */
4, /* number of pixels per video memory address */ /* Horizontal Display programmed to 160 characters */
NULL, /* before pixel update callback */
NULL, /* row update callback */
@ -1690,9 +1693,10 @@ const mc6845_interface mc6845_intf_irq3 =
crtc_addr /* update address callback */
};
const mc6845_interface mc6845_intf_irq5 =
static MC6845_INTERFACE( mc6845_intf_irq5 )
{
"screen", /* screen we are acting on */
false, /* show border area */
4, /* number of pixels per video memory address */ /* Horizontal Display programmed to 160 characters */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -306,9 +306,10 @@ static GFXDECODE_START( buster )
GFXDECODE_ENTRY( "gfx1", 0, tiles8x8_layout, 0, 1 )
GFXDECODE_END
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -2714,9 +2714,10 @@ static const ay8910_interface sys906_ay8912_intf =
* CRTC Interface *
*************************************************/
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -309,9 +309,10 @@ void carrera_state::palette_init()
}
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -446,9 +446,10 @@ void chance32_state::machine_reset()
}
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
16, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -992,9 +992,10 @@ static const ay8910_interface ay8912_interface =
DEVCB_NULL
};
static const mc6845_interface h46505_intf =
static MC6845_INTERFACE( h46505_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -430,6 +430,7 @@ static AY8910_INTERFACE( ay8910_config_2 )
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -535,9 +535,10 @@ static const ay8910_interface ay8910_config =
};
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -2457,9 +2457,10 @@ static const ay8910_interface funquiz_ay8910_intf =
* CRTC Interface *
************************/
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
4, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -3399,9 +3399,10 @@ static const pia6821_interface wcfalcon_pia1_intf =
* CRTC Interface *
*******************************************/
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -455,9 +455,10 @@ static GFXDECODE_START( hitpoker )
GFXDECODE_ENTRY( "gfx1", 0, hitpoker_layout_8bpp, 0, 8 )
GFXDECODE_END
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -456,9 +456,10 @@ static const pia6821_interface pia1_intf =
* CRTC Interface *
************************/
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -392,9 +392,10 @@ GFXDECODE_END
* CRTC Interface *
************************/
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -912,9 +912,10 @@ GFXDECODE_END
*
***********************************************************************************************************/
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -236,9 +236,10 @@ void laserbas_state::machine_reset()
m_count = 0;
}
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -973,9 +973,10 @@ static GFXDECODE_START( luckgrln )
GFXDECODE_ENTRY( "reels", 0, tiles8x32_layout, 0, 64 )
GFXDECODE_END
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -780,9 +780,10 @@ GFXDECODE_END
* CRTC Interface *
************************/
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -999,9 +999,10 @@ GFXDECODE_END
* CRTC Interface *
***********************/
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
16, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -313,9 +313,10 @@ WRITE_LINE_MEMBER(merit_state::vsync_changed)
machine().device("maincpu")->execute().set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
}
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
begin_update, /* before pixel update callback */
update_row, /* row update callback */

View File

@ -391,9 +391,10 @@ GFXDECODE_END
* CRTC Interface *
**********************************/
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -491,9 +491,10 @@ static const ay8910_interface ay8910_config =
* CRTC Interface *
************************/
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
4, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -144,9 +144,10 @@ WRITE_LINE_MEMBER(mpu4dealem_state::dealem_vsync_changed)
*
*************************************/
static const mc6845_interface hd6845_intf =
static MC6845_INTERFACE( hd6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -228,9 +228,10 @@ UINT32 murogem_state::screen_update_murogem(screen_device &screen, bitmap_ind16
return 0;
}
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -422,9 +422,10 @@ WRITE_LINE_MEMBER(nyny_state::display_enable_changed)
}
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
begin_update, /* before pixel update callback */
update_row, /* row update callback */

View File

@ -364,9 +364,10 @@ static INPUT_PORTS_START( othello )
INPUT_PORTS_END
static const mc6845_interface h46505_intf =
static MC6845_INTERFACE( h46505_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
TILE_WIDTH, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
update_row, /* row update callback */

View File

@ -291,9 +291,10 @@ static const i2cmem_interface i2cmem_interface =
static MC6845_ON_UPDATE_ADDR_CHANGED(crtc_addr);
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -86,7 +86,6 @@ public:
virtual void video_start();
virtual void palette_init();
UINT32 screen_update_progolf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(progolf_interrupt);
};
@ -369,15 +368,10 @@ static GFXDECODE_START( progolf )
GFXDECODE_END
//#ifdef UNUSED_FUNCTION
INTERRUPT_GEN_MEMBER(progolf_state::progolf_interrupt)
{
}
//#endif
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */
@ -423,7 +417,6 @@ static MACHINE_CONFIG_START( progolf, progolf_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", DECO_222, 3000000/2) /* guess, 3 Mhz makes the game to behave worse? */
MCFG_CPU_PROGRAM_MAP(main_cpu)
MCFG_CPU_VBLANK_INT_DRIVER("screen", progolf_state, progolf_interrupt)
MCFG_CPU_ADD("audiocpu", M6502, 500000)
MCFG_CPU_PROGRAM_MAP(sound_cpu)
@ -457,7 +450,6 @@ static MACHINE_CONFIG_DERIVED( progolfa, progolf )
MCFG_DEVICE_REMOVE("maincpu") /* different encrypted cpu to progolf */
MCFG_CPU_ADD("maincpu", DECO_CPU6, 3000000/2) /* guess, 3 Mhz makes the game to behave worse? */
MCFG_CPU_PROGRAM_MAP(main_cpu)
MCFG_CPU_VBLANK_INT_DRIVER("screen", progolf_state, progolf_interrupt)
MACHINE_CONFIG_END

View File

@ -392,9 +392,10 @@ WRITE_LINE_MEMBER(r2dtank_state::display_enable_changed)
}
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
begin_update, /* before pixel update callback */
update_row, /* row update callback */

View File

@ -228,9 +228,10 @@ static GFXDECODE_START( rgum )
GFXDECODE_END
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -166,9 +166,10 @@ WRITE_LINE_MEMBER(slotcarn_state::vsync_changed)
machine().device("maincpu")->execute().set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
}
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
begin_update, /* before pixel update callback */
update_row, /* row update callback */

View File

@ -755,9 +755,10 @@ INTERRUPT_GEN_MEMBER(snk6502_state::snk6502_interrupt)
*
*************************************/
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -283,9 +283,10 @@ static GFXDECODE_START( speedatk )
GFXDECODE_ENTRY( "gfx2", 0, charlayout_3bpp, 0, 32 )
GFXDECODE_END
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -505,9 +505,10 @@ WRITE_LINE_MEMBER(spiders_state::display_enable_changed)
}
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
begin_update, /* before pixel update callback */
update_row, /* row update callback */

View File

@ -265,9 +265,11 @@ static MC6845_UPDATE_ROW( atamanot_update_row )
}
}
static const mc6845_interface ssingles_mc6845_intf =
static MC6845_INTERFACE( ssingles_mc6845_intf )
{
"screen",
false,
8,
NULL, /* before pixel update callback */
ssingles_update_row, /* row update callback */
@ -279,9 +281,10 @@ static const mc6845_interface ssingles_mc6845_intf =
NULL /* update address callback */
};
static const mc6845_interface atamanot_mc6845_intf =
static MC6845_INTERFACE( atamanot_mc6845_intf )
{
"screen",
false,
8,
NULL, /* before pixel update callback */
atamanot_update_row, /* row update callback */

View File

@ -399,9 +399,10 @@ GFXDECODE_END
* CRTC Interface *
************************/
//static const mc6845_interface mc6845_intf =
//static MC6845_INTERFACE( mc6845_intf )
//{
// "screen", /* screen we are acting on */
// false,
// 4, /* number of pixels per video memory address */
// NULL, /* before pixel update callback */
// NULL, /* row update callback */

View File

@ -359,9 +359,10 @@ WRITE_LINE_MEMBER(tapatune_state::crtc_vsync)
machine().device("maincpu")->execute().set_input_line(2, state ? ASSERT_LINE : CLEAR_LINE);
}
static const mc6845_interface h46505_intf =
static MC6845_INTERFACE( h46505_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
5, /* number of pixels per video memory address */
begin_update,/* before pixel update callback */
update_row, /* row update callback */

View File

@ -544,9 +544,10 @@ GFXDECODE_END
* CRTC Interface *
************************/
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -432,9 +432,10 @@ static const pia6821_interface pia0_intf =
* CRTC Interface *
*******************************************/
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
4, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -214,9 +214,10 @@ static GFXDECODE_START( usgames )
GFXDECODE_END
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -564,9 +564,10 @@ WRITE_LINE_MEMBER(vcombat_state::sound_update)
machine().device("soundcpu")->execute().set_input_line(M68K_IRQ_1, state ? ASSERT_LINE : CLEAR_LINE);
}
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
16, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -215,10 +215,11 @@ static const UINT8 pal35[256] = {
/******************** VIDEO SECTION ************************************/
/***************************************************************************/
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
8, /* number of pixels per video memory address */
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */
NULL, /* after pixel update callback */

View File

@ -244,9 +244,10 @@ MC6845_UPDATE_ROW( whitestar_update_row )
}
}
static const mc6845_interface whitestar_crtc6845_interface =
static MC6845_INTERFACE( whitestar_crtc6845_interface )
{
NULL,
false, /* show border area */
1,
NULL,
whitestar_update_row,

View File

@ -377,9 +377,10 @@ static GFXDECODE_START( madalien )
GFXDECODE_END
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -382,9 +382,10 @@ ADDRESS_MAP_END
*
*************************************/
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
begin_update, /* before pixel update callback */
update_row, /* row update callback */

View File

@ -20,9 +20,10 @@
static void twincobr_restore_screen(running_machine &machine);
/* 6845 used for video sync signals only */
const mc6845_interface twincobr_mc6845_intf =
MC6845_INTERFACE( twincobr_mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
2, /* number of pixels per video memory address */ /* Horizontal Display programmed to 160 characters */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -66,9 +66,11 @@ static MC6845_UPDATE_ROW( a6809_update_row )
{
}
static const mc6845_interface a6809_crtc6845_interface =
static MC6845_INTERFACE( a6809_crtc6845_interface )
{
"screen",
false,
12 /*?*/,
NULL,
a6809_update_row,

View File

@ -379,9 +379,11 @@ void alphatro_state::palette_init()
palette_set_color_rgb(machine(), 8, 0xf7, 0xaa, 0x00);
}
static const mc6845_interface alphatro_crtc6845_interface =
static MC6845_INTERFACE( alphatro_crtc6845_interface )
{
"screen",
false,
8,
NULL,
alphatro_update_row,

View File

@ -189,8 +189,10 @@ MC6845_UPDATE_ROW( applix_update_row )
#endif
}
static const mc6845_interface applix_crtc = {
static MC6845_INTERFACE( applix_crtc )
{
"screen", /* name of screen */
false,
8, /* number of dots per character */
NULL,
applix_update_row, /* handler to display a scanline */

View File

@ -235,9 +235,11 @@ WRITE_LINE_MEMBER( apricot_state::apricot_mc6845_de )
m_display_enabled = state;
}
static const mc6845_interface apricot_mc6845_intf =
static MC6845_INTERFACE( apricot_mc6845_intf )
{
"screen",
false,
10,
NULL,
apricot_update_row,

View File

@ -56,9 +56,11 @@ static MC6845_UPDATE_ROW( fp_update_row )
{
}
static const mc6845_interface crtc_intf =
static MC6845_INTERFACE( crtc_intf )
{
SCREEN_CRT_TAG,
false,
8,
NULL,
fp_update_row,

View File

@ -247,9 +247,10 @@ void b16_state::machine_reset()
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -662,8 +662,10 @@ MC6845_UPDATE_ROW( bigbord2_update_row )
}
}
static const mc6845_interface bigbord2_crtc = {
static MC6845_INTERFACE( bigbord2_crtc )
{
SCREEN_TAG, /* name of screen */
false,
8, /* number of dots per character */
NULL,
bigbord2_update_row, /* handler to display a scanline */

View File

@ -564,9 +564,11 @@ static INPUT_PORTS_START( bml3 )
PORT_BIT(0xffe00000,IP_ACTIVE_HIGH,IPT_UNKNOWN)
INPUT_PORTS_END
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -355,9 +355,11 @@ static MC6845_UPDATE_ROW( bw12_update_row )
}
}
static const mc6845_interface bw12_mc6845_interface =
static MC6845_INTERFACE( bw12_mc6845_interface )
{
SCREEN_TAG,
false,
8,
NULL,
bw12_update_row,

View File

@ -788,9 +788,11 @@ static GFXDECODE_START( c128 )
GFXDECODE_ENTRY( "charom", 0x0000, gfx_8x8x1, 0, 1 )
GFXDECODE_END
static const mc6845_interface vdc_intf =
static MC6845_INTERFACE( vdc_intf )
{
SCREEN_VDC_TAG,
false,
8,
NULL,
NULL,

View File

@ -432,8 +432,10 @@ void camplynx_state::video_start()
{
}
static const mc6845_interface lynx48k_crtc6845_interface = {
static MC6845_INTERFACE( lynx48k_crtc6845_interface )
{
"screen",
false,
8,
NULL,
lynx48k_update_row,
@ -445,8 +447,11 @@ static const mc6845_interface lynx48k_crtc6845_interface = {
NULL
};
static const mc6845_interface lynx128k_crtc6845_interface = {
static MC6845_INTERFACE( lynx128k_crtc6845_interface )
{
"screen", /* screen name */
false,
8, /* dots per character */
NULL,
lynx128k_update_row, /* callback to display one scanline */

View File

@ -1103,9 +1103,10 @@ static MC6845_UPDATE_ROW( crtc_update_row )
}
}
static const mc6845_interface crtc_intf =
static MC6845_INTERFACE( crtc_intf )
{
SCREEN_TAG,
false,
9,
NULL,
crtc_update_row,

View File

@ -283,8 +283,10 @@ static GFXDECODE_START( dim68k )
GFXDECODE_ENTRY( "chargen", 0x0000, dim68k_charlayout, 0, 1 )
GFXDECODE_END
static const mc6845_interface dim68k_crtc = {
static MC6845_INTERFACE( dim68k_crtc )
{
"screen", /* name of screen */
false,
8, /* number of dots per character - switchable 7 or 8 */
NULL,
dim68k_update_row, /* handler to display a scanline */

View File

@ -211,9 +211,11 @@ static MC6845_UPDATE_ROW( ec65_update_row )
}
}
static const mc6845_interface ec65_crtc6845_interface =
static MC6845_INTERFACE( ec65_crtc6845_interface )
{
"screen",
false,
8 /*?*/,
NULL,
ec65_update_row,

View File

@ -713,9 +713,10 @@ static const centronics_interface einstein_centronics_config =
DEVCB_NULL
};
static const mc6845_interface einstein_crtc6845_interface =
static MC6845_INTERFACE( einstein_crtc6845_interface )
{
"80column",
false,
8,
NULL,
einstein_6845_update_row,

View File

@ -381,9 +381,11 @@ GFXDECODE_END
static const UPD7810_CONFIG fp1100_slave_cpu_config = { TYPE_7801, NULL };
//static const upd1771_interface scv_upd1771c_config = { DEVCB_LINE( scv_upd1771_ack_w ) };
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
fp1100_update_row, /* row update callback */

View File

@ -280,9 +280,10 @@ void fp6000_state::machine_reset()
{
}
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -350,9 +350,11 @@ static const ins8250_interface h19_ace_interface =
DEVCB_NULL
};
static const mc6845_interface h19_crtc6845_interface =
static MC6845_INTERFACE( h19_crtc6845_interface )
{
"screen",
false,
8 /*?*/,
NULL,
h19_update_row,

View File

@ -385,8 +385,11 @@ WRITE8_MEMBER( hp9k_state::kbd_put )
kbdBit=data;
}
static const mc6845_interface hp9k_mc6845_intf = {
static MC6845_INTERFACE( hp9k_mc6845_intf )
{
"screen", /* name of screen */
false,
8, /* number of dots per character */
NULL,
NULL, /* handler to display a scanline */

View File

@ -147,8 +147,12 @@ static const z80_daisy_config kaypro2x_daisy_chain[] =
{ NULL }
};
static const mc6845_interface kaypro2x_crtc = {
static MC6845_INTERFACE( kaypro2x_crtc )
{
"screen", /* name of screen */
false,
7, /* number of dots per character */
NULL,
kaypro2x_update_row, /* handler to display a scanline */

View File

@ -831,9 +831,11 @@ void m20_state::machine_reset()
m_maincpu->reset(); // reset the CPU to ensure it picks up the new vector
}
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
16, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -134,8 +134,11 @@ MC6845_UPDATE_ROW( mbc200_update_row )
{
}
static const mc6845_interface mbc200_crtc = {
static MC6845_INTERFACE( mbc200_crtc )
{
"screen", /* name of screen */
false,
8, /* number of dots per character */
NULL,
mbc200_update_row, /* handler to display a scanline */

View File

@ -614,8 +614,11 @@ static const floppy_interface mbee_floppy_interface =
NULL
};
static const mc6845_interface mbee_crtc = {
static MC6845_INTERFACE( mbee_crtc )
{
"screen", /* name of screen */
false,
8, /* number of dots per character */
NULL,
mbee_update_row, /* handler to display a scanline */
@ -627,8 +630,11 @@ static const mc6845_interface mbee_crtc = {
mbee_update_addr /* handler to process transparent mode */
};
static const mc6845_interface mbeeic_crtc = {
static MC6845_INTERFACE( mbeeic_crtc )
{
"screen", /* name of screen */
false,
8, /* number of dots per character */
NULL,
mbeeic_update_row, /* handler to display a scanline */
@ -640,8 +646,10 @@ static const mc6845_interface mbeeic_crtc = {
mbee_update_addr /* handler to process transparent mode */
};
static const mc6845_interface mbeeppc_crtc = {
static MC6845_INTERFACE( mbeeppc_crtc )
{
"screen", /* name of screen */
false,
8, /* number of dots per character */
NULL,
mbeeppc_update_row, /* handler to display a scanline */
@ -653,8 +661,10 @@ static const mc6845_interface mbeeppc_crtc = {
mbee_update_addr /* handler to process transparent mode */
};
static const mc6845_interface mbee256_crtc = {
static MC6845_INTERFACE( mbee256_crtc )
{
"screen", /* name of screen */
false,
8, /* number of dots per character */
NULL,
mbeeppc_update_row, /* handler to display a scanline */

View File

@ -144,9 +144,11 @@ void multi16_state::machine_reset()
{
}
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -556,9 +556,11 @@ static GFXDECODE_START( multi8 )
GFXDECODE_ENTRY( "kanji", 0x0000, multi8_kanjilayout, 0, 1 )
GFXDECODE_END
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -230,9 +230,10 @@ static GFXDECODE_START( myb3k )
GFXDECODE_ENTRY( "ipl", 0x0000, myb3k_charlayout, 0, 1 )
GFXDECODE_END
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -331,18 +331,19 @@ static GFXDECODE_START( mycom )
GFXDECODE_ENTRY( "chargen", 0x0000, mycom_charlayout, 0, 1 )
GFXDECODE_END
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
mycom_update_row, /* row update callback */
NULL, /* after pixel update callback */
DEVCB_NULL, /* callback for display state changes */
DEVCB_NULL, /* callback for cursor state changes */
DEVCB_NULL, /* HSYNC callback */
DEVCB_NULL, /* VSYNC callback */
NULL /* update address callback */
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
mycom_update_row, /* row update callback */
NULL, /* after pixel update callback */
DEVCB_NULL, /* callback for display state changes */
DEVCB_NULL, /* callback for cursor state changes */
DEVCB_NULL, /* HSYNC callback */
DEVCB_NULL, /* VSYNC callback */
NULL /* update address callback */
};
WRITE8_MEMBER( mycom_state::mycom_04_w )

View File

@ -259,9 +259,10 @@ static GFXDECODE_START( paso1600 )
GFXDECODE_END
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -301,18 +301,19 @@ static Z80PIO_INTERFACE( z80pio_intf )
DEVCB_NULL
};
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
pasopia_update_row, /* row update callback */
NULL, /* after pixel update callback */
DEVCB_NULL, /* callback for display state changes */
DEVCB_NULL, /* callback for cursor state changes */
DEVCB_NULL, /* HSYNC callback */
DEVCB_NULL, /* VSYNC callback */
NULL /* update address callback */
NULL, /* after pixel update callback */
DEVCB_NULL, /* callback for display state changes */
DEVCB_NULL, /* callback for cursor state changes */
DEVCB_NULL, /* HSYNC callback */
DEVCB_NULL, /* VSYNC callback */
NULL /* update address callback */
};
static const gfx_layout p7_chars_8x8 =

View File

@ -723,9 +723,10 @@ static GFXDECODE_START( pasopia7 )
GFXDECODE_ENTRY( "kanji", 0x00000, p7_chars_16x16, 0, 0x10 )
GFXDECODE_END
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -597,8 +597,11 @@ static GFXDECODE_START( superpet )
GFXDECODE_ENTRY( "gfx1", 0x3000, pet80_charlayout, 0, 1 )
GFXDECODE_END
static const mc6845_interface crtc_pet40 = {
static MC6845_INTERFACE( crtc_pet40 )
{
"screen",
false,
8,
NULL,
pet40_update_row,
@ -610,8 +613,10 @@ static const mc6845_interface crtc_pet40 = {
NULL
};
static const mc6845_interface crtc_pet80 = {
static MC6845_INTERFACE( crtc_pet80 )
{
"screen",
false,
16,
NULL,
pet80_update_row,

View File

@ -463,9 +463,11 @@ static MC6845_UPDATE_ROW( pyl601a_update_row )
}
static const mc6845_interface pyl601_crtc6845_interface =
static MC6845_INTERFACE( pyl601_crtc6845_interface )
{
"screen",
false,
8 /*?*/,
NULL,
pyl601_update_row,
@ -477,9 +479,10 @@ static const mc6845_interface pyl601_crtc6845_interface =
NULL
};
static const mc6845_interface pyl601a_crtc6845_interface =
static MC6845_INTERFACE( pyl601a_crtc6845_interface )
{
"screen",
false,
8 /*?*/,
NULL,
pyl601a_update_row,

View File

@ -27,6 +27,23 @@
#include "formats/basicdsk.h"
#include "imagedev/flopdrv.h"
#define mc6845_h_char_total (m_crtc_vreg[0]+1)
#define mc6845_h_display (m_crtc_vreg[1])
#define mc6845_h_sync_pos (m_crtc_vreg[2])
#define mc6845_sync_width (m_crtc_vreg[3])
#define mc6845_v_char_total (m_crtc_vreg[4]+1)
#define mc6845_v_total_adj (m_crtc_vreg[5])
#define mc6845_v_display (m_crtc_vreg[6])
#define mc6845_v_sync_pos (m_crtc_vreg[7])
#define mc6845_mode_ctrl (m_crtc_vreg[8])
#define mc6845_tile_height (m_crtc_vreg[9]+1)
#define mc6845_cursor_y_start (m_crtc_vreg[0x0a])
#define mc6845_cursor_y_end (m_crtc_vreg[0x0b])
#define mc6845_start_addr (((m_crtc_vreg[0x0c]<<8) & 0x3f00) | (m_crtc_vreg[0x0d] & 0xff))
#define mc6845_cursor_addr (((m_crtc_vreg[0x0e]<<8) & 0x3f00) | (m_crtc_vreg[0x0f] & 0xff))
#define mc6845_light_pen_addr (((m_crtc_vreg[0x10]<<8) & 0x3f00) | (m_crtc_vreg[0x11] & 0xff))
#define mc6845_update_addr (((m_crtc_vreg[0x12]<<8) & 0x3f00) | (m_crtc_vreg[0x13] & 0xff))
class smc777_state : public driver_device
{
public:
@ -50,14 +67,11 @@ public:
UINT8 *m_gvram;
UINT8 *m_pcg;
UINT16 m_cursor_addr;
UINT16 m_cursor_raster;
UINT8 m_keyb_press;
UINT8 m_keyb_press_flag;
UINT8 m_shift_press_flag;
UINT8 m_backdrop_pen;
UINT8 m_display_reg;
int m_addr_latch;
UINT8 m_fdc_irq_flag;
UINT8 m_fdc_drq_flag;
UINT8 m_system_data;
@ -68,6 +82,8 @@ public:
UINT8 m_keyb_direct;
UINT8 m_pal_mode;
UINT8 m_keyb_cmd;
UINT8 m_crtc_vreg[0x20];
UINT8 m_crtc_addr;
DECLARE_WRITE8_MEMBER(smc777_6845_w);
DECLARE_READ8_MEMBER(smc777_vram_r);
DECLARE_READ8_MEMBER(smc777_attr_r);
@ -107,9 +123,9 @@ public:
};
#define CRTC_MIN_X 10
#define CRTC_MIN_Y 10
/* TODO: correct numbers, calculable thru mc6845 regs */
#define CRTC_MIN_X 24*8
#define CRTC_MIN_Y 4*8
void smc777_state::video_start()
{
@ -121,9 +137,11 @@ UINT32 smc777_state::screen_update_smc777(screen_device &screen, bitmap_ind16 &b
UINT16 count;
int x_width;
// popmessage("%d %d %d %d",mc6845_v_char_total,mc6845_v_total_adj,mc6845_v_display,mc6845_v_sync_pos);
bitmap.fill(machine().pens[m_backdrop_pen], cliprect);
x_width = (m_display_reg & 0x80) ? 2 : 4;
x_width = ((m_display_reg & 0x80) >> 7);
count = 0x0000;
@ -137,26 +155,26 @@ UINT32 smc777_state::screen_update_smc777(screen_device &screen, bitmap_ind16 &b
color = (m_gvram[count] & 0xf0) >> 4;
/* todo: clean this up! */
if(x_width == 2)
{
bitmap.pix16(y+yi+CRTC_MIN_Y, x*2+0+CRTC_MIN_X) = machine().pens[color];
}
else
//if(x_width)
{
bitmap.pix16(y+yi+CRTC_MIN_Y, x*4+0+CRTC_MIN_X) = machine().pens[color];
bitmap.pix16(y+yi+CRTC_MIN_Y, x*4+1+CRTC_MIN_X) = machine().pens[color];
}
//else
//{
// bitmap.pix16(y+yi+CRTC_MIN_Y, x*2+0+CRTC_MIN_X) = machine().pens[color];
//}
color = (m_gvram[count] & 0x0f) >> 0;
if(x_width == 2)
{
bitmap.pix16(y+yi+CRTC_MIN_Y, x*2+1+CRTC_MIN_X) = machine().pens[color];
}
else
//if(x_width)
{
bitmap.pix16(y+yi+CRTC_MIN_Y, x*4+2+CRTC_MIN_X) = machine().pens[color];
bitmap.pix16(y+yi+CRTC_MIN_Y, x*4+3+CRTC_MIN_X) = machine().pens[color];
}
//else
//{
// bitmap.pix16(y+yi+CRTC_MIN_Y, x*2+1+CRTC_MIN_X) = machine().pens[color];
//}
count++;
@ -167,11 +185,9 @@ UINT32 smc777_state::screen_update_smc777(screen_device &screen, bitmap_ind16 &b
count = 0x0000;
x_width = (m_display_reg & 0x80) ? 40 : 80;
for(y=0;y<25;y++)
{
for(x=0;x<x_width;x++)
for(x=0;x<80/(x_width+1);x++)
{
/*
-x-- ---- blink
@ -207,17 +223,25 @@ UINT32 smc777_state::screen_update_smc777(screen_device &screen, bitmap_ind16 &b
pen = ((m_pcg[tile*8+yi]>>(7-xi)) & 1) ? (color+m_pal_mode) : bk_pen;
if (pen != -1)
bitmap.pix16(y*8+CRTC_MIN_Y+yi, x*8+CRTC_MIN_X+xi) = machine().pens[pen];
{
if(x_width)
{
bitmap.pix16(y*8+CRTC_MIN_Y+yi, (x*8+xi)*2+0+CRTC_MIN_X) = machine().pens[pen];
bitmap.pix16(y*8+CRTC_MIN_Y+yi, (x*8+xi)*2+1+CRTC_MIN_X) = machine().pens[pen];
}
else
bitmap.pix16(y*8+CRTC_MIN_Y+yi, x*8+CRTC_MIN_X+xi) = machine().pens[pen];
}
}
}
// draw cursor
if(m_cursor_addr == count)
if(mc6845_cursor_addr == count)
{
int xc,yc,cursor_on;
cursor_on = 0;
switch(m_cursor_raster & 0x60)
switch(mc6845_cursor_y_start & 0x60)
{
case 0x00: cursor_on = 1; break; //always on
case 0x20: cursor_on = 0; break; //always off
@ -227,11 +251,17 @@ UINT32 smc777_state::screen_update_smc777(screen_device &screen, bitmap_ind16 &b
if(cursor_on)
{
for(yc=0;yc<(8-(m_cursor_raster & 7));yc++)
for(yc=0;yc<(8-(mc6845_cursor_y_start & 7));yc++)
{
for(xc=0;xc<8;xc++)
{
bitmap.pix16(y*8+CRTC_MIN_Y-yc+7, x*8+CRTC_MIN_X+xc) = machine().pens[0x7];
if(x_width)
{
bitmap.pix16(y*8+CRTC_MIN_Y-yc+7, (x*8+xc)*2+0+CRTC_MIN_X) = machine().pens[0x7];
bitmap.pix16(y*8+CRTC_MIN_Y-yc+7, (x*8+xc)*2+1+CRTC_MIN_X) = machine().pens[0x7];
}
else
bitmap.pix16(y*8+CRTC_MIN_Y-yc+7, x*8+CRTC_MIN_X+xc) = machine().pens[0x7];
}
}
}
@ -248,19 +278,13 @@ WRITE8_MEMBER(smc777_state::smc777_6845_w)
{
if(offset == 0)
{
m_addr_latch = data;
//mc6845_address_w(m_crtc, 0,data);
m_crtc_addr = data;
m_crtc->address_w(space, 0,data);
}
else
{
if(m_addr_latch == 0x0a)
m_cursor_raster = data;
else if(m_addr_latch == 0x0e)
m_cursor_addr = ((data<<8) & 0x3f00) | (m_cursor_addr & 0xff);
else if(m_addr_latch == 0x0f)
m_cursor_addr = (m_cursor_addr & 0x3f00) | (data & 0xff);
//mc6845_register_w(m_crtc, 0,data);
m_crtc_vreg[m_crtc_addr] = data;
m_crtc->register_w(space, 0,data);
}
}
@ -553,20 +577,6 @@ WRITE8_MEMBER(smc777_state::display_reg_w)
---- -x-- mode select?
*/
{
if((m_display_reg & 0x80) != (data & 0x80))
{
rectangle visarea = machine().primary_screen->visible_area();
int x_width;
x_width = (data & 0x80) ? 320 : 640;
visarea.set(0, (x_width+(CRTC_MIN_X*2)) - 1, 0, (200+(CRTC_MIN_Y*2)) - 1);
machine().primary_screen->configure(660, 220, visarea, machine().primary_screen->frame_period().attoseconds);
}
}
m_display_reg = data;
}
@ -984,9 +994,10 @@ void smc777_state::machine_reset()
}
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
true, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -616,8 +616,10 @@ static const cassette_interface super80_cassette_interface =
};
static const mc6845_interface super80v_crtc = {
static MC6845_INTERFACE( super80v_crtc )
{
"screen", /* name of screen */
false,
SUPER80V_DOTS, /* number of dots per character */
NULL,
super80v_update_row, /* handler to display a scanline */

View File

@ -386,9 +386,11 @@ static MACHINE_CONFIG_DERIVED( svi328n, svi318n )
MCFG_RAM_EXTRA_OPTIONS("96K,160K")
MACHINE_CONFIG_END
static const mc6845_interface svi806_crtc6845_interface =
static MC6845_INTERFACE( svi806_crtc6845_interface )
{
"svi806",
false,
8 /*?*/,
NULL,
svi806_crtc6845_update_row,

View File

@ -616,9 +616,10 @@ WRITE_LINE_MEMBER( trs80m2_state::vsync_w )
}
}
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
SCREEN_TAG,
false,
8,
NULL,
trs80m2_update_row,

View File

@ -631,9 +631,11 @@ static QUICKLOAD_LOAD(tvc64)
}
}
static const mc6845_interface tvc_crtc6845_interface =
static MC6845_INTERFACE( tvc_crtc6845_interface )
{
"screen",
false,
8 /*?*/,
NULL,
tvc_update_row,

View File

@ -173,8 +173,11 @@ void v6809_state::video_start()
m_p_videoram = memregion("videoram")->base();
}
static const mc6845_interface v6809_crtc = {
static MC6845_INTERFACE( v6809_crtc )
{
"screen", /* name of screen */
false,
8, /* number of dots per character */
NULL,
v6809_update_row, /* handler to display a scanline */

View File

@ -107,9 +107,11 @@ static MC6845_UPDATE_ROW( victor9k_update_row )
}
}
static const mc6845_interface hd46505s_intf =
static MC6845_INTERFACE( hd46505s_intf )
{
SCREEN_TAG,
false,
10,
NULL,
victor9k_update_row,

View File

@ -947,9 +947,10 @@ static MC6845_UPDATE_ROW( vk100_update_row )
}
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen",
false,
12,
NULL,
vk100_update_row,

View File

@ -1897,9 +1897,10 @@ static I8255A_INTERFACE( ppi8255_intf )
DEVCB_DRIVER_MEMBER(x1_state, x1_portc_w) /* Port C write */
};
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -88,18 +88,19 @@ static I8255A_INTERFACE( ppi8255_intf )
DEVCB_DRIVER_MEMBER(x1_state, x1_portc_w) /* Port C write */
};
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"x1_screen", /* screen we are acting on */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */
NULL, /* after pixel update callback */
DEVCB_NULL, /* callback for display state changes */
DEVCB_NULL, /* callback for cursor state changes */
DEVCB_NULL, /* HSYNC callback */
DEVCB_NULL, /* VSYNC callback */
NULL /* update address callback */
false, /* show border area*/
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */
NULL, /* after pixel update callback */
DEVCB_NULL, /* callback for display state changes */
DEVCB_NULL, /* callback for cursor state changes */
DEVCB_NULL, /* HSYNC callback */
DEVCB_NULL, /* VSYNC callback */
NULL /* update address callback */
};
/*************************************

View File

@ -627,9 +627,11 @@ static const struct pic8259_interface z100_pic8259_slave_config =
DEVCB_NULL
};
static const mc6845_interface mc6845_intf =
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */

View File

@ -226,9 +226,11 @@ static MC6845_UPDATE_ROW( zrt80_update_row )
}
}
static const mc6845_interface zrt80_crtc6845_interface =
static MC6845_INTERFACE( zrt80_crtc6845_interface )
{
"screen",
false,
8 /*?*/,
NULL,
zrt80_update_row,

View File

@ -48,9 +48,10 @@ const device_type A2BUS_VTC2 = &device_creator<a2bus_vtc2_device>;
static MC6845_UPDATE_ROW( videoterm_update_row );
static const mc6845_interface mc6845_mda_intf =
static MC6845_INTERFACE( mc6845_mda_intf )
{
VIDEOTERM_SCREEN_NAME, /* screen number */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* begin_update */
videoterm_update_row, /* update_row */

Some files were not shown because too many files have changed in this diff Show More