Annotation of researchv9/jerq/include/setup.h, revision 1.1

1.1     ! root        1: /* Here is a bunch of stuff used for setup mode */
        !             2: #define BRAM ((struct blop *) 0x600000)        /* address of battery backed ram */
        !             3: 
        !             4: #define BRKKEY 0x80
        !             5: #define FUNC1KEY       0x82
        !             6: #define FUNC2KEY       0x83
        !             7: #define FUNC3KEY       0x84
        !             8: #define FUNC4KEY       0x85
        !             9: #define FUNC5KEY       0x86
        !            10: #define FUNC6KEY       0x87
        !            11: #define FUNC7KEY       0x88
        !            12: #define FUNC8KEY       0x89
        !            13: 
        !            14: #define BACKSPCKEY     '\b'
        !            15: #define SPACEKEY       ' '
        !            16: #define SETUPKEY       0xae
        !            17: #define TABKEY         '\t'
        !            18: 
        !            19: 
        !            20: #define BAUD   0
        !            21: #define RETKEY 1
        !            22: #define NEWLINE        2
        !            23: #define DUPLEX 3
        !            24: #define KEYTONE 4
        !            25: #define SCREENCOLOR    5
        !            26: #define PFKEYS 6
        !            27: #define NUMSETUPS      7
        !            28: #define NUMOPTS        6
        !            29: 
        !            30: #define CHECKSUM 2044
        !            31: 
        !            32: #define NUMBAUD                6
        !            33: #define NUMRETKEYS     3
        !            34: #define NUMNEWLINE     2
        !            35: #define NUMDUPLEX      2
        !            36: #define NUMKEYTONE     2
        !            37: #define NUMSCREENCOLOR 2
        !            38: #define NUMPFKEYS      8
        !            39: #define PFKEYSIZE      50
        !            40: 
        !            41: #define VALBAUD                BRAM->opts.opt_array[BAUD].byte
        !            42: #define VALRETKEY      BRAM->opts.opt_array[RETKEY].byte
        !            43: #define VALNEWLINE     BRAM->opts.opt_array[NEWLINE].byte
        !            44: #define VALDUPLEX      BRAM->opts.opt_array[DUPLEX].byte
        !            45: #define VALKEYTONE     BRAM->opts.opt_array[KEYTONE].byte
        !            46: #define VALSCREENCOLOR BRAM->opts.opt_array[SCREENCOLOR].byte
        !            47: #define VALCHECK1      BRAM->opts.opt_array[CHECKSUM].byte
        !            48: #define VALCHECK2      BRAM->opts.opt_array[CHECKSUM+1].byte
        !            49: #define VALCHECK3      BRAM->opts.opt_array[CHECKSUM+2].byte
        !            50: #define VALCHECK4      BRAM->opts.opt_array[CHECKSUM+3].byte
        !            51: #define VALCAPS                BRAM->capslock.byte
        !            52: #define VALNUM         BRAM->numlock.byte
        !            53: #define VALDWNLDFLAG   BRAM->dwnldflag.byte
        !            54: #define VALMAXADDR     BRAM->bmaxaddr.byte
        !            55: 
        !            56: struct bram_mem {
        !            57:        int:16;         unsigned char byte;
        !            58:        int:8;
        !            59:        };
        !            60: struct blop {
        !            61:        union blip{
        !            62:                struct vals {
        !            63:                        int:16;         unsigned char baud;
        !            64:                        int:8;
        !            65:                        int:16;         unsigned char retkey;
        !            66:                        int:8;
        !            67:                        int:16;         unsigned char newline;
        !            68:                        int:8;
        !            69:                        int:16;         unsigned char duplex;
        !            70:                        int:8;
        !            71:                        int:16;         unsigned char keytone;
        !            72:                        int:8;
        !            73:                        int:16;         unsigned char screencolor;
        !            74:                        int:8;
        !            75:                        } individ;
        !            76:                struct bram_mem opt_array[NUMOPTS];
        !            77:                } opts;
        !            78:        struct bram_mem pfkeys[NUMPFKEYS][PFKEYSIZE+1]; /* can init partly? */
        !            79:        struct bram_mem numlock;                /* num lock flag */
        !            80:        struct bram_mem capslock;               /* caps lock flag */
        !            81:        struct bram_mem dwnldflag;              /* 0 = stand-alone, 1=program loaded */
        !            82:        struct bram_mem bmaxaddr;               /* 0 = 256K Mem, 1 = 1Meg */
        !            83:        } ;
        !            84: #define SETUP_HEADINGS "SPEED     CR DEF    NL DEF    DUPLEX    TONE      BACKGROUND  (Hit pfkey to edit value)"
        !            85: 
        !            86:        /* next come the displayed values... all default values are first */
        !            87: #ifdef SETUP_OWN
        !            88: long maxaddr[2] = {0x740000, 0x800000}; /* last valid memory address */
        !            89: /*short curpos[NUMSETUPS] = {0, 10, 20, 30, 40, 52, 61};       /* cursor positions:  */
        !            90:                                                /* if this simple use formula */
        !            91: 
        !            92: char baud_speeds[NUMBAUD] = { (char) BD1200BPS, (char) BD2400BPS, (char) BD4800BPS,
        !            93:                             (char) BD9600BPS, (char) BD19200BPS, (char) BD300BPS};
        !            94: char *val_baud[NUMBAUD] = {" 1200"," 2400"," 4800"," 9600","19200","  300"};
        !            95: char *val_retkey[NUMRETKEYS] = { "   CR", "   LF", "CR/LF" };
        !            96: char *val_newline[NUMNEWLINE] = { "INDEX", "  NL " };
        !            97: char *val_duplex[NUMDUPLEX] = { " FULL", " HALF" };
        !            98: char *val_keytone[NUMKEYTONE] = { " ON", "OFF" };
        !            99: char *val_screencolor[NUMSCREENCOLOR] = { " DARK", "LIGHT"};
        !           100: 
        !           101: char **val_indx[NUMOPTS]  = { val_baud, val_retkey,  val_newline, val_duplex,
        !           102:                                 val_keytone,  val_screencolor } ;
        !           103: 
        !           104: char val_maxes[NUMOPTS] = { (char) NUMBAUD, (char) NUMRETKEYS,
        !           105:                                (char) NUMNEWLINE, (char) NUMDUPLEX,
        !           106:                                (char) NUMKEYTONE, (char) NUMSCREENCOLOR };
        !           107: #else
        !           108: extern char baud_speeds[];
        !           109: extern char *val_baud[];
        !           110: extern char *val_retkey[];
        !           111: extern char *val_newline[];
        !           112: extern char *val_duplex[];
        !           113: extern char *val_keytone[];
        !           114: extern char *val_screencolor[];
        !           115: extern char *val_pfkeys[];
        !           116: extern char **val_indx[];
        !           117: extern char val_maxes[];
        !           118: /*extern short curpos[];*/
        !           119: extern long maxaddr[];
        !           120: #endif
        !           121: 
        !           122: /* QUESTION???? How do we determine factory default?  Is bram pre-setup, or
        !           123:    somehow initially invalid?  How do we determine this?  write a "im ready"
        !           124:    pattern somewhere in cmos?  */
        !           125: 
        !           126: /* Font properties */
        !           127: #define        CW      9       /* width of a character */
        !           128: #define        NS      14      /* newline size; height of a character */
        !           129: 
        !           130: #define        XMARGIN 3       /* inset from border */
        !           131: #define        YMARGIN 3

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.