From 118896f74475eb26539f1b32923d58f24f0f162f Mon Sep 17 00:00:00 2001 From: sparky4 Date: Thu, 22 May 2014 11:50:45 -0500 Subject: [PATCH] modified: 16/DOS_GFX.OBJ modified: 16/Project 16.bfproject modified: 16/dos_gfx.cpp modified: 16/lib/x/MODEX.BAK modified: 16/lib/x/MODEX.H --- 16/DOS_GFX.OBJ | Bin 8305 -> 8352 bytes 16/Project 16.bfproject | 17 +- 16/dos_gfx.cpp | 1124 ++++++++++++++++++++------------------- 16/dos_gfx.h | 18 +- 16/dos_kb.c | 14 +- 16/lib/x/MODEX.BAK | Bin 3072 -> 5632 bytes 16/lib/x/MODEX.H | 2 +- 16/scroll.txt | 46 +- 8 files changed, 611 insertions(+), 610 deletions(-) diff --git a/16/DOS_GFX.OBJ b/16/DOS_GFX.OBJ index dd4ed8e32bf240aa5ec9841d2fcf10878baf6d13..d5b35927b3ab31ac8a71738e2ad1dfd6067da226 100644 GIT binary patch delta 3286 zcmZuz33yc16~6bJdGF1enS_L_B#;HN5SExA37Z%YL=0epgd2(pL&!n~vXMzbkYyka zU_wCf5fO|M76rZn3J63{*`6%&iYR^>Y>Sps(XzB?1&Sy=Z({q|ug#Y;XS?s7d;fFq zIrr9xwvnq-qoipEMu(3Ynm08sHQoF#bIr)B&nvGiDy~m19k(W{_ptkU2Sx|~YD7_` z+c~p@ymz0EVvE1MlYd}z=>KsSR#o*_vo}rlIuzg=*W5TNx3Mk(e969j{0UH0TXwsJ zHSFV-d?v=C(w-=$4Z`UN+LuEq)x zXuKp8V-wL%p=jDlrNdug7FR`;lbvWg%y^=<+&ToNp4HArc;Pjz`D2%8lQGcQ61BKmqRDdx?1Q|KRXNf?)PFQu1a2Oj&eqA_DYD?5X(tC_w z0_{UJnfKNHsm}Mbe~P|EHg=@nNnq@~*5OQ-gul^4fSw?1dSBsZq|t;=i(v0m5keD# zw^oE2i)a^}I|($llDwOO92B;+wI>+k;XD?)@qQ4&2SFr%47&3P5W}ZH9Ct!8FMt&8 zf>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_ADDR, 0x0D); /* set low byte */ + outpw(CRTC_ADDR+1, visStart & 0xff); + } /* * setXXXPage() sets the specified page by multiplying the page number @@ -226,78 +226,78 @@ void setVisibleStart(unsigned offset) * function. The first page is number 0. */ void setActivePage(int page) - { - setActiveStart(page * widthBytes * height); - } + { + setActiveStart(page * widthBytes * height); + } void setVisiblePage(int page) - { - setVisibleStart(page * widthBytes * height); - } + { + setVisibleStart(page * widthBytes * height); + } void putPixel_X(int x, int y, byte color) - { - /* Each address accesses four neighboring pixels, so set - Write Plane Enable according to which pixel we want - to modify. The plane is determined by the two least - significant bits of the x-coordinate: */ - outp(0x3c4, 0x02); - outp(0x3c5, 0x01 << (x & 3)); - - /* The offset of the pixel into the video segment is - offset = (width * y + x) / 4, and write the given - color to the plane we selected above. Heed the active - page start selection. */ - vga[(unsigned)(widthBytes * y) + (x / 4) + actStart] = color; - - } + { + /* Each address accesses four neighboring pixels, so set + Write Plane Enable according to which pixel we want + to modify. The plane is determined by the two least + significant bits of the x-coordinate: */ + outp(0x3c4, 0x02); + outp(0x3c5, 0x01 << (x & 3)); + + /* The offset of the pixel into the video segment is + offset = (width * y + x) / 4, and write the given + color to the plane we selected above. Heed the active + page start selection. */ + vga[(unsigned)(widthBytes * y) + (x / 4) + actStart] = color; + + } byte getPixel_X(int x, int y) - { - /* Select the plane from which we must read the pixel color: */ - outpw(GRAC_ADDR, 0x04); - outpw(GRAC_ADDR+1, x & 3); + { + /* Select the plane from which we must read the pixel color: */ + outpw(GRAC_ADDR, 0x04); + outpw(GRAC_ADDR+1, x & 3); - return vga[(unsigned)(widthBytes * y) + (x / 4) + actStart]; + return vga[(unsigned)(widthBytes * y) + (x / 4) + actStart]; - } + } void set320x240x256_X(void) - { - /* Set the unchained version of mode 13h: */ - set320x200x256_X(); - - /* Modify the vertical sync polarity bits in the Misc. Output - Register to achieve square aspect ratio: */ - outp(0x3C2, 0xE3); - - /* Modify the vertical timing registers to reflect the increased - vertical resolution, and to center the image as good as - possible: */ - outpw(0x3D4, 0x2C11); /* turn off write protect */ - outpw(0x3D4, 0x0D06); /* vertical total */ - outpw(0x3D4, 0x3E07); /* overflow register */ - outpw(0x3D4, 0xEA10); /* vertical retrace start */ - outpw(0x3D4, 0xAC11); /* vertical retrace end AND wr.prot */ - outpw(0x3D4, 0xDF12); /* vertical display enable end */ - outpw(0x3D4, 0xE715); /* start vertical blanking */ - outpw(0x3D4, 0x0616); /* end vertical blanking */ - - /* Update mode info, so future operations are aware of the - resolution */ - height = 240; + { + /* Set the unchained version of mode 13h: */ + set320x200x256_X(); + + /* Modify the vertical sync polarity bits in the Misc. Output + Register to achieve square aspect ratio: */ + outp(0x3C2, 0xE3); + + /* Modify the vertical timing registers to reflect the increased + vertical resolution, and to center the image as good as + possible: */ + outpw(0x3D4, 0x2C11); /* turn off write protect */ + outpw(0x3D4, 0x0D06); /* vertical total */ + outpw(0x3D4, 0x3E07); /* overflow register */ + outpw(0x3D4, 0xEA10); /* vertical retrace start */ + outpw(0x3D4, 0xAC11); /* vertical retrace end AND wr.prot */ + outpw(0x3D4, 0xDF12); /* vertical display enable end */ + outpw(0x3D4, 0xE715); /* start vertical blanking */ + outpw(0x3D4, 0x0616); /* end vertical blanking */ + + /* Update mode info, so future operations are aware of the + resolution */ + height = 240; //*$pragma aux mxSetVirtualScreen "MXSETVIRTUALSCREEN" -mxSetVirtualScreen(480,360); - } +//mxSetVirtualScreen(480,360); + } /*-----------XXXX-------------*/ ///////////////////////////////////////////////////////////////////////////// -// // -// WaitRetrace() - This waits until you are in a Verticle Retrace. // -// // +// // +// WaitRetrace() - This waits until you are in a Verticle Retrace. // +// // ///////////////////////////////////////////////////////////////////////////// void wait_for_retrace(void) { @@ -305,17 +305,17 @@ void wait_for_retrace(void) } ///////////////////////////////////////////////////////////////////////////// -// // -// MoveTo() - This moves to position X*4 on a chain 4 screen. // -// Note: As soon as I find documentation, this function // -// will be better documented. - Snowman // -// // +// // +// MoveTo() - This moves to position X*4 on a chain 4 screen. // +// Note: As soon as I find documentation, this function // +// will be better documented. - Snowman // +// // ///////////////////////////////////////////////////////////////////////////// /* void MoveTo (word X, word Y) { -// word O = Y*SIZE*2+X; - word O = Y*widthBytes*2+X; +// word O = Y*SIZE*2+X; + word O = Y*widthBytes*2+X; asm { mov bx, [O] @@ -346,51 +346,51 @@ void MoveTo (word X, word Y) { "EXTRN mxWaitDisplay : FAR" \ "EXTRN mxStartAddress : FAR" \ -MX_TEXT SEGMENT USE16 PARA PUBLIC 'CODE' - ASSUME cs:MX_TEXT, ds:NOTHING, es:NOTHING - -EXTRN mx_BytesPerLine : WORD - -;----------------------------------------------------------- -; -; Moves the screen. -; -; Input: -; X, Y = new X, Y coordinates of view screen -; Output: -; none -; -mxPan PROC FAR - ARG Y:WORD, \ - X:WORD = ARG_SIZE - ASSUME ds:NOTHING - .enter 0 - - mov ax, [Y] - mul [mx_BytesPerLine] - mov dx, [X] - shr dx, 1 - shr dx, 1 - add ax, dx - push ax ; Push the start address - call mxWaitDisplay - call mxStartAddress - - mov dx, 03DAh ; Set the pixel pan register - in al, dx - mov dx, 03C0h - mov al, 33h - out dx, al - mov al, BYTE PTR [X] - and al, 3 - shl al, 1 - out dx, al - - xor ax, ax - .leave ARG_SIZE -mxPan ENDP - -MX_TEXT ENDS +"MX_TEXT SEGMENT USE16 PARA PUBLIC 'CODE' + ASSUME cs:MX_TEXT, ds:NOTHING, es:NOTHING" \ + +"EXTRN mx_BytesPerLine : WORD" \ + +//;----------------------------------------------------------- +//; +//; Moves the screen. +//; +//; Input: +//; X, Y = new X, Y coordinates of view screen +//; Output: +//; none +//; +mxPan PROC FAR + ARG Y:WORD, \ + X:WORD = ARG_SIZE + ASSUME ds:NOTHING + .enter 0 + + mov ax, [Y] + mul [mx_BytesPerLine] + mov dx, [X] + shr dx, 1 + shr dx, 1 + add ax, dx + push ax ; Push the start address + call mxWaitDisplay + call mxStartAddress + + mov dx, 03DAh ; Set the pixel pan register + in al, dx + mov dx, 03C0h + mov al, 33h + out dx, al + mov al, BYTE PTR [X] + and al, 3 + shl al, 1 + out dx, al + + xor ax, ax + .leave ARG_SIZE +mxPan ENDP + +MX_TEXT ENDS END @@ -409,14 +409,14 @@ void Play() // for(loop1=0;loop1<=3;loop1++) // for(loop2=0;loop2<=5;loop2++) -// Putpic (loop1*160,loop2*66); // { This places the picture all over the - // chain-4 screen } +// Putpic (loop1*160,loop2*66); // { This places the picture all over the + // chain-4 screen } // getch(); // ch=0x0; // xpos=rand (78)+1; // ypos=rand (198)+1; // { Random start positions for the view } - xpos=0; - ypos=0; + xpos=0; + ypos=0; xdir=1; ydir=1; // while(1) @@ -427,61 +427,61 @@ void Play() ypos=ypos+ydir; if( (xpos>79) || (xpos<1))xdir=-xdir; if( (ypos>199) || (ypos<1))ydir=-ydir; // { Hit a boundry, change - // direction! } + // direction! } // if(_bios_keybrd(_KEYBRD_READY))ch=getch(); -// if(ch==0x71)break; // 'q' -// if(ch==0x1b)break; // 'ESC' +// if(ch==0x71)break; // 'q' +// if(ch==0x1b)break; // 'ESC' // } } */ /*tile*/ //king_crimson's code void putColorBox_X(int x, int y, int w, int h, byte color) { - outp(0x3c4, 0x02); - - int curx, cury; - unsigned drawptr; - for (curx=x; curx<(x+w); curx++) { - outp(0x3c5, 0x01 << (curx & 3)); - drawptr = (unsigned)(widthBytes * y) + (curx / 4) + actStart; - for (cury=0; cury0) - boingy=1; - - for(int ti=0;ti0) + boingy=1; + + for(int ti=0;ti> 2); - outp(0x3D4, Cols); - //setVisibleStart(visStart + (Cols * height)); - setVisibleStart(visStart + (Cols * width)); + wait_for_retrace(); + outp(0x3C0, 0x13); + outp(0x3C0, Cols & 3); + outp(0x3D4, 0x13); + outp(0x3D5, Cols >> 2); + outp(0x3D4, Cols); + //setVisibleStart(visStart + (Cols * height)); + setVisibleStart(visStart + (Cols * width)); } /*To implement smooth horizontal scrolling, you would do the following: @@ -525,29 +525,29 @@ so we can draw off the edge of the screen. Perhaps a little diagram will clarify it. The following picture is of a standard X-mode addressing scheme with the OFFSET register set to 80. - ROW OFFSET - 0 0 ======================== - 1 80 [ ] - 2 160 [ ] - .. .. [ VISIBLE ] - [ SCREEN ] - [ ] - [ ] - .. .. [ ] - 199 15920 ======================== + ROW OFFSET + 0 0 ======================== + 1 80 [ ] + 2 160 [ ] + .. .. [ VISIBLE ] + [ SCREEN ] + [ ] + [ ] + .. .. [ ] + 199 15920 ======================== and the next diagram is of a modified addressing scheme with the OFFSET register set to 82 (to give us 4 extra pixels on each side of the screen) ROW OFFSET -0 0 ------========================------ -1 82 | V [ ] V | -2 164 | I [ ] I | -.. .. | N S [ VISIBLE ] N S | - | O I [ SCREEN ] O I | - | T B [ ] T B | - | L [ ] L | -.. .. | E [ ] E | +0 0 ------========================------ +1 82 | V [ ] V | +2 164 | I [ ] I | +.. .. | N S [ VISIBLE ] N S | + | O I [ SCREEN ] O I | + | T B [ ] T B | + | L [ ] L | +.. .. | E [ ] E | 199 16318 ------========================------ Beautiful!!! @@ -581,297 +581,297 @@ I'm sorry about this being so confusing but it's a bit difficult to explain. */ int loadfontX(char *fname) { - FILE *fp; + FILE *fp; - fp = fopen(fname, "rb"); + fp = fopen(fname, "rb"); - if (fp == NULL) { - return 0; - } else { - fread(Xfont, 8, 256, fp); - fclose(fp); - return 1; - } + if (fp == NULL) { + return 0; + } else { + fread(Xfont, 8, 256, fp); + fclose(fp); + return 1; + } } void putchX(cord x, cord y, char c, byte color) { - int i; - byte *vga_ptr; - byte *font_ptr; - byte temp; - - // 8x8 font - vga_ptr = RowsX[y << 3] + (x << 1) + actStart; - write_plane = -1; - - font_ptr = Xfont + (c << 3); - - i=8; - while (i--) { - temp = *font_ptr++; - outpw(SEQU_ADDR, text_mask[temp & 0x0F]); - *vga_ptr++ = color; - - outpw(SEQU_ADDR, text_mask[temp >> 4]); - *vga_ptr-- = color; - vga_ptr += widthBytes; - } + int i; + byte *vga_ptr; + byte *font_ptr; + byte temp; + + // 8x8 font + vga_ptr = RowsX[y << 3] + (x << 1) + actStart; + write_plane = -1; + + font_ptr = Xfont + (c << 3); + + i=8; + while (i--) { + temp = *font_ptr++; + outpw(SEQU_ADDR, text_mask[temp & 0x0F]); + *vga_ptr++ = color; + + outpw(SEQU_ADDR, text_mask[temp >> 4]); + *vga_ptr-- = color; + vga_ptr += widthBytes; + } } void putstringX(cord x, cord y, char *str, byte color) { - int i, skip; - byte *vga_ptr; - byte *font_ptr; - byte c, temp; + int i, skip; + byte *vga_ptr; + byte *font_ptr; + byte c, temp; - // 8x8 font - vga_ptr = RowsX[y << 3] + (x << 1) + actStart; - write_plane = -1; + // 8x8 font + vga_ptr = RowsX[y << 3] + (x << 1) + actStart; + write_plane = -1; - skip = 2 - (widthBytes << 3); + skip = 2 - (widthBytes << 3); - while (c = *str++) { - font_ptr = Xfont + (c << 3); + while (c = *str++) { + font_ptr = Xfont + (c << 3); - i=8; - while (i--) { - temp = *font_ptr++; - outpw(SEQU_ADDR, text_mask[temp & 0x0F]); - *vga_ptr++ = color; + i=8; + while (i--) { + temp = *font_ptr++; + outpw(SEQU_ADDR, text_mask[temp & 0x0F]); + *vga_ptr++ = color; - outpw(SEQU_ADDR, text_mask[temp >> 4]); - *vga_ptr-- = color; - vga_ptr += widthBytes; - } + outpw(SEQU_ADDR, text_mask[temp >> 4]); + *vga_ptr-- = color; + vga_ptr += widthBytes; + } - vga_ptr += skip; - } + vga_ptr += skip; + } } ///////////////////////////////////////////////////////////////////////////// -// // -// setvideo() - This function Manages the video modes // -// // +// // +// setvideo() - This function Manages the video modes // +// // ///////////////////////////////////////////////////////////////////////////// void setvideo(/*byte mode, */int vq){ - union REGS in, out; - - if(!vq){ // deinit the video - // change to the video mode we were in before we switched to mode 13h - in.h.ah = 0x00; - in.h.al = old_mode; - int86(0x10, &in, &out); - - }else if(vq == 1){ // init the video - // get old video mode - in.h.ah = 0xf; - int86(0x10, &in, &out); - old_mode = out.h.al; - - // enter mode - set320x240x256_X(); - } + union REGS in, out; + + if(!vq){ // deinit the video + // change to the video mode we were in before we switched to mode 13h + in.h.ah = 0x00; + in.h.al = old_mode; + int86(0x10, &in, &out); + + }else if(vq == 1){ // init the video + // get old video mode + in.h.ah = 0xf; + int86(0x10, &in, &out); + old_mode = out.h.al; + + // enter mode + set320x240x256_X(); + } } ///////////////////////////////////////////////////////////////////////////// -// // +// // // cls() - This clears the screen to the specified color, on the VGA or on // -// the Virtual screen. // -// // +// the Virtual screen. // +// // ///////////////////////////////////////////////////////////////////////////// void cls(byte color, byte *Where){ - _fmemset(Where, color, width*(height*17)); + _fmemset(Where, color, width*(height*17)); } //color ‚Ä‚·‚Æ int colortest(){ - if(gq < NUM_COLORS){ - cls(gq, vga); - gq++; - }else gq = 0; - return gq; + if(gq < NUM_COLORS){ + cls(gq, vga); + gq++; + }else gq = 0; + return gq; } //color ‚Ä‚·‚Æ int colorz(){ - if(gq < HGQ){ -//---- cls(gq, vaddr); - cls(gq, vga); - gq++; - }else gq = LGQ; - return gq; + if(gq < HGQ){ +//---- cls(gq, vaddr); + cls(gq, vga); + gq++; + }else gq = LGQ; + return gq; } //slow spectrum down void ssd(int svq){ - if(sy < height+1){ - if(sx < width+1){ - //plotpixel(xx, yy, coor, vga); - //ppf(sx, sy, coor, vga); - putPixel_X(sx, sy, coor); - //printf("%d %d %d %d\n", sx, sy, svq, coor); - sx++; - }else sx = 0; - if(sx == width){ - sy++; - if(svq == 7) coor++; - if(sy == height && svq == 8) coor = rand()%NUM_COLORS; - } - }else sy = 0; + if(sy < height+1){ + if(sx < width+1){ + //plotpixel(xx, yy, coor, vga); + //ppf(sx, sy, coor, vga); + putPixel_X(sx, sy, coor); + //printf("%d %d %d %d\n", sx, sy, svq, coor); + sx++; + }else sx = 0; + if(sx == width){ + sy++; + if(svq == 7) coor++; + if(sy == height && svq == 8) coor = rand()%NUM_COLORS; + } + }else sy = 0; } /*-----------ding-------------*/ int ding(int q){ -// if(yy0){ - yy++; - d3y--; - } - } - if(bakax<0){ - xx--; - }else - if(bakax>0){ - xx++; - } - }else{ - if(q==16) - { - if(!bakax){ - xx--;//=TILEWH; - }else if(bakax>0){ - xx++;//=TILEWH; - } - if(!bakay){ - yy--;//=TILEWH; - }else if(bakay>0){ - yy++;//=TILEWH; - } - }else{ - if(!bakax){ -// xx-=TILEWH; - xx--; - }else if(bakax>1){ -// xx+=TILEWH; - xx++; - } - if(!bakay){ -// yy-=TILEWH; - yy--; - }else if(bakay>1){ -// yy+=TILEWH; - yy++; - } - } - } - // fixer -// if(q!=16){ + if((q == 2 + ||q==4 + ||q==16 + ) && gq == BONK){ + if(coor < HGQ && coor < LGQ) coor = LGQ; + if(coor < HGQ-1){ + coor++; + }else{ coor = LGQ; + bakax = rand()%3; bakay = rand()%3; + } + } + + if(q==8){ colorz(); return gq; }else + if(q==10){ ssd(q); /*printf("%d\n", coor);*/ }else + if(q==5){ colortest(); return gq; }else + if(q==11){ colorz(); delay(100); return gq; } + if(q==6){ + coor = rand()%NUM_COLORS; +//---- cls(coor, vaddr); + cls(coor, vga); + //updatevbuff(); + } + + if(q==7||q==9){ + if(gq < HGQ){ + if(q == 7) ssd(q); + if(q == 9){ ssd(q); coor++; } + gq++; + }else gq = LGQ; + } + if((q<5 && gq0){ + yy++; + d3y--; + } + } + if(bakax<0){ + xx--; + }else + if(bakax>0){ + xx++; + } + }else{ + if(q==16) + { + if(!bakax){ + xx--;//=TILEWH; + }else if(bakax>0){ + xx++;//=TILEWH; + } + if(!bakay){ + yy--;//=TILEWH; + }else if(bakay>0){ + yy++;//=TILEWH; + } + }else{ + if(!bakax){ +// xx-=TILEWH; + xx--; + }else if(bakax>1){ +// xx+=TILEWH; + xx++; + } + if(!bakay){ +// yy-=TILEWH; + yy--; + }else if(bakay>1){ +// yy+=TILEWH; + yy++; + } + } + } + // fixer +// if(q!=16){ //if(q!=16) -// if(xx<(0/*-(TILEWH/2)*/)) xx=(width/*+(TILEWH)*/); - if(yy<0) yy=(height*3); -// if(xx>(width/*+(TILEWH)*/)) xx=(0/*-(TILEWH/2)*/); - if(yy>(height*3)) yy=0; -// } +// if(xx<(0/*-(TILEWH/2)*/)) xx=(width/*+(TILEWH)*/); + if(yy<0) yy=(height*3); +// if(xx>(width/*+(TILEWH)*/)) xx=(0/*-(TILEWH/2)*/); + if(yy>(height*3)) yy=0; +// } //interesting effects - if(q==16) - { - int tx=0,ty=0; - tx+=xx+16; - ty+=yy+16; - putPixel_X(tx, ty, coor); - //drawrect(tx, ty, tx+TILEWH, ty+TILEWH, coor); - //printf("%d %d %d %d %d %d\n", xx, yy, tx, ty, TILEWH); - - // plot the pixel -//---- ppf(xx, yy, coor, vga); - }else /*if(xx>=0 && xx=0 && yy<(height*3))*/{ -// putColorBox_X(xx, yy, TILEWH, TILEWH, coor); + if(q==16) + { + int tx=0,ty=0; + tx+=xx+16; + ty+=yy+16; + putPixel_X(tx, ty, coor); + //drawrect(tx, ty, tx+TILEWH, ty+TILEWH, coor); + //printf("%d %d %d %d %d %d\n", xx, yy, tx, ty, TILEWH); + + // plot the pixel +//---- ppf(xx, yy, coor, vga); + }else /*if(xx>=0 && xx=0 && yy<(height*3))*/{ +// putColorBox_X(xx, yy, TILEWH, TILEWH, coor); //++++0000 - putPixel_X(xx, yy, coor); - } + putPixel_X(xx, yy, coor); + } -//---- if(q==2) ppf(rand()%, rand()%height, 0, vga); -// if(q==2) putColorBox_X(rand()%width, rand()%(height*3), TILEWH, TILEWH, 0); +//---- if(q==2) ppf(rand()%, rand()%height, 0, vga); +// if(q==2) putColorBox_X(rand()%width, rand()%(height*3), TILEWH, TILEWH, 0); //++++0000 - if(q==2) putPixel_X(rand()%width, rand()%(height*3), 0); - if(q==16) putPixel_X(rand()%width, rand()%(height*3), 0); - if(q==2||q==4||q==16){ bakax = rand()%3; bakay = rand()%3; } - gq++; + if(q==2) putPixel_X(rand()%width, rand()%(height*3), 0); + if(q==16) putPixel_X(rand()%width, rand()%(height*3), 0); + if(q==2||q==4||q==16){ bakax = rand()%3; bakay = rand()%3; } + gq++; //if(xx<0||xx>320||yy<0||yy>(height*3)) -// printf("%d %d %d %d %d %d\n", xx, yy, coor, bakax, bakay, getPixel_X(xx,yy)); -// printf("%d\n", getPixel_X(xx,yy)); +// printf("%d %d %d %d %d %d\n", xx, yy, coor, bakax, bakay, getPixel_X(xx,yy)); +// printf("%d\n", getPixel_X(xx,yy)); //0000 -// drawText(0, 0, 15, getPixel_X(xx,yy)); - }else gq = LGQ; - return gq; +// drawText(0, 0, 15, getPixel_X(xx,yy)); + }else gq = LGQ; + return gq; } @@ -886,123 +886,125 @@ int ding(int q){ #include void doTest(void) - { - int p, x, y, pages; - - /* This is the way to calculate the number of pages available. */ - pages = 65536L/(widthBytes*height); // apparently this takes the A000 address -// if(height==240) pages++; - -// printf("%d\n", pages); - - for (p = 0; p <= pages; ++p) - { - setActivePage(p); - - /* On each page draw a single colored border, and dump the palette - onto a small square about the middle of the page. */ - - //{ - for (x = 0; x <= width; ++x) - { - putPixel_X(x, 0, p+1); - if(p!=pages) putPixel_X(x, height-1, p+1); - else if(height==240) putPixel_X(x, 99-1, p+1); - } - - for (y = 0; y <= height; ++y) - { - putPixel_X(0, y, p+1); - if(p!=pages) putPixel_X(width-1, y, p+1); - else if(height==240) putPixel_X(width-1, y, p+1); - } - - for (x = 0; x < TILEWH; ++x) - for (y = 0; y < TILEWH; ++y) - putPixel_X(x+(p+2)*16, y+(p+2)*TILEWH, x + y*TILEWH); - //} - - } - - /* Each pages will now contain a different image. Let the user cycle - through all the pages by pressing a key. */ - for (p = 0; p < pages; ++p) - { - setVisiblePage(p); - getch(); - } - - } + { + int p, x, y, pages; + + /* This is the way to calculate the number of pages available. */ + pages = 65536L/(widthBytes*height); // apparently this takes the A000 address +// if(height==240) pages++; + +// printf("%d\n", pages); + + for (p = 0; p <= pages; ++p) + { + setActivePage(p); + + /* On each page draw a single colored border, and dump the palette + onto a small square about the middle of the page. */ + + //{ + for (x = 0; x <= width; ++x) + { + putPixel_X(x, 0, p+1); + if(p!=pages) putPixel_X(x, height-1, p+1); + else if(height==240) putPixel_X(x, 99-1, p+1); + } + + for (y = 0; y <= height; ++y) + { + putPixel_X(0, y, p+1); + if(p!=pages) putPixel_X(width-1, y, p+1); + else if(height==240) putPixel_X(width-1, y, p+1); + } + + for (x = 0; x < TILEWH; ++x) + for (y = 0; y < TILEWH; ++y) + putPixel_X(x+(p+2)*16, y+(p+2)*TILEWH, x + y*TILEWH); + //} + + } + + /* Each pages will now contain a different image. Let the user cycle + through all the pages by pressing a key. */ + for (p = 0; p < pages; ++p) + { + setVisiblePage(p); + getch(); + } + + } /* * Library test (program) entry point. */ int main(void) - { - int key,d; - //short int temp; - // main variables - d=1; // switch variable - key=4; // default screensaver number -// puts("First, have a look at the 320x200 mode. I will draw some rubbish"); -// puts("on all of the four pages, then let you cycle through them by"); -// puts("hitting a key on each page."); -// puts("Press a key when ready..."); -// getch(); - -// doTest(); - -// puts("Then, check out Mode X, 320x240 with 3 (and a half) pages."); -// puts("Press a key when ready..."); -// getch(); + { + int key,d; + //short int temp; + // main variables + d=1; // switch variable + key=4; // default screensaver number +// puts("First, have a look at the 320x200 mode. I will draw some rubbish"); +// puts("on all of the four pages, then let you cycle through them by"); +// puts("hitting a key on each page."); +// puts("Press a key when ready..."); +// getch(); + +// doTest(); + +// puts("Then, check out Mode X, 320x240 with 3 (and a half) pages."); +// puts("Press a key when ready..."); +// getch(); //++++0000 - setvideo(1); - /*temp = loadfontX("vga8x8.fnt"); + setvideo(1); + /*temp = loadfontX("vga8x8.fnt"); - if (temp) { - putstringX(0, 0, "bakapi!", 2); - } - getch();*/ + if (temp) { + putstringX(0, 0, "bakapi!", 2); + } + getch();*/ // screen savers /*while(d!=0){ // on! - if(!kbhit()){ // conditions of screen saver - ding(key); - }else{ - setvideo(0); - // user imput switch - printf("Enter 1, 2, 3, 4, or 6 to run a screensaver, or enter 5 to quit.\n", getch()); // prompt the user - scanf("%d", &key); - //if(key==3){xx=yy=0;} // crazy screen saver wwww - if(key==5) d=0; - setvideo(1); - } - }*/ // else off - while(!kbhit()){ // conditions of screen saver - ding(4); - } - //end of screen savers - doTest(); -// getch(); - - while(!kbhit()){ // conditions of screen saver -// hScroll(1); -// scrolly(1); - vScroll(1); -// delay(100); -// Play(); - } + if(!kbhit()){ // conditions of screen saver + ding(key); + }else{ + setvideo(0); + // user imput switch + printf("Enter 1, 2, 3, 4, or 6 to run a screensaver, or enter 5 to quit.\n", getch()); // prompt the user + scanf("%d", &key); + //if(key==3){xx=yy=0;} // crazy screen saver wwww + if(key==5) d=0; + setvideo(1); + } + }*/ // else off + while(!kbhit()){ // conditions of screen saver + ding(4); + } + //end of screen savers + doTest(); +// getch(); + + while(!kbhit()){ // conditions of screen saver + hScroll(1); +// scrolly(1); +// vScroll(1); +// delay(100); +// Play(); + } //++++0000 - setvideo(0); - printf("wwww\n[%d][%d]\n", width,height); -// setvideo(0); + setvideo(0); + printf("Resolution:\n[%d][%d]\n", width,height); +// setvideo(0); //mxTerm(); -//mxGetVersion(); - puts("where to next? It's your move! wwww"); - printf("bakapi ver. 1.04.09.03\nis made by sparky4i†ƒÖ…j feel free to use it ^^\nLicence: GPL v2\n"); - return 0; - } +//mxGetVersion(); + + printf("[%d]\n", mxGetVersion()); + puts("where to next? It's your move! wwww"); + printf("bakapi ver. 1.04.09.03\nis made by sparky4i†ƒÖ…j feel free to use it ^^\nLicence: GPL v2\n"); + return 0; + } #endif diff --git a/16/dos_gfx.h b/16/dos_gfx.h index 7a0b100e..d7fb0474 100644 --- a/16/dos_gfx.h +++ b/16/dos_gfx.h @@ -5,17 +5,17 @@ #include "lib\lib_com.h" #include "lib\x\modex.h" -#define NUM_COLORS 256 // number of colors in vga mode +#define NUM_COLORS 256 // number of colors in vga mode //static lgq=NUM_COLORS/(1/8) //static hgq=NUM_COLORS/(1/8) -#define BONK 400 -#define LGQ 32 -#define HGQ 56 -#define TILEWH 16 -/*byte SIZE = 80; // Size = 40 = 1 across, 4 down - // Size = 80 = 2 across, 2 down - // Size = 160 = 4 across, 1 down*/ -//#define VMEM 0xA000 // = vga +#define BONK 400 +#define LGQ 32 +#define HGQ 56 +#define TILEWH 16 +/*byte SIZE = 80; // Size = 40 = 1 across, 4 down + // Size = 80 = 2 across, 2 down + // Size = 160 = 4 across, 1 down*/ +//#define VMEM 0xA000 // = vga byte Xfont[2048]; void drawChar(int x, int y, int color, byte c); diff --git a/16/dos_kb.c b/16/dos_kb.c index 9e813b89..74f5a48a 100644 --- a/16/dos_kb.c +++ b/16/dos_kb.c @@ -28,11 +28,11 @@ void interrupt newkb(void){ kee = inp(0x60); /* Read the keyboard scan code */ /* Clear keyboard controller on XT machines */ - qx = inp(0x61); /* Get keyboard control register */ + qx = inp(0x61); /* Get keyboard control register */ qx |= 0x82; - outp(0x61, qx); /* Toggle acknowledge bit high */ + outp(0x61, qx); /* Toggle acknowledge bit high */ qx &= 0x7F; - outp(0x61, qx); /* Toggle acknowledge bit low */ + outp(0x61, qx); /* Toggle acknowledge bit low */ /* Interpret the scan code and set our flags */ #ifdef TESTING @@ -93,11 +93,11 @@ void setkb(int vq){ } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\ - * keyp * - * * - * Returns the status of the key requested. * + * keyp * + * * + * Returns the status of the key requested. * * The status is 1 if the key is pressed or has been pressed since the * - * last call to this function for that particular key. * + * last call to this function for that particular key. * \* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ int keyp(byte c){ register char retVal; diff --git a/16/lib/x/MODEX.BAK b/16/lib/x/MODEX.BAK index 0069d2e6cabd41c7fdba764cdfe2a5f913c339f1..5916999f9f258f265688f80c028c4fe85d1dd82b 100644 GIT binary patch literal 5632 zcmeI0ONbm*6o&tvbWbLUI>wHZOp?juBr{PQ5EI1UB4AH-x~8DI`%<^2D=cUwZkb@h=TFm^_%=E|q z-*e8by1(2E+y+dczAkLX%<$Ce>fJp%yl-;`c&+Vj@xo!C9gX`Zx4GNX`N>mxyWh)u zozw2;bU)6<>*o4PTd@XgnQC=6JGk)2xb=GVNvGYKeYuV4Kc_Y}+rY)vm8VPMVN-uG%=>Ub-GmvUYz@V-;?GRIpEyo~cQf%mnR zH}LgxtlB#vz7blk)sf%d_5J*dHwSXC;5?{lWU@m(cH)KfhS% z`9Kl)hB^Uq76|15uAveNUCy8o=N&#)g^ zUY}N~PxXFet?R#CAy3Qt&sw4X-qq%r`}GTX=6wBfY5mlBPQ1UJjlT)^H^56XZTz7r`JkH=rM8Jzj&%L^Vvx^BH9k1Yt6TmW_IbNOtb=;v3wR{An zj#8S#mh#T&j22Ly={P-Dr6qJ~ZD=kskH6UTi9Fch~C4#S|@Y~`)fUfmOGv3$l>wQo-KLH#3LBsZ+P;`Y{HK0N3E3ccU2T9JSk9E!}y1 zVgC6xXusmKQM|Yq1ilV@|6us_6@3(0{Z6HiB1xZE{llP7BzwP+?3a?xi{kmAkVl#y#r-S`wcs!HQ}X*Iy;=Xx&rh|(`dggfJtE-C_SxkzP8%uCdriFA1J?0z*W3Yy>>YpxcnOB1j7D+Y ze6yU>7|gxEa@?i~40%>m!wtuYq6S7i_h|*U93Nz~j@ypYf;M3;Bi1L&sEIqCyR?OI z$Gw8KG2vLXX$O;@W7@@C&s}XQ_|I?4zc%X4?*R)$p(F2;NhU+Id#I}JwoY{SjXb^S+EGIO~ zS4P80MAH~{zb7fx?QPO(k`684rel@R6VyDXw1+9jd5coaI@T@fVa{_zIp#g5bchAd e9XiI6XH6$qcHGx=iWSFYht9BO`2X`K4g3NWB*Iz% diff --git a/16/lib/x/MODEX.H b/16/lib/x/MODEX.H index 2c1f1ebe..4952856a 100644 --- a/16/lib/x/MODEX.H +++ b/16/lib/x/MODEX.H @@ -48,7 +48,7 @@ #define MXBOOL short int #define MXSINT short int #define MXUINT unsigned short int -#define MXAPI far pascal +#define MXAPI //far pascal #define MXPTR void far * // Functions diff --git a/16/scroll.txt b/16/scroll.txt index 89127e89..04f4acc0 100644 --- a/16/scroll.txt +++ b/16/scroll.txt @@ -5,12 +5,12 @@ SS SS CC CC RR RR OO OO LL LL II NNN NN GG GG SS CC RR RR OO OO LL LL II NNNN NN GG SSSSS CC RR RR OO OO LL LL II NN NN NN GG - SS CC RRRRR OO OO LL LL II NN NNNN GG GGG + SS CC RRRRR OO OO LL LL II NN NNNN GG GGG SS SS CC CC RR RR OO OO LL LL II NN NNN GG GG SSSSS CCCCC RR RR OOOOO LLLLL LLLLL IIIIII NN NN GGGGG - by Alec Thomas (Kestrel) of FORGE Software Australia - (c9223826@cs.newcastle.edu.au) + by Alec Thomas (Kestrel) of FORGE Software Australia + (c9223826@cs.newcastle.edu.au) ------------ @@ -36,7 +36,7 @@ on with the STUFF!!! the same with columns (except 0-319), etc. unless otherwise stated) ******************************************************************************** -* X-MODE SCROLLING * +* X-MODE SCROLLING * ******************************************************************************** ------------------ VERTICAL SCROLLING @@ -174,28 +174,28 @@ Perhaps a little diagram will clarify it. The following picture is of a standard X-mode addressing scheme with the OFFSET register set to 80. ROW OFFSET - 0 0 ======================== - 1 80 [ ] - 2 160 [ ] - .. .. [ VISIBLE ] - [ SCREEN ] - [ ] - [ ] - .. .. [ ] + 0 0 ======================== + 1 80 [ ] + 2 160 [ ] + .. .. [ VISIBLE ] + [ SCREEN ] + [ ] + [ ] + .. .. [ ] 199 15920 ======================== and the next diagram is of a modified addressing scheme with the OFFSET register set to 82 (to give us 4 extra pixels on each side of the screen) ROW OFFSET -0 0 ------========================------ -1 82 | V [ ] V | -2 164 | I [ ] I | -.. .. | N S [ VISIBLE ] N S | - | O I [ SCREEN ] O I | - | T B [ ] T B | - | L [ ] L | -.. .. | E [ ] E | +0 0 ------========================------ +1 82 | V [ ] V | +2 164 | I [ ] I | +.. .. | N S [ VISIBLE ] N S | + | O I [ SCREEN ] O I | + | T B [ ] T B | + | L [ ] L | +.. .. | E [ ] E | 199 16318 ------========================------ Beautiful!!! @@ -230,7 +230,7 @@ I'm sorry about this being so confusing but it's a bit difficult to explain. ******************************************************************************** -* STANDARD VGA SCROLLING * +* STANDARD VGA SCROLLING * ******************************************************************************** Without X-mode, there is no easy way to do scrolling using the VGA hardware. So basically, you have to resort to redrawing the entire screen for every @@ -258,7 +258,7 @@ END WHILE ******************************************************************************** -* PARALLAX SCROLLING * +* PARALLAX SCROLLING * ******************************************************************************** Parallax scrolling is when the "world" appears to have different levels of perspective. That is, images further away from the viewer move @@ -291,7 +291,7 @@ colour to what was there previously). ******************************************************************************** -* DISCLAIMER * +* DISCLAIMER * ******************************************************************************** I'm sorry if any of this is confusing, but hey that's half the fun of it - figuring out what the hell I'm raving on about :) -- 2.39.5