Esempio n. 1
0
    public static IGTResults IGTCheckParallel <Gb>(Gb[] gbs, int timesec, GscIntroSequence intro, int numIgts, Func <GameBoy, bool> fn = null, int ss = 0, int ssOverwrite = -1) where Gb : Gsc
    {
        gbs[0].SetTimeSec(timesec);
        intro.ExecuteUntilIGT(gbs[0]);
        byte[]   igtState = gbs[0].SaveState();
        byte[][] states   = new byte[numIgts][];
        MultiThread.For(numIgts, gbs, (gb, i) => {
            states[i] = gb.MakeIGTState(intro, igtState, i);
        });

        return(IGTCheckParallel(gbs, states, fn, ss, ssOverwrite));
    }
Esempio n. 2
0
    public static IGTResults IGTCheckParallel <Gb>(Gb[] gbs, int timesec, GscIntroSequence intro, int numIgts, Func <Gb, bool> fn = null, int ss = 0, int igtOffset = 0) where Gb : Gsc
    {
        gbs[0].SetTimeSec(timesec);
        intro.ExecuteUntilIGT(gbs[0]);
        byte[]     igtState    = gbs[0].SaveState();
        IGTResults introStates = new IGTResults(numIgts);

        MultiThread.For(numIgts, gbs, (gb, i) => {
            introStates[i] = gb.MakeIGTState(intro, igtState, i + igtOffset);
        });

        return(IGTCheckParallel(gbs, introStates, x => fn == null || fn((Gb)x), ss));
    }
Esempio n. 3
0
    public IGTResults IGTCheck(int timesec, GscIntroSequence intro, int numIgts, Func <GameBoy, bool> fn = null, int ss = 0, int ssOverwrite = -1)
    {
        SetTimeSec(timesec);
        intro.ExecuteUntilIGT(this);
        byte[]   igtState = SaveState();
        byte[][] states   = new byte[numIgts][];
        for (int i = 0; i < numIgts; i++)
        {
            states[i] = MakeIGTState(intro, igtState, i);
        }

        return(IGTCheck(states, fn, ss, ssOverwrite));
    }
Esempio n. 4
0
    public IGTResults IGTCheck(int timesec, GscIntroSequence intro, int numIgts, Func <bool> fn = null, int ss = 0, int igtOffset = 0)
    {
        SetTimeSec(timesec);
        intro.ExecuteUntilIGT(this);
        byte[]     igtState    = SaveState();
        IGTResults introStates = new IGTResults(numIgts);

        for (int i = 0; i < numIgts; i++)
        {
            introStates[i] = MakeIGTState(intro, igtState, i + igtOffset);
        }

        return(IGTCheck(introStates, fn, ss));
    }
Esempio n. 5
0
    public static void Test(byte x, byte y, byte hour, byte minute, byte momStep, byte audio, byte frameType, byte menuAccount, byte igt, GscIntroSequence intro, string path, string recordName = "")
    {
        MakeSave(x, y, hour, minute, momStep, audio, frameType, menuAccount, igt);
        Gold gb = new Gold();

        if (recordName != "")
        {
            gb.Record(recordName);
        }
        gb.SetTimeSec(120);
        intro.ExecuteUntilIGT(gb);
        gb.CpuWrite("wGameTimeFrames", igt);
        gb.Execute(path);
        ushort dvs = Textboxes(gb).DVs;

        Console.WriteLine("0x{0:x4}", dvs);
        gb.Dispose();
    }