aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--devkit/test.c87
1 files changed, 87 insertions, 0 deletions
diff --git a/devkit/test.c b/devkit/test.c
new file mode 100644
index 0000000..ddf25a4
--- /dev/null
+++ b/devkit/test.c
@@ -0,0 +1,87 @@
+#include "cacheracer.h"
+
+void __start(int core_id, unsigned char payload) {
+ printi(HOME_RW_START - sizeof(struct player_status));
+ /* int test = global + 2; */
+ /* print(hello); */
+ int *ptr = (int*) (HOME_DATA_START + 0x100 * core_id);
+ /* int *ptr = (int*) (0x6000); */
+ int i = 0;
+ if (core_id > 1) {
+ prints("Core ID > 1, sneak attacking");
+ sneak_attack();
+ ptr = (int*) (HOME_DATA_START + 0x2000 + 0x100 * core_id);
+ }
+
+ int int_payload = (int) payload;
+ int p = (int_payload | (int_payload << 8) |
+ (int_payload << 16) | (int_payload << 24));
+
+ while(1) {
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr[i++] = p;
+ ptr += 64;
+ }
+}