Changeset 7258c6a in buchla-68k for ram/smscrl.c
- Timestamp:
- 07/09/2017 04:45:34 PM (7 years ago)
- Branches:
- master
- Children:
- 8618599
- Parents:
- 0292fbb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ram/smscrl.c
r0292fbb r7258c6a 25 25 #define TOPSCAN (NSCANS - 1) /* top scan line */ 26 26 27 extern short cmtype; /* cursor type */28 extern short ctcsw; /* cursor status */29 extern short curslin; /* current sequence line */30 extern short cxrate; /* cursor X update rate */31 extern short cxval; /* cursor X location */32 extern short cyrate; /* cursor Y update rate */33 extern short cyval; /* cursor Y location */34 extern short ptecpos; /* current patch index */35 extern short pteset; /* ptebuf set flag */36 extern short sqdeflg; /* sequence data entry flag */37 extern short stccol; /* main cursor column */38 extern short submenu; /* submenu switch */39 extern short vtccol; /* submenu cursor column */40 extern short vtcrow; /* submenu cursor row */41 extern short vtxval; /* submenu cursor x value */42 extern short vtyval; /* subment cursor y value */43 44 extern u nsigned*obj10; /* sequence status object pointer */45 46 extern int cg3[][256]; /* character generator table */47 48 extern charptdebuf[]; /* patch data entry buffer */49 extern charsqdebuf[]; /* sequence data entry buffer */27 extern int16_t cmtype; /* cursor type */ 28 extern int16_t ctcsw; /* cursor status */ 29 extern int16_t curslin; /* current sequence line */ 30 extern int16_t cxrate; /* cursor X update rate */ 31 extern int16_t cxval; /* cursor X location */ 32 extern int16_t cyrate; /* cursor Y update rate */ 33 extern int16_t cyval; /* cursor Y location */ 34 extern int16_t ptecpos; /* current patch index */ 35 extern int16_t pteset; /* ptebuf set flag */ 36 extern int16_t sqdeflg; /* sequence data entry flag */ 37 extern int16_t stccol; /* main cursor column */ 38 extern int16_t submenu; /* submenu switch */ 39 extern int16_t vtccol; /* submenu cursor column */ 40 extern int16_t vtcrow; /* submenu cursor row */ 41 extern int16_t vtxval; /* submenu cursor x value */ 42 extern int16_t vtyval; /* subment cursor y value */ 43 44 extern uint16_t *obj10; /* sequence status object pointer */ 45 46 extern int16_t cg3[][256]; /* character generator table */ 47 48 extern int8_t ptdebuf[]; /* patch data entry buffer */ 49 extern int8_t sqdebuf[]; /* sequence data entry buffer */ 50 50 51 51 extern struct patch ptebuf; /* current patch image */ … … 55 55 extern struct seqent seqtab[]; /* sequence table */ 56 56 57 charTheBuf[66]; /* display build buffer */58 59 /* 60 61 */ 62 63 char*(*BakLine)(void); /* next line backward function pointer */64 char*(*FwdLine)(void); /* next line forward function pointer */65 66 short PdScDnF; /* scroll down flag */67 short PdScUpF; /* scroll up flag */68 69 short CurLine; /* top line being displayed */70 short CurScan; /* current scan line */71 short DupLine; /* write pointer for other page */72 short ScrlObj; /* object descriptor table index */73 74 char*LinePtr; /* line to scroll onto screen */75 76 u nsigned short LineAtr; /* attribute for the new line */77 78 u nsigned short *LineBuf; /* current display memory pointer */79 u nsigned short *OldLine; /* old display memory pointer */80 u nsigned short *ScObAdr; /* display memory base pointer */81 82 short LineCon = SS_LEN * 3; /* line offset constant */83 short LineLen = SS_LEN; /* length of a scrolled line */84 short SmScLim = SS_LIM; /* top line limit */85 short SmScNsl = SS_NSL; /* number of scrolled lines */86 short SmScTop = SS_TOP; /* total line count */57 int8_t TheBuf[66]; /* display build buffer */ 58 59 /* 60 61 */ 62 63 int8_t *(*BakLine)(void); /* next line backward function pointer */ 64 int8_t *(*FwdLine)(void); /* next line forward function pointer */ 65 66 int16_t PdScDnF; /* scroll down flag */ 67 int16_t PdScUpF; /* scroll up flag */ 68 69 int16_t CurLine; /* top line being displayed */ 70 int16_t CurScan; /* current scan line */ 71 int16_t DupLine; /* write pointer for other page */ 72 int16_t ScrlObj; /* object descriptor table index */ 73 74 int8_t *LinePtr; /* line to scroll onto screen */ 75 76 uint16_t LineAtr; /* attribute for the new line */ 77 78 uint16_t *LineBuf; /* current display memory pointer */ 79 uint16_t *OldLine; /* old display memory pointer */ 80 uint16_t *ScObAdr; /* display memory base pointer */ 81 82 int16_t LineCon = SS_LEN * 3; /* line offset constant */ 83 int16_t LineLen = SS_LEN; /* length of a scrolled line */ 84 int16_t SmScLim = SS_LIM; /* top line limit */ 85 int16_t SmScNsl = SS_NSL; /* number of scrolled lines */ 86 int16_t SmScTop = SS_TOP; /* total line count */ 87 87 88 88 /* … … 96 96 */ 97 97 98 char*LineFwd(void)99 { 100 register short j, k;98 int8_t *LineFwd(void) 99 { 100 register int16_t j, k; 101 101 102 102 for (j = 0; j < 48; j++) … … 107 107 108 108 if (0 EQ ptecpos) 109 return(( char*)NULL);109 return((int8_t *)NULL); 110 110 111 111 if (0 EQ (j = findnxt(ptecpos))) 112 return(( char*)NULL);112 return((int8_t *)NULL); 113 113 114 114 ptecpos = j; … … 146 146 */ 147 147 148 char*LineBak(void)149 { 150 register short j, k;148 int8_t *LineBak(void) 149 { 150 register int16_t j, k; 151 151 152 152 for (j = 0; j < 48; j++) … … 157 157 158 158 if (0 EQ ptecpos) 159 return(( char*)NULL);159 return((int8_t *)NULL); 160 160 161 161 if (0 EQ (j = findprv(ptecpos))) 162 return(( char*)NULL);162 return((int8_t *)NULL); 163 163 164 164 ptecpos = j; … … 196 196 */ 197 197 198 void WrVideo( short row, short col, char *str, unsigned short atr)199 { 200 register charchr;198 void WrVideo(int16_t row, int16_t col, int8_t *str, uint16_t atr) 199 { 200 register int8_t chr; 201 201 202 202 if (v_regs[5] & 0x0180) … … 222 222 */ 223 223 224 void SetDTop( short row, short scan)224 void SetDTop(int16_t row, int16_t scan) 225 225 { 226 226 if (v_regs[5] & 0x0180) 227 227 vbank(0); 228 228 229 LineBuf = (u nsigned short *)((char*)ScObAdr + (row * LineCon));229 LineBuf = (uint16_t *)((int8_t *)ScObAdr + (row * LineCon)); 230 230 231 231 if (OldLine NE LineBuf) 232 v_odtab[ScrlObj][2] = (( long)LineBuf >> 1) & 0xFFFF;232 v_odtab[ScrlObj][2] = ((int32_t)LineBuf >> 1) & 0xFFFF; 233 233 234 234 OldLine = LineBuf; … … 247 247 */ 248 248 249 void UpdVid( short row, short col, char *str, unsigned short atr)249 void UpdVid(int16_t row, int16_t col, int8_t *str, uint16_t atr) 250 250 { 251 251 WrVideo(CurLine + row, col, str, atr); … … 274 274 void bgncm(void) 275 275 { 276 register short j;276 register int16_t j; 277 277 278 278 memcpyw(&ptebuf.defnum, &patches[ptecpos].defnum, 6); … … 306 306 void stopcm(void) 307 307 { 308 register short i;308 register int16_t i; 309 309 310 310 if (PdScDnF) … … 348 348 void stopsm(void) 349 349 { 350 register short i;350 register int16_t i; 351 351 352 352 if (PdScDnF) … … 380 380 if (CurScan EQ TOPSCAN) { /* ready for a new line ? */ 381 381 382 if (( char*)NULL NE (LinePtr = (*FwdLine)())) { /* get a line */382 if ((int8_t *)NULL NE (LinePtr = (*FwdLine)())) { /* get a line */ 383 383 384 384 if (CurLine EQ SmScLim) { /* *** swap display pages *** */ … … 425 425 if (CurScan EQ TOPSCAN) { /* ready for a new line ? */ 426 426 427 if (( char*)NULL NE (LinePtr = (*BakLine)())) { /* get a line */427 if ((int8_t *)NULL NE (LinePtr = (*BakLine)())) { /* get a line */ 428 428 429 429 if (CurLine EQ 0) { /* *** swap display pages *** */ … … 476 476 void smxupd(void) 477 477 { 478 short oldcx;478 int16_t oldcx; 479 479 480 480 oldcx = cxval; … … 539 539 */ 540 540 541 void smy_up( short tag)541 void smy_up(int16_t tag) 542 542 { 543 543 … … 609 609 */ 610 610 611 void sqy_up( short tag)611 void sqy_up(int16_t tag) 612 612 { 613 613 if (ctcsw)
Note:
See TracChangeset
for help on using the changeset viewer.