mirror of
https://github.com/holub/mame
synced 2025-06-02 10:59:52 +03:00
[CDP1869] Added a macro for the interface, and made write handlers optional.
This commit is contained in:
parent
63acd17b6a
commit
e8abef328c
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user