• 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

Revisioncb4574433d1faa6a5345362d66211108f9aaaa3c (tree)
Time2016-04-17 15:53:43
AuthorJonathan Campbell <jonathan@cast...>
CommiterJonathan Campbell

Log Message

clear video RAM using pointer set after INT 10h + vga update, not
before. this fixes scribbling over VGA ROM BIOS and possible DOSBox
UMB corruption.

Change Summary

Incremental Difference

--- a/src/lib/modex16.c
+++ b/src/lib/modex16.c
@@ -80,7 +80,6 @@ vgaGetMode()
8080 void modexEnter(sword vq, boolean cmem, global_game_variables_t *gv)
8181 {
8282 word i;
83- dword far*ptr=(dword far*)vga_state.vga_graphics_ram;//VGA; /* used for faster screen clearing */
8483 struct vga_mode_params cm;
8584 int CRTParmCount;
8685
@@ -138,10 +137,12 @@ void modexEnter(sword vq, boolean cmem, global_game_variables_t *gv)
138137 /* clear video memory */
139138 switch (cmem)
140139 {
141- case 1:
142- /* clear video memory */
143- vga_write_sequencer(2/*map mask register*/,0xf/*all 4 planes*/);
144- for(i=0; i<0x8000; i++) ptr[i] = 0x0000;
140+ case 1: {
141+ /* clear video memory */
142+ dword far*ptr=(dword far*)vga_state.vga_graphics_ram;//VGA; /* used for faster screen clearing */
143+ vga_write_sequencer(2/*map mask register*/,0xf/*all 4 planes*/);
144+ for(i = 0;i < 0x4000; i++) ptr[i] = 0x0000; // 0x4000 x dword = 64KB
145+ }
145146 break;
146147 }
147148 gv->video.page[0].tilesw = gv->video.page[0].sw/TILEWH;