Previous 15994 Revisions Next

r5079 Thursday 25th June, 2009 at 13:27:54 UTC by Dirk Best
[DL1416] Use WRITE_LINE_DEVICE_HANDLER.
[src/mess/machine]aim65.c
[src/mess/video]dl1416.c dl1416.h

src/mess/video/dl1416.c
r5078r5079
2323 *   - 2008-02-25: Converted to the new device interface.  [Dirk Best]
2424 *   - 2008-12-18: Cleanups.  [Dirk Best]
2525 *
26 *
26 *
2727 * We use the following order for the segments:
2828 *
2929 *   000 111
r5078r5079
181181*****************************************************************************/
182182
183183/* write enable, active low */
184void dl1416_set_input_w(const device_config *device, int data)
184WRITE_LINE_DEVICE_HANDLER( dl1416_wr_w )
185185{
186186   dl1416_state *chip = get_safe_token(device);
187   chip->write_enable = !data;
187   chip->write_enable = !state;
188188}
189189
190
191190/* chip enable, active low */
192void dl1416_set_input_ce(const device_config *device, int data)
191WRITE_LINE_DEVICE_HANDLER( dl1416_ce_w )
193192{
194193   dl1416_state *chip = get_safe_token(device);
195   chip->chip_enable = !data;
194   chip->chip_enable = !state;
196195}
197196
198
199197/* cursor enable, active low */
200void dl1416_set_input_cu(const device_config *device, int data)
198WRITE_LINE_DEVICE_HANDLER( dl1416_cu_w )
201199{
202200   dl1416_state *chip = get_safe_token(device);
203   chip->cursor_enable = !data;
201   chip->cursor_enable = !state;
204202}
205203
206
207204/* data */
208WRITE8_DEVICE_HANDLER( dl1416_w )
205WRITE8_DEVICE_HANDLER( dl1416_data_w )
209206{
210207   dl1416_state *chip = get_safe_token(device);
211208   const dl1416_interface *intf = device->inline_config;
src/mess/video/dl1416.h
r5078r5079
1414#ifndef DL1416_H_
1515#define DL1416_H_
1616
17#include "devcb.h"
1718
19
1820/***************************************************************************
1921    CONSTANTS
2022***************************************************************************/
r5078r5079
6264***************************************************************************/
6365
6466/* inputs */
65void dl1416_set_input_w(const device_config *device, int data); /* write enable */
66void dl1416_set_input_ce(const device_config *device, int data); /* chip enable */
67void dl1416_set_input_cu(const device_config *device, int data); /* cursor enable */
68WRITE8_DEVICE_HANDLER( dl1416_w );
67WRITE_LINE_DEVICE_HANDLER( dl1416_wr_w ); /* write enable */
68WRITE_LINE_DEVICE_HANDLER( dl1416_ce_w ); /* chip enable */
69WRITE_LINE_DEVICE_HANDLER( dl1416_cu_w ); /* cursor enable */
70WRITE8_DEVICE_HANDLER( dl1416_data_w );
6971
7072/* device get info callback */
7173#define DL1416 DEVICE_GET_INFO_NAME(dl1416)
src/mess/machine/aim65.c
r5078r5079
6565
6666static void dl1416_update(const device_config *device, int index)
6767{
68   dl1416_set_input_ce(device, pia_a & (0x04 << index));
69   dl1416_set_input_w(device, pia_a & 0x80);
70   dl1416_set_input_cu(device, pia_b & 0x80);
71   dl1416_w(device, pia_a & 0x03, pia_b & 0x7f);
68   dl1416_ce_w(device, pia_a & (0x04 << index));
69   dl1416_wr_w(device, BIT(pia_a, 7));
70   dl1416_cu_w(device, BIT(pia_b, 7));
71   dl1416_data_w(device, pia_a & 0x03, pia_b & 0x7f);
7272}
7373
7474static void aim65_pia(running_machine *machine)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team