]> 4ch.mooo.com Git - 16.git/commitdiff
stride..
authorsparky4 <sparky4@cock.li>
Mon, 18 Apr 2016 02:04:24 +0000 (21:04 -0500)
committersparky4 <sparky4@cock.li>
Mon, 18 Apr 2016 02:04:24 +0000 (21:04 -0500)
src/fontgfx.c
src/lib/modex16.c

index d76cfc33b31f2fbc7ce5b075af244148c0429cd7..7d4e2102018c62d2e6c6ba73e0327b05d2b5fd7b 100755 (executable)
@@ -34,6 +34,7 @@ global_game_variables_t gvar;
 \r
 void main(int argc, char near *argv[])\r
 {\r
+       struct vga_mode_params cm;\r
        //JMOJI\r
        static byte e;\r
        //word ri;\r
@@ -106,7 +107,6 @@ 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_state.vga_stride=gvar.video.page[0].width/4;\r
        //modexprint(16, 16, 1, 15, "wwww");\r
        //getch();\r
 //     chx=0;\r
@@ -148,5 +148,7 @@ IIIIIII  BBBBBBBBB    MMMM    M    MMMM\n\
        printf("\n%s\n", rose);\r
        //printf("\nh=%d\n", '8');\r
 //     printf("\n%c\n", e);\r
+       vga_read_crtc_mode(&cm);\r
+       printf("cm.offset=%d\n", cm.offset);\r
        printf("vga_state.vga_stride=%d\n", vga_state.vga_stride);\r
 }\r
index c1c8eb5df107301c38b3ef77789d5925a213185b..e8e5208b098eb6220b2bf49e60473a46d86cda96 100755 (executable)
@@ -115,6 +115,8 @@ void modexEnter(sword vq, boolean cmem, global_game_variables_t *gv)
                        cm.clock_select = 0; /* misc register = 0xE3  25MHz */\r
                        cm.vsync_neg = 1;\r
                        cm.hsync_neg = 1;\r
+                       vga_state.vga_stride=88;\r
+                       cm.offset=88;\r
                        break;\r
                case 2: // TODO: 160x120 according to ModeX_160x120regs\r
                        return;\r