summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/machine/thomflop.c
diff options
context:
space:
mode:
author Ivan Vangelista <mesgnet@yahoo.it>2014-04-30 15:20:13 +0000
committer Ivan Vangelista <mesgnet@yahoo.it>2014-04-30 15:20:13 +0000
commitdac6c70216a0feba3789b1119c9564cd8b05c63f (patch)
tree5e0146d267a347adafb1623af04486cbedf7217e /src/mess/machine/thomflop.c
parent2c653877d0ce93995309d8986472f736939c0c6a (diff)
mc6854_device: converted to devcb2 and delegates (nw)
Diffstat (limited to 'src/mess/machine/thomflop.c')
-rw-r--r--src/mess/machine/thomflop.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/src/mess/machine/thomflop.c b/src/mess/machine/thomflop.c
index e9b6af43a8a..10fd2af8e7e 100644
--- a/src/mess/machine/thomflop.c
+++ b/src/mess/machine/thomflop.c
@@ -1639,27 +1639,25 @@ TIMER_CALLBACK_MEMBER( thomson_state::ans )
*/
-static void to7_network_got_frame( device_t *device, UINT8* data, int length )
+MC6854_OUT_FRAME_CB(thomson_state::to7_network_got_frame)
{
- int i;
- LOG(( "%f to7_network_got_frame:", device->machine().time().as_double() ));
- for ( i = 0; i < length; i++ )
+ LOG(( "%f to7_network_got_frame:", machine().time().as_double() ));
+ for ( int i = 0; i < length; i++ )
LOG(( " $%02X", data[i] ));
LOG(( "\n" ));
if ( data[1] == 0xff )
{
- thomson_state *state = device->machine().driver_data<thomson_state>();
LOG(( "to7_network_got_frame: %i phones %i\n", data[2], data[0] ));
- device->machine().scheduler().timer_set( attotime::from_usec( 100 ), timer_expired_delegate(FUNC(thomson_state::ans),state));
- state->m_mc6854->set_cts( 0 );
+ machine().scheduler().timer_set( attotime::from_usec( 100 ), timer_expired_delegate(FUNC(thomson_state::ans), this));
+ m_mc6854->set_cts( 0 );
}
else if ( ! data[1] )
{
char name[33];
memcpy( name, data + 12, 32 );
name[32] = 0;
- for (i=0;i<32;i++)
+ for (int i=0;i<32;i++)
{
if ( name[i]<32 || name[i]>=127 )
name[i]=' ';
@@ -1671,16 +1669,6 @@ static void to7_network_got_frame( device_t *device, UINT8* data, int length )
}
-const mc6854_interface to7_network_iface =
-{
- DEVCB_NULL,
- DEVCB_NULL,
- to7_network_got_frame,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
void thomson_state::to7_network_init()
{
LOG(( "to7_network_init: NR 07-005 network extension\n" ));