Exemple #1
0
        public static void MakeMacros()
        {
            List <OpcodeCompiler.Op> ops       = OpcodeCompiler.GenerateOpcodes(OpcodesPath);
            Dictionary <string, int> registers = OpcodeCompiler.Generate_Registers(Config);
            Dictionary <string, int> constants = OpcodeCompiler.Generate_Constants(Config);
            Dictionary <string, KeyValuePair <int, string> > scancodes  = OpcodeCompiler.Generate_Scancodes(Config);
            Dictionary <string, KeyValuePair <int, string> > interrupts = OpcodeCompiler.Generate_Interrupts(Config);

            System.IO.File.WriteAllText(OpcodesInc, OpcodeCompiler.MakeMacros(ops, registers, constants, interrupts, scancodes));
            Debug.LogFormat("Wrote {0} macros to {1}", ops.Count, OpcodesInc);
        }
Exemple #2
0
        public static void MakeSDK()
        {
            List <OpcodeCompiler.Op> ops       = OpcodeCompiler.GenerateOpcodes(OpcodesPath);
            Dictionary <string, int> registers = OpcodeCompiler.Generate_Registers(Config);
            Dictionary <string, int> constants = OpcodeCompiler.Generate_Constants(Config);
            Dictionary <string, KeyValuePair <int, string> > scancodes  = OpcodeCompiler.Generate_Scancodes(Config);
            Dictionary <string, KeyValuePair <int, string> > interrupts = OpcodeCompiler.Generate_Interrupts(Config);

            System.IO.File.WriteAllText(SdkCpuPath, OpcodeCompiler.MakeMacros(ops, null, null, null, null));
            Debug.LogFormat("Wrote {0} instructions to {1}", ops.Count, SdkCpuPath);

            System.IO.File.WriteAllText(SdkKeyboardPath, OpcodeCompiler.MakeMacros(null, null, null, null, scancodes));
            Debug.LogFormat("Wrote {0} keyboards to {1}", scancodes.Count, SdkKeyboardPath);

            System.IO.File.WriteAllText(SdkRegistersPath, OpcodeCompiler.MakeMacros(null, registers, constants, null, null));
            Debug.LogFormat("Wrote {0} registers/constants to {1}", registers.Count + constants.Count, SdkRegistersPath);
        }