• R/O
  • HTTP
  • SSH
  • HTTPS

提交

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

wwww


Commit MetaInfo

修订版54e80274a159f2c8f12bbb284403927616c686c5 (tree)
时间2016-04-17 12:34:29
作者Jonathan Campbell <jonathan@cast...>
CommiterJonathan Campbell

Log Message

don't use printf. use modexprint. explain why. fontgfx shows grid of
font chars correctly now. not sure what the long pause at startup is.

更改概述

差异

Binary files a/pcx2vrl and b/pcx2vrl differ
Binary files a/pcxsscut and b/pcxsscut differ
--- a/src/fontgfx.c
+++ b/src/fontgfx.c
@@ -38,7 +38,7 @@ void main(int argc, char near *argv[])
3838 //JMOJI
3939 static byte e;
4040 //word ri;
41- byte pee[2];
41+ byte pee[6]; // must be large enough for sprintf("%zc",...) and sprintf("%u",(byte value))
4242 static byte ibmlogo[]="IIIIIII BBBBBBBBB MMMMM MMMMM\n\
4343 IIIIIII BBBBBBBBBBB MMMMMM MMMMMM\n\
4444 III BBB BBB MMMMMM MMMMMM\n\
@@ -67,7 +67,7 @@ IIIIIII BBBBBBBBB MMMM M MMMM\n\
6767 ,'___...---~~~\n\
6868 ";
6969 // static byte *rosa;
70-// static word chx;//, chy, colpee;
70+ static word chx, chy, colpee;
7171 static word z;
7272 textInit();
7373
@@ -107,42 +107,43 @@ IIIIIII BBBBBBBBB MMMM M MMMM\n\
107107 gvar.video.page[0].width += (16*2);
108108 gvar.video.page[0].height += (16*2);
109109 modexShowPage(&gvar.video.page[0]);
110+ vga_read_crtc_mode(&cm);
111+ // NTS: We're in Mode-X now. printf() is useless. Do not use printf(). Or INT 10h text printing. Or DOS console output.
110112 //modexprint(16, 16, 1, 15, "wwww");
111113 //getch();
112-// chx=0;
113-// chy=0;
114+ chx=0;
115+ chy=0;
114116 // colpee=32;
115- bios_cls();
117+// bios_cls();
116118 /* position the cursor to home */
117- vga_moveto(0,0);
118- vga_sync_bios_cursor();
119+// vga_moveto(0,0);
120+// vga_sync_bios_cursor();
119121 for(e=0x00, z=0; e<=0xFE; e++, z++)
120122 {
121123 //if(chx+8>(gvar.video.page[0].width/2))
122124 if((z)+1>16)
123125 {
124-// chx=0;
125-// chy+=8;
126-// sprintf(pee,"%u", colpee);
127-// modexprint(&gvar.video.page[0], 200, 200, 1, 47, 0, &pee, 1);
126+ chx=0;
127+ chy+=8;
128+ sprintf(pee,"%u", colpee);
129+ modexprint(&gvar.video.page[0], 200, 200, 1, 47, 0, &pee, 1);
128130 z=0;
129- printf("\n");
131+// printf("\n");
130132 //getch();
131133 }
132- printf("%zc", e);
133-// modexprint(&gvar.video.page[0], chx, chy, 1, 0, colpee, &e, 1);
134-// chx+=9;
135-// colpee++;
134+ sprintf(pee, "%zc", e);
135+ modexprint(&gvar.video.page[0], chx, chy, 1, 0, colpee, &e, 1);
136+ chx+=9;
137+ colpee++;
136138 // if(colpee>=32+24) colpee=32;
137139 }
138- //modexprint(100, 100, 1, 47, 0, "wwww");
139140 getch();
141+ //modexprint(100, 100, 1, 47, 0, "wwww");
140142 // modexprint(0, 0, 1, 0, colpee, &rose);
141143 //++++ modexprint(&gvar.video.page[0], 0, 0, 0, 0, colpee, &ibmlogo);
142144 // modexprintbig(&gvar.video.page[0], 0, 0, 1, colpee, 0, "IBM");
143145 // modexprint(0, 0, 1, 0, colpee, ROSE);
144146 //++++ getch();
145- vga_read_crtc_mode(&cm);
146147 VGAmodeX(0, 1, &gvar);
147148 // rosa=malloc(sizeof(ROSE));
148149 // (*rosa)=(byte)ROSE;
Binary files a/vrl2vrs and b/vrl2vrs differ
Binary files a/vrsdump and b/vrsdump differ