From 9c49513d8009ba893d120565e5f4bdb88bcc351a Mon Sep 17 00:00:00 2001
From: "ol.sc"
Date: Fri, 8 Jan 2010 23:37:25 +0000
Subject: [PATCH] Added support for several machines.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4547 b7a2c559-68d2-44c3-8de9-860c34a00d81
---
testcode/lib/em-test.c | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/testcode/lib/em-test.c b/testcode/lib/em-test.c
index 3fe5bf280..d66d346e0 100644
--- a/testcode/lib/em-test.c
+++ b/testcode/lib/em-test.c
@@ -6,6 +6,26 @@
#include
+#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));
--
2.39.5