public static WriteHandlerPtr shared_ram_w = new WriteHandlerPtr() { public void handler(int offset, int data)
	{
		if (offset == 0x9e8)
		{
			toaplan2_shared_ram.WRITE_WORD(offset + 2,data);
		}
		if (offset == 0xff8)
		{
			toaplan2_shared_ram.WRITE_WORD(offset + 2,data);
			if (errorlog!=null) fprintf(errorlog,"PC:%08x Writing  (%04x) to secondary CPU\n",cpu_getpreviouspc(),data);
			if ((data & 0xffff) == 0x81) data = 0x01;
		}
		toaplan2_shared_ram.WRITE_WORD(offset,data);
	} }