public static WriteHandlerPtr z80_port_w = new WriteHandlerPtr() { public void handler(int offset, int data)
	{
		switch (offset & 0xff)
		{
			case 0x04:
				YM2610_control_port_0_A_w.handler(0,data);
				break;
	
			case 0x05:
				YM2610_data_port_0_A_w.handler(0,data);
				break;
	
			case 0x06:
				YM2610_control_port_0_B_w.handler(0,data);
				break;
	
			case 0x07:
				YM2610_data_port_0_B_w.handler(0,data);
				break;
	
			case 0x08:
				/* NMI enable / acknowledge? (the data written doesn't matter) */
				break;
	
			case 0x0c:
				result_code = data;
				break;
	
			case 0x18:
				/* NMI disable? (the data written doesn't matter) */
				break;
	
			default:
	if (errorlog!=null) fprintf(errorlog,"CPU #1 PC %04x: write %02x to unmapped port %02x\n",cpu_get_pc(),data,offset&0xff);
				break;
		}
	} }