diff options
author | 2012-10-14 01:28:42 +0000 | |
---|---|---|
committer | 2012-10-14 01:28:42 +0000 | |
commit | 85f1df0adcf8eb926e46fb7867651198f48fc968 (patch) | |
tree | 5f19a04555809d2f8009ab5247cd7a30294ede2e /src/mess/machine/cuda.c | |
parent | 80330d5e949b331c9481d4a2dc6b9e516ec7cd97 (diff) |
(MESS) Mac updates: [R. Belmont]
- Line-level ADB comms for machines using the Egret ADB MCU, including standard transactions and SRQ
- Built-in video support for all modes on machines with the V8 and Sonora ASICs
- Corrected some minor bugs in the ADB protocol spoken by the keyboard simulation
New systems added or promoted from NOT_WORKING status
-----------------------------------------------------
Macintosh LC [R. Belmont]
Macintosh IIsi [R. Belmont]
Macintosh LC II [R. Belmont]
Macintosh Classic II [R. Belmont]
Macintosh LC III [R. Belmont]
Macintosh IIvx [R. Belmont]
Macintosh IIvi [R. Belmont]
Diffstat (limited to 'src/mess/machine/cuda.c')
-rw-r--r-- | src/mess/machine/cuda.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/mess/machine/cuda.c b/src/mess/machine/cuda.c index 1086a1b3a85..475a2f4479d 100644 --- a/src/mess/machine/cuda.c +++ b/src/mess/machine/cuda.c @@ -41,6 +41,7 @@ #include "cpu/m6805/m6805.h" #include "machine/6522via.h" #include "sound/asc.h" +#include "includes/mac.h" //************************************************************************** // MACROS / CONSTANTS @@ -122,14 +123,20 @@ void cuda_device::send_port(address_space &space, UINT8 offset, UINT8 data) { /* if (data & 0x80) { - printf("CU ADB: 1->0 time %lld\n", m_maincpu->total_cycles()-last_adb_time); + printf("CU ADB: 1->0 time %lld\n", machine().time().as_ticks(1000000) - last_adb_time); } else { - printf("CU ADB: 0->1 time %lld\n", m_maincpu->total_cycles()-last_adb_time); - } */ + printf("CU ADB: 0->1 time %lld\n", machine().time().as_ticks(1000000) - last_adb_time); + }*/ + + adb_in = (data & 0x80) ? true : false; + + mac_state *mac = machine().driver_data<mac_state>(); + mac->adb_linechange(((data & 0x80) >> 7) ^ 1, (int)(machine().time().as_ticks(1000000) - last_adb_time)); + last_adb = data & 0x80; - last_adb_time = m_maincpu->total_cycles(); + last_adb_time = machine().time().as_ticks(1000000); } break; @@ -207,8 +214,6 @@ READ8_MEMBER( cuda_device::ports_r ) switch (offset) { case 0: // port A -// incoming |= adb_in ? 0x40 : 0; - if (cuda_controls_power) { incoming = 0x20; // pull up + chassis switch (which is 0 = on) @@ -217,6 +222,11 @@ READ8_MEMBER( cuda_device::ports_r ) { incoming = 0x02 | 0x01; // pull-up + PFW } + + if (adb_in) + { + incoming |= 0x40; + } break; case 1: // port B |