]> git.sur5r.net Git - cc65/blobdiff - src/common/target.h
Merge https://github.com/cc65/cc65 into c1p
[cc65] / src / common / target.h
index 134e19ff4990d258234e0c49e86e6517c171b88a..067352deb68734ff035fc4d757d1814b92c84928 100644 (file)
@@ -1,12 +1,12 @@
 /*****************************************************************************/
 /*                                                                           */
-/*                                target.h                                  */
+/*                                 target.h                                  */
 /*                                                                           */
-/*                          Target specification                            */
+/*                           Target specification                            */
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 2000-2009, Ullrich von Bassewitz                                      */
+/* (C) 2000-2011, Ullrich von Bassewitz                                      */
 /*                Roemerstrasse 52                                           */
 /*                D-70794 Filderstadt                                        */
 /* EMail:         uz@cc65.org                                                */
 
 
 /*****************************************************************************/
-/*                                          Data                                    */
+/*                                   Data                                    */
 /*****************************************************************************/
 
 
 
 /* Supported target systems */
 typedef enum {
-    TGT_UNKNOWN = -1,          /* Not specified or invalid target */
+    TGT_UNKNOWN = -1,           /* Not specified or invalid target */
     TGT_NONE,
     TGT_MODULE,
     TGT_ATARI,
+    TGT_ATARI5200,
+    TGT_ATARIXL,
     TGT_VIC20,
     TGT_C16,
+       TGT_C1P,
     TGT_C64,
     TGT_C128,
     TGT_PLUS4,
@@ -66,43 +69,56 @@ typedef enum {
     TGT_BBC,
     TGT_APPLE2,
     TGT_APPLE2ENH,
-    TGT_GEOS,
+    TGT_GEOS_CBM,
+    TGT_GEOS_APPLE,
     TGT_LUNIX,
     TGT_ATMOS,
     TGT_NES,
     TGT_SUPERVISION,
     TGT_LYNX,
-    TGT_COUNT                  /* Number of target systems */
+    TGT_SIM6502,
+    TGT_SIM65C02,
+    TGT_COUNT                   /* Number of target systems */
 } target_t;
 
-/* Target system */
-extern target_t                Target;
+/* Collection of target properties */
+typedef struct TargetProperties TargetProperties;
+struct TargetProperties {
+    const char              Name[12];   /* Name of the target */
+    cpu_t                   DefaultCPU; /* Default CPU for this target */
+    unsigned char           BinFmt;     /* Default binary format for this target */
+    const unsigned char*    CharMap;    /* Character translation table */
+};
 
-/* Table with target names */
-extern const char* TargetNames[TGT_COUNT];
+/* Target system */
+extern target_t         Target;
 
-/* Table with default CPUs per target */
-extern const cpu_t DefaultCPU[TGT_COUNT];
+/* Types of available output formats */
+#define BINFMT_DEFAULT          0       /* Default (binary) */
+#define BINFMT_BINARY           1       /* Straight binary format */
+#define BINFMT_O65              2       /* Andre Fachats o65 format */
 
 
 
 /*****************************************************************************/
-/*                                          Code                                    */
+/*                                   Code                                    */
 /*****************************************************************************/
 
 
 
 target_t FindTarget (const char* Name);
 /* Find a target by name and return the target id. TGT_UNKNOWN is returned if
- * the given name is no valid target.
- */
-
-
+** the given name is no valid target.
+*/
 
-/* End of target.h */
+const TargetProperties* GetTargetProperties (target_t Target);
+/* Return the properties for a target */
 
-#endif
+const char* GetTargetName (target_t Target);
+/* Return the name of a target */
 
 
 
+/* End of target.h */
 
+#endif