Previous 15994 Revisions Next

r15258 Monday 21st May, 2012 at 13:23:12 UTC by Miodrag Milanović
Sync with MAME r16381 (nw)
[src/emu/machine]i8255.c i8255.h

src/emu/machine/i8255.c
r15257r15258
563563
564564
565565//-------------------------------------------------
566//  write_pc -
567//-------------------------------------------------
568
569void i8255_device::write_pc(UINT8 data)
570{
571   int changed = 0;
572
573   // PC upper
574   if (group_mode(GROUP_A) == MODE_0 && port_c_upper_mode() == MODE_OUTPUT)
575   {
576      m_output[PORT_C] = (data & 0xf0) | (m_output[PORT_C] & 0x0f);
577      changed = 1;
578   }
579
580   // PC lower
581   if (group_mode(GROUP_B) == MODE_0 && port_c_lower_mode() == MODE_OUTPUT)
582   {
583      m_output[PORT_C] = (m_output[PORT_C] & 0xf0) | (data & 0x0f);
584      changed = 1;
585   }
586
587   if (changed)
588   {
589      output_pc();
590   }
591}
592
593
594//-------------------------------------------------
595566//  output_pc -
596567//-------------------------------------------------
597568
r15257r15258
878849   case PORT_C:
879850      if (LOG) logerror("I8255 '%s' Port C Write: %02x\n", tag(), data);
880851
881      write_pc(data);
852      m_output[PORT_C] = data;
853      output_pc();
882854      break;
883855
884856   case CONTROL:
src/emu/machine/i8255.h
r15257r15258
126126   void write_mode0(int port, UINT8 data);
127127   void write_mode1(int port, UINT8 data);
128128   void write_mode2(UINT8 data);
129   void write_pc(UINT8 data);
130129   void output_pc();
131130   void set_mode(UINT8 data);
132131   void set_pc_bit(int bit, int state);

Previous 15994 Revisions Next


© 1998-2018 The MESS Team