summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Zsolt Vasvari <zsoltvas@mamedev.org>2008-03-11 01:34:44 +0000
committer Zsolt Vasvari <zsoltvas@mamedev.org>2008-03-11 01:34:44 +0000
commit2a8f0936fd1b3e282bac44c6e45300a01d18960d (patch)
tree3a2167feec9cc590f46eb413bec1921565d3de35
parentc4cfa7bde46075df9306bc637d8e0c95907449d6 (diff)
Adds some new varieties: MC6845-1, H46505, HD6845 and SY6545-1
-rw-r--r--src/emu/video/mc6845.c96
-rw-r--r--src/emu/video/mc6845.h8
2 files changed, 98 insertions, 6 deletions
diff --git a/src/emu/video/mc6845.c b/src/emu/video/mc6845.c
index 00df99bb104..f5e74b66838 100644
--- a/src/emu/video/mc6845.c
+++ b/src/emu/video/mc6845.c
@@ -33,21 +33,25 @@
enum
{
TYPE_MC6845,
+ TYPE_MC6845_1,
TYPE_C6545_1,
TYPE_R6545_1,
+ TYPE_H46505,
+ TYPE_HD6845,
+ TYPE_SY6545_1,
NUM_TYPES
};
/* tags for state saving */
-const char * const device_tags[NUM_TYPES] = { "mc6845", "c6545-1", "r6545-1" };
+const char * const device_tags[NUM_TYPES] = { "mc6845", "mc6845-1", "c6545-1", "r6545-1", "h46505", "hd6845", "sy6545-1" };
/* capabilities */
-static const int supports_disp_start_addr_r[NUM_TYPES] = { TRUE, FALSE, FALSE };
-static const int supports_vert_sync_width[NUM_TYPES] = { FALSE, TRUE, TRUE };
-static const int supports_status_reg_d5[NUM_TYPES] = { FALSE, TRUE, TRUE };
-static const int supports_status_reg_d6[NUM_TYPES] = { FALSE, TRUE, TRUE };
+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 };
typedef struct _mc6845_t mc6845_t;
@@ -711,6 +715,11 @@ static DEVICE_START( mc6845 )
return common_start(device, TYPE_MC6845);
}
+static DEVICE_START( mc6845_1 )
+{
+ return common_start(device, TYPE_MC6845_1);
+}
+
static DEVICE_START( c6545_1 )
{
return common_start(device, TYPE_C6545_1);
@@ -721,6 +730,21 @@ static DEVICE_START( r6545_1 )
return common_start(device, TYPE_R6545_1);
}
+static DEVICE_START( h46505 )
+{
+ return common_start(device, TYPE_H46505);
+}
+
+static DEVICE_START( hd6845 )
+{
+ return common_start(device, TYPE_HD6845);
+}
+
+static DEVICE_START( sy6545_1 )
+{
+ return common_start(device, TYPE_SY6545_1);
+}
+
static DEVICE_RESET( mc6845 )
{
@@ -769,13 +793,28 @@ DEVICE_GET_INFO( mc6845 )
/* --- the following bits of info are returned as NULL-terminated strings --- */
case DEVINFO_STR_NAME: info->s = "Motorola 6845"; break;
case DEVINFO_STR_FAMILY: info->s = "MC6845 CRTC"; break;
- case DEVINFO_STR_VERSION: info->s = "1.6"; break;
+ case DEVINFO_STR_VERSION: info->s = "1.61"; break;
case DEVINFO_STR_SOURCE_FILE: info->s = __FILE__; break;
case DEVINFO_STR_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break;
}
}
+DEVICE_GET_INFO( mc6845_1 )
+{
+ switch (state)
+ {
+ /* --- the following bits of info are returned as NULL-terminated strings --- */
+ case DEVINFO_STR_NAME: info->s = "Motorla 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;
+
+ default: DEVICE_GET_INFO_CALL(mc6845); break;
+ }
+}
+
+
DEVICE_GET_INFO( c6545_1 )
{
switch (state)
@@ -804,3 +843,48 @@ DEVICE_GET_INFO( r6545_1 )
default: DEVICE_GET_INFO_CALL(mc6845); break;
}
}
+
+
+DEVICE_GET_INFO( h46505 )
+{
+ switch (state)
+ {
+ /* --- the following bits of info are returned as NULL-terminated strings --- */
+ case DEVINFO_STR_NAME: info->s = "Hitachi 46505"; break;
+
+ /* --- the following bits of info are returned as pointers to data or functions --- */
+ case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(h46505); break;
+
+ default: DEVICE_GET_INFO_CALL(mc6845); break;
+ }
+}
+
+
+DEVICE_GET_INFO( hd6845 )
+{
+ switch (state)
+ {
+ /* --- the following bits of info are returned as NULL-terminated strings --- */
+ case DEVINFO_STR_NAME: info->s = "Hitachi 6845"; break;
+
+ /* --- the following bits of info are returned as pointers to data or functions --- */
+ case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(hd6845); break;
+
+ default: DEVICE_GET_INFO_CALL(mc6845); break;
+ }
+}
+
+
+DEVICE_GET_INFO( sy6545_1 )
+{
+ switch (state)
+ {
+ /* --- the following bits of info are returned as NULL-terminated strings --- */
+ case DEVINFO_STR_NAME: info->s = "Synertek 6545-1"; break;
+
+ /* --- the following bits of info are returned as pointers to data or functions --- */
+ case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(sy6545_1); break;
+
+ default: DEVICE_GET_INFO_CALL(mc6845); break;
+ }
+}
diff --git a/src/emu/video/mc6845.h b/src/emu/video/mc6845.h
index eff74edb05b..5c743856e52 100644
--- a/src/emu/video/mc6845.h
+++ b/src/emu/video/mc6845.h
@@ -12,8 +12,12 @@
#define MC6845 DEVICE_GET_INFO_NAME(mc6845)
+#define MC6845_1 DEVICE_GET_INFO_NAME(mc6845_1)
#define R6545_1 DEVICE_GET_INFO_NAME(r6545_1)
#define C6545_1 DEVICE_GET_INFO_NAME(c6545_1)
+#define H46505 DEVICE_GET_INFO_NAME(h46505)
+#define HD6845 DEVICE_GET_INFO_NAME(hd6845)
+#define SY6545_1 DEVICE_GET_INFO_NAME(sy6545_1)
/* callback definitions */
@@ -75,8 +79,12 @@ struct _mc6845_interface
/* device interface */
DEVICE_GET_INFO( mc6845 );
+DEVICE_GET_INFO( mc6845_1 );
DEVICE_GET_INFO( r6545_1 );
DEVICE_GET_INFO( c6545_1 );
+DEVICE_GET_INFO( h46505 );
+DEVICE_GET_INFO( hd6845 );
+DEVICE_GET_INFO( sy6545_1 );
/* select one of the registers for reading or writing */
WRITE8_DEVICE_HANDLER( mc6845_address_w );