@Override
	public boolean detectRom(byte[] rom) {
		if (rom.length != 8388608 && rom.length != 16777216
				&& rom.length != 33554432) {
			return false; // size check
		}
		// Special case for Emerald unofficial translation
		if (romName(rom, "YJencrypted")) {
			// give it a rom code so it can be detected
			rom[0xAC] = 'B';
			rom[0xAD] = 'P';
			rom[0xAE] = 'E';
			rom[0xAF] = 'T';
			rom[0xBD] = 0x66;
		}
		// Wild Pokemon header
		if (find(rom, "0348048009E00000FFFF0000") == -1) {
			return false;
		}
		// Map Banks header
		if (find(rom, "80180068890B091808687047") == -1) {
			return false;
		}
		for (RomEntry re : roms) {
			if (romCode(rom, re.romCode) && (rom[0xBC] & 0xFF) == re.version) {
				return true; // match
			}
		}
		return false; // GBA rom we don't support yet
	}