]> 4ch.mooo.com Git - 16.git/commitdiff
make corrections to crtc parameters for 320x240.
authorJonathan Campbell <jonathan@castus.tv>
Tue, 5 Apr 2016 20:24:53 +0000 (13:24 -0700)
committerJonathan Campbell <jonathan@castus.tv>
Tue, 5 Apr 2016 20:24:53 +0000 (13:24 -0700)
src/lib/modex16.c

index 0d10603776a3b35de763651a6d1a274fa78e3998..1328ac59caaa3077136aba5b817587258cb2907e 100755 (executable)
@@ -129,20 +129,20 @@ void modexEnter(sword vq, boolean cmem, global_game_variables_t *gv)
 //     0xe317            /* turn on byte mode */\r
 \r
                        // 320x240 mode 60Hz\r
-                       cm.horizontal_total=0x5f; /* CRTC[0]             -5 */\r
-                       cm.horizontal_display_end=0x4f; /* CRTC[1]       -1 */\r
-                       cm.horizontal_blank_start=0x50; /* CRTC[2] */\r
-                       cm.horizontal_blank_end=0x82;   /* CRTC[3] bit 0-4 & CRTC[5] bit 7 */\r
+                       cm.horizontal_total=0x5f + 5; /* CRTC[0]             -5 */\r
+                       cm.horizontal_display_end=0x4f + 1; /* CRTC[1]       -1 */\r
+                       cm.horizontal_blank_start=0x50 + 1; /* CRTC[2] */\r
+                       cm.horizontal_blank_end=0x82 + 1;   /* CRTC[3] bit 0-4 & CRTC[5] bit 7 */\r
                        cm.horizontal_start_retrace=0x54;/* CRTC[4] */\r
                        cm.horizontal_end_retrace=0x80; /* CRTC[5] bit 0-4 */\r
                        //cm.horizontal_start_delay_after_total=0x3e; /* CRTC[3] bit 5-6 */\r
                        //cm.horizontal_start_delay_after_retrace=0x41; /* CRTC[5] bit 5-6 */\r
-                       cm.vertical_total = 525;\r
+                       cm.vertical_total = 0x20D + 2;\r
                        cm.vertical_start_retrace = 0x1EA;\r
                        cm.vertical_end_retrace = 0x1EC;\r
                        cm.vertical_display_end = 480;\r
-                       cm.vertical_blank_start = 489;\r
-                       cm.vertical_blank_end = 517;\r
+                       cm.vertical_blank_start = 0x1E7 + 1;\r
+                       cm.vertical_blank_end = 0x206 + 1;\r
 \r
                        vga_write_crtc_mode(&cm,0);\r
                        }\r