joncampbell123 / dosbox-x

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

2D Graphics cards #4139

Open Torinde opened 1 year ago

Torinde commented 1 year ago

Is your feature request related to a problem? Please describe.

Sharing here the list of 2D chips that aren't emulated yet, in case there are some further synergies possible with the recently added stubs for Hercules and ATI video cards. Adding some snippets about each that I copied from Wikipedia or elsewhere.

What you want

Describe alternatives you've considered

No response

Additional information

No response

Have you checked that no similar feature request(s) exist?

Code of Conduct & Contributing Guidelines

joncampbell123 commented 1 year ago

I've already added machine types for the Hercules graphics card options, and ATI chipset options (another issue mentions wanting ATI Rage emulation). They are "stubs" at the moment that will be developed over time into their respective hardware.

These are by no means going to be fast to implement, and I'm going to need others to help with adding the emulation. I'll collect documentation together as progress happens for each option. Starting with Hercules graphics cards: http://hackipedia.org/browse.cgi/Computer/Platform/PC%2c%20IBM%20compatible/Video/Hercules as the HGC+ and InColor cards could be thought of as Hercules Graphics with additional features.

joncampbell123 commented 1 year ago

As for MCGA emulation, that's pretty much mostly done other than perhaps esoteric edge cases like what could have been a useful 16-color 4 bits per pixel packed mode, and the mechanism by which font data is transferred from video RAM to the character generator.

joncampbell123 commented 1 year ago

Some documentation on the Orchid Graphics Adapter (not much though): https://www.seasip.info/VintagePC/miscvideo.html

joncampbell123 commented 1 year ago

As far as I can tell, Sierra 3D helicopter simulator does detect the InColor and even writes the registers, but still draws monochrome 1-bit graphics.

Microsoft Flight Simulator however, that proves to be a worthwhile test case for InColor. It's using the bitplanes, raster ops, and all.

joncampbell123 commented 1 year ago

So... Sierra 3D helicopter detects InColor and writes some registers, but continues to render monochrome graphics. I'm guessing the purpose is perhaps to make sure the graphics are black and gray.

Microsoft Flight Simulator is working now with InColor graphics. It only ever uses write mode 1 (foreground fill over bitplane latches) though. fs3_000 I'll commit my changes soon.

joncampbell123 commented 1 year ago

Flight Simulator 4.0 is happy, too. fs4_000

joncampbell123 commented 1 year ago

Does anyone know of a DOS game or utility that uses the HGC+ RAM font mode?

Torinde commented 1 year ago

Wikipedia for HGC+: Software support included Lotus 1-2-3 v2, Symphony 1.1, Framework II and Microsoft Word 3.[17]

joncampbell123 commented 1 year ago

Lotus 1-2-3 3.0 Plus does confirm my InColor emulation is working properly, but I don't see it using any RAM font functionality. It either uses text mode or it uses the GFX mode to show an 8x8 font so you can see more cells on screen.

Also it crashes with ems=true because it's trying to use the half-finished VCPI emulation built into DOSBox-X, so you need to set ems=false. As for the initial 1989 release, I'm not sure what's going on to cause an "unexpected interrupt" in real mode despite needing a 286 :shrug: Early pre-DPMI protected mode DOS stuff is quite weird.

joncampbell123 commented 1 year ago

Just tried Microsoft Word 3.x through 5.5. 3.x support Hercules, 4.x and 5.x support the HGC+ plus but despite reprogramming the memory map otherwise, still doesn't use RAM fonts.

Word 5.5 supports HGC+ and InColor, but the text mode still doesn't use RAM fonts, nor does it support using the CGA attributes mode of text nor does it ever bother drawing color in InColor graphics mode.

Obviously even if there is software that can draw color graphics on InColor, there's nothing out there that bothers to use the RAM fonts feature of the card.

The only remaining possibility I can think of for testing this is that perhaps Hercules inc. had some test or diagnostic program they shipped to showcase the features of the card. If that exists, maybe that will give me the test case I need to implement the RAM fonts emulation.

Otherwise, I will have to skip RAM fonts, leave a TODO in the source code, and move on to other cards.

joncampbell123 commented 1 year ago

By the way, in addition to the article on InColor RAM fonts and the crazy way you can quadruple the available character set using bitplanes, my copy of the "Programmer's Guide to PC and Ps/2 Video Systems" book also mentions that about the InColor card (because it was written right about when the card came out, I think). Which means the alphanumeric mode of the InColor must function like 4 parallel copies of the character generator, one for each bitplane, for something that wacky to work. :)

Torinde commented 1 year ago

From Wikipedia's links it seems the three programs listed should support RAMFONT - maybe there are some special versions or settings to enable it? 1 image

Also a link with details about RAMFONT "Hercules Graphics Card Plus: Notes". John Elliott's homepage.

Torinde commented 1 year ago

Also, per the John Elliott link from Wikipedia - HGC+ has a "Lightpen connector" - Light pens are apparently supported by PCjr and Tandy 1000 as well and mentioned at #256

joncampbell123 commented 1 year ago

Thank you, I already archived John Ellliot's HGC+ notes on Hackipedia.org :) If Lotus 1-2-3 and Microsoft Word support it I'd like to see it because at no time did any of those programs attempt to set the font even when configured explicitly for HGC+ and InColor. Does it require a TSR of some kind?

joncampbell123 commented 1 year ago

Since the HGC+ is compatible with MDA including the 9-pin connector I assume it reads the light pen the same way as MDA.

Torinde commented 1 year ago

Did you try with the earlier versions mentioned at Wikipedia: Lotus 1-2-3 v2 or Symphony 1.1? From what I read there it seems v2 introduced support for international character sets, switching between them, etc.

As for v3 - maybe RAMFONT support was dropped then...

Also, what about "Framework II"?

joncampbell123 commented 1 year ago

Framework II seems only to use the Hercules graphics mode, no text with RAM fonts.

joncampbell123 commented 1 year ago

Hellooooo, Framework III! https://winworldpc.com/download/3f284936-37f3-11eb-a665-0200008a0da4

Finally, found something that uses HGC+ RAM fonts!

setupfw_000

kcgen commented 1 year ago

That's some top-notch research, @Torinde !

Finally, found something that uses HGC+ RAM fonts!

Fantastic news in finding this use-case, @joncampbell123 ! :partying_face:

rderooy commented 1 year ago

Did you find this forum post with InColor driver disks that should include the RamFont utilities: https://forum.vcfed.org/index.php?threads/hercules-plus-and-or-incolor-detection-and-font-setting.1241153/post-1289694

BridgeHeadland commented 1 year ago

@joncampbell123 Can Hercules really be in 70:35 resolution?

rderooy commented 1 year ago

@joncampbell123 Can Hercules really be in 70:35 resolution?

https://nerdlypleasures.blogspot.com/2014/02/monochrome-hercules-graphics-aspect.html

joncampbell123 commented 1 year ago

@joncampbell123 Can Hercules really be in 70:35 resolution?

Hercules graphics cards, like MDA, are documented to emit a 720x350 video resolution with a 9x14 character cell in 80x25 text mode. The HGC+ and InColor cards do have a bit to instead render 720x350 with an 8x14 character cell for 90x25 text mode though.

Torinde commented 10 months ago

From the Wiki:

DCGA is the video mode used by the Olivetti M24, AT&T 6300 and Toshiba T3100. DOSBox-X emulates the DCGA mode via the VGA mode.

Does that mean "Motorola 6845/Olivetti M24 Enhanced CGA" is already supported?

Changed the OP to have checkboxes, so @joncampbell123, you can tick those that are complete, if you want.