Previous 15994 Revisions Next

r3931 Saturday 20th December, 2008 at 19:36:19 UTC by Nathan Woods
Cleaned up TC8521 interface
[src/mess/drivers]avigo.c msx.c nc.c
[src/mess/machine]tc8521.c tc8521.h

src/mess/machine/tc8521.c
r3930r3931
145145
146146INLINE const tc8521_interface *get_interface(const device_config *device)
147147{
148   static const tc8521_interface dummy_config = {0, };
149
150148   assert(device != NULL);
151149   assert(device->type == TC8521);
152   return (device->static_config != NULL)
153      ? (tc8521_interface *) device->static_config
154      : &dummy_config;
150   return (tc8521_interface *) device->static_config;
155151}
156152
157153
158154/***************************************************************************
155    GLOBAL VARIABLES
156***************************************************************************/
157
158const tc8521_interface default_tc8521_interface = {0, };
159
160
161/***************************************************************************
159162    LOCAL VARIABLES
160163***************************************************************************/
161164
src/mess/machine/tc8521.h
r3930r3931
1616
1717#define TC8521         DEVICE_GET_INFO_NAME(tc8521)
1818
19#define MDRV_TC8521_ADD(_tag, _intrf) \
20   MDRV_DEVICE_ADD(_tag, TC8521) \
21   MDRV_DEVICE_CONFIG(_intrf)
1922
23#define MDRV_TC8521_REMOVE(_tag) \
24   MDRV_DEVICE_REMOVE(_tag, TC8521)
2025
26
27
2128/***************************************************************************
2229    TYPE DEFINITIONS
2330***************************************************************************/
r3930r3931
3542    FUNCTION PROTOTYPES
3643***************************************************************************/
3744
45extern const tc8521_interface default_tc8521_interface;
46
3847DEVICE_GET_INFO(tc8521);
3948
4049READ8_DEVICE_HANDLER(tc8521_r);
src/mess/drivers/nc.c
r3930r3931
17111711   MDRV_MSM8251_ADD("uart", nc100_uart_interface)
17121712
17131713   /* rtc */
1714   MDRV_DEVICE_ADD("rtc", TC8521)
1715   MDRV_DEVICE_CONFIG(nc100_tc8521_interface)
1714   MDRV_TC8521_ADD("rtc", nc100_tc8521_interface)
17161715MACHINE_DRIVER_END
17171716
17181717
r3930r3931
17371736   MDRV_MSM8251_ADD("uart", nc200_uart_interface)
17381737
17391738   /* no rtc */
1740   MDRV_DEVICE_REMOVE("rtc", TC8521)
1739   MDRV_TC8521_REMOVE("rtc")
17411740   
17421741   MDRV_NEC765A_ADD("nec765", nc200_nec765_interface)
17431742MACHINE_DRIVER_END
src/mess/drivers/msx.c
r3930r3931
11351135   MDRV_CASSETTE_ADD( "cassette", msx_cassette_config )
11361136
11371137   /* real time clock */
1138   MDRV_DEVICE_ADD("rtc", TC8521)
1138   MDRV_TC8521_ADD("rtc", default_tc8521_interface)
11391139   
11401140   MDRV_WD179X_ADD("wd179x", msx_wd17xx_interface )   
11411141MACHINE_DRIVER_END
src/mess/drivers/avigo.c
r3930r3931
888888   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
889889
890890   /* real time clock */
891   MDRV_DEVICE_ADD("rtc", TC8521)
892   MDRV_DEVICE_CONFIG(avigo_tc8521_interface)
891   MDRV_TC8521_ADD("rtc", avigo_tc8521_interface)
893892MACHINE_DRIVER_END
894893
895894

Previous 15994 Revisions Next


© 1998-2018 The MESS Team