joncampbell123 / dosbox-x

DOSBox-X fork of the DOSBox project
GNU General Public License v2.0
2.63k stars 373 forks source link

[Display] Windows/286 2.11, using Olivetti M24 drivers, shows with cyan tint. #3701

Open sm-programmer opened 1 year ago

sm-programmer commented 1 year ago

Describe the bug

Installing Windows/286 2.11 (image disk method), and using the drivers for Olivetti M24 (640x400 monochrome mode, aka DCGA), results in an image with cyan tint, almost resembling an LCD inverse effect.

image

Interesting to note, is that the welcome screen shows with correct colors:

image

Steps to reproduce the behaviour

  1. Follow the steps to install Windows 2.x, in a hard drive image (link).

    The settings used for testing are as follows:

    • The config file does not execute DCGA before passing control to the drive image.
    • The file SHUTDOWN.COM is transferred to the image according to standard procedure (link).
    • MS-DOS version: 3.31
    • Windows version: Windows/286 2.11.
      • Select "Olivetti Personal Computers", when asked to select a machine type.
      • Select "Olivetti Monochrome or PVC display", when asked to select a video card type.
  2. Reset DOSBox-X, either by closing and reopening, or by issuing the shutdown /r command.

  3. Start Windows by typing win, once DOSBox-X is restarted.

  4. Confirm that, during initialization, the welcome screen is in monchrome.

image

  1. Confirm that, once the desktop is loaded, the image presents a cyan tint.

image

Expected behavior

Step 6 should have presented the desktop in pure black and white (monochrome), without any tint, as shown in the following edit:

image

What operating system(s) this bug have occurred on?

Ubuntu 22.04.1 LTS, x86-64

What version(s) of DOSBox-X have this bug?

2022.09.0 (64 bit SDL2)

Used configuration

[dosbox]
title=Windows 2.11
machine=vgaonly
memsize=8
fastbioslogo=true
startbanner=false

[sdl]
autolock=false

[render]
scaler=none
euro=213

[dos]
ver=3.3
hard drive data rate limit=0
floppy drive data rate limit=0

[cpu]
cputype=286
core=dynamic

[pci]
voodoo=false

[ide, primary]
int13fakeio=true
int13fakev86io=false

[sblaster]
sbtype=sb16
sbbase=220
irq=7
dma=1
hdma=5

[serial]
serial1=serialmouse

[parallel]
parallel1=file append:printer/doc.ps cp:850

[config]
country=3,850
files=40
buffers=30
stacks=9,256

[autoexec]
@ECHO OFF
MOUNT D ./install/w211-286

REM --- Setup time vvv ---
REM IMGMOUNT 2 ./machines/win211-c.img -size 512,17,6,615 -fs none
REM BOOT ./install/dos-331.img
REM --- Setup time ^^^ ---

IMGMOUNT C ./machines/win211-c.img

REM --- First-time bootstrap vvv ---
REM MKDIR C:\DOSBOX
REM COPY Z:\BIN\SHUTDOWN.COM C:\DOSBOX
REM XCOPY Z:\TEXTUTIL C:\DOSBOX /S /Q
REM --- First-time bootstrap ^^^ ---

BOOT C:

Output log

LOG: Early LOG Init complete
LOG: DOSBox-X's working directory: /home/smprg/dosbox-x
LOG: Logging init: beginning logging proper. This is the end of the early init logging
LOG: Logging: No logfile was given. All further logging will be discarded.
LOG: DOSBox-X version 2022.09.0 (Linux SDL2)
LOG: Host keyboard layout is now us (US English)
LOG: Mapper keyboard layout is now us (US English)
LOG: SDL2 reports desktop display mode 1366 x 768
LOG: The default output for the video system: opengl
LOG: Configured windowposition: -
LOG: SDL: Current window pixel format: SDL_PIXELFORMAT_RGB888
LOG: SDL: You are running in 24 bpp mode, this will slow down things!
LOG: X11 main window is 640 x 400 maximized=0
LOG: X11 extension XRANDR is available
LOG: XRandR CRTC 0: pos=(0,0) size=(1366,768) outputs=1
LOG: Our window lies on this CRTC display (window pos=(363,184) size=(640,400) match=(683,384)).
LOG:   Goes to output 0: name='eDP-1' size_mm=(309 x 173)
LOG: Screen report: Method 'XRandR' (1366.000 x 768.000 pixels) at (0.000 x 0.000) (309.000 x 173.000 mm) (12.165 x 6.811 in) (112.286 x 112.758 DPI)
LOG: ISA BCLK: 8333333.333Hz (25000000/3)
LOG: monopal: green, 
LOG: Active save slot: 1 [Empty]
LOG: USING AVI+ZMBV
LOG: Max 3670016 sz 8192
LOG: Final 8192
LOG: SDLNet_TCP_Open: Couldn't connect to remote host
LOG: TiMidity: can't open control connection (host=127.0.0.1, port=7777)
LOG: MIDI:fluidsynth: SoundFont not specified, and no system SoundFont found
LOG: MIDI:synth: Specify .SF2 sound font file with midiconfig=
LOG: MT32: failed to locate ROMs.
LOG: MT32 emulation requires the PCM and CONTROL ROM files.
LOG: To eliminate this error message, check the DOSBox-X wiki.
LOG: The ROM files are: CM32L_CONTROL.ROM and CM32L_PCM.ROM or MT32_CONTROL.ROM and MT32_PCM.ROM
LOG: MIDI:Opened device:none
LOG: VOODOO LFB now at d0000000
LOG: Serial1: BASE 3f8h
LOG: Serial2: BASE 2f8h
LOG: Parallel1: BASE 378h
LOG: MPU-401 Registering I/O ports as if IBM PC MPU-401 at base 330h
LOG: GetDesktopResolution reading X11 desktop resolution
LOG: Root window (ID 1006) is 1366 x 768
LOG: X11 main window is 640 x 400 maximized=0
LOG: XRandR CRTC 0: pos=(0,0) size=(1366,768) outputs=1
LOG: Our window lies on this CRTC display (window pos=(363,184) size=(640,400) match=(683,384)).
LOG:   Goes to output 0: name='eDP-1' size_mm=(309 x 173)
LOG: Screen report: Method 'XRandR' (1366.000 x 768.000 pixels) at (0.000 x 0.000) (309.000 x 173.000 mm) (12.165 x 6.811 in) (112.286 x 112.758 DPI)
LOG: Allocated APM BIOS pm entry point at f000:ce40
LOG: Writing code to fce40
LOG: Writing code to fce60
LOG: X11 main window is 640 x 400 maximized=0
LOG: XRandR CRTC 0: pos=(0,0) size=(1366,768) outputs=1
LOG: Our window lies on this CRTC display (window pos=(363,184) size=(640,400) match=(683,384)).
LOG:   Goes to output 0: name='eDP-1' size_mm=(309 x 173)
LOG: Screen report: Method 'XRandR' (1366.000 x 768.000 pixels) at (0.000 x 0.000) (309.000 x 173.000 mm) (12.165 x 6.811 in) (112.286 x 112.758 DPI)
LOG: ISA Plug & Play BIOS enabled
LOG: VGA ROM BIOS init callback
LOG: WARNING: No translation support (to host) for code page 0
LOG:       2170 ERROR BIOS:Keyboard layout file auto not found
LOG:       2170 ERROR BIOS:Keyboard layout file auto not found
LOG: XMS: 50 handles allocated for use by the DOS environment
LOG: EMS page frame at 0xe000-0xefff
LOG: CPU is 286 or lower, setting EMS emulation to ems=emsboard and disabling VCPI and v86 startup
LOG: COMMAND.COM env size:             720 bytes
LOG: COMMAND.COM environment block:    0x0701 sz=0x002d
LOG: COMMAND.COM main body (PSP):      0x072f sz=0x009a
LOG: COMMAND.COM stack:                0x0749
LOG: pixratio 1.350, dw false, dh false
LOG: Aspect ratio: 720 x 540  xToY=1.333 yToX=0.750
LOG: menuScale=1
LOG: X11 main window is 720 x 417 maximized=0
LOG: XRandR CRTC 0: pos=(0,0) size=(1366,768) outputs=1
LOG: Our window lies on this CRTC display (window pos=(363,184) size=(720,417) match=(723,392)).
LOG:   Goes to output 0: name='eDP-1' size_mm=(309 x 173)
LOG: Screen report: Method 'XRandR' (1366.000 x 768.000 pixels) at (0.000 x 0.000) (309.000 x 173.000 mm) (12.165 x 6.811 in) (112.286 x 112.758 DPI)
LOG: font texture id=2 will make 128 x 256
LOG: X11 main window is 720 x 417 maximized=0
LOG: XRandR CRTC 0: pos=(0,0) size=(1366,768) outputs=1
LOG: Our window lies on this CRTC display (window pos=(363,184) size=(720,417) match=(723,392)).
LOG:   Goes to output 0: name='eDP-1' size_mm=(309 x 173)
LOG: Screen report: Method 'XRandR' (1366.000 x 768.000 pixels) at (0.000 x 0.000) (309.000 x 173.000 mm) (12.165 x 6.811 in) (112.286 x 112.758 DPI)
LOG: IDE: index 0 slave=0
LOG: FAT: Partition type is MBR (IBM PC)
LOG: Mounted FAT volume is FAT16 with 15639 clusters
LOG: Mapping BIOS DISK C/H/S 615/6/17 as IDE 615/6/17
LOG: Converting drive D: to FAT...
LOG: WARNING: Unable to reduce heads to 16 and below
LOG: If at all possible, please consider using INT 13h geometry with a head
LOG: count that is easier to map to the BIOS, like 240 heads or 128 heads/track.
LOG: Some OSes, such as Windows 95, will not enable their 32-bit IDE driver if
LOG: a clean mapping does not exist between IDE and BIOS geometry.
LOG: Mapping BIOS DISK C/H/S 33/255/63 as IDE 526/16/63 (non-straightforward mapping)
LOG: Booting guest OS stack_seg=0x7000 load_seg=0x07c0
LOG: Removing UMB block 0xcc00-0xdfff
LOG: Alright: DOS kernel shutdown, booting a guest OS
LOG:   CS:IP=0000:7c00 SS:SP=7000:0100 AX=0000 BX=7c00 CX=0001 DX=0080
LOG: IDE 1m reset by BIOS disk 0x80
LOG:     521932 ERROR BIOS:Disk 0 not active
LOG:     521993 ERROR BIOS:Disk 0 not active
LOG:     523104 ERROR BIOS:INT15:Unknown call ax=4100
LOG:    4416031 ERROR MOUSE:Unhandled videomode 40 on reset
LOG: pixratio 1.200, dw false, dh false
LOG: Aspect ratio: 640 x 480  xToY=1.333 yToX=0.750
LOG: menuScale=1
LOG: X11 main window is 640 x 417 maximized=0
LOG: XRandR CRTC 0: pos=(0,0) size=(1366,768) outputs=1
LOG: Our window lies on this CRTC display (window pos=(363,184) size=(640,417) match=(683,392)).
LOG:   Goes to output 0: name='eDP-1' size_mm=(309 x 173)
LOG: Screen report: Method 'XRandR' (1366.000 x 768.000 pixels) at (0.000 x 0.000) (309.000 x 173.000 mm) (12.165 x 6.811 in) (112.286 x 112.758 DPI)
LOG: font texture id=2 will make 128 x 256
LOG: X11 main window is 640 x 417 maximized=0
LOG: XRandR CRTC 0: pos=(0,0) size=(1366,768) outputs=1
LOG: Our window lies on this CRTC display (window pos=(363,184) size=(640,417) match=(683,392)).
LOG:   Goes to output 0: name='eDP-1' size_mm=(309 x 173)
LOG: Screen report: Method 'XRandR' (1366.000 x 768.000 pixels) at (0.000 x 0.000) (309.000 x 173.000 mm) (12.165 x 6.811 in) (112.286 x 112.758 DPI)
LOG:    5877161 ERROR KEYBOARD:60:Unhandled command 5
LOG:    5952782 ERROR MOUSE:Unhandled videomode 40 on reset
LOG:    6148953 ERROR BIOS:INT16:Unhandled call 6F
LOG: INT 15h mouse initialized to 3-byte protocol
LOG: INT 15h mouse reset

Additional information

An educated guess on what can be happening is that, if logs are suggesting correctly, video mode 40h (for 640x400, monochrome) is not being handled appropriately, or otherwise, its ending up translating badly through VGA, using one or two bit planes (hence getting tinted in blue/cyan).

Have you checked that no similar bug report(s) exist?

Code of Conduct & Contributing Guidelines

sm-programmer commented 1 year ago

UPDATE. I confirm the same issue happens with Windows 3.0, running in a mounted folder.

image