Skip to content

Commit

Permalink
AltairZ80: Remove MetroWerks support for Macintosh OS 9
Browse files Browse the repository at this point in the history
  • Loading branch information
psco authored and markpizz committed Apr 5, 2023
1 parent b090c47 commit f981568
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 35 deletions.
4 changes: 0 additions & 4 deletions AltairZ80/altairz80_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,6 @@ typedef enum {

#define ADDRESS_FORMAT "[0x%08x]"

#if (defined (__MWERKS__) && defined (macintosh)) || defined(__DECC)
#define __FUNCTION__ __FILE__
#endif

typedef struct {
uint32 mem_base; /* Memory Base Address */
uint32 mem_size; /* Memory Address space requirement */
Expand Down
13 changes: 2 additions & 11 deletions AltairZ80/altairz80_sio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 uint32 stopWatchNow = 0; /* stores starting time of stop watch */
static int32 markTimeSP = 0; /* stack pointer for timer stack */

/* 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
uint32 SIMHSleep = 1; /* default time in milliseconds to sleep for SIMHSleepCmd is 1 */
static uint32 sleepAllowedCounter = 0; /* only sleep on no character available when == 0 */
static uint32 sleepAllowedStart = SLEEP_ALLOWED_START_DEFAULT; /* default start for above counter */

Expand All @@ -229,10 +223,7 @@ static int32 FCBAddress = CPM_FCB_ADDRESS; /* FCB Address

/* support for wild card file expansion */

#if defined (__MWERKS__) && defined (macintosh)
const static char hostPathSeparator = ':'; /* colon on Macintosh OS 9 */
const static char hostPathSeparatorAlt = ':'; /* no alternative */
#elif defined (_WIN32)
#if defined (_WIN32)
const static char hostPathSeparator = '\\'; /* back slash in Windows */
const static char hostPathSeparatorAlt = '/'; /* '/' is an alternative */
#else
Expand Down
5 changes: 1 addition & 4 deletions AltairZ80/i86.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
LOWFIRST must be 0
Priority 2: If __BIG_ENDIAN__ is defined, use it to define LOWFIRST accordingly
Priority 3: OS 9 on Macintosh needs LOWFIRST 0
Priority 4: Use LOWFIRST 1 as default
Priority 3: Use LOWFIRST 1 as default
*/

#ifndef LOWFIRST
Expand All @@ -55,8 +54,6 @@ Priority 4: Use LOWFIRST 1 as default
#else
#define LOWFIRST 1
#endif
#elif defined (__MWERKS__) && defined (macintosh)
#define LOWFIRST 0
#else
#define LOWFIRST 1
#endif
Expand Down
32 changes: 16 additions & 16 deletions sim_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
sim_devices[] array of pointers to simulated devices
sim_PC pointer to saved PC register descriptor
sim_interval simulator interval to next event
sim_stop_messages[SCPE_BASE]
sim_stop_messages[SCPE_BASE]
array of pointers to stop messages
sim_instr() instruction execution routine
sim_load() binary loader routine
Expand Down Expand Up @@ -135,7 +135,7 @@ extern int sim_vax_snprintf(char *buf, size_t buf_size, const char *fmt, ...);
#define EXIT_SUCCESS 0
#endif

#if (defined (__MWERKS__) && defined (macintosh)) || defined(__DECC)
#if defined(__DECC)
#define __FUNCTION__ __FILE__
#endif

Expand Down Expand Up @@ -190,7 +190,7 @@ typedef __int32 int32;
typedef unsigned __int8 uint8;
typedef unsigned __int16 uint16;
typedef unsigned __int32 uint32;
#else
#else
/* All modern/standard compiler environments */
/* any other environment needa a special case above */
#include <stdint.h>
Expand Down Expand Up @@ -299,7 +299,7 @@ typedef uint32 t_addr;
#define SIM_INLINE inline
#define SIM_NOINLINE __attribute__ ((noinline))
#else
#define SIM_INLINE
#define SIM_INLINE
#define SIM_NOINLINE
#endif

Expand Down Expand Up @@ -498,7 +498,7 @@ struct DEVICE {
/* mem size routine */
char *lname; /* logical name */
t_stat (*help)(FILE *st, DEVICE *dptr,
UNIT *uptr, int32 flag, const char *cptr);
UNIT *uptr, int32 flag, const char *cptr);
/* help */
t_stat (*attach_help)(FILE *st, DEVICE *dptr,
UNIT *uptr, int32 flag, const char *cptr);
Expand Down Expand Up @@ -835,10 +835,10 @@ struct MEMFILE {
size_t pos; /* data used */
};

/*
/*
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.
*/
Expand Down Expand Up @@ -914,14 +914,14 @@ struct MEMFILE {
This specifies a arrayed register whose elements are array[0].field,
array[1].field, etc.
All above macro names from ORDATA through XRDATA have two additional
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
of the register which is visible when displaying HELP about a device's
All above macro names from ORDATA through XRDATA have two additional
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
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
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
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.
For example:
Expand All @@ -946,7 +946,7 @@ struct MEMFILE {
will occur before stringization, resulting in the wrong register name.
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.
4. The URDATA macro is obsolescent and present for backward-compatibility.
Expand All @@ -965,8 +965,8 @@ struct MEMFILE {
#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), sizeof(*(loc)), (elesiz), #macro, __FILE__, __LINE__

/* Generic Register declaration for all fields.
If the register structure is extended, this macro will be retained and a
/* Generic Register declaration for all fields.
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 */
#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)
Expand Down

0 comments on commit f981568

Please sign in to comment.