]> git.sur5r.net Git - cc65/commitdiff
Added support for several machines.
authorol.sc <ol.sc@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Fri, 8 Jan 2010 23:37:25 +0000 (23:37 +0000)
committerol.sc <ol.sc@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Fri, 8 Jan 2010 23:37:25 +0000 (23:37 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@4547 b7a2c559-68d2-44c3-8de9-860c34a00d81

testcode/lib/em-test.c

index 3fe5bf2801850b3dea80a0e1aa6f46d6c1d650e6..d66d346e05ba888a2ec2b37fe73e7202b060dd62 100644 (file)
@@ -6,6 +6,26 @@
 #include <em.h>
 
 
+#if defined(__C64__)
+#define DRIVERNAME      "c64-ram.emd"
+#elif defined(__C128__)
+#define DRIVERNAME      "c128-ram.emd"
+#elif defined(__C16__)
+#define DRIVERNAME     "c16-ram.emd"
+#elif defined(__CBM510__)
+#define DRIVERNAME     "cbm510-ram.emd"
+#elif defined(__CBM610__)
+#define DRIVERNAME     "cbm610-ram.emd"
+#elif defined(__APPLE2__)
+#define DRIVERNAME     "a2.auxmem.emd"
+#elif defined(__APPLE2ENH__)
+#define DRIVERNAME     "a2e.auxmem.emd"
+#else
+#define DRIVERNAME     "unknown"
+#error "Unknown target system"
+#endif
+
+
 #define FORCE_ERROR1 0
 #define FORCE_ERROR2 0
 
@@ -60,7 +80,7 @@ int main (void)
     struct em_copy c;
 
     clrscr ();
-    Res = em_load_driver ("c64-ram.emd");
+    Res = em_load_driver (DRIVERNAME);
     if (Res != EM_ERR_OK) {
                cprintf ("Error in em_load_driver: %u\r\n", Res);
         cprintf ("os: %u, %s\r\n", _oserror, _stroserror (_oserror));