Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MDA/Hercules - wrong mono text mode attributes #5204

Open
2 tasks done
MrMadguy64 opened this issue Sep 8, 2024 · 0 comments
Open
2 tasks done

MDA/Hercules - wrong mono text mode attributes #5204

MrMadguy64 opened this issue Sep 8, 2024 · 0 comments
Labels

Comments

@MrMadguy64
Copy link

MrMadguy64 commented Sep 8, 2024

Describe the bug

MDA/Hercules text attributes - are mysterious thing. Different sources can provide different info about them. Author of this article claims, that he has tested everything on real hardware and software. I'm not sure, if old real hardware is needed, because attribute controller should support mono attributes even on new hardware. It should be supported for compatibility with mode 0x07. I've written my application according to this information. And it doesn't work properly in DOSBox-X.

How I expected it to work? There are just 4 possible monochrome attributes:

  1. Black on black - can't be combined with any intensity bits
  2. Normal - can be combined with foreground intensity bit only
  3. Underline - can be combined with foreground intensity bit only
  4. Reversed - can be combined with both intensity bits
  5. Any other attribute - should be white on white according to documentation, but it actually falls back to normal attribute on real hardware.

But it looks this way in DOSBox-X:
Mono attributes

Foreground is left, background is right. Foreground is controlled by X coordinate, background is controlled by Y. Bit 0 controls color bits, bit 1 controls intensity bit.

As you can see, background intensity is supported in normal mode, but isn't supported in reversed mode, that is opposite to how it should actually work.

P.S. Please don't forget about this issue! It isn't connected to distorted image - it's connected to how 64 color palette is chosen. It should be chosen for any 350 modes, not only 640x350.

Steps to reproduce the behaviour

Run following BASIC program:

CLS
OUT &H3B8, &H8
DEF SEG = &HB000
FOR Y = 0 TO 3
FOR X = 0 TO 3
C = (X AND 1) * &H7 + (X AND 2) * &H4
C = C + (Y AND 1) * &H70 + (Y AND 2) * &H40
POKE Y * 160 + X * 4, &HDD
POKE Y * 160 + X * 4 + 1, C
NEXT X
NEXT Y

Expected behavior

According to this article

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

Windows

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

Latest

Used configuration

No response

Output log

No response

Additional information

No response

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

  • I have searched and didn't find any similar bug report.

Code of Conduct & Contributing Guidelines

  • I agree to follow the code of conduct and the contributing guidelines.
@MrMadguy64 MrMadguy64 added the bug label Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant