@@ -230,19 +230,9 @@ INLINE void set_VTIR(running_machine &machine, int value)
230
230
231
231
232
232
/*
233
- keyboard interface
233
+ keyboard interface (COPS simulation; our COPS CPU core is too broken and too esoteric to emulate this correctly, I tried)
234
234
*/
235
235
236
-
237
-
238
-
239
-
240
-
241
-
242
-
243
-
244
-
245
-
246
236
INLINE void COPS_send_data_if_possible (running_machine & machine )
247
237
{
248
238
lisa_state * state = machine .driver_data < lisa_state > ( );
@@ -251,7 +241,7 @@ INLINE void COPS_send_data_if_possible(running_machine &machine)
251
241
252
242
if ((! state -> m_hold_COPS_data ) && state -> m_fifo_size && (! state -> m_COPS_Ready ))
253
243
{
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] );
255
245
256
246
via_0 -> write_porta (* space , 0 , state -> m_fifo_data [state -> m_fifo_head ]); /* output data */
257
247
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
281
271
#endif
282
272
283
273
{
284
- logerror ("Adding %d bytes of data to FIFO\n" , len );
274
+ // printf ("Adding %d bytes of data to FIFO\n", len);
285
275
286
276
while (len -- )
287
277
{
@@ -447,6 +437,8 @@ static TIMER_CALLBACK(read_COPS_command)
447
437
/* some pull-ups allow the COPS to read 1s when the VIA port is not set as output */
448
438
command = (state -> m_COPS_command | (~ via_0 -> read (* space , VIA_DDRA ))) & 0xff ;
449
439
440
+ // printf("Dropping Ready, command = %02x\n", command);
441
+
450
442
if (command & 0x80 )
451
443
return ; /* NOP */
452
444
@@ -690,7 +682,8 @@ static void init_COPS(running_machine &machine)
690
682
static WRITE8_DEVICE_HANDLER (COPS_via_out_a )
691
683
{
692
684
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 ;
694
687
}
695
688
696
689
static WRITE8_DEVICE_HANDLER (COPS_via_out_ca2 )
@@ -723,7 +716,7 @@ static READ8_DEVICE_HANDLER(COPS_via_in_b)
723
716
lisa_state * state = device -> machine ().driver_data < lisa_state > ( );
724
717
int val = 0 ;
725
718
726
- if (! state -> m_COPS_Ready )
719
+ if (state -> m_COPS_Ready )
727
720
val |= 0x40 ;
728
721
729
722
if (state -> m_FDIR )
0 commit comments