]> 4ch.mooo.com Git - 16.git/commitdiff
modex mode 1 is 320x240 so make sure it's 320 across.
authorJonathan Campbell <jonathan@castus.tv>
Sun, 17 Apr 2016 06:33:16 +0000 (23:33 -0700)
committerJonathan Campbell <jonathan@castus.tv>
Sun, 17 Apr 2016 06:33:16 +0000 (23:33 -0700)
pcx2vrl
pcxsscut
src/lib/modex16.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 bada2e67972d951ea48fdacbe96bbda4b969b5b8..70e8e871b063aff8f5bc568cc0f49d6f8e00e941 100755 (executable)
@@ -94,9 +94,12 @@ void modexEnter(sword vq, boolean cmem, global_game_variables_t *gv)
                case 1:\r
                        //CRTParmCount = sizeof(ModeX_320x240regs) / sizeof(ModeX_320x240regs[0]);\r
                        /* width and height */\r
-                       gv->video.page[0].sw=vga_state.vga_width = 320; // VGA lib currently does not update this\r
-                       gv->video.page[0].sh=vga_state.vga_height = 240; // VGA lib currently does not update this\r
+                       gv->video.page[0].sw = vga_state.vga_width = 320; // VGA lib currently does not update this\r
+                       gv->video.page[0].sh = vga_state.vga_height = 240; // VGA lib currently does not update this\r
 \r
+                       // mode X BYTE mode\r
+                       cm.word_mode = 0;\r
+                       cm.dword_mode = 0;\r
                        // 320x240 mode 60Hz\r
                        cm.horizontal_total=0x5f + 5; /* CRTC[0]             -5 */\r
                        cm.horizontal_display_end=0x4f + 1; /* CRTC[1]       -1 */\r
@@ -115,8 +118,7 @@ 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=0x58;\r
-                       cm.offset=0x2c;\r
+                       cm.offset = (vga_state.vga_width / (4 * 2)); // 320 wide (40 x 4 pixel groups x 2)\r
                        break;\r
                case 2: // TODO: 160x120 according to ModeX_160x120regs\r
                        return;\r
@@ -130,6 +132,7 @@ void modexEnter(sword vq, boolean cmem, global_game_variables_t *gv)
                        return;\r
        }\r
 \r
+       vga_state.vga_stride = cm.offset * 2;\r
        vga_write_crtc_mode(&cm,0);\r
 \r
        /* clear video memory */\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