def get_global_address(address, bank):
	"""
	Return the rom address of a local address and bank.

	This accounts for a quirk in mbc3 where 0:4000-7fff resolves to 1:4000-7fff.
	"""
	if address < 0x8000:
		if address >= 0x4000 and bank > 0:
			return address + (bank - 1) * 0x4000
	
	return address