diff --git a/src/emu/video/mc6845.c b/src/emu/video/mc6845.c index 92b521c580e..88e33cd2904 100644 --- a/src/emu/video/mc6845.c +++ b/src/emu/video/mc6845.c @@ -39,29 +39,32 @@ enum TYPE_H46505, TYPE_HD6845, TYPE_SY6545_1, + TYPE_SY6845E, NUM_TYPES }; /* mode macros */ - #define MODE_TRANSPARENT(d) (((d)->mode_control & 0x08) != 0) #define MODE_TRANSPARENT_PHI2(d) (((d)->mode_control & 0x88) == 0x88) /* FIXME: not supported yet */ #define MODE_TRANSPARENT_BLANK(d) (((d)->mode_control & 0x88) == 0x08) #define MODE_UPDATE_STROBE(d) (((d)->mode_control & 0x40) != 0) +#define MODE_CURSOR_SKEW(d) (((d)->mode_control & 0x20) != 0) +#define MODE_DISPLAY_ENABLE_SKEW(d) (((d)->mode_control & 0x10) != 0) +#define MODE_ROW_COLUMN_ADDRESSING(d) (((d)->mode_control & 0x04) != 0) -/* capabilities */ /* MC6845 MC6845-1 C6545-1 R6545-1 H46505 HD6845 SY6545-1 */ -static const int supports_disp_start_addr_r[NUM_TYPES] = { TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }; -static const int supports_vert_sync_width[NUM_TYPES] = { FALSE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE }; -static const int supports_status_reg_d5[NUM_TYPES] = { FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, TRUE }; -static const int supports_status_reg_d6[NUM_TYPES] = { FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, TRUE }; +/* capabilities */ /* MC6845 MC6845-1 C6545-1 R6545-1 H46505 HD6845 SY6545-1 SY6845E */ +static const int supports_disp_start_addr_r[NUM_TYPES] = { TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE }; +static const int supports_vert_sync_width[NUM_TYPES] = { FALSE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, TRUE }; +static const int supports_status_reg_d5[NUM_TYPES] = { FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, TRUE, TRUE }; +static const int supports_status_reg_d6[NUM_TYPES] = { FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, TRUE, TRUE }; /* FIXME: check other variants */ -static const int supports_status_reg_d7[NUM_TYPES] = { FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, TRUE }; +static const int supports_status_reg_d7[NUM_TYPES] = { FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, TRUE, TRUE }; /* FIXME: check other variants */ -static const int supports_transparent[NUM_TYPES] = { FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, TRUE }; +static const int supports_transparent[NUM_TYPES] = { FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, TRUE, TRUE }; typedef struct _mc6845_t mc6845_t; @@ -169,7 +172,8 @@ INLINE mc6845_t *get_safe_token(running_device *device) (device->type() == R6545_1) || (device->type() == H46505) || (device->type() == HD6845) || - (device->type() == SY6545_1)); + (device->type() == SY6545_1) || + (device->type() == SY6845E)); return (mc6845_t *)downcast(device)->token(); } @@ -982,6 +986,11 @@ static DEVICE_START( sy6545_1 ) common_start(device, TYPE_SY6545_1); } +static DEVICE_START( sy6845e ) +{ + common_start(device, TYPE_SY6845E); +} + static DEVICE_RESET( mc6845 ) { @@ -1062,7 +1071,7 @@ DEVICE_GET_INFO( mc6845_1 ) switch (state) { /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: strcpy(info->s, "Motorla 6845-1"); break; + case DEVINFO_STR_NAME: strcpy(info->s, "Motorola 6845-1"); break; /* --- the following bits of info are returned as pointers to data or functions --- */ case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(mc6845_1); break; @@ -1147,6 +1156,20 @@ DEVICE_GET_INFO( sy6545_1 ) } +DEVICE_GET_INFO( sy6845e ) +{ + switch (state) + { + /* --- the following bits of info are returned as NULL-terminated strings --- */ + case DEVINFO_STR_NAME: strcpy(info->s, "Synertek 6845E"); break; + + /* --- the following bits of info are returned as pointers to data or functions --- */ + case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(sy6845e); break; + + default: DEVICE_GET_INFO_CALL(mc6845); break; + } +} + DEFINE_LEGACY_DEVICE(MC6845, mc6845); DEFINE_LEGACY_DEVICE(MC6845_1, mc6845_1); DEFINE_LEGACY_DEVICE(R6545_1, r6545_1); @@ -1154,3 +1177,4 @@ DEFINE_LEGACY_DEVICE(C6545_1, c6545_1); DEFINE_LEGACY_DEVICE(H46505, h46505); DEFINE_LEGACY_DEVICE(HD6845, hd6845); DEFINE_LEGACY_DEVICE(SY6545_1, sy6545_1); +DEFINE_LEGACY_DEVICE(SY6845E, sy6845e); diff --git a/src/emu/video/mc6845.h b/src/emu/video/mc6845.h index ede49ee33e0..2fe0d6b5d2d 100644 --- a/src/emu/video/mc6845.h +++ b/src/emu/video/mc6845.h @@ -19,6 +19,7 @@ DECLARE_LEGACY_DEVICE(C6545_1, c6545_1); DECLARE_LEGACY_DEVICE(H46505, h46505); DECLARE_LEGACY_DEVICE(HD6845, hd6845); DECLARE_LEGACY_DEVICE(SY6545_1, sy6545_1); +DECLARE_LEGACY_DEVICE(SY6845E, sy6845e); #define MDRV_MC6845_ADD(_tag, _variant, _clock, _config) \