}\r
break;\r
case 2:\r
- CRTParmCount = sizeof(ModeX_192x144regs) / sizeof(ModeX_192x144regs[0]);\r
+ CRTParmCount = sizeof(ModeX_160x120regs) / sizeof(ModeX_160x120regs[0]);\r
/* width and height */\r
- gv->video.page[0].sw=192;\r
- gv->video.page[0].sh=144;\r
+ gv->video.page[0].sw=120;\r
+ gv->video.page[0].sh=160;\r
\r
/* send the CRTParms */\r
for(i=0; i<CRTParmCount; i++) {\r
- outpw(CRTC_INDEX, ModeX_192x144regs[i]);\r
+ outpw(CRTC_INDEX, ModeX_160x120regs[i]);\r
}\r
\r
/* clear video memory */\r
ptr[i] = 0x0000;\r
}\r
break;\r
+ case 4:\r
+ CRTParmCount = sizeof(ModeX_192x144regs) / sizeof(ModeX_192x144regs[0]);\r
+ /* width and height */\r
+ gv->video.page[0].sw=192;\r
+ gv->video.page[0].sh=144;\r
+\r
+ /* send the CRTParms */\r
+ for(i=0; i<CRTParmCount; i++) {\r
+ outpw(CRTC_INDEX, ModeX_192x144regs[i]);\r
+ }\r
+\r
+ /* clear video memory */\r
+ outpw(SC_INDEX, 0x0f02);\r
+ for(i=0; i<0x8000; i++) {\r
+ ptr[i] = 0x0000;\r
+ }\r
+ break;\r
case 5:\r
CRTParmCount = sizeof(ModeX_256x192regs) / sizeof(ModeX_256x192regs[0]);\r
/* width and height */\r
modexDrawSpriteRegion(page_t *page, int x, int y,\r
int rx, int ry, int rw, int rh, bitmap_t *bmp) {\r
word poffset = (word)page->data + y*(page->width/4) + x/4;\r
- byte *data = bmp->data;//+bmp->offset;\r
+ byte huge *data = bmp->data;//+bmp->offset;\r
word bmpOffset = (word) data + ry * bmp->width + rx;\r
word width = rw;\r
word height = rh;\r
MOV AX, height ; start the row counter\r
MOV rowCounter, AX ;\r
MOV DI, poffset ; go to the first pixel\r
- MOV DI, bmpOffset ; go to the bmp pixel\r
+ MOV SI, bmpOffset ; go to the bmp pixel\r
ROW_LOOP:\r
MOV CX, width ; count the columns\r
SCAN_LOOP:\r
}\r
}\r
\r
+void\r
+modexPalOverscan(byte *p, word col)\r
+{\r
+ modexWaitBorder();\r
+ outp(PAL_WRITE_REG, 0); /* start at the beginning of palette */\r
+ outp(PAL_DATA_REG, col);\r
+}\r
+\r
//color checker~\r
//i want to make another vesion that checks the palette when the palette is being appened~\r
void chkcolor(bitmap_t *bmp, word *q, word *a, word *aa, word *z, word *i/*, word *offset*/)\r