Previous 15994 Revisions Next

r15163 Sunday 13th May, 2012 at 21:42:00 UTC by R. Belmont
Lisa: Fixed polarity of COPS handshake signal, POST now passes. [R. Belmont]
[src/mess/machine]lisa.c

src/mess/machine/lisa.c
r15162r15163
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
246236INLINE void COPS_send_data_if_possible(running_machine &machine)
247237{
248238   lisa_state *state = machine.driver_data<lisa_state>();
r15162r15163
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)
r15162r15163
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      {
r15162r15163
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
r15162r15163
690682static 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
696689static WRITE8_DEVICE_HANDLER(COPS_via_out_ca2)
r15162r15163
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)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team