Skip to content
Beta: this is a preview of the new SplitScreen.Me. Data may be reset before launch.

Daytona USA 2 · handler “Supermodel Arcade Emulator”

Version 2 (current)

Release notes

Updated input

Released
Size
30 KB
Downloads
92
Check
Verified
SHA-256
e5d54e630cf022a8cbfa06163bfe3797d8936af880747a3f873bca54f19f9129
Download v2 (.nc)All versions

Files 9

PathSize
Supermodel Emulator/dayto2pe.nv128 KB
Supermodel Emulator/daytona2.nv128 KB
Supermodel Emulator/dirtdvls.nv128 KB
Supermodel Emulator/harley.nv128 KB
Supermodel Emulator/lemans24.nv128 KB
Supermodel Emulator/scudplus.nv128 KB
Supermodel Emulator/srally2.nv128 KB
Supermodel Emulator/Supermodel.ini4.4 KB
handler.js97 KB

handler.js

Plain text
Hub.Handler.Version = 2; // Released at https://hub.splitscreen.me/ on Sat Mar 23 2024 08:11:42 GMT+0000 (Coordinated Universal Time).
Hub.Handler.Id = "9FQjJQcFcPowC7juG";
Hub.Maintainer.Name = "PoundlandBacon";
Hub.Maintainer.Id = "AdiAjSyfZPMvu3a4M";

// This is just a sample script. Paste your real code (javascript or HTML) here.

var answers = ["Daytona USA 2", "Daytona USA 2 Power Edition", "Dirt Devils", "Harley-Davidson and L.A. Riders (Revision B)", "LeMans 24", "Scud Race Plus (Revision A)", "Sega Rally 2"];
Game.AddOption("Select a ROM", "", "rom", answers);
var answers6 = ["No", "Yes"];
Game.AddOption("Disable music", "By default music is only enabled for Player 1. Select Yes to completely disable it.", "bgmop", answers6);
var answers2 = ["Last used", "Triggers", "Buttons"];
Game.AddOption("Accelerate and brake mapped to...", "", "accl", answers2);
var answers3 = ["Last used", "Yes", "No"];
Game.AddOption("Enable controller vibration", "", "ff", answers3);
var answers4 = ["Last used", "0", "1", "5", "10", "15", "20", "25", "30", "35", "40", "45", "50"];
Game.AddOption("Deadzone amount", "increase if you get jitter when there is no input. Default is 10.", "dz", answers4);
var answers5 = [
  "Last used",
  "Default",
  "0",
  "10",
  "20",
  "30",
  "40",
  "50",
  "60",
  "70",
  "80",
  "90",
  "100",
  "110",
  "120",
  "130",
  "140",
  "150",
  "160",
  "170",
  "180",
  "190",
  "200",
  "210",
  "220",
  "230",
  "240",
  "250",
  "260",
  "270",
  "280",
  "290",
  "300"
];
Game.AddOption("Saturation amount", "increase for less sensitive controls, decrease for more. Default will use original setting.", "sat", answers5);

Game.DirSymlinkExclusions = ["Config", "NVRAM"];
Game.FileSymlinkExclusions = ["Supermodel.ini", "daytona2.nv", "dayto2pe.nv", "scudplus.nv", "harley.nv", "lemans24.nv", "dirtdvls.nv", "srally2x.nv", "srally2.nv", "launch.bat"];
Game.GameName = "Supermodel Emulator";
Game.Description =
  "Supports Daytona USA 2, Daytona USA 2 Power Edition, Dirt Devils, Harley-Davidson and L.A. Riders (Revision B), LeMans 24, Scud Race Plus (Revision A), and Sega Rally 2. Recommended you use a recent 64 bit version of Supermodel with Netboard support - https://www.supermodel3.com/ Requires xinput controllers. If you use a keyboard make sure it is added as the last player. Daytona 2, Daytona USA 2 Power Edition and Scud Race Plus support up to 8 players.";
Game.HandlerInterval = 100;
Game.SymlinkExe = false;
Game.KeepSymLinkOnExit = false;
Game.BackupFolders = ["Config", "NVRAM", "saves"];
Game.SymlinkGame = true;
Game.SymlinkFolders = true;
Game.SupportsKeyboard = true;
Game.ExecutableName = "Supermodel.exe";
Game.SteamID = "";
Game.GUID = "supermodel";
Game.MaxPlayers = 8;
Game.MaxPlayersOneMonitor = 8;
Game.BinariesFolder = "";
Game.NeedsSteamEmulation = false;
Game.UseGoldberg = false;
Game.GoldbergExperimental = false;
Game.GoldbergLobbyConnect = false;
Game.Hook.ForceFocusWindowName = "Supermodel";
Game.HasDynamicWindowTitle = true;
Game.ForceWindowTitle = false;
Game.ProcessorPriorityClass = "High";
Game.Hook.DInputEnabled = false;
Game.Hook.DInputForceDisable = true;
Game.Hook.XInputEnabled = false;
Game.Hook.XInputReroute = false;
Game.Hook.CustomDllEnabled = false;
Game.PauseBetweenStarts = 2;
Game.UserProfileConfigPath = "";

Game.HideDesktop = true;
Game.IgnoreWindowBordercheck = true;
Game.DontRemoveBorders = true;
Game.SetForegroundWindowElsewhere = true;
Game.ToggleUnfocusOnInputsLock = true;

Game.HookSetCursorPos = false;
Game.HookGetCursorPos = false;
Game.HookGetKeyState = false;
Game.HookGetAsyncKeyState = false;
Game.HookGetKeyboardState = false;
Game.HookFilterRawInput = false;
Game.HookFilterMouseMessages = false;
Game.HookUseLegacyInput = false;
Game.HookDontUpdateLegacyInMouseMsg = false;
Game.HookMouseVisibility = false;
Game.InjectHookXinput = false;

Game.SendNormalMouseInput = false;
Game.SendNormalKeyboardInput = false;
Game.SendScrollWheel = false;
Game.ForwardRawKeyboardInput = false;
Game.ForwardRawMouseInput = false;
Game.HookReRegisterRawInput = false;
Game.HookReRegisterRawInputMouse = false;
Game.HookReRegisterRawInputKeyboard = false;
Game.DrawFakeMouseCursor = false;

Game.SupportsMultipleKeyboardsAndMice = false;

Game.ProtoInput.InjectStartup = true;
Game.ProtoInput.InjectRuntime_RemoteLoadMethod = false;
Game.ProtoInput.InjectRuntime_EasyHookMethod = false;
Game.ProtoInput.InjectRuntime_EasyHookStealthMethod = false;

Game.LockInputAtStart = false;
Game.LockInputSuspendsExplorer = true;
Game.ProtoInput.FreezeExternalInputWhenInputNotLocked = false;
Game.LockInputToggleKey = 0x23;
Game.ProtoInput.AutoHideTaskbar = true;

Game.ProtoInput.RenameHandlesHook = false;
Game.ProtoInput.RenameHandles = [];
Game.ProtoInput.RenameNamedPipes = [];

Game.ProtoInput.RegisterRawInputHook = false;
Game.ProtoInput.GetRawInputDataHook = false;
Game.ProtoInput.MessageFilterHook = false;
Game.ProtoInput.GetCursorPosHook = false;
Game.ProtoInput.SetCursorPosHook = false;
Game.ProtoInput.GetKeyStateHook = false;
Game.ProtoInput.GetAsyncKeyStateHook = false;
Game.ProtoInput.GetKeyboardStateHook = false;
Game.ProtoInput.CursorVisibilityHook = false;
Game.ProtoInput.ClipCursorHook = false;
Game.ProtoInput.FocusHooks = true;
Game.ProtoInput.DrawFakeCursor = false;
Game.ProtoInput.ClipCursorHookCreatesFakeClip = false;
Game.ProtoInput.EnableToggleFakeCursorVisibilityShortcut = false;
Game.ProtoInput.DontShowCursorWhenImageUpdated = false;

Game.ProtoInput.RawInputFilter = false;
Game.ProtoInput.MouseMoveFilter = false;
Game.ProtoInput.MouseActivateFilter = false;
Game.ProtoInput.WindowActivateFilter = true;
Game.ProtoInput.WindowActvateAppFilter = true;
Game.ProtoInput.MouseWheelFilter = false;
Game.ProtoInput.MouseButtonFilter = false;
Game.ProtoInput.KeyboardButtonFilter = false;

Game.ProtoInput.SendMouseWheelMessages = false;
Game.ProtoInput.SendMouseButtonMessages = false;
Game.ProtoInput.SendMouseMovementMessages = false;
Game.ProtoInput.SendKeyboardButtonMessages = false;
Game.ProtoInput.XinputHook = true;
Game.ProtoInput.UseOpenXinput = true;
Game.ProtoInput.UseDinputRedirection = false;
Game.ProtoInput.DinputDeviceHook = false;
Game.ProtoInput.DinputHookAlsoHooksGetDeviceState = false;
Game.ProtoInput.MultipleProtoControllers = false;

Game.ProtoInput.EnableFocusMessageLoop = true;
Game.ProtoInput.FocusLoopIntervalMilliseconds = 1000;
Game.ProtoInput.FocusLoop_WM_ACTIVATE = true;
Game.ProtoInput.FocusLoop_WM_ACTIVATEAPP = true;
Game.ProtoInput.FocusLoop_WM_NCACTIVATE = false;
Game.ProtoInput.FocusLoop_WM_SETFOCUS = false;
Game.ProtoInput.FocusLoop_WM_MOUSEACTIVATE = false;
Game.ProtoInput.BlockedMessages = [0x0008];

Game.Play = function() {
  var rom = Context.Options["rom"];
  if (rom == "Daytona USA 2") {
    var romarg = "daytona2.zip -ppc-frequency=83";
    var nvram = "daytona2";
  }
  if (rom == "Scud Race Plus (Revision A)") {
    var romarg = "scudp.zip -ppc-frequency=66";
    var nvram = "scudplus";
  }
  if (rom == "Harley-Davidson and L.A. Riders (Revision B)") {
    var romarg = "harleyb.zip -ppc-frequency=66";
    var nvram = "harley";
  }
  if (rom == "LeMans 24") {
    var romarg = "lemans24.zip -ppc-frequency=66";
    var nvram = "lemans24";
  }
  if (rom == "Daytona USA 2 Power Edition") {
    var romarg = "dayto2pe.zip -ppc-frequency=83";
    var nvram = "dayto2pe";
  }
  if (rom == "Dirt Devils") {
    var romarg = "dirtdvls.zip -ppc-frequency=83";
    var nvram = "dirtdvls";
  }
  if (rom == "Sega Rally 2") {
    var romarg = "srally2.zip -ppc-frequency=83";
    var nvram = "srally2";
  }
  if (Context.PlayerID > 0) {
    var bgm = "-music-volume=0";
  } else {
    var bgm = "";
  }

  Game.LauncherTitle = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\supermodel.exe";

  if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Config\\supermodel.ini")) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Config\\supermodel.ini");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "supermodel.ini");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }

  if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\NVRAM\\" + nvram + ".nv")) {
    if (rom == "Daytona USA 2") {
      var nvram = "daytona2";
      if (Context.PlayerID == 1) {
        Context.PatchFile(
          System.IO.Path.Combine(Game.Folder, nvram + ".nv"),
          System.IO.Path.Combine(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\NVRAM\\" + nvram + ".nv"),
          [0xf1, 0x47, 0x10, 0xa2, 0x43, 0x01, 0x02, 0x00, 0x04, 0x00, 0xff, 0x02, 0x01, 0xff, 0x01, 0x01, 0x1b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01],
          [0x73, 0xdd, 0x10, 0xa2, 0x43, 0x01, 0x03, 0x00, 0x04, 0x00, 0xff, 0x02, 0x01, 0xff, 0x01, 0x01, 0x1b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02]
        );
      }
      if (Context.PlayerID == 2) {
        Context.PatchFile(
          System.IO.Path.Combine(Game.Folder, nvram + ".nv"),
          System.IO.Path.Combine(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\NVRAM\\" + nvram + ".nv"),
          [0xf1, 0x47, 0x10, 0xa2, 0x43, 0x01, 0x02, 0x00, 0x04, 0x00, 0xff, 0x02, 0x01, 0xff, 0x01, 0x01, 0x1b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01],
          [0x55, 0x59, 0x10, 0xa2, 0x43, 0x01, 0x04, 0x00, 0x04, 0x00, 0xff, 0x02, 0x01, 0xff, 0x01, 0x01, 0x1b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02]
        );
      }
      if (Context.PlayerID == 3) {
        Context.PatchFile(
          System.IO.Path.Combine(Game.Folder, nvram + ".nv"),
          System.IO.Path.Combine(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\NVRAM\\" + nvram + ".nv"),
          [0xf1, 0x47, 0x10, 0xa2, 0x43, 0x01, 0x02, 0x00, 0x04, 0x00, 0xff, 0x02, 0x01, 0xff, 0x01, 0x01, 0x1b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01],
          [0x1a, 0xe0, 0x10, 0xa2, 0x43, 0x01, 0x05, 0x00, 0x04, 0x00, 0xff, 0x02, 0x01, 0xff, 0x01, 0x01, 0x1b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x03, 0x02]
        );
      }
      if (Context.PlayerID == 4) {
        Context.PatchFile(
          System.IO.Path.Combine(Game.Folder, nvram + ".nv"),
          System.IO.Path.Combine(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\NVRAM\\" + nvram + ".nv"),
          [0xf1, 0x47, 0x10, 0xa2, 0x43, 0x01, 0x02, 0x00, 0x04, 0x00, 0xff, 0x02, 0x01, 0xff, 0x01, 0x01, 0x1b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01],
          [0x42, 0xa1, 0x10, 0xa2, 0x43, 0x01, 0x06, 0x00, 0x04, 0x00, 0xff, 0x02, 0x01, 0xff, 0x01, 0x01, 0x1b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02]
        );
      }
      if (Context.PlayerID == 5) {
        Context.PatchFile(
          System.IO.Path.Combine(Game.Folder, nvram + ".nv"),
          System.IO.Path.Combine(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\NVRAM\\" + nvram + ".nv"),
          [0xf1, 0x47, 0x10, 0xa2, 0x43, 0x01, 0x02, 0x00, 0x04, 0x00, 0xff, 0x02, 0x01, 0xff, 0x01, 0x01, 0x1b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01],
          [0x0d, 0x18, 0x10, 0xa2, 0x43, 0x01, 0x07, 0x00, 0x04, 0x00, 0xff, 0x02, 0x01, 0xff, 0x01, 0x01, 0x1b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x05, 0x02]
        );
      }
      if (Context.PlayerID == 6) {
        Context.PatchFile(
          System.IO.Path.Combine(Game.Folder, nvram + ".nv"),
          System.IO.Path.Combine(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\NVRAM\\" + nvram + ".nv"),
          [0xf1, 0x47, 0x10, 0xa2, 0x43, 0x01, 0x02, 0x00, 0x04, 0x00, 0xff, 0x02, 0x01, 0xff, 0x01, 0x01, 0x1b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01],
          [0x87, 0x23, 0x10, 0xa2, 0x43, 0x01, 0x08, 0x00, 0x04, 0x00, 0xff, 0x02, 0x01, 0xff, 0x01, 0x01, 0x1b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x06, 0x02]
        );
      }
      if (Context.PlayerID == 7) {
        Context.PatchFile(
          System.IO.Path.Combine(Game.Folder, nvram + ".nv"),
          System.IO.Path.Combine(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\NVRAM\\" + nvram + ".nv"),
          [0xf1, 0x47, 0x10, 0xa2, 0x43, 0x01, 0x02, 0x00, 0x04, 0x00, 0xff, 0x02, 0x01, 0xff, 0x01, 0x01, 0x1b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01],
          [0xc8, 0x9a, 0x10, 0xa2, 0x43, 0x01, 0x09, 0x00, 0x04, 0x00, 0xff, 0x02, 0x01, 0xff, 0x01, 0x01, 0x1b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x07, 0x02]
        );
      }
    }
    if (rom == "Daytona USA 2 Power Edition") {
      var nvram = "dayto2pe";
      if (Context.PlayerID == 1) {
        Context.PatchFile(
          System.IO.Path.Combine(Game.Folder, nvram + ".nv"),
          System.IO.Path.Combine(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\NVRAM\\" + nvram + ".nv"),
          [0x33, 0x05, 0x10, 0xa2, 0x44, 0x01, 0x02, 0x00, 0x04, 0x00, 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x1b, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01],
          [0xb1, 0x9f, 0x10, 0xa2, 0x44, 0x01, 0x03, 0x00, 0x04, 0x00, 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x1b, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02]
        );
      }
      if (Context.PlayerID == 2) {
        Context.PatchFile(
          System.IO.Path.Combine(Game.Folder, nvram + ".nv"),
          System.IO.Path.Combine(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\NVRAM\\" + nvram + ".nv"),
          [0x33, 0x05, 0x10, 0xa2, 0x44, 0x01, 0x02, 0x00, 0x04, 0x00, 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x1b, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01],
          [0x97, 0x1b, 0x10, 0xa2, 0x44, 0x01, 0x04, 0x00, 0x04, 0x00, 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x1b, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02]
        );
      }
      if (Context.PlayerID == 3) {
        Context.PatchFile(
          System.IO.Path.Combine(Game.Folder, nvram + ".nv"),
          System.IO.Path.Combine(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\NVRAM\\" + nvram + ".nv"),
          [0x33, 0x05, 0x10, 0xa2, 0x44, 0x01, 0x02, 0x00, 0x04, 0x00, 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x1b, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01],
          [0xd8, 0xa2, 0x10, 0xa2, 0x44, 0x01, 0x05, 0x00, 0x04, 0x00, 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x1b, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x03, 0x02]
        );
      }
      if (Context.PlayerID == 4) {
        Context.PatchFile(
          System.IO.Path.Combine(Game.Folder, nvram + ".nv"),
          System.IO.Path.Combine(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\NVRAM\\" + nvram + ".nv"),
          [0x33, 0x05, 0x10, 0xa2, 0x44, 0x01, 0x02, 0x00, 0x04, 0x00, 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x1b, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01],
          [0x80, 0xe3, 0x10, 0xa2, 0x44, 0x01, 0x06, 0x00, 0x04, 0x00, 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x1b, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02]
        );
      }
      if (Context.PlayerID == 5) {
        Context.PatchFile(
          System.IO.Path.Combine(Game.Folder, nvram + ".nv"),
          System.IO.Path.Combine(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\NVRAM\\" + nvram + ".nv"),
          [0x33, 0x05, 0x10, 0xa2, 0x44, 0x01, 0x02, 0x00, 0x04, 0x00, 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x1b, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01],
          [0xcf, 0x5a, 0x10, 0xa2, 0x44, 0x01, 0x07, 0x00, 0x04, 0x00, 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x1b, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x05, 0x02]
        );
      }
      if (Context.PlayerID == 6) {
        Context.PatchFile(
          System.IO.Path.Combine(Game.Folder, nvram + ".nv"),
          System.IO.Path.Combine(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\NVRAM\\" + nvram + ".nv"),
          [0x33, 0x05, 0x10, 0xa2, 0x44, 0x01, 0x02, 0x00, 0x04, 0x00, 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x1b, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01],
          [0x45, 0x61, 0x10, 0xa2, 0x44, 0x01, 0x08, 0x00, 0x04, 0x00, 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x1b, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x06, 0x02]
        );
      }
      if (Context.PlayerID == 7) {
        Context.PatchFile(
          System.IO.Path.Combine(Game.Folder, nvram + ".nv"),
          System.IO.Path.Combine(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\NVRAM\\" + nvram + ".nv"),
          [0x33, 0x05, 0x10, 0xa2, 0x44, 0x01, 0x02, 0x00, 0x04, 0x00, 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x1b, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01],
          [0x0a, 0xd8, 0x10, 0xa2, 0x44, 0x01, 0x09, 0x00, 0x04, 0x00, 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x1b, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x07, 0x02]
        );
      }
    }
    if (rom == "Dirt Devils") {
      var nvram = "dirtdvls";
      if (Context.PlayerID == 1) {
        Context.PatchFile(
          System.IO.Path.Combine(Game.Folder, nvram + ".nv"),
          System.IO.Path.Combine(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\NVRAM\\" + nvram + ".nv"),
          [
            0x87,
            0x86,
            0x19,
            0xa3,
            0x99,
            0x02,
            0x03,
            0x00,
            0x01,
            0x07,
            0x01,
            0x01,
            0x01,
            0x01,
            0x01,
            0x01,
            0x1a,
            0x00,
            0x00,
            0x02,
            0x00,
            0x0e,
            0x05,
            0x03,
            0x80,
            0x04,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x00,
            0xd0,
            0x30,
            0xd0,
            0x30,
            0xd0,
            0x30,
            0x03,
            0x80,
            0x00,
            0x00,
            0x02,
            0x02,
            0x00,
            0x02,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x03,
            0x00,
            0x7f,
            0x00,
            0xe8,
            0xce,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x25,
            0x08,
            0x08,
            0x0c,
            0x00,
            0xcc,
            0x56,
            0x7f,
            0x00,
            0xe8,
            0xce,
            0x06,
            0x00,
            0x68,
            0x85,
            0x2d,
            0x19,
            0x00,
            0x00,
            0x00,
            0x00,
            0x0a,
            0x00,
            0x00,
            0x00,
            0x0a,
            0x00,
            0x0c,
            0x00,
            0x80,
            0x5d,
            0x06,
            0x00,
            0x28,
            0x6c,
            0x00,
            0x00,
            0xe0,
            0x05,
            0x7f,
            0x00,
            0x08,
            0xcf,
            0x06,
            0x00,
            0xa0,
            0x87,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x60
          ],
          [
            0x5e,
            0x7a,
            0x19,
            0xa3,
            0x99,
            0x02,
            0x04,
            0x00,
            0x01,
            0x07,
            0x01,
            0x01,
            0x01,
            0x01,
            0x01,
            0x01,
            0x1a,
            0x00,
            0x01,
            0x02,
            0x00,
            0x0e,
            0x05,
            0x03,
            0x80,
            0x04,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x00,
            0xd0,
            0x30,
            0xd0,
            0x30,
            0xd0,
            0x30,
            0x03,
            0x80,
            0x00,
            0x01,
            0x02,
            0x02,
            0x00,
            0x02,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x04,
            0x00,
            0x7f,
            0x00,
            0x68,
            0xce,
            0x27,
            0x00,
            0x00,
            0x00,
            0x27,
            0x25,
            0x00,
            0x00,
            0x00,
            0x00,
            0x08,
            0x00,
            0x7f,
            0x00,
            0x68,
            0xce,
            0x00,
            0x00,
            0x09,
            0x00,
            0x05,
            0x19,
            0xa0,
            0x34,
            0x00,
            0x00,
            0x0a,
            0x00,
            0x00,
            0x00,
            0x0a,
            0x00,
            0x0c,
            0x00,
            0x80,
            0x5d,
            0x06,
            0x00,
            0x28,
            0x6c,
            0x00,
            0x00,
            0xe0,
            0x05,
            0x7f,
            0x00,
            0x88,
            0xce,
            0x06,
            0x00,
            0xa0,
            0x87,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x10
          ]
        );
      }
      if (Context.PlayerID == 2) {
        Context.PatchFile(
          System.IO.Path.Combine(Game.Folder, nvram + ".nv"),
          System.IO.Path.Combine(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\NVRAM\\" + nvram + ".nv"),
          [
            0x87,
            0x86,
            0x19,
            0xa3,
            0x99,
            0x02,
            0x03,
            0x00,
            0x01,
            0x07,
            0x01,
            0x01,
            0x01,
            0x01,
            0x01,
            0x01,
            0x1a,
            0x00,
            0x00,
            0x02,
            0x00,
            0x0e,
            0x05,
            0x03,
            0x80,
            0x04,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x00,
            0xd0,
            0x30,
            0xd0,
            0x30,
            0xd0,
            0x30,
            0x03,
            0x80,
            0x00,
            0x00,
            0x02,
            0x02,
            0x00,
            0x02,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x03,
            0x00,
            0x7f,
            0x00,
            0xe8,
            0xce,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x25,
            0x08,
            0x08,
            0x0c,
            0x00,
            0xcc,
            0x56,
            0x7f,
            0x00,
            0xe8,
            0xce,
            0x06,
            0x00,
            0x68,
            0x85,
            0x2d,
            0x19,
            0x00,
            0x00,
            0x00,
            0x00,
            0x0a,
            0x00,
            0x00,
            0x00,
            0x0a,
            0x00,
            0x0c,
            0x00,
            0x80,
            0x5d,
            0x06,
            0x00,
            0x28,
            0x6c,
            0x00,
            0x00,
            0xe0,
            0x05,
            0x7f,
            0x00,
            0x08,
            0xcf,
            0x06,
            0x00,
            0xa0,
            0x87,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x60
          ],
          [
            0x03,
            0xe9,
            0x19,
            0xa3,
            0x99,
            0x02,
            0x05,
            0x00,
            0x01,
            0x07,
            0x01,
            0x01,
            0x01,
            0x01,
            0x01,
            0x01,
            0x1a,
            0x00,
            0x01,
            0x02,
            0x00,
            0x0e,
            0x05,
            0x03,
            0x80,
            0x04,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x00,
            0xd0,
            0x30,
            0xd0,
            0x30,
            0xd0,
            0x30,
            0x03,
            0x80,
            0x00,
            0x02,
            0x02,
            0x02,
            0x00,
            0x02,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x05,
            0x00,
            0x7f,
            0x00,
            0x68,
            0xce,
            0x27,
            0x00,
            0x00,
            0x00,
            0x27,
            0x25,
            0x00,
            0x00,
            0x00,
            0x00,
            0x08,
            0x00,
            0x7f,
            0x00,
            0x68,
            0xce,
            0x00,
            0x00,
            0x09,
            0x00,
            0x05,
            0x19,
            0xa0,
            0x34,
            0x00,
            0x00,
            0x0a,
            0x00,
            0x00,
            0x00,
            0x0a,
            0x00,
            0x0c,
            0x00,
            0x80,
            0x5d,
            0x06,
            0x00,
            0x28,
            0x6c,
            0x00,
            0x00,
            0xe0,
            0x05,
            0x7f,
            0x00,
            0x88,
            0xce,
            0x06,
            0x00,
            0xa0,
            0x87,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x50
          ]
        );
      }
      if (Context.PlayerID == 3) {
        Context.PatchFile(
          System.IO.Path.Combine(Game.Folder, nvram + ".nv"),
          System.IO.Path.Combine(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\NVRAM\\" + nvram + ".nv"),
          [
            0x87,
            0x86,
            0x19,
            0xa3,
            0x99,
            0x02,
            0x03,
            0x00,
            0x01,
            0x07,
            0x01,
            0x01,
            0x01,
            0x01,
            0x01,
            0x01,
            0x1a,
            0x00,
            0x00,
            0x02,
            0x00,
            0x0e,
            0x05,
            0x03,
            0x80,
            0x04,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x00,
            0xd0,
            0x30,
            0xd0,
            0x30,
            0xd0,
            0x30,
            0x03,
            0x80,
            0x00,
            0x00,
            0x02,
            0x02,
            0x00,
            0x02,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x03,
            0x00,
            0x7f,
            0x00,
            0xe8,
            0xce,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x25,
            0x08,
            0x08,
            0x0c,
            0x00,
            0xcc,
            0x56,
            0x7f,
            0x00,
            0xe8,
            0xce,
            0x06,
            0x00,
            0x68,
            0x85,
            0x2d,
            0x19,
            0x00,
            0x00,
            0x00,
            0x00,
            0x0a,
            0x00,
            0x00,
            0x00,
            0x0a,
            0x00,
            0x0c,
            0x00,
            0x80,
            0x5d,
            0x06,
            0x00,
            0x28,
            0x6c,
            0x00,
            0x00,
            0xe0,
            0x05,
            0x7f,
            0x00,
            0x08,
            0xcf,
            0x06,
            0x00,
            0xa0,
            0x87,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x60
          ],
          [
            0x84,
            0xeb,
            0x19,
            0xa3,
            0x99,
            0x02,
            0x06,
            0x00,
            0x01,
            0x07,
            0x01,
            0x01,
            0x01,
            0x01,
            0x01,
            0x01,
            0x1a,
            0x00,
            0x01,
            0x02,
            0x00,
            0x0e,
            0x05,
            0x03,
            0x80,
            0x04,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x00,
            0xd0,
            0x30,
            0xd0,
            0x30,
            0xd0,
            0x30,
            0x03,
            0x80,
            0x00,
            0x03,
            0x02,
            0x02,
            0x00,
            0x02,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x06,
            0x00,
            0x7f,
            0x00,
            0x68,
            0xce,
            0x27,
            0x00,
            0x00,
            0x00,
            0x27,
            0x25,
            0x00,
            0x00,
            0x00,
            0x00,
            0x08,
            0x00,
            0x7f,
            0x00,
            0x68,
            0xce,
            0x00,
            0x00,
            0x09,
            0x00,
            0x05,
            0x19,
            0xa0,
            0x34,
            0x00,
            0x00,
            0x0a,
            0x00,
            0x00,
            0x00,
            0x0a,
            0x00,
            0x0c,
            0x00,
            0x80,
            0x5d,
            0x06,
            0x00,
            0x28,
            0x6c,
            0x00,
            0x00,
            0xe0,
            0x05,
            0x7f,
            0x00,
            0x88,
            0xce,
            0x06,
            0x00,
            0xa0,
            0x87,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x30
          ]
        );
      }
    }
    if (rom == "Harley-Davidson and L.A. Riders (Revision B)") {
      var nvram = "harley";
      if (Context.PlayerID == 1) {
        Context.PatchFile(
          System.IO.Path.Combine(Game.Folder, nvram + ".nv"),
          System.IO.Path.Combine(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\NVRAM\\" + nvram + ".nv"),
          [0x83, 0x62, 0x11, 0x0a, 0x54, 0x00, 0x02, 0x00, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x1b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00],
          [0x12, 0xb3, 0x11, 0x0a, 0x54, 0x00, 0x03, 0x00, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x1b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x01]
        );
      }
      if (Context.PlayerID == 2) {
        Context.PatchFile(
          System.IO.Path.Combine(Game.Folder, nvram + ".nv"),
          System.IO.Path.Combine(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\NVRAM\\" + nvram + ".nv"),
          [0x83, 0x62, 0x11, 0x0a, 0x54, 0x00, 0x02, 0x00, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x1b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00],
          [0x95, 0xf5, 0x11, 0x0a, 0x54, 0x00, 0x04, 0x00, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x1b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x02, 0x01]
        );
      }
      if (Context.PlayerID == 3) {
        Context.PatchFile(
          System.IO.Path.Combine(Game.Folder, nvram + ".nv"),
          System.IO.Path.Combine(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\NVRAM\\" + nvram + ".nv"),
          [0x83, 0x62, 0x11, 0x0a, 0x54, 0x00, 0x02, 0x00, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x1b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00],
          [0x45, 0x0d, 0x11, 0x0a, 0x54, 0x00, 0x05, 0x00, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x1b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x03, 0x01]
        );
      }
    }
    if (rom == "LeMans 24") {
      var nvram = "lemans24";
      if (Context.PlayerID == 1) {
        Context.PatchFile(
          System.IO.Path.Combine(Game.Folder, nvram + ".nv"),
          System.IO.Path.Combine(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\NVRAM\\" + nvram + ".nv"),
          [
            0xc9,
            0xb0,
            0x19,
            0xa3,
            0x5f,
            0x01,
            0x03,
            0x00,
            0x01,
            0x05,
            0x02,
            0x01,
            0x01,
            0x02,
            0x01,
            0x01,
            0x1a,
            0x00,
            0x00,
            0x01,
            0xc0,
            0x0c,
            0x05,
            0x00,
            0x70,
            0x00,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x00,
            0x03,
            0x04,
            0x03,
            0x07,
            0x00,
            0x01,
            0x06,
            0x01,
            0x01,
            0x00,
            0x01,
            0x04,
            0x00,
            0x04,
            0x01,
            0x00,
            0x09,
            0x0e,
            0x02,
            0x08,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x03,
            0x00,
            0x1f,
            0x00,
            0x98,
            0xde,
            0x10,
            0x00,
            0x1c,
            0x82,
            0x00,
            0x25,
            0x03,
            0x00,
            0x10,
            0x00,
            0x14,
            0x82
          ],
          [
            0x2a,
            0x31,
            0x19,
            0xa3,
            0x5f,
            0x01,
            0x04,
            0x00,
            0x01,
            0x05,
            0x02,
            0x01,
            0x01,
            0x02,
            0x01,
            0x01,
            0x1a,
            0x00,
            0x01,
            0x01,
            0xc0,
            0x0c,
            0x05,
            0x00,
            0x70,
            0x00,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x00,
            0x03,
            0x04,
            0x03,
            0x07,
            0x00,
            0x01,
            0x06,
            0x01,
            0x01,
            0x00,
            0x01,
            0x04,
            0x01,
            0x04,
            0x01,
            0x00,
            0x09,
            0x0e,
            0x02,
            0x08,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x04,
            0x00,
            0x1f,
            0x00,
            0x98,
            0xde,
            0x00,
            0x00,
            0x41,
            0x12,
            0x01,
            0x25,
            0x00,
            0x0a,
            0x17,
            0x00,
            0xe4,
            0xa0
          ]
        );
      }
      if (Context.PlayerID == 2) {
        Context.PatchFile(
          System.IO.Path.Combine(Game.Folder, nvram + ".nv"),
          System.IO.Path.Combine(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\NVRAM\\" + nvram + ".nv"),
          [
            0xc9,
            0xb0,
            0x19,
            0xa3,
            0x5f,
            0x01,
            0x03,
            0x00,
            0x01,
            0x05,
            0x02,
            0x01,
            0x01,
            0x02,
            0x01,
            0x01,
            0x1a,
            0x00,
            0x00,
            0x01,
            0xc0,
            0x0c,
            0x05,
            0x00,
            0x70,
            0x00,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x00,
            0x03,
            0x04,
            0x03,
            0x07,
            0x00,
            0x01,
            0x06,
            0x01,
            0x01,
            0x00,
            0x01,
            0x04,
            0x00,
            0x04,
            0x01,
            0x00,
            0x09,
            0x0e,
            0x02,
            0x08,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x03,
            0x00,
            0x1f,
            0x00,
            0x98,
            0xde,
            0x10,
            0x00,
            0x1c,
            0x82,
            0x00,
            0x25,
            0x03,
            0x00,
            0x10,
            0x00,
            0x14,
            0x82
          ],
          [
            0x39,
            0x25,
            0x19,
            0xa3,
            0x5f,
            0x01,
            0x05,
            0x00,
            0x01,
            0x05,
            0x02,
            0x01,
            0x01,
            0x02,
            0x01,
            0x01,
            0x1a,
            0x00,
            0x01,
            0x01,
            0xc0,
            0x0c,
            0x05,
            0x00,
            0x70,
            0x00,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x00,
            0x03,
            0x04,
            0x03,
            0x07,
            0x00,
            0x01,
            0x06,
            0x01,
            0x01,
            0x00,
            0x01,
            0x04,
            0x02,
            0x04,
            0x01,
            0x00,
            0x09,
            0x0e,
            0x02,
            0x08,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x05,
            0x00,
            0x1f,
            0x00,
            0x98,
            0xde,
            0x00,
            0x00,
            0x41,
            0x12,
            0x01,
            0x25,
            0x00,
            0x0a,
            0x17,
            0x00,
            0xe4,
            0xa0
          ]
        );
      }
      if (Context.PlayerID == 3) {
        Context.PatchFile(
          System.IO.Path.Combine(Game.Folder, nvram + ".nv"),
          System.IO.Path.Combine(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\NVRAM\\" + nvram + ".nv"),
          [
            0xc9,
            0xb0,
            0x19,
            0xa3,
            0x5f,
            0x01,
            0x03,
            0x00,
            0x01,
            0x05,
            0x02,
            0x01,
            0x01,
            0x02,
            0x01,
            0x01,
            0x1a,
            0x00,
            0x00,
            0x01,
            0xc0,
            0x0c,
            0x05,
            0x00,
            0x70,
            0x00,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x00,
            0x03,
            0x04,
            0x03,
            0x07,
            0x00,
            0x01,
            0x06,
            0x01,
            0x01,
            0x00,
            0x01,
            0x04,
            0x00,
            0x04,
            0x01,
            0x00,
            0x09,
            0x0e,
            0x02,
            0x08,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x03,
            0x00,
            0x1f,
            0x00,
            0x98,
            0xde,
            0x10,
            0x00,
            0x1c,
            0x82,
            0x00,
            0x25,
            0x03,
            0x00,
            0x10,
            0x00,
            0x14,
            0x82
          ],
          [
            0x84,
            0x5a,
            0x19,
            0xa3,
            0x5f,
            0x01,
            0x06,
            0x00,
            0x01,
            0x05,
            0x02,
            0x01,
            0x01,
            0x02,
            0x01,
            0x01,
            0x1a,
            0x00,
            0x01,
            0x01,
            0xc0,
            0x0c,
            0x05,
            0x00,
            0x70,
            0x00,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x00,
            0x03,
            0x04,
            0x03,
            0x07,
            0x00,
            0x01,
            0x06,
            0x01,
            0x01,
            0x00,
            0x01,
            0x04,
            0x03,
            0x04,
            0x01,
            0x00,
            0x09,
            0x0e,
            0x02,
            0x08,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x06,
            0x00,
            0x1f,
            0x00,
            0x98,
            0xde,
            0x00,
            0x00,
            0x41,
            0x12,
            0x01,
            0x25,
            0x00,
            0x0a,
            0x17,
            0x00,
            0xe4,
            0xa0
          ]
        );
      }
    }
    if (rom == "Scud Race Plus (Revision A)") {
      var nvram = "scudplus";
      if (Context.PlayerID == 1) {
        Context.PatchFile(
          System.IO.Path.Combine(Game.Folder, nvram + ".nv"),
          System.IO.Path.Combine(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\NVRAM\\" + nvram + ".nv"),
          [0xb3, 0x2e, 0x18, 0xa2, 0x05, 0x01, 0x02, 0x00, 0x01, 0x00, 0xff, 0xff, 0x01, 0xff, 0x01, 0x01, 0x1b, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01],
          [0x31, 0xb4, 0x18, 0xa2, 0x05, 0x01, 0x03, 0x00, 0x01, 0x00, 0xff, 0xff, 0x01, 0xff, 0x01, 0x01, 0x1b, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02]
        );
      }
      if (Context.PlayerID == 2) {
        Context.PatchFile(
          System.IO.Path.Combine(Game.Folder, nvram + ".nv"),
          System.IO.Path.Combine(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\NVRAM\\" + nvram + ".nv"),
          [0xb3, 0x2e, 0x18, 0xa2, 0x05, 0x01, 0x02, 0x00, 0x01, 0x00, 0xff, 0xff, 0x01, 0xff, 0x01, 0x01, 0x1b, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01],
          [0x17, 0x30, 0x18, 0xa2, 0x05, 0x01, 0x04, 0x00, 0x01, 0x00, 0xff, 0xff, 0x01, 0xff, 0x01, 0x01, 0x1b, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02]
        );
      }
      if (Context.PlayerID == 3) {
        Context.PatchFile(
          System.IO.Path.Combine(Game.Folder, nvram + ".nv"),
          System.IO.Path.Combine(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\NVRAM\\" + nvram + ".nv"),
          [0xb3, 0x2e, 0x18, 0xa2, 0x05, 0x01, 0x02, 0x00, 0x01, 0x00, 0xff, 0xff, 0x01, 0xff, 0x01, 0x01, 0x1b, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01],
          [0x58, 0x89, 0x18, 0xa2, 0x05, 0x01, 0x05, 0x00, 0x01, 0x00, 0xff, 0xff, 0x01, 0xff, 0x01, 0x01, 0x1b, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x03, 0x02]
        );
      }
      if (Context.PlayerID == 4) {
        Context.PatchFile(
          System.IO.Path.Combine(Game.Folder, nvram + ".nv"),
          System.IO.Path.Combine(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\NVRAM\\" + nvram + ".nv"),
          [0xb3, 0x2e, 0x18, 0xa2, 0x05, 0x01, 0x02, 0x00, 0x01, 0x00, 0xff, 0xff, 0x01, 0xff, 0x01, 0x01, 0x1b, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01],
          [0x7a, 0x28, 0x18, 0xa2, 0x05, 0x01, 0x0a, 0x00, 0x01, 0x00, 0xff, 0xff, 0x01, 0xff, 0x01, 0x01, 0x1b, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02]
        );
      }
      if (Context.PlayerID == 5) {
        Context.PatchFile(
          System.IO.Path.Combine(Game.Folder, nvram + ".nv"),
          System.IO.Path.Combine(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\NVRAM\\" + nvram + ".nv"),
          [0xb3, 0x2e, 0x18, 0xa2, 0x05, 0x01, 0x02, 0x00, 0x01, 0x00, 0xff, 0xff, 0x01, 0xff, 0x01, 0x01, 0x1b, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01],
          [0x35, 0x91, 0x18, 0xa2, 0x05, 0x01, 0x0b, 0x00, 0x01, 0x00, 0xff, 0xff, 0x01, 0xff, 0x01, 0x01, 0x1b, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x05, 0x02]
        );
      }
      if (Context.PlayerID == 6) {
        Context.PatchFile(
          System.IO.Path.Combine(Game.Folder, nvram + ".nv"),
          System.IO.Path.Combine(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\NVRAM\\" + nvram + ".nv"),
          [0xb3, 0x2e, 0x18, 0xa2, 0x05, 0x01, 0x02, 0x00, 0x01, 0x00, 0xff, 0xff, 0x01, 0xff, 0x01, 0x01, 0x1b, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01],
          [0x13, 0x15, 0x18, 0xa2, 0x05, 0x01, 0x0c, 0x00, 0x01, 0x00, 0xff, 0xff, 0x01, 0xff, 0x01, 0x01, 0x1b, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x06, 0x02]
        );
      }
      if (Context.PlayerID == 7) {
        Context.PatchFile(
          System.IO.Path.Combine(Game.Folder, nvram + ".nv"),
          System.IO.Path.Combine(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\NVRAM\\" + nvram + ".nv"),
          [0xb3, 0x2e, 0x18, 0xa2, 0x05, 0x01, 0x02, 0x00, 0x01, 0x00, 0xff, 0xff, 0x01, 0xff, 0x01, 0x01, 0x1b, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01],
          [0x5c, 0xac, 0x18, 0xa2, 0x05, 0x01, 0x0d, 0x00, 0x01, 0x00, 0xff, 0xff, 0x01, 0xff, 0x01, 0x01, 0x1b, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x07, 0x02]
        );
      }
    }
    if (rom == "Sega Rally 2") {
      if (Context.PlayerID == 1) {
        Context.PatchFile(
          System.IO.Path.Combine(Game.Folder, nvram + ".nv"),
          System.IO.Path.Combine(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\NVRAM\\" + nvram + ".nv"),
          [
            0x51,
            0x05,
            0x00,
            0x00,
            0x07,
            0x00,
            0xa0,
            0x06,
            0x21,
            0x22,
            0x01,
            0x63,
            0xff,
            0x01,
            0x5a,
            0x94,
            0x4f,
            0xb7,
            0x98,
            0x19,
            0x04,
            0x02,
            0xff,
            0xff,
            0xff,
            0xff,
            0xff,
            0xff,
            0xff,
            0xff,
            0x00,
            0xff,
            0xff,
            0xff,
            0x98,
            0x19,
            0x10,
            0x03,
            0x00,
            0xff,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x59,
            0x66,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x00,
            0x05,
            0x00,
            0x00,
            0x00,
            0x01,
            0x2d,
            0x00,
            0x02,
            0x00,
            0x0b,
            0x00,
            0x00,
            0x00,
            0x16,
            0x00,
            0x00,
            0x00,
            0x42,
            0x61,
            0x63,
            0x6b,
            0x75,
            0x70,
            0x20,
            0x52,
            0x41,
            0x4d,
            0x00,
            0x53,
            0x72,
            0x63,
            0x2f,
            0x4d,
            0x6f,
            0x64,
            0x65,
            0x6c,
            0x33,
            0x2f,
            0x4d,
            0x6f,
            0x64,
            0x65,
            0x6c,
            0x33,
            0x2e,
            0x63,
            0x70,
            0x70,
            0x00,
            0x00,
            0x00,
            0x20,
            0x03,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x02,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x03,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x02,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x16,
            0x00,
            0x00,
            0x00,
            0x03,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x11,
            0x00,
            0x00,
            0x00,
            0x3c,
            0xbc
          ],
          [
            0x72,
            0x07,
            0x00,
            0x00,
            0x08,
            0x00,
            0xa0,
            0x06,
            0x21,
            0x22,
            0x01,
            0x63,
            0xff,
            0x01,
            0x9a,
            0x94,
            0x4f,
            0xb7,
            0x98,
            0x19,
            0x04,
            0x02,
            0xff,
            0xff,
            0xff,
            0xff,
            0xff,
            0xff,
            0xff,
            0xff,
            0x00,
            0xff,
            0xff,
            0xff,
            0x98,
            0x19,
            0x10,
            0x03,
            0x00,
            0xff,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x59,
            0x66,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x00,
            0x05,
            0x00,
            0x00,
            0x00,
            0x01,
            0x2d,
            0x00,
            0x02,
            0x00,
            0x0b,
            0x00,
            0x00,
            0x00,
            0x16,
            0x00,
            0x00,
            0x00,
            0x42,
            0x61,
            0x63,
            0x6b,
            0x75,
            0x70,
            0x20,
            0x52,
            0x41,
            0x4d,
            0x00,
            0x53,
            0x72,
            0x63,
            0x2f,
            0x4d,
            0x6f,
            0x64,
            0x65,
            0x6c,
            0x33,
            0x2f,
            0x4d,
            0x6f,
            0x64,
            0x65,
            0x6c,
            0x33,
            0x2e,
            0x63,
            0x70,
            0x70,
            0x00,
            0x00,
            0x00,
            0x27,
            0x83,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x02,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x03,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x02,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x27,
            0x00,
            0x00,
            0x00,
            0x03,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x13,
            0x00,
            0x00,
            0x00,
            0xd0,
            0x44
          ]
        );
      }
      if (Context.PlayerID == 2) {
        Context.PatchFile(
          System.IO.Path.Combine(Game.Folder, nvram + ".nv"),
          System.IO.Path.Combine(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\NVRAM\\" + nvram + ".nv"),
          [
            0x51,
            0x05,
            0x00,
            0x00,
            0x07,
            0x00,
            0xa0,
            0x06,
            0x21,
            0x22,
            0x01,
            0x63,
            0xff,
            0x01,
            0x5a,
            0x94,
            0x4f,
            0xb7,
            0x98,
            0x19,
            0x04,
            0x02,
            0xff,
            0xff,
            0xff,
            0xff,
            0xff,
            0xff,
            0xff,
            0xff,
            0x00,
            0xff,
            0xff,
            0xff,
            0x98,
            0x19,
            0x10,
            0x03,
            0x00,
            0xff,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x59,
            0x66,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x00,
            0x05,
            0x00,
            0x00,
            0x00,
            0x01,
            0x2d,
            0x00,
            0x02,
            0x00,
            0x0b,
            0x00,
            0x00,
            0x00,
            0x16,
            0x00,
            0x00,
            0x00,
            0x42,
            0x61,
            0x63,
            0x6b,
            0x75,
            0x70,
            0x20,
            0x52,
            0x41,
            0x4d,
            0x00,
            0x53,
            0x72,
            0x63,
            0x2f,
            0x4d,
            0x6f,
            0x64,
            0x65,
            0x6c,
            0x33,
            0x2f,
            0x4d,
            0x6f,
            0x64,
            0x65,
            0x6c,
            0x33,
            0x2e,
            0x63,
            0x70,
            0x70,
            0x00,
            0x00,
            0x00,
            0x20,
            0x03,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x02,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x03,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x02,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x16,
            0x00,
            0x00,
            0x00,
            0x03,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x11,
            0x00,
            0x00,
            0x00,
            0x3c,
            0xbc
          ],
          [
            0x93,
            0x06,
            0x00,
            0x00,
            0x09,
            0x00,
            0xa0,
            0x06,
            0x21,
            0x22,
            0x01,
            0x63,
            0xff,
            0x01,
            0xda,
            0x94,
            0x4f,
            0xb7,
            0x98,
            0x19,
            0x04,
            0x02,
            0xff,
            0xff,
            0xff,
            0xff,
            0xff,
            0xff,
            0xff,
            0xff,
            0x00,
            0xff,
            0xff,
            0xff,
            0x98,
            0x19,
            0x10,
            0x03,
            0x00,
            0xff,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x59,
            0x66,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x00,
            0x05,
            0x00,
            0x00,
            0x00,
            0x01,
            0x2d,
            0x00,
            0x02,
            0x00,
            0x0b,
            0x00,
            0x00,
            0x00,
            0x16,
            0x00,
            0x00,
            0x00,
            0x42,
            0x61,
            0x63,
            0x6b,
            0x75,
            0x70,
            0x20,
            0x52,
            0x41,
            0x4d,
            0x00,
            0x53,
            0x72,
            0x63,
            0x2f,
            0x4d,
            0x6f,
            0x64,
            0x65,
            0x6c,
            0x33,
            0x2f,
            0x4d,
            0x6f,
            0x64,
            0x65,
            0x6c,
            0x33,
            0x2e,
            0x63,
            0x70,
            0x70,
            0x00,
            0x00,
            0x00,
            0xb3,
            0x69,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x02,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x03,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x02,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x2e,
            0x00,
            0x00,
            0x00,
            0x03,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x13,
            0x00,
            0x00,
            0x00,
            0x54,
            0xde
          ]
        );
      }
      if (Context.PlayerID == 3) {
        Context.PatchFile(
          System.IO.Path.Combine(Game.Folder, nvram + ".nv"),
          System.IO.Path.Combine(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\NVRAM\\" + nvram + ".nv"),
          [
            0x51,
            0x05,
            0x00,
            0x00,
            0x07,
            0x00,
            0xa0,
            0x06,
            0x21,
            0x22,
            0x01,
            0x63,
            0xff,
            0x01,
            0x5a,
            0x94,
            0x4f,
            0xb7,
            0x98,
            0x19,
            0x04,
            0x02,
            0xff,
            0xff,
            0xff,
            0xff,
            0xff,
            0xff,
            0xff,
            0xff,
            0x00,
            0xff,
            0xff,
            0xff,
            0x98,
            0x19,
            0x10,
            0x03,
            0x00,
            0xff,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x59,
            0x66,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x00,
            0x05,
            0x00,
            0x00,
            0x00,
            0x01,
            0x2d,
            0x00,
            0x02,
            0x00,
            0x0b,
            0x00,
            0x00,
            0x00,
            0x16,
            0x00,
            0x00,
            0x00,
            0x42,
            0x61,
            0x63,
            0x6b,
            0x75,
            0x70,
            0x20,
            0x52,
            0x41,
            0x4d,
            0x00,
            0x53,
            0x72,
            0x63,
            0x2f,
            0x4d,
            0x6f,
            0x64,
            0x65,
            0x6c,
            0x33,
            0x2f,
            0x4d,
            0x6f,
            0x64,
            0x65,
            0x6c,
            0x33,
            0x2e,
            0x63,
            0x70,
            0x70,
            0x00,
            0x00,
            0x00,
            0x20,
            0x03,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x02,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x03,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x02,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x16,
            0x00,
            0x00,
            0x00,
            0x03,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x11,
            0x00,
            0x00,
            0x00,
            0x3c,
            0xbc
          ],
          [
            0x34,
            0x03,
            0x00,
            0x00,
            0x0a,
            0x00,
            0xa0,
            0x06,
            0x21,
            0x22,
            0x01,
            0x63,
            0xff,
            0x01,
            0x1a,
            0x95,
            0x4f,
            0xb7,
            0x98,
            0x19,
            0x04,
            0x02,
            0xff,
            0xff,
            0xff,
            0xff,
            0xff,
            0xff,
            0xff,
            0xff,
            0x00,
            0xff,
            0xff,
            0xff,
            0x98,
            0x19,
            0x10,
            0x03,
            0x00,
            0xff,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x59,
            0x66,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x00,
            0x05,
            0x00,
            0x00,
            0x00,
            0x01,
            0x2d,
            0x00,
            0x02,
            0x00,
            0x0b,
            0x00,
            0x00,
            0x00,
            0x16,
            0x00,
            0x00,
            0x00,
            0x42,
            0x61,
            0x63,
            0x6b,
            0x75,
            0x70,
            0x20,
            0x52,
            0x41,
            0x4d,
            0x00,
            0x53,
            0x72,
            0x63,
            0x2f,
            0x4d,
            0x6f,
            0x64,
            0x65,
            0x6c,
            0x33,
            0x2f,
            0x4d,
            0x6f,
            0x64,
            0x65,
            0x6c,
            0x33,
            0x2e,
            0x63,
            0x70,
            0x70,
            0x00,
            0x00,
            0x00,
            0x26,
            0x44,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x02,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x03,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x01,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x02,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x35,
            0x00,
            0x00,
            0x00,
            0x03,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x00,
            0x14,
            0x00,
            0x00,
            0x00,
            0x78,
            0x87
          ]
        );
      }
    }
    if (Context.PlayerID == 0) {
      var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\NVRAM\\" + nvram + ".nv");
      var savePkgOrigin = System.IO.Path.Combine(Game.Folder, nvram + ".nv");
      System.IO.File.Copy(savePkgOrigin, savePath, true);
    }
  }

  var accl = Context.Options["accl"];
  if (accl != "Last used") {
    if (accl == "Triggers") {
      var gearup = "KEY_Y,JOY1_BUTTON1";
      var geardn = "KEY_H,JOY1_BUTTON3";
      var acclerator = "KEY_UP,JOY1_RZAXIS_POS";
      var brakes = "KEY_DOWN,JOY1_ZAXIS_POS";
    }
    if (accl == "Buttons") {
      var acclerator = "KEY_UP,JOY1_BUTTON1";
      var brakes = "KEY_DOWN,JOY1_BUTTON3";
      var gearup = "KEY_Y,JOY1_BUTTON5";
      var geardn = "KEY_H,JOY1_BUTTON6";
    }
    var aline = new Nucleus.IniSaveInfo("Global", "InputAccelerator", acclerator);
    var bline = new Nucleus.IniSaveInfo("Global", "InputBrake", brakes);
    var guline = new Nucleus.IniSaveInfo("Global", "InputGearShiftUp", gearup);
    var gdline = new Nucleus.IniSaveInfo("Global", "InputGearShiftDown", geardn);
  }
  if (accl == "Last used") {
    var aline = new Nucleus.IniSaveInfo("Global", "InputSystem", "xinput");
    var bline = new Nucleus.IniSaveInfo("Global", "InputSystem", "xinput");
    var guline = new Nucleus.IniSaveInfo("Global", "InputSystem", "xinput");
    var gdline = new Nucleus.IniSaveInfo("Global", "InputSystem", "xinput");
  }

  var ff = Context.Options["ff"];
  if (ff != "Last used") {
    if (ff == "Yes") {
      var ffb = 1;
    } else {
      var ffb = 0;
    }
    var ffbline = new Nucleus.IniSaveInfo("Global", "ForceFeedback", ffb);
  }
  if (ff == "Last used") {
    var ffbline = new Nucleus.IniSaveInfo("Global", "InputSystem", "xinput");
  }

  var deadzone = Context.Options["dz"];
  if (deadzone != "Last used") {
    var dzline = new Nucleus.IniSaveInfo("Global", "InputJOY1XDeadZone", deadzone);
  }
  if (deadzone == "Last used") {
    var dzline = new Nucleus.IniSaveInfo("Global", "InputSystem", "xinput");
  }

  var saturation = Context.Options["sat"];
  if (saturation != "Last used") {
    var satline1 = new Nucleus.IniSaveInfo("daytona2", "InputJOY1XSaturation", saturation);
    var satline2 = new Nucleus.IniSaveInfo("dayto2pe", "InputJOY1XSaturation", saturation);
    var satline3 = new Nucleus.IniSaveInfo("dirtdvls", "InputJOY1XSaturation", saturation);
    var satline4 = new Nucleus.IniSaveInfo("harley", "InputJOY1XSaturation", saturation);
    var satline5 = new Nucleus.IniSaveInfo("lemans24", "InputJOY1XSaturation", saturation);
    var satline6 = new Nucleus.IniSaveInfo("scud", "InputJOY1XSaturation", saturation);
    var satline7 = new Nucleus.IniSaveInfo("scudplus", "InputJOY1XSaturation", saturation);
    var satline8 = new Nucleus.IniSaveInfo("srally2", "InputJOY1XSaturation", saturation);
    var satline9 = new Nucleus.IniSaveInfo("srally2dx", "InputJOY1XSaturation", saturation);
  }
  if (saturation == "Last used") {
    var satline1 = new Nucleus.IniSaveInfo("Global", "InputSystem", "xinput");
    var satline2 = new Nucleus.IniSaveInfo("Global", "InputSystem", "xinput");
    var satline3 = new Nucleus.IniSaveInfo("Global", "InputSystem", "xinput");
    var satline4 = new Nucleus.IniSaveInfo("Global", "InputSystem", "xinput");
    var satline5 = new Nucleus.IniSaveInfo("Global", "InputSystem", "xinput");
    var satline6 = new Nucleus.IniSaveInfo("Global", "InputSystem", "xinput");
    var satline7 = new Nucleus.IniSaveInfo("Global", "InputSystem", "xinput");
    var satline8 = new Nucleus.IniSaveInfo("Global", "InputSystem", "xinput");
    var satline9 = new Nucleus.IniSaveInfo("Global", "InputSystem", "xinput");
  }
  if (saturation == "Default") {
    var satline1 = new Nucleus.IniSaveInfo("daytona2", "InputJOY1XSaturation", "165");
    var satline2 = new Nucleus.IniSaveInfo("dayto2pe", "InputJOY1XSaturation", "165");
    var satline3 = new Nucleus.IniSaveInfo("dirtdvls", "InputJOY1XSaturation", "118");
    var satline4 = new Nucleus.IniSaveInfo("harley", "InputJOY1XSaturation", "160");
    var satline5 = new Nucleus.IniSaveInfo("lemans24", "InputJOY1XSaturation", "120");
    var satline6 = new Nucleus.IniSaveInfo("scud", "InputJOY1XSaturation", "170");
    var satline7 = new Nucleus.IniSaveInfo("scudplus", "InputJOY1XSaturation", "170");
    var satline8 = new Nucleus.IniSaveInfo("srally2", "InputJOY1XSaturation", "155");
    var satline9 = new Nucleus.IniSaveInfo("srally2dx", "InputJOY1XSaturation", "155");
  }

  if (Context.AspectRatioDecimal < 0.9) {
    if ((Player.Owner.IsDualVertical = "true")) {
      var aspect = "true";
      var Height = Math.round(Context.Height * 0.666666667);
      var PosY = Math.round(Context.Height * 0.16666667);
      Game.DontResize = true;
    } else {
      var aspect = "true";
      var Height = Context.Height;
      var PosY = Context.PosY;
    }
  } else {
    var aspect = "true";
    var Height = Context.Height;
    var PosY = Context.PosY;
  }

  var bgmop = Context.Options["bgmop"];
  if (bgmop != "Yes") {
    if (Context.PlayerID != 0) {
      var bgmline = new Nucleus.IniSaveInfo("Global", "MusicVolume", "0");
      var bgmline1 = new Nucleus.IniSaveInfo("daytona2", "MusicVolume", "0");
      var bgmline2 = new Nucleus.IniSaveInfo("dayto2pe", "MusicVolume", "0");
      var bgmline3 = new Nucleus.IniSaveInfo("dirtdvls", "MusicVolume", "0");
      var bgmline4 = new Nucleus.IniSaveInfo("harley", "MusicVolume", "0");
      var bgmline5 = new Nucleus.IniSaveInfo("lemans24", "MusicVolume", "0");
      var bgmline6 = new Nucleus.IniSaveInfo("scud", "MusicVolume", "0");
      var bgmline7 = new Nucleus.IniSaveInfo("scudplus", "MusicVolume", "0");
      var bgmline8 = new Nucleus.IniSaveInfo("srally2", "MusicVolume", "0");
      var bgmline9 = new Nucleus.IniSaveInfo("srally2dx", "MusicVolume", "0");
    } else {
      var bgmline = new Nucleus.IniSaveInfo("Global", "MusicVolume", "100");
      var bgmline1 = new Nucleus.IniSaveInfo("daytona2", "MusicVolume", "120");
      var bgmline2 = new Nucleus.IniSaveInfo("dayto2pe", "MusicVolume", "120");
      var bgmline3 = new Nucleus.IniSaveInfo("dirtdvls", "MusicVolume", "100");
      var bgmline4 = new Nucleus.IniSaveInfo("harley", "MusicVolume", "100");
      var bgmline5 = new Nucleus.IniSaveInfo("lemans24", "MusicVolume", "100");
      var bgmline6 = new Nucleus.IniSaveInfo("scud", "MusicVolume", "200");
      var bgmline7 = new Nucleus.IniSaveInfo("scudplus", "MusicVolume", "200");
      var bgmline8 = new Nucleus.IniSaveInfo("srally2", "MusicVolume", "140");
      var bgmline9 = new Nucleus.IniSaveInfo("srally2dx", "MusicVolume", "140");
    }
  } else {
    var bgmline = new Nucleus.IniSaveInfo("Global", "MusicVolume", "0");
    var bgmline1 = new Nucleus.IniSaveInfo("daytona2", "MusicVolume", "0");
    var bgmline2 = new Nucleus.IniSaveInfo("dayto2pe", "MusicVolume", "0");
    var bgmline3 = new Nucleus.IniSaveInfo("dirtdvls", "MusicVolume", "0");
    var bgmline4 = new Nucleus.IniSaveInfo("harley", "MusicVolume", "0");
    var bgmline5 = new Nucleus.IniSaveInfo("lemans24", "MusicVolume", "0");
    var bgmline6 = new Nucleus.IniSaveInfo("scud", "MusicVolume", "0");
    var bgmline7 = new Nucleus.IniSaveInfo("scudplus", "MusicVolume", "0");
    var bgmline8 = new Nucleus.IniSaveInfo("srally2", "MusicVolume", "0");
    var bgmline9 = new Nucleus.IniSaveInfo("srally2dx", "MusicVolume", "0");
  }

  var savePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Config\\supermodel.ini";
  Context.ModifySaveFile(savePath, savePath, Nucleus.SaveType.INI, [
    bgmline,
    bgmline1,
    bgmline2,
    bgmline3,
    bgmline4,
    bgmline5,
    bgmline6,
    bgmline7,
    bgmline8,
    bgmline9,
    ffbline,
    dzline,
    satline1,
    satline2,
    satline3,
    satline4,
    satline5,
    satline6,
    satline7,
    satline8,
    satline9,
    aline,
    bline,
    guline,
    gdline,
    new Nucleus.IniSaveInfo("Global", "Network", "true"),
    new Nucleus.IniSaveInfo("Global", "SimulateNet", "true"),
    new Nucleus.IniSaveInfo("Global", "InputSystem", "xinput"),
    new Nucleus.IniSaveInfo("Global", "XResolution", Context.Width),
    new Nucleus.IniSaveInfo("Global", "YResolution", Height),
    new Nucleus.IniSaveInfo("Global", "WideScreen", aspect),
    new Nucleus.IniSaveInfo("Global", "WideBackground", "false"),
    new Nucleus.IniSaveInfo("Global", "Stretch", "false"),
    new Nucleus.IniSaveInfo("Global", "PortIn", "197" + Context.PlayerID),
    new Nucleus.IniSaveInfo("Global", "PortOut", "197" + (Context.PlayerID + 1))
  ]);

  if (Context.NumberOfPlayers == Context.PlayerID + 1) {
    var savePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Config\\supermodel.ini";
    Context.ModifySaveFile(savePath, savePath, Nucleus.SaveType.INI, [new Nucleus.IniSaveInfo("Global", "PortOut", "1970")]);
  }

  Context.StartArguments = " roms\\" + romarg + " -res=" + Context.Width + "," + Height + " -window-pos=" + Context.PosX + "," + PosY + " -borderless -vsync -input-system=xinput " + bgm;

  // var DEBUG = Context.ScriptFolder + '\\' + '\\DEBUG.txt';
  // var lines = [Context.AspectRatioDecimal,];
  // Context.WriteTextFile(DEBUG, lines);
};