I had problem with video scrolling in Titan game in 320x200x8 mode (ax=000Dh, int 10h). Game works perfect on real machine (GeForce 2 mx400 videocard). But in dosbox if bit 0 of CRTC register is set to 0 (CGA compatible address mode on) video memory address isn't wrap at 64k.
Problem can be fixed with this patch (VGA_SetupDrawing() function -> switch (vga.mode) -> case M_EGA:).
according to h-a-l-9000 this bug has been fixed
sorry mis understood something
sorry mis understood something
Screenshots from original dosbox-0.73 and from patched one
Excuse me for my english and for bad explanation of problem.
Dosbox doesn't react to this code:
mov dx, 3D4h ; Video: CRT cntrlr addr
mov al, 17h ; register index 17h
out dx, al
inc dx
mov al, 0E2h ;bit 0 is set to 0
out dx, al ;(CGA compatible address mode on)
On real videocard this code leads to video memory address wrap at 64k boundary and game works. I've attached zip-archive with screenshots made in original dosbox-0.73 and in patched one.
Attaching a diff of how I'd fix this issue. It's a part of how real hardware does it.
An occasional black line remains in the game with both solutions. Probably because wrapping in a line isn't supported.
No idea how to add files - so I'll add it here:
Index: src/hardware/vga_draw.cpp
RCS file: /cvsroot/dosbox/dosbox/src/hardware/vga_draw.cpp,v
retrieving revision 1.111
diff -u -r1.111 vga_draw.cpp
--- src/hardware/vga_draw.cpp 10 Sep 2009 17:44:57 -0000 1.111
+++ src/hardware/vga_draw.cpp 24 Oct 2009 14:52:11 -0000
@@ -800,6 +805,8 @@
#endif
switch (vga.mode) {
case M_EGA:
+ if (!(vga.crtc.mode_control&0x1)) vga.draw.linear_mask &= ~0x10000;
+ else vga.draw.linear_mask |= 0x10000;
case M_LIN4:
vga.draw.byte_panning_shift = 8;
vga.draw.address += vga.draw.bytes_skip;
Thank you very much for your reply. Your fix is more accurate. I tried it and game works fine.
BTW, occasional black line disappear if those new lines would be
The bug has been fixed.
Wait for the upcoming new version to see it.
Or:
The updated source is available by cvs.
See the link on top of the screen for information on how to get
the new sources.
The DOSBox Team