projects
/
screensavers
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Trimmed down NEDsim to a single CPU, single thread, 64MB RAM, 64k element stack,...
[screensavers]
/
hacks
/
NEDsim
/
simulator.h
diff --git
a/hacks/NEDsim/simulator.h
b/hacks/NEDsim/simulator.h
index
927f73b
..
971e76c
100644
(file)
--- a/
hacks/NEDsim/simulator.h
+++ b/
hacks/NEDsim/simulator.h
@@
-22,20
+22,15
@@
#include "./a.out.h"
#include "./a.out.h"
-// TODO: Can get rid of this since I don't do a show_usage() anymore?
-#define VERSION 5
-
/* Bytes per word. */
#define BPW 4
/* Number of stack words. */
/* Bytes per word. */
#define BPW 4
/* Number of stack words. */
-#define STACK_LENGTH
104857
6
+#define STACK_LENGTH
6553
6
/* Number of bytes of RAM. */
/* Number of bytes of RAM. */
-#define RAM_LENGTH 1073741824
-
-/* Number of hardware threads. */
-#define THREAD_COUNT 8
+#define RAM_LENGTH 67108864
+#define RAM_BASE_ADDRESS 0x20000000
/* Number of syllables per word. */
#define SPW 5
/* Number of syllables per word. */
#define SPW 5
@@
-58,11
+53,11
@@
struct NEDhack {
bool resume_word;
};
bool resume_word;
};
-// TODO: Make this a single thread before committing. Multi-thread is broken with my current main loop.
struct NEDstate {
bool halted;
uint8_t ram[RAM_LENGTH];
struct NEDstate {
bool halted;
uint8_t ram[RAM_LENGTH];
- struct NEDthread * thread[THREAD_COUNT];
+ /* Although NED is multi-threaded, this screensaver is restricted to a single thread. */
+ struct NEDthread * thread[1];
struct NEDthread * active_thread;
struct NEDhack * hack;
};
struct NEDthread * active_thread;
struct NEDhack * hack;
};