AltairZ80: Remove MetroWerks support for Macintosh OS 9
This commit is contained in:
parent
75e79a4da8
commit
cc23adf6fd
4 changed files with 19 additions and 35 deletions
|
@ -87,10 +87,6 @@ typedef enum {
|
||||||
|
|
||||||
#define ADDRESS_FORMAT "[0x%08x]"
|
#define ADDRESS_FORMAT "[0x%08x]"
|
||||||
|
|
||||||
#if (defined (__MWERKS__) && defined (macintosh)) || defined(__DECC)
|
|
||||||
#define __FUNCTION__ __FILE__
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint32 mem_base; /* Memory Base Address */
|
uint32 mem_base; /* Memory Base Address */
|
||||||
uint32 mem_size; /* Memory Address space requirement */
|
uint32 mem_size; /* Memory Address space requirement */
|
||||||
|
|
|
@ -200,13 +200,7 @@ static uint32 stopWatchDelta = 0; /* stores elapsed time of stop w
|
||||||
static int32 getStopWatchDeltaPos = 0; /* determines the state for receiving stopWatchDelta */
|
static int32 getStopWatchDeltaPos = 0; /* determines the state for receiving stopWatchDelta */
|
||||||
static uint32 stopWatchNow = 0; /* stores starting time of stop watch */
|
static uint32 stopWatchNow = 0; /* stores starting time of stop watch */
|
||||||
static int32 markTimeSP = 0; /* stack pointer for timer stack */
|
static int32 markTimeSP = 0; /* stack pointer for timer stack */
|
||||||
|
uint32 SIMHSleep = 1; /* default time in milliseconds to sleep for SIMHSleepCmd is 1 */
|
||||||
/* default time in milliseconds to sleep for SIMHSleepCmd */
|
|
||||||
#if defined (__MWERKS__) && defined (macintosh)
|
|
||||||
uint32 SIMHSleep = 0; /* no sleep on Macintosh OS9 */
|
|
||||||
#else
|
|
||||||
uint32 SIMHSleep = 1; /* default value is one millisecond */
|
|
||||||
#endif
|
|
||||||
static uint32 sleepAllowedCounter = 0; /* only sleep on no character available when == 0 */
|
static uint32 sleepAllowedCounter = 0; /* only sleep on no character available when == 0 */
|
||||||
static uint32 sleepAllowedStart = SLEEP_ALLOWED_START_DEFAULT; /* default start for above counter */
|
static uint32 sleepAllowedStart = SLEEP_ALLOWED_START_DEFAULT; /* default start for above counter */
|
||||||
|
|
||||||
|
@ -229,10 +223,7 @@ static int32 FCBAddress = CPM_FCB_ADDRESS; /* FCB Address
|
||||||
|
|
||||||
/* support for wild card file expansion */
|
/* support for wild card file expansion */
|
||||||
|
|
||||||
#if defined (__MWERKS__) && defined (macintosh)
|
#if defined (_WIN32)
|
||||||
const static char hostPathSeparator = ':'; /* colon on Macintosh OS 9 */
|
|
||||||
const static char hostPathSeparatorAlt = ':'; /* no alternative */
|
|
||||||
#elif defined (_WIN32)
|
|
||||||
const static char hostPathSeparator = '\\'; /* back slash in Windows */
|
const static char hostPathSeparator = '\\'; /* back slash in Windows */
|
||||||
const static char hostPathSeparatorAlt = '/'; /* '/' is an alternative */
|
const static char hostPathSeparatorAlt = '/'; /* '/' is an alternative */
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -44,8 +44,7 @@ Priority 1: If LOWFIRST is defined, use it. LOWFIRST must be 1 if the
|
||||||
lower part of a 16 bit quantity comes first in memory, otherwise
|
lower part of a 16 bit quantity comes first in memory, otherwise
|
||||||
LOWFIRST must be 0
|
LOWFIRST must be 0
|
||||||
Priority 2: If __BIG_ENDIAN__ is defined, use it to define LOWFIRST accordingly
|
Priority 2: If __BIG_ENDIAN__ is defined, use it to define LOWFIRST accordingly
|
||||||
Priority 3: OS 9 on Macintosh needs LOWFIRST 0
|
Priority 3: Use LOWFIRST 1 as default
|
||||||
Priority 4: Use LOWFIRST 1 as default
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LOWFIRST
|
#ifndef LOWFIRST
|
||||||
|
@ -55,8 +54,6 @@ Priority 4: Use LOWFIRST 1 as default
|
||||||
#else
|
#else
|
||||||
#define LOWFIRST 1
|
#define LOWFIRST 1
|
||||||
#endif
|
#endif
|
||||||
#elif defined (__MWERKS__) && defined (macintosh)
|
|
||||||
#define LOWFIRST 0
|
|
||||||
#else
|
#else
|
||||||
#define LOWFIRST 1
|
#define LOWFIRST 1
|
||||||
#endif
|
#endif
|
||||||
|
|
32
sim_defs.h
32
sim_defs.h
|
@ -104,7 +104,7 @@
|
||||||
sim_devices[] array of pointers to simulated devices
|
sim_devices[] array of pointers to simulated devices
|
||||||
sim_PC pointer to saved PC register descriptor
|
sim_PC pointer to saved PC register descriptor
|
||||||
sim_interval simulator interval to next event
|
sim_interval simulator interval to next event
|
||||||
sim_stop_messages[SCPE_BASE]
|
sim_stop_messages[SCPE_BASE]
|
||||||
array of pointers to stop messages
|
array of pointers to stop messages
|
||||||
sim_instr() instruction execution routine
|
sim_instr() instruction execution routine
|
||||||
sim_load() binary loader routine
|
sim_load() binary loader routine
|
||||||
|
@ -163,7 +163,7 @@ extern int sim_vax_snprintf(char *buf, size_t buf_size, const char *fmt, ...);
|
||||||
#define USE_REGEX 1
|
#define USE_REGEX 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (defined (__MWERKS__) && defined (macintosh)) || defined(__DECC)
|
#if defined(__DECC)
|
||||||
#define __FUNCTION__ __FILE__
|
#define __FUNCTION__ __FILE__
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -218,7 +218,7 @@ typedef __int32 int32;
|
||||||
typedef unsigned __int8 uint8;
|
typedef unsigned __int8 uint8;
|
||||||
typedef unsigned __int16 uint16;
|
typedef unsigned __int16 uint16;
|
||||||
typedef unsigned __int32 uint32;
|
typedef unsigned __int32 uint32;
|
||||||
#else
|
#else
|
||||||
/* All modern/standard compiler environments */
|
/* All modern/standard compiler environments */
|
||||||
/* any other environment needa a special case above */
|
/* any other environment needa a special case above */
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
@ -327,7 +327,7 @@ typedef uint32 t_addr;
|
||||||
#define SIM_INLINE inline
|
#define SIM_INLINE inline
|
||||||
#define SIM_NOINLINE __attribute__ ((noinline))
|
#define SIM_NOINLINE __attribute__ ((noinline))
|
||||||
#else
|
#else
|
||||||
#define SIM_INLINE
|
#define SIM_INLINE
|
||||||
#define SIM_NOINLINE
|
#define SIM_NOINLINE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -524,7 +524,7 @@ struct DEVICE {
|
||||||
/* mem size routine */
|
/* mem size routine */
|
||||||
char *lname; /* logical name */
|
char *lname; /* logical name */
|
||||||
t_stat (*help)(FILE *st, DEVICE *dptr,
|
t_stat (*help)(FILE *st, DEVICE *dptr,
|
||||||
UNIT *uptr, int32 flag, const char *cptr);
|
UNIT *uptr, int32 flag, const char *cptr);
|
||||||
/* help */
|
/* help */
|
||||||
t_stat (*attach_help)(FILE *st, DEVICE *dptr,
|
t_stat (*attach_help)(FILE *st, DEVICE *dptr,
|
||||||
UNIT *uptr, int32 flag, const char *cptr);
|
UNIT *uptr, int32 flag, const char *cptr);
|
||||||
|
@ -905,10 +905,10 @@ struct MEMFILE {
|
||||||
size_t pos; /* data used */
|
size_t pos; /* data used */
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
The following macros exist to help populate structure contents
|
The following macros exist to help populate structure contents
|
||||||
|
|
||||||
They are dependent on the declaration order of the fields
|
They are dependent on the declaration order of the fields
|
||||||
of the structures they exist to populate.
|
of the structures they exist to populate.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
@ -978,14 +978,14 @@ struct MEMFILE {
|
||||||
This specifies a arrayed register whose elements are array[0].field,
|
This specifies a arrayed register whose elements are array[0].field,
|
||||||
array[1].field, etc.
|
array[1].field, etc.
|
||||||
|
|
||||||
All above macro names from ORDATA through XRDATA have two additional
|
All above macro names from ORDATA through XRDATA have two additional
|
||||||
precisely related macros. The first it the above name with D appended and
|
precisely related macros. The first it the above name with D appended and
|
||||||
has an additional parameter which is a quoted string describing the purpose
|
has an additional parameter which is a quoted string describing the purpose
|
||||||
of the register which is visible when displaying HELP about a device's
|
of the register which is visible when displaying HELP about a device's
|
||||||
registers. The second related macro has the above name with DF appended
|
registers. The second related macro has the above name with DF appended
|
||||||
and has two additional parameters. The first parameter is the register
|
and has two additional parameters. The first parameter is the register
|
||||||
description, and the second is the name of a BITFIELD array which describes
|
description, and the second is the name of a BITFIELD array which describes
|
||||||
the fields in the register's contents. This info is used to display the
|
the fields in the register's contents. This info is used to display the
|
||||||
register contents (via EXAMINE) along with the detailed bitfield data.
|
register contents (via EXAMINE) along with the detailed bitfield data.
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
|
@ -1010,7 +1010,7 @@ struct MEMFILE {
|
||||||
will occur before stringization, resulting in the wrong register name.
|
will occur before stringization, resulting in the wrong register name.
|
||||||
|
|
||||||
3. Additional REG initialization values may be supplied after a macro
|
3. Additional REG initialization values may be supplied after a macro
|
||||||
invocation. If present, these begin with the "flags" field which is,
|
invocation. If present, these begin with the "flags" field which is,
|
||||||
for the most part, not specified as a macro parameter.
|
for the most part, not specified as a macro parameter.
|
||||||
|
|
||||||
4. The URDATA macro is obsolescent and present for backward-compatibility.
|
4. The URDATA macro is obsolescent and present for backward-compatibility.
|
||||||
|
@ -1027,8 +1027,8 @@ struct MEMFILE {
|
||||||
#define _RegCheck(nm,loc,rdx,wd,off,dep,desc,flds,qptr,siz,elesiz,macro) \
|
#define _RegCheck(nm,loc,rdx,wd,off,dep,desc,flds,qptr,siz,elesiz,macro) \
|
||||||
nm, (loc), (rdx), (wd), (off), (dep), (desc), (flds), (qptr), (siz), sizeof(*(loc)), (elesiz), #macro
|
nm, (loc), (rdx), (wd), (off), (dep), (desc), (flds), (qptr), (siz), sizeof(*(loc)), (elesiz), #macro
|
||||||
|
|
||||||
/* Generic Register declaration for all fields.
|
/* Generic Register declaration for all fields.
|
||||||
If the register structure is extended, this macro will be retained and a
|
If the register structure is extended, this macro will be retained and a
|
||||||
new internal macro will be provided that populates the new register structure */
|
new internal macro will be provided that populates the new register structure */
|
||||||
#define REGDATA(nm,loc,rdx,wd,off,dep,desc,flds,fl,qptr,siz) \
|
#define REGDATA(nm,loc,rdx,wd,off,dep,desc,flds,fl,qptr,siz) \
|
||||||
_RegCheck(#nm,&(loc),rdx,wd,off,dep,desc,flds,qptr,siz,sizeof((loc)),REGDATA),(fl)
|
_RegCheck(#nm,&(loc),rdx,wd,off,dep,desc,flds,qptr,siz,sizeof((loc)),REGDATA),(fl)
|
||||||
|
|
Loading…
Add table
Reference in a new issue