joncampbell123 / dosbox-x

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

ET4000 emulation issues #2819

Open rderooy opened 3 years ago

rderooy commented 3 years ago

Describe the bug I have been playing around with the ET4000 emulation a bit and ran into some issues.

ET4000 driver/utility package: http://files.mpoli.fi/hardware/DISPLAY/TSENG/ET-4000.ZIP

This is what the main menu of TVDIAG.EXE should look like (not my picture): tvdiag_000

In the Utility package which has TVDIAG.EXE, there is also a README.DOC that may be of interest:

              README
              ------

The 24-bit color driver (eg. Windows 3.1) when operating
at 24-bit mode may (or may not) cause horizontal noise
lines when the cursor or an image is moving.  The noise
disappears when the movement stops.

This problem can be fixed by using one of the following
solutions:

A)  Use DMODE 2.82 and 16MCOLOR.COM.

B)  A new BIOS.

For users who have already had a 24-bit color card and
experienced the above mentioned noise,  the solution is
available now with DMODE 2.82 and 16MCOLOR.COM.

The 16MCOLOR.COM sets CRTC Register 32 value to 08H to
fix the bug.  Some other software (BIOS initial setup
routine) also directly program the CRTC Register 32.
Therefore, you must execute the 16MCOLOR.COM program
after you reboot your PC.

The DMODE 2.82 also includes an undocumented command
which allows you to set the CRTC Register 32 to 08H with
the following command: DMODE SCLK=36MHz.

Note:  1. When Register 32 is set to 08H, the ET4000 may
      not support 132 column display if only 256K
      Byte display memory is installed.  Since rarely
      ET4000 cards are used with only 256KB memory,
      we believe there will be little or no problem
      caused by this change.

       2. Our new BIOS shipped on November will also fix
      the problem.  Do not swap BIOS PROMS unless the
      cards' clock chips use the same frequency
      specifications.

       3. 16MCOLOR.COM is only compatible with DMODE
      2.82.  Previous DMODE has a TSR program which
      resets Register 32 whenever a mode setting
      occures, therefore, makes 16MCOLOR.COM useless.
rderooy commented 3 years ago

Perhaps with the 8 simultaneous fonts they mean the 4 colours with 2 fonts each.

joncampbell123 commented 3 years ago

It's possible the driver didn't "hang", but merely failed to change the video mode. If you capture the mouse (to avoid closing the DOSBox-X window when you do this!) and then hit ALT+F4 and then enter when it's "stuck" like that, do you hear any "ding" or see any sign that you had successfully exited the Program Manager entirely by keyboard, and returned to DOS?

joncampbell123 commented 3 years ago

Also, DOSBox-X and DOSBox SVN emulate the early 1990s ET4000 cards that were made before they added highcolor/truecolor DACs to the card. So much like the ET4000 in an old 486 of mine, it can only go up to 256 colors. Using a driver that expects a highcolor/truecolor DAC is not expected to work for that reason. As the Windows drivers use INT 10h to set the display mode, I expect your case only looks "hung" because it probably assumes a highcolor/truecolor video mode that doesn't exist, which is why I asked if ALT+F4 and then Enter lets you exit to DOS. I have seen Windows 3.1 drivers that set video modes via INT 10h, and make no attempt to check if the INT 10h mode actually changed thus causing an invisible desktop behind a text display and blinking cursor.

joncampbell123 commented 3 years ago

As for why TVDIAG.EXE thinks it's an ET3000, well, since DOSBox-X's ET4000 is generally based on DOSBox SVN's ET4000 emulation as it was when DOSBox-X forked in 2012, there may be some detail or register behavior other than the standard ET3000/ET4000 detection routine that the program checks for (ref: http://hackipedia.org/browse.cgi/Computer/Platform/PC%2c%20IBM%20compatible/Video/VGA/SVGA/Tseng%20Labs/Programming%20the%20Tseng%20SVGA%20Chip%20by%20Mark%20Feldman%2etxt ). The other possibility is a signature of some kind in the BIOS. Poking at TVDIAG.EXE with the debugger can help here.

EDIT: I see that TVDIAG detects a highcolor DAC, because as a general hack in SVN the highcolor DAC is always enabled. My ET4000 does not have a highcolor DAC. That might be something.

rderooy commented 3 years ago

I will check tomorrow some more. But in Windows 3.0 I was able to get 65k colours with the ET4000 drivers in the linked driver package.