Added ability to directly embed NED programs in NEDsim binary for runtime execution.
[screensavers] / hacks / NEDsim / simulator.h
index 4a3769e..51c461e 100644 (file)
@@ -1,6 +1,9 @@
 /* (c) 2021 Aaron Taylor <ataylor at subgeniuskitty dot com>                  */
 /* See LICENSE.txt file for copyright and license details.                    */
 
 /* (c) 2021 Aaron Taylor <ataylor at subgeniuskitty dot com>                  */
 /* See LICENSE.txt file for copyright and license details.                    */
 
+#ifndef NEDSIM_SIMULATOR_H
+#define NEDSIM_SIMULATOR_H
+
 #include <stdbool.h>
 
 /* Bytes per word. */
 #include <stdbool.h>
 
 /* Bytes per word. */
@@ -60,7 +63,8 @@ enum syllables {
     HALT    = 0b00000000
 };
 
     HALT    = 0b00000000
 };
 
-struct NEDstate * init_simulator(char * input_file);
+struct NEDstate * init_simulator(char * input_file, const uint8_t * blob, const size_t * blob_size);
 struct NEDstate * run_simulator(struct NEDstate * state);
 uint32_t ram_r_word(struct NEDstate * state, uint32_t address);
 
 struct NEDstate * run_simulator(struct NEDstate * state);
 uint32_t ram_r_word(struct NEDstate * state, uint32_t address);
 
+#endif