void\r
modexShowPage(page_t *page) {\r
word high_address, low_address, offset;\r
-// byte crtcOffset;\r
+ byte crtcOffset;\r
\r
/* calculate offset */\r
offset = (word) page->data;\r
offset += page->dx >> 2;\r
\r
/* calculate crtcOffset according to virtual width */\r
-// crtcOffset = page->width >> 3;\r
+ crtcOffset = page->width >> 3;\r
\r
high_address = HIGH_ADDRESS | (offset & 0xff00);\r
low_address = LOW_ADDRESS | (offset << 8);\r
//+=+= while ((inp(INPUT_STATUS_1) & DISPLAY_ENABLE));\r
outpw(CRTC_INDEX, high_address);\r
outpw(CRTC_INDEX, low_address);\r
-// outp(CRTC_INDEX, 0x13);\r
-// outp(CRTC_DATA, crtcOffset);\r
+ outp(CRTC_INDEX, 0x13);\r
+ outp(CRTC_DATA, crtcOffset);\r
+\r
+ /* wait for one retrace */\r
+//+=+= while (!(inp(INPUT_STATUS_1) & VRETRACE));\r
+\r
+ /* do PEL panning here */\r
+ outp(AC_INDEX, 0x33);\r
+ outp(AC_INDEX, (page->dx & 0x03) << 1);\r
+}\r
+\r
+//\r
+// testing version of void modexShowPage()\r
+//\r
+void\r
+modexShowPage_(page_t *page)\r
+{\r
+ word high_address, low_address, offset;\r
+ byte crtcOffset;\r
+\r
+ /* calculate offset */\r
+ offset = (word) page->data;\r
+ offset += page->dy * (page->width >> 2 );\r
+ offset += page->dx >> 2;\r
+\r
+ /* calculate crtcOffset according to virtual width */\r
+ crtcOffset = page->sw >> 3;\r
+\r
+ high_address = HIGH_ADDRESS | (offset & 0xff00);\r
+ low_address = LOW_ADDRESS | (offset << 8);\r
+\r
+ /* wait for appropriate timing and then program CRTC */\r
+//+=+= while ((inp(INPUT_STATUS_1) & DISPLAY_ENABLE));\r
+ outpw(CRTC_INDEX, high_address);\r
+ outpw(CRTC_INDEX, low_address);\r
+ outp(CRTC_INDEX, 0x13);\r
+ outp(CRTC_DATA, crtcOffset);\r
\r
/* wait for one retrace */\r
//+=+= while (!(inp(INPUT_STATUS_1) & VRETRACE));\r