src/mess/machine/ibmpc.c
| r2472 | r2473 | |
| 142 | 142 | |
| 143 | 143 | READ8_HANDLER ( pc_ppi_portc_r ) |
| 144 | 144 | { |
| 145 | int timer2_output = pit8253_get_output( device_list_find_by_tag( machine->config->devicelist, PIT8253, "pit8253" ), 2 ); |
| 145 | 146 | int data=0xff; |
| 146 | 147 | |
| 147 | 148 | data&=~0x80; // no parity error |
| r2472 | r2473 | |
| 171 | 172 | } |
| 172 | 173 | } else { |
| 173 | 174 | if ( pc_ppi.portb & 0x01 ) { |
| 174 | | data = ( data & ~0x10 ) | ( pit8253_get_output( (device_config*)device_list_find_by_tag( machine->config->devicelist, PIT8253, "pit8253" ), 2 ) ? 0x10 : 0x00 ); |
| 175 | data = ( data & ~0x10 ) | ( timer2_output ? 0x10 : 0x00 ); |
| 175 | 176 | } |
| 176 | 177 | } |
| 178 | data = ( data & ~0x20 ) | ( timer2_output ? 0x20 : 0x00 ); |
| 179 | |
| 177 | 180 | return data; |
| 178 | 181 | } |
| 179 | 182 | |
| r2472 | r2473 | |
| 189 | 192 | pc_ppi.portb = data; |
| 190 | 193 | pc_ppi.portc_switch_high = data & 0x08; |
| 191 | 194 | pc_ppi.keyboard_disabled = data & 0x80; |
| 192 | | pit8253_gate_w( (device_config*)device_list_find_by_tag( machine->config->devicelist, PIT8253, "pit8253" ), 2, data & 1); |
| 195 | pit8253_gate_w( device_list_find_by_tag( machine->config->devicelist, PIT8253, "pit8253" ), 2, data & 1); |
| 193 | 196 | pc_sh_speaker(machine, data & 0x03); |
| 194 | 197 | pc_keyb_set_clock(data & 0x40); |
| 195 | 198 | |