public static bool TryGetRom(RomFileToken file, RomVersion version, AddressToken token, out int v) { var block = GetBlock(version, file.ToString()); if (TryMagicConverter(block, token, version, Domain.ROM, out v)) { return(true); } return(false); }
public static bool TryGetRam(RomFileToken file, RomVersion version, out N64Ptr v) { var block = GetBlock(version, file.ToString()); if (TryGetStart(block, version, Domain.RAM, out int value)) { v = value | 0x8000_0000; return(true); } v = 0; return(false); }
public static int GetRom(RomFileToken file, RomVersion version, string addrVar) { int addr; var block = GetBlock(version, file.ToString()); if (addrVar == "__Start") { TryGetStart(block, version, Domain.ROM, out addr); } else { TryMagicConverter(block, addrVar, version, Domain.ROM, out addr); } return(addr); }
public static int GetRom(RomFileToken file, RomVersion version, AddressToken token) { int addr; var block = GetBlock(version, file.ToString()); if (token == AddressToken.__Start) { TryGetStart(block, version, Domain.ROM, out addr); } else { TryMagicConverter(block, token, version, Domain.ROM, out addr); } return(addr); }
public static bool TryGetRom(RomFileToken file, RomVersion version, N64Ptr ramAddr, out int v) { ramAddr &= 0xFFFFFF; var block = GetBlock(version, file.ToString()); if (!TryGetStart(block, version, Domain.ROM, out int romStart) || !TryGetStart(block, version, Domain.RAM, out int ramStart) || ramAddr < ramStart) { v = 0; return(false); } v = romStart + ramAddr - ramStart; return(true); }
public static bool TryGetRam(string addrVar, RomFileToken file, RomVersion version, out int v) { var block = GetBlock(version, file.ToString()); return(TryMagicConverter(block, addrVar, version, Domain.RAM, out v)); }
public static bool TryGetRam(RomFileToken file, RomVersion version, out int v) { var block = GetBlock(version, file.ToString()); return(TryGetStart(block, version, Domain.RAM, out v)); }
private static bool TryGetAddress(RomFileToken file, RomVersion version, string addrVar, out int value) { return(TryGetAddress(file.ToString(), version, addrVar, out value)); }
public static int GetRom(RomFileToken file, RomVersion version, string addrVar) { return(GetAddress(file.ToString(), version, addrVar)); }