Skip to content
This repository was archived by the owner on Sep 18, 2021. It is now read-only.

Commit f3d12fe

Browse files
author
rbelmont
committed
Lisa: Fixed polarity of COPS handshake signal, POST now passes. [R. Belmont]
1 parent aa1eea3 commit f3d12fe

File tree

1 file changed

+8
-15
lines changed

1 file changed

+8
-15
lines changed

src/mess/machine/lisa.c

+8-15
Original file line numberDiff line numberDiff line change
@@ -230,19 +230,9 @@ INLINE void set_VTIR(running_machine &machine, int value)
230230

231231

232232
/*
233-
keyboard interface
233+
keyboard interface (COPS simulation; our COPS CPU core is too broken and too esoteric to emulate this correctly, I tried)
234234
*/
235235

236-
237-
238-
239-
240-
241-
242-
243-
244-
245-
246236
INLINE void COPS_send_data_if_possible(running_machine &machine)
247237
{
248238
lisa_state *state = machine.driver_data<lisa_state>();
@@ -251,7 +241,7 @@ INLINE void COPS_send_data_if_possible(running_machine &machine)
251241

252242
if ((! state->m_hold_COPS_data) && state->m_fifo_size && (! state->m_COPS_Ready))
253243
{
254-
logerror("Pushing one byte of data to VIA\n");
244+
// printf("COPsim: sending %02x to VIA\n", state->m_fifo_data[state->m_fifo_head]);
255245

256246
via_0->write_porta(*space, 0, state->m_fifo_data[state->m_fifo_head]); /* output data */
257247
if (state->m_fifo_head == state->m_mouse_data_offset)
@@ -281,7 +271,7 @@ static void COPS_queue_data(running_machine &machine, const UINT8 *data, int len
281271
#endif
282272

283273
{
284-
logerror("Adding %d bytes of data to FIFO\n", len);
274+
// printf("Adding %d bytes of data to FIFO\n", len);
285275

286276
while (len--)
287277
{
@@ -447,6 +437,8 @@ static TIMER_CALLBACK(read_COPS_command)
447437
/* some pull-ups allow the COPS to read 1s when the VIA port is not set as output */
448438
command = (state->m_COPS_command | (~ via_0->read(*space, VIA_DDRA))) & 0xff;
449439

440+
// printf("Dropping Ready, command = %02x\n", command);
441+
450442
if (command & 0x80)
451443
return; /* NOP */
452444

@@ -690,7 +682,8 @@ static void init_COPS(running_machine &machine)
690682
static WRITE8_DEVICE_HANDLER(COPS_via_out_a)
691683
{
692684
lisa_state *state = device->machine().driver_data<lisa_state>();
693-
state->m_COPS_command = data;
685+
// printf("VIA A = %02x\n", data);
686+
state->m_COPS_command = data;
694687
}
695688

696689
static WRITE8_DEVICE_HANDLER(COPS_via_out_ca2)
@@ -723,7 +716,7 @@ static READ8_DEVICE_HANDLER(COPS_via_in_b)
723716
lisa_state *state = device->machine().driver_data<lisa_state>();
724717
int val = 0;
725718

726-
if (! state->m_COPS_Ready)
719+
if (state->m_COPS_Ready)
727720
val |= 0x40;
728721

729722
if (state->m_FDIR)

0 commit comments

Comments
 (0)