]> git.sesse.net Git - pistorm/commitdiff
Merge branch 'main' of https://github.com/captain-amygdala/pistorm into main
authorClaude <claude.schwarz@gmail.com>
Tue, 24 Nov 2020 18:38:31 +0000 (18:38 +0000)
committerClaude <claude.schwarz@gmail.com>
Tue, 24 Nov 2020 18:38:31 +0000 (18:38 +0000)
README.md
emulator.c
hd0.tar.gz [deleted file]

index f3e25c6ebe59b157cbe27df6b7cd48d6996d22f0..28237dbbf5808fce7feebb112514b13a69679058 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,7 +1,9 @@
 # pistorm
 
-# Hardware files are in Hardware.zip, using the hardware design or parts of it in a commercial product (aka selling with profit) needs a explicit approval from me!
-# Even selling blank PCBs at eBay or so without my approval might makes me pretty mad and probably leads to the forthcomming related projects to be closed source. You have been warned :)
+# Join us on IRC Freenode #PiStorm 
+
+* Hardware files are in Hardware.zip, using the hardware design or parts of it in a commercial product (aka selling with profit) needs a explicit approval from me!
+* Even selling blank PCBs at eBay or so without my approval might makes me pretty mad and probably leads to the forthcomming related projects to be closed source. You have been warned :)
 
 
 Simple quickstart
index f91347893ba05e8f602619b94cdef10f30a8d311..5b3232db6f98de5c71fee462a013b57ccbbe38a4 100644 (file)
@@ -76,6 +76,7 @@
 
 int mem_fd;
 int mem_fd_gpclk;
+int gayle_emulation_enabled = 1;
 void *gpio_map;
 void *gpclk_map;
 
@@ -153,10 +154,17 @@ void *iplThread(void *args) {
 
 }
 
-int main() {
+int main(int argc, char *argv[]) {
   int g;
   const struct sched_param priority = {99};
 
+  // Some command line switch stuffles
+  for (g = 1; g < argc; g++) {
+    if (strcmp(argv[g], "--disable-gayle") == 0) {
+      gayle_emulation_enabled = 0;
+    }
+  }
+
   sched_setscheduler(0, SCHED_FIFO, &priority);
   mlockall(MCL_CURRENT);  // lock in memory to keep us from paging out
 
@@ -341,8 +349,10 @@ unsigned int m68k_read_memory_8(unsigned int address) {
     }
   }
 
-  if (address > GAYLEBASE && address < GAYLEBASE + GAYLESIZE) {
-    return readGayleB(address);
+  if (gayle_emulation_enabled) {
+    if (address > GAYLEBASE && address < GAYLEBASE + GAYLESIZE) {
+      return readGayleB(address);
+    }
   }
 
     address &=0xFFFFFF;
@@ -364,8 +374,10 @@ unsigned int m68k_read_memory_16(unsigned int address) {
     }
   }
 
-  if (address > GAYLEBASE && address < GAYLEBASE + GAYLESIZE) {
-    return readGayle(address);
+  if (gayle_emulation_enabled) {
+    if (address > GAYLEBASE && address < GAYLEBASE + GAYLESIZE) {
+      return readGayle(address);
+    }
   }
 
 //  if (address < 0xffffff) {
@@ -387,8 +399,10 @@ unsigned int m68k_read_memory_32(unsigned int address) {
     }
   }
 
-  if (address > GAYLEBASE && address < GAYLEBASE + GAYLESIZE) {
-    return readGayleL(address);
+  if (gayle_emulation_enabled) {
+    if (address > GAYLEBASE && address < GAYLEBASE + GAYLESIZE) {
+      return readGayleL(address);
+    }
   }
 
 //  if (address < 0xffffff) {
@@ -407,9 +421,11 @@ void m68k_write_memory_8(unsigned int address, unsigned int value) {
     return;
   }
 
-  if (address > GAYLEBASE && address < GAYLEBASE + GAYLESIZE) {
-    writeGayleB(address, value);
-    return;
+  if (gayle_emulation_enabled) {
+    if (address > GAYLEBASE && address < GAYLEBASE + GAYLESIZE) {
+      writeGayleB(address, value);
+      return;
+    }
   }
 /*
   if (address == 0xbfe001) {
@@ -432,9 +448,11 @@ void m68k_write_memory_16(unsigned int address, unsigned int value) {
     return;
   }
 
-  if (address > GAYLEBASE && address < GAYLEBASE + GAYLESIZE) {
-    writeGayle(address, value);
-    return;
+  if (gayle_emulation_enabled) {
+    if (address > GAYLEBASE && address < GAYLEBASE + GAYLESIZE) {
+      writeGayle(address, value);
+      return;
+    }
   }
 
 //  if (address < 0xffffff) {
@@ -451,8 +469,10 @@ void m68k_write_memory_32(unsigned int address, unsigned int value) {
     return;
   }
 
-  if (address > GAYLEBASE && address < GAYLEBASE + GAYLESIZE) {
-    writeGayleL(address, value);
+  if (gayle_emulation_enabled) {
+    if (address > GAYLEBASE && address < GAYLEBASE + GAYLESIZE) {
+      writeGayleL(address, value);
+    }
   }
 
 //  if (address < 0xffffff) {
diff --git a/hd0.tar.gz b/hd0.tar.gz
deleted file mode 100644 (file)
index ff21813..0000000
Binary files a/hd0.tar.gz and /dev/null differ