2000-08-22 07:03:44 +00:00
|
|
|
/*****************************************************************************/
|
|
|
|
/* */
|
2013-05-09 11:56:54 +00:00
|
|
|
/* target.h */
|
2000-08-22 07:03:44 +00:00
|
|
|
/* */
|
2013-05-09 11:56:54 +00:00
|
|
|
/* Target specification */
|
2000-08-22 07:03:44 +00:00
|
|
|
/* */
|
|
|
|
/* */
|
|
|
|
/* */
|
2011-12-28 13:33:38 +00:00
|
|
|
/* (C) 2000-2011, Ullrich von Bassewitz */
|
2009-09-13 11:46:04 +00:00
|
|
|
/* Roemerstrasse 52 */
|
|
|
|
/* D-70794 Filderstadt */
|
|
|
|
/* EMail: uz@cc65.org */
|
2000-08-22 07:03:44 +00:00
|
|
|
/* */
|
|
|
|
/* */
|
|
|
|
/* This software is provided 'as-is', without any expressed or implied */
|
|
|
|
/* warranty. In no event will the authors be held liable for any damages */
|
|
|
|
/* arising from the use of this software. */
|
|
|
|
/* */
|
|
|
|
/* Permission is granted to anyone to use this software for any purpose, */
|
|
|
|
/* including commercial applications, and to alter it and redistribute it */
|
|
|
|
/* freely, subject to the following restrictions: */
|
|
|
|
/* */
|
|
|
|
/* 1. The origin of this software must not be misrepresented; you must not */
|
|
|
|
/* claim that you wrote the original software. If you use this software */
|
|
|
|
/* in a product, an acknowledgment in the product documentation would be */
|
|
|
|
/* appreciated but is not required. */
|
|
|
|
/* 2. Altered source versions must be plainly marked as such, and must not */
|
|
|
|
/* be misrepresented as being the original software. */
|
|
|
|
/* 3. This notice may not be removed or altered from any source */
|
|
|
|
/* distribution. */
|
|
|
|
/* */
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef TARGET_H
|
|
|
|
#define TARGET_H
|
|
|
|
|
|
|
|
|
|
|
|
|
2003-05-01 23:24:20 +00:00
|
|
|
/* common */
|
|
|
|
#include "cpu.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
2000-08-22 07:03:44 +00:00
|
|
|
/*****************************************************************************/
|
2013-05-09 11:56:54 +00:00
|
|
|
/* Data */
|
2000-08-22 07:03:44 +00:00
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Supported target systems */
|
|
|
|
typedef enum {
|
2013-05-09 11:56:54 +00:00
|
|
|
TGT_UNKNOWN = -1, /* Not specified or invalid target */
|
2000-08-22 07:03:44 +00:00
|
|
|
TGT_NONE,
|
2002-04-25 05:08:51 +00:00
|
|
|
TGT_MODULE,
|
2000-08-22 07:03:44 +00:00
|
|
|
TGT_ATARI,
|
2014-03-01 16:20:09 +00:00
|
|
|
TGT_ATARI5200,
|
2013-05-28 19:56:37 +00:00
|
|
|
TGT_ATARIXL,
|
2002-08-07 05:18:13 +00:00
|
|
|
TGT_VIC20,
|
2002-11-21 21:22:26 +00:00
|
|
|
TGT_C16,
|
2000-08-22 07:03:44 +00:00
|
|
|
TGT_C64,
|
|
|
|
TGT_C128,
|
|
|
|
TGT_PLUS4,
|
2001-09-13 19:44:43 +00:00
|
|
|
TGT_CBM510,
|
2000-08-22 07:03:44 +00:00
|
|
|
TGT_CBM610,
|
2015-02-08 16:21:23 +00:00
|
|
|
TGT_OSIC1P,
|
2000-08-22 07:03:44 +00:00
|
|
|
TGT_PET,
|
2013-12-05 20:45:20 +00:00
|
|
|
TGT_BBC,
|
2000-08-22 07:03:44 +00:00
|
|
|
TGT_APPLE2,
|
2004-03-11 20:52:23 +00:00
|
|
|
TGT_APPLE2ENH,
|
2013-11-25 21:52:04 +00:00
|
|
|
TGT_GEOS_CBM,
|
2013-12-05 20:45:20 +00:00
|
|
|
TGT_GEOS_APPLE,
|
2001-12-01 13:34:51 +00:00
|
|
|
TGT_LUNIX,
|
2013-12-05 20:45:20 +00:00
|
|
|
TGT_ATMOS,
|
2017-01-29 22:05:18 +00:00
|
|
|
TGT_TELEMON24,
|
|
|
|
TGT_TELEMON30,
|
2013-11-25 21:52:04 +00:00
|
|
|
TGT_NES,
|
2013-12-05 20:45:20 +00:00
|
|
|
TGT_SUPERVISION,
|
|
|
|
TGT_LYNX,
|
2013-05-20 18:35:42 +00:00
|
|
|
TGT_SIM6502,
|
|
|
|
TGT_SIM65C02,
|
2014-11-29 14:35:20 +00:00
|
|
|
TGT_PCENGINE,
|
2015-11-14 12:15:29 +00:00
|
|
|
TGT_GAMATE,
|
2017-01-29 21:59:53 +00:00
|
|
|
TGT_C65,
|
2013-05-09 11:56:54 +00:00
|
|
|
TGT_COUNT /* Number of target systems */
|
2000-08-22 07:03:44 +00:00
|
|
|
} target_t;
|
|
|
|
|
2011-12-28 13:33:38 +00:00
|
|
|
/* Collection of target properties */
|
|
|
|
typedef struct TargetProperties TargetProperties;
|
|
|
|
struct TargetProperties {
|
2013-12-05 20:45:20 +00:00
|
|
|
const char Name[12]; /* Name of the target */
|
2011-12-28 13:33:38 +00:00
|
|
|
cpu_t DefaultCPU; /* Default CPU for this target */
|
2013-04-09 21:09:46 +00:00
|
|
|
unsigned char BinFmt; /* Default binary format for this target */
|
2011-12-28 13:33:38 +00:00
|
|
|
const unsigned char* CharMap; /* Character translation table */
|
|
|
|
};
|
|
|
|
|
2000-08-22 07:03:44 +00:00
|
|
|
/* Target system */
|
2013-05-09 11:56:54 +00:00
|
|
|
extern target_t Target;
|
2000-08-22 07:03:44 +00:00
|
|
|
|
2013-04-09 21:09:46 +00:00
|
|
|
/* Types of available output formats */
|
2013-05-09 11:56:54 +00:00
|
|
|
#define BINFMT_DEFAULT 0 /* Default (binary) */
|
|
|
|
#define BINFMT_BINARY 1 /* Straight binary format */
|
|
|
|
#define BINFMT_O65 2 /* Andre Fachats o65 format */
|
2000-08-22 07:03:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
2013-05-09 11:56:54 +00:00
|
|
|
/* Code */
|
2000-08-22 07:03:44 +00:00
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
target_t FindTarget (const char* Name);
|
|
|
|
/* Find a target by name and return the target id. TGT_UNKNOWN is returned if
|
2014-06-30 09:10:35 +00:00
|
|
|
** the given name is no valid target.
|
|
|
|
*/
|
2000-08-22 07:03:44 +00:00
|
|
|
|
2011-12-28 13:33:38 +00:00
|
|
|
const TargetProperties* GetTargetProperties (target_t Target);
|
|
|
|
/* Return the properties for a target */
|
2000-08-22 07:03:44 +00:00
|
|
|
|
2011-12-28 13:33:38 +00:00
|
|
|
const char* GetTargetName (target_t Target);
|
|
|
|
/* Return the name of a target */
|
2000-08-22 07:03:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-28 13:33:38 +00:00
|
|
|
/* End of target.h */
|
2002-06-03 20:14:11 +00:00
|
|
|
|
2014-03-04 00:11:19 +00:00
|
|
|
#endif
|