]> 4ch.mooo.com Git - 16.git/commitdiff
don't use printf. use modexprint. explain why. fontgfx shows grid of
authorJonathan Campbell <jonathan@castus.tv>
Sun, 17 Apr 2016 03:34:29 +0000 (20:34 -0700)
committerJonathan Campbell <jonathan@castus.tv>
Sun, 17 Apr 2016 03:34:29 +0000 (20:34 -0700)
font chars correctly now. not sure what the long pause at startup is.

pcx2vrl
pcxsscut
src/fontgfx.c
vrl2vrs
vrsdump

diff --git a/pcx2vrl b/pcx2vrl
index 3d9ac6e6d0e4fe19bb8f1962de5fd02253dea7be..06179c758ee3353a54ef7bc76b2422c342d53dd7 100755 (executable)
Binary files a/pcx2vrl and b/pcx2vrl differ
index d743ac3b8ac58a73b3cb2380e2367aee9b167169..2ce56d285d26ddb8a30e5f7bf2839df2bde1fa75 100755 (executable)
Binary files a/pcxsscut and b/pcxsscut differ
index ee2427f07595fc1195a7adb4787d95ead01fba8e..89e2e2f563d3de2c976ca9a368b6d2b3079c0034 100755 (executable)
@@ -38,7 +38,7 @@ void main(int argc, char near *argv[])
        //JMOJI\r
        static byte e;\r
        //word ri;\r
-       byte pee[2];\r
+       byte pee[6]; // must be large enough for sprintf("%zc",...) and sprintf("%u",(byte value))\r
        static byte ibmlogo[]="IIIIIII  BBBBBBBBB    MMMMM       MMMMM\n\\r
 IIIIIII  BBBBBBBBBBB  MMMMMM     MMMMMM\n\\r
   III     BBB    BBB   MMMMMM   MMMMMM\n\\r
@@ -67,7 +67,7 @@ IIIIIII  BBBBBBBBB    MMMM    M    MMMM\n\
 ,'___...---~~~\n\\r
 ";\r
 //     static byte *rosa;\r
-//     static word chx;//, chy, colpee;\r
+       static word chx, chy, colpee;\r
        static word z;\r
        textInit();\r
 \r
@@ -107,42 +107,43 @@ IIIIIII  BBBBBBBBB    MMMM    M    MMMM\n\
        gvar.video.page[0].width += (16*2);\r
        gvar.video.page[0].height += (16*2);\r
        modexShowPage(&gvar.video.page[0]);\r
+       vga_read_crtc_mode(&cm);\r
+       // NTS: We're in Mode-X now. printf() is useless. Do not use printf(). Or INT 10h text printing. Or DOS console output.\r
        //modexprint(16, 16, 1, 15, "wwww");\r
        //getch();\r
-//     chx=0;\r
-//     chy=0;\r
+       chx=0;\r
+       chy=0;\r
 //     colpee=32;\r
-       bios_cls();\r
+//     bios_cls();\r
        /* position the cursor to home */\r
-       vga_moveto(0,0);\r
-       vga_sync_bios_cursor();\r
+//     vga_moveto(0,0);\r
+//     vga_sync_bios_cursor();\r
        for(e=0x00, z=0; e<=0xFE; e++, z++)\r
        {\r
                //if(chx+8>(gvar.video.page[0].width/2))\r
                if((z)+1>16)\r
                {\r
-//                     chx=0;\r
-//                     chy+=8;\r
-//                     sprintf(pee,"%u", colpee);\r
-//                     modexprint(&gvar.video.page[0], 200, 200, 1, 47, 0, &pee, 1);\r
+                       chx=0;\r
+                       chy+=8;\r
+                       sprintf(pee,"%u", colpee);\r
+                       modexprint(&gvar.video.page[0], 200, 200, 1, 47, 0, &pee, 1);\r
                        z=0;\r
-                       printf("\n");\r
+//                     printf("\n");\r
                        //getch();\r
                }\r
-               printf("%zc", e);\r
-//             modexprint(&gvar.video.page[0], chx, chy, 1, 0, colpee, &e, 1);\r
-//             chx+=9;\r
-//             colpee++;\r
+               sprintf(pee, "%zc", e);\r
+               modexprint(&gvar.video.page[0], chx, chy, 1, 0, colpee, &e, 1);\r
+               chx+=9;\r
+               colpee++;\r
 //             if(colpee>=32+24) colpee=32;\r
        }\r
-       //modexprint(100, 100, 1, 47, 0, "wwww");\r
        getch();\r
+       //modexprint(100, 100, 1, 47, 0, "wwww");\r
 //     modexprint(0, 0, 1, 0, colpee, &rose);\r
 //++++ modexprint(&gvar.video.page[0], 0, 0, 0, 0, colpee, &ibmlogo);\r
 //     modexprintbig(&gvar.video.page[0], 0, 0, 1, colpee, 0, "IBM");\r
 //     modexprint(0, 0, 1, 0, colpee, ROSE);\r
 //++++ getch();\r
-       vga_read_crtc_mode(&cm);\r
        VGAmodeX(0, 1, &gvar);\r
 //     rosa=malloc(sizeof(ROSE));\r
 //     (*rosa)=(byte)ROSE;\r
diff --git a/vrl2vrs b/vrl2vrs
index acdd4bda2f0dd8772cdce97a19b6c906e4e09f8e..cee2d1d5ec2093825ded51e0e6c9b8b836e38ee9 100755 (executable)
Binary files a/vrl2vrs and b/vrl2vrs differ
diff --git a/vrsdump b/vrsdump
index 8ba0497deb819d75caeef21a3a0d4086b394845b..a75a903a84ae3d98973e3aecab4a6c08fce8a764 100755 (executable)
Binary files a/vrsdump and b/vrsdump differ