public static ReadHandlerPtr simpsons_speedup1_r = new ReadHandlerPtr() { public int handler(int offs)
	{
		UBytePtr RAM = memory_region(REGION_CPU1);
	
		int data1 = RAM.read(0x486a);
	
		if ( data1 == 0 )
		{
			int data2 = ( RAM.read(0x4942) << 8 ) | RAM.read(0x4943);
	
			if ( data2 < memory_region_length(REGION_CPU1) )
			{
				data2 = ( RAM.read(data2) << 8 ) | RAM.read(data2 + 1);
	
				if ( data2 == 0xffff )
					cpu_spinuntil_int();
	
				return RAM.read(0x4942);
			}
	
			return RAM.read(0x4942);
		}
	
		if ( data1 == 1 )
                {                
                    RAM.write(0x486a,RAM.read(0x486a)-1); //RAM[0x486a]--;  //probably correct TODO recheck?		   
                }
	
		return RAM.read(0x4942);
	} }