• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

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

wwww


Commit MetaInfo

Revision6d7a981e6e607a373d9418d064ab6dc881d10282 (tree)
Time2016-04-17 15:33:16
AuthorJonathan Campbell <jonathan@cast...>
CommiterJonathan Campbell

Log Message

modex mode 1 is 320x240 so make sure it's 320 across.

Change Summary

Incremental Difference

Binary files a/pcx2vrl and b/pcx2vrl differ
Binary files a/pcxsscut and b/pcxsscut differ
--- a/src/lib/modex16.c
+++ b/src/lib/modex16.c
@@ -94,9 +94,12 @@ void modexEnter(sword vq, boolean cmem, global_game_variables_t *gv)
9494 case 1:
9595 //CRTParmCount = sizeof(ModeX_320x240regs) / sizeof(ModeX_320x240regs[0]);
9696 /* width and height */
97- gv->video.page[0].sw=vga_state.vga_width = 320; // VGA lib currently does not update this
98- gv->video.page[0].sh=vga_state.vga_height = 240; // VGA lib currently does not update this
97+ gv->video.page[0].sw = vga_state.vga_width = 320; // VGA lib currently does not update this
98+ gv->video.page[0].sh = vga_state.vga_height = 240; // VGA lib currently does not update this
9999
100+ // mode X BYTE mode
101+ cm.word_mode = 0;
102+ cm.dword_mode = 0;
100103 // 320x240 mode 60Hz
101104 cm.horizontal_total=0x5f + 5; /* CRTC[0] -5 */
102105 cm.horizontal_display_end=0x4f + 1; /* CRTC[1] -1 */
@@ -115,8 +118,7 @@ void modexEnter(sword vq, boolean cmem, global_game_variables_t *gv)
115118 cm.clock_select = 0; /* misc register = 0xE3 25MHz */
116119 cm.vsync_neg = 1;
117120 cm.hsync_neg = 1;
118- vga_state.vga_stride=0x58;
119- cm.offset=0x2c;
121+ cm.offset = (vga_state.vga_width / (4 * 2)); // 320 wide (40 x 4 pixel groups x 2)
120122 break;
121123 case 2: // TODO: 160x120 according to ModeX_160x120regs
122124 return;
@@ -130,6 +132,7 @@ void modexEnter(sword vq, boolean cmem, global_game_variables_t *gv)
130132 return;
131133 }
132134
135+ vga_state.vga_stride = cm.offset * 2;
133136 vga_write_crtc_mode(&cm,0);
134137
135138 /* clear video memory */
Binary files a/vrl2vrs and b/vrl2vrs differ
Binary files a/vrsdump and b/vrsdump differ