public static WriteHandlerPtr galaga_customio_data_w = new WriteHandlerPtr() { public void handler(int offset, int data)
	{
		customio[offset] = (char)(data&0xFF);
	
	//if (errorlog != 0) fprintf(errorlog,"%04x: custom IO offset %02x data %02x\n",cpu_get_pc(),offset,data);
	
		switch (customio_command)
		{
			case 0xa8:
				if (offset == 3 && data == 0x20)	/* total hack */
			        sample_start(0,0,0);
				break;
	
			case 0xe1:
				if (offset == 7)
				{
					coinpercred = customio[1];
					credpercoin = customio[2];
				}
				break;
		}
	} }