Changeset 432327d in buchla-68k
- Timestamp:
- 09/17/2017 09:27:29 PM (7 years ago)
- Branches:
- master
- Children:
- 6099cac
- Parents:
- 8c8b4e5
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
ram/addfpu.c
r8c8b4e5 r432327d 18 18 uint16_t addfpu(uint16_t t, int16_t k) 19 19 { 20 register int16_t x, z;21 register uint16_t y;20 uint16_t x, y; 21 int32_t z; 22 22 23 23 x = fromfpu(t); … … 27 27 28 28 y = t; 29 z = x + k;29 z = (int32_t)x + k; 30 30 31 31 if (z GE MAXSEGT) … … 46 46 uint16_t subfpu(uint16_t t, int16_t k) 47 47 { 48 register int16_t x, z;49 register uint16_t y;48 uint16_t x, y; 49 int32_t z; 50 50 51 51 x = fromfpu(t); … … 55 55 56 56 y = t; 57 z = x - k;57 z = (int32_t)x - k; 58 58 59 59 if (z LE 1) -
ram/adselbx.c
r8c8b4e5 r432327d 254 254 vbank(0); 255 255 256 bfs[0] = row - 5 + '2';256 bfs[0] = (int8_t)(row - 5 + '2'); 257 257 bfs[1] = '\0'; 258 258 … … 294 294 ins2grp[grp] ^= GTAG1; 295 295 296 bfs[0] = '1' + grp;296 bfs[0] = (int8_t)('1' + grp); 297 297 bfs[1] = '\0'; 298 298 … … 317 317 ins2grp[grp] ^= GTAG1; 318 318 319 bfs[0] = grp + ((grp > 8) ? 163 : '1');319 bfs[0] = (int8_t)(grp + ((grp > 8) ? 163 : '1')); 320 320 bfs[1] = '\0'; 321 321 -
ram/asgdsp.c
r8c8b4e5 r432327d 238 238 */ 239 239 240 void keycpyw(volatile uint16_t *dest, volatile uint16_t *src, int16_t len, uint16_t wk, uint16_t bk)240 void keycpyw(volatile uint16_t *dest, volatile uint16_t *src, int16_t len, int16_t wk, int16_t bk) 241 241 { 242 242 uint16_t wkey, bkey, theword; … … 358 358 vbank(0); 359 359 360 vputp(adoct, x, y, exp_c(pen));360 vputp(adoct, x, y, pen); 361 361 } 362 362 … … 389 389 void adswin(int16_t n) 390 390 { 391 register int16_t cx, i; 391 uint16_t cx; 392 int16_t i; 392 393 int8_t buf1[4], buf2[4]; 393 394 … … 512 513 if ((mctlnum[i] NE -1) AND (mctlnum[i] & CTAG1)) { 513 514 514 bfs[0] = '2' + i;515 bfs[0] = (int8_t)('2' + i); 515 516 bfs[1] = '\0'; 516 517 … … 603 604 case 7: /* port 1 key to group assignments */ 604 605 605 lseg( 8, 153, 15, 153, exp_c(adbox[n][4])); /* underlines */606 lseg(496, 153, 503, 153, exp_c(adbox[n][4]));606 lseg( 8, 153, 15, 153, adbox[n][4]); /* underlines */ 607 lseg(496, 153, 503, 153, adbox[n][4]); 607 608 608 609 asgkb(); /* icon */ … … 719 720 720 721 *(psg + PSG_ADDR) = PSG_PRTB; /* read current psg data */ 721 psgdata = *(psg + PSG_READ) & ~AUX_BIT;722 psgdata = (uint8_t)(*(psg + PSG_READ) & ~AUX_BIT); 722 723 723 724 *(psg + PSG_ADDR) = PSG_PRTB; /* send out updated aux data */ 724 *(psg + PSG_WRIT) = psgdata | (aux ? 0 : AUX_BIT);725 *(psg + PSG_WRIT) = (uint8_t)(psgdata | (aux ? 0 : AUX_BIT)); 725 726 } 726 727 -
ram/asgdsp.x
r8c8b4e5 r432327d 43 43 extern void inital(void); 44 44 extern void initat(int16_t n); 45 extern void keycpyw(volatile uint16_t *dest, volatile uint16_t *src, int16_t len, uint16_t wk, uint16_t bk);45 extern void keycpyw(volatile uint16_t *dest, volatile uint16_t *src, int16_t len, int16_t wk, int16_t bk); 46 46 extern int8_t *numblk(int8_t *buf, int16_t n); 47 47 extern void putasg(int16_t n); -
ram/asgvce.c
r8c8b4e5 r432327d 84 84 ep->e_time = t_cur; 85 85 ep->e_type = EV_NEND | 0x80; 86 ep->e_note = nn;87 ep->e_group = grp;86 ep->e_note = (int8_t)nn; 87 ep->e_group = (int8_t)grp; 88 88 ep->e_vel = SM_SCALE(64); 89 89 … … 132 132 ep->e_time = t_cur; 133 133 ep->e_type = EV_NEND | 0x80; 134 ep->e_note = nn;135 ep->e_group = grp;134 ep->e_note = (int8_t)nn; 135 ep->e_group = (int8_t)grp; 136 136 ep->e_vel = SM_SCALE(64); 137 137 … … 244 244 ep->e_time = t_cur; 245 245 ep->e_type = EV_NBEG | 0x80; 246 ep->e_note = key;247 ep->e_group = grp;246 ep->e_note = (int8_t)key; 247 ep->e_group = (int8_t)grp; 248 248 ep->e_vel = (clksrc EQ CK_STEP) ? SM_SCALE(64) : vel; 249 249 -
ram/barbadj.c
r8c8b4e5 r432327d 38 38 /* bar dot data */ 39 39 40 int16_t BarDots[3] = { 0x1C, 0xFC, 0xE0 };40 uint8_t BarDots[3] = { 0x1C, 0xFC, 0xE0 }; 41 41 42 42 #include "glcbars.h" /* bar graph driver constant definitions */ … … 50 50 void BarBadj(int16_t bar, int16_t val) 51 51 { 52 register int16_t bardot, curdif; 53 register uint16_t baradr; 52 uint8_t bardot; 53 register int16_t curdif; 54 register int16_t baradr; 54 55 int16_t barcol, bardif, curbar, i, newbar; 55 56 … … 78 79 79 80 LCD_WC = G_CRSWR; /* set cursor address */ 80 LCD_WD = baradr & 0xFF;81 LCD_WD = ( baradr >> 8) & 0xFF;81 LCD_WD = (uint8_t)(baradr & 0xFF); 82 LCD_WD = (uint8_t)((baradr >> 8) & 0xFF); 82 83 83 84 ++baradr; /* update GLC start address */ … … 102 103 103 104 LCD_WC = G_CRSWR; /* set cursor address */ 104 LCD_WD = baradr & 0xFF;105 LCD_WD = ( baradr >> 8) & 0xFF;105 LCD_WD = (uint8_t)(baradr & 0xFF); 106 LCD_WD = (uint8_t)((baradr >> 8) & 0xFF); 106 107 107 108 ++baradr; /* update GLC start address */ … … 128 129 void BarBset(int16_t bar, int16_t val) 129 130 { 130 register int16_t bardot, barpos, newbar; 131 register uint16_t baradr; 131 uint8_t bardot; 132 register int16_t barpos, newbar; 133 register int16_t baradr; 132 134 int16_t barcol, i; 133 135 … … 149 151 150 152 LCD_WC = G_CRSWR; /* set cursor address */ 151 LCD_WD = baradr & 0xFF;152 LCD_WD = ( baradr >> 8) & 0xFF;153 LCD_WD = (uint8_t)(baradr & 0xFF); 154 LCD_WD = (uint8_t)((baradr >> 8) & 0xFF); 153 155 154 156 ++baradr; /* update GLC start address */ … … 157 159 158 160 while (barpos++ LE newbar) /* write new dots */ 159 LCD_WD = bardot;161 LCD_WD = (uint8_t)bardot; 160 162 161 163 while (barpos++ < BTop) /* erase old dots */ … … 177 179 void BarCadj(int16_t bar, int16_t val) 178 180 { 179 register int16_t bardot, barpos, newbar; 180 register uint16_t baradr; 181 uint8_t bardot; 182 register int16_t barpos, newbar; 183 register int16_t baradr; 181 184 int16_t barcol, bardif, curbar, i; 182 185 … … 207 210 208 211 LCD_WC = G_CRSWR; /* set cursor address */ 209 LCD_WD = baradr & 0xFF;210 LCD_WD = ( baradr >> 8) & 0xFF;212 LCD_WD = (uint8_t)(baradr & 0xFF); 213 LCD_WD = (uint8_t)((baradr >> 8) & 0xFF); 211 214 212 215 LCD_WC = G_MWRITE; /* setup to write */ … … 231 234 232 235 LCD_WC = G_CRSWR; /* set cursor address */ 233 LCD_WD = baradr & 0xFF;234 LCD_WD = ( baradr >> 8) & 0xFF;236 LCD_WD = (uint8_t)(baradr & 0xFF); 237 LCD_WD = (uint8_t)((baradr >> 8) & 0xFF); 235 238 236 239 LCD_WC = G_MWRITE; /* setup to write */ … … 260 263 void BarCset(int16_t bar, int16_t val) 261 264 { 262 register int16_t bardot, barpos, barloc1, barloc2; 263 register uint16_t baradr; 265 uint8_t bardot; 266 register int16_t barpos, barloc1, barloc2; 267 register int16_t baradr; 264 268 int16_t barcol, i, newbar; 265 269 … … 293 297 294 298 LCD_WC = G_CRSWR; /* set cursor address */ 295 LCD_WD = baradr & 0xFF;296 LCD_WD = ( baradr >> 8) & 0xFF;299 LCD_WD = (uint8_t)(baradr & 0xFF); 300 LCD_WD = (uint8_t)((baradr >> 8) & 0xFF); 297 301 298 302 LCD_WC = G_MWRITE; /* setup to write */ -
ram/barbadj.x
r8c8b4e5 r432327d 22 22 extern int16_t BarCLn[256]; 23 23 extern int16_t BarCols[14]; 24 extern int16_t BarDots[3];24 extern uint8_t BarDots[3]; 25 25 26 26 /* -
ram/etaccn.c
r8c8b4e5 r432327d 60 60 mctlnum[ctl] = tmpval; 61 61 else 62 mctlnum[ctl] = (mctlnum[ctl] & 0xFF00) | tmpval;62 mctlnum[ctl] = (mctlnum[ctl] & (int16_t)0xFF00) | tmpval; 63 63 64 64 modasg(); … … 99 99 100 100 n = nn & 0xFF; 101 ebuf[stccol - cfetp->flcol] = k + '0';101 ebuf[stccol - cfetp->flcol] = (int8_t)(k + '0'); 102 102 ebuf[2] = '\0'; 103 103 104 dspbuf[0] = k + '0';104 dspbuf[0] = (int8_t)(k + '0'); 105 105 dspbuf[1] = '\0'; 106 106 -
ram/etadep.c
r8c8b4e5 r432327d 83 83 ec = stccol - cfetp->flcol; /* setup edit buffer column */ 84 84 85 ebuf[ec] = k + '0';85 ebuf[ec] = (int8_t)(k + '0'); 86 86 ebuf[2] = '\0'; 87 87 88 dspbuf[0] = k + '0';88 dspbuf[0] = (int8_t)(k + '0'); 89 89 dspbuf[1] = '\0'; 90 90 -
ram/etadyn.c
r8c8b4e5 r432327d 20 20 grp = 0x00FF & (n >> 8); 21 21 22 ebuf[0] = grpdyn[grp] + '0';22 ebuf[0] = (int8_t)(grpdyn[grp] + '0'); 23 23 ebuf[1] = '\0'; 24 24 … … 40 40 struct idfnhdr *fp; 41 41 uint16_t fpmant, fpexp; 42 int16_t oldsr;42 uint16_t oldsr; 43 43 int16_t nop; 44 44 … … 47 47 g = grp + 1; 48 48 49 fpmant = ( ((int32_t)curintp & 0x0000FFF0L) *50 ((int32_t)timemlt & 0x0000FFFFL)) >> 15 ;49 fpmant = (uint16_t)((((int32_t)curintp & 0x0000FFF0L) * 50 ((int32_t)timemlt & 0x0000FFFFL)) >> 15); 51 51 52 52 fpexp = expbit[curintp & 0x000F]; … … 70 70 71 71 if (fp->idftmd & I_VNSUBN) 72 *(fpu + (int32_t)FPU_TNV1) = val;72 *(fpu + (int32_t)FPU_TNV1) = (uint16_t)val; 73 73 else 74 *(fpu + (int32_t)FPU_TNV0) = val;74 *(fpu + (int32_t)FPU_TNV0) = (uint16_t)val; 75 75 76 76 ++nop; ++nop; ++nop; 77 77 78 78 *(fpu + (int32_t)FPU_TCTL) = 79 ( fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0001;79 (uint16_t)((fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0001); 80 80 81 81 setsr(oldsr); … … 121 121 grp = 0x00FF & (nn >> 8); 122 122 123 dspbuf[0] = grpdyn[grp] + '0';123 dspbuf[0] = (int8_t)(grpdyn[grp] + '0'); 124 124 dspbuf[1] = '\0'; 125 125 … … 143 143 n = nn & 0xFF; 144 144 145 dspbuf[0] = ebuf[0] = k + '0';145 dspbuf[0] = ebuf[0] = (int8_t)(k + '0'); 146 146 dspbuf[1] = ebuf[1] = '\0'; 147 147 -
ram/etagch.c
r8c8b4e5 r432327d 98 98 99 99 n = nn & 0xFF; 100 ebuf[stccol - cfetp->flcol] = k + '0';100 ebuf[stccol - cfetp->flcol] = (int8_t)(k + '0'); 101 101 ebuf[2] = '\0'; 102 102 103 dspbuf[0] = k + '0';103 dspbuf[0] = (int8_t)(k + '0'); 104 104 dspbuf[1] = '\0'; 105 105 -
ram/initi.c
r8c8b4e5 r432327d 32 32 }; 33 33 34 int16_t expbit[16] = { /* FPU time exponent bit expansion table */34 uint16_t expbit[16] = { /* FPU time exponent bit expansion table */ 35 35 36 36 0x0001, /* 0 */ -
ram/initi.x
r8c8b4e5 r432327d 18 18 19 19 extern uint16_t dfltins[]; 20 extern int16_texpbit[16];20 extern uint16_t expbit[16]; 21 21 extern int16_t finival[NFINST]; 22 22 extern int16_t ptoftab[]; -
ram/libdsp.c
r8c8b4e5 r432327d 157 157 */ 158 158 159 uint16_t exp_c(uint16_t c) 160 { 161 c &= 0x000F; /* use low 4 bits as the basis */ 162 c |= c << 4; /* turn them into 8 bits */ 163 c |= c << 8; /* make it a full 16 bits */ 164 165 return(c); 159 uint16_t exp_c(int16_t c) 160 { 161 uint16_t r; 162 163 r = (uint16_t)c & 0x000F; /* use low 4 bits as the basis */ 164 r |= r << 4; /* turn them into 8 bits */ 165 r |= r << 8; /* make it a full 16 bits */ 166 167 return(r); 166 168 } 167 169 -
ram/libdsp.x
r8c8b4e5 r432327d 35 35 extern int16_t clreq(int32_t bytes); 36 36 extern void dslslot(int16_t slot, uint16_t fg, int16_t row); 37 extern uint16_t exp_c( uint16_t c);37 extern uint16_t exp_c(int16_t c); 38 38 extern int16_t fcindex(void); 39 39 extern void fcreset(void); -
ram/m7menu.c
r8c8b4e5 r432327d 270 270 int16_t mdselbx(int16_t n) 271 271 { 272 register uint16_t mbcv, mbak;272 register int16_t mbcv, mbak; 273 273 register int16_t rc; 274 274 … … 278 278 #endif 279 279 280 mbcv = exp_c(MBUTTON);281 mbak = exp_c(MBKGRND);280 mbcv = MBUTTON; 281 mbak = MBKGRND; 282 282 283 283 rc = SUCCESS; … … 384 384 register int16_t *mlp; 385 385 register int16_t i; 386 register uint16_t mlcv, mbcv, mbak;386 register int16_t mlcv, mbcv, mbak; 387 387 int8_t buf[16]; 388 388 389 mlcv = exp_c(MLINES);390 mbcv = exp_c(MBUTTON);391 mbak = exp_c(MBKGRND);389 mlcv = MLINES; 390 mbcv = MBUTTON; 391 mbak = MBKGRND; 392 392 393 393 if (ml01[0] EQ 0) { -
ram/tundsp.c
r8c8b4e5 r432327d 242 242 void td_trcp(int16_t mode) 243 243 { 244 register uint16_t cx;245 246 cx = exp_c(mode ? TDSELD : tdbox[6][4]);244 register int16_t cx; 245 246 cx = mode ? TDSELD : tdbox[6][4]; 247 247 vbank(0); 248 248 vcputsv(tunob, 64, cx, tdbox[6][5], 9, 54, "Transpose", 14); … … 258 258 void td_incr(int16_t mode) 259 259 { 260 register uint16_t cx;261 262 cx = exp_c(mode ? TDSELD : tdbox[6][4]);260 register int16_t cx; 261 262 cx = mode ? TDSELD : tdbox[6][4]; 263 263 vbank(0); 264 264 vcputsv(tunob, 64, cx, tdbox[6][5], 12, 54, "Increment", 14); … … 273 273 void td_intp(int16_t mode) 274 274 { 275 register uint16_t cx;276 277 cx = exp_c(mode ? TDSELD : tdbox[6][4]);275 register int16_t cx; 276 277 cx = mode ? TDSELD : tdbox[6][4]; 278 278 vbank(0); 279 279 vcputsv(tunob, 64, cx, tdbox[6][5], 14, 54, "Intrpolat", 14); … … 334 334 */ 335 335 336 void dsttval(int16_t row, int16_t col, int16_t val, uint16_t fg, uint16_t bg) 337 { 338 register uint16_t cfg, cbg; 339 340 cfg = exp_c(fg); 341 cbg = exp_c(bg); 342 336 void dsttval(int16_t row, int16_t col, int16_t val, int16_t fg, int16_t bg) 337 { 343 338 cnvc2p(bfs, (val >> 1)); 344 339 345 bfs[0] += '0';346 bfs[1] += 'A';347 bfs[2] = sfdsp[bfs[2] - 7];348 bfs[3] += '0';349 bfs[4] += '0';340 bfs[0] = (int8_t)(bfs[0] + '0'); 341 bfs[1] = (int8_t)(bfs[1] + 'A'); 342 bfs[2] = (int8_t)(bfs[2] + sfdsp[bfs[2] - 7]); 343 bfs[3] = (int8_t)(bfs[3] + '0'); 344 bfs[4] = (int8_t)(bfs[4] + '0'); 350 345 bfs[5] = '\0'; 351 346 352 347 vbank(0); 353 vcputsv(tunob, 64, cfg, cbg, row, col, bfs, 14);348 vcputsv(tunob, 64, fg, bg, row, col, bfs, 14); 354 349 } 355 350 … … 362 357 void tdswin(int16_t n) 363 358 { 364 register int16_t cx, i, tv; 359 uint16_t cx; 360 int16_t i, tv; 365 361 int8_t ts; 366 362 … … 476 472 477 473 tsplot4(tunob, 64, tdbox[n][4], 24, 54, "Table #", 14); 478 bfs[0] = curtun + '0';474 bfs[0] = (int8_t)(curtun + '0'); 479 475 bfs[1] = '\0'; 480 476 tsplot4(tunob, 64, tunmod ? TDCHGD : tdbox[n][4], -
ram/tundsp.x
r8c8b4e5 r432327d 26 26 extern void advtcur(void); 27 27 extern void bsptcur(void); 28 extern void dsttval(int16_t row, int16_t col, int16_t val, uint16_t fg, uint16_t bg);28 extern void dsttval(int16_t row, int16_t col, int16_t val, int16_t fg, int16_t bg); 29 29 extern void gettun(int16_t n); 30 30 extern void inittl(void); -
ram/vtyper.c
r8c8b4e5 r432327d 37 37 */ 38 38 39 void vtsetup(volatile uint16_t *obj, vtchar dsp, int16_t col, int8_t *ptr, int16_t tr, int16_t tc, vtcurs adv, vtcurs bsp, vtcurs cup, vtcurs cdn, vtcurs stop, uint16_t fg, uint16_t bg)39 void vtsetup(volatile uint16_t *obj, vtchar dsp, int16_t col, int8_t *ptr, int16_t tr, int16_t tc, vtcurs adv, vtcurs bsp, vtcurs cup, vtcurs cdn, vtcurs stop, int16_t fg, int16_t bg) 40 40 { 41 41 vtobj = obj; /* setup object pointer */ -
ram/vtyper.x
r8c8b4e5 r432327d 31 31 extern void vtcyupd(void); 32 32 extern void vtdisp(volatile uint16_t *obj, uint16_t fg, uint16_t bg, int16_t row, int16_t col, int8_t *buf); 33 extern void vtsetup(volatile uint16_t *obj, vtchar dsp, int16_t col, int8_t *ptr, int16_t tr, int16_t tc, vtcurs adv, vtcurs bsp, vtcurs cup, vtcurs cdn, vtcurs stop, uint16_t fg, uint16_t bg);33 extern void vtsetup(volatile uint16_t *obj, vtchar dsp, int16_t col, int8_t *ptr, int16_t tr, int16_t tc, vtcurs adv, vtcurs bsp, vtcurs cup, vtcurs cdn, vtcurs stop, int16_t fg, int16_t bg); 34 34 extern int16_t vtyper(void); -
rom/romp.c
r8c8b4e5 r432327d 501 501 */ 502 502 503 uint16_t exp_c(uint16_t c) 504 { 505 c &= 0x000F; 506 c |= c << 4; 507 c |= c << 8; 508 509 return(c); 503 uint16_t exp_c(int16_t c) 504 { 505 uint16_t r; 506 507 r = (uint16_t)c & 0x000F; 508 r |= r << 4; 509 r |= r << 8; 510 511 return(r); 510 512 } 511 513 -
rom/romp.x
r8c8b4e5 r432327d 153 153 extern void dosw(int16_t nb, int16_t sv); 154 154 extern int16_t dtext(int8_t *loc, int8_t *lastloc, int16_t nwide, int16_t unit); 155 extern uint16_t exp_c( uint16_t c);155 extern uint16_t exp_c(int16_t c); 156 156 extern int16_t getarg(void); 157 157 extern int16_t getcmd(void);
Note:
See TracChangeset
for help on using the changeset viewer.