Previous 15994 Revisions Next

r3440 Sunday 12th October, 2008 at 18:12:51 UTC by Curt Coder
[ABC80X] Fixed ABC-77 device not found error.
[src/mess/machine]abc77.c

src/mess/machine/abc77.c
r3439r3440
8585   abc77->reset = level;
8686}
8787 
88static READ8_DEVICE_HANDLER( abc77_clock_r )
88static READ8_HANDLER( abc77_clock_r )
8989{
90   const device_config *device = devtag_get_device(machine, ABC77, ABC77_TAG);
9091   abc77_t *abc77 = get_safe_token(device);
9192 
9293   return abc77->clock;
9394}
9495 
95static READ8_DEVICE_HANDLER( abc77_data_r )
96static READ8_HANDLER( abc77_data_r )
9697{
98   const device_config *device = devtag_get_device(machine, ABC77, ABC77_TAG);
9799   abc77_t *abc77 = get_safe_token(device);
98100 
99101   static const char *keynames[] = { "ABC77_X0", "ABC77_X1", "ABC77_X2", "ABC77_X3", "ABC77_X4", "ABC77_X5", "ABC77_X6", "ABC77_X7", "ABC77_X8", "ABC77_X9", "ABC77_X10", "ABC77_X11" };
r3439r3440
101103   return input_port_read(device->machine, keynames[abc77->keylatch]);
102104}
103105 
104static WRITE8_DEVICE_HANDLER( abc77_data_w )
106static WRITE8_HANDLER( abc77_data_w )
105107{
108   const device_config *device = devtag_get_device(machine, ABC77, ABC77_TAG);
106109   abc77_t *abc77 = get_safe_token(device);
107110 
108111   abc77->keylatch = data & 0x0f;
r3439r3440
133136 
134137static ADDRESS_MAP_START( abc77_io_map, ADDRESS_SPACE_IO, 8 )
135138   AM_RANGE(0x00, 0x3f) AM_RAM
136   AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_DEVREAD(ABC77, ABC77_TAG, abc77_data_r)
137   AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_DEVWRITE(ABC77, ABC77_TAG, abc77_data_w)
138   AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_DEVREAD(ABC77, ABC77_TAG, abc77_clock_r)
139   AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_READ(abc77_data_r)
140   AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_WRITE(abc77_data_w)
141   AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_READ(abc77_clock_r)
139142   AM_RANGE(MCS48_PORT_BUS, MCS48_PORT_BUS) AM_READ_PORT("ABC77_DSW")
140143ADDRESS_MAP_END
141144 

Previous 15994 Revisions Next


© 1998-2018 The MESS Team