Changeset 2340de6 in buchla-68k
- Timestamp:
- 07/10/2017 09:06:56 PM (7 years ago)
- Branches:
- master
- Children:
- 4aa78b2
- Parents:
- 526a993
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
libcio/filesys.x
r526a993 r2340de6 8 8 9 9 #include "biosdefs.h" 10 #include "fspars.h" 10 11 #include "stdint.h" 11 12 … … 24 25 extern int16_t _fatmod; 25 26 extern struct bpb *_thebpb; 26 extern struct dirent _thedir[ 224];27 extern uint16_t _thefat[ 7 * 256];27 extern struct dirent _thedir[MAXDIRNT]; 28 extern uint16_t _thefat[MAXFAT * WDPSEC]; 28 29 29 30 /* -
libcio/fsinit.x
r526a993 r2340de6 19 19 */ 20 20 21 extern FILE Cbuffs[ 11];22 extern int32_t Stdbuf[ 8][256];21 extern FILE Cbuffs[NSTREAMS]; 22 extern int32_t Stdbuf[MAXDFILE][BUFSIZL]; 23 23 extern int8_t *Stdbufs; 24 extern int8_t Wrkbuf[ 512];24 extern int8_t Wrkbuf[BPSEC]; 25 25 extern int16_t _b_sect; 26 26 extern int16_t _b_side; … … 28 28 extern int16_t _b_trak; 29 29 extern int16_t _b_tsec; 30 extern struct fcb _fcbtab[ 8];31 extern struct channel chantab[ 11];30 extern struct fcb _fcbtab[MAXDFILE]; 31 extern struct channel chantab[MAXCHAN]; 32 32 33 33 /* -
misc/gen-x.py
r526a993 r2340de6 3 3 from sys import stdout 4 4 from pycparser import c_ast, parse_file, c_generator 5 from re import escape, subn, search 5 6 6 7 cross_gcc = "/opt/cross-m68k/bin/m68k-none-elf-gcc" … … 77 78 def get_typs(self): 78 79 return self.typs 80 81 def fix(text, path): 82 with open(path, "r") as f: 83 cont = f.read() 84 85 (pat, n) = subn(r"\[[0-9]+\]", "[@]", text[7:]) 86 87 if n == 0: 88 return text 89 90 rex = escape(pat). \ 91 replace("\@", "([0-9A-Z_]+)"). \ 92 replace("\ ", "[\t\n ]+") 93 94 m = search(rex, cont) 95 96 if not m: 97 raise Exception("error while matching {}".format(re)) 98 99 pats = pat.split("@") 100 vals = m.groups() 101 102 if len(pats) != len(vals) + 1: 103 raise Exception("length mismatch: {} vs. {}". \ 104 format(len(pats), len(vals))) 105 106 out = pats[0] 107 pats = pats[1:] 108 109 while len(pats) > 0: 110 out += vals[0] + pats[0] 111 vals = vals[1:] 112 pats = pats[1:] 113 114 return "extern " + out 79 115 80 116 gen = c_generator.CGenerator() … … 130 166 decl.init = None 131 167 132 toks = gen.visit(decl).split(" ") 168 text = gen.visit(decl) 169 text = fix(text, decl.coord.file) 170 171 toks = text.split(" ") 133 172 alig = "" 134 173 -
misc/proto.x
r526a993 r2340de6 11 11 #include "slice.h" 12 12 #include "stdint.h" 13 #include "timers.h" 13 14 #include "vsdd.h" 14 15 … … 42 43 extern void (*pulse1)(void); 43 44 extern void (*pulse2)(void); 44 extern int16_t timers[ 8];45 extern int16_t timers[NTIMERS]; 45 46 extern int32_t uldivr; 46 47 extern uint16_t vi_sadr; -
ram/asgdsp.c
r526a993 r2340de6 20 20 21 21 #define AUX_BIT 0x02 /* aux control bit in PSG port B */ 22 23 #define AK_WIDTH 115 /* width, in words, of keyboard icon */24 22 25 23 /* 4 bit pixel patterns */ -
ram/asgdsp.x
r526a993 r2340de6 9 9 #include "stdint.h" 10 10 11 #define AK_WIDTH 115 /* width, in words, of keyboard icon */ 12 11 13 /* 12 14 ============================================================================= … … 15 17 */ 16 18 17 extern uint16_t asgkbbt[ 115];19 extern uint16_t asgkbbt[AK_WIDTH]; 18 20 extern int16_t asgkble[88]; 19 extern uint16_t asgkbtp[ 115];21 extern uint16_t asgkbtp[AK_WIDTH]; 20 22 extern int16_t asgpal[16][3]; 21 23 extern int8_t *asgsrc[]; -
ram/chksec.x
r526a993 r2340de6 16 16 */ 17 17 18 extern int8_t cmgtags[ 25];19 extern int8_t cmgtype[ 25];20 extern int16_t cmslens[ 25];21 extern int16_t ehdlist[ 25];18 extern int8_t cmgtags[N_ETYPES]; 19 extern int8_t cmgtype[N_ETYPES]; 20 extern int16_t cmslens[N_ETYPES]; 21 extern int16_t ehdlist[N_ETYPES]; 22 22 23 23 /* -
ram/cminit.c
r526a993 r2340de6 10 10 11 11 #include "ram.h" 12 13 #define CM_MXSTR 257 /* maximum parser string result length */14 12 15 13 #define CM_DBLK if (!QQanch) while (*QQip EQ ' ') ++QQip -
ram/cminit.x
r526a993 r2340de6 8 8 9 9 #include "stdint.h" 10 11 #define CM_MXSTR 257 /* maximum parser string result length */ 10 12 11 13 /* … … 23 25 extern int32_t QQnum; 24 26 extern int8_t *QQop; 25 extern int8_t QQstr[ 257];27 extern int8_t QQstr[CM_MXSTR]; 26 28 extern int16_t QQsw; 27 29 -
ram/configs.h
r526a993 r2340de6 2 2 3 3 #include "stdint.h" 4 5 #define MAXCFG 126 4 7 5 /* Configuration 0 */ … … 733 731 }; 734 732 735 int8_t *cfgptr[ MAXCFG] = {733 int8_t *cfgptr[12] = { 736 734 737 735 (int8_t *)cfg_00, (int8_t *)cfg_01, (int8_t *)cfg_02, (int8_t *)cfg_03, -
ram/im700.x
r526a993 r2340de6 11 11 #include "instdsp.h" 12 12 #include "libdsp.h" 13 #include "midas.h" 13 14 #include "objdefs.h" 14 15 #include "score.h" … … 38 39 extern int16_t asgmod; 39 40 extern uint16_t *asgob; 40 extern struct asgent asgtab[ 100];41 extern struct asgent asgtab[NASGS]; 41 42 extern int16_t asig; 42 43 extern int16_t asmode; … … 113 114 extern int16_t ext_cv4; 114 115 extern int16_t ext_mod; 115 extern struct fcat filecat[ 20];116 extern struct fcat filecat[FCMAX]; 116 117 extern struct gdsel *gdfsep; 117 extern struct gdsel gdfsl[ 256];118 extern struct gdsel *gdstbc[ 17];119 extern struct gdsel *gdstbn[ 17];120 extern struct gdsel *gdstbp[ 17];118 extern struct gdsel gdfsl[MAXFSL]; 119 extern struct gdsel *gdstbc[NGDSEL]; 120 extern struct gdsel *gdstbn[NGDSEL]; 121 extern struct gdsel *gdstbp[NGDSEL]; 121 122 extern int16_t gomode; 122 123 extern int16_t grp2prt[12][2]; … … 127 128 extern int16_t hitcx; 128 129 extern int16_t hitcy; 129 extern struct s_entry *hplist[ 20][12];130 extern struct s_entry *hplist[N_SCORES][N_TYPES]; 130 131 extern int16_t idcfsw; 131 extern struct instdef idefs[ 41];132 extern struct instdef idefs[NINST]; 132 133 extern int16_t idimsw; 133 134 extern int16_t idintmp; … … 172 173 extern int16_t lseqsw; 173 174 extern int16_t lstbgnc; 174 extern struct n_entry *lstbgns[ 48];175 extern struct n_entry *lstbgns[NLSTENTS]; 175 176 extern int16_t lstendc; 176 extern struct n_entry *lstends[ 48];177 extern struct n_entry *lstends[NLSTENTS]; 177 178 extern int16_t lstflag; 178 179 extern int16_t lstrsw; … … 197 198 extern struct nevent *nefree; 198 199 extern struct nevent *nelist; 199 extern struct nevent nevents[ 32];200 extern struct nevent nevents[NNEVTS]; 200 201 extern int16_t newflag; 201 202 extern int16_t nkdown; … … 241 242 extern int16_t pecase; 242 243 extern struct s_entry *peg; 243 extern struct pflent pfents[ 336];244 extern struct pflent pfents[NPFENTS]; 244 245 extern struct pflent *pflist; 245 246 extern struct pflent *pfqhdr; … … 258 259 extern int16_t sbase; 259 260 extern int16_t scmctl; 260 extern struct s_entry *scores[ 20];261 extern struct s_entry *scores[N_SCORES]; 261 262 extern struct s_entry *scp; 262 263 extern uint16_t scrl; … … 268 269 extern int16_t sdmrow; 269 270 extern int16_t se; 270 extern struct s_entry *seclist[ 20][20];271 extern struct s_entry *seclist[N_SCORES][N_SECTS]; 271 272 extern int16_t secop; 272 273 extern int16_t secopok; … … 275 276 extern int16_t sharp; 276 277 extern int16_t sigtab[128][2]; 277 extern struct scndx sindex[ 20];278 extern struct scndx sindex[N_SCORES]; 278 279 extern struct s_entry *size1; 279 280 extern struct s_entry *size2; … … 291 292 extern int16_t stepint; 292 293 extern int16_t stepwgt; 293 extern struct s_time stimes[ 20][20];294 extern struct s_time stimes[N_SCORES][N_SECTS]; 294 295 extern int16_t subj; 295 296 extern int16_t submenu; … … 332 333 extern int16_t ttsel3; 333 334 extern int16_t tuneval; 334 extern int16_t tunlib[ 10][128];335 extern int16_t tunlib[NTUNS][128]; 335 336 extern int16_t tunmod; 336 337 extern uint16_t *tunob; … … 345 346 extern int16_t tylast; 346 347 extern int16_t tystop; 347 extern struct valent valents[ 12 << 4];348 extern struct valent valents[NGPSRS]; 348 349 extern int16_t varmode[8][16]; 349 350 extern struct instdef vbufs[12]; … … 387 388 extern int16_t wpntsv; 388 389 extern int16_t wshmax; 389 extern struct wstbl wslib[ 20];390 extern struct wstbl wslib[NUMWAVS]; 390 391 extern int16_t wsnmod[12][2]; 391 392 extern int16_t wvlast; -
ram/initi.x
r526a993 r2340de6 8 8 9 9 #include "instdsp.h" 10 #include "midas.h" 10 11 #include "stdint.h" 11 12 … … 18 19 extern uint16_t dfltins[]; 19 20 extern int16_t expbit[16]; 20 extern int16_t finival[ 13];21 extern int16_t finival[NFINST]; 21 22 extern int16_t ptoftab[]; 22 23 -
ram/instdsp.x
r526a993 r2340de6 7 7 #pragma once 8 8 9 #include "midas.h" 9 10 #include "stdint.h" 10 11 … … 15 16 */ 16 17 17 extern int16_t fnoff[ 13];18 extern int16_t fnoff[NFINST]; 18 19 extern int16_t idbox[][8]; 19 20 extern int8_t *idbxlbl[]; -
ram/ptdisp.x
r526a993 r2340de6 22 22 extern uint16_t seqline[16]; 23 23 extern uint16_t seqstim[16]; 24 extern struct seqent seqtab[ 1000];24 extern struct seqent seqtab[NSLINES]; 25 25 extern uint16_t seqtime[16]; 26 26 extern uint16_t sregval[16]; -
ram/scwrite.x
r526a993 r2340de6 7 7 #pragma once 8 8 9 #include "score.h" 9 10 #include "stdint.h" 10 11 #include "stdio.h" … … 17 18 18 19 extern int32_t m1con; 19 extern int16_t scsizes[ 25][2];20 extern int16_t scsizes[N_ETYPES][2]; 20 21 21 22 /* -
ram/sedump.x
r526a993 r2340de6 23 23 extern int16_t SL_Flag; 24 24 extern int8_t *actname[]; 25 extern int8_t *evkinds[ 25];26 extern int8_t *hpname[ 12];25 extern int8_t *evkinds[N_ETYPES]; 26 extern int8_t *hpname[N_TYPES]; 27 27 extern int8_t *srcname[]; 28 28 extern int8_t *var_lbl[6]; -
ram/showcfg.c
r526a993 r2340de6 7 7 8 8 #include "ram.h" 9 10 #define MAXPAT 3511 9 12 10 #include "configs.h" -
ram/showcfg.x
r526a993 r2340de6 9 9 #include "fields.h" 10 10 #include "stdint.h" 11 12 #define MAXPAT 35 11 13 12 14 /* … … 32 34 extern struct fet id_fet3[]; 33 35 extern struct selbox idmbox[]; 34 extern uint16_t pat[ 35][16];35 extern int16_t patctab[ 35];36 extern uint16_t pat[MAXPAT][16]; 37 extern int16_t patctab[MAXPAT]; 36 38 37 39 /* -
ram/stmproc.x
r526a993 r2340de6 17 17 */ 18 18 19 extern struct defent defents[ 256];20 extern int8_t defptr[ 5120];19 extern struct defent defents[RAWDEFS]; 20 extern int8_t defptr[NDEFSTMS]; 21 21 extern int8_t dmatch[]; 22 22 extern uint16_t dpecpos; … … 24 24 extern uint16_t dpesucc; 25 25 extern uint16_t dtfree; 26 extern struct patch patches[ 256];26 extern struct patch patches[MAXPATCH]; 27 27 extern int8_t ptdsbuf[50]; 28 28 extern struct wordq ptefifo; 29 extern uint16_t ptewrds[ 256];29 extern uint16_t ptewrds[NPTEQELS]; 30 30 extern uint16_t ptfree; 31 extern int8_t stmptr[ 5120];31 extern int8_t stmptr[NDEFSTMS]; 32 32 33 33 /* -
ram/swinit.c
r526a993 r2340de6 110 110 int8_t ebuf[MAXEBUF+1]; /* edit data entry buffer */ 111 111 int8_t errbuf[65]; /* error message build area */ 112 int8_t idbuf[ 91]; /* display format conversion work area */112 int8_t idbuf[65]; /* display format conversion work area */ 113 113 int8_t keystat[24]; /* front panel key status */ 114 114 int8_t ldcmnt[38]; /* comment field */ -
ram/swinit.x
r526a993 r2340de6 7 7 #pragma once 8 8 9 #include "fields.h" 10 #include "libdsp.h" 9 11 #include "midas.h" 12 #include "score.h" 13 #include "scwheel.h" 10 14 #include "stddefs.h" 11 15 #include "stdint.h" … … 45 49 extern int32_t dvwork; 46 50 extern void (*e_key)(void); 47 extern int8_t ebuf[ 80 +1];51 extern int8_t ebuf[MAXEBUF+1]; 48 52 extern int8_t errbuf[65]; 49 53 extern int32_t frags; … … 56 60 extern int16_t grptmap[12]; 57 61 extern int16_t gtctab[12]; 58 extern int32_t hwave[ 256];59 extern int8_t idbuf[ 91];62 extern int32_t hwave[NUMWPCAL]; 63 extern int8_t idbuf[65]; 60 64 extern int16_t ins2grp[12]; 61 65 extern int16_t instmod[12]; … … 72 76 extern int8_t ldcmnt[38]; 73 77 extern int8_t ldfile[9]; 74 extern int16_t ldmap[ 20];78 extern int16_t ldmap[N_SCORES]; 75 79 extern int8_t ldmsg1[65]; 76 80 extern int8_t ldmsg2[65]; … … 79 83 extern int8_t *lmln23; 80 84 extern int8_t *lmln24; 81 extern int8_t loadedc[ 8][37];82 extern int8_t loadedf[ 8][8];85 extern int8_t loadedc[NLTYPES][37]; 86 extern int8_t loadedf[NLTYPES][8]; 83 87 extern void (*m_key)(void); 84 88 extern int8_t masens[3]; 85 89 extern int16_t mctlnum[4]; 86 extern int8_t mctlval[ 6144];90 extern int8_t mctlval[NCTRLS]; 87 91 extern int8_t mdbyte[3]; 88 92 extern int16_t mpbend[48]; … … 91 95 extern int16_t msmstv[3]; 92 96 extern int32_t ndbytes; 93 extern int32_t nlpersc[ 20];97 extern int32_t nlpersc[N_SCORES]; 94 98 extern int16_t (*not_fld)(int16_t k); 95 99 extern int32_t noteoff; … … 98 102 extern int32_t noteval; 99 103 extern int32_t nrest; 100 extern int16_t offsets[ 256];104 extern int16_t offsets[NUMWPCAL]; 101 105 extern void (*olddkey)(int16_t k); 102 106 extern void (*oldekey)(void); … … 106 110 extern void (*oldxkey)(void); 107 111 extern void (*premove)(void); 108 extern int16_t prstab[ 6144];112 extern int16_t prstab[NTRIGS]; 109 113 extern int32_t *pspool; 110 114 extern void (*pstmove)(void); … … 112 116 extern int16_t s_trns[12]; 113 117 extern int32_t schksum; 114 extern int8_t scname[ 20][16];115 extern int32_t scsums[ 20];118 extern int8_t scname[N_SCORES][16]; 119 extern int32_t scsums[N_SCORES]; 116 120 extern int32_t se1_cnt; 117 121 extern int32_t se2_cnt; … … 123 127 extern int32_t sntlreq; 124 128 extern int32_t spcount; 125 extern int32_t spool[ 32768L];129 extern int32_t spool[MAX_SE]; 126 130 extern int32_t swcount; 127 extern int16_t swfifo[ 100];131 extern int16_t swfifo[NSWFIFO]; 128 132 extern LPF (*swpt)[]; 129 133 extern int32_t swrate; … … 143 147 extern int32_t t_sect; 144 148 extern int32_t t_send; 145 extern int8_t trgtab[ 6144];149 extern int8_t trgtab[NTRIGS]; 146 150 extern int8_t tuncurn[33]; 147 extern int8_t tunname[ 10][32];151 extern int8_t tunname[NTUNS][32]; 148 152 extern int16_t tuntab[128]; 149 extern int16_t txfifo[ 100];150 extern int16_t tyfifo[ 100];153 extern int16_t txfifo[NTKFIFO]; 154 extern int16_t tyfifo[NTKFIFO]; 151 155 extern int16_t vce2grp[12]; 152 156 extern int16_t vce2trg[12]; 153 extern int16_t veltab[ 6144];154 extern int32_t vknm[ 32][256];157 extern int16_t veltab[NTRIGS]; 158 extern int32_t vknm[NUMHARM][NUMWPCAL]; 155 159 extern int8_t *vlbptr[3]; 156 extern int16_t vmtab[ 32];160 extern int16_t vmtab[NUMHARM]; 157 161 extern void (*vt_adv)(void); 158 162 extern void (*vt_bsp)(void); … … 162 166 extern void (*vt_stop)(void); 163 167 extern int8_t *vtdeptr; 164 extern int16_t wsbuf[ 256];168 extern int16_t wsbuf[NUMWPCAL]; 165 169 extern int32_t wshfac; 166 170 extern void (*x_key)(void); -
rom/romp.c
r526a993 r2340de6 70 70 #define ROMADDR 0x00100000L 71 71 72 #define MAXFNLN 13 /* xxxxxxxx.xxx + CR */73 #define MAXARGLN 80 /* maximum argument length */74 #define MAXCMDLN 128 /* maximum command line length */75 #define MAXHS 80 /* maximum help string length */76 #define MAXID 90 /* maximum ID string length */77 78 #define PDATELN 1479 72 #define PRM_DATE 0x0100008L 80 73 #define PRM_VERS 0x0100002L -
rom/romp.x
r526a993 r2340de6 10 10 #include "setjmp.h" 11 11 #include "stdint.h" 12 13 #define MAXFNLN 13 /* xxxxxxxx.xxx + CR */ 14 #define MAXARGLN 80 /* maximum argument length */ 15 #define MAXCMDLN 128 /* maximum command line length */ 16 #define MAXHS 80 /* maximum help string length */ 17 #define MAXID 90 /* maximum ID string length */ 18 19 #define PDATELN 14 12 20 13 21 /* … … 23 31 extern int16_t argln; 24 32 extern int8_t argsep; 25 extern int8_t argstr[ 80 +1];33 extern int8_t argstr[MAXARGLN+1]; 26 34 extern int16_t asig; 27 35 extern int16_t astat; … … 32 40 extern uint16_t baron; 33 41 extern int16_t baseled; 34 extern int8_t bfname[ 13 +1];35 extern int8_t cmdline[ 128 +1];42 extern int8_t bfname[MAXFNLN+1]; 43 extern int8_t cmdline[MAXCMDLN+1]; 36 44 extern int16_t cmdunit; 37 45 extern int8_t *d_cur; … … 43 51 extern int32_t ftimer; 44 52 extern int16_t goflag; 45 extern int8_t hs_mtst[ 80 +1];46 extern int8_t idbuf[ 90 +1];53 extern int8_t hs_mtst[MAXHS+1]; 54 extern int8_t idbuf[MAXID+1]; 47 55 extern int16_t ilast; 48 56 extern int16_t inext; … … 63 71 extern int32_t p_value; 64 72 extern int32_t p_width; 65 extern int8_t promdate[ 14 +1];73 extern int8_t promdate[PDATELN+1]; 66 74 extern int16_t redo; 67 75 extern struct regs *regptr;
Note:
See TracChangeset
for help on using the changeset viewer.