Changeset f7428b1 in buchla-68k for include


Ignore:
Timestamp:
07/10/2017 01:26:59 AM (7 years ago)
Author:
Thomas Lopatic <thomas@…>
Branches:
master
Children:
5fa506d
Parents:
c3aee8a
Message:

Started to rework include files.

Location:
include
Files:
3 added
10 deleted
54 edited

Legend:

Unmodified
Added
Removed
  • include/ascii.h

    rc3aee8a rf7428b1  
    55   ==========================================================================
    66*/
     7
     8#pragma once
    79
    810#define A_NUL   0x00    /* ^@ */
  • include/asgdsp.h

    rc3aee8a rf7428b1  
    33        asgdsp.h -- assignment editor common parameter header file
    44        Version 8 -- 1988-04-18 -- D.N. Lynx Crowe
    5 
    6         Uses definitions from:  "graphdef.h", "midas.h", "vsdd.h"
    75   =============================================================================
    86*/
     7
     8#pragma once
     9#include "stdint.h"
    910
    1011struct  asgent  {       /* assignment table library entry structure */
     
    3233#define ASGPRI          8               /* display object priority */
    3334
    34 #define ASGNFL          (V_RES3)        /* display object flags */
     35#define ASGNFL          V_RES3          /* display object flags */
    3536
    3637#define AK_BASE         158             /* top y value of group 1 select line */
  • include/biosdefs.h

    rc3aee8a rf7428b1  
    66*/
    77
    8 extern  int32_t trap13(int16_t fun, ...);
    9 extern  int32_t trap14(int16_t fun, ...);
     8#pragma once
     9#include "stdint.h"
    1010
    1111#define BIOS    trap13
  • include/charset.h

    rc3aee8a rf7428b1  
    55   =============================================================================
    66*/
     7
     8#pragma once
    79
    810#define SP_P1   0xA0    /* normal +1 */
  • include/cmeta.h

    rc3aee8a rf7428b1  
    66*/
    77
    8 extern  void    CMinit(int8_t *ip);
    9 extern  int16_t CMstat(int8_t *msg);
    10 extern  int16_t CMchr(int8_t c);
    11 extern  int16_t CMuchr(int8_t c);
    12 extern  int16_t CMstr(int8_t *s);
    13 extern  int16_t CMustr(int8_t *s);
    14 extern  int16_t CMlong(void);
    15 extern  int16_t CMdig(void);
    16 extern  int16_t CMlist(int8_t *l[]);
    17 extern  int16_t CMulist(int8_t *l[]);
    18 
    19 extern  int16_t QQsw;
    20 extern  int16_t QQanch;
    21 
    22 extern  int8_t  *QQin;
    23 extern  int8_t  *QQip;
    24 extern  int8_t  *QQop;
    25 
    26 extern  int32_t QQnum;
    27 extern  int16_t QQlnum;
    28 extern  int8_t  QQchr;
    29 extern  int8_t  QQdig;
    30 
    31 extern  int8_t  QQstr[];
     8#pragma once
    329
    3310#define CM_CHR(c)       CMchr(c)
  • include/configs.h

    rc3aee8a rf7428b1  
     1#pragma once
     2#include "stdint.h"
     3
    14#define MAXCFG  12
    25
  • include/ctype.h

    rc3aee8a rf7428b1  
    1010        the equivalent Lattice C macros.  This means that isascii(c) should
    1111        be used if it is necessary to restrict the results to true ASCII.
    12 
    13         If SYS5CODE is TRUE these macros will use the same table definitions
    14         as System 5 Unix(tm).  In this case these behave well even when fed
    15         an EOF.  The EOF character value, -1, is not defined as being in any
    16         of the classes tested for.  If SYS5CODE is FALSE, the Alcyon table
    17         will be used, and EOF will not work properly.
    18 
    19         Define _CTYPE_C for compiling the ctype.c file, undefine otherwise.
    20 
    21         The symbol _ii_ is defined to be the base of the table used.
    2212
    2313                isascii(c)  non-zero if c is ASCII
     
    4636                _tolower(c) returns the lower case version of c
    4737                _toupper(c) returns the upper case version of c
    48 
    49                 tonumber(c) converts c from ASCII to integer
    5038   ============================================================================
    5139*/
     
    5543*/
    5644
    57 #define SYS5CODE        0       /* define non-zero for System 5 / Aztec C */
    58 
    59 #if     SYS5CODE
    60 
    61 #define _ii_    _ctype+1
    62 
    63 /* System 5 Unix(tm) / Aztec C table definitions */
    64 
    65 #define _U      0x01    /* upper case */
    66 #define _L      0x02    /* lower case */
    67 #define _N      0x04    /* numeric 0..9 */
    68 #define _S      0x08    /* whitespace */
    69 #define _P      0x10    /* punctuation */
    70 #define _C      0x20    /* control 00..1F */
    71 #define _B      0x40    /* blank */
    72 #define _X      0x80    /* hex digit */
    73 
    74 #else
    75 
    76 #define _ii_    __atab
     45#pragma once
    7746
    7847/* Digital Research / Alcyon C table definitions */
     
    8756#define _X      0x80    /* hex digit */
    8857
    89 #endif
    90 
    91 #ifndef _CTYPE_C
    92 
    93 #if     SYS5CODE
    94 
    95 extern  char _ctype[];          /* character type table */
    96 
    97 #else   /* SYS5CODE */
    98 
    99 extern  void    ___atab(void);
    100 extern  int8_t __atab[];                /* character type table */
    101 
    102 #endif  /* SYS5CODE */
    103 
    104 extern  int16_t tolower(int16_t c);
    105 extern  int16_t toupper(int16_t c);
    106 
    107 #endif  /* _CTYPE_C */
    108 
    10958/*
    11059
    11160*/
    11261
    113 #define isascii(c)      (!((c)&~0x7F))
     62#define isascii(c)      (!((c) & ~0x7f))
    11463
    115 #define isprint(c)      ((_ii_)[c]&(_P|_U|_L|_N|_B))
    116 #define isgraph(c)      ((_ii_)[c]&(_P|_U|_L|_N))
    117 #define iscntrl(c)      ((_ii_)[c]&_C)
     64#define isprint(c)      (__atab[(c) & 0xff] & (_P | _U | _L | _N | _B))
     65#define isgraph(c)      (__atab[(c) & 0xff] & (_P | _U | _L | _N))
     66#define iscntrl(c)      (__atab[(c) & 0xff] & _C)
    11867
    119 #define isalpha(c)      ((_ii_)[c]&(_U|_L))
    120 #define isupper(c)      ((_ii_)[c]&_U)
    121 #define islower(c)      ((_ii_)[c]&_L)
     68#define isalpha(c)      (__atab[(c) & 0xff] & (_U | _L))
     69#define isupper(c)      (__atab[(c) & 0xff] & _U)
     70#define islower(c)      (__atab[(c) & 0xff] & _L)
    12271
    123 #define isdigit(c)      ((_ii_)[c]&_N)
    124 #define isxdigit(c)     ((_ii_)[c]&_X)
     72#define isdigit(c)      (__atab[(c) & 0xff] & _N)
     73#define isxdigit(c)     (__atab[(c) & 0xff] & _X)
    12574
    126 #define isalnum(c)      ((_ii_)[c]&(_U|_L|_N))
     75#define isalnum(c)      (__atab[(c) & 0xff] & (_U | _L | _N))
    12776
    128 #define isspace(c)      ((_ii_)[c]&_S)
    129 #define ispunct(c)      ((_ii_)[c]&_P)
     77#define isspace(c)      (__atab[(c) & 0xff] & _S)
     78#define ispunct(c)      (__atab[(c) & 0xff] & _P)
    13079
    131 #define iscsym(c)       (isalnum(c)||(((c)&127)==0x5F))
    132 #define iscsymf(c)      (isalpha(c)||(((c)&127)==0x5F))
     80#define iscsym(c)       (isalnum(c) || (((c) & 0x7f) == 0x5f))
     81#define iscsymf(c)      (isalpha(c) || (((c) & 0x7f) == 0x5f))
    13382
    134 #define toascii(c)      ((c)&0x7F)
     83#define toascii(c)      ((c) & 0x7f)
    13584
    136 #define _toupper(c)     ((c)-'a'+'A')
    137 #define _tolower(c)     ((c)-'A'+'a')
    138 
    139 #define tonumber(c)     ((((c)&0x7F)>'9')?((islower(c)?_toupper(c):c)-'A'+10):(c&0x0F))
    140 
     85#define _toupper(c)     ((c) - 'a' + 'A')
     86#define _tolower(c)     ((c) - 'A' + 'a')
  • include/curpak.h

    rc3aee8a rf7428b1  
    66
    77*/
     8
     9#pragma once
     10#include "stdint.h"
    811
    912/* cursor types */
  • include/debug.h

    rc3aee8a rf7428b1  
    55   =============================================================================
    66*/
     7
     8#pragma once
    79
    810#ifdef  DEBUGGER
  • include/dfltins.h

    rc3aee8a rf7428b1  
     1#pragma once
     2#include "stdint.h"
    13
    24uint16_t        dfltins[] = {           /* default instrument */
  • include/errdefs.h

    rc3aee8a rf7428b1  
    66*/
    77
    8 #define ERR01   -1L     /* All purpose general error code */
    9 #define ERR02   -2L     /* Drive not ready */
    10 #define ERR03   -3L     /* Unknown command */
    11 #define ERR04   -4L     /* CRC error */
    12 #define ERR05   -5L     /* Invalid request */
    13 #define ERR06   -6L     /* Seek error */
    14 #define ERR07   -7L     /* Unknown media */
    15 #define ERR08   -8L     /* Sector not found */
    16 #define ERR09   -9L     /* End of media or out of paper */
    17 #define ERR10   -10L    /* Write fault */
    18 #define ERR11   -11L    /* Read fault */
    19 #define ERR12   -12L    /* General mishap */
    20 #define ERR13   -13L    /* Write protected */
    21 #define ERR14   -14L    /* Media change */
    22 #define ERR15   -15L    /* Unknown device */
    23 #define ERR16   -16L    /* Bad sectors */
    24 #define ERR17   -17L    /* Insert disk */
     8#pragma once
     9
     10#define ERR01   -1      /* All purpose general error code */
     11#define ERR02   -2      /* Drive not ready */
     12#define ERR03   -3      /* Unknown command */
     13#define ERR04   -4      /* CRC error */
     14#define ERR05   -5      /* Invalid request */
     15#define ERR06   -6      /* Seek error */
     16#define ERR07   -7      /* Unknown media */
     17#define ERR08   -8      /* Sector not found */
     18#define ERR09   -9      /* End of media or out of paper */
     19#define ERR10   -10     /* Write fault */
     20#define ERR11   -11     /* Read fault */
     21#define ERR12   -12     /* General mishap */
     22#define ERR13   -13     /* Write protected */
     23#define ERR14   -14     /* Media change */
     24#define ERR15   -15     /* Unknown device */
     25#define ERR16   -16     /* Bad sectors */
     26#define ERR17   -17     /* Insert disk */
  • include/errno.h

    rc3aee8a rf7428b1  
    77 */
    88
    9 extern  int16_t errno;
     9#pragma once
    1010
    1111#define EPERM   1
  • include/fcntl.h

    rc3aee8a rf7428b1  
    66*/
    77
     8#pragma once
     9
    810/*
    911   =============================================================================
     
    1214   =============================================================================
    1315*/
    14 
    15 #ifndef O_RDONLY        /* only define these once */
    1616
    1717#define O_RDONLY        0x0000  /* Read-only value  */
     
    2828#define O_RAW           0x8000  /* Raw (binary) I/O flag for getc and putc */
    2929
    30 #endif
    31 
    3230/*
    3331   =============================================================================
  • include/fields.h

    rc3aee8a rf7428b1  
    55   =============================================================================
    66*/
     7
     8#pragma once
     9#include "stdint.h"
    710
    811#define MAXEBUF 80              /* maximum length of data in the edit buffer */
     
    3437                                /* box-hit function */
    3538};
    36 
    37 #ifndef FET_DEFS
    38 extern  int16_t ebflag;                 /* edit buffer setup flag */
    39 extern  int8_t  ebuf[MAXEBUF+1];        /* edit buffer */
    40 
    41 extern  struct  fet *curfet;            /* current fet table pointer */
    42 extern  struct  fet *cfetp, *infetp;    /* current and new fet entry pointers */
    43 #endif
  • include/fpu.h

    rc3aee8a rf7428b1  
    55   =============================================================================
    66*/
     7
     8#pragma once
    79
    810/* preprocessor functions */
  • include/fspars.h

    rc3aee8a rf7428b1  
    66*/
    77
    8 #ifndef NSTREAMS                /* ony define these once */
     8#pragma once
    99
    1010#define TBUFFER         1       /* non-zero to enable track buffering */
     
    1414#define MAXDFILE        8       /* maximum number of open DISK files */
    1515
    16 #define BUFSIZL 256                             /* buffer length -- longs */
    17 #define BUFSIZ  (sizeof (int32_t) * BUFSIZL)    /* buffer length -- chars */
     16#define BUFSIZL 256             /* buffer length -- longs */
     17#define BUFSIZ  (sizeof (int32_t) * BUFSIZL)
     18                                /* buffer length -- chars */
    1819
    1920#define BPSEC           512     /* bytes per disk sector */
     
    2425#define MAXDIRNT        224     /* maximum number of directory entries */
    2526
    26 typedef int8_t  *io_arg;        /* must be big enough to contain a pointer */
    27 
    28 #endif
     27typedef void    *io_arg;        /* must be big enough to contain a pointer */
  • include/glcbars.h

    rc3aee8a rf7428b1  
    33        Created:  1988-08-04  17:50:28
    44*/
     5
     6#pragma once
     7#include "stdint.h"
    58
    69int16_t BBase   = 9;            /* bottom line of bar graph */
  • include/glcdefs.h

    rc3aee8a rf7428b1  
    55   =============================================================================
    66*/
     7
     8#pragma once
    79
    810#define G_INIT          (int8_t)0x40
  • include/graphdef.h

    rc3aee8a rf7428b1  
    88*/
    99
     10#pragma once
     11
    1012#define CLR 0
    1113#define SET 1
     
    1416#define YPIX    350
    1517
    16 #define XCTR    XPIX/2
    17 #define YCTR    YPIX/2
     18#define XCTR    (XPIX / 2)
     19#define YCTR    (YPIX / 2)
    1820
    19 #define XMAX    XPIX-1
    20 #define YMAX    YPIX-1
     21#define XMAX    (XPIX - 1)
     22#define YMAX    (YPIX - 1)
    2123
    2224#define P_BLK   0               /* colors for external PROM color table */
  • include/hwdefs.h

    rc3aee8a rf7428b1  
    66*/
    77
     8#pragma once
     9#include "stdint.h"
     10
    811/* hardware addresses */
    912
    10 extern  int8_t  io_time[], io_lcd, io_ser, io_midi;
    11 extern  int8_t  io_disk, io_tone, io_leds, io_kbrd;
    12 extern  int8_t  lcd_a0, lcd_a1;
     13extern  uint16_t        io_fpu[];
     14extern  uint8_t         io_time[];
     15extern  uint8_t         io_lcd;
     16extern  uint8_t         io_ser;
     17extern  uint8_t         io_midi;
     18extern  uint8_t         io_disk;
     19extern  uint8_t         io_tone;
     20extern  uint8_t         io_leds;
     21extern  uint8_t         io_kbrd;
     22extern  uint8_t         lcd_a0;
     23extern  uint8_t         lcd_a1;
    1324
    14 extern  uint16_t        io_vreg[], io_vraw[], io_vram[], io_fpu[];
    15 
     25extern  uint16_t        io_vreg[];
     26extern  uint16_t        io_vraw[];
     27extern  uint16_t        io_vram[];
    1628
    1729/* video memory allocations */
    1830
    19 extern  uint16_t        v_regs[], v_odtab[][4], v_actab[];
    20 extern  uint16_t        v_ct0[], v_gt1[], v_score[], v_cgtab[];
     31extern  uint16_t        v_regs[];
     32extern  uint16_t        v_odtab[][4];
     33extern  uint16_t        v_actab[];
     34extern  uint16_t        v_ct0[];
     35extern  uint16_t        v_gt1[];
     36extern  uint16_t        v_score[];
     37extern  uint16_t        v_cgtab[];
    2138
    22 extern  uint16_t        v_curs0[], v_curs1[], v_curs2[], v_curs3[];
    23 extern  uint16_t        v_curs4[], v_curs5[], v_curs6[], v_curs7[];
    24 extern  uint16_t        v_tcur[], v_kbobj[], v_lnobj[];
    25 extern  uint16_t        v_win0[], v_cur[];
    26 
     39extern  uint16_t        v_curs0[];
     40extern  uint16_t        v_curs1[];
     41extern  uint16_t        v_curs2[];
     42extern  uint16_t        v_curs3[];
     43extern  uint16_t        v_curs4[];
     44extern  uint16_t        v_curs5[];
     45extern  uint16_t        v_curs6[];
     46extern  uint16_t        v_curs7[];
     47extern  uint16_t        v_tcur[];
     48extern  uint16_t        v_kbobj[];
     49extern  uint16_t        v_lnobj[];
     50extern  uint16_t        v_win0[];
     51extern  uint16_t        v_cur[];
    2752
    2853/* stuff in the depths of the bios */
    2954
    30 extern  int16_t fc_sw;
    31 
    32 extern  int32_t fc_val;
    33 
     55extern  int16_t         fc_sw;
     56extern  int32_t         fc_val;
  • include/instdsp.h

    rc3aee8a rf7428b1  
    33        instdsp.h -- instrument editor definitions
    44        Version 37 -- 1988-08-30 -- D.N. Lynx Crowe
    5 
    6         Uses definitions from:  "graphdef.h", "midas.h", "vsdd.h"
    75   =============================================================================
    86*/
     7
     8#pragma once
     9#include "stdint.h"
     10#include "midas.h"
    911
    1012/* --------------- Miscellaneous Instrument display definitions ------------- */
     
    1921#define TCPRI           15              /* text cursor priority */
    2022
    21 #define INSTFL          (V_RES3)        /* instrument display object flags */
    22 #define TCURFL          (V_RES3)        /* text cursor display flags */
     23#define INSTFL          V_RES3          /* instrument display object flags */
     24#define TCURFL          V_RES3          /* text cursor display flags */
    2325
    2426#define CBORD           9               /* color of border */
     
    197199        int16_t idhflag;                /* flags */
    198200
    199         int8_t  idhname[MAXIDLN+1];     /* instrument name */
    200         int8_t  idhcom1[MAXIDLN+1];     /* first line of comments */
    201         int8_t  idhcom2[MAXIDLN+1];     /* second line of comments */
    202         int8_t  idhcom3[MAXIDLN+1];     /* third line of comments */
     201        int8_t  idhname[MAXIDLN + 1];   /* instrument name */
     202        int8_t  idhcom1[MAXIDLN + 1];   /* first line of comments */
     203        int8_t  idhcom2[MAXIDLN + 1];   /* second line of comments */
     204        int8_t  idhcom3[MAXIDLN + 1];   /* third line of comments */
    203205
    204206        int8_t  idhcfg;                 /* configuration byte */
  • include/io.h

    rc3aee8a rf7428b1  
    66*/
    77
     8#pragma once
     9#include "stdint.h"
    810#include "fspars.h"             /* file system parameters */
    911
     
    3335        io_arg  d_arg;          /* argument to device driver */
    3436};
    35 
    36 #ifndef _FS_DEF_
    37 
    38 extern  struct channel chantab[MAXCHAN];        /* defined in fsinit.c */
    39 extern  int8_t  Wrkbuf[BPSEC];                  /* defined in fsinit.c */
    40 
    41 #endif
  • include/knmtab.h

    rc3aee8a rf7428b1  
    55   =============================================================================
    66*/
     7
     8#pragma once
     9#include "stdint.h"
    710
    811/*
  • include/lcdline.h

    rc3aee8a rf7428b1  
    66        Note:   LCD characters are 5x7 in a 6x8 envelope.
    77
    8                 The LCD charcter addresses start with (0,0) in the
     8                The LCD character addresses start with (0,0) in the
    99                upper left corner.  8 rows of 85 characters.
    1010
     
    1313   =============================================================================
    1414*/
     15
     16#pragma once
    1517
    1618#define RP_PL   153             /* "R/P" underscore - "P" X left */
     
    2527
    2628#define LAMP_XL 78
    27 #define LAMP_XR LAMP_XL+23
     29#define LAMP_XR (LAMP_XL + 23)
    2830#define LAMP_Y  54
    2931
    3032#define GOTO_XL 186
    31 #define GOTO_XR GOTO_XL+29
     33#define GOTO_XR (GOTO_XL + 29)
    3234#define GOTO_Y  54
    3335
    3436#define ASGN_XL 258
    35 #define ASGN_XR ASGN_XL+29
     37#define ASGN_XR (ASGN_XL + 29)
    3638#define ASGN_Y  54
    3739
    3840#define LOAD_XL 294
    39 #define LOAD_XR LOAD_XL+23
     41#define LOAD_XR (LOAD_XL + 23)
    4042#define LOAD_Y  54
  • include/libdsp.h

    rc3aee8a rf7428b1  
    77   =============================================================================
    88*/
     9
     10#pragma once
     11#include "stdint.h"
    912
    1013#define LIBROBJ         8               /* librarian display object number */
     
    117120#define LH_LEN          (sizeof (struct mlibhdr))
    118121
    119 #define OR_LEN1         ((int32_t)&idefs[0].idhwvaf[0]-(int32_t)&idefs[0].idhflag)
     122#define OR_LEN1         ((int32_t)&idefs[0].idhwvaf[0] - (int32_t)&idefs[0].idhflag)
    120123#define OR_LEN2         (2 * (NUMWPNT + NUMHARM))
    121 
    122 #ifndef M7CAT
    123 extern  struct  fcat    filecat[];
    124 #endif
  • include/macros.h

    rc3aee8a rf7428b1  
    88*/
    99
    10 #ifndef abs
     10#pragma once
     11
    1112#define abs(x)          ((x) < 0 ? -(x) : (x))
    12 #endif
     13#define sign(x, y)      ((x) < 0 ? -(y) : (y))
    1314
    14 #ifndef sign
    15 #define sign(x,y)       ((x) < 0 ? -(y) : (y))
    16 #endif
     15#define min(x, y)       ((x) > (y) ? (y) : (x))
     16#define max(x, y)       ((x) > (y) ? (x) : (y))
    1717
    18 #ifndef min
    19 #define min(x,y)        ((x) > (y) ? (y) : (x))
    20 #endif
    21 
    22 #ifndef max
    23 #define max(x,y)        ((x) > (y) ? (x) : (y))
    24 #endif
    25 
    26 #ifndef inrange
    27 #define inrange(var,lo,hi)      (((var) >= (lo)) && ((var) <= (hi)))
    28 #endif
     18#define inrange(var, lo, hi) \
     19                        (((var) >= (lo)) && ((var) <= (hi)))
  • include/menu.h

    rc3aee8a rf7428b1  
    55   =============================================================================
    66*/
     7
     8#pragma once
    79
    810#define MCURSOR         1       /* cursor color */
     
    2123#define MENUPRI         8
    2224
    23 #define MENUFL          (V_RES3)
    24 
     25#define MENUFL          V_RES3
  • include/midas.h

    rc3aee8a rf7428b1  
    33        midas.h -- MIDAS 700 global definitions
    44        Version 38 -- 1989-12-19 -- D.N. Lynx Crowe
    5 
    6         Uses definitions from:  "graphdef.h", "vsdd.h"
    75   =============================================================================
    86*/
    97
    10 typedef void    (*LPF)(int16_t _1, int16_t _2); /* pointer to a LCD panel function */
     8#pragma once
     9#include "stdint.h"
    1110
    12 #define SM_SCALE(x)     (((x) * 252) & 0x7FE0)
    13 #define ART_VAL(x)      (((((x)-5) > 100) ? 100 : (((x)-5) < 0 ? 0 : ((x)-5)))*320)
     11typedef void (*LPF)(int16_t _1, int16_t _2);    /* pointer to a LCD panel function */
    1412
    15 #define CWORD(x)        ((short)((x)|((x)<<4)|((x)<<8)|((x)<<12)))
     13#define SM_SCALE(x)     (((x) * 252) & 0x7fe0)
     14#define ART_VAL(x)      (((((x) - 5) > 100) ? 100 : (((x) - 5) < 0 ? 0 : ((x) - 5))) * 320)
     15
     16#define CWORD(x)        ((int16_t)((x) | ((x) << 4) | ((x) << 8) | ((x) << 12)))
    1617
    1718#define CTOX(C)         ((C) << 3)      /* column to x pixel value */
     
    2526#define GCURS   0                       /* graphic cursor object number */
    2627
    27 #define BIT2    (V_RES2)                /* graphics - 2 bit pixels */
    28 #define BIT3    (V_RES3)                /* graphics - 4 bit pixels */
    29 #define CHR2    (0)                     /* characters - no attributes */
     28#define BIT2    V_RES2                  /* graphics - 2 bit pixels */
     29#define BIT3    V_RES3                  /* graphics - 4 bit pixels */
     30#define CHR2    0                       /* characters - no attributes */
    3031#define CHR3    (V_FAD | V_HCR)         /* characters - full attributes */
    3132
    3233#define OBFL_00 (BIT3 | V_TDE)          /* cursor - arrow */
    3334
    34 #define LIBRFL          (V_RES3)        /* librarian display object flags */
     35#define LIBRFL          V_RES3          /* librarian display object flags */
    3536
    3637#define TTCURS          2               /* typewriter cursor object */
     
    102103#define M_LCLHLD        0x40    /* MIDI local hold status */
    103104#define M_CHNHLD        0x80    /* MIDI channel hold status */
    104 #define MKEYHELD        (M_CHNHLD | M_LCLHLD)   /* key held */
     105#define MKEYHELD        (M_CHNHLD | M_LCLHLD)
     106                                /* key held */
    105107
    106 #define PITCHMIN        320             /* C0 in 1/2 cents (160 cents) */
    107 #define PITCHMAX        21920           /* C9 in 1/2 cents (10960 cents) */
     108#define PITCHMIN        320     /* C0 in 1/2 cents (160 cents) */
     109#define PITCHMAX        21920   /* C9 in 1/2 cents (10960 cents) */
    108110
    109111#define GTAG1           0x0100
  • include/objdefs.h

    rc3aee8a rf7428b1  
    55   ============================================================================
    66*/
     7
     8#pragma once
     9#include "stdint.h"
    710
    811struct EXFILE {                 /* executable file header */
  • include/panel.h

    rc3aee8a rf7428b1  
    55   =============================================================================
    66*/
     7
     8#pragma once
    79
    810/* ----- performance key states (in pkctrl) ----- */
  • include/patch.h

    rc3aee8a rf7428b1  
    55   =============================================================================
    66*/
     7
     8#pragma once
     9#include "stdint.h"
    710
    811#define MAXPATCH        256             /* patch table size */
     
    1922#define NPTEQELS        256             /* number of trigger fifo entries */
    2023
    21 #define NPTEQLO         (NPTEQELS >> 2)         /* trigger fifo lo water */
    22 #define NPTEQHI         (NPTEQELS - NPTEQLO)    /* trigger fifo hi water */
     24#define NPTEQLO         (NPTEQELS >> 2) /* trigger fifo lo water */
     25#define NPTEQHI         (NPTEQELS - NPTEQLO)
     26                                        /* trigger fifo hi water */
    2327
    2428#define NULL_DEF        0x1200          /* blank definer code */
     
    6973        uint16_t        seqdat3;        /* action 3 data */
    7074};
    71 
    72 /*
    73 
    74 */
    75 
    76 /* Patch table references */
    77 
    78 #ifndef PATCHDEF
    79 extern  int8_t          stmptr[];       /* stimulus pointer table */
    80 extern  int8_t          defptr[];       /* definition pointer table */
    81 
    82 extern  struct patch    patches[];      /* patch table */
    83 
    84 extern  struct defent   defents[];      /* definition control table */
    85 #endif
    86 
    87 
    88 /* Sequence table references */
    89 
    90 #ifndef SEQDEFS
    91 extern  struct seqent   seqtab[];               /* sequence table */
    92 
    93 extern  uint16_t        seqflag[16];            /* sequence flags */
    94 extern  uint16_t        seqline[16];            /* sequence line */
    95 extern  uint16_t        seqstim[16];            /* sequence stimulus */
    96 extern  uint16_t        seqtime[16];            /* sequence timers */
    97 extern  uint16_t        sregval[16];            /* register values */
    98 extern  uint16_t        trstate[16];            /* trigger states */
    99 
    100 #endif
    10175
    10276/*
  • include/ptdisp.h

    rc3aee8a rf7428b1  
    66*/
    77
     8#pragma once
     9
    810#define OB08LOC         0               /* offset to headings */
    911#define OB09LOC         1024            /* offset to patches */
     
    1113#define OB11LOC         4096            /* offset to menu */
    1214
    13 #define PDFL_08         (CHR3)          /* heading object flags */
    14 #define PDFL_09         (CHR3)          /* patch entry object flags  */
    15 #define PDFL_10         (BIT3)          /* sequence status object flags */
    16 #define PDFL_11         (CHR3)          /* menu object flags */
     15#define PDFL_08         CHR3            /* heading object flags */
     16#define PDFL_09         CHR3            /* patch entry object flags  */
     17#define PDFL_10         BIT3            /* sequence status object flags */
     18#define PDFL_11         CHR3            /* menu object flags */
    1719
    1820#define PTBATR          0x00E2          /* colors for border */
  • include/ptoftab.h

    rc3aee8a rf7428b1  
     1#pragma once
     2#include "stdint.h"
    13
    24/* Pitch to Frequency */
  • include/ratio.h

    rc3aee8a rf7428b1  
     1#pragma once
     2#include "stdint.h"
    13
    24/* ratio.h -- generated:  1988-08-25  19:23:42 */
  • include/regs.h

    rc3aee8a rf7428b1  
    88   ============================================================================
    99*/
     10
     11#pragma once
     12#include "stdint.h"
    1013
    1114struct regs {
  • include/scdsp.h

    rc3aee8a rf7428b1  
    33        scdsp.h -- score display definitions
    44        Version 14 -- 1988-08-16 -- D.N. Lynx Crowe
    5 
    6         Uses definitions from "graphdef.h", "midas.h" and "vsdd.h"
    75   =============================================================================
    86*/
     7
     8#pragma once
    99
    1010#define SCOROBP 1                       /* score object priority */
     
    1313#define N_FLAT  1                       /* note control code for flats */
    1414
    15 #define OBFL_01 (BIT3)                  /* cursor - underline */
     15#define OBFL_01 BIT3                    /* cursor - underline */
    1616
    17 #define OBFL_08 (CHR3)                  /* character text */
     17#define OBFL_08 CHR3                    /* character text */
    1818
    19 #define OBFL_11 (BIT3)                  /* window */
     19#define OBFL_11 BIT3                    /* window */
    2020
    21 #define OBFL_13 (BIT3)                  /* keyboard */
     21#define OBFL_13 BIT3                    /* keyboard */
    2222#define OBFL_14 (BIT3 | V_TDE)          /* score */
    2323#define OBFL_15 (BIT3 | V_TDE)          /* lines */
  • include/sclock.h

    rc3aee8a rf7428b1  
    55   =============================================================================
    66*/
     7
     8#pragma once
    79
    810#define CK_LOCAL        0
  • include/score.h

    rc3aee8a rf7428b1  
    55   =============================================================================
    66*/
     7
     8#pragma once
     9#include "stdint.h"
    710
    811#define MAX_SE          32768L  /* number of longs for score storage */
     
    7073/* constant definitions */
    7174
    72 #define E_NULL  (struct s_entry *)0L
     75#define E_NULL          ((struct s_entry *)0L)
    7376
    7477#define E_SIZE1         5       /* event size 1 -- 5 longs -- 20 bytes */
  • include/scwheel.h

    rc3aee8a rf7428b1  
    55   =============================================================================
    66*/
     7
     8#pragma once
    79
    810#define NSWFIFO         100             /* scroll wheel FIFO size */
  • include/secops.h

    rc3aee8a rf7428b1  
    55   =============================================================================
    66*/
     7
     8#pragma once
    79
    810#define SOP_NUL         0       /* No section operation pending */
  • include/setjmp.h

    rc3aee8a rf7428b1  
    1414   =============================================================================
    1515*/
     16
     17#pragma once
     18#include "stdint.h"
    1619
    1720struct  JMP_BUF {       /* setjmp() / longjmp() environment structure */
  • include/slice.h

    rc3aee8a rf7428b1  
    55   =============================================================================
    66*/
     7
     8#pragma once
     9#include "stdint.h"
    710
    811#define MAXFSL  256                     /* size of the gdsel free list */
  • include/smdefs.h

    rc3aee8a rf7428b1  
    55   =============================================================================
    66*/
     7
     8#pragma once
     9#include "stdint.h"
    710
    811struct  sment {
  • include/stdarg.h

    rc3aee8a rf7428b1  
    66*/
    77
     8#pragma once
     9#include "stdint.h"
     10
    811typedef int8_t  *va_list;
    912
     
    1114#define va_arg(ap, type)        (ap += sizeof(type), ap[-1])
    1215#define va_end(ap)
    13 
  • include/stddefs.h

    rc3aee8a rf7428b1  
    33        stddefs.h -- Standard definitions for C programs
    44        Version 12 -- 1987-12-15 -- D.N. Lynx Crowe
    5 
    6         Must follow stdio.h if stdio.h is used as both define:
    7 
    8                 NULL, EOF.
    9 
    10         Must follow define.h on the Atari if define.h is used as both define:
    11 
    12                 NULL, EOF, FOREVER, TRUE, FALSE, FAILURE, SUCCESS,
    13                 YES, NO, EOS, NIL.
    14 
    155        Released to Public Domain - 1987-06 - D.N. Lynx Crowe
    166   ============================================================================
    177*/
    188
    19 #ifndef STD_DEFS                /* so we only define these once */
    20 
    21 #define STD_DEFS        1
     9#pragma once
     10#include "stdint.h"
    2211
    2312/* relational operators */
     
    3625#define OR      ||
    3726
    38 /* infinite loop constructs */
    39 
    40 #ifndef FOREVER
    41 #define FOREVER         for(;;)
    42 #endif
    43 
    44 #ifndef REPEAT
    45 #define REPEAT          for(;;)
    46 #endif
    47 
    4827/*
    4928
    5029*/
    5130
    52 /* various terminators */
    53 
    54 #ifndef EOF
    55 #define EOF             (-1)
    56 #endif
    57 
    58 #ifndef EOS
    59 #define EOS             '\0'
    60 #endif
    61 
    62 #ifndef NIL
    63 #define NIL             0
    64 #endif
    65 
    6631/* manifest constants for function return and flag values */
    6732
    68 #ifndef NULL
    69 #define NULL            0
    70 #endif
     33#define FAILURE -1                      /*      Function failure return val */
     34#define SUCCESS 0                       /*      Function success return val */
    7135
    72 #ifndef YES
    73 #define YES             1
    74 #endif
     36#define FOREVER for (;;)                /*      Infinite loop declaration   */
    7537
    76 #ifndef NO
    77 #define NO              0
    78 #endif
     38#define NULL    0                       /*      Null pointer value          */
    7939
    80 #ifndef FALSE
    81 #define FALSE           0
    82 #endif
    83 
    84 #ifndef TRUE
    85 #define TRUE            1
    86 #endif
    87 
    88 #ifndef SUCCESS
    89 #define SUCCESS         0
    90 #endif
    91 
    92 #ifndef FAILURE
    93 #define FAILURE         (-1)
    94 #endif
     40#define TRUE    1                       /*      Function TRUE  value        */
     41#define FALSE   0                       /*      Function FALSE value        */
    9542
    9643/* BOOL type definition for flag variables */
    9744
    9845typedef int8_t  BOOL;
    99 
    100 #endif
  • include/stdio.h

    rc3aee8a rf7428b1  
    66*/
    77
     8#pragma once
     9#include "stdint.h"
    810#include "fspars.h"             /* file system parameters */
    911
    10 #define NULL    0
    1112#define EOF     -1
    1213
     
    3334} FILE;
    3435
    35 #ifndef _FS_DEF_
    36 
    37 extern  FILE    Cbuffs[NSTREAMS];               /* table of FILE structures */
    38 extern  int8_t  *Stdbufs;                       /* free list of buffers */
    39 extern  int32_t Stdbuf[MAXDFILE][BUFSIZL];      /* buffers */
    40 
    41 #endif
    42 
    43 extern  int32_t ftell(FILE *fp);
    44 extern  int8_t  *gets(int8_t *line);
    45 extern  int8_t  *fgets(int8_t *s, int16_t n, FILE *fp);
    46 extern  FILE    *fopen(int8_t *name, int8_t *mode);
    47 extern  FILE    *fopena(int8_t *name, int8_t *mode);
    48 extern  FILE    *fopenb(int8_t *name, int8_t *mode);
    49 extern  int16_t fread(int8_t *buffer, uint16_t size, int16_t number, FILE *stream);
    50 extern  int16_t fwrite(int8_t *buffer, int16_t size, int16_t number, FILE *stream);
    51 extern  int16_t fseek(FILE *fp, int32_t pos, int16_t mode);
    52 extern  int16_t fflush(FILE *ptr);
    53 extern  int16_t fclose(FILE *ptr);
    54 
    55 extern  int32_t printf(int8_t *fmt, ...);
    56 extern  int32_t sprintf(int8_t *str, int8_t *fmt, ...);
    57 
    58 extern  int16_t getc(FILE *ptr);
    59 extern  int16_t putc(int16_t c, FILE *ptr);
    60 extern  int16_t ungetc(int16_t c, FILE *ptr);
    61 
    6236#define stdin   (&Cbuffs[0])
    6337#define stdout  (&Cbuffs[1])
     
    7044#define clearerr(fp)    ((fp)->_flags &= ~(_IOERR | _EOF))
    7145#define fileno(fp)      ((fp)->_unit)
    72 
    73 #ifndef O_RDONLY        /* only define these once */
    7446
    7547#define O_RDONLY        0x0000  /* Read-only value  */
     
    8557
    8658#define O_RAW           0x8000  /* Raw (binary) I/O flag for getc and putc */
    87 
    88 #endif
  • include/swrtab.h

    rc3aee8a rf7428b1  
     1#pragma once
     2#include "stdint.h"
    13
    24int32_t swrtab[128] = { /* scroll rates */
  • include/timers.h

    rc3aee8a rf7428b1  
    55   =============================================================================
    66*/
     7
     8#pragma once
    79
    810#define NTIMERS         8               /* number of timers */
     
    1416#define MSTIMER         4               /* mouse movement timer */
    1517#define MUTIMER         5               /* mouse buffer flush timer */
    16 
    17 extern  int16_t timers[NTIMERS];        /* timer array */
    18 
  • include/tundsp.h

    rc3aee8a rf7428b1  
    88*/
    99
     10#pragma once
     11
    1012#define TUNOBJ          8               /* display object number */
    1113#define TUNPRI          8               /* display object priority */
    1214
    13 #define TUNFL           (V_RES3)        /* display object flags */
     15#define TUNFL           V_RES3          /* display object flags */
    1416
    1517#define TDCURX          CTOX(61)        /* initial cursor x location */
     
    4446#define TCBBX06         6               /* background color */
    4547#define TCBBX07         4               /* background color */
    46 
  • include/uartio.h

    rc3aee8a rf7428b1  
    55   =============================================================================
    66*/
     7
     8#pragma once
    79
    810#define PRT_DEV         0
  • include/vsdd.h

    rc3aee8a rf7428b1  
    77*/
    88
    9 #define VSDD    (unsigned int *)0x200000
     9#pragma once
     10#include "stdint.h"
     11
     12#define VSDD    ((uint16_t *)0x200000)
    1013
    1114#define V_CHITE 12              /* Character height */
     
    6972                        odtw1;  /* Object descriptor table word 1 */
    7073};
    71 
  • include/wdcurtb.h

    rc3aee8a rf7428b1  
    55   =============================================================================
    66*/
     7
     8#pragma once
     9#include "stdint.h"
    710
    811int16_t wdcurtb[] = {
  • include/wordq.h

    rc3aee8a rf7428b1  
    55   ============================================================================
    66*/
     7
     8#pragma once
     9#include "stdint.h"
    710
    811struct  wordq {
     
    1619        uint16_t        *qbuf;          /* base of queue */
    1720};
    18 
    19 #ifndef WORDQHDR
    20 extern  int16_t putwq(struct wordq *qp, uint16_t c);
    21 extern  int16_t getwq(struct wordq *qp, uint16_t *p);
    22 extern  uint16_t        setwq(struct wordq *qp, uint16_t *qadr, uint16_t qsiz, uint16_t hi, uint16_t lo);
    23 #endif
    24 
  • include/wsdsp.h

    rc3aee8a rf7428b1  
    1010*/
    1111
     12#pragma once
     13#include "stdint.h"
     14#include "midas.h"
     15
    1216struct  wstbl   {               /* waveshape table library entry */
    1317
     
    2024#define WAVEPRI         8               /* waveshape display object priority */
    2125
    22 #define WAVEFL          (V_RES3)        /* waveshape display object flags */
     26#define WAVEFL          V_RES3          /* waveshape display object flags */
    2327
    2428#define WCURX           256             /* initial cursor x location */
Note: See TracChangeset for help on using the changeset viewer.