- Timestamp:
- 11/12/2017 07:21:55 PM (7 years ago)
- Branches:
- master
- Children:
- 3fcb810
- Parents:
- fa50076
- Location:
- ram
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
ram/ptdisp.c
rfa50076 r26553e2 9 9 10 10 uint16_t seqflag[16]; /* sequence flags */ 11 uint16_tseqline[16]; /* current sequencer line */11 int16_t seqline[16]; /* current sequencer line */ 12 12 uint16_t seqstim[16]; /* sequence stimulus */ 13 13 uint16_t seqtime[16]; /* sequence timers */ -
ram/ptdisp.x
rfa50076 r26553e2 20 20 extern int8_t *ptmcon[]; 21 21 extern uint16_t seqflag[16]; 22 extern uint16_tseqline[16];22 extern int16_t seqline[16]; 23 23 extern uint16_t seqstim[16]; 24 24 extern struct seqent seqtab[NSLINES]; -
ram/sqexec.c
rfa50076 r26553e2 21 21 #endif 22 22 23 int16_t seqdspn; 24 25 int16_t rtab[] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000F, 0x001F, 0x003F, 26 0x003F, 0x003F, 0x003F }; 23 int16_t seqdspn; 24 25 uint16_t rtab[] = { 26 0x0000, 0x0001, 0x0003, 0x0007, 0x000F, 0x001F, 0x003F, 27 0x003F, 0x003F, 0x003F 28 }; 27 29 28 30 /* … … 50 52 case SQ_RND: /* random number */ 51 53 52 return(( int16_t)rand24() & rtab[SQ_MVAL & dat]);54 return((uint16_t)rand24() & rtab[SQ_MVAL & dat]); 53 55 54 56 default: /* something weird got in here ... */ … … 64 66 */ 65 67 66 int16_t dosqact( uint16_t seq, uint16_t act, uint16_t dat)68 int16_t dosqact(int16_t seq, uint16_t act, uint16_t dat) 67 69 { 68 70 register uint16_t obj, val; … … 105 107 trstate[val] = 1; 106 108 putwq(&ptefifo, (0x1100 | val)); 107 seqdupd |= ( 1 << val);109 seqdupd |= ((uint16_t)1 << val); 108 110 return(0); 109 111 … … 111 113 112 114 trstate[val] = 0; 113 seqdupd |= ( 1 << val);115 seqdupd |= ((uint16_t)1 << val); 114 116 return(0); 115 117 … … 121 123 putwq(&ptefifo, (0x1100 | val)); 122 124 123 seqdupd |= ( 1 << val);125 seqdupd |= ((uint16_t)1 << val); 124 126 return(0); 125 127 … … 131 133 132 134 sregval[obj] = evaltv(dat); 133 seqdupd |= ( 1 << obj);135 seqdupd |= ((uint16_t)1 << obj); 134 136 return(0); 135 137 … … 138 140 if (dat & SQ_MFLG) { 139 141 140 sv = sregval[obj] - evaltv(dat);142 sv = (int16_t)(sregval[obj] - evaltv(dat)); 141 143 142 144 if (sv < 0) 143 145 sv = 0; 144 146 145 sregval[obj] = sv;147 sregval[obj] = (uint16_t)sv; 146 148 147 149 } else { 148 150 149 sv = sregval[obj] + evaltv(dat);151 sv = (int16_t)(sregval[obj] + evaltv(dat)); 150 152 151 153 if (sv > 99) 152 154 sv = 99; 153 155 154 sregval[obj] = sv;156 sregval[obj] = (uint16_t)sv; 155 157 156 158 } 157 159 158 seqdupd |= ( 1 << obj);160 seqdupd |= ((uint16_t)1 << obj); 159 161 return(0); 160 162 … … 195 197 case SQ_JUMP: /* Jump to sequence line */ 196 198 197 seqline[seq] = dat;199 seqline[seq] = (int16_t)dat; 198 200 seqtime[seq] = seqtab[dat].seqtime; 199 201 seqflag[seq] |= SQF_CLK; 200 202 201 seqdupd |= ( 1 << seq);203 seqdupd |= ((uint16_t)1 << seq); 202 204 return(-1); 203 205 … … 209 211 seqtime[seq] = 0; 210 212 211 seqdupd |= ( 1 << seq);213 seqdupd |= ((uint16_t)1 << seq); 212 214 return(-1); 213 215 … … 221 223 */ 222 224 223 void sqexec( uint16_t seq)225 void sqexec(int16_t seq) 224 226 { 225 register uint16_t act, dat , line;227 register uint16_t act, dat; 226 228 register struct seqent *sp; 227 register int16_t rc;229 register int16_t line, rc; 228 230 229 231 line = seqline[seq]; … … 291 293 #endif 292 294 293 seqdupd |= ( 1 << seq);295 seqdupd |= ((uint16_t)1 << seq); 294 296 } 295 297 … … 302 304 void seqproc(void) 303 305 { 304 register uint16_t oldsr , seq;305 register int16_t dspn;306 register uint16_t oldsr; 307 register int16_t seq, dspn; 306 308 register uint16_t *fp; 307 309 int8_t linbuf[66]; … … 319 321 320 322 if (0 EQ --seqtime[seq]) 321 *fp &= ~ SQF_CLK;323 *fp &= ~(uint16_t)SQF_CLK; 322 324 323 325 } else { 324 326 325 *fp &= ~ SQF_CLK;327 *fp &= ~(uint16_t)SQF_CLK; 326 328 } 327 329 } … … 344 346 ndisp, seqdupd); 345 347 #endif 346 if (seqdupd & ( 1 << seqdspn)) {348 if (seqdupd & ((uint16_t)1 << seqdspn)) { 347 349 348 350 dspn = seqdspn; … … 371 373 PDSEQRN : PDSEQFG) << 4) | PDSEQBG, 16); 372 374 #endif 373 seqdupd &= ~( 1 << dspn);375 seqdupd &= ~((uint16_t)1 << dspn); 374 376 } 375 377 -
ram/sqexec.x
rfa50076 r26553e2 15 15 */ 16 16 17 extern int16_trtab[];17 extern uint16_t rtab[]; 18 18 extern int16_t seqdspn; 19 19 … … 24 24 */ 25 25 26 extern int16_t dosqact( uint16_t seq, uint16_t act, uint16_t dat);26 extern int16_t dosqact(int16_t seq, uint16_t act, uint16_t dat); 27 27 extern uint16_t evaltv(uint16_t dat); 28 28 extern void seqproc(void); 29 extern void sqexec( uint16_t seq);29 extern void sqexec(int16_t seq);
Note:
See TracChangeset
for help on using the changeset viewer.