Skip to content

Clocking mode screen disable bit is mishandled #2838

@classilla

Description

@classilla

Are you using the latest Dosbox-Staging Version?

  • I have checked releases and am using the latest release.

Different version than latest?

No response

What Operating System are you using?

Linux ppc64le

If Other OS, please describe

No response

Relevant hardware info

No response

Have you checked that no other similar issue already exists?

  • I have searched and not found similar issues.

A clear and concise description of what the bug is.

This is apparently a very old bug and doesn't affect many programs, but it does affect Alien Carnage/Halloween Harry. I like this game, and my wife likes this game because Australians wrote it. See earlier report (from 2007!) here: https://www.dosbox.com/comp_list.php?showID=950&letter=H

What happens is that the VGA display never blanks even when the program turns it off. This manifests in screens painting, fading out and fading in, when they should simply fade in from black.

This is because DOSBox improperly aliases the bit in the clocking register which disables screen display with other sources; although the ClockingModeRegister struct has bit_view<5, 1> is_screen_disabled;, it never actually gets used by anything. Instead, vga_seq.cpp sets vga.attr.disabled in write_p3c5(), which is the only thing checked in vga_draw.cpp. Unfortunately, in a debug build, it can be shown that vga.attr.disabled gets frequently reset by other writes to port 0x3c0 in write_p3c0() in vga_attr.cpp, so the value of the clocking mode register is thus dropped and the screen never blanks.

The problem affects upstream as well; it doesn't look like anyone bothered to sit down and fix it. Does the project allow local fixes?

Steps to reproduce the behaviour.

Explain how to reproduce

  1. Run Alien Carnage. It happens right from the Apogee logo and everywhere else like the main menu.

Download URL of affected game or software

https://www.myabandonware.com/game/alien-carnage-1pe

Your configuration

No response

Provide a Log

No response

Code of Conduct & Contributing Guidelines

  • Yes, I agree.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingvideoGraphics and video related issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions