#define STARTX 64 #define ENDX 576 int osc() { int temp; int x; static char oscmode; long lastpos = total_samples; char y, skip = 0; char _lxs[ENDX]; char *lxs = _lxs; for (x = 0; x < ENDX; x ++) _lxs[x] = 0; x = STARTX; while (!Done) { if ((x == (ENDX-1) && skip++ > 7) || oscmode == 2) { skip = 0; refresh_screen(filesize_hbytes, total_samples, samplerate, looping); gotoxy(17,9); textattr(7); switch (oscmode) { case 0: cprintf("Accurate "); break; case 1: cprintf("FAST "); break; case 2: cprintf("Off "); break; } if (kbhit()) switch(getch()) { case 27: Done++; break; case 'D': case 'd': textmode(3); cprintf("Entering DOS shell... Type EXIT to return\r\n"); system(""); return 1; case 'O': case 'o': if (++oscmode > 2) oscmode = 0; if (oscmode == 2) { lxs = _lxs; for (x = STARTX; x < ENDX; x ++) { temp = 240 + *lxs; asm mov bx, temp asm mov ax, x #include "pixeloff.h" lxs++; } x = STARTX; lxs = _lxs; } break; default: break; } } if (oscmode != 2) { if (!oscmode && lastpos == total_samples) continue; lastpos = total_samples; x ++; lxs++; if (x == ENDX) { lxs = _lxs; x = STARTX; while(!(inportb(0x3da) & 0x08)); while(inportb(0x3da) & 0x08); } y = cb>>1; if (y > 0) y -= 64; else if ( y < 0) y += 64; temp = 240+(*lxs); asm mov ax, x asm mov bx, temp #include "pixeloff.h" *lxs = y; temp = 240+y; asm mov ax, x asm mov bx, temp #include "pixelon.h" } } while(kbhit()) getch(); return 0; }