diff --git a/src/emu/video/cdp1869.c b/src/emu/video/cdp1869.c index 3be7abf678d..a14344771ee 100644 --- a/src/emu/video/cdp1869.c +++ b/src/emu/video/cdp1869.c @@ -2,8 +2,8 @@ #include "sndintrf.h" #include "streams.h" #include "cpu/cdp1802/cdp1802.h" -#include "video/cdp1869.h" #include "sound/cdp1869.h" +#include "video/cdp1869.h" /* @@ -569,7 +569,10 @@ WRITE8_DEVICE_HANDLER( cdp1869_pageram_w ) pma = offset; } - cdp1869->intf->page_ram_w(device, pma, data); + if (cdp1869->intf->page_ram_w) + { + cdp1869->intf->page_ram_w(device, pma, data); + } } /* Character RAM Access */ @@ -610,7 +613,10 @@ WRITE8_DEVICE_HANDLER( cdp1869_charram_w ) cma &= 0x07; } - cdp1869->intf->char_ram_w(device, pma, cma, data); + if (cdp1869->intf->char_ram_w) + { + cdp1869->intf->char_ram_w(device, pma, cma, data); + } } } @@ -776,10 +782,8 @@ static DEVICE_START( cdp1869 ) cdp1869->intf = device->static_config; assert(cdp1869->intf->page_ram_r != NULL); - assert(cdp1869->intf->page_ram_w != NULL); assert(cdp1869->intf->pcb_r != NULL); assert(cdp1869->intf->char_ram_r != NULL); - assert(cdp1869->intf->char_ram_w != NULL); // set initial values diff --git a/src/emu/video/cdp1869.h b/src/emu/video/cdp1869.h index e5bb914abe2..f69cba501ce 100644 --- a/src/emu/video/cdp1869.h +++ b/src/emu/video/cdp1869.h @@ -132,6 +132,7 @@ struct _cdp1869_interface /* if specified, this gets called for every change of the predisplay pin (CDP1870/76 pin 1) */ cdp1869_on_prd_changed_func on_prd_changed; }; +#define CDP1869_INTERFACE(name) const cdp1869_interface (name) = /* device interface */ DEVICE_GET_INFO( cdp1869_video ); @@ -139,7 +140,7 @@ DEVICE_GET_INFO( cdp1869_video ); /* palette initialization */ PALETTE_INIT( cdp1869 ); -/* io port access */ +/* register access */ WRITE8_DEVICE_HANDLER( cdp1869_out3_w ); WRITE8_DEVICE_HANDLER( cdp1869_out4_w ); WRITE8_DEVICE_HANDLER( cdp1869_out5_w ); @@ -154,7 +155,7 @@ WRITE8_DEVICE_HANDLER ( cdp1869_charram_w ); READ8_DEVICE_HANDLER ( cdp1869_pageram_r ); WRITE8_DEVICE_HANDLER ( cdp1869_pageram_w ); -/* updates the screen */ +/* screen update */ void cdp1869_update(const device_config *device, bitmap_t *bitmap, const rectangle *cliprect); #endif diff --git a/src/mame/video/cidelsa.c b/src/mame/video/cidelsa.c index c4b9b0d38db..b97464e16ea 100644 --- a/src/mame/video/cidelsa.c +++ b/src/mame/video/cidelsa.c @@ -182,7 +182,7 @@ static const cdp1869_interface altair_cdp1869_intf = cidelsa_prd_changed, }; -static const cdp1869_interface draco_cdp1869_intf = +static CDP1869_INTERFACE( draco_cdp1869_intf ) { SCREEN_TAG, DRACO_CHR2,