summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/machine/thomflop.c
diff options
context:
space:
mode:
author Ivan Vangelista <mesgnet@yahoo.it>2013-11-04 18:06:29 +0000
committer Ivan Vangelista <mesgnet@yahoo.it>2013-11-04 18:06:29 +0000
commitb7627dda188fbfd7661f23a8806694e6fdb9fa57 (patch)
treeb4ccbd47d4e210aeb3b729e018fb7e11cbe52fbc /src/mess/machine/thomflop.c
parentaae15c6fe6805aae566ab9da7e721e67fd9aef5f (diff)
Modernized mc6854 device.(nw)
Superficial testing shows no breakage, but in-depth testing from someone familiar with the machines would be appreciated.
Diffstat (limited to 'src/mess/machine/thomflop.c')
-rw-r--r--src/mess/machine/thomflop.c31
1 files changed, 18 insertions, 13 deletions
diff --git a/src/mess/machine/thomflop.c b/src/mess/machine/thomflop.c
index 83e995e3ad5..543ba44f27a 100644
--- a/src/mess/machine/thomflop.c
+++ b/src/mess/machine/thomflop.c
@@ -1592,27 +1592,27 @@ void thomson_state::thmfc_floppy_init()
TIMER_CALLBACK_MEMBER( thomson_state::ans4 )
{
LOG(( "%f ans4\n", machine().time().as_double() ));
- mc6854_set_cts( machine().device("mc6854"), 0 );
+ m_mc6854->set_cts( 0 );
}
TIMER_CALLBACK_MEMBER( thomson_state::ans3 )
{
LOG(( "%f ans3\n", machine().time().as_double() ));
- mc6854_set_cts( machine().device("mc6854"), 1 );
+ m_mc6854->set_cts( 1 );
machine().scheduler().timer_set( attotime::from_usec( 100 ), timer_expired_delegate(FUNC(thomson_state::ans4),this));
}
TIMER_CALLBACK_MEMBER( thomson_state::ans2 )
{
LOG(( "%f ans2\n", machine().time().as_double() ));
- mc6854_set_cts( machine().device("mc6854"), 0 );
+ m_mc6854->set_cts( 0 );
machine().scheduler().timer_set( attotime::from_usec( 100 ), timer_expired_delegate(FUNC(thomson_state::ans3),this));
}
TIMER_CALLBACK_MEMBER( thomson_state::ans )
{
LOG(( "%f ans\n", machine().time().as_double() ));
- mc6854_set_cts( machine().device("mc6854"), 1 );
+ m_mc6854->set_cts( 1 );
machine().scheduler().timer_set( attotime::from_usec( 100 ), timer_expired_delegate(FUNC(thomson_state::ans2),this));
}
/* consigne DKBOOT
@@ -1657,7 +1657,7 @@ static void to7_network_got_frame( device_t *device, UINT8* data, int length )
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));
- mc6854_set_cts( device, 0 );
+ state->m_mc6854->set_cts( 0 );
}
else if ( ! data[1] )
{
@@ -1673,13 +1673,18 @@ static void to7_network_got_frame( device_t *device, UINT8* data, int length )
(data[10] == 0) ? "TO7" : (data[10] == 1) ? "MO5" :
(data[10] == 2) ? "TO7/70" : "?", name ));
}
-
}
-
-const mc6854_interface to7_network_iface = { DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, to7_network_got_frame, DEVCB_NULL, DEVCB_NULL };
-
+const mc6854_interface to7_network_iface =
+{
+ DEVCB_NULL,
+ DEVCB_NULL,
+ DEVCB_NULL,
+ to7_network_got_frame,
+ DEVCB_NULL,
+ DEVCB_NULL
+};
void thomson_state::to7_network_init()
@@ -1693,8 +1698,8 @@ void thomson_state::to7_network_init()
void thomson_state::to7_network_reset()
{
LOG(( "to7_network_reset: NR 07-005 network extension\n" ));
- mc6854_set_cts( machine().device("mc6854"), 0 );
- mc6854_set_cts( machine().device("mc6854"), 1 );
+ m_mc6854->set_cts( 0 );
+ m_mc6854->set_cts( 1 );
}
@@ -1702,7 +1707,7 @@ void thomson_state::to7_network_reset()
READ8_MEMBER( thomson_state::to7_network_r )
{
if ( offset < 4 )
- return mc6854_r( machine().device("mc6854"), space, offset );
+ return m_mc6854->read( space, offset );
if ( offset == 8 )
{
@@ -1721,7 +1726,7 @@ READ8_MEMBER( thomson_state::to7_network_r )
WRITE8_MEMBER( thomson_state::to7_network_w )
{
if ( offset < 4 )
- mc6854_w( machine().device("mc6854"), space, offset, data );
+ m_mc6854->write( space, offset, data );
else
{
logerror( "%f $%04x to7_network_w: invalid write offset %i (data=$%02X)\n",