Beispiel #1
0
static void write_p61(Bitu port,Bitu val,Bitu iolen) {
	if ((port_61_data ^ val) & 3) {
		if((port_61_data ^ val) & 1) TIMER_SetGate2(val&0x1);
		PCSPEAKER_SetType(val & 3);
	}
	port_61_data = val;
}
static void write_p61(Bitu, Bitu val, Bitu) {
	Bit8u diff = port_61_data ^ (Bit8u)val;
	if (diff & 0x1) TIMER_SetGate2(val & 0x1);
	if (diff & 0x3) {
		bool pit_clock_gate_enabled = val & 0x1;
		bool pit_output_enabled = !!(val & 0x2);
		PCSPEAKER_SetType(pit_clock_gate_enabled, pit_output_enabled);
	}
	port_61_data = val;
}