func BankOffset(bank uint8) (offset uint32) {
	if bank < 0x80 {
		panic(fmt.Sprintf("bank %d is < 0x80\n", bank))
	}
	if bank > 0xFD {
		panic(fmt.Sprintf("bank %d is > 0xFD\n", bank))
	}

	offset = (uint32(bank) - 0x80) * 0x8000
	if offset > (1 << 24) {
		panic(fmt.Sprintf("%d is out of 24bit addr space", offset))
	}

	return
}
// return a offset into a LoRom for the bank
return a offset into a LoRom for the bank
// return a offset into a LoRom for the bank
func BankOffset(bank uint8) (offset uint32) {
	if bank < 0x80 {
		panic(fmt.Sprintf("bank %d is < 0x80\n", bank))
	}
	if bank > 0xFD {
		panic(fmt.Sprintf("bank %d is > 0xFD\n", bank))
	}
	offset = (uint32(bank) - 0x80) * 0x8000
	if offset > (1 << 24) {
		panic(fmt.Sprintf("%d is out of 24bit addr space", offset))
	}
	return
}
func BankOffset ( bank uint8 ) ( offset uint32 ) { if bank < 0x80 { panic ( fmt . Sprintf ( " \n " , bank ) ) } if bank > 0xFD { panic ( fmt . Sprintf ( " \n " , bank ) ) } offset = ( uint32 ( bank ) - 0x80 ) * 0x8000 if offset > ( 1 << 24 ) { panic ( fmt . Sprintf ( " " , offset ) ) } return }
return a offset into a LoRom for the bank
return a offset into a LoRom for the bank