Пример #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);
        }
Пример #2
0
        public static void MakeRegisters()
        {
            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(Registers, OpcodeCompiler.MakeRegisters(registers));
            System.IO.File.WriteAllText(Constants, OpcodeCompiler.MakeConstants(constants));
            System.IO.File.WriteAllText(Interrupts, OpcodeCompiler.MakeInterrupts(interrupts));
            System.IO.File.WriteAllText(Scancodes, OpcodeCompiler.MakeScancodes(scancodes));

            Debug.Log("Wrote dx__??.inc");
        }
Пример #3
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);
        }