Exemple #1
0
 public void Run()
 {
     foreach (var operation in operations)
         ProcessOperation(operation.Item1, operation.Item2);
     TexFlush.Flush();
 }
Exemple #2
0
        void ProcessOperation(Addresses register, ulong data)
        {
            switch (register) {
            case Addresses.TexFlush:
                TexFlush.Flush();
                if (Verbose)
                    Console.WriteLine("[GS] Flush textures and disabling buffers");
                break;

            case Addresses.Clamp_1:
                // TODO
                if (Verbose)
                    Console.WriteLine("[GS] Clamp_1");
                break;

            case Addresses.Clamp_2:
                // TODO
                if (Verbose)
                    Console.WriteLine("[GS] Clamp_2");
                break;

            case Addresses.Tex1_1:
                // TODO
                if (Verbose)
                    Console.WriteLine("[GS] Tex1_1");
                break;

            case Addresses.Tex1_2:
                // TODO
                if (Verbose)
                    Console.WriteLine("[GS] Tex1_2");
                break;

            case Addresses.Alpha_1:
                // TODO
                if (Verbose)
                    Console.WriteLine("[GS] Alpha_1");
                break;

            case Addresses.Alpha_2:
                // TODO
                if (Verbose)
                    Console.WriteLine("[GS] Alpha_2");
                break;

            case Addresses.Test_1:
                // TODO
                if (Verbose)
                    Console.WriteLine("[GS] Test_1");
                break;

            case Addresses.Test_2:
                // TODO
                if (Verbose)
                    Console.WriteLine("[GS] Test_2");
                break;

            case Addresses.Pabe:
                // TODO
                if (Verbose)
                    Console.WriteLine("[GS] Pabe");
                break;

            case Addresses.Fba_1:
                // TODO
                if (Verbose)
                    Console.WriteLine("[GS] Fba_1");
                break;

            case Addresses.Fba_2:
                // TODO
                if (Verbose)
                    Console.WriteLine("[GS] Fba_2");
                break;

            case Addresses.ZBuf_1:
                // TODO
                if (Verbose)
                    Console.WriteLine("[GS] ZBuf_1");
                break;

            case Addresses.ZBuf_2:
                // TODO
                if (Verbose)
                    Console.WriteLine("[GS] ZBuf_2");
                break;

            case Addresses.BitBlfBuf:
                BitBlfBuf.Deserialize(data);
                if (Verbose)
                    Console.WriteLine("[GS] {0}", BitBlfBuf);
                break;

            case Addresses.TrxPos:
                TrxPos.Deserialize(data);
                if (Verbose)
                    Console.WriteLine("[GS] {0}", TrxPos);
                break;

            case Addresses.TrxReg:
                TrxReg.Deserialize(data);
                if (Verbose)
                    Console.WriteLine("[GS] {0}", TrxReg);
                break;

            case Addresses.TrxDir:
                TrxDir.Deserialize(data);
                if (Verbose)
                    Console.WriteLine("[GS] {0}", TrxDir);
                break;

            case Addresses.HwReg:
                HwReg.Send(data);
                if (Verbose)
                    Console.WriteLine("[GS] Sent data to HWREG at 0x{0:X8}",
                                      BitBlfBuf.DestinationBufferPointer);
                break;

            default:
                throw new NotSupportedException("Unsupported register address: " + register);
            }
        }