summaryrefslogtreecommitdiff
path: root/emulator.h
diff options
context:
space:
mode:
Diffstat (limited to 'emulator.h')
-rw-r--r--emulator.h35
1 files changed, 31 insertions, 4 deletions
diff --git a/emulator.h b/emulator.h
index c47d4f5..48ddff4 100644
--- a/emulator.h
+++ b/emulator.h
@@ -2,11 +2,38 @@
#ifndef EMULATOR_H_
#define EMULATOR_H_
+#include <vector>
+
+#include "value.h"
+
+class inst_loader;
+
class emulator {
+public:
+ emulator(
+ inst_loader * loader,
+ int num_temp_regs,
+ int num_const_regs,
+ int num_out_regs);
+
+
+ void run();
+ void set_constants(float value);
+ value * get_value(register_address addr);
+ void set_value(
+ register_address addr,
+ value * val);
+ value * get_output_value(int index);
+
private:
- inst_loader loader;
- vector<reg> temp_regs;
- vector<reg> out_regs;
+ unsigned int calc_reg_index(
+ unsigned int index,
+ enum swizzle swz);
+
+ inst_loader * m_loader;
+ std::vector<value *> m_temp_regs;
+ std::vector<float_value *> m_const_regs;
+ std::vector<value *> m_out_regs;
};
-#endif //EMULATOR_H_
+#endif //EMULATOR_H